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 la...@masq.ca on 2002/05/01 18:28:44 UTC

Question on packaging webapp for tests

Hi,

Does someone have some pointers on how to apply the info in 

http://jakarta.apache.org/cactus/howto_ejb_j2eeri.html

to Weblogic? I'm trying to set up a test for one of my EJB's. The ejeb is
built using Ant and it normally doesn't gor into a war. It's usually
included in the ear of an application which needs it to function properly.
But in my case it fails and I'm sure it's due to packaging and deploying the
EJB. In my WebApp, I end up with a structure like this:

WEB-INF/classes/<all the classes for my bean>
WEB-INF/lib/<all the support jars needed>
WEB-INF/web.xml

Now, when I try to run the tests, I get an error like this:

Unable to resolve comp/foo_request/ Resolved: 'comp' Unresolved:'foo_request' 
    [junit] javax.naming.NameNotFoundException: Unable to resolve
	comp/foo_request/ Resolved: 'comp' Unresolved:'foo_request' ; remaining name ''
    
So it's obviously a packaging (deployement) problem. Should I be putting all my stuff in an
EAR file and running my tests on the ear file? Or is there a better way to
package my web app that I'm not seeing?

Thanks,

L

-- 
Laurent Duperval <ma...@masq.ca>

THE LAW OF THE PERVERSITY OF NATURE
    You cannot determine beforehand which side of the bread to butter.




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


Re: Question on packaging webapp for tests

Posted by la...@masq.ca.
On  1 May, Rajagopal. V wrote:
> No, you dont have to package the Cactus test classes
> within ur EAR. I have tested with WL and I have a EAR
> which has my EJB and WaR files + a separate WAR file
> for the Cactus stuff.
> 

Ok, good to know.

> What you are missing here is the <ejb-ref> in your
> web.xml for the Cactus War file and
> <ejb-reference-description> in your weblogic.xml. Once
> you have these, you could package it separately from
> the EJBs and run it as a WEBAPP.
> so my Cactus WAR looks like
> WEB-INF/web.xml
> WEB-INF/weblogic.xml

Ah, here's the rub: we don't have a weblogic.xml file. I believe it isn't
necessary in an EAR.

> WEB-INF/lib/<All my support classes> (This includes
> ejbClient.jar which are the Home, rEmote, PKey Classes
> for my EJB)

Ok, I have that.

> WEB-INF/classes/log4j.properties(optional)
> WEB-INF/classes/<my Cactus Test Classes>
> 

Ok. SO I need to build the weblogic.xml file correctly. Let me see what I
can find in the dox.

Thanks,

L

-- 
Laurent Duperval <ma...@masq.ca>

WEILER'S LAW
    Nothing is impossible for the man who doesn't have to do the work.



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


Re: Question on packaging webapp for tests

Posted by "Rajagopal. V" <ra...@yahoo.com>.
No, you dont have to package the Cactus test classes
within ur EAR. I have tested with WL and I have a EAR
which has my EJB and WaR files + a separate WAR file
for the Cactus stuff.

What you are missing here is the <ejb-ref> in your
web.xml for the Cactus War file and
<ejb-reference-description> in your weblogic.xml. Once
you have these, you could package it separately from
the EJBs and run it as a WEBAPP.
so my Cactus WAR looks like
WEB-INF/web.xml
WEB-INF/weblogic.xml
WEB-INF/lib/<All my support classes> (This includes
ejbClient.jar which are the Home, rEmote, PKey Classes
for my EJB)
WEB-INF/classes/log4j.properties(optional)
WEB-INF/classes/<my Cactus Test Classes>

Cheers
Raj

--- laurent.duperval@masq.ca wrote:
> Hi,
> 
> Does someone have some pointers on how to apply the
> info in 
> 
>
http://jakarta.apache.org/cactus/howto_ejb_j2eeri.html
> 
> to Weblogic? I'm trying to set up a test for one of
> my EJB's. The ejeb is
> built using Ant and it normally doesn't gor into a
> war. It's usually
> included in the ear of an application which needs it
> to function properly.
> But in my case it fails and I'm sure it's due to
> packaging and deploying the
> EJB. In my WebApp, I end up with a structure like
> this:
> 
> WEB-INF/classes/<all the classes for my bean>
> WEB-INF/lib/<all the support jars needed>
> WEB-INF/web.xml
> 
> Now, when I try to run the tests, I get an error
> like this:
> 
> Unable to resolve comp/foo_request/ Resolved: 'comp'
> Unresolved:'foo_request' 
>     [junit] javax.naming.NameNotFoundException:
> Unable to resolve
> 	comp/foo_request/ Resolved: 'comp'
> Unresolved:'foo_request' ; remaining name ''
>     
> So it's obviously a packaging (deployement) problem.
> Should I be putting all my stuff in an
> EAR file and running my tests on the ear file? Or is
> there a better way to
> package my web app that I'm not seeing?
> 
> Thanks,
> 
> L
> 
> -- 
> Laurent Duperval <ma...@masq.ca>
> 
> THE LAW OF THE PERVERSITY OF NATURE
>     You cannot determine beforehand which side of
> the bread to butter.
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

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