jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gainty" <mgai...@hotmail.com>
Subject Re: ServletTestCase - Error looking up EJB
Date Mon, 13 Oct 2003 13:27:31 GMT
If this happens again attach the cactus.properties file
Regards,

-Martin
----- Original Message ----- 
From: "Daniel Lehmann" <dklehmann@hotmail.com>
To: <cactus-user@jakarta.apache.org>
Sent: Monday, October 13, 2003 6:36 AM
Subject: RE: ServletTestCase - Error looking up EJB


> Hi Vincent,
>
> Thanks for the tips.  I added the task to eclipse and the old error is
> gone(it can find the Cactus task it seems).  I got another one instead
> (cannot find tools.jar - which is strange), but I think I can figure that
> one out by myself. Thanks.
>
> The stack trace for the EJB lookup problem now looks as follows:
>
> <error message="null"
>
type="org.apache.cactus.client.ServletExceptionWrapper">javax.naming.Communi
cationException.
> Root exception is java.rmi.ServerException: RemoteException occurred in
> server thread; nested exception is: java.rmi.UnmarshalException: error
> unmarshalling arguments; nested exception is:
> java.net.MalformedURLException: no protocol: and at
> sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292) at
> sun.rmi.transport.Transport$1.run(Transport.java:148) at
> java.security.AccessController.doPrivileged(Native Method) at
> sun.rmi.transport.Transport.serviceCall(Transport.java:144) at
> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at
>
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:7
01)
> at java.lang.Thread.run(Thread.java:536) at
>
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteC
all.java:247)
> at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
> at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133) at
> org.jnp.server.NamingServer_Stub.lookup(Unknown Source) at
> org.jnp.interfaces.NamingContext.lookup(NamingContext.java:492) at
> org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471) at
> javax.naming.InitialContext.lookup(InitialContext.java:347) at
> pizzaTraderTest.SessionTest.setUp(SessionTest.java:46) at
> org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:276) at
> org.apache.cactus.ServletTestCase.runBare(ServletTestCase.java:251) at
>
org.apache.cactus.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.
java:156)
> at
>
org.apache.cactus.server.AbstractWebTestController.dispatch133_handleRequest
(AbstractWebTestController.java;org/apache/cactus/util/log/LogAspect.aj[1k]:
130)
> at
>
org.apache.cactus.server.AbstractWebTestController.around133_handleRequest(A
bstractWebTestController.java;org/apache/cactus/util/log/LogAspect.aj[1k]:11
58)
> at
>
org.apache.cactus.server.AbstractWebTestController.handleRequest(AbstractWeb
TestController.java;org/apache/cactus/util/log/LogAspect.aj[1k]:101)
> at
>
org.apache.cactus.server.ServletTestRedirector.dispatch160_doPost(ServletTes
tRedirector.java;org/apache/cactus/util/log/LogAspect.aj[1k]:125)
> at
>
org.apache.cactus.server.ServletTestRedirector.around160_doPost(ServletTestR
edirector.java;org/apache/cactus/util/log/LogAspect.aj[1k]:1158)
> at
>
org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.
java;org/apache/cactus/util/log/LogAspect.aj[1k]:109)
> at
>
org.apache.cactus.server.ServletTestRedirector.dispatch159_doGet(ServletTest
Redirector.java;org/apache/cactus/util/log/LogAspect.aj[1k]:96)
> at
>
org.apache.cactus.server.ServletTestRedirector.around159_doGet(ServletTestRe
director.java;org/apache/cactus/util/log/LogAspect.aj[1k]:1158)
> at
>
org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.j
ava;org/apache/cactus/util/log/LogAspect.aj[1k]:92)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
> at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
> at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
> at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
> at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
>
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1040)
> at
>
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151
)
> at java.lang.Thread.run(Thread.java:536) Caused by:
> java.rmi.UnmarshalException: error unmarshalling arguments; nested
exception
> is: java.net.MalformedURLException: no protocol: and at
> sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:249) at
> sun.rmi.transport.Transport$1.run(Transport.java:148) at
> java.security.AccessController.doPrivileged(Native Method) at
> sun.rmi.transport.Transport.serviceCall(Transport.java:144) at
> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at
>
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:7
01)
> ... 1 more Caused by: java.net.MalformedURLException: no protocol: and at
> java.net.URL.<init>(URL.java:579) at java.net.URL.<init>(URL.java:476) at
> java.net.URL.<init>(URL.java:425) at
> sun.rmi.server.LoaderHandler.pathToURLs(LoaderHandler.java:743) at
> sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:159) at
> java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:631) at
>
org.jboss.system.JBossRMIClassLoader.loadClass(JBossRMIClassLoader.java:74)
> at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:257) at
>
sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:200)
> at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513)
> at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435) at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at
> java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at
> javax.naming.CompoundName.readObject(CompoundName.java:554) at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
> at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
> at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824)
at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at
> java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at
> sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:297) at
> sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:246) ... 6
> more</error>
>
>
>
>
> Thanks a lot,
> Daniel
>
> >From: "Vincent Massol" <vmassol@pivolis.com>
> >Reply-To: "Cactus Users List" <cactus-user@jakarta.apache.org>
> >To: "'Cactus Users List'" <cactus-user@jakarta.apache.org>
> >Subject: RE: ServletTestCase - Error looking up EJB
> >Date: Mon, 13 Oct 2003 10:57:41 +0200
> >
> >Hi,
> >
> > > -----Original Message-----
> > > From: Daniel Lehmann [mailto:dklehmann@hotmail.com]
> > > Sent: 13 October 2003 10:30
> > > To: cactus-user@jakarta.apache.org
> > > Subject: ServletTestCase - Error looking up EJB
> > >
> > > Hi,
> > >
> > > I am trying to build a project using a standalone Tomcat webserver
> > > (4.12.1)
> > > and JBoss 3.2.1.  For unit testing I am using Cactus 13.1.5 beta1.
> >The
> > > goal
> > > is to automate the whole thing within an Ant build script (Starting up
> > > Tomcat from Ant, JBoss is running already).  However, I am
> >encountering
> > > the
> > > following two problems:
> > >
> > > 1.
> > > I cannot build the project from my IDE (Eclipse) because the IDE
> >compiler
> > > cannot find the CactusTask.class (ClassNotFound).  It works when I run
> >ant
> > > directly from the command line.  Has anyone encountered this before?
> >I
> > > tried adding the cactus.jar to the build classpath etc., but it still
> > > doesn't work.
> >
> >That's an Eclipse "limitation"... You'll find this issue with any custom
> >task. The solution is to explicitly define the task it in Eclipse: open
> >the Ant properties dialog box and using the "Task" tab, add the cactus
> >tasks.
> >
> > >
> > > 2.
> > > When building the project via command line I am getting this error
> >trying
> > > to
> > > set up my test in the ServletTestCase class:
> > >
> > > [cactus] CACTUS ERROR RUNNING setUp():
> >javax.naming.CommunicationException
> > > [Root exception is java.rmi.ServerException: RemoteException occurred
> >in
> > > server thread; nested exception is:
> > > [cactus]     java.rmi.UnmarshalException: error unmarshalling
> >arguments;
> > > nested exception is:
> > > [cactus]     java.net.MalformedURLException: no protocol: and]
> > > [cactus] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 3.285 sec
> > >
> >
> >[snip]
> >
> >I can't guess anything with out a full stack trace. You should NOT catch
> >the error in your test (a bad practice) and instead let it bubble up;
> >you'll then be able to get the full stack trace...
> >
> >Thanks
> >-Vincent
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> >
>
> _________________________________________________________________
> Frustrated with dial-up? Get high-speed for as low as $29.95/month
> (depending on the local service providers in your area).
> https://broadband.msn.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>
>

Mime
View raw message