hi,
I am using netbeans 6.8, and glassfish v3, and making a simple jms application to work.
I got this:
com.sun.enterprise.container.common.spi.util.InjectionException:
Exception attempting to inject Unresolved Message-Destination-Ref
jms/
[email protected]@null into class enterpriseapplication4.Main
Code:
public class Main {
@Resource(name = "jms/myQueue")
private static Topic myQueue;
@Resource(name = "jms/myFactory")
private static ConnectionFactory myFactory;
...
// the rest is just boiler plate created by netbeans
}
In my Glassfish v3 admin console,
I have jms/myFactory as my ConnectionFactory and
jms/myQueue as my Destination Resources.
What am I missing?
Full stack:
WARNING: enterprise.deployment.backend.invalidDescriptorMappingFailure
com.sun.enterprise.container.common.spi.util.InjectionException: Exception attempting to inject Unresolved Message-Destination-Ref jms/
[email protected]@null into class enterpriseapplication4.Main
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:614)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:384)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectClass(InjectionManagerImpl.java:210)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectClass(InjectionManagerImpl.java:202)
at org.glassfish.appclient.client.acc.AppClientContainer$ClientMainClassSetting.getClientMainClass(AppClientContainer.java:599)
at org.glassfish.appclient.client.acc.AppClientContainer.getMainMethod(AppClientContainer.java:498)
at org.glassfish.appclient.client.acc.AppClientContainer.completePreparation(AppClientContainer.java:397)
at org.glassfish.appclient.client.acc.AppClientContainer.prepare(AppClientContainer.java:311)
at org.glassfish.appclient.client.AppClientFacade.prepareACC(AppClientFacade.java:264)
at org.glassfish.appclient.client.acc.agent.AppClientContainerAgent.premain(AppClientContainerAgent.java:75)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)
Caused by:
javax.naming.NamingException: Lookup failed for 'java:comp/env/jms/myQueue' in SerialContext targetHost=localhost,targetPort=3700 [Root exception is
javax.naming.NameNotFoundException: No object bound for java:comp/env/jms/myQueue [Root exception is java.lang.NullPointerException]]
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:442)
at
javax.naming.InitialContext.lookup(InitialContext.java:392)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:513)
... 15 more
Caused by:
javax.naming.NameNotFoundException: No object bound for java:comp/env/jms/myQueue [Root exception is java.lang.NullPointerException]
at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.java:218)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:428)
... 17 more
Caused by: java.lang.NullPointerException
at
javax.naming.InitialContext.getURLScheme(InitialContext.java:269)
at
javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:318)
at
javax.naming.InitialContext.lookup(InitialContext.java:392)
at com.sun.enterprise.naming.util.JndiNamingObjectFactory.create(JndiNamingObjectFactory.java:75)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:688)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:657)
at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.java:148)
... 18 more
Regards