Return-Path: list-help: list-unsubscribe: List-Post: List-Id: Mailing-List: contact cactus-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list cactus-user@jakarta.apache.org Received: (qmail 78962 invoked from network); 15 Aug 2003 09:35:22 -0000 Received: from nan-smtp-11.noos.net (HELO smtp.noos.fr) (212.198.2.82) by daedalus.apache.org with SMTP; 15 Aug 2003 09:35:22 -0000 Received: (qmail 119876950 invoked by uid 0); 15 Aug 2003 09:35:32 -0000 Received: from unknown (HELO vma) ([212.198.6.189]) (envelope-sender ) by 212.198.2.82 (qmail-ldap-1.03) with SMTP for ; 15 Aug 2003 09:35:32 -0000 From: "Vincent Massol" To: "'Cactus Users List'" Subject: RE: Cactus: classpath problem? Date: Fri, 15 Aug 2003 11:35:31 +0200 Message-ID: <000701c36310$924e08c0$2502a8c0@vma> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0008_01C36321.55D6D8C0" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal In-Reply-To: X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------=_NextPart_000_0008_01C36321.55D6D8C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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: Christian_Weiler@sonynetservices.com [mailto:Christian_Weiler@sonynetservices.com]=20 Sent: 14 August 2003 15:32 To: cactus-user@jakarta.apache.org Subject: Cactus: classpath problem? Hi guys!=20 I've got the following problem in an EJB TestCase within Weblogic Bea 8.1 (cactus-1.3-1.5Beta1; jdk 1.4):=20 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 ....=20 Any help is welcome - even a workaround - thx, Chris.=20 Details:=20 For code snippet 1) the test works fine and results in No Errors:=20 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!=20 1) =A0 =A0 =A0 =A0=20 =A0 =A0 =A0 =A0 final public void testAuthenticateMobileId() throws = Exception {=20 =A0 =A0=20 =A0 =A0 =A0 =A0 // create a user and check authentication=20 =A0 =A0 =A0 =A0 System.out.println("--- Test Authenticate a Mobile User = ---");=20 =A0 =A0=20 =A0 =A0 =A0 =A0 m_id =3D m_manager.createUser("Scotty", "123456", = "StreamMeUp", "TestService0");=20 =A0 =A0 =A0 =A0 int idAuth =3D m_manager.authenticateMobile("123456", "StreamMeUp", "TestService0");=20 =A0 =A0 =A0 =A0 assertEquals("Authentication OK", m_id, idAuth);=20 =A0 =A0 =A0 =A0=20 =A0 =A0 =A0 =A0 System.out.println("Authenticate with wrong mobile id = name ...");=20 =A0 =A0 =A0 =A0 try{=20 =A0 =A0 =A0 =A0 =A0 =A0 m_manager.authenticate("NotExisting", = "StreamMeUp", "TestService0");=20 =A0 =A0 =A0 =A0 =A0 =A0 fail("Invalid user not recognised");=20 =A0 =A0 =A0 =A0 // !!ONLY EXCEPTION CAUHGT HERE!!=20 =A0 =A0 =A0 =A0 } catch (Exception e) {=20 =A0 =A0 =A0 =A0 =A0 =A0 // work around since i can not access Exception = in common module!?=20 =A0 =A0 =A0 =A0 =A0 =A0 // see @todo=20 =A0 =A0 =A0 =A0 =A0 =A0 assertEquals(e.getClass().getName(),=20 =A0 =A0 =A0 =A0 =A0 =A0 = "com.....common.interfaces.InvalidUserException");=20 =A0 =A0 =A0 =A0 }=20 =A0 =A0 =A0 =A0 }=20 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 =A0init 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?=20 2)=20 =A0 =A0 =A0 =A0 final public void testAuthenticateMobileId() throws = Exception {=20 =A0 =A0=20 =A0 =A0 =A0 =A0 // create a user and check authentication=20 =A0 =A0 =A0 =A0 System.out.println("--- Test Authenticate a Mobile User = ---");=20 =A0 =A0=20 =A0 =A0 =A0 =A0 m_id =3D m_manager.createUser("Scotty", "123456", = "StreamMeUp", "TestService0");=20 =A0 =A0 =A0 =A0 int idAuth =3D m_manager.authenticateMobile("123456", "StreamMeUp", "TestService0");=20 =A0 =A0 =A0 =A0 assertEquals("Authentication OK", m_id, idAuth);=20 =A0 =A0 =A0 =A0=20 =A0 =A0 =A0 =A0 System.out.println("Authenticate with wrong mobile id = name ...");=20 =A0 =A0 =A0 =A0 try{=20 =A0 =A0 =A0 =A0 =A0 =A0 m_manager.authenticate("NotExisting", = "StreamMeUp", "TestService0");=20 =A0 =A0 =A0 =A0 =A0 =A0 fail("Invalid user not recognised");=20 =A0 =A0 =A0 =A0 // !!DIFF: InvalidUserException CAUHGT HERE!!=20 =A0 =A0 =A0 =A0 } catch (InvalidUserException e) {=20 =A0 =A0 =A0 =A0 =A0 =A0 // work around since i can not access Exception = in common module!?=20 =A0 =A0 =A0 =A0 =A0 =A0 // see @todo=20 =A0 =A0 =A0 =A0 =A0 =A0 assertEquals(e.getClass().getName(),=20 =A0 =A0 =A0 =A0 =A0 =A0 "com.sonynetservices.pma.common.interfaces.InvalidUserException");=20 =A0 =A0 =A0 =A0 }=20 =A0 =A0 =A0 =A0 }=20 Junit report message:=20 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=20 Thanks for every useful comment,=20 Chris.=20 ------=_NextPart_000_0008_01C36321.55D6D8C0 Content-Type: message/rfc822 Content-Transfer-Encoding: 7bit Content-Disposition: attachment From: "Vincent Massol" To: "'Cactus Users List'" Subject: RE: Cactus-Bug? Date: Thu, 7 Aug 2003 10:44:31 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0003_01C36321.55D55220" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal In-Reply-To: This is a multi-part message in MIME format. ------=_NextPart_000_0003_01C36321.55D55220 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 and 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: Christian_Weiler@sonynetservices.com [mailto:Christian_Weiler@sonynetservices.com]=20 Sent: 30 July 2003 08:55 To: cactus-user@jakarta.apache.org Subject: Cactus-Bug? Hi guys!=20 I've got the following problem in an EJB TestCase within Weblogic Bea 8.1:=20 For code snippet 1) the test works fine and results in No Errors:=20 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!=20 1) =A0 =A0 =A0 =A0=20 =A0 =A0 =A0 =A0 final public void testAuthenticateMobileId() throws = Exception {=20 =A0 =A0=20 =A0 =A0 =A0 =A0 // create a user and check authentication=20 =A0 =A0 =A0 =A0 System.out.println("--- Test Authenticate a Mobile User = ---");=20 =A0 =A0=20 =A0 =A0 =A0 =A0 m_id =3D m_manager.createUser("Scotty", "123456", = "StreamMeUp", "TestService0");=20 =A0 =A0 =A0 =A0 int idAuth =3D m_manager.authenticateMobile("123456", "StreamMeUp", "TestService0");=20 =A0 =A0 =A0 =A0 assertEquals("Authentication OK", m_id, idAuth);=20 =A0 =A0 =A0 =A0=20 =A0 =A0 =A0 =A0 System.out.println("Authenticate with wrong mobile id = name ...");=20 =A0 =A0 =A0 =A0 try{=20 =A0 =A0 =A0 =A0 =A0 =A0 m_manager.authenticate("NotExisting", = "StreamMeUp", "TestService0");=20 =A0 =A0 =A0 =A0 =A0 =A0 fail("Invalid user not recognised");=20 =A0 =A0 =A0 =A0 // !!ONLY EXCEPTION CAUHGT HERE!!=20 =A0 =A0 =A0 =A0 } catch (Exception e) {=20 =A0 =A0 =A0 =A0 =A0 =A0 // work around since i can not access Exception = in common module!?=20 =A0 =A0 =A0 =A0 =A0 =A0 // see @todo=20 =A0 =A0 =A0 =A0 =A0 =A0 assertEquals(e.getClass().getName(),=20 =A0 =A0 =A0 =A0 =A0 =A0 = "com.....common.interfaces.InvalidUserException");=20 =A0 =A0 =A0 =A0 }=20 =A0 =A0 =A0 =A0 }=20 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?=20 2)=20 =A0 =A0 =A0 =A0 final public void testAuthenticateMobileId() throws = Exception {=20 =A0 =A0=20 =A0 =A0 =A0 =A0 // create a user and check authentication=20 =A0 =A0 =A0 =A0 System.out.println("--- Test Authenticate a Mobile User = ---");=20 =A0 =A0=20 =A0 =A0 =A0 =A0 m_id =3D m_manager.createUser("Scotty", "123456", = "StreamMeUp", "TestService0");=20 =A0 =A0 =A0 =A0 int idAuth =3D m_manager.authenticateMobile("123456", "StreamMeUp", "TestService0");=20 =A0 =A0 =A0 =A0 assertEquals("Authentication OK", m_id, idAuth);=20 =A0 =A0 =A0 =A0=20 =A0 =A0 =A0 =A0 System.out.println("Authenticate with wrong mobile id = name ...");=20 =A0 =A0 =A0 =A0 try{=20 =A0 =A0 =A0 =A0 =A0 =A0 m_manager.authenticate("NotExisting", = "StreamMeUp", "TestService0");=20 =A0 =A0 =A0 =A0 =A0 =A0 fail("Invalid user not recognised");=20 =A0 =A0 =A0 =A0 // !!DIFF: InvalidUserException CAUHGT HERE!!=20 =A0 =A0 =A0 =A0 } catch (InvalidUserException e) {=20 =A0 =A0 =A0 =A0 =A0 =A0 // work around since i can not access Exception = in common module!?=20 =A0 =A0 =A0 =A0 =A0 =A0 // see @todo=20 =A0 =A0 =A0 =A0 =A0 =A0 assertEquals(e.getClass().getName(),=20 =A0 =A0 =A0 =A0 =A0 =A0 "com.sonynetservices.pma.common.interfaces.InvalidUserException");=20 =A0 =A0 =A0 =A0 }=20 =A0 =A0 =A0 =A0 }=20 Junit report message:=20 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=20 Thanks for every useful comment,=20 Chris.=20 ------=_NextPart_000_0003_01C36321.55D55220 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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: Christian_Weiler@sonynetservices.com [mailto:Christian_Wei= ler@sonynetservices.com]
Sent: 30 July 2003 08:55
To: cactus-user@jakarta.apache.org
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) =A0 =A0 =A0 =A0
=A0 =A0 =A0 =A0 final public void = testAuthenticateMobileId() throws Exception {
=A0 =A0
=A0 =A0 =A0 =A0 // create a user and check = authentication
=A0 =A0 =A0 =A0 System.out.println("--- Test = Authenticate a Mobile User ---");
=A0 =A0
=A0 =A0 =A0 =A0 m_id =3D = m_manager.createUser("Scotty", "123456", = "StreamMeUp", "TestService0");
=A0 =A0 =A0 =A0 int idAuth =3D = m_manager.authenticateMobile("123456", "StreamMeUp", = "TestService0");
=A0 =A0 =A0 =A0 assertEquals("Authentication = OK", m_id, idAuth);
=A0 =A0 =A0 =A0
=A0 =A0 =A0 =A0 System.out.println("Authenticate = with wrong mobile id name ...");
=A0 =A0 =A0 =A0 try{
=A0 =A0 =A0 =A0 =A0 =A0 = m_manager.authenticate("NotExisting", "StreamMeUp", = "TestService0");
=A0 =A0 =A0 =A0 =A0 =A0 fail("Invalid user not = recognised");
=A0 =A0 =A0 =A0 // !!ONLY EXCEPTION CAUHGT HERE!! =
=A0 =A0 =A0 =A0 } catch (Exception e) {
=A0 =A0 =A0 =A0 =A0 =A0 // work around since i can = not access Exception in common module!?
=A0 =A0 =A0 =A0 =A0 =A0 // see @todo
=A0 =A0 =A0 =A0 =A0 =A0 = assertEquals(e.getClass().getName(),
=A0 =A0 =A0 =A0 =A0 =A0 = "com.....common.interfaces.InvalidUserException");
=A0 =A0 =A0 =A0 }
=A0 =A0 =A0 =A0 }


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)

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


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(DelegatingMethodAccessorI= mpl.java:25)
Caused by: java.lang.NoClassDefFoundError: = com/.../.../common/interfaces/InvalidUserException

Thanks for every useful comment,
Chris.

------=_NextPart_000_0003_01C36321.55D55220-- ------=_NextPart_000_0008_01C36321.55D6D8C0--