You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Vincent Massol <vm...@octo.com> on 2001/12/15 20:12:05 UTC

Packaging Cactus in a J2EE application (WAS RE: Cactus : Struts)



> -----Original Message-----
> From: David L. Wasler [mailto:dwasler@yahoo.com]
> Sent: 15 December 2001 18:30
> To: Cactus Users List
> Subject: RE: Cactus : Struts
> 
> Hi:
> 
> As a suggestion, you might want to build a EAR
> component which hold multiples WAR components, in
> WL6.1 you can set roles and rules for these
> components. Not sure if BEA has fixed all the bugs in
> this feature.

No it hasn't ... :)

Here is a packaging that I propose for packaging Cactus in an EAR :

Mytest.ear
  |_ myejbjar.jar
    |_ META-INF
      |_ manifest.mf (ref. lib/cactus.jar, lib/log4j.jar, lib/junit.jar)
    |_ classes
  |_ mywar.war
    |_ META-INF
      |_ manifest.mf (ref. lib/cactus.jar, lib/log4j.jar, lib/junit.jar)

    |_ WEB-INF
      |_ web.xml (inc. cactus mapping)
      |_ lib
        |_ struts.jar
      |_ classes
        |_ classes + test classes
  |_ lib
    |_ cactus.jar
    |_ log4j.jar
    |_ junit.jar

This would be the "ideal" packaging. However, there are a few issues,
depending on the application server you use (as they don't all fully
respect EAR packaging yet). For example, here are the gotchas with WL6.1
:

* It does not accept jar put in a directory for external libraries (i.e.
using Class-Path in the manifest file). So you have to put cactus.jar,
log4j.jar and junit.jar at the top level in the ear and not under a lib
directory.

* I'm not sure it supports using external libraries for war files, in
which case we would have to copy the jar files to mywar.war/WEB-INF/lib.

-Vincent

> 
> Cheers
> David L. Wasler
> dwasler@yahoo.com
> 
> 
> --- Pavan Aripirala Venkata
> <pv...@h5technologies.com> wrote:
> > 	I have cactus.jar, junit.jar and servlet.jar in
> > WEB_INF/lib
> > directory. Actually in a war file called
> > cactus_lance.war file. This war
> > file also contains the Cactus and struts test
> > classes.
> > 	There is a another war file - lance.war - which
> > contains
> > struts.jar file, whose properties map to
> > WEB_INF/lib. The actual classes
> > to be tested are present in this war file. This
> > web.xml file in this war
> > file contains the Redirector mappings.
> > 	All the above is w.r.t server. On the client end -
> > struts.jar,
> > cactus.jar, httpclient.jar and the directory
> > containing
> > cactus.properties file in the classpath and this
> > classpath is specified
> > through the ant scripts and therefore are not in the
> > system classpath.
> > 	System classpath has none of the jar files or even
> > our product
> > classes. Everything is specified in ant. All that is
> > there in the system
> > classpath is the weblogic home, java home and ant
> > home.
> > Hopefully this info suffices.
> > Thanks Vincent
> >
> > Pavan.
> >
> >
> > -----Original Message-----
> > From: Vincent Massol [mailto:vmassol@octo.com]
> > Sent: Thursday, December 13, 2001 10:59 AM
> > To: 'Cactus Users List'
> > Subject: RE: Cactus : Struts
> >
> >
> > You need to be more precise. Where is the struts.jar
> > located _exactly_
> > and where are the cactus.jar, junit.jar ? Do you
> > have any jar in the
> > system classpath and if so, which ones ?
> >
> > It seems your problem is related to classloaders,
> > which is why I'm
> > asking these questions.
> >
> > thanks
> > -Vincent
> >
> > > -----Original Message-----
> > > From: Pavan Aripirala Venkata
> > [mailto:pvenkata@h5technologies.com]
> > > Sent: 13 December 2001 18:26
> > > To: Cactus Users List
> > > Subject: RE: Cactus : Struts
> > >
> > >     Yes all the related jar files are in the
> > classpath or in
> > WEB-INF/lib
> > > directory. The only jar I added is the Struts.jar
> > file.
> > >
> > > Pavan.
> > >
> > >
> > > -----Original Message-----
> > > From: Vincent Massol [mailto:vmassol@octo.com]
> > > Sent: Wednesday, December 12, 2001 2:40 PM
> > > To: 'Cactus Users List'
> > > Subject: RE: Cactus : Struts
> > >
> > >
> > > Hi Pavan,
> > >
> > > Hum ... not sure what is happening here. Are you
> > sure that struts or
> > any
> > > other jar is not in your weblogic system classpath
> > ?
> > >
> > > -Vincent
> > >
> > > > -----Original Message-----
> > > > From: Pavan Aripirala Venkata
> > [mailto:pvenkata@h5technologies.com]
> > > > Sent: 11 December 2001 00:24
> > > > To: Cactus Users List
> > > > Subject: RE: Cactus : Struts
> > > >
> > > > 	Hi I used the StrutsTestCase.java to test one
> > of my struts
> > > > class. I have struts.jar file in WEB-INF/lib
> > directory of weblogic
> > 6.0
> > > > server. I am getting the following exception in
> > the setUp() method :
> > > >
> > > >      [java] java.lang.NoClassDefFoundError:
> > > > org/apache/struts/action/ActionFormBeans
> > > >      [java]     at
> > > >
> >
> com.ejemoni.qa.struts.TestLogonStrut.setUp(TestLogonStrut.java:93)
> > > >      [java]     at
> > > >
> > >
> >
>
org.apache.cactus.AbstractTestCase.runBareServerTest(AbstractTestCase.ja
> > > > va:454)
> > > >      [java]     at
> > > >
> > >
> >
>
org.apache.cactus.server.AbstractTestCaller.doTest(AbstractTestCaller.ja
> > > > va:137)
> > > >      [java]     at
> > > >
> >
> org.apache.cactus.server.AbstractTestController.handleRequest
> > > > (AbstractTestController.java:122)
> > > >      [java]     at
> > > >
> >
> org.apache.cactus.server.ServletTestRedirector.doPost(Servlet
> > > > TestRedirector.java:134)
> > > >
> > > > At this line
> > > >  	ActionFormBeans formBeans =
> > > >                   (ActionFormBeans)
> > > > context.getAttribute(Action.FORM_BEANS_KEY);
> > > >
> > > > If I do
> > > > 	Object tmpObj =
> > context.getAttribute(Action.FORM_BEANS_KEY);
> > > > and if I print this object, it is showing that
> > the type of object is
> > > > org.apache.struts.action.ActionFormBeans
> > > > but however if I cast it
> > > > 	ActionFormBeans formBeans =
> > > >                   (ActionFormBeans) tmpObj;
> > > > then again the above exception is being thrown
> > > > 	I am able to run the EJB tests using cactus,
> > but I am unable to
> > > > run the tests for struts. Could someone please
> > help me in this
> > regard?
> > > > Thanks
> > > >
> > > > Pavan.
> > > >
> > > > -----Original Message-----
> > > > From: Erik Hatcher
> > [mailto:jakarta-struts@ehatchersolutions.com]
> > > > Sent: Friday, November 09, 2001 1:51 PM
> > > > To: struts-user@jakarta.apache.org
> > > > Cc: cactus-user@jakarta.apache.org
> > > > Subject: Re: Cactus : Struts
> > > >
> > > >
> > > > First, I'd like to thank Nick for the great work
> > on the code he sent
> > > to
> > > > the
> > > > list.
> > > >
> > > > I wanted to get something officially submitted
> > to Struts or Cactus,
> > so
> > > I
> > > > took what Nick provided and based the attached
> > StrutsTestCase
> > loosely
> > > on
> > > > it.
> > > > I wanted to do away with the mock ActionServlet
> > inner class, so I
> > just
> > > > use
> > > > the instance of the actual servlet provided by
> > the ActionMappings
> > put
> > > in
> > > > application scope.
> > > >
> > > > I did not implement all the methods that Nick
> > had as I wanted to
> > start
> > > > small
> > > > and build up to it.  I borrowed his
> > assertNoErrors code.  In this
> > > > version
> > > > you can assert that there are no ActionErrors
> > (after a validate or
> > > after
> > > > an
> > > > Action.perform), and you can assert that the
> > desired ActionForward
> > > > (currently only by name, not path) is returned.
> > I wanted to go
> > ahead
> > > > and
> > > > toss this out for general review by both the
> > Struts
> === message truncated ===
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Check out Yahoo! Shopping and Yahoo! Auctions for all of
> your unique holiday gifts! Buy at http://shopping.yahoo.com
> or bid at http://auctions.yahoo.com
> 
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-user-
> help@jakarta.apache.org>
> 




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Packaging Cactus in a J2EE application (WAS RE: Cactus : Struts)

Posted by "David L. Wasler" <dw...@yahoo.com>.
Hi:

Can't comment on item 1 yet !
Item 2 is correct J2EE components are not visible
outside the EAR container as suggested or their own 
WAR container, but working on a solution.

Will look at your WL 6.1 ant script today.


Cheers
David L. Wasler
dwasler@yahoo.com



--- Vincent Massol <vm...@octo.com> wrote:
> 
> 
> > -----Original Message-----
> > From: David L. Wasler [mailto:dwasler@yahoo.com]
> > Sent: 16 December 2001 19:41
> > To: Cactus Users List
> > Subject: RE: Packaging Cactus in a J2EE
> application (WAS RE: Cactus :
> > Struts)
> > 
> > --- Vincent Massol <vm...@octo.com> wrote:
> > > Hi:
> > 
> > My approach is to house Cactus and JUint in own
> WAR
> > components house inside an EAR component. 
> 
> 1/ That won't work in the future with EJB redirector
> 2/ That won't work as other WAR won't have access to
> the cactus and
> junit jars
> 
> > If current
> > application servers can't accept this concept ,
> there
> > not much we can do!
> 
> It is not the problem of current application servers
> ! This is simply
> not in the spec. !
> 
> > 
> > Were you have JAR I would replace them with WAR
> > components.
> > 
> > I'm currently setting up my IDE  enviroment to
> > automaticly build such a component and deploy to
> > Weblogic 6.0 and 6.1
> 
> You might be interested in the ant script for
> WebLogic 6.1 that I have
> committed today (in sample/build directory of cactus
> distribution).
> 
> -Vincent
> 
> > 
> > Cheers
> > David L. Wasler
> > dwasler@yahoo.com
> > >
> > > > -----Original Message-----
> > > > From: David L. Wasler
> [mailto:dwasler@yahoo.com]
> > > > Sent: 15 December 2001 20:55
> > > > To: Cactus Users List
> > > > Subject: Re: Packaging Cactus in a J2EE
> > > application (WAS RE: Cactus :
> > > > Struts)
> > > >
> > > > Hi Vincent:
> > > >
> > > > I agree with on you " some what"  on your EAR
> > > > component directory structure, can't provided
> a
> > > better
> > > > one yet. My directory structure is very close
> to
> > > your,
> > > > but maybe my approach will not work,
> > >
> > > what is your structure ? I can tell you if it
> will
> > > work or not if you
> > > show it to me.
> > >
> > > > will have try it
> > > > out. If we use an IDE like TogetherSoft , I
> think
> > > > JBuilder  we should be able to write an XML
> file
> > > that
> > > > Ant could use.
> > >
> > > Maybe but what's the use ? Cactus already
> provides
> > > these Ant scripts.
> > >
> > > > In short define traget application
> > > > server.
> > >
> > > Cactus already provides support for a few
> > > application servers through
> > > Ant scripts.
> > >
> > > >
> > > > We could look at SOAP also.
> > >
> > > Not sure what you mean here ? SOAP to do what ?
> > >
> > > -Vincent
> > >
> > > >
> > > > Cheers
> > > > David L. Wasler
> > > > dwasler@yahoo.com
> > > >
> > > > --- Vincent Massol <vm...@octo.com> wrote:
> > > > >
> > > > >
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: David L. Wasler
> > > [mailto:dwasler@yahoo.com]
> > > > > > Sent: 15 December 2001 18:30
> > > > > > To: Cactus Users List
> > > > > > Subject: RE: Cactus : Struts
> > > > > >
> > > > > > Hi:
> > > > > >
> > > > > > As a suggestion, you might want to build a
> EAR
> > > > > > component which hold multiples WAR
> components,
> > > in
> > > > > > WL6.1 you can set roles and rules for
> these
> > > > > > components. Not sure if BEA has fixed all
> the
> > > bugs
> > > > > in
> > > > > > this feature.
> > > > >
> > > > > No it hasn't ... :)
> > > > >
> > > > > Here is a packaging that I propose for
> packaging
> > > > > Cactus in an EAR :
> > > > >
> > > > > Mytest.ear
> > > > >   |_ myejbjar.jar
> > > > >     |_ META-INF
> > > > >       |_ manifest.mf (ref. lib/cactus.jar,
> > > > > lib/log4j.jar, lib/junit.jar)
> > > > >     |_ classes
> > > > >   |_ mywar.war
> > > > >     |_ META-INF
> > > > >       |_ manifest.mf (ref. lib/cactus.jar,
> > > > > lib/log4j.jar, lib/junit.jar)
> > > > >
> > > > >     |_ WEB-INF
> > > > >       |_ web.xml (inc. cactus mapping)
> > > > >       |_ lib
> > > > >         |_ struts.jar
> > > > >       |_ classes
> > > > >         |_ classes + test classes
> > > > >   |_ lib
> > > > >     |_ cactus.jar
> > > > >     |_ log4j.jar
> > > > >     |_ junit.jar
> > > > >
> > > > > This would be the "ideal" packaging.
> However,
> > > there
> > > > > are a few issues,
> > > > > depending on the application server you use
> (as
> > > they
> > > > > don't all fully
> > > > > respect EAR packaging yet). For example,
> here
> > > are
> > > > > the gotchas with WL6.1
> > > > > :
> > > > >
> > > > > * It does not accept jar put in a directory
> for
> > > > > external libraries (i.e.
> > > > > using Class-Path in the manifest file). So
> you
> > > have
> > > > > to put cactus.jar,
> > > > > log4j.jar and junit.jar at the top level in
> the
> > > ear
> > > > > and not under a lib
> > > > > directory.
> > > > >
> > > > > * I'm not sure it supports using external
> > > libraries
> > > > > for war files, in
> > > > > which case we would have to copy the jar
> files
> > > to
> > > > > mywar.war/WEB-INF/lib.
> > > > >
> > > > > -Vincent
> > > > >
> > > > > >
> > > > > > Cheers
> > > > > > David L. Wasler
> 
=== message truncated ===


=====
Thank You
David L. Wasler
dwasler@yahoo.com
714-742-0311

__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Packaging Cactus in a J2EE application (WAS RE: Cactus : Struts)

Posted by Vincent Massol <vm...@octo.com>.

> -----Original Message-----
> From: David L. Wasler [mailto:dwasler@yahoo.com]
> Sent: 16 December 2001 19:41
> To: Cactus Users List
> Subject: RE: Packaging Cactus in a J2EE application (WAS RE: Cactus :
> Struts)
> 
> --- Vincent Massol <vm...@octo.com> wrote:
> > Hi:
> 
> My approach is to house Cactus and JUint in own WAR
> components house inside an EAR component. 

1/ That won't work in the future with EJB redirector
2/ That won't work as other WAR won't have access to the cactus and
junit jars

> If current
> application servers can't accept this concept , there
> not much we can do!

It is not the problem of current application servers ! This is simply
not in the spec. !

> 
> Were you have JAR I would replace them with WAR
> components.
> 
> I'm currently setting up my IDE  enviroment to
> automaticly build such a component and deploy to
> Weblogic 6.0 and 6.1

You might be interested in the ant script for WebLogic 6.1 that I have
committed today (in sample/build directory of cactus distribution).

-Vincent

> 
> Cheers
> David L. Wasler
> dwasler@yahoo.com
> >
> > > -----Original Message-----
> > > From: David L. Wasler [mailto:dwasler@yahoo.com]
> > > Sent: 15 December 2001 20:55
> > > To: Cactus Users List
> > > Subject: Re: Packaging Cactus in a J2EE
> > application (WAS RE: Cactus :
> > > Struts)
> > >
> > > Hi Vincent:
> > >
> > > I agree with on you " some what"  on your EAR
> > > component directory structure, can't provided a
> > better
> > > one yet. My directory structure is very close to
> > your,
> > > but maybe my approach will not work,
> >
> > what is your structure ? I can tell you if it will
> > work or not if you
> > show it to me.
> >
> > > will have try it
> > > out. If we use an IDE like TogetherSoft , I think
> > > JBuilder  we should be able to write an XML file
> > that
> > > Ant could use.
> >
> > Maybe but what's the use ? Cactus already provides
> > these Ant scripts.
> >
> > > In short define traget application
> > > server.
> >
> > Cactus already provides support for a few
> > application servers through
> > Ant scripts.
> >
> > >
> > > We could look at SOAP also.
> >
> > Not sure what you mean here ? SOAP to do what ?
> >
> > -Vincent
> >
> > >
> > > Cheers
> > > David L. Wasler
> > > dwasler@yahoo.com
> > >
> > > --- Vincent Massol <vm...@octo.com> wrote:
> > > >
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: David L. Wasler
> > [mailto:dwasler@yahoo.com]
> > > > > Sent: 15 December 2001 18:30
> > > > > To: Cactus Users List
> > > > > Subject: RE: Cactus : Struts
> > > > >
> > > > > Hi:
> > > > >
> > > > > As a suggestion, you might want to build a EAR
> > > > > component which hold multiples WAR components,
> > in
> > > > > WL6.1 you can set roles and rules for these
> > > > > components. Not sure if BEA has fixed all the
> > bugs
> > > > in
> > > > > this feature.
> > > >
> > > > No it hasn't ... :)
> > > >
> > > > Here is a packaging that I propose for packaging
> > > > Cactus in an EAR :
> > > >
> > > > Mytest.ear
> > > >   |_ myejbjar.jar
> > > >     |_ META-INF
> > > >       |_ manifest.mf (ref. lib/cactus.jar,
> > > > lib/log4j.jar, lib/junit.jar)
> > > >     |_ classes
> > > >   |_ mywar.war
> > > >     |_ META-INF
> > > >       |_ manifest.mf (ref. lib/cactus.jar,
> > > > lib/log4j.jar, lib/junit.jar)
> > > >
> > > >     |_ WEB-INF
> > > >       |_ web.xml (inc. cactus mapping)
> > > >       |_ lib
> > > >         |_ struts.jar
> > > >       |_ classes
> > > >         |_ classes + test classes
> > > >   |_ lib
> > > >     |_ cactus.jar
> > > >     |_ log4j.jar
> > > >     |_ junit.jar
> > > >
> > > > This would be the "ideal" packaging. However,
> > there
> > > > are a few issues,
> > > > depending on the application server you use (as
> > they
> > > > don't all fully
> > > > respect EAR packaging yet). For example, here
> > are
> > > > the gotchas with WL6.1
> > > > :
> > > >
> > > > * It does not accept jar put in a directory for
> > > > external libraries (i.e.
> > > > using Class-Path in the manifest file). So you
> > have
> > > > to put cactus.jar,
> > > > log4j.jar and junit.jar at the top level in the
> > ear
> > > > and not under a lib
> > > > directory.
> > > >
> > > > * I'm not sure it supports using external
> > libraries
> > > > for war files, in
> > > > which case we would have to copy the jar files
> > to
> > > > mywar.war/WEB-INF/lib.
> > > >
> > > > -Vincent
> > > >
> > > > >
> > > > > Cheers
> > > > > David L. Wasler
> > > > > dwasler@yahoo.com
> > > > >
> > > > >
> > > > > --- Pavan Aripirala Venkata
> > > > > <pv...@h5technologies.com> wrote:
> > > > > > 	I have cactus.jar, junit.jar and
> > servlet.jar in
> > > > > > WEB_INF/lib
> > > > > > directory. Actually in a war file called
> > > > > > cactus_lance.war file. This war
> > > > > > file also contains the Cactus and struts
> > test
> > > > > > classes.
> > > > > > 	There is a another war file - lance.war -
> > which
> > > > > > contains
> > > > > > struts.jar file, whose properties map to
> > > > > > WEB_INF/lib. The actual classes
> > > > > > to be tested are present in this war file.
> > This
> > > > > > web.xml file in this war
> > > > > > file contains the Redirector mappings.
> > > > > > 	All the above is w.r.t server. On the
> > client
> > > > end -
> > > > > > struts.jar,
> > > > > > cactus.jar, httpclient.jar and the directory
> > > > > > containing
> > > > > > cactus.properties file in the classpath and
> > this
> > > > > > classpath is specified
> > > > > > through the ant scripts and therefore are
> > not in
> > > > the
> > > > > > system classpath.
> > > > > > 	System classpath has none of the jar files
> > or
> > > > even
> > > > > > our product
> > > > > > classes. Everything is specified in ant. All
> > > > that is
> > > > > > there in the system
> > > > > > classpath is the weblogic home, java home
> > and
> > > > ant
> > > > > > home.
> > > > > > Hopefully this info suffices.
> > > > > > Thanks Vincent
> > > > > >
> > > > > > Pavan.
> > > > > >
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: Vincent Massol
> > [mailto:vmassol@octo.com]
> > > > > > Sent: Thursday, December 13, 2001 10:59 AM
> > > > > > To: 'Cactus Users List'
> > > > > > Subject: RE: Cactus : Struts
> > > > > >
> > > > > >
> > > > > > You need to be more precise. Where is the
> > > > struts.jar
> > > > > > located _exactly_
> > > > > > and where are the cactus.jar, junit.jar ? Do
> > you
> > > > > > have any jar in the
> > > > > > system classpath and if so, which ones ?
> > > > > >
> >
> === message truncated ===
> 
> 
> =====
> Thank You
> David L. Wasler
> dwasler@yahoo.com
> 714-742-0311
> 
> __________________________________________________
> Do You Yahoo!?
> Check out Yahoo! Shopping and Yahoo! Auctions for all of
> your unique holiday gifts! Buy at http://shopping.yahoo.com
> or bid at http://auctions.yahoo.com
> 
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-user-
> help@jakarta.apache.org>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Packaging Cactus in a J2EE application (WAS RE: Cactus : Struts)

Posted by "David L. Wasler" <dw...@yahoo.com>.
--- Vincent Massol <vm...@octo.com> wrote:
> Hi:

My approach is to house Cactus and JUint in own WAR
components house inside an EAR component. If current
application servers can't accept this concept , there
not much we can do!

Were you have JAR I would replace them with WAR
components.

I'm currently setting up my IDE  enviroment to
automaticly build such a component and deploy to
Weblogic 6.0 and 6.1

Cheers
David L. Wasler
dwasler@yahoo.com
> 
> > -----Original Message-----
> > From: David L. Wasler [mailto:dwasler@yahoo.com]
> > Sent: 15 December 2001 20:55
> > To: Cactus Users List
> > Subject: Re: Packaging Cactus in a J2EE
> application (WAS RE: Cactus :
> > Struts)
> > 
> > Hi Vincent:
> > 
> > I agree with on you " some what"  on your EAR
> > component directory structure, can't provided a
> better
> > one yet. My directory structure is very close to
> your,
> > but maybe my approach will not work,
> 
> what is your structure ? I can tell you if it will
> work or not if you
> show it to me.
> 
> > will have try it
> > out. If we use an IDE like TogetherSoft , I think
> > JBuilder  we should be able to write an XML file
> that
> > Ant could use. 
> 
> Maybe but what's the use ? Cactus already provides
> these Ant scripts.
> 
> > In short define traget application
> > server.
> 
> Cactus already provides support for a few
> application servers through
> Ant scripts.
> 
> > 
> > We could look at SOAP also.
> 
> Not sure what you mean here ? SOAP to do what ?
> 
> -Vincent
> 
> > 
> > Cheers
> > David L. Wasler
> > dwasler@yahoo.com
> > 
> > --- Vincent Massol <vm...@octo.com> wrote:
> > >
> > >
> > >
> > > > -----Original Message-----
> > > > From: David L. Wasler
> [mailto:dwasler@yahoo.com]
> > > > Sent: 15 December 2001 18:30
> > > > To: Cactus Users List
> > > > Subject: RE: Cactus : Struts
> > > >
> > > > Hi:
> > > >
> > > > As a suggestion, you might want to build a EAR
> > > > component which hold multiples WAR components,
> in
> > > > WL6.1 you can set roles and rules for these
> > > > components. Not sure if BEA has fixed all the
> bugs
> > > in
> > > > this feature.
> > >
> > > No it hasn't ... :)
> > >
> > > Here is a packaging that I propose for packaging
> > > Cactus in an EAR :
> > >
> > > Mytest.ear
> > >   |_ myejbjar.jar
> > >     |_ META-INF
> > >       |_ manifest.mf (ref. lib/cactus.jar,
> > > lib/log4j.jar, lib/junit.jar)
> > >     |_ classes
> > >   |_ mywar.war
> > >     |_ META-INF
> > >       |_ manifest.mf (ref. lib/cactus.jar,
> > > lib/log4j.jar, lib/junit.jar)
> > >
> > >     |_ WEB-INF
> > >       |_ web.xml (inc. cactus mapping)
> > >       |_ lib
> > >         |_ struts.jar
> > >       |_ classes
> > >         |_ classes + test classes
> > >   |_ lib
> > >     |_ cactus.jar
> > >     |_ log4j.jar
> > >     |_ junit.jar
> > >
> > > This would be the "ideal" packaging. However,
> there
> > > are a few issues,
> > > depending on the application server you use (as
> they
> > > don't all fully
> > > respect EAR packaging yet). For example, here
> are
> > > the gotchas with WL6.1
> > > :
> > >
> > > * It does not accept jar put in a directory for
> > > external libraries (i.e.
> > > using Class-Path in the manifest file). So you
> have
> > > to put cactus.jar,
> > > log4j.jar and junit.jar at the top level in the
> ear
> > > and not under a lib
> > > directory.
> > >
> > > * I'm not sure it supports using external
> libraries
> > > for war files, in
> > > which case we would have to copy the jar files
> to
> > > mywar.war/WEB-INF/lib.
> > >
> > > -Vincent
> > >
> > > >
> > > > Cheers
> > > > David L. Wasler
> > > > dwasler@yahoo.com
> > > >
> > > >
> > > > --- Pavan Aripirala Venkata
> > > > <pv...@h5technologies.com> wrote:
> > > > > 	I have cactus.jar, junit.jar and
> servlet.jar in
> > > > > WEB_INF/lib
> > > > > directory. Actually in a war file called
> > > > > cactus_lance.war file. This war
> > > > > file also contains the Cactus and struts
> test
> > > > > classes.
> > > > > 	There is a another war file - lance.war -
> which
> > > > > contains
> > > > > struts.jar file, whose properties map to
> > > > > WEB_INF/lib. The actual classes
> > > > > to be tested are present in this war file.
> This
> > > > > web.xml file in this war
> > > > > file contains the Redirector mappings.
> > > > > 	All the above is w.r.t server. On the
> client
> > > end -
> > > > > struts.jar,
> > > > > cactus.jar, httpclient.jar and the directory
> > > > > containing
> > > > > cactus.properties file in the classpath and
> this
> > > > > classpath is specified
> > > > > through the ant scripts and therefore are
> not in
> > > the
> > > > > system classpath.
> > > > > 	System classpath has none of the jar files
> or
> > > even
> > > > > our product
> > > > > classes. Everything is specified in ant. All
> > > that is
> > > > > there in the system
> > > > > classpath is the weblogic home, java home
> and
> > > ant
> > > > > home.
> > > > > Hopefully this info suffices.
> > > > > Thanks Vincent
> > > > >
> > > > > Pavan.
> > > > >
> > > > >
> > > > > -----Original Message-----
> > > > > From: Vincent Massol
> [mailto:vmassol@octo.com]
> > > > > Sent: Thursday, December 13, 2001 10:59 AM
> > > > > To: 'Cactus Users List'
> > > > > Subject: RE: Cactus : Struts
> > > > >
> > > > >
> > > > > You need to be more precise. Where is the
> > > struts.jar
> > > > > located _exactly_
> > > > > and where are the cactus.jar, junit.jar ? Do
> you
> > > > > have any jar in the
> > > > > system classpath and if so, which ones ?
> > > > >
> 
=== message truncated ===


=====
Thank You
David L. Wasler
dwasler@yahoo.com
714-742-0311

__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Packaging Cactus in a J2EE application (WAS RE: Cactus : Struts)

Posted by Vincent Massol <vm...@octo.com>.

> -----Original Message-----
> From: David L. Wasler [mailto:dwasler@yahoo.com]
> Sent: 15 December 2001 20:55
> To: Cactus Users List
> Subject: Re: Packaging Cactus in a J2EE application (WAS RE: Cactus :
> Struts)
> 
> Hi Vincent:
> 
> I agree with on you " some what"  on your EAR
> component directory structure, can't provided a better
> one yet. My directory structure is very close to your,
> but maybe my approach will not work,

what is your structure ? I can tell you if it will work or not if you
show it to me.

> will have try it
> out. If we use an IDE like TogetherSoft , I think
> JBuilder  we should be able to write an XML file that
> Ant could use. 

Maybe but what's the use ? Cactus already provides these Ant scripts.

> In short define traget application
> server.

Cactus already provides support for a few application servers through
Ant scripts.

> 
> We could look at SOAP also.

Not sure what you mean here ? SOAP to do what ?

-Vincent

> 
> Cheers
> David L. Wasler
> dwasler@yahoo.com
> 
> --- Vincent Massol <vm...@octo.com> wrote:
> >
> >
> >
> > > -----Original Message-----
> > > From: David L. Wasler [mailto:dwasler@yahoo.com]
> > > Sent: 15 December 2001 18:30
> > > To: Cactus Users List
> > > Subject: RE: Cactus : Struts
> > >
> > > Hi:
> > >
> > > As a suggestion, you might want to build a EAR
> > > component which hold multiples WAR components, in
> > > WL6.1 you can set roles and rules for these
> > > components. Not sure if BEA has fixed all the bugs
> > in
> > > this feature.
> >
> > No it hasn't ... :)
> >
> > Here is a packaging that I propose for packaging
> > Cactus in an EAR :
> >
> > Mytest.ear
> >   |_ myejbjar.jar
> >     |_ META-INF
> >       |_ manifest.mf (ref. lib/cactus.jar,
> > lib/log4j.jar, lib/junit.jar)
> >     |_ classes
> >   |_ mywar.war
> >     |_ META-INF
> >       |_ manifest.mf (ref. lib/cactus.jar,
> > lib/log4j.jar, lib/junit.jar)
> >
> >     |_ WEB-INF
> >       |_ web.xml (inc. cactus mapping)
> >       |_ lib
> >         |_ struts.jar
> >       |_ classes
> >         |_ classes + test classes
> >   |_ lib
> >     |_ cactus.jar
> >     |_ log4j.jar
> >     |_ junit.jar
> >
> > This would be the "ideal" packaging. However, there
> > are a few issues,
> > depending on the application server you use (as they
> > don't all fully
> > respect EAR packaging yet). For example, here are
> > the gotchas with WL6.1
> > :
> >
> > * It does not accept jar put in a directory for
> > external libraries (i.e.
> > using Class-Path in the manifest file). So you have
> > to put cactus.jar,
> > log4j.jar and junit.jar at the top level in the ear
> > and not under a lib
> > directory.
> >
> > * I'm not sure it supports using external libraries
> > for war files, in
> > which case we would have to copy the jar files to
> > mywar.war/WEB-INF/lib.
> >
> > -Vincent
> >
> > >
> > > Cheers
> > > David L. Wasler
> > > dwasler@yahoo.com
> > >
> > >
> > > --- Pavan Aripirala Venkata
> > > <pv...@h5technologies.com> wrote:
> > > > 	I have cactus.jar, junit.jar and servlet.jar in
> > > > WEB_INF/lib
> > > > directory. Actually in a war file called
> > > > cactus_lance.war file. This war
> > > > file also contains the Cactus and struts test
> > > > classes.
> > > > 	There is a another war file - lance.war - which
> > > > contains
> > > > struts.jar file, whose properties map to
> > > > WEB_INF/lib. The actual classes
> > > > to be tested are present in this war file. This
> > > > web.xml file in this war
> > > > file contains the Redirector mappings.
> > > > 	All the above is w.r.t server. On the client
> > end -
> > > > struts.jar,
> > > > cactus.jar, httpclient.jar and the directory
> > > > containing
> > > > cactus.properties file in the classpath and this
> > > > classpath is specified
> > > > through the ant scripts and therefore are not in
> > the
> > > > system classpath.
> > > > 	System classpath has none of the jar files or
> > even
> > > > our product
> > > > classes. Everything is specified in ant. All
> > that is
> > > > there in the system
> > > > classpath is the weblogic home, java home and
> > ant
> > > > home.
> > > > Hopefully this info suffices.
> > > > Thanks Vincent
> > > >
> > > > Pavan.
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: Vincent Massol [mailto:vmassol@octo.com]
> > > > Sent: Thursday, December 13, 2001 10:59 AM
> > > > To: 'Cactus Users List'
> > > > Subject: RE: Cactus : Struts
> > > >
> > > >
> > > > You need to be more precise. Where is the
> > struts.jar
> > > > located _exactly_
> > > > and where are the cactus.jar, junit.jar ? Do you
> > > > have any jar in the
> > > > system classpath and if so, which ones ?
> > > >
> > > > It seems your problem is related to
> > classloaders,
> > > > which is why I'm
> > > > asking these questions.
> > > >
> > > > thanks
> > > > -Vincent
> > > >
> > > > > -----Original Message-----
> > > > > From: Pavan Aripirala Venkata
> > > > [mailto:pvenkata@h5technologies.com]
> > > > > Sent: 13 December 2001 18:26
> > > > > To: Cactus Users List
> > > > > Subject: RE: Cactus : Struts
> > > > >
> > > > >     Yes all the related jar files are in the
> > > > classpath or in
> > > > WEB-INF/lib
> > > > > directory. The only jar I added is the
> > Struts.jar
> > > > file.
> > > > >
> > > > > Pavan.
> > > > >
> > > > >
> > > > > -----Original Message-----
> > > > > From: Vincent Massol [mailto:vmassol@octo.com]
> > > > > Sent: Wednesday, December 12, 2001 2:40 PM
> > > > > To: 'Cactus Users List'
> > > > > Subject: RE: Cactus : Struts
> > > > >
> > > > >
> > > > > Hi Pavan,
> > > > >
> > > > > Hum ... not sure what is happening here. Are
> > you
> > > > sure that struts or
> > > > any
> > > > > other jar is not in your weblogic system
> > classpath
> > > > ?
> > > > >
> > > > > -Vincent
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Pavan Aripirala Venkata
> > > > [mailto:pvenkata@h5technologies.com]
> > > > > > Sent: 11 December 2001 00:24
> > > > > > To: Cactus Users List
> > > > > > Subject: RE: Cactus : Struts
> > > > > >
> > > > > > 	Hi I used the StrutsTestCase.java to test
> > one
> > > > of my struts
> > > > > > class. I have struts.jar file in WEB-INF/lib
> > > > directory of weblogic
> > > > 6.0
> > > > > > server. I am getting the following exception
> > in
> > > > the setUp() method :
> > > > > >
> > > > > >      [java] java.lang.NoClassDefFoundError:
> > > > > > org/apache/struts/action/ActionFormBeans
> > > > > >      [java]     at
> > > > > >
> > > >
> > >
> >
> com.ejemoni.qa.struts.TestLogonStrut.setUp(TestLogonStrut.java:93)
> > > > > >      [java]     at
> > > > > >
> > > > >
> > > >
> > >
> >
> === message truncated ===
> 
> 
> =====
> Thank You
> David L. Wasler
> dwasler@yahoo.com
> 714-742-0311
> 
> __________________________________________________
> Do You Yahoo!?
> Check out Yahoo! Shopping and Yahoo! Auctions for all of
> your unique holiday gifts! Buy at http://shopping.yahoo.com
> or bid at http://auctions.yahoo.com
> 
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-user-
> help@jakarta.apache.org>
> 




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Packaging Cactus in a J2EE application (WAS RE: Cactus : Struts)

Posted by "David L. Wasler" <dw...@yahoo.com>.
Hi Vincent:

I agree with on you " some what"  on your EAR
component directory structure, can't provided a better
one yet. My directory structure is very close to your,
but maybe my approach will not work, will have try it
out. If we use an IDE like TogetherSoft , I think
JBuilder  we should be able to write an XML file that
Ant could use. In short define traget application
server.

We could look at SOAP also.

Cheers
David L. Wasler
dwasler@yahoo.com

--- Vincent Massol <vm...@octo.com> wrote:
> 
> 
> 
> > -----Original Message-----
> > From: David L. Wasler [mailto:dwasler@yahoo.com]
> > Sent: 15 December 2001 18:30
> > To: Cactus Users List
> > Subject: RE: Cactus : Struts
> > 
> > Hi:
> > 
> > As a suggestion, you might want to build a EAR
> > component which hold multiples WAR components, in
> > WL6.1 you can set roles and rules for these
> > components. Not sure if BEA has fixed all the bugs
> in
> > this feature.
> 
> No it hasn't ... :)
> 
> Here is a packaging that I propose for packaging
> Cactus in an EAR :
> 
> Mytest.ear
>   |_ myejbjar.jar
>     |_ META-INF
>       |_ manifest.mf (ref. lib/cactus.jar,
> lib/log4j.jar, lib/junit.jar)
>     |_ classes
>   |_ mywar.war
>     |_ META-INF
>       |_ manifest.mf (ref. lib/cactus.jar,
> lib/log4j.jar, lib/junit.jar)
> 
>     |_ WEB-INF
>       |_ web.xml (inc. cactus mapping)
>       |_ lib
>         |_ struts.jar
>       |_ classes
>         |_ classes + test classes
>   |_ lib
>     |_ cactus.jar
>     |_ log4j.jar
>     |_ junit.jar
> 
> This would be the "ideal" packaging. However, there
> are a few issues,
> depending on the application server you use (as they
> don't all fully
> respect EAR packaging yet). For example, here are
> the gotchas with WL6.1
> :
> 
> * It does not accept jar put in a directory for
> external libraries (i.e.
> using Class-Path in the manifest file). So you have
> to put cactus.jar,
> log4j.jar and junit.jar at the top level in the ear
> and not under a lib
> directory.
> 
> * I'm not sure it supports using external libraries
> for war files, in
> which case we would have to copy the jar files to
> mywar.war/WEB-INF/lib.
> 
> -Vincent
> 
> > 
> > Cheers
> > David L. Wasler
> > dwasler@yahoo.com
> > 
> > 
> > --- Pavan Aripirala Venkata
> > <pv...@h5technologies.com> wrote:
> > > 	I have cactus.jar, junit.jar and servlet.jar in
> > > WEB_INF/lib
> > > directory. Actually in a war file called
> > > cactus_lance.war file. This war
> > > file also contains the Cactus and struts test
> > > classes.
> > > 	There is a another war file - lance.war - which
> > > contains
> > > struts.jar file, whose properties map to
> > > WEB_INF/lib. The actual classes
> > > to be tested are present in this war file. This
> > > web.xml file in this war
> > > file contains the Redirector mappings.
> > > 	All the above is w.r.t server. On the client
> end -
> > > struts.jar,
> > > cactus.jar, httpclient.jar and the directory
> > > containing
> > > cactus.properties file in the classpath and this
> > > classpath is specified
> > > through the ant scripts and therefore are not in
> the
> > > system classpath.
> > > 	System classpath has none of the jar files or
> even
> > > our product
> > > classes. Everything is specified in ant. All
> that is
> > > there in the system
> > > classpath is the weblogic home, java home and
> ant
> > > home.
> > > Hopefully this info suffices.
> > > Thanks Vincent
> > >
> > > Pavan.
> > >
> > >
> > > -----Original Message-----
> > > From: Vincent Massol [mailto:vmassol@octo.com]
> > > Sent: Thursday, December 13, 2001 10:59 AM
> > > To: 'Cactus Users List'
> > > Subject: RE: Cactus : Struts
> > >
> > >
> > > You need to be more precise. Where is the
> struts.jar
> > > located _exactly_
> > > and where are the cactus.jar, junit.jar ? Do you
> > > have any jar in the
> > > system classpath and if so, which ones ?
> > >
> > > It seems your problem is related to
> classloaders,
> > > which is why I'm
> > > asking these questions.
> > >
> > > thanks
> > > -Vincent
> > >
> > > > -----Original Message-----
> > > > From: Pavan Aripirala Venkata
> > > [mailto:pvenkata@h5technologies.com]
> > > > Sent: 13 December 2001 18:26
> > > > To: Cactus Users List
> > > > Subject: RE: Cactus : Struts
> > > >
> > > >     Yes all the related jar files are in the
> > > classpath or in
> > > WEB-INF/lib
> > > > directory. The only jar I added is the
> Struts.jar
> > > file.
> > > >
> > > > Pavan.
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: Vincent Massol [mailto:vmassol@octo.com]
> > > > Sent: Wednesday, December 12, 2001 2:40 PM
> > > > To: 'Cactus Users List'
> > > > Subject: RE: Cactus : Struts
> > > >
> > > >
> > > > Hi Pavan,
> > > >
> > > > Hum ... not sure what is happening here. Are
> you
> > > sure that struts or
> > > any
> > > > other jar is not in your weblogic system
> classpath
> > > ?
> > > >
> > > > -Vincent
> > > >
> > > > > -----Original Message-----
> > > > > From: Pavan Aripirala Venkata
> > > [mailto:pvenkata@h5technologies.com]
> > > > > Sent: 11 December 2001 00:24
> > > > > To: Cactus Users List
> > > > > Subject: RE: Cactus : Struts
> > > > >
> > > > > 	Hi I used the StrutsTestCase.java to test
> one
> > > of my struts
> > > > > class. I have struts.jar file in WEB-INF/lib
> > > directory of weblogic
> > > 6.0
> > > > > server. I am getting the following exception
> in
> > > the setUp() method :
> > > > >
> > > > >      [java] java.lang.NoClassDefFoundError:
> > > > > org/apache/struts/action/ActionFormBeans
> > > > >      [java]     at
> > > > >
> > >
> >
>
com.ejemoni.qa.struts.TestLogonStrut.setUp(TestLogonStrut.java:93)
> > > > >      [java]     at
> > > > >
> > > >
> > >
> >
> 
=== message truncated ===


=====
Thank You
David L. Wasler
dwasler@yahoo.com
714-742-0311

__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>