<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    EJBContainer doesn't deploy my SessionBean
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/jsmadja">Julien Smadja</a> in <i>EJB3</i> - <a href="http://community.jboss.org/message/581031#581031">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hi everybody,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I'm trying to execute a simple JUnit Test Case with a stateless session bean. There is no problem when I deploy this jar in glassfish or in Jboss 6.</p><p>But, when I try to execute my test, the Jboss EJBContainer starts fine and my SessionBean failed to deploy.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Here the details :</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>My container initialization : </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: courier new,courier;">@BeforeClass</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; public static void initJBoss() throws NamingException {</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; container = EJBContainer.createEJBContainer();</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; context = container.getContext();</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; service = (IPersonService) context.lookup("PersonService/local");</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; }</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>My session bean definition :</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: courier new,courier;">@Stateless</span></p><p><span style="font-family: courier new,courier;">@Local</span></p><p><span style="font-family: courier new,courier;">public class PersonService implements IPersonService {</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; @PersistenceContext</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; EntityManager em;</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; public Person create(Person person) {</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; em.persist(person);</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; return person;</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; }</span></p><p><span style="font-family: courier new,courier;">....</span></p><p><span style="font-family: courier new,courier;">}</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>And now, the errors (no difference when I'm running through Eclipse or Maven 3) :</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: courier new,courier;">javax.ejb.EJBException: java.lang.reflect.InvocationTargetException</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at org.jboss.ejb3.embedded.impl.standalone.JBossStandaloneEJBContainerProvider.createEJBContainer(JBossStandaloneEJBContainerProvider.java:134)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:97)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:79)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at com.xebia.ejbcontainer.service.PersonServiceTest.initJBoss(PersonServiceTest.java:29)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at java.lang.reflect.Method.invoke(Method.java:597)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at org.junit.runners.ParentRunner.run(ParentRunner.java:236)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:146)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at java.lang.reflect.Method.invoke(Method.java:597)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at $Proxy0.invoke(Unknown Source)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:145)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:87)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)</span></p><p><span style="font-family: courier new,courier;">Caused by: java.lang.reflect.InvocationTargetException</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at java.lang.reflect.Method.invoke(Method.java:597)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; at org.jboss.ejb3.embedded.impl.standalone.JBossStandaloneEJBContainerProvider.createEJBContainer(JBossStandaloneEJBContainerProvider.java:122)</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; ... 25 more</span></p><p><span style="font-family: courier new,courier;">Caused by: javax.ejb.EJBException: org.jboss.embedded.api.DeploymentException: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: courier new,courier;">DEPLOYMENTS MISSING DEPENDENCIES:</span></p><p><span style="font-family: courier new,courier;">&#160; Deployment "jboss.ejb3:application=cla,module=cla,component=PersonService,service=EjbEncFactory" is missing the following dependencies:</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; Dependency "jboss.naming:application=cla,component=PersonService,module=cla" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'jboss.naming:application=cla,component=PersonService,module=cla' **")</span></p><p><span style="font-family: courier new,courier;">&#160; Deployment "jboss.j2ee:jar=classes,name=PersonService,service=EJB3" is missing the following dependencies:</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; Dependency "jboss.ejb3:application=cla,component=PersonService,module=cla,service=EjbEncFactory" (should be in state "Installed", but is actually in state "Described")</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; Dependency "org.jboss.ejb.bean.instantiator/cla/cla/PersonService" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'org.jboss.ejb.bean.instantiator<strong>/cla/cla/PersonService</strong>' **")</span></p><p><span style="font-family: courier new,courier;">&#160; Deployment "jboss.j2ee:jar=classes,name=PersonService,service=EJB3,type=nointerface-view-jndi-binder" is missing the following dependencies:</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; Dependency "jboss.j2ee:jar=classes,name=PersonService,service=EJB3" (should be in state "Installed", but is actually in state "Instantiated")</span></p><p><span style="font-family: courier new,courier;">&#160; Deployment "jboss.j2ee:jar=classes,name=PersonService,service=EJB3_endpoint" is missing the following dependencies:</span></p><p><span style="font-family: courier new,courier;">&#160;&#160;&#160; Dependency "jboss.j2ee:jar=classes,name=PersonService,service=EJB3" (should be in state "Installed", but is actually in state "Instantiated")</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: courier new,courier;">DEPLOYMENTS IN ERROR:</span></p><p><span style="font-family: courier new,courier;">&#160; Deployment "org.jboss.ejb.bean.instantiator/cla/cla/PersonService" is in error due to the following reason(s): ** NOT FOUND Depends on 'org.jboss.ejb.bean.instantiator/cla/cla/PersonService' **</span></p><p><span style="font-family: courier new,courier;">&#160; Deployment "jboss.naming:application=cla,component=PersonService,module=cla" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.naming:application=cla,component=PersonService,module=cla' **</span></p><p><span style="font-family: courier new,courier;">&#160; Deployment "jboss.ejb3:application=cla,component=PersonService,module=cla,service=EjbEncFactory" is in error due to the following reason(s): Described</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Any idea ? What is the <span style="font-family: courier new,courier;"><strong>/cla/cla/PersonService </strong>thing <strong>?</strong></span></p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/581031#581031">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in EJB3 at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>