jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@octo.com>
Subject RE: How to deploy a bean ina Weblogic server 6.1 using ANT
Date Wed, 19 Jun 2002 07:29:57 GMT


> -----Original Message-----
> From: Sathiyamurthy_Ramachandran@i2.com
> [mailto:Sathiyamurthy_Ramachandran@i2.com]
> Sent: 18 June 2002 15:35
> To: Cactus Users List
> Subject: Re: How to deploy a bean ina Weblogic server 6.1 using ANT
> 
> HI,
> 
> 
> I   try to run a EJBeans( Session)  in Weblogic and use cactus 1.3
thru
> ant - it throws an exception  :
> [junit] Running examples.ejb.basic.statelessSession.Client
> [java] The client was unable to lookup the EJBHome.  Please make sure
> [java] that you have deployed the ejb with the JNDI name
> statelessSession.TraderHome on the WebLogic server at
>                 t3://localhost:7001/ServletRedirector
> 
> 
> 
>  But if i deplot the same bean manually in the server, i can run the
> TestClient.
> 
> As per my testing req. I need to automate the  test. So i need to use
ant.
> What is the probable cause of error???????/
> 
> PL. can u give me sufficient debugging info reg. the above.

I don't have enough information to be able to help you. Here are some
hints :

I will assume you're using a ServletTestCase and doing an EJB lookup
from there.

You need to have an ejb-ref in your web.xml for the EJB that you call.
Ex:

  <ejb-ref>
    <ejb-ref-name>CustomerSession</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.xxx.host.bedrock.control.CustomerSessionHome</home>
    <remote>com.xxx.host.bedrock.control.CustomerSession</remote>
  </ejb-ref>

and then you need to map the jndi names in weblogic.xml. Ex:

<weblogic-web-app>

  <reference-descriptor>

    <ejb-reference-description>
      <ejb-ref-name>
        CustomerSession
      </ejb-ref-name>
      <jndi-name>
        CustomerSession
      </jndi-name>
    </ejb-reference-description>
[...]

Note: All this is not related to Cactus in particular but pure J2EE
stuff (albeit complex I agree :-)).

Thanks
-Vincent

> 
> Thanks,
> sathiya
> 
>
------------------------------------------------------------------------
--
>
------------------------------------------------------------------------
--
> -----------------------------------------------------
> 
> ----- Forwarded by Sathiyamurthy Ramachandran/APAC/i2Tech on
06/18/2002
> 07:12 PM -----
> 
> 
> "Siros Supavita" <siros@pathway-systems.com>
> 06/18/2002 01:17 PM
> Please respond to "Cactus Users List"
> 
> 
>         To:
>         cc:
>         Subject:        Re: How to deploy a bean ina Weblogic server
6.1
> 
> 
> I think using "ear" file would be easier. You build a war for test
> classes,
> cactus and junit and a jar file for EJB. Then you create an ear file
> including those 2 files.
> This should have no problem.
> 
> Siros
> 
> ----- Original Message -----
> From: <Sathiyamurthy_Ramachandran@i2.com>
> To: "Cactus Users List" <cactus-user@jakarta.apache.org>
> Sent: Monday, June 17, 2002 10:16 PM
> Subject: RE: How to deploy a bean ina Weblogic server 6.1
> 
> 
> > Hi Vincent,
> >
> > As u said, I cannot use a .war which is only for web archieve. So i
used
> a
> > jar  file.
> > When I try to deploy a bean anbd run the client in Weblogic 6.1. Can
u
> pl.
> > figure out why it happens.
> > I get the following exception logged into  Cactus_client.txt
> >
> >
> > Can u pl. once again take up some effort to explain what all the jar
> file
> > should contain . Also what should be its directort structure  inside
the
> > jar file. ( becos I have tried in all possible ways ., but of no
use.
> Also
> > I cant find any document how to use cactus for EJB  in Weblogic 6.1)
> >
> >
> > 20:40:05,235 [main] DEBUG statelessSession.Client         -
> -------------
> > Test: testExample
> > 20:40:05,485 [main] DEBUG statelessSession.Client         -
Exception in
> > test
> > org.apache.cactus.util.ChainedRuntimeException: Not a valid response
> >         at
> >
>
org.apache.cactus.client.WebTestResultParser.readRootElement(WebTestResu
lt
> Pa
> rser.java;org/apache/cactus/util/log/LogAspect.java(1k):134)
> >         at
> >
>
org.apache.cactus.client.WebTestResultParser.dispatch29_parse(WebTestRes
ul
> tP
> arser.java;org/apache/cactus/util/log/LogAspect.java(1k):101)
> >         at
> >
>
org.apache.cactus.client.WebTestResultParser.around29_parse(WebTestResul
tP
> ar
> ser.java;org/apache/cactus/util/log/LogAspect.java(1k):1221)
> >         at
> >
>
org.apache.cactus.client.WebTestResultParser.parse(WebTestResultParser.j
av
> a;
> org/apache/cactus/util/log/LogAspect.java(1k):96)
> >         at
> >
>
org.apache.cactus.client.AbstractHttpClient.callGetResult(AbstractHttpCl
ie
> nt
> .java;org/apache/cactus/util/log/LogAspect.java(1k):231)
> >         at
> >
>
org.apache.cactus.client.AbstractHttpClient.dispatch1_doTest(AbstractHtt
pC
> li
> ent.java;org/apache/cactus/util/log/LogAspect.java(1k):123)
> >         at
> >
>
org.apache.cactus.client.AbstractHttpClient.around1_doTest(AbstractHttpC
li
> en
> t.java;org/apache/cactus/util/log/LogAspect.java(1k):1221)
> >         at
> >
>
org.apache.cactus.client.AbstractHttpClient.doTest(AbstractHttpClient.ja
va
> ;o
> rg/apache/cactus/util/log/LogAspect.java(1k):115)
> >         at
> >
>
org.apache.cactus.AbstractTestCase.runGenericTest(AbstractTestCase.java:
45
> 7)
> >         at
> > org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:133)
> >         at
> >
org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:400)
> >         at junit.framework.TestResult$1.protect(TestResult.java:106)
> >         at
junit.framework.TestResult.runProtected(TestResult.java:124)
> >         at junit.framework.TestResult.run(TestResult.java:109)
> >         at junit.framework.TestCase.run(TestCase.java:131)
> >         at junit.framework.TestSuite.runTest(TestSuite.java:173)
> >         at junit.framework.TestSuite.run(TestSuite.java:168)
> >         at junit.textui.TestRunner.doRun(TestRunner.java:74)
> >         at junit.textui.TestRunner.run(TestRunner.java:200)
> >         at junit.textui.TestRunner.run(TestRunner.java:186)
> >         at
> examples.ejb.basic.statelessSession.Client.main(Client.java:37)
> >
> > Thanks,
> > Sathiya
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > "Vincent Massol" <vmassol@octo.com>
> > 06/15/2002 04:03 PM
> > Please respond to "Cactus Users List"
> >
> >
> >         To:     "'Cactus Users List'"
<cactus-user@jakarta.apache.org>
> >         cc:
> >         Subject:        RE: How to deploy a bean ina Weblogic server
6.1
> >
> >
> > Hi,
> >
> > 1/ You should use a war (or ear) and not a jar for deployment (it is
> > much easier). Read the J2EE spec for the structure of a war/ear.
> >
> > 2/ when you say directory structure below do you mean this is the
> > structure you have in your war ?
> >
> > 3/ your structure looks fine although I don't know why but some of
your
> > files are in uppercase, and they shouldn't be
> >
> > 4/ You have a weblogic-ejb-jar.xml and ejb-jar.xml in your war,
which is
> > not correct. You are building a war not an EJB jar, right ?
> >
> > 5/ The problem is a weblogic deployment issue and do not seem to be
> > related to Cactus. It probably means that your deployment
descriptors
> > are not correct.
> >
> > Hope it helps,
> > -Vincent
> >
> > > -----Original Message-----
> > > From: Sathiyamurthy_Ramachandran@i2.com
> > > [mailto:Sathiyamurthy_Ramachandran@i2.com]
> > > Sent: 13 June 2002 12:39
> > > To: Cactus Users List
> > > Subject: How to deploy a bean ina Weblogic server 6.1
> > >
> > > Hello,
> > >
> > > I have to  test a   Ent - Java Bean  using cactus. I have the
> > following
> > > classes in the directory structure.
> > > And I do NOTwant to use ANT but manually make a   "xxx. jar"    or
a "
> > > xxx.war  " file and deploy it
> > > thru console manually.
> > >
> > > If I do that, the jar file is not getting deployed Itb throws
> > exception
> > > as:
> > >
> > > java.lang.NullPointerException
> > >                  at
> > >
> >
weblogic.management.internal.MBeanProxy.getAttribute(MBeanProxy.java:253
> > )
> > >                  at
> > >
weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:187)
> > >                  at $Proxy60.isDeployed(Unknown Source)
> > >                  at
> > >
> >
weblogic.management.mbeans.custom.ApplicationManager.poll(ApplicationMan
> > ag
> > > er.java:744)
> > >                  at
> > >
> >
weblogic.management.mbeans.custom.ApplicationManager.update(ApplicationM
> > an
> > > ager.java:206)
> > >                  at java.lang.reflect.Method.invoke(Native Method)
> > >                  at
> > >
> >
weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBean
> > Im
> > > pl.java:636)
> > >                  at
> > >
> >
weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.ja
> > va
> > > :621)
> > >                  at
> > >
> >
weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configuration
> > MB
> > > eanImpl.java:359)
> > >                  at
> > >
> >
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
> > >                  at
> > >
> >
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
> > >                  at
> > >
weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
> > >                  at
> > >
weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
> > >                  at $Proxy5.update(Unknown Source)
> > >                  at
> > >
> >
weblogic.management.console.webapp._domain.__upload_app._jspService(__up
> > lo
> > > ad_app.java:149)
> > >                  at
> > weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
> > >                  at
> > >
> >
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
> > ja
> > > va:265)
> > >                  at
> > >
> >
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
> > ja
> > > va:200)
> > >                  at
> > >
> >
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatche
> > rI
> > > mpl.java:241)
> > >                  at
> > >
weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:112)
> > >                  at
> > >
> >
weblogic.management.console.actions.ForwardAction.perform(ForwardAction.
> > ja
> > > va:35)
> > >                  at
> > >
> >
weblogic.management.console.actions.internal.ActionServlet.doAction(Acti
> > on
> > > Servlet.java:171)
> > >                  at
> > >
> >
weblogic.management.console.actions.internal.ActionServlet.doPost(Action
> > Se
> > > rvlet.java:85)
> > >                  at
> > > javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> > >                  at
> > > javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > >                  at
> > >
> >
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
> > ja
> > > va:265)
> > >                  at
> > >
> >
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
> > ja
> > > va:200)
> > >                  at
> > >
> >
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl
> > et
> > > Context.java:2495)
> > >                  at
> > >
> >
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.
> > ja
> > > va:2204)
> > >                  at
> > > weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
> > >                  at
> > > weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
> > >
> > >
> > >
> > > MY DIRECTORY STRUCTURE STTRUCTURE IS AS BELOW
> > >
> >
------------------------------------------------------------------------
> > --
> > >
> >
-----------------------------------------------------------------------
> > > d:\mysample\  META-INF\    EJB-JAR.XML
> > > d:\mysample\  META-INF\   weblogic-ejb-jar.xml
> > > d:\mysample\   META-INF\  manifest.mf
> > >
> > > d:\mysample\ WEB-INF \
classes\examples\ejb\basic\statelessSession\ "
> > all
> > > class files "  (of a BEAN )
> > >  d:\mysample\ WEB-INF \
classes\examples\ejb\basic\statelessSession\
> > "
> > > TestXXxXX . class " files
> > >                        NOTE : examples\ejb\basic\statelessSession\
> > IS
> > > THE PACKAGE NAME
> > >
> > >
> > >  d:\mysample\ WEB-INF\classes\  CACTUS . PROPERTIES
> > >  d:\mysample\ WEB-INF\classes\   LOG_SERVER .PROPERTIES
> > >
> > > d:\mysample\ WEB-INF\lib\  *. jars  (aspectjrt, cactus,log4j,
junit)
> > >
> > >
> >
------------------------------------------------------------------------
> > --
> > >
> >
-----------------------------------------------------------------------
> > > PL. tell me if this directory structure is  correct   or   is
three
> > some
> > > error in it .
> > >  There  are    no steps reg. how the directory structure should be
for
> > "
> > > deploying
> > > beans in  Weblogic"
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> > --
> > 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:   <mailto:cactus-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-user-
> help@jakarta.apache.org>
> 



--
To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message