jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@pivolis.com>
Subject RE: ServletTestCase - Error looking up EJB
Date Mon, 13 Oct 2003 08:57:41 GMT
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


Mime
View raw message