tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From exabrial <exabrial+open...@gmail.com>
Subject JEE Dependency Injection failure on @WebServiceRef results in bizzare NullPointerException
Date Tue, 17 Jul 2012 21:58:20 GMT
This is a followup to my other question... I've created a reproducible test
example using amazon's public SOAP service.

At the command line run this in your source folder:
wsimport -keep -p test.amazon
http://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl


The put this into a managed bean or a stateless EJB:
@WebServiceRef(wsdlLocation=
  
"http://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl")
private AWSECommerceService service;

When TomEE boots, you'll get the following:

Jul 17, 2012 4:53:43 PM org.apache.naming.NamingContext lookup
WARNING: Unexpected exception resolving reference
java.lang.NullPointerException
	at
org.apache.openejb.core.ivm.naming.JaxWsServiceReference.getObject(JaxWsServiceReference.java:73)
	at
org.apache.openejb.core.ivm.naming.Reference.getContent(Reference.java:40)
	at
org.apache.xbean.naming.reference.SimpleReference$SimpleObjectFactory.getObjectInstance(SimpleReference.java:137)
	at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:843)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:154)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:831)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:154)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:831)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:154)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:831)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:168)
	at
org.apache.openejb.InjectionProcessor.fillInjectionProperties(InjectionProcessor.java:182)
	at
org.apache.openejb.InjectionProcessor.construct(InjectionProcessor.java:110)
	at
org.apache.openejb.InjectionProcessor.createInstance(InjectionProcessor.java:83)
	at org.apache.openejb.core.WebContext.inject(WebContext.java:136)
	at
org.apache.tomee.catalina.JavaeeInstanceManager.newInstance(JavaeeInstanceManager.java:68)
	at
org.apache.myfaces.config.annotation.Tomcat7AnnotationLifecycleProvider.postConstruct(Tomcat7AnnotationLifecycleProvider.java:94)
	at
org.apache.myfaces.config.ManagedBeanBuilder.buildManagedBean(ManagedBeanBuilder.java:213)
	at
org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.createManagedBean(ManagedBeanResolver.java:333)
	at
org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.getValue(ManagedBeanResolver.java:296)
	at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:58)

Later on after the stack trace you see this:

Jul 17, 2012 4:53:43 PM org.apache.openejb.InjectionProcessor
fillInjectionProperties
WARNING: Injection data not found in JNDI context:
jndiName='comp/env/testbed.ManagedBeanMB/service',
target=testbed.ManagedBeanMB/service

--
View this message in context: http://openejb.979440.n4.nabble.com/JEE-Dependency-Injection-failure-on-WebServiceRef-results-in-bizzare-NullPointerException-tp4656360.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Mime
View raw message