Return-Path: Delivered-To: apmail-maven-users-archive@www.apache.org Received: (qmail 61109 invoked from network); 20 Mar 2006 17:38:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Mar 2006 17:38:53 -0000 Received: (qmail 85699 invoked by uid 500); 20 Mar 2006 17:38:38 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 85615 invoked by uid 500); 20 Mar 2006 17:38:37 -0000 Mailing-List: contact users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Users List" Reply-To: "Maven Users List" Delivered-To: mailing list users@maven.apache.org Received: (qmail 85598 invoked by uid 99); 20 Mar 2006 17:38:37 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Mar 2006 09:38:37 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of mmistroni@gmail.com designates 64.233.182.204 as permitted sender) Received: from [64.233.182.204] (HELO nproxy.gmail.com) (64.233.182.204) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Mar 2006 09:38:35 -0800 Received: by nproxy.gmail.com with SMTP id x4so867743nfb for ; Mon, 20 Mar 2006 09:38:14 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=FAThv3IDpyzfUUtJUdsLzT3Jx8QKwOE6lLB7n2mxHcrvkryzmGGjuuaF9asVaAwmu2zL0XRb+dhtHMM3DLCNVAB8taNb9BZSehIWLLEQ728BcBG3ZHPui+B5KiNjmaeQk/QO04CVHdaQdreObt/izfN16V2XDEk29TbHFGpO7VM= Received: by 10.48.239.5 with SMTP id m5mr2953406nfh; Mon, 20 Mar 2006 09:38:13 -0800 (PST) Received: by 10.49.42.11 with HTTP; Mon, 20 Mar 2006 09:38:13 -0800 (PST) Message-ID: <7e346e130603200938t651b9e0ahe7ac1c3e1529b938@mail.gmail.com> Date: Mon, 20 Mar 2006 17:38:13 +0000 From: "Marco Mistroni" To: "Maven Users List" Subject: Re: DESPERATE: JBoss EJB3 embeddable container fails under surefire? In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1740_947440.1142876293678" References: <14AEF3EE-CCB7-43BD-B7C4-D7FD107E278A@bigtribe.com> <8392298c0603191552l7f768f12s79d12c184fdfc3ab@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_1740_947440.1142876293678 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello All, i am trying the same.... and what i get? ---------------------------------------------------------------------------= ---- Battery: example1.EJB3ContainerTest ---------------------------------------------------------------------------= ---- Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.047 sec testMethod1(example1.EJB3ContainerTest) Time elapsed: 0.015 sec <<< ERROR= ! [ stdout ] --------------------------------------------------------------- [ stderr ] --------------------------------------------------------------- ---- bootstrapping EJB3 container.... ...... deploying embedded-jboss-beans.... [ stacktrace ] ----------------------------------------------------------- java.lang.NoClassDefFoundError: org/jboss/logging/Logger at org.jboss.ejb3.embedded.EJB3StandaloneDeployer.( EJB3StandaloneDeployer.java:137) My assumption is that, because i am including microcontainer libraries usin= g system scope, they don't turn out at test time since org.jboss.logging.Logger is part of jboss-common.jar whic is CLEARLY listed as dependency of my pom.xml here is my pom (i attach at the end aslo the ejb test class);; -------- pom.xml ------------ 4.0.0 root ejbs jar 1.0 enterprise java beans root project 1.0 apache.snapshots http://cvs.apache.org/maven-snapshot-repository apache.snapshots http://cvs.apache.org/maven-snapshot-repository root shared geronimo-spec geronimo-spec-j2ee provided jboss jboss-ejb3x 4.0.4 system ${basedir}\lib\jboss-ejb3x-4.0.4.jar jboss ejb3-persistence 4.0.4 system ${basedir}\lib\ejb3-persistence-4.0.4.jar org.testng testng 4.6.1 test jdk15 microcontainer asm current system ${basedir}\microcontainer\jars\asm-current.jar microcontainer asm attrs system ${basedir}\microcontainer\jars\asm-attrs.jar microcontainer cglib 2.1.1 system ${basedir}\microcontainer\jars\cglib-2.1.1.jar microcontainer commons collections system ${basedir}\microcontainer\jars\commons-collections.jar= microcontainer commons logging system ${basedir}\microcontainer\jars\commons-logging.jar microcontainer commons logging-api system ${basedir}\microcontainer\jars\commons-logging-api.jar= microcontainer hsqldb current system ${basedir}\microcontainer\jars\hsqldb-current.jar microcontainer jboss-annotations ejb3 system ${basedir}\microcontainer\jars\jboss- annotations-ejb3.jar microcontainer jboss-aop jdk50 system ${basedir}\microcontainer\jars\jboss-aop-jdk50.jar microcontainer jboss-aspect-library jdk50 system ${basedir}\microcontainer\jars\jboss- aspect-library-jdk50.jar microcontainer jboss common system ${basedir}\microcontainer\jars\jboss-common.jar microcontainer jboss-common jdbc-wrapper system ${basedir}\microcontainer\jars\jboss- common-jdbc-wrapper.jar microcontainer jboss concurrent system ${basedir}\microcontainer\jars\jboss-concurrent.jar microcontainer jboss container system ${basedir}\microcontainer\jars\jboss-container.jar microcontainer jboss current system ${basedir}\microcontainer\jars\jboss-current.jar microcontainer jboss dependency system ${basedir}\microcontainer\jars\jboss-dependency.jar microcontainer jboss ejb3 system ${basedir}\microcontainer\jars\jboss-ejb3.jar microcontainer jboss j2ee system ${basedir}\microcontainer\jars\jboss-j2ee.jar microcontainer jboss j2se system ${basedir}\microcontainer\jars\jboss-j2se.jar microcontainer jboss jca system ${basedir}\microcontainer\jars\jboss-jca.jar microcontainer jboss-local jdbc system ${basedir}\microcontainer\jars\jboss-local-jdbc.jar microcontainer jboss microcontainer system ${basedir}\microcontainer\jars\jboss-microcontainer.ja= r microcontainer jbossmq current system ${basedir}\microcontainer\jars\jbossmq-current.jar microcontainer jboss namespace system ${basedir}\microcontainer\jars\jboss-namespace.jar microcontainer jboss remoting system ${basedir}\microcontainer\jars\jboss-remoting.jar microcontainer jbosssx current system ${basedir}\microcontainer\jars\jbosssx-current.jar microcontainer jboss system system ${basedir}\microcontainer\jars\jboss-system.jar microcontainer jboss transaction system ${basedir}\microcontainer\jars\jboss-transaction.jar microcontainer jboss-xa jdbc system ${basedir}\microcontainer\jars\jboss-xa-jdbc.jar microcontainer jnpserver current system ${basedir}\microcontainer\jars\jnpserver-current.jar microcontainer log4j current system ${basedir}\microcontainer\jars\log4j-current.jar microcontainer resolver current system ${basedir}\microcontainer\jars\resolver-current.jar microcontainer trove current system ${basedir}\microcontainer\jars\trove-current.jar microcontainer xercesImpl jboss system ${basedir}\microcontainer\jars\xercesImpl-jboss.jar microcontainer xml-apis jboss system ${basedir}\microcontainer\jars\xml-apis-jboss.jar microcontainer hibernate 3 system ${basedir}\microcontainer\jars\hibernate-3.jar microcontainer hibernate entitymanager system ${basedir}\microcontainer\jars\hibernate-entitymanager.jar= microcontainer hibernate annotations system ${basedir}\microcontainer\jars\hibernate- annotations.jar microcontainer dom4j current system ${basedir}\microcontainer\jars\dom4j-current.jar microcontainer javassist current system ${basedir}\microcontainer\jars\javassist-current.jar microcontainer ehcache 1.1 system ${basedir}\microcontainer\jars\ehcache-1.1.jar microcontainer jboss ejb3 system ${basedir}\microcontainer\jars\jboss-ejb3.jar maven-compiler-plugin iso-8859-1 maven-surefire-plugin testng.xml maven-antrun-plugin generate-sources run ---------------- and here's my test, whic does not test anything so far but it is supposed t= o be the base class for every test ------ EJB3 test ------- /** * Boots the JBoss Microcontainer with an EJB3 configuration. *

* You can also use this class to lookup managed beans from JNDI. * * @author christian.bauer@jboss.com */ public class EJB3ContainerTest extends TestCase{ private static InitialContext initialContext; private EJB3StandaloneDeployer deployer; public void setUp() { try { System.err.println("---- bootstrapping EJB3 container...."); // Boot the JBoss Microcontainer with EJB3 settings, loads ejb3-interceptors-aop.xml EJB3StandaloneBootstrap.boot(null); System.err.println("...... deploying embedded-jboss-beans....")= ; // Deploy CaveatEmptor beans (datasource, mostly) //EJB3StandaloneBootstrap.deployXmlResource("/embedded- jboss-beans.xml"); //EJB3StandaloneBootstrap.deployXmlResource("/embedded- jboss-beans.xml"); //EJB3StandaloneBootstrap.deployXmlResource("/embedded- jboss-beans.xml"); EJB3StandaloneBootstrap.scanClasspath(); System.err.println("...... embedded-jboss-beans deployed...."); // Add all EJBs found in the archive that has this file deployer =3D new EJB3StandaloneDeployer(); System.err.println("...... deploying MM ejb3....."); System.err.println("...... ejb3 deployed...."); // Deploy everything we got deployer.create(); System.err.println("...... deployer created...."); deployer.start(); System.err.println("...... deployer started...."); // Create InitialContext from jndi.properties initialContext =3D new InitialContext(); System.err.println("---- end of bootstrapping EJB3 container...."); } catch (Exception ex) { ex.printStackTrace(); throw new RuntimeException(ex); } } public void tearDown() { try { System.err.println("---- Invoking EJB3.shutdown.."); deployer.stop(); deployer.destroy(); EJB3StandaloneBootstrap.shutdown(); } catch (Exception ex) { throw new RuntimeException(ex); } } public void testMethod1() { System.err.println("EJB3CONTAINER..... TESTING1"); } public static Test suite() { return new TestSuite(EJB3ContainerTest.class); } public static Object lookup(String beanName) { try { return initialContext.lookup(beanName); } catch (NamingException ex) { throw new RuntimeException("Couldn't lookup: " + beanName, ex); } } } i have successfully used testng plugin wtih maven1.1 but with maven2 it looks like plugin has some bugs..... anyone could help me out starting from this pom & test? thanks and regards marco ------=_Part_1740_947440.1142876293678--