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 Maria Sole Franzin <ma...@allos.it> on 2003/05/19 17:25:37 UTC

testing ejb, classpath problems

Well, i read “howto_classpath.html” and i’m sure I’ve problems
configuring the client side classpath, to do this i set the CLASSPATH
variable in the “system variables”, is it all right?
 
Now this is the classpath called when i run the container:
C:\jbuilder5\jdk1.3\bin\javaw -classpath
"C:\Borland\AppServer\lib\asrt.jar;C:\Borland\AppServer\lib\jdsserver.ja
r;C:\Borland\AppServer\lib\navigator.jar;C:\Borland\AppServer\lib\vbdev.
jar;C:\Borland\AppServer\lib\vbejb.jar;C:\Borland\AppServer\lib\vbjdev.j
ar;C:\Borland\AppServer\lib\vbjorb.jar;C:\Borland\AppServer\lib\vbsec.ja
r"   -Dvbroker.agent.port=14000
-Djava.library.path=C:/Borland/AppServer/lib;C:/Borland/AppServer/bin
com.inprise.ejb.Container ejbcontainer
"C:/cactus/NUOVOtestcactus/EJBtestcactus/Convertergroup.jar"  -jts -jns
-jss -jdb
EJB Container
The error it’s always the same :-(
 
Thanks again in advance,
Cheers
Mariasole
 
 
 
From: Christopher Lenz <cm...@gmx.de>
Subject: Testing EJB - Newbie: please help
Date: Mon, 19 May 2003 14:08:27 +0200
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 
Maria,
 
if you have the Cactus libraries and the test classes in the WEB-INF 
directory of the WAR, exactly why are you including them in the system 
classpath when you start the container? That is calling for disaster, 
especially when looking at what stuff you've got in the classpath 
otherwise (a really old version of Cactus when it was still a Commons 
component, for example).
 
Also, the classpath you're passing to the container has absolutely 
*nothing* to do with the client-side classpath. Please read 
<http://jakarta.apache.org/cactus/integration/howto_classpath.html> 
carefully. You really need to have a good understanding of classpaths 
and how they work in J2EE containers.
 
You should also consider upgrading to Cactus 1.4.1, but that doesn't 
have anything to do with the problem.
 
-chris
 
Maria Sole Franzin wrote:
> Well, 
> as u say, u think it's a "server side" problem, don't u? 
> I've all the ejb and test classes into the WEB-INF dir, and I set the
> WEB-INF/lib with these jars: cactus-1.4b1.jar,
commons-logging-1.0.jar,
> junit-3.7.jar, log4j-1.2.5.jar, aspectjrt.jar. Did i miss something?
> 
> While when I run the container I've this long classpath:
> C:\jbuilder5\jdk1.3\bin\javaw -classpath
>
"C:\Borland\AppServer\lib\asrt.jar;C:\Borland\AppServer\lib\jdsserver.ja
>
r;C:\Borland\AppServer\lib\navigator.jar;C:\Borland\AppServer\lib\vbdev.
>
jar;C:\Borland\AppServer\lib\vbejb.jar;C:\Borland\AppServer\lib\vbjdev.j
>
ar;C:\Borland\AppServer\lib\vbjorb.jar;C:\Borland\AppServer\lib\vbsec.ja
>
r;C:\cactus\NUOVOtestcactus\EJBtestcactus\classes;C:\Borland\AppServer\l
>
ib\migration.jar;C:\cactus\jakarta-cactus-13-1.4b1\lib\commons-httpclien
>
t-2.0alpha1-20020720.jar;C:\cactus\jakarta-cactus-13-1.4b1\lib\aspectjrt
>
-1.0.5.jar;C:\cactus\commons-cactus-23-20010502\lib\commons-cactus.jar;C
>
:\cactus\jakarta-cactus-13-1.4b1\lib\cactus-1.4b1.jar;C:\cactus\jakarta-
>
cactus-13-1.4b1\lib\commons-logging-1.0.jar;C:\cactus\jakarta-cactus-13-
>
1.4b1\lib\junit-3.7.jar;C:\cactus\jakarta-cactus-13-1.4b1\lib\log4j-1.2.
>
5.jar;C:\jbuilder5\jdk1.3\demo\jfc\Java2D\Java2Demo.jar;C:\jbuilder5\jdk
>
1.3\jre\lib\i18n.jar;C:\jbuilder5\jdk1.3\jre\lib\jaws.jar;C:\jbuilder5\j
>
dk1.3\jre\lib\rt.jar;C:\jbuilder5\jdk1.3\jre\lib\sunrsasign.jar;C:\jbuil
> der5\jdk1.3\lib\dt.jar;C:\jbuilder5\jdk1.3\lib\tools.jar"
> -Dvbroker.agent.port=14000
>
-Djava.library.path=C:/Borland/AppServer/lib;C:/Borland/AppServer/bin;C:
>
\cactus\jakarta-cactus-13-1.4b1\lib\junit-3.7.jar;C:\cactus\jakarta-cact
>
us-13-1.4b1\lib\cactus-1.4b1.jar;C:\cactus\NUOVOtestcactus\EJBtestcactus
>
\classes\ConverterTest.class;C:\jbuilder5\lib\servlet.jar;C:\cactus\jaka
>
rta-cactus-13-1.4b1\lib\commons-httpclient-2.0alpha1-20020720.jar;C:\cac
>
tus\jakarta-cactus-13-1.4b1\lib\commons-logging-1.0.jar;C:\cactus\jakart
>
a-cactus-13-1.4b1\lib\log4j-1.2.5;C:\cactus\jakarta-cactus-13-1.4b1\lib\
>
httpunit-1.4.1;C:\cactus\NUOVOtestcactus\EJBtestcactus\classes\cactus.pr
>
operties;C:\cactus\NUOVOtestcactus\EJBtestcactus\classes\log4j.propertie
> s; ;C:\jbuilder5\lib\ext\aspectjrt.jar com.inprise.ejb.Container
> ejbcontainer
> "C:/cactus/NUOVOtestcactus/EJBtestcactus/Convertergroup.jar"  -jts
-jns
> -jss -jdb
> EJB Container
> 
> Does anyone see if there's something wrong with it?  I thounght that
> "running the container with this classpath" was the way to "set the
> client side classpath", is it all right? 
> Thanks
> Sole
> 
> -----Messaggio originale-----
> Da: Vincent Massol [mailto:vmassol@pivolis.com] 
> Inviato: martedì 13 maggio 2003 23.53
> A: 'Cactus Users List'
> Cc: mariasole.franzin@allos.it
> Oggetto: RE: RE: Testing EJB - Newbie: please help
> 
> Hi Maria
> 
> Not sure what your problem is. The first thing I would check is to
make
> sure you have a WEB-INF/classes/testcactus/ConverTest.class file in
your
> cactuswebapp webapp. If not there then it's normal the Cactus runner
is
> not able to load it.
> 
> Thanks
> -Vincent
> 
> 
> -----Original Message-----
> From: Maria Sole Franzin [mailto:mariasole.franzin@allos.it] 
> Sent: 13 May 2003 17:43
> To: cactus-user@jakarta.apache.org
> Subject: R: RE: Testing EJB - Newbie: please help
> 
> 
>             Hi all,
> i'm a new "cactus user", and i'm trying the "testing ejb" using
jbuilder
> 5 for the webapp. 
> I read the thread about these tests, and I saw there're many problems.
> Well, I read all the possible "howto" slides, but i've problems on
> configuring the classpath. 
> Perhaps I missed something.
> 
> This is the error i get typing on the browser:
>
http://localhost:8080/cactuswebapp/ServletTestRunner?suite=testcactus.Co
> nverterTest
> 
> 
> javax.servlet.ServletException: Failed to load test suite
> [testcactus.ConverterTest], Reason is [Class not found
> "testcactus.ConverterTest"]
>     at
>
org.apache.cactus.server.runner.ServletTestRunner.dispatch92_run(Servlet
> TestRunner.java;org/apache/cactus/util/log/LogAspect.java(1k):157)
>     at
>
org.apache.cactus.server.runner.ServletTestRunner.around92_run(ServletTe
> stRunner.java;org/apache/cactus/util/log/LogAspect.java(1k):1218)
>     at
>
org.apache.cactus.server.runner.ServletTestRunner.run(ServletTestRunner.
> java;org/apache/cactus/util/log/LogAspect.java(1k):137)
>     at
>
org.apache.cactus.server.runner.ServletTestRunner.dispatch91_doGet(Servl
> etTestRunner.java;org/apache/cactus/util/log/LogAspect.java(1k):121)
>     at
>
org.apache.cactus.server.runner.ServletTestRunner.around91_doGet(Servlet
> TestRunner.java;org/apache/cactus/util/log/LogAspect.java(1k):1149)
>     at
>
org.apache.cactus.server.runner.ServletTestRunner.doGet(ServletTestRunne
> r.java;org/apache/cactus/util/log/LogAspect.java(1k):101)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>     at
>
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
>     at org.apache.tomcat.core.Handler.service(Handler.java:286)
>     at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>     at
>
org.apache.tomcat.core.ContextManager.internalService(ContextManager.jav
> a:797)
>     at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
>     at
>
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(H
> ttpConnectionHandler.java:210)
>     at
>
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416
> )
>     at
>
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:49
> 8)
>     at java.lang.Thread.run(Thread.java:484)
> 
> this error happends many times, with or without the cactus.proprties
> file log4j.properties and the client classpath setted (i'm not at all
> sure i did it in the right way.... may someone give me an example?).
> then, it's really important to set che test file in the classpath, but
> the class file or the java one? Or simply the name of the file????
> 
> thanks in advance
> Maria Sole
 

Re: testing ejb, classpath problems

Posted by Christopher Lenz <cm...@gmx.de>.
Hello Maria,

first let me say that I know nothing about the Borland AppServer or 
JBuilder :-)

In any case, the classpath with which you start the container should 
*not* matter for the tests as long as the container can be successfully 
started.

What matters is the classpath of the web-application, which is 
determined by what classes you put in WEB-INF/classes and what JARs you 
put in WEB-INF/lib. As you're using the ServletTestRunner (I missed that 
part before), the client classpath is the same as the web-application 
classpath.

So, as Vincent originally answered:

   "The first thing I would check is to make sure you have a
    WEB-INF/classes/testcactus/ConverterTest.class file in your
    cactuswebapp webapp. If not there then it's normal the
    Cactus runner is not able to load it."

Can you verify that this is the case?

-chris

Maria Sole Franzin wrote:
> Well, i read “howto_classpath.html” and i’m sure I’ve problems 
> configuring the client side classpath, to do this i set the CLASSPATH 
> variable in the “system variables”, is it all right?
> 
> Now this is the classpath called when i run the container:
> 
> C:\jbuilder5\jdk1.3\bin\javaw -classpath 
> "C:\Borland\AppServer\lib\asrt.jar;C:\Borland\AppServer\lib\jdsserver.jar;C:\Borland\AppServer\lib\navigator.jar;C:\Borland\AppServer\lib\vbdev.jar;C:\Borland\AppServer\lib\vbejb.jar;C:\Borland\AppServer\lib\vbjdev.jar;C:\Borland\AppServer\lib\vbjorb.jar;C:\Borland\AppServer\lib\vbsec.jar"   
> -Dvbroker.agent.port=14000 
> -Djava.library.path=C:/Borland/AppServer/lib;C:/Borland/AppServer/bin 
> com.inprise.ejb.Container ejbcontainer 
> "C:/cactus/NUOVOtestcactus/EJBtestcactus/Convertergroup.jar"  -jts -jns 
> -jss -jdb
> 
> EJB Container
> 
> The error it’s always the same :-(
> 
>  
> 
> Thanks again in advance,
> 
> Cheers
> 
> Mariasole
> 
>  
> 
>  
> 
>  
> 
> From: Christopher Lenz <cm...@gmx.de>
> 
> Subject: Testing EJB - Newbie: please help
> 
> Date: Mon, 19 May 2003 14:08:27 +0200
> 
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
>  
> 
> Maria,
> 
>  
> 
> if you have the Cactus libraries and the test classes in the WEB-INF
> 
> directory of the WAR, exactly why are you including them in the system
> 
> classpath when you start the container? That is calling for disaster,
> 
> especially when looking at what stuff you've got in the classpath
> 
> otherwise (a really old version of Cactus when it was still a Commons
> 
> component, for example).
> 
>  
> 
> Also, the classpath you're passing to the container has absolutely
> 
> *nothing* to do with the client-side classpath. Please read
> 
> <http://jakarta.apache.org/cactus/integration/howto_classpath.html>
> 
> carefully. You really need to have a good understanding of classpaths
> 
> and how they work in J2EE containers.
> 
>  
> 
> You should also consider upgrading to Cactus 1.4.1, but that doesn't
> 
> have anything to do with the problem.
> 
>  
> 
> -chris
> 
>  
> 
> Maria Sole Franzin wrote:
> 
>>  Well,
> 
>>  as u say, u think it's a "server side" problem, don't u?
> 
>>  I've all the ejb and test classes into the WEB-INF dir, and I set the
> 
>>  WEB-INF/lib with these jars: cactus-1.4b1.jar, commons-logging-1.0.jar,
> 
>>  junit-3.7.jar, log4j-1.2.5.jar, aspectjrt.jar. Did i miss something?
> 
>>
> 
>>  While when I run the container I've this long classpath:
> 
>>  C:\jbuilder5\jdk1.3\bin\javaw -classpath
> 
>>  "C:\Borland\AppServer\lib\asrt.jar;C:\Borland\AppServer\lib\jdsserver.ja
> 
>>  r;C:\Borland\AppServer\lib\navigator.jar;C:\Borland\AppServer\lib\vbdev.
> 
>>  jar;C:\Borland\AppServer\lib\vbejb.jar;C:\Borland\AppServer\lib\vbjdev.j
> 
>>  ar;C:\Borland\AppServer\lib\vbjorb.jar;C:\Borland\AppServer\lib\vbsec.ja
> 
>>  r;C:\cactus\NUOVOtestcactus\EJBtestcactus\classes;C:\Borland\AppServer\l
> 
>>  ib\migration.jar;C:\cactus\jakarta-cactus-13-1.4b1\lib\commons-httpclien
> 
>>  t-2.0alpha1-20020720.jar;C:\cactus\jakarta-cactus-13-1.4b1\lib\aspectjrt
> 
>>  -1.0.5.jar;C:\cactus\commons-cactus-23-20010502\lib\commons-cactus.jar;C
> 
>>  :\cactus\jakarta-cactus-13-1.4b1\lib\cactus-1.4b1.jar;C:\cactus\jakarta-
> 
>>  cactus-13-1.4b1\lib\commons-logging-1.0.jar;C:\cactus\jakarta-cactus-13-
> 
>>  1.4b1\lib\junit-3.7.jar;C:\cactus\jakarta-cactus-13-1.4b1\lib\log4j-1.2.
> 
>>  5.jar;C:\jbuilder5\jdk1.3\demo\jfc\Java2D\Java2Demo.jar;C:\jbuilder5\jdk
> 
>>  1.3\jre\lib\i18n.jar;C:\jbuilder5\jdk1.3\jre\lib\jaws.jar;C:\jbuilder5\j
> 
>>  dk1.3\jre\lib\rt.jar;C:\jbuilder5\jdk1.3\jre\lib\sunrsasign.jar;C:\jbuil
> 
>>  der5\jdk1.3\lib\dt.jar;C:\jbuilder5\jdk1.3\lib\tools.jar"
> 
>>  -Dvbroker.agent.port=14000
> 
>>  -Djava.library.path=C:/Borland/AppServer/lib;C:/Borland/AppServer/bin;C:
> 
>>  \cactus\jakarta-cactus-13-1.4b1\lib\junit-3.7.jar;C:\cactus\jakarta-cact
> 
>>  us-13-1.4b1\lib\cactus-1.4b1.jar;C:\cactus\NUOVOtestcactus\EJBtestcactus
> 
>>  \classes\ConverterTest.class;C:\jbuilder5\lib\servlet.jar;C:\cactus\jaka
> 
>>  rta-cactus-13-1.4b1\lib\commons-httpclient-2.0alpha1-20020720.jar;C:\cac
> 
>>  tus\jakarta-cactus-13-1.4b1\lib\commons-logging-1.0.jar;C:\cactus\jakart
> 
>>  a-cactus-13-1.4b1\lib\log4j-1.2.5;C:\cactus\jakarta-cactus-13-1.4b1\lib\
> 
>>  httpunit-1.4.1;C:\cactus\NUOVOtestcactus\EJBtestcactus\classes\cactus.pr
> 
>>  operties;C:\cactus\NUOVOtestcactus\EJBtestcactus\classes\log4j.propertie
> 
>>  s; ;C:\jbuilder5\lib\ext\aspectjrt.jar com.inprise.ejb.Container
> 
>>  ejbcontainer
> 
>>  "C:/cactus/NUOVOtestcactus/EJBtestcactus/Convertergroup.jar"  -jts -jns
> 
>>  -jss -jdb
> 
>>  EJB Container
> 
>>
> 
>>  Does anyone see if there's something wrong with it?  I thounght that
> 
>>  "running the container with this classpath" was the way to "set the
> 
>>  client side classpath", is it all right?
> 
>>  Thanks
> 
>>  Sole
> 
>>
> 
>>  -----Messaggio originale-----
> 
>>  Da: Vincent Massol [mailto:vmassol@pivolis.com]
> 
>>  Inviato: martedì 13 maggio 2003 23.53
> 
>>  A: 'Cactus Users List'
> 
>>  Cc: mariasole.franzin@allos.it
> 
>>  Oggetto: RE: RE: Testing EJB - Newbie: please help
> 
>>
> 
>>  Hi Maria
> 
>>
> 
>>  Not sure what your problem is. The first thing I would check is to make
> 
>>  sure you have a WEB-INF/classes/testcactus/ConverTest.class file in your
> 
>>  cactuswebapp webapp. If not there then it's normal the Cactus runner is
> 
>>  not able to load it.
> 
>>
> 
>>  Thanks
> 
>>  -Vincent
> 
>>
> 
>>
> 
>>  -----Original Message-----
> 
>>  From: Maria Sole Franzin [mailto:mariasole.franzin@allos.it]
> 
>>  Sent: 13 May 2003 17:43
> 
>>  To: cactus-user@jakarta.apache.org
> 
>>  Subject: R: RE: Testing EJB - Newbie: please help
> 
>>
> 
>>
> 
>>             Hi all,
> 
>>  i'm a new "cactus user", and i'm trying the "testing ejb" using jbuilder
> 
>>  5 for the webapp.
> 
>>  I read the thread about these tests, and I saw there're many problems.
> 
>>  Well, I read all the possible "howto" slides, but i've problems on
> 
>>  configuring the classpath.
> 
>>  Perhaps I missed something.
> 
>>
> 
>>  This is the error i get typing on the browser:
> 
>>  http://localhost:8080/cactuswebapp/ServletTestRunner?suite=testcactus.Co
> 
>>  nverterTest
> 
>>
> 
>>
> 
>>  javax.servlet.ServletException: Failed to load test suite
> 
>>  [testcactus.ConverterTest], Reason is [Class not found
> 
>>  "testcactus.ConverterTest"]
> 
>>      at
> 
>>  org.apache.cactus.server.runner.ServletTestRunner.dispatch92_run(Servlet
> 
>>  TestRunner.java;org/apache/cactus/util/log/LogAspect.java(1k):157)
> 
>>      at
> 
>>  org.apache.cactus.server.runner.ServletTestRunner.around92_run(ServletTe
> 
>>  stRunner.java;org/apache/cactus/util/log/LogAspect.java(1k):1218)
> 
>>      at
> 
>>  org.apache.cactus.server.runner.ServletTestRunner.run(ServletTestRunner.
> 
>>  java;org/apache/cactus/util/log/LogAspect.java(1k):137)
> 
>>      at
> 
>>  org.apache.cactus.server.runner.ServletTestRunner.dispatch91_doGet(Servl
> 
>>  etTestRunner.java;org/apache/cactus/util/log/LogAspect.java(1k):121)
> 
>>      at
> 
>>  org.apache.cactus.server.runner.ServletTestRunner.around91_doGet(Servlet
> 
>>  TestRunner.java;org/apache/cactus/util/log/LogAspect.java(1k):1149)
> 
>>      at
> 
>>  org.apache.cactus.server.runner.ServletTestRunner.doGet(ServletTestRunne
> 
>>  r.java;org/apache/cactus/util/log/LogAspect.java(1k):101)
> 
>>      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> 
>>      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 
>>      at
> 
>>  org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
> 
>>      at org.apache.tomcat.core.Handler.service(Handler.java:286)
> 
>>      at
> 
>>  org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> 
>>      at
> 
>>  org.apache.tomcat.core.ContextManager.internalService(ContextManager.jav
> 
>>  a:797)
> 
>>      at
> 
>>  org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
> 
>>      at
> 
>>  org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(H
> 
>>  ttpConnectionHandler.java:210)
> 
>>      at
> 
>>  org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416
> 
>>  )
> 
>>      at
> 
>>  org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:49
> 
>>  8)
> 
>>      at java.lang.Thread.run(Thread.java:484)
> 
>>
> 
>>  this error happends many times, with or without the cactus.proprties
> 
>>  file log4j.properties and the client classpath setted (i'm not at all
> 
>>  sure i did it in the right way.... may someone give me an example?).
> 
>>  then, it's really important to set che test file in the classpath, but
> 
>>  the class file or the java one? Or simply the name of the file????
> 
>>
> 
>>  thanks in advance
> 
>>  Maria Sole
> 
>  
>