java - Arquillian: missing dependency error when injecting EJB with mappedName -
i writing arquillian test class uses factory class named werkkatalogfactory
(injected @ejb
, in turn has field named werkkatalogrepositoryport
, concrete implementation of gets injected via annotation @ejb(mappedname = "java:app/core/wkrepository-default-impl")
, jndi name annotated on stateless session bean werkkatalogjpaadapter
via @stateless(name = "wkrepository-default-impl")
all seems run until during deployment container tries inject werkkatalogjpaadapter
@ point test fails with:
org.jboss.arquillian.container.spi.client.container.deploymentexception: cannot deploy: werkkatalogjpaadaptertest.war @ org.jboss.as.arquillian.container.archivedeployer.deployinternal(archivedeployer.java:83) @ org.jboss.as.arquillian.container.archivedeployer.deployinternal(archivedeployer.java:64) @ org.jboss.as.arquillian.container.archivedeployer.deploy(archivedeployer.java:46) @ org.jboss.as.arquillian.container.commondeployablecontainer.deploy(commondeployablecontainer.java:146) @ org.jboss.arquillian.container.impl.client.container.containerdeploycontroller$3.call(containerdeploycontroller.java:161) @ org.jboss.arquillian.container.impl.client.container.containerdeploycontroller$3.call(containerdeploycontroller.java:128) @ org.jboss.arquillian.container.impl.client.container.containerdeploycontroller.executeoperation(containerdeploycontroller.java:271) @ org.jboss.arquillian.container.impl.client.container.containerdeploycontroller.deploy(containerdeploycontroller.java:127) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:497) @ org.jboss.arquillian.core.impl.observerimpl.invoke(observerimpl.java:94) @ org.jboss.arquillian.core.impl.eventcontextimpl.invokeobservers(eventcontextimpl.java:99) @ org.jboss.arquillian.core.impl.eventcontextimpl.proceed(eventcontextimpl.java:81) @ org.jboss.arquillian.container.impl.client.containerdeploymentcontexthandler.createdeploymentcontext(containerdeploymentcontexthandler.java:78) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:497) @ org.jboss.arquillian.core.impl.observerimpl.invoke(observerimpl.java:94) @ org.jboss.arquillian.core.impl.eventcontextimpl.proceed(eventcontextimpl.java:88) @ org.jboss.arquillian.container.impl.client.containerdeploymentcontexthandler.createcontainercontext(containerdeploymentcontexthandler.java:57) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:497) @ org.jboss.arquillian.core.impl.observerimpl.invoke(observerimpl.java:94) @ org.jboss.arquillian.core.impl.eventcontextimpl.proceed(eventcontextimpl.java:88) @ org.jboss.arquillian.container.impl.client.container.deploymentexceptionhandler.verifyexpectedexceptionduringdeploy(deploymentexceptionhandler.java:50) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:497) @ org.jboss.arquillian.core.impl.observerimpl.invoke(observerimpl.java:94) @ org.jboss.arquillian.core.impl.eventcontextimpl.proceed(eventcontextimpl.java:88) @ org.jboss.arquillian.core.impl.managerimpl.fire(managerimpl.java:145) @ org.jboss.arquillian.core.impl.managerimpl.fire(managerimpl.java:116) @ org.jboss.arquillian.core.impl.eventimpl.fire(eventimpl.java:67) @ org.jboss.arquillian.container.impl.client.container.containerdeploycontroller$1.perform(containerdeploycontroller.java:95) @ org.jboss.arquillian.container.impl.client.container.containerdeploycontroller$1.perform(containerdeploycontroller.java:80) @ org.jboss.arquillian.container.impl.client.container.containerdeploycontroller.foreachdeployment(containerdeploycontroller.java:263) @ org.jboss.arquillian.container.impl.client.container.containerdeploycontroller.foreachmanageddeployment(containerdeploycontroller.java:239) @ org.jboss.arquillian.container.impl.client.container.containerdeploycontroller.deploymanaged(containerdeploycontroller.java:79) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:497) @ org.jboss.arquillian.core.impl.observerimpl.invoke(observerimpl.java:94) @ org.jboss.arquillian.core.impl.eventcontextimpl.invokeobservers(eventcontextimpl.java:99) @ org.jboss.arquillian.core.impl.eventcontextimpl.proceed(eventcontextimpl.java:81) @ org.jboss.arquillian.core.impl.managerimpl.fire(managerimpl.java:145) @ org.jboss.arquillian.core.impl.managerimpl.fire(managerimpl.java:116) @ org.jboss.arquillian.core.impl.eventimpl.fire(eventimpl.java:67) @ org.jboss.arquillian.container.test.impl.client.containereventcontroller.execute(containereventcontroller.java:101) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:497) @ org.jboss.arquillian.core.impl.observerimpl.invoke(observerimpl.java:94) @ org.jboss.arquillian.core.impl.eventcontextimpl.invokeobservers(eventcontextimpl.java:99) @ org.jboss.arquillian.core.impl.eventcontextimpl.proceed(eventcontextimpl.java:81) @ org.jboss.arquillian.test.impl.testcontexthandler.createclasscontext(testcontexthandler.java:92) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:497) @ org.jboss.arquillian.core.impl.observerimpl.invoke(observerimpl.java:94) @ org.jboss.arquillian.core.impl.eventcontextimpl.proceed(eventcontextimpl.java:88) @ org.jboss.arquillian.test.impl.testcontexthandler.createsuitecontext(testcontexthandler.java:73) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:497) @ org.jboss.arquillian.core.impl.observerimpl.invoke(observerimpl.java:94) @ org.jboss.arquillian.core.impl.eventcontextimpl.proceed(eventcontextimpl.java:88) @ org.jboss.arquillian.core.impl.managerimpl.fire(managerimpl.java:145) @ org.jboss.arquillian.core.impl.managerimpl.fire(managerimpl.java:116) @ org.jboss.arquillian.test.impl.eventtestrunneradaptor.beforeclass(eventtestrunneradaptor.java:87) @ org.jboss.arquillian.junit.arquillian$2.evaluate(arquillian.java:201) @ org.jboss.arquillian.junit.arquillian.multiexecute(arquillian.java:422) @ org.jboss.arquillian.junit.arquillian.access$200(arquillian.java:54) @ org.jboss.arquillian.junit.arquillian$3.evaluate(arquillian.java:218) @ org.junit.runners.parentrunner.run(parentrunner.java:363) @ org.jboss.arquillian.junit.arquillian.run(arquillian.java:166) @ org.apache.maven.surefire.junit4.junit4provider.execute(junit4provider.java:252) @ org.apache.maven.surefire.junit4.junit4provider.executetestset(junit4provider.java:141) @ org.apache.maven.surefire.junit4.junit4provider.invoke(junit4provider.java:112) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:497) @ org.apache.maven.surefire.util.reflectionutils.invokemethodwitharray(reflectionutils.java:189) @ org.apache.maven.surefire.booter.providerfactory$providerproxy.invoke(providerfactory.java:165) @ org.apache.maven.surefire.booter.providerfactory.invokeprovider(providerfactory.java:85) @ org.apache.maven.surefire.booter.forkedbooter.runsuitesinprocess(forkedbooter.java:115) @ org.apache.maven.surefire.booter.forkedbooter.main(forkedbooter.java:75) caused by: java.lang.exception: {"jbas014771: services missing/unavailable dependencies" => ["jboss.naming.context.java.module.werkkatalogjpaadaptertest.werkkatalogjpaadaptertest.env.\"de.staatsbibliothek.berlin.gesamtkatalogwiegendrucke.core.model.werkkatalogfactory\".werkkatalogrepository missing [jboss.naming.context.java.app.werkkatalogjpaadaptertest.core.wkrepository-default-impl]"]} @ org.jboss.as.controller.client.helpers.standalone.impl.serverdeploymentplanresultfuture.getactionresult(serverdeploymentplanresultfuture.java:134) @ org.jboss.as.controller.client.helpers.standalone.impl.serverdeploymentplanresultfuture.getresultfromnode(serverdeploymentplanresultfuture.java:123) @ org.jboss.as.controller.client.helpers.standalone.impl.serverdeploymentplanresultfuture.get(serverdeploymentplanresultfuture.java:85) @ org.jboss.as.controller.client.helpers.standalone.impl.serverdeploymentplanresultfuture.get(serverdeploymentplanresultfuture.java:42) @ org.jboss.as.controller.client.helpers.standalone.serverdeploymenthelper.deploy(serverdeploymenthelper.java:55) @ org.jboss.as.arquillian.container.archivedeployer.deployinternal(archivedeployer.java:77) ... 96 more
for clarity: informative line error is:
{"jbas014771: services missing/unavailable dependencies" => ["jboss.naming.context.java.module.werkkatalogjpaadaptertest.werkkatalogjpaadaptertest .env.\"de.staatsbibliothek.berlin.gesamtkatalogwiegendrucke.core.model.werkkatalogfactory\" .werkkatalogrepository missing [jboss.naming.context.java.app.werkkatalogjpaadaptertest .core.wkrepository-default-impl]"]}`
all dependent classes included in shrinkwrap archive, reason can't container running test resolve werkkatalogrepositoryport
implementation indicated in @ejb annotation.
i ran out of search terms figure out i'm doing wrong i'd appreciate advice. before start tl;dr thread full of copy-paste code, please let me know if need more of code , i'll provide.
thanks in advance!
Comments
Post a Comment