Hi
I try to deploy an EJB on Tomcat wich is bundled with Jboss 3.2. The Bean implements the Local-Interfaces. But I can't access my bean. I tried also diffrent Configurations with the jboss-web.xml with no effect.
I get the following Error:
ERROR [URLDeploymentScanner] Failed to deploy: org.jboss.deployment.scanner.URLDeploymentScanner$DeployedURL@739ed3c6{ url=file:/data/software/jboss-3.2.2RC4/server/default/deploy/jboss.war/, deployedLastModified=1069428841000 }
org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (javax.naming.NamingException: ejb-local-ref: 'ejb/Product', with web.xml ejb-link: 'product.Product' failed to resolve to an ejb with a LocalHome)
This is the way I stored my Application on Jboss
deploy/Product.jar // contains the EJB
deploy/test.war // contains the web-app
The Configuration-Files
ejb-jar.xml
<ejb-jar>
<enterprise-beans>
<ejb-name>Product</ejb-name>
<local-home>product.ProductLocalHome</local-home>
product.ProductLocal
<ejb-class>product.ProductBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
False
<cmp-version>2.x</cmp-version>
<abstract-schema-name>Product</abstract-schema-name>
<cmp-field><field-name>id</field-name></cmp-field>
<cmp-field><field-name>name</field-name></cmp-field>
<cmp-field><field-name>farbe</field-name></cmp-field>
<cmp-field><field-name>preis</field-name></cmp-field>
<primkey-field>id</primkey-field>
</enterprise-beans>
</ejb-jar>
the deploy/test.war/WEB-INF/web.xml
....
<ejb-local-ref>
<ejb-ref-name>ejb/Product</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>product.ProductLocalHome</local-home>
product.ProductLocal
<ejb-link>product.Product</ejb-link>
</ejb-local-ref>
....
the deploy/test.war/WEB-INF/jboss-web.xml
<enterprise-beans>
<ejb-local-ref>
<ejb-ref-name>Product</ejb-ref-name>
<local-jndi-name>ProductLocalHome</local-jndi-name>
<ejb-ref-type>Entity</ejb-ref-type>
<ejb-link>Product</ejb-link>
</ejb-local-ref>
</enterprise-beans>
Thanks for Help
Ralf
Link only works when the referenced component is in the same application package as the caller. In your instance, it means that the WAR and the JAR need to be packaged in an EAR.