Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 78261 invoked from network); 26 Sep 2002 06:53:40 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 26 Sep 2002 06:53:40 -0000 Received: (qmail 21612 invoked by uid 97); 26 Sep 2002 06:54:14 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 21568 invoked by uid 97); 26 Sep 2002 06:54:08 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 21545 invoked by uid 98); 26 Sep 2002 06:54:07 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) content-class: urn:content-classes:message Subject: Running Junit tests inside the same VM Date: Thu, 26 Sep 2002 14:53:27 +0800 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C26529.6A7C365F" Message-ID: X-MS-Has-Attach: X-MimeOLE: Produced By Microsoft Exchange V6.0.5762.3 X-MS-TNEF-Correlator: Thread-Topic: Running Junit tests inside the same VM Thread-Index: AcJlKWthraE2TLFDSaeRQcsRD75TnQ== From: "Dushyant Shrivastava" To: Cc: X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C26529.6A7C365F Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I am trying to run a simple JUnit test inside JBoss server My environment: JBoss : 3.0.2 Ant : 1.5 JDK : 1.4.0_01 JUnit :3.8.1 Now my testcase has a simple test which tries to talk to the local = interface of a session bean running inside JBoss. I am aware of the fact = that to be able to do this, the test has to be running in the same VM as = the server! Hence i set the "fork" option in the Junit task to "off". = And tried running the test. Test.jar gets successfully deployed into = jboss, but then i get the following error message when it tries to run = the actual test. test: [junit] Running com.yambay.nps.istesting.MessagingTestCase BUILD FAILED java.lang.LinkageError: loader constraints violated when linking = org/w3c/dom/Document class at = org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Docu= mentBuilderFactoryImpl.java:88) at = org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter.getD= ocumentBuilder(XMLJUnitResultFormatter.java:93) at = org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter.star= tTestSuite(XMLJUnitResultFormatter.java:138) at = org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.fireStartTes= tSuite(JUnitTestRunner.java:433) at = org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTes= tRunner.java:279) at = org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(JUnitT= ask.java:804) at = org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.= java:551) at = org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.= java:527) at org.apache.tools.ant.Task.perform(Task.java:317) at org.apache.tools.ant.Target.execute(Target.java:309) at org.apache.tools.ant.Target.performTasks(Target.java:334) at org.apache.tools.ant.Project.executeTarget(Project.java:1306) at = org.apache.tools.ant.Project.executeTargets(Project.java:1250) at org.apache.tools.ant.Main.runBuild(Main.java:610) at org.apache.tools.ant.Main.start(Main.java:196) at org.apache.tools.ant.Main.main(Main.java:235) Has anyone seen this error before? Almost seems like the Junit task does = not like the fork option set to "off".If i set this option to true, = everything works fine. If the fork option is set to off, it dosen't even = get to the point of running the test. This is what my test looks like! public void testSendMessageToClient() { try { System.out.println("Hello!"); Context context =3D new InitialContext(); MessageProducerBeanLocalHome lHome =3D (MessageProducerBeanLocalHome) = context.lookup("session/MessageProducerBeanLocal"); MessageProducerBeanLocal lSession =3D (MessageProducerBeanLocal) = lHome.create(); System.out.println("MessageProducerBean lookup successful"); } How can i make sure that my test runs inside the same VM as the App = server? or is this something to do with the versions that I am using. = Any help would be much appreciated. TIA Dushy=09 ______________________ DUSHYANT SHRIVASTAVA Software Engineer YAMBAY tel +61 (0) 8 9323 6999 mob +61 (0) 402 902 652 fax +61 (0) 8 9325 2688 web www.yambay.com Yambay Technologies Pty Ltd 7th Floor, The Victoria, 14-16 Victoria Ave, Perth. WA, 6000, Australia _________________________________________________________________________= ________________________ This message and any files transmitted with it are confidential and are = intended solely for the use of those persons to whom the message is addressed. If you have received this message in = error, please destroy and delete this message from your computer. Any unauthorised form of reproduction of = this message or any files transmitted with it is strictly prohibited. yambay does not make any warranty concerning = the security of any information electronically transmitted and disclaims all liability for the proper and complete = transmission of any information contained or purportedly contained in this message, nor for any delay in its receipt. If you = receive this message in error please notify the sender. _________________________________________________________________________= ________________________ ------_=_NextPart_001_01C26529.6A7C365F--