Thanks. Do you know where I can follow the progress on the surefire-tesstng
bug.
I tried the ant-run plugin. None of my tests are getting executed. Here's
the maven output:
[INFO] antrun:run {execution: testng51}
[INFO] Executing tasks
[testng] org.xml.sax.SAXParseException: Document root element "dataset",
must match DOCTYPE root "null".
[testng] at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
[testng] at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown
Source)
[testng] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
[testng] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
[testng] at
org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(Unknown
Source)
[testng] at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown
Source)
[testng] at
org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
[testng] at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
Source)
[testng] at
org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown
Source)
[testng] at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
[testng] at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
[testng] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
[testng] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
[testng] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
[testng] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
[testng] at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
[testng] at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
[testng] at org.testng.xml.Parser.parse(Parser.java:139)
[testng] at org.testng.TestNG.setTestSuites(TestNG.java:445)
[testng] at org.testng.TestNG.privateMain(TestNG.java:981)
[testng] at org.testng.TestNG.main(TestNG.java:938)
[testng] java.io.FileNotFoundException:
http://www.jboss.org/aop/dtd/jboss-aop_1_0.dtd
[testng] at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1243)
[testng] at
org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
[testng] at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
Source)
[testng] at
org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source)
[testng] at
org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
[testng] at
org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown
Source)
[testng] at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
[testng] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
[testng] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
[testng] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
[testng] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
[testng] at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
[testng] at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
[testng] at org.testng.xml.Parser.parse(Parser.java:139)
[testng] at org.testng.TestNG.setTestSuites(TestNG.java:445)
[testng] at org.testng.TestNG.privateMain(TestNG.java:981)
[testng] at org.testng.TestNG.main(TestNG.java:938)
[testng] org.xml.sax.SAXParseException: Document root element
"deployment", must match DOCTYPE root "null".
[testng] at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
[testng] at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown
Source)
[testng] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
[testng] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
[testng] at
org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(Unknown
Source)
[testng] at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown
Source)
[testng] at
org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
[testng] at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
Source)
[testng] at
org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown
Source)
[testng] at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
[testng] at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
[testng] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
[testng] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
[testng] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
[testng] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
[testng] at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
[testng] at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
[testng] at org.testng.xml.Parser.parse(Parser.java:139)
[testng] at org.testng.TestNG.setTestSuites(TestNG.java:445)
[testng] at org.testng.TestNG.privateMain(TestNG.java:981)
[testng] at org.testng.TestNG.main(TestNG.java:938)
[testng] org.xml.sax.SAXParseException: Document root element
"deployment", must match DOCTYPE root "null".
[testng] at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
[testng] at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown
Source)
[testng] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
[testng] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
[testng] at
org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(Unknown
Source)
[testng] at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown
Source)
[testng] at
org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
[testng] at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
Source)
[testng] at
org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown
Source)
[testng] at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
[testng] at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
[testng] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
[testng] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
[testng] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
[testng] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
[testng] at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
[testng] at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
[testng] at org.testng.xml.Parser.parse(Parser.java:139)
[testng] at org.testng.TestNG.setTestSuites(TestNG.java:445)
[testng] at org.testng.TestNG.privateMain(TestNG.java:981)
[testng] at org.testng.TestNG.main(TestNG.java:938)
[testng] java.io.FileNotFoundException:
E:\Java\workspaces\workspace\brazos.permit.ejb.test\log4j.dtd (The system
cannot find the file specified)
[testng] at java.io.FileInputStream.open(Native Method)
[testng] at java.io.FileInputStream.<init>(FileInputStream.java:106)
[testng] at java.io.FileInputStream.<init>(FileInputStream.java:66)
[testng] at
sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
[testng] at
sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
[testng] at
org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
[testng] at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
Source)
[testng] at
org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source)
[testng] at
org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
[testng] at
org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown
Source)
[testng] at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
[testng] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
[testng] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
[testng] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
[testng] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
[testng] at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
[testng] at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
[testng] at org.testng.xml.Parser.parse(Parser.java:139)
[testng] at org.testng.TestNG.setTestSuites(TestNG.java:445)
[testng] at org.testng.TestNG.privateMain(TestNG.java:981)
[testng] at org.testng.TestNG.main(TestNG.java:938)
[testng] org.xml.sax.SAXParseException: Document root element
"deployment", must match DOCTYPE root "null".
[testng] at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
[testng] at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown
Source)
[testng] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
[testng] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
[testng] at
org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(Unknown
Source)
[testng] at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown
Source)
[testng] at
org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
[testng] at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
Source)
[testng] at
org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown
Source)
[testng] at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
[testng] at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
[testng] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
[testng] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
[testng] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
[testng] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
[testng] at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
[testng] at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
[testng] at org.testng.xml.Parser.parse(Parser.java:139)
[testng] at org.testng.TestNG.setTestSuites(TestNG.java:445)
[testng] at org.testng.TestNG.privateMain(TestNG.java:981)
[testng] at org.testng.TestNG.main(TestNG.java:938)
[testng] Exception in thread "main" java.lang.NullPointerException
[testng] at org.testng.SuiteRunner.run(SuiteRunner.java:153)
[testng] at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
[testng] at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
[testng] at org.testng.TestNG.run(TestNG.java:613)
[testng] at org.testng.TestNG.privateMain(TestNG.java:1001)
[testng] at org.testng.TestNG.main(TestNG.java:938)
rolfst wrote:
>
> Its a surefire testng bug.
> It is indeed a very anoying one en apparently there is some working on I
> don't know what the bug id is.
> however what you can do is use maven-antrun-plugin although I don't know
> how
> to fail a complete build when the tests fail but at least you can figure
> out
> what the failed tests are.
> Here is my setup
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-antrun-plugin</artifactId>
> <version>1.1</version>
> <executions>
> <!-- this ant script runs testng natively -->
> <execution>
> <id>testng55</id>
> <phase>test</phase>
> <configuration>
> <tasks>
> <taskdef resource="testngtasks"
> classpath="testng.jar" classpathref="
> maven.test.classpath" />
> <testng
> classpathref="maven.test.classpath"
> outputdir="target/test-reports">
> <xmlfileset dir="src/test/resources"
> includes="*.xml" />
> </testng>
> <junitreport
> todir="target/test-reports">
> <fileset
> dir="target/test-reports">
> <include name="**/*.xml" />
> </fileset>
> <report format="noframes"
> todir="target/test-reports" />
> </junitreport>
> </tasks>
> </configuration>
> <goals>
> <goal>run</goal>
> </goals>
> </execution>
> </executions>
> <dependencies>
> <dependency>
> <groupId>ant</groupId>
> <artifactId>ant-junit</artifactId>
> <version>1.6.2</version>
> </dependency>
> </dependencies>
> </plugin>
>
>
> <!-- disable surefire plugin (too many problems!) -->
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-surefire-plugin</artifactId>
> <version>2.4</version>
> <configuration>
> <skip>true</skip>
> <forkMode>once</forkMode>
> <suiteXmlFiles>
> <suiteXmlFile>
> /src/test/resources/testsuite-
> integration-ejb3.xml
> </suiteXmlFile>
> </suiteXmlFiles>
> </configuration>
> </plugin>
> </plugins>
>
> hope it helps
>
> On 8/12/07, r_sudh <[EMAIL PROTECTED]> wrote:
>>
>>
>> Here is the code from the test class that I'm using:
>>
>> EJB3StandaloneBootstrap.boot(null);
>> EJB3StandaloneBootstrap.scanClasspath();
>> Hashtable<String, String> props = new Hashtable<String,
>> String>();
>> props.put("java.naming.factory.initial",
>> "
>> org.jnp.interfaces.LocalOnlyContextFactory");
>> props.put("java.naming.factory.url.pkgs",
>> "org.jboss.naming:org.jnp.interfaces");
>>
>> initialContext = new InitialContext(props);
>>
>> OwnerDAO dao = (OwnerDAO) initialContext.lookup
>> ("OwnerDAOBean/local");
>>
>> Like I said, the lookup fails if I run it via maven and works fine if I
>> launch it via TestNG
>>
>> r_sudh wrote:
>> >
>> > I have a maven project in Eclipse with EJB 3.0 style Entity beans and
>> > Session Beans. I'm using TestNG to run my tests that launch the JBoss
>> > micro-container and successfully tests all my EJB code.
>> >
>> > I'd now like to have all of this working using maven outside of Eclipse
>> > (so I can use a Continuous Integration server). I'm not fully clear on
>> > what all I need to configure. I have the following in my pom.xml
>> >
>> > <build>
>> > <plugins>
>> > <plugin>
>> > <artifactId>maven-compiler-plugin</artifactId>
>> > <configuration>
>> > <source>1.6</source>
>> > <target>1.6</target>
>> > </configuration>
>> > </plugin>
>> > <plugin>
>> > <artifactId>maven-surefire-plugin</artifactId>
>> > <version>2.2</version>
>> > <configuration>
>> > <suiteXmlFiles>
>> > <suiteXmlFile>
>> > src/test/resources/testng.xml
>> > </suiteXmlFile>
>> > </suiteXmlFiles>
>> > <forkMode>pertest</forkMode>
>> > <childDelegation>false</childDelegation>
>> > </configuration>
>> > </plugin>
>> > </plugins>
>> > </build>
>> >
>> > Do I need the maven-ejb plugin? I'd appreciate any pointers.
>> >
>> > Thanks
>> > -sud
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/JBoss-Embedded-Container-%2B-Maven-%2B-howto--tf4255161s177.html#a12115874
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/JBoss-Embedded-Container-%2B-Maven-%2B-howto--tf4255161s177.html#a12125930
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]