Beginner Problem on running a simple test
bonomat Feb 3, 2011 10:18 AMHi all,
i am new to arquillian and i want to write a simple test out of an example i've found on this page.
but i have problems to run them.
in intellij i get follwing error when runing the test as junit test or with maven clean package
org.jboss.arquillian.impl.event.FiredEventException: org.jboss.arquillian.spi.LifecycleException: Could not connect to container
at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:68)
at org.jboss.arquillian.impl.context.AbstractEventContext.fire(AbstractEventContext.java:115)
at org.jboss.arquillian.impl.EventTestRunnerAdaptor.beforeSuite(EventTestRunnerAdaptor.java:68)
at org.jboss.arquillian.junit.Arquillian.<init>(Arquillian.java:89)
....
aused by: javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
...
the dependencies i am using:
<dependency> <groupId>org.jboss.arquillian</groupId> <artifactId>arquillian-junit</artifactId> <version>1.0.0.Alpha4</version> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.arquillian.container</groupId> <artifactId>arquillian-jbossas-remote-6</artifactId> <version>1.0.0.Alpha4</version> <scope>test</scope> </dependency>
my test:
@RunWith(Arquillian.class) public class ExmapleClassTest { ... @Deployment public static JavaArchive createTestArchive() { return ShrinkWrap.create(JavaArchive.class, "test.jar") .addClasses(ExmapleClass.class) .addManifestResource( EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml")); }
and the jndi.properties:
java.naming.factory.initial=org.jboss.naming.NamingContextFactory java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces java.naming.provider.url=jnp://localhost:1099
and i have a jboss 6 as running on my localhost.
is there an obvious mistake i made?
If you need more information please call.
thx and kind regards
philipp