This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 163083 - wrong generated filename for service accessed via EJB module business method
Summary: wrong generated filename for service accessed via EJB module business method
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: EJB (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: issues@javaee
URL: http://identity.netbeans.org/specs/sp...
Keywords:
Depends on: 136360 186331 186332 186334
Blocks:
  Show dependency tree
 
Reported: 2009-04-20 09:56 UTC by matusdekanek
Modified: 2011-02-22 15:22 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description matusdekanek 2009-04-20 09:56:41 UTC
Product Version: NetBeans IDE Dev (Build 200904180201)
Java: 1.6.0_14-ea; Java HotSpot(TM) Client VM 14.0-b12
System: Linux version 2.6.27-11-generic running on i386; UTF-8; en_US (nb)

this is a bit longer description..
1. Start IDE, start web server(glassfish, with access manager), create an EJBModule1 and a web service in it
2. Select web service node in the projects tree under 'EJBModule1 > Web Services'.
3. Deploy EJBModule1.
4. Create EJBModule2 and WSClient in it.
5. Create SessionBean in the EJBModule2 and add a business method to it with WS invocation code.
6. Deploy EJBModule2.
7. Create WebApplication3 and Servlet in it.
8. Write the code in servlet to invoke the business method of SessionBean.
9. Run servlet from WebApplication3 (or deploy WebApplication3).

The WebApplication3 servlet will not run, because the application is undeployable, the error message is something like:
Deploying application in domain failed; Error loading deployment descriptors for module [WebApplication22] -- wsdl file
META-INF/wsdl/localhost_8080/NewWebServiceService/NewWebService.wsdl does not exist for service-ref
org.foo.NewSession2Bean/service

The problem seems to be in the fact that the path to wsdl file is incorrect:
META-INF/wsdl/localhost_8080/NewWebServiceService/NewWebService.wsdl
does not exist, whereas
WEB-INF/wsdl/localhost_8080/NewWebServiceService/NewWebService.wsdl
does (difference is META-INF vs WEB-INF).
Comment 1 Milan Kuchtiak 2010-05-06 14:01:36 UTC
Tested the scenario and it works for me:
- EjbModule1 with web service 
- EjbModule2 with Session Bean, and business method, consuming web service 
- WebApplication, calling SessionBean (from EjbModule 2)

Note: the correct way of calling EJB (with web service) is not adding the entire ejb jar on WebApplication classpath, but copy only the remote interface to client code (in this case copy the remote interface from EjbModule2 to WebApplication)

The issue cannot be fixed in web services as it is not possible to predict that your EJB module will be added (as jar file) to web application classpath. 

Since web service is called from EJB, it is reasonable to generate @WebServiceRef with wsdlLocation = "META-INF/wsdl/...", rather then wsdlLocation = "WEB-INF/wsdl/..."

The problem, IMO is in "Call Enterprise Bean" action. It is not a good pattern to add entire jar file to classpath. The action should and only the romote (local) interface.

The issue was already reported (issue 136360).

*** This bug has been marked as a duplicate of bug 136360 ***
Comment 2 Jaroslav Pospisil 2010-05-18 13:36:26 UTC
This issue is caused by the same original reason as Issue 136360, but not fixed by the patch.
Exception thrown on Glassfish during web app deploy (there's no output from WS operation in result Web Page also): 

WARNING: MEX0008:Failed to parse metadata returned from server at file:/C:/Users/JP154641/Documents/NetBeansProjects/WebApplication1/build/web/META-INF/wsdl/AddNumbers.wsdl using protocol SOAP_1_2. Continuing attempts.
WARNING: MEX0008:Failed to parse metadata returned from server at file:/C:/Users/JP154641/Documents/NetBeansProjects/WebApplication1/build/web/META-INF/wsdl/AddNumbers.wsdl using protocol SOAP_1_1. Continuing attempts.
WARNING: MEX0008:Failed to parse metadata returned from server at file:/C:/Users/JP154641/Documents/NetBeansProjects/WebApplication1/build/web/META-INF/wsdl/AddNumbers.wsdl/mex using protocol SOAP_1_2. Continuing attempts.
WARNING: MEX0008:Failed to parse metadata returned from server at file:/C:/Users/JP154641/Documents/NetBeansProjects/WebApplication1/build/web/META-INF/wsdl/AddNumbers.wsdl/mex using protocol SOAP_1_1. Continuing attempts.
WARNING: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at org.glassfish.webservices.WebServiceReferenceManagerImpl.initiateInstance(WebServiceReferenceManagerImpl.java:320)
        at org.glassfish.webservices.WebServiceReferenceManagerImpl.resolveWSReference(WebServiceReferenceManagerImpl.java:145)
        at com.sun.enterprise.container.common.impl.ComponentEnvManagerImpl$WebServiceRefProxy.create(ComponentEnvManagerImpl.java:979)
        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)
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:428)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:513)
        at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:384)
        at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectInstance(InjectionManagerImpl.java:168)
        at org.glassfish.weld.services.InjectionServicesImpl.aroundInject(InjectionServicesImpl.java:126)
        at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:47)
        at org.jboss.weld.bean.SessionBean$1.inject(SessionBean.java:154)
        at org.glassfish.weld.services.JCDIServiceImpl.injectEJBInstance(JCDIServiceImpl.java:144)
        at com.sun.ejb.containers.BaseContainer.injectEjbInstance(BaseContainer.java:1603)
        at com.sun.ejb.containers.StatelessSessionContainer.createStatelessEJB(StatelessSessionContainer.java:486)
        at com.sun.ejb.containers.StatelessSessionContainer.access$000(StatelessSessionContainer.java:90)
        at com.sun.ejb.containers.StatelessSessionContainer$SessionContextFactory.create(StatelessSessionContainer.java:716)
        at com.sun.ejb.containers.util.pool.NonBlockingPool.getObject(NonBlockingPool.java:200)
        at com.sun.ejb.containers.StatelessSessionContainer._getContext(StatelessSessionContainer.java:443)
        at com.sun.ejb.containers.BaseContainer.getContext(BaseContainer.java:2418)
        at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:1811)
        at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:200)
        at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:75)
        at $Proxy140.myBusinessMethod(Unknown Source)
        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 com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:228)
        at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:147)
        at com.sun.corba.ee.impl.presentation.rmi.codegen.CodegenStubBase.invoke(CodegenStubBase.java:225)
        at dgfdg.__JPLSessionBeanRemote_Remote_DynamicStub.myBusinessMethod(dgfdg/__JPLSessionBeanRemote_Remote_DynamicStub.java)
        at dgfdg._JPLSessionBeanRemote_Wrapper.myBusinessMethod(dgfdg/_JPLSessionBeanRemote_Wrapper.java)
        at rgg.NewServlet.processRequest(NewServlet.java:46)
        at rgg.NewServlet.doGet(NewServlet.java:66)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
        at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
        at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
        at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
        at java.lang.Thread.run(Thread.java:619)
Caused by: javax.xml.ws.WebServiceException: Failed to access the WSDL at: file:/C:/Users/JP154641/Documents/NetBeansProjects/WebApplication1/build/web/META-INF/wsdl/AddNumbers.wsdl. It failed with: 
        C:\Users\JP154641\Documents\NetBeansProjects\WebApplication1\build\web\META-INF\wsdl\AddNumbers.wsdl (The system cannot find the path specified).
        at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(RuntimeWSDLParser.java:184)
        at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:166)
        at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:131)
        at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:267)
        at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:230)
        at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:178)
        at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:106)
        at javax.xml.ws.Service.<init>(Service.java:57)
        at dgr.AddNumbersService.<init>(AddNumbersService.java:58)
        ... 67 more
Caused by: java.io.FileNotFoundException: C:\Users\JP154641\Documents\NetBeansProjects\WebApplication1\build\web\META-INF\wsdl\AddNumbers.wsdl (The system cannot find the path specified)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:106)
        at java.io.FileInputStream.<init>(FileInputStream.java:66)
        at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
        at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
        at java.net.URL.openStream(URL.java:1010)
        at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.createReader(RuntimeWSDLParser.java:837)
        at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.resolveWSDL(RuntimeWSDLParser.java:294)
        at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:151)
        ... 74 more

SEVERE: EJB5070: Exception creating stateless session bean : [JPLSessionBean]
WARNING: A system exception occurred during an invocation on EJB JPLSessionBean method public void dgfdg.JPLSessionBean.myBusinessMethod()
javax.ejb.EJBException: javax.ejb.EJBException: javax.ejb.CreateException: Could not create stateless EJB
        at com.sun.ejb.containers.StatelessSessionContainer._getContext(StatelessSessionContainer.java:448)
        at com.sun.ejb.containers.BaseContainer.getContext(BaseContainer.java:2418)
        at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:1811)
        at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:200)
        at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:75)
        at $Proxy140.myBusinessMethod(Unknown Source)
        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 com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:228)
        at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:147)
        at com.sun.corba.ee.impl.presentation.rmi.codegen.CodegenStubBase.invoke(CodegenStubBase.java:225)
        at dgfdg.__JPLSessionBeanRemote_Remote_DynamicStub.myBusinessMethod(dgfdg/__JPLSessionBeanRemote_Remote_DynamicStub.java)
        at dgfdg._JPLSessionBeanRemote_Wrapper.myBusinessMethod(dgfdg/_JPLSessionBeanRemote_Wrapper.java)
        at rgg.NewServlet.processRequest(NewServlet.java:46)
        at rgg.NewServlet.doGet(NewServlet.java:66)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
        at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
        at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
        at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
        at java.lang.Thread.run(Thread.java:619)
Caused by: javax.ejb.EJBException: javax.ejb.CreateException: Could not create stateless EJB
        at com.sun.ejb.containers.StatelessSessionContainer$SessionContextFactory.create(StatelessSessionContainer.java:718)
        at com.sun.ejb.containers.util.pool.NonBlockingPool.getObject(NonBlockingPool.java:200)
        at com.sun.ejb.containers.StatelessSessionContainer._getContext(StatelessSessionContainer.java:443)
        ... 42 more
Caused by: javax.ejb.CreateException: Could not create stateless EJB
        at com.sun.ejb.containers.StatelessSessionContainer.createStatelessEJB(StatelessSessionContainer.java:526)
        at com.sun.ejb.containers.StatelessSessionContainer.access$000(StatelessSessionContainer.java:90)
        at com.sun.ejb.containers.StatelessSessionContainer$SessionContextFactory.create(StatelessSessionContainer.java:716)
        ... 44 more
Caused by: java.lang.IllegalStateException: Exception attempting to inject Env-Prop: dgfdg.JPLSessionBean/service@Field-Injectable Resource. Class name = dgfdg.JPLSessionBean Field name=service@javax.jws.WebServiceRef@@@ into class dgfdg.JPLSessionBean
        at org.glassfish.weld.services.InjectionServicesImpl.aroundInject(InjectionServicesImpl.java:133)
        at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:47)
        at org.jboss.weld.bean.SessionBean$1.inject(SessionBean.java:154)
        at org.glassfish.weld.services.JCDIServiceImpl.injectEJBInstance(JCDIServiceImpl.java:144)
        at com.sun.ejb.containers.BaseContainer.injectEjbInstance(BaseContainer.java:1603)
        at com.sun.ejb.containers.StatelessSessionContainer.createStatelessEJB(StatelessSessionContainer.java:486)
        ... 46 more
Caused by: com.sun.enterprise.container.common.spi.util.InjectionException: Exception attempting to inject Env-Prop: dgfdg.JPLSessionBean/service@Field-Injectable Resource. Class name = dgfdg.JPLSessionBean Field name=service@javax.jws.WebServiceRef@@@ into class dgfdg.JPLSessionBean
        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.injectInstance(InjectionManagerImpl.java:168)
        at org.glassfish.weld.services.InjectionServicesImpl.aroundInject(InjectionServicesImpl.java:126)
        ... 51 more
Caused by: javax.naming.NamingException: Lookup failed for 'java:comp/env/dgfdg.JPLSessionBean/service' in SerialContext  [Root exception is javax.naming.NamingException [Root exception is java.lang.reflect.InvocationTargetException]]
        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)
        ... 54 more
Caused by: javax.naming.NamingException [Root exception is java.lang.reflect.InvocationTargetException]
        at org.glassfish.webservices.WebServiceReferenceManagerImpl.resolveWSReference(WebServiceReferenceManagerImpl.java:272)
        at com.sun.enterprise.container.common.impl.ComponentEnvManagerImpl$WebServiceRefProxy.create(ComponentEnvManagerImpl.java:979)
        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)
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:428)
        ... 56 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at org.glassfish.webservices.WebServiceReferenceManagerImpl.initiateInstance(WebServiceReferenceManagerImpl.java:320)
        at org.glassfish.webservices.WebServiceReferenceManagerImpl.resolveWSReference(WebServiceReferenceManagerImpl.java:145)
        ... 61 more
Caused by: javax.xml.ws.WebServiceException: Failed to access the WSDL at: file:/C:/Users/JP154641/Documents/NetBeansProjects/WebApplication1/build/web/META-INF/wsdl/AddNumbers.wsdl. It failed with: 
        C:\Users\JP154641\Documents\NetBeansProjects\WebApplication1\build\web\META-INF\wsdl\AddNumbers.wsdl (The system cannot find the path specified).
        at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(RuntimeWSDLParser.java:184)
        at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:166)
        at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:131)
        at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:267)
        at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:230)
        at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:178)
        at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:106)
        at javax.xml.ws.Service.<init>(Service.java:57)
        at dgr.AddNumbersService.<init>(AddNumbersService.java:58)
        ... 67 more
Caused by: java.io.FileNotFoundException: C:\Users\JP154641\Documents\NetBeansProjects\WebApplication1\build\web\META-INF\wsdl\AddNumbers.wsdl (The system cannot find the path specified)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:106)
        at java.io.FileInputStream.<init>(FileInputStream.java:66)
        at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
        at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
        at java.net.URL.openStream(URL.java:1010)
        at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.createReader(RuntimeWSDLParser.java:837)
        at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.resolveWSDL(RuntimeWSDLParser.java:294)
        at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:151)
        ... 74 more

WARNING: StandardWrapperValve[NewServlet]: PWC1406: Servlet.service() for servlet NewServlet threw exception
javax.ejb.EJBException: javax.ejb.EJBException: javax.ejb.CreateException: Could not create stateless EJB
        at com.sun.ejb.containers.StatelessSessionContainer._getContext(StatelessSessionContainer.java:448)
        at com.sun.ejb.containers.BaseContainer.getContext(BaseContainer.java:2418)
        at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:1811)
        at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:200)
        at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:75)
        at $Proxy140.myBusinessMethod(Unknown Source)
        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 com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:228)
        at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:147)
        at com.sun.corba.ee.impl.presentation.rmi.codegen.CodegenStubBase.invoke(CodegenStubBase.java:225)
        at dgfdg.__JPLSessionBeanRemote_Remote_DynamicStub.myBusinessMethod(dgfdg/__JPLSessionBeanRemote_Remote_DynamicStub.java)
        at dgfdg._JPLSessionBeanRemote_Wrapper.myBusinessMethod(dgfdg/_JPLSessionBeanRemote_Wrapper.java)
        at rgg.NewServlet.processRequest(NewServlet.java:46)
        at rgg.NewServlet.doGet(NewServlet.java:66)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
        at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
        at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
        at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
        at java.lang.Thread.run(Thread.java:619)
Caused by: javax.ejb.EJBException: javax.ejb.CreateException: Could not create stateless EJB
        at com.sun.ejb.containers.StatelessSessionContainer$SessionContextFactory.create(StatelessSessionContainer.java:718)
        at com.sun.ejb.containers.util.pool.NonBlockingPool.getObject(NonBlockingPool.java:200)
        at com.sun.ejb.containers.StatelessSessionContainer._getContext(StatelessSessionContainer.java:443)
        ... 42 more
Caused by: javax.ejb.CreateException: Could not create stateless EJB
        at com.sun.ejb.containers.StatelessSessionContainer.createStatelessEJB(StatelessSessionContainer.java:526)
        at com.sun.ejb.containers.StatelessSessionContainer.access$000(StatelessSessionContainer.java:90)
        at com.sun.ejb.containers.StatelessSessionContainer$SessionContextFactory.create(StatelessSessionContainer.java:716)
        ... 44 more
Caused by: java.lang.IllegalStateException: Exception attempting to inject Env-Prop: dgfdg.JPLSessionBean/service@Field-Injectable Resource. Class name = dgfdg.JPLSessionBean Field name=service@javax.jws.WebServiceRef@@@ into class dgfdg.JPLSessionBean
        at org.glassfish.weld.services.InjectionServicesImpl.aroundInject(InjectionServicesImpl.java:133)
        at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:47)
        at org.jboss.weld.bean.SessionBean$1.inject(SessionBean.java:154)
        at org.glassfish.weld.services.JCDIServiceImpl.injectEJBInstance(JCDIServiceImpl.java:144)
        at com.sun.ejb.containers.BaseContainer.injectEjbInstance(BaseContainer.java:1603)
        at com.sun.ejb.containers.StatelessSessionContainer.createStatelessEJB(StatelessSessionContainer.java:486)
        ... 46 more
Caused by: com.sun.enterprise.container.common.spi.util.InjectionException: Exception attempting to inject Env-Prop: dgfdg.JPLSessionBean/service@Field-Injectable Resource. Class name = dgfdg.JPLSessionBean Field name=service@javax.jws.WebServiceRef@@@ into class dgfdg.JPLSessionBean
        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.injectInstance(InjectionManagerImpl.java:168)
        at org.glassfish.weld.services.InjectionServicesImpl.aroundInject(InjectionServicesImpl.java:126)
        ... 51 more
Caused by: javax.naming.NamingException: Lookup failed for 'java:comp/env/dgfdg.JPLSessionBean/service' in SerialContext  [Root exception is javax.naming.NamingException [Root exception is java.lang.reflect.InvocationTargetException]]
        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)
        ... 54 more
Caused by: javax.naming.NamingException [Root exception is java.lang.reflect.InvocationTargetException]
        at org.glassfish.webservices.WebServiceReferenceManagerImpl.resolveWSReference(WebServiceReferenceManagerImpl.java:272)
        at com.sun.enterprise.container.common.impl.ComponentEnvManagerImpl$WebServiceRefProxy.create(ComponentEnvManagerImpl.java:979)
        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)
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:428)
        ... 56 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at org.glassfish.webservices.WebServiceReferenceManagerImpl.initiateInstance(WebServiceReferenceManagerImpl.java:320)
        at org.glassfish.webservices.WebServiceReferenceManagerImpl.resolveWSReference(WebServiceReferenceManagerImpl.java:145)
        ... 61 more
Caused by: javax.xml.ws.WebServiceException: Failed to access the WSDL at: file:/C:/Users/JP154641/Documents/NetBeansProjects/WebApplication1/build/web/META-INF/wsdl/AddNumbers.wsdl. It failed with: 
        C:\Users\JP154641\Documents\NetBeansProjects\WebApplication1\build\web\META-INF\wsdl\AddNumbers.wsdl (The system cannot find the path specified).
        at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(RuntimeWSDLParser.java:184)
        at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:166)
        at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:131)
        at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:267)
        at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:230)
        at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:178)
        at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:106)
        at javax.xml.ws.Service.<init>(Service.java:57)
        at dgr.AddNumbersService.<init>(AddNumbersService.java:58)
        ... 67 more
Caused by: java.io.FileNotFoundException: C:\Users\JP154641\Documents\NetBeansProjects\WebApplication1\build\web\META-INF\wsdl\AddNumbers.wsdl (The system cannot find the path specified)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:106)
        at java.io.FileInputStream.<init>(FileInputStream.java:66)
        at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
        at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
        at java.net.URL.openStream(URL.java:1010)
        at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.createReader(RuntimeWSDLParser.java:837)
        at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.resolveWSDL(RuntimeWSDLParser.java:294)
        at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:151)
        ... 74 more
Comment 3 Milan Kuchtiak 2010-05-18 13:44:46 UTC
Call EJB action mustn't add entire ejb project on classpath.
There is no way for J2EE server to find out whether ejb was created in web, or ejb project.
Comment 4 David Konecny 2010-05-19 01:26:04 UTC
This is user coding error but IDE is at fault because it got user to this state without any help to avoid it. I filled following issues to amend this:
* bug 186334 - disable 'Remote' in Call EJB dialog for EJBs without EJB client jar
* bug 186332 - always put Remote interfaces to EJB jar client
Those two issues should help user to realize early that creating Remote EJB interface directly in EJB module is wrong - client EJB jar must be used instead.

Fixing these two issues will have following impact on given scenario:

5. Create SessionBean in the EJBModule2 with Remote interface in EJBModule2CLientJar and add a business method to it with WS
invocation code.

Due to bug 186331 (standalone EJB module cannot be deployed) step 6. will fail. It can be worked around by deploying standalone EJB module via asadmin command line (eg. "glassfishv3/bin/asadmin deploy --libraries EJBModule2CLientJar.jar EJBModule2.jar") or by placing EJBModule2 and WebApplication3 in EAR project and using Local interface to call the SessionBean.
Comment 5 Petr Hejl 2011-02-22 15:22:42 UTC
All filed issues are already fixed - closing this as well.