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. 

--- Begin Message ---
Title: 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.


--- End Message ---
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to