Bugs item #545821, was opened at 2002-04-18 15:47
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=545821&group_id=22866
Category: None
Group: v3.0 Rabbit Hole
>Status: Deleted
Resolution: None
Priority: 5
Submitted By: Peter Luttrell (objec)
Assigned to: Nobody/Anonymous (nobody)
Summary: web-app local-refs don't work
Initial Comment:
jboss3.0rc1+tomcat4.0.3
I attempted to lookup an ejb via local interface in a
web app.
As I read the spec you need to specify the refernce in
the web.xml as such:
<ejb-local-ref>
<ejb-ref-name>jndiLookupName</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>myLocalHome</local-home>
<local>myLocal</local>
<ejb-link>ejb-name</ejb-link>
</ejb-local-ref>
The problem is the ejb-name. Jboss can't seam to
locate the ejb and thus can't build the ENC.
My war is located in the root of an ear, named
test.war.
My ejb-jar (with the ejb I need) is located in the
root of the ear, named test-ejbs.jar.
The spec states (from web-app_2_3.dtd):
<!--
The ejb-link element is used in the ejb-ref or ejb-
local-ref
elements to specify that an EJB reference is linked to
an
enterprise bean.
The name in the ejb-link element is composed of a
path name specifying the ejb-jar containing the
referenced enterprise
bean with the ejb-name of the target bean appended and
separated from
the path name by "#". The path name is relative to
the war file
containing the web application that is referencing the
enterprise bean.
This allows multiple enterprise beans with the same
ejb-name to be
uniquely identified.
Used in: ejb-local-ref, ejb-ref
Examples:
<ejb-link>EmployeeRecord</ejb-link>
<ejb-
link>../products/product.jar#ProductEJB</ejb-link>
-->
Thus I've tried these values for ejb-link:
myEjbName
test-ejbs.jar#myEjbName
But neither work.
Two additional things that I tried are:
adding a reference to the test-ejbs.jar in the
Manifest.mf file for the war.
adding the test-ejbs.jar file to the WEB-INF\lib
dir in my war.
Here's the exception:
15:29:02,961 ERROR [EmbeddedCatalinaServiceSX] Failed
to setup web application ENC
javax.naming.NamingException: ejb-local-ref:
jndiLookupName, target not found, add valid ejb-link
at
org.jboss.web.AbstractWebContainer.linkEjbLocalRefs
(AbstractWebContainer.java:757)
at
org.jboss.web.AbstractWebContainer.parseWebAppDescripto
rs(AbstractWebContainer.java:567)
at
org.jboss.web.AbstractWebContainer$DescriptorParser.par
seWebAppDescriptors(AbstractWebCon
tainer.java:1050)
at
org.jboss.web.catalina.EmbeddedCatalinaServiceSX.contex
tInit(EmbeddedCatalinaServiceSX.ja
va:334)
at
org.jboss.web.catalina.EmbeddedCatalinaServiceSX.access
$000(EmbeddedCatalinaServiceSX.jav
a:74)
at
org.jboss.web.catalina.EmbeddedCatalinaServiceSX$1.life
cycleEvent(EmbeddedCatalinaService
SX.java:276)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycle
Event(LifecycleSupport.java:155)
at org.apache.catalina.core.ContainerBase.start
(ContainerBase.java:1131)
at
org.apache.catalina.core.StandardContext.start
(StandardContext.java:3345)
at
org.apache.catalina.core.ContainerBase.addChild
(ContainerBase.java:785)
at
org.apache.catalina.core.StandardHost.addChild
(StandardHost.java:454)
at
org.jboss.web.catalina.EmbeddedCatalinaServiceSX.create
WebContext(EmbeddedCatalinaService
SX.java:284)
at
org.jboss.web.catalina.EmbeddedCatalinaServiceSX.perfor
mDeploy(EmbeddedCatalinaServiceSX.
java:204)
at org.jboss.web.AbstractWebContainer.start
(AbstractWebContainer.java:405)
at org.jboss.deployment.MainDeployer.start
(MainDeployer.java:665)
at org.jboss.deployment.MainDeployer.start
(MainDeployer.java:658)
at org.jboss.deployment.MainDeployer.deploy
(MainDeployer.java:507)
at org.jboss.deployment.MainDeployer.deploy
(MainDeployer.java:470)
at sun.reflect.GeneratedMethodAccessor6.invoke
(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke
(Method.java:324)
at
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke
(ReflectedMBeanDispatcher.java:284
)
at org.jboss.mx.server.MBeanServerImpl.invoke
(MBeanServerImpl.java:492)
at org.jboss.util.jmx.MBeanProxy.invoke
(MBeanProxy.java:174)
at $Proxy4.deploy(Unknown Source)
at
org.jboss.deployment.scanner.URLDeploymentScanner.deplo
y(URLDeploymentScanner.java:350)
at
org.jboss.deployment.scanner.URLDeploymentScanner.scanD
irectory(URLDeploymentScanner.java
:530)
at
org.jboss.deployment.scanner.URLDeploymentScanner.scan
(URLDeploymentScanner.java:410)
at
org.jboss.deployment.scanner.AbstractDeploymentScanner$
ScannerThread.loop(AbstractDeploym
entScanner.java:202)
at
org.jboss.deployment.scanner.AbstractDeploymentScanner$
ScannerThread.run(AbstractDeployme
ntScanner.java:191)
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=545821&group_id=22866
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development