Hi!

First of all - sorry for not mentioning that my last email was a repost. As you already guessed I missed the email ... we had some worm problems -);

Anyway thanks for your answer; here is the info you asked for:

- how are you starting the cactus tests? Using Ant?
YES
- Are you using the <cactifywar> and <cactus> Ant tasks?


YES

<target name="cactifywar" depends="war" description="cactify our war - add libs and adjust web.xml">
        <echo message="${root.lib.test.dir}"/>        
        <taskdef name="cactifywar"
            classname="org.apache.cactus.integration.ant.CactifyWarTask">
            <classpath refid="build.class.path"/>
    </taskdef>
         
          <cactifywar srcfile="${web.dir}/${project.module.name}-${project.version}.war"
            destfile="${build.dir}/j2ee/${project.module.name}_${project.version}_test.war">
            <!--classes dir="${build.dir}/web/WEB-INF/classes"/>
            <lib file="${httpunit.jar}"/-->
          </cactifywar>          
</target>

and ...

<target name="cactus" depends="init"        
        description="Runs the Cactus Test suite on server">

        <taskdef name="runservertests"
            classname="org.apache.cactus.integration.ant.RunServerTestsTask">
            <classpath refid="build.class.path"/>
    </taskdef>

    <runservertests
            testURL="${host}:${port}/${webapp.context.name}/${servlet.redirector}?Cactus_Service=${cactus.service}"
        startTarget="start.bea.fake"
        testTarget="junit.cactus"
        stopTarget="stop.bea.fake"/>            
</target>

In our ant task the bea server is not restarted everytime - its only redeployed by copying the file to the appropriate bea applications dir (hot deployment).

- Can you send us the relevant part of your start script?


I guess you mean the start script of the bea server!? The bea server uses the default start script! If you think about the classpath - that is provided via entries in the manifest file in our ejb.jar file - not as classpath definition inn the start script!
Or did you mean a different start script?

- Can you attach your console output with the error?


Actually I do not get an error message on the console (only within junitreport - as posted in my last mail); it looks like it does not pass the init of the Redirector servlet...

<18.08.2003 09:15 Uhr CEST> <Info> <Deployer> <BEA-149033> <activated application _appsdir_pma-usermanagement-R1_0_ear o
n pmaserver>
<18.08.2003 09:15 Uhr CEST> <Info> <Management> <BEA-140009> <Configuration changes for the domain have been saved to th
e repository.>
<18.08.2003 09:15 Uhr CEST> <Info> <Deployer> <BEA-149074> <Successfully completed deployment task: [Deployer:149026]Dep
loy application _appsdir_pma-usermanagement-R1_0_ear on pmaserver.>
<18.08.2003 09:16 Uhr CEST> <Info> <HTTP> <BEA-101047> <[ServletContext(id=32240107,name=usermanagement_cactus,context-p
ath=/usermanagement_cactus)] ServletRedirector: init>

Thanks,
Chris.




"Vincent Massol" <[EMAIL PROTECTED]>

15.08.2003 11:35
Please respond to "Cactus Users List"

       
        To:        "'Cactus Users List'" <[EMAIL PROTECTED]>
        cc:        
        Subject:        RE: Cactus: classpath problem?



Hi Christian,

First, it seems this message is very similar to the one you sent on
30/7/2003. It looks the same to me. You should have said this was a
repost. Second, I have already answered to you (see attached) but you
haven't come back to us... I guess you may have missed the email.

Thanks
-Vincent

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: 14 August 2003 15:32
To: [EMAIL PROTECTED]
Subject: Cactus: classpath problem?


Hi guys!

I've got the following problem in an EJB TestCase within Weblogic Bea
8.1 (cactus-1.3-1.5Beta1; jdk 1.4):

While starting the TestCase deployed on weblogic the last message I get
is something like [...ServletRedirector init]; When I look in the
junitreport it says somethin like InvocationTargetException ...
ClassDefNotFound ...although the class is definetly in the classpath (as
the following snippets prove). For me it looks that somehow cactus has a
problem with imported classes and it's classpath for the generated
TestCase object ....

Any help is welcome - even a workaround - thx, Chris.

Details:

For code snippet 1) the test works fine and results in No Errors:
Snippet 1) represents my workaround for a problem I encountered in 1.5
Beta! Obviously my ejb-application finds all the Exception classes while
cactus does not find it in it's classpath!

1) � � � �
� � � � final public void testAuthenticateMobileId() throws Exception {
� �
� � � � // create a user and check authentication
� � � � System.out.println("--- Test Authenticate a Mobile User ---");
� �
� � � � m_id = m_manager.createUser("Scotty", "123456", "StreamMeUp",
"TestService0");
� � � � int idAuth = m_manager.authenticateMobile("123456",
"StreamMeUp", "TestService0");
� � � � assertEquals("Authentication OK", m_id, idAuth);
� � � �
� � � � System.out.println("Authenticate with wrong mobile id name
...");
� � � � try{
� � � � � � m_manager.authenticate("NotExisting", "StreamMeUp",
"TestService0");
� � � � � � fail("Invalid user not recognised");
� � � � // !!ONLY EXCEPTION CAUHGT HERE!!
� � � � } catch (Exception e) {
� � � � � � // work around since i can not access Exception in common
module!?
� � � � � � // see @todo
� � � � � � assertEquals(e.getClass().getName(),
� � � � � � "com.....common.interfaces.InvalidUserException");
� � � � }
� � � � }


In Snippet 2) the TestCase returns with the appended Classpath problem
message. I also tried to put the appropriate jar file not only in my ear
file but also directly in my cactus-war file with the same result! It
seems that the ServletRedirector must face this exception already in
it's �init phase because it does not even come to the first system.out
line! Additionally the last log message I get from the app server is
something like "RedirectorServlet init"!? Does anyone know this problem
- or have a clue what could cause this problem?

2)

� � � � final public void testAuthenticateMobileId() throws Exception {
� �
� � � � // create a user and check authentication
� � � � System.out.println("--- Test Authenticate a Mobile User ---");
� �
� � � � m_id = m_manager.createUser("Scotty", "123456", "StreamMeUp",
"TestService0");
� � � � int idAuth = m_manager.authenticateMobile("123456",
"StreamMeUp", "TestService0");

� � � � assertEquals("Authentication OK", m_id, idAuth);
� � � �
� � � � System.out.println("Authenticate with wrong mobile id name
...");
� � � � try{
� � � � � � m_manager.authenticate("NotExisting", "StreamMeUp",
"TestService0");
� � � � � � fail("Invalid user not recognised");
� � � � // !!DIFF: InvalidUserException CAUHGT HERE!!
� � � � } catch (InvalidUserException e) {
� � � � � � // work around since i can not access Exception in common
module!?
� � � � � � // see @todo
� � � � � � assertEquals(e.getClass().getName(),
� � � � � �
"com.sonynetservices.pma.common.interfaces.InvalidUserException");
� � � � }
� � � � }


Junit report message:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
Caused by: java.lang.NoClassDefFoundError:
com/.../.../common/interfaces/InvalidUserException

Thanks for every useful comment,
Chris.


----- Nachricht von "Vincent Massol" <[EMAIL PROTECTED]> auf Thu, 7 Aug 2003 10:44:31 +0200 -----
An: "'Cactus Users List'" <[EMAIL PROTECTED]>
Thema: RE: Cactus-Bug?

Hi Christian,

This seems like a setup problem you have. Your test code seems ok. However, to help you we would need more information:

- how are you starting the cactus tests? Using Ant?
- Are you using the <cactifywar> and <cactus> Ant tasks?

- Can you send us the relevant part of your start script?

- Can you attach your console output with the error?

The error should be easy to fix as it is a NCDFE (i.e. an issue of classpath).

Thanks
-Vincent

-----Original Message-----
From: [EMAIL PROTECTED] [
mailto:[EMAIL PROTECTED]]
Sent: 30 July 2003 08:55

To: [EMAIL PROTECTED]

Subject: Cactus-Bug?

Hi guys!

I've got the following problem in an EJB TestCase within Weblogic Bea 8.1:

For code snippet 1) the test works fine and results in No Errors:
Snippet 1) represents my workaround for a problem I encountered in 1.5 Beta! Obviously my ejb-application finds all the Exception classes while cactus does not find it in it's classpath!

1) � � � �
� � � � final public void testAuthenticateMobileId() throws Exception {
� �
� � � � // create a user and check authentication
� � � � System.out.println("--- Test Authenticate a Mobile User ---");
� �
� � � � m_id = m_manager.createUser("Scotty", "123456", "StreamMeUp", "TestService0");
� � � � int idAuth = m_manager.authenticateMobile("123456", "StreamMeUp", "TestService0");
� � � � assertEquals("Authentication OK", m_id, idAuth);
� � � �
� � � � System.out.println("Authenticate with wrong mobile id name ...");
� � � � try{
� � � � � � m_manager.authenticate("NotExisting", "StreamMeUp", "TestService0");
� � � � � � fail("Invalid user not recognised");
� � � � // !!ONLY EXCEPTION CAUHGT HERE!!
� � � � } catch (Exception e) {
� � � � � � // work around since i can not access Exception in common module!?
� � � � � � // see @todo
� � � � � � assertEquals(e.getClass().getName(),
� � � � � � "com.....common.interfaces.InvalidUserException");
� � � � }
� � � � }

In Snippet 2) the TestCase returns with the appended Classpath problem message. I also tried to put the appropriate jar file not only in my ear file but also directly in my cactus-war file with the same result! It seems that the ServletRedirector must face this exception already in it' init phase because it does not even come to the first system.out line! Additionally the last log message I get from the app server is something like "RedirectorServlet init"!? Does anyone know this problem - or have a clue what could cause this problem?

2)

� � � � final public void testAuthenticateMobileId() throws Exception {
� �
� � � � // create a user and check authentication
� � � � System.out.println("--- Test Authenticate a Mobile User ---");
� �
� � � � m_id = m_manager.createUser("Scotty", "123456", "StreamMeUp", "TestService0");
� � � � int idAuth = m_manager.authenticateMobile("123456", "StreamMeUp", "TestService0");
� � � � assertEquals("Authentication OK", m_id, idAuth);
� � � �
� � � � System.out.println("Authenticate with wrong mobile id name ...");
� � � � try{
� � � � � � m_manager.authenticate("NotExisting", "StreamMeUp", "TestService0");
� � � � � � fail("Invalid user not recognised");
� � � � // !!DIFF: InvalidUserException CAUHGT HERE!!
� � � � } catch (InvalidUserException e) {
� � � � � � // work around since i can not access Exception in common module!?
� � � � � � // see @todo
� � � � � � assertEquals(e.getClass().getName(),
� � � � � � "com.sonynetservices.pma.common.interfaces.InvalidUserException");
� � � � }
� � � � }

Junit report message:
java.lang.reflect.InvocationTargetException

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

Caused by: java.lang.NoClassDefFoundError: com/.../.../common/interfaces/InvalidUserException

Thanks for every useful comment,
Chris.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to