<!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;">
    Could not resolve @EJB reference: [EJB Reference: beanInterface...
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/maksrma">Maksym RMA</a> in <i>JBoss Microcontainer</i> - <a href="http://community.jboss.org/message/624933#624933">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hello All</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><p>I have problem with Stateless EJB3 dependency injection on JBoss 6.1 with ESB 4.10</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p>.</p><p>More details: </p><p>I have 2 ear files. EJB and local interface in one of them, and I am trying to call this EJB in other one ear.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="color: #646464; font-size: 10pt;">EJB (First ear):</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p align="left">@Stateless</p><p><div><span style="color: #646464; font-size: 10pt;"><p align="left">@Local <span style="color: #646464; font-size: 10pt;"><span style="font-size: 10pt;">(ProductCreditTypeDAOLocal.</span><strong style=": ; color: #7f0055; font-size: 10pt;">class)</strong></span></p></span></div></p><p><span style="color: #646464; font-size: 10pt;"><p align="left">public class ProductCreditTypeDAOBean extends BasicDAO&lt;ProductCreditTypeEntity, Long&gt; implements ProductCreditTypeDAOLocal<a class="jive-link-anchor-small">#</a><a class="jive-link-anchor-small">#</a><a class="jive-link-anchor-small">#</a><a class="jive-link-anchor-small">#</a><a class="jive-link-anchor-small">#</a></p><p align="left"><span style="color: #646464; font-size: 10pt;"></span>.....</p><p align="left"><span style="color: #646464; font-size: 10pt;"></span><span style="color: #646464; font-size: 10pt;"></span></p></span></p><p align="left">Interface (First ear):</p><p align="left" style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p align="left">public interface ProductCreditTypeDAOLocal ....</p><p align="left" style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p align="left">Call (Second ear):</p><p>@Stateless<br/>@Remote(EcsAdminDataDispatcher.class)<br/>public class EcsAdminDataDispatcherBean extends EcspertEJBBase implements EcsAdminDataDispatcher {</p><p> @Resource<br/> private SessionContext sessionContext;</p><p> @EJB<br/> private ProductCreditTypeDAOLocal productCreditTypeDAO; --- This is problem injection!</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I tryed enable EAR class loading isolation (jboss-app.xml):</p><p>&lt;!DOCTYPE jboss-app PUBLIC</p><p>&#160;&#160;&#160; "-//JBoss//DTD J2EE Application 5.0//EN"</p><p>&#160;&#160;&#160; "<a class="jive-link-external-small" href="http://www.jboss.org/j2ee/dtd/jboss-app_5_0.dtd">http://www.jboss.org/j2ee/dtd/jboss-app_5_0.dtd</a>"&gt;</p><p>&lt;jboss-app&gt;</p><p>&lt;loader-repository&gt;myapp:app=ejb3&lt;/loader-repository&gt; -- How I understood, this one tell jboss server to load classes in isolated repository.</p><p>&lt;/jboss-app&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I tryed change: </p><p align="left">@Local <span style="color: #646464; font-size: 10pt;"><span style="font-size: 10pt;">(ProductCreditTypeDAOLocal.</span><strong style=": ; color: #7f0055; font-size: 10pt;">clas</strong></span><span style="color: #646464; font-size: 10pt;"><strong style=": ; color: #7f0055; font-size: 10pt;">s) </strong></span></p><p align="left"><span style="color: #646464; font-size: 10pt;"><strong style=": ; color: #7f0055; font-size: 10pt;"><span style="color: #7f0055; font-size: 10pt;">to @Re</span>mote but result is same (see next...). </strong></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p align="left"><div align="left"> </div></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p align="left" style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p align="left" style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p> On deploy phase next exception occurs:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Error installing to Real: name=vfs:///D:/tmp/jboss-6.1.0.Final/server/efour_conf/deploy/credit/creditBL.ear state=PreReal mode=Manual requiredState=Real: org.jboss.deployers.spi.DeploymentException: Error during deploy: org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData.EcsAdminDataDispatcherBean</p><p> at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49) [:2.2.2.GA]</p><p>....</p><p>Caused by: java.lang.RuntimeException: Could not resolve @EJB reference: [EJB Reference: beanInterface 'com.cs.creditecspert.dao.local.ProductCreditTypeDAOLocal', beanName 'null', mappedName 'null', lookupName 'null', owning unit <a class="jive-link-external-small" href="mailto:'ComponentDeploymentContext@8065331{org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData.EcsAdminDataDispatcherBean}'">'ComponentDeploymentContext@8065331{org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData.EcsAdminDataDispatcherBean}'</a>] for environment entry: env/com.cs.creditecspert.admindispatcher.EcsAdminDataDispatcherBean/productCreditTypeDAO in unit <a class="jive-link-external-small" href="mailto:ComponentDeploymentContext@8065331{org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData.EcsAdminDataDispatcherBean">ComponentDeploymentContext@8065331{org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData.EcsAdminDataDispatcherBean</a>}</p><p> at org.jboss.ejb3.jndi.deployers.resource.provider.AnnotatedEJBRefResourceProvider.provide(AnnotatedEJBRefResourceProvider.java:99) [:0.1.7]</p><p> at org.jboss.ejb3.jndi.deployers.resource.provider.AnnotatedEJBRefResourceProvider.provide(AnnotatedEJBRefResourceProvider.java:50) [:0.1.7]</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><p>As fact it works fine on jboss 4.2.3GA. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p> </p><p>Have any ideas...? </p><p>I will be grateful for any....</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/624933#624933">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Microcontainer at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2114">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


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

</div>

</body>
</html>