On Jan 27, 2005, at 12:10 PM, Sandip Ghayal wrote:
I have one more question/issue.
I facing issue when trying to deploy simple EJB.jar file which has a resource reference to connector. The issue is as this is Jar file there is no connected embedded into this jar file. Also the connector was not previously deployed.
So during deployment I get exception as below. The exception is complaining that there is no corresponding resource reference.
Is it expected behaviour ? Should not Geronimo allow users to do mapping of resources at later stage. Is there any kind of workaround for this situation ?
The deployment process is expected to resolve all references. There's a lot of "magic" that lets you specify only a little bit of the resource name, and the deployer will find the rest for you, but for this to work the resource has to be available while you are doing the deployment. Currently the only way to reliably make this happen is to put the resource in the parent or ancestor of the package/plan you are trying to deploy. This has the other effect of putting the resource in your classpath which is often unnecessary and possibly undesirable.
You should be able to avoid this problem if you specify the entire jsr-77 object name of the managed connection factory wrapper gbean in a target-name element. I find the only reliable way to find out what this might be is to deploy the resource and copy the name out of the log.
We might have paradigm mismatch here. :-) I'm having trouble imagining when "later" would be. Could you explain what you have in mind?
One thing to remember is the theoretical future existence of jsr-88 tools to help you write the plans before the current "deployment" step :-)
many thanks, david jencks
F:\geronimo\modules\assembly\target\geronimo-1.0-SNAPSHOT>java
-jar bin/deployer
.jar deploy I:\TestEjb.jar
Username: system
Password: manager
Deployment failed
Server reports:
org.apache.geronimo.common.DeploymentException:
Unknown or amb
iguous resource name query:
geronimo.server:j2eeType=JCAManagedConnectionFactory
,J2EEServer=geronimo,J2EEApplication=null,name=jdbc/Connector,*
match count: 0
org.apache.geronimo.kernel.InternalKernelException:
org.apache.geronimo.common.D
eploymentException: Unknown or ambiguous resource name
query: geronimo.server:j2
eeType=JCAManagedConnectionFactory,J2EEServer=geronimo,J2EEApplication= null,name
=jdbc/Connector,* match count: 0
at
org.apache.geronimo.kernel.jmx.KernelDelegate.invoke(KernelDelegate.j
ava:232)
at
org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(Dis
tributeCommand.java:86)
at java.lang.Thread.run(Thread.java:534)
Caused by:
org.apache.geronimo.common.DeploymentException:
Unknown or ambiguous
resource name query:
geronimo.server:j2eeType=JCAManagedConnectionFactory,J2EESe
rver=geronimo,J2EEApplication=null,name=jdbc/Connector,*
match count: 0
at
org.apache.geronimo.connector.deployment.ConnectorModuleBuilder.locat
eResourceName(ConnectorModuleBuilder.java:788)
at
org.apache.geronimo.connector.deployment.ConnectorModuleBuilder$$Fast
ClassByCGLIB$$a535b6aa.invoke(<generated>)
at
net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87)
at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethod
Invoker.java:38)
at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperatio
n.java:118)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.
java:658)
at
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:5
7)
at
org.apache.geronimo.kernel.proxy.RawOperationInvoker.invoke(RawOperat
ionInvoker.java:36)
at
org.apache.geronimo.kernel.proxy.ProxyMethodInterceptor.intercept(Pro
xyMethodInterceptor.java:92)
at
org.apache.geronimo.j2ee.deployment.ResourceReferenceBuilder$$Enhance
rByCGLIB$$f168bc13.locateResourceName(<generated>)
at
org.apache.geronimo.j2ee.deployment.RefContext.getConnectionFactoryCo
ntainerId(RefContext.java:277)
at
org.apache.geronimo.naming.deployment.ENCConfigBuilder.getResourceCon
tainerId(ENCConfigBuilder.java:206)
at
org.apache.geronimo.naming.deployment.ENCConfigBuilder.addResourceRef
s(ENCConfigBuilder.java:188)
at
org.apache.geronimo.naming.deployment.ENCConfigBuilder.buildComponent
Context(ENCConfigBuilder.java:600)
at
org.openejb.deployment.SessionBuilder.processEnvironmentRefs(SessionB
uilder.java:138)
at
org.openejb.deployment.SessionBuilder.addEJBContainerGBean(SessionBui
lder.java:222)
at
org.openejb.deployment.SessionBuilder.buildBeans(SessionBuilder.java:
153)
at
org.openejb.deployment.OpenEJBModuleBuilder.addGBeans(OpenEJBModuleBu
ilder.java:446)
at
org.openejb.deployment.OpenEJBModuleBuilder$$FastClassByCGLIB$$11bd7b
20.invoke(<generated>)
at
net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87)
at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethod
Invoker.java:38)
at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperatio
n.java:118)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.
java:658)
at
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:5
7)
at
org.apache.geronimo.kernel.proxy.RawOperationInvoker.invoke(RawOperat
ionInvoker.java:36)
at
org.apache.geronimo.kernel.proxy.ProxyMethodInterceptor.intercept(Pro
xyMethodInterceptor.java:92)
at
org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$9
e45a280.addGBeans(<generated>)
at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfigurati
on(EARConfigBuilder.java:346)
at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder$$FastClassByCGLI
B$$38e56ec6.invoke(<generated>)
at
net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87)
at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethod
Invoker.java:38)
at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperatio
n.java:118)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.
java:658)
at
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:5
7)
at
org.apache.geronimo.kernel.proxy.RawOperationInvoker.invoke(RawOperat
ionInvoker.java:36)
at
org.apache.geronimo.kernel.proxy.ProxyMethodInterceptor.intercept(Pro
xyMethodInterceptor.java:92)
at
org.apache.geronimo.deployment.ConfigurationBuilder$$EnhancerByCGLIB$
$7a1ca0ae.buildConfiguration(<generated>)
at
org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:200)
at
org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:80)
at
org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.i
nvoke(<generated>)
at
net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87)
at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethod
Invoker.java:38)
at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperatio
n.java:118)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.
java:684)
at
org.apache.geronimo.kernel.Kernel.invoke(Kernel.java:308)
at
org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:121)
at
org.apache.geronimo.kernel.KernelGBean$$FastClassByCGLIB$$1cccefc9.in
voke(<generated>)
at
net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87)
at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethod
Invoker.java:38)
at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperatio
n.java:118)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.
java:684)
at
org.apache.geronimo.kernel.Kernel.invoke(Kernel.java:308)
at
org.apache.geronimo.kernel.jmx.MBeanServerDelegate.invoke(MBeanServer
Delegate.java:117)
at
mx4j.remote.rmi.RMIConnectionInvoker.invoke(RMIConnectionInvoker.java
:222)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at
java.lang.reflect.Method.invoke(Method.java:324)
at
mx4j.remote.rmi.RMIConnectionProxy.invoke(RMIConnectionProxy.java:36)
at mx4j.remote.rmi.RMIConnectionSubjectInvoker.chain(RMIConnectionSubjec tInvoker.java:98) at mx4j.remote.rmi.RMIConnectionSubjectInvoker.access$000(RMIConnectionS ubjectInvoker.java:32) at mx4j.remote.rmi.RMIConnectionSubjectInvoker$1.run(RMIConnectionSubjec tInvoker.java:89) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAsPrivileged(Subject.java:500) at mx4j.remote.MX4JRemoteUtils.subjectInvoke(MX4JRemoteUtils.java:151) at mx4j.remote.rmi.RMIConnectionSubjectInvoker.subjectInvoke(RMIConnecti onSubjectInvoker.java:85) at mx4j.remote.rmi.RMIConnectionSubjectInvoker.invoke(RMIConnectionSubje ctInvoker.java:79) at $Proxy0.invoke(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImp l.java:224) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261) at sun.rmi.transport.Transport$1.run(Transport.java:148) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:144) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4 60) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport .java:701) ... 1 more
Thanks,
Sandip Ghayal
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
