I've duplicated the example you mention and it works just fine when I run the
testng.xml directly. But if I try to run the tests via maven, the EJB lookup
fails:
Here is the output of the maven run:
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 4.235 sec
<<< FAILURE!
create Time elapsed: 2.923 sec <<< FAILURE!
javax.naming.NameNotFoundException: OwnerDAOBean not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:626)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:588)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
Can't seem to figure out why the same code fails when running through maven.
Tim Kettler wrote:
>
> Hi,
>
> see here for a complete example:
>
> http://docs.codehaus.org/display/MAVENUSER/How+to+use+the+JBoss+Embedded+EJB3+Container+for+Unit+testing
>
> -Tim
>
> sudhakar schrieb:
>> 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]
>
>
> ---------------------------------------------------------------------
> 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#a12114786
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]