IllegalStateException: "WSEJBEndpointManager.ejbPostInvoke already called" while throwing #WebFault - java

I am currently migrating a webservice from Websphere 7 to Websphere 8.5.5.2
The application worked in version 7, but not completely in 8.5
It works in the happy path, but generates a IllegalStateException when I want to throw a SOAPFault.
I am happy to provide more information, but I am not sure what is relevant.
The web.xml version was 2.5, but I also tried version 3.0
<web-app id="WebApp_ID" version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
The webservice is annotated using #javax.jws.WebService and uses a local ejb injection
#javax.ejb.Stateless
#javax.jws.WebService(endpointInterface = "com.example.DialogService", targetNamespace = "http://services.example.com/DialogService", serviceName = "DialogService", portName = "DialogService")
public class DialogServiceImpl {
#EJB
Service service;
public DialogResponseType get(DialogRequestType dialogMessage) throws DialogMessageFault {
try {
DialogMsg response = service.process(dialogMessage);
return response.respond();
} catch (Exception e) {
DialogMessageFault dialogMessageFault = new DialogMessageFault(SERVICE_ERROR, e);
throw dialogMessageFault;
}
}
}
The exception:
#javax.xml.ws.WebFault(name = "messageFault", targetNamespace = "http://services.example.com/DialogService")
public class DialogMessageFault extends Exception
Stacktrace:
AxisEngine E
org.apache.axis2.engine.AxisEngine receive java.lang.IllegalStateException: WSEJBEndpointManager.ejbPostInvoke already called.
org.apache.axis2.AxisFault: java.lang.IllegalStateException: WSEJBEndpointManager.ejbPostInvoke already called.
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.jaxws.server.JAXWSMessageReceiver.receive(JAXWSMessageReceiver.java:242)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:212)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
at com.ibm.ws.websvcs.transport.http.WASAxis2Servlet.doPost(WASAxis2Servlet.java:1583)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1235)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1071)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3837)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:981)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:459)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:526)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:312)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:283)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1864)
Caused by: javax.xml.ws.WebServiceException: java.lang.IllegalStateException: WSEJBEndpointManager.ejbPostInvoke already called.
at org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:175)
at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:70)
at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:128)
at org.apache.axis2.jaxws.server.EndpointController.responseReady(EndpointController.java:710)
at org.apache.axis2.jaxws.server.EndpointController.handleResponse(EndpointController.java:439)
at org.apache.axis2.jaxws.server.EndpointController.invoke(EndpointController.java:130)
at org.apache.axis2.jaxws.server.JAXWSMessageReceiver.receive(JAXWSMessageReceiver.java:161)
... 29 more
Caused by: java.lang.IllegalStateException: WSEJBEndpointManager.ejbPostInvoke already called.
at com.ibm.ejs.container.WSEJBWrapper.ejbPostInvoke(WSEJBWrapper.java:246)
at com.ibm.ws.websvcs.server.WSEJBInvocationListener.responseReady(WSEJBInvocationListener.java:416)
at com.ibm.ws.websvcs.server.WSEJBInvocationListener.notify(WSEJBInvocationListener.java:102)
at org.apache.axis2.jaxws.server.EndpointController.responseReady(EndpointController.java:707)
... 32 more

Apparently the application used an extra setting to prevent this exact exception in an earlier version of Websphere. Removal of this setting fixed the problem:
com.ibm.websphere.websvcs.EJBPostInvokeCallOnException
See: IBM PM59231

Related

Websphere V9.0.5.10 -WebServiceContext is null

WebServiceContext object is null when Soap Services are deployed on WebSphere V9.0.5.10 .
I am trying to migrate the SOAP Web Services from WebSphere V8.5.5.20 to V9.0.5.10 and
one of Web service is using WebServiceContext object to get the message context.
The WebServiceContext and MessageContext objects are created as follows -
#Resource
WebServiceContext ctx;
public void getHeaderData(){
MessageContext msgctx = ctx.getMessageContext(); /// ctx is NULL
}
However, this code works on WebSphere V8.5.5.20 but throws NULLPointerException on V9.0.5.10 as WebServiceContext object is null.
I tried to inject the WebService Context as -
WebServiceContext ctx;
#Resource
public WebServiceContext setContext(WebServiceContext ctx){
this.ctx = ctx;
}
but this code did not work.
The Exception Stack trace is -
java.lang.NullPointerException : null
at com.app.soap.service.AppSoapWebService.getHeaderData(AppSoapWebService.java:1530)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90) ~[?:1.8.0]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) ~[?:1.8.0]
at java.lang.reflect.Method.invoke(Method.java:508) ~[?:1.8.0]
at org.apache.axis2.jaxws.server.dispatcher.JavaDispatcher.invokeTargetOperation(JavaDispatcher.java:120) [org.apache.axis2.jar:?]
at org.apache.axis2.jaxws.server.dispatcher.JabaBeanDispatcher.invoke(JabaBeanDispatcher.java:118)
at org.apache.axis2.jaxws.server.dispatcher.EndpointController.invoke(EndpointController.java:111)
at org.apache.axis2.jaxws.server.JAXWSMessageReceiver.receive(JAXWSMessageReceiver.java:161)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:212)
at org.apache.axis2.transport.http.HttpTransportUtil.processHTTPPostRequest(HttpTransportUtil.java:172)
at com.ibm.ws.websvcs.transport.http.WASAxis2Servlet.doPost(WASAxis2Servlet.java:1633)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1235)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilter(WebAppFilterManager.java:1134)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:82)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:966)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:382)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:532)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:318)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:289)
at com.ibm.ws.ssl.channel.impl.SSLConnectionLink.determineNextChannel(SSLConnectionLink.java:1187)
at com.ibm.ws.ssl.channel.impl.SSLConnectionLink$MyReadCompletedCallback.complete(SSLConnectionLink.java:694)
at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompltedCallback.complete(SSLReadServiceContext.java:1833)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1909)
Is there any fix available for this error ?
Thank you in advance.
You can open this link https://github.com/quarkiverse/quarkus-cxf/issues/92 in the answer section of neXus1987 (commented on Jan 11, 2021). Hope it can help your problem

EJB 2.1 throwing wrapped remote exception in cluster

We're in the processing of moving a Weblogic 10.3.6 app to Weblogic 12.2.1.2. We have many EJB 2.1 beans that form part of the app. We've hit a strange problem with some of these beans.
When we have 1 ejb call another and this bean throws a checked exception (e.g. RuleException extends Exception) this is thrown as a RemoteException (RemoteEJBInvokeException). This only occurs if the app is running in a cluster. If I deploy against a standalone jvm it works fine.
The general EJB pattern is a Facade pattern. In the Facade bean we use a standard JNDI lookup to locate the Home and then run the create method to return the business interface/impl
InitialContext ctx = new InitialContext();
ReportManagementHome reportManagementHome = (ReportManagementHome) ctx.lookup("ReportManagement");
ReportManagement reportManagement = reportManagementHome.create();
ReportManagement bean runs the business logic and throws a RuleException.
This is an example method in the facade that calls the 2nd bean:
public String doTest() {
String s = null;
try
{
s = reportManagement.doValidate();
}
catch ( RuleException re )
{
rollBack();
} catch (RemoteException e)
{
e.printStackTrace();
}
return s;
}
Here is the doValidate() method in the 2nd bean:
public String doValidate( )
throws RuleException, CustomException
{
int test = 1;
if (test == 1)
{
throw new RuleException();
}
return "Hello";
}
Although the RuleException is correctly reached and thrown, by the time the facade catches it it is a RemoteException.
This is an example list of the ejbs/interfaces:
ReportManagement
ReportManagementBean
ReportManagementFacade
ReportManagementFacadeBean
ReportManagementFacadeHome
ReportManagementFacadeLocal
ReportManagementFacadeLocalHome
ReportManagementHome
ReportManagementLocal
ReportManagementLocalHome
Here is the ejb-jar.xml
<?xml version='1.0' encoding='UTF-8'?>
<ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
version="2.1">
<enterprise-beans>
<session>
<display-name>ReportManagementFacade</display-name>
<ejb-name>ReportManagementFacade</ejb-name>
<home>com.ejb.ReportManagementFacadeHome</home>
<remote>com.ejb.ReportManagementFacade</remote>
<local-home>com.ejb.ReportManagementFacadeLocalHome</local-home>
<local>com.ejb.ReportManagementFacadeLocal</local>
<ejb-class>com.ejb.ReportManagementFacadeBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
<session>
<display-name>ReportManagement</display-name>
<ejb-name>ReportManagement</ejb-name>
<home>com.ejb.ReportManagementHome</home>
<remote>com.ejb.ReportManagement</remote>
<local-home>com.ejb.ReportManagementLocalHome</local-home>
<local>com.ejb.ReportManagementLocal</local>
<ejb-class>com.ejb.ReportManagementBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>ReportManagementFacade</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>ReportManagement</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
Here is the weblogic-ejb-jar.xml
<?xml version='1.0' encoding='UTF-8'?>
<weblogic-ejb-jar xmlns="http://xmlns.oracle.com/weblogic/weblogic-ejb-jar"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-ejb-jar http://xmlns.oracle.com/weblogic/weblogic-ejb-jar/1.2/weblogic-ejb-jar.xsd">
<weblogic-enterprise-bean>
<ejb-name>ReportManagementFacade</ejb-name>
<jndi-name>Destin8.ejb.reportmanagement.ReportManagementFacade</jndi-name>
<local-jndi-name>Destin8.ejb.reportmanagement.ReportManagementFacadeLocal</local-jndi-name>
<enable-call-by-reference>true</enable-call-by-reference>
</weblogic-enterprise-bean>
<weblogic-enterprise-bean>
<ejb-name>ReportManagement</ejb-name>
<jndi-name>Destin8.ejb.reportmanagement.ReportManagement</jndi-name>
<local-jndi-name>Destin8.ejb.reportmanagement.ReportManagementLocal</local-jndi-name>
<enable-call-by-reference>true</enable-call-by-reference>
</weblogic-enterprise-bean>
<weblogic-compatibility>
<entity-always-uses-transaction>true</entity-always-uses-transaction>
</weblogic-compatibility>
</weblogic-ejb-jar>
And here is the StackTrace:
weblogic.rmi.RemoteEJBInvokeException: null; nested exception is:
com.exception.RuleException
at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:27)
at com.ejb.ReportManagement_tq6u66_EOImpl.doLUMValidate(Unknown Source)
at com.ejb.ReportManagementFacadeBean.doLUM(ReportManagementFacadeBean.java:82)
at com.ejb.ReportManagementFacade_sidvua_EOImpl.__WL_invoke(Unknown Source)
at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invokeInternal(SessionRemoteMethodInvoker.java:54)
at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:21)
at com.ejb.ReportManagementFacade_sidvua_EOImpl.doLUM(Unknown Source)
at com.ajf.Page1ManagedBean.refreshDate(Page1ManagedBean.java:105)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:181)
at com.sun.el.parser.AstValue.invoke(AstValue.java:289)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:304)
at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)
at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)
at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at javax.faces.component.UICommand.broadcast(UICommand.java:315)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:650)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:286)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:260)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:137)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:350)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:32)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3683)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3649)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:326)
at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:197)
at weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203)
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71)
at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2433)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2281)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2259)
at weblogic.servlet.internal.ServletRequestImpl.runInternal(ServletRequestImpl.java:1691)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1651)
at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:270)
at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:348)
at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:333)
at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:54)
at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:640)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:406)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:346)
Caused by: com.exception.RuleException
at com.ejb.ReportManagementBean.doLUMValidate(ReportManagementBean.java:92)
at com.ejb.ReportManagement_tq6u66_EOImpl.__WL_invoke(Unknown Source)
at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invokeInternal(SessionRemoteMethodInvoker.java:54)
at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:21)
... 55 more
Any guidance in this matter will be much appreciated.
This was fixed in a patch by Oracle on my request. The link for that patch is here Patch Link. You will need an Oracle Support log on to be able to access it.
This:
<enable-call-by-reference>true</enable-call-by-reference>
causes your remote calls in the same JVM to have local call semantics, including exception handling.

accessing ssl web service from the websphere 8.5.5.2

We have an java web application and we need to access a web service which is a https web service. So i add the ssl certificate to Websphere;
SSL certificate and key management > Key stores and certificates > NodeDefaultKeyStore > Signer Certificates
SSL certificate and key management > Key stores and certificates > NodeDefaultTrustStore > Signer Certificates
When application trying to access the web service an exception was thrown like this:
tr.biznet.msign.service.signature.SignatureException: Mobil signature certificate query is failed. Unknown error.
at tr.biznet.msign.service.signature.SignatureService.queryMobileSignCertificateRef(SignatureService.java:440)
at tr.biznet.msign.controller.signature.BsspController.queryMobileSignCertificateRef(BsspController.java:227)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:434)
at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:372)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:45)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:806)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:736)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:360)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1230)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:97)
at tr.biznet.msign.controller.NoCacheFilter.doFilter(NoCacheFilter.java:68)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:78)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:960)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1064)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3837)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:981)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:459)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:526)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:312)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1864)
Caused by: javax.xml.ws.WebServiceException: The following WSDL exception occurred: WSDLException: faultCode=WSDL4JWrapper : : javax.wsdl.WSDLException: WSDLException: faultCode=WSDL4JWrapper : : java.io.IOException: Server returned HTTP response code: 500 for URL: WEBSERVICELINK
at org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:173)
at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:70)
at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.setupWsdlDefinition(ServiceDescriptionImpl.java:1202)
at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.(ServiceDescriptionImpl.java:249)
at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.(ServiceDescriptionImpl.java:172)
at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescription(DescriptionFactoryImpl.java:143)
at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescription(DescriptionFactoryImpl.java:79)
at org.apache.axis2.jaxws.description.DescriptionFactory.createServiceDescription(DescriptionFactory.java:78)
at org.apache.axis2.jaxws.spi.ServiceDelegate.(ServiceDelegate.java:218)
at org.apache.axis2.jaxws.spi.Provider.createServiceDelegate(Provider.java:83)
at org.apache.axis2.jaxws.spi.Provider.createServiceDelegate(Provider.java:79)
at javax.xml.ws.Service.(Service.java:57)
at com.turkcelltech.mobilesignature.validation.soap.MSSProfileQueryService.(MSSProfileQueryService.java:50)
at tr.biznet.msign.service.signature.SignatureService.queryMobileSignCertificateRef(SignatureService.java:411)
... 50 more
Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=WSDL4JWrapper : : javax.wsdl.WSDLException: WSDLException: faultCode=WSDL4JWrapper : : java.io.IOException: Server returned HTTP response code: 500 for URL: WEBSERVICELINK
at org.apache.axis2.jaxws.util.WSDL4JWrapper.commonPartsURLConstructor(WSDL4JWrapper.java:234)
at org.apache.axis2.jaxws.util.WSDL4JWrapper.(WSDL4JWrapper.java:156)
at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.setupWsdlDefinition(ServiceDescriptionImpl.java:1182)
... 61 more
Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=WSDL4JWrapper : : java.io.IOException: Server returned HTTP response code: 500 for URL: WEBSERVICELINK
at org.apache.axis2.jaxws.util.WSDL4JWrapper.commonPartsURLConstructor(WSDL4JWrapper.java:203)
... 63 more
Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: WEBSERVICELINK
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1479)
at com.ibm.net.ssl.www2.protocol.https.b.getInputStream(b.java:63)
at org.apache.axis2.jaxws.util.WSDL4JWrapper$14.run(WSDL4JWrapper.java:974)
at org.apache.axis2.java.security.AccessController.doPrivileged(AccessController.java:132)
at org.apache.axis2.jaxws.util.WSDL4JWrapper.getInputStream(WSDL4JWrapper.java:971)
at org.apache.axis2.jaxws.util.WSDL4JWrapper.commonPartsURLConstructor(WSDL4JWrapper.java:189)
... 63 more
I masked the private web service address (WEBSERVICELINK)
On the other hand I tested the application with weblogic and tomcat. I can access the secure web service.
So i need some help about the websphere. Is there any configuration for this?
Problem
IBM Was use own axis framework for web service client. Problem is when you use third part library for web service client, (axis2, jax-ws) client code is generated by third part library. There can be a discrepancy between generated code and was ws library.
Solution
Use local classloader first for your application. (WAS administration console)
Enterprise Applications > "your_app" > Manage Modules > "module_name" > Custom properties
add: com.ibm.websphere.webservices.DisableIBMJAXWSEngine = true
Enterprise Applications > "your_app" > Manage Modules > "module_name"
select: "local classloader first (parent last)"
Enterprise Applications > "your_app" > Class loader
tick: Override class reloading settings for Web and EJB modules
tick: Classes loaded with local class loader first (parent last)
tick: Class loader for each WAR file in application

JSON JAX-RS channel: Failed to find resource /HtmlDefaultRepresentation/defaultHtmlEntry.jsp

I have JAX-RS JSON channel:
#Path("/data")
public class DataChannel {
#GET
#Produces(MediaType.APPLICATION_JSON)
public Response getGridData(#HeaderParam("Range") String rangeHeader) {
The problem is that (usually) on first call I got the exception from Wink's HtmlProvider, while the subsequent calls are processed correclty and the JSON is returned:
0000006f servlet E
com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0068E: An
exception was thrown by one of the service methods of the servlet
[de.datev.qmrzsv.rest.ApplicationConfig] in application [qmslmsv_ear].
Exception created : [javax.ws.rs.WebApplicationException:
com.ibm.ws.jsp.webcontainerext.JSPErrorReport: JSPG0036E: Failed to
find resource /HtmlDefaultRepresentation/defaultHtmlEntry.jsp at
org.apache.wink.server.internal.providers.entity.html.HtmlProvider.include(HtmlProvider.java:78)
at
org.apache.wink.server.internal.providers.entity.html.HtmlProvider.writeTo(HtmlProvider.java:112)
at
org.apache.wink.server.internal.providers.entity.html.HtmlProvider.writeTo(HtmlProvider.java:46)
at
org.apache.wink.server.internal.providers.entity.html.HtmlSyndEntryProvider.writeTo(HtmlSyndEntryProvider.java:81)
at
org.apache.wink.server.internal.providers.entity.html.HtmlSyndEntryProvider.writeTo(HtmlSyndEntryProvider.java:38)
at
org.apache.wink.common.internal.providers.entity.FormatedExceptionProvider.writeTo(FormatedExceptionProvider.java:108)
at
org.apache.wink.common.internal.providers.entity.FormatedExceptionProvider.writeTo(FormatedExceptionProvider.java:48)
at
org.apache.wink.server.internal.handlers.FlushResultHandler.handleResponse(FlushResultHandler.java:199)
at
org.apache.wink.server.handlers.AbstractHandler.handleResponse(AbstractHandler.java:38)
at
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:26)
at
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:22)
at
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
at
org.apache.wink.server.handlers.AbstractHandler.handleResponse(AbstractHandler.java:39)
at
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:26)
at
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:22)
at
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
at
org.apache.wink.server.handlers.AbstractHandler.handleResponse(AbstractHandler.java:39)
at
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:26)
at
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:22)
at
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
at
org.apache.wink.server.handlers.AbstractHandler.handleResponse(AbstractHandler.java:39)
at
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:26)
at
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:22)
at
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
at
org.apache.wink.server.internal.log.Responses.handleResponse(Responses.java:90)
at
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:26)
at
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:22)
at
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
at
org.apache.wink.server.handlers.AbstractHandler.handleResponse(AbstractHandler.java:39)
at
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:26)
at
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:22)
at
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
at
org.apache.wink.server.handlers.AbstractHandlersChain.run(AbstractHandlersChain.java:60)
at
org.apache.wink.server.internal.RequestProcessor.handleRequestWithoutFaultBarrier(RequestProcessor.java:232)
at
org.apache.wink.server.internal.RequestProcessor.handleRequest(RequestProcessor.java:154)
at
org.apache.wink.server.internal.servlet.RestServlet.service(RestServlet.java:124)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668) at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1225)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:775)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:457)
at
com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1032)
at
com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3761)
at
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:975)
at
com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:459)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:526)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:312)
at
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:87)
at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) at
com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1815) Caused by:
com.ibm.ws.jsp.webcontainerext.JSPErrorReport: JSPG0036E: Failed to
find resource /HtmlDefaultRepresentation/defaultHtmlEntry.jsp at
com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.findWrapper(AbstractJSPExtensionProcessor.java:447)
at
com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.getServletWrapper(AbstractJSPExtensionProcessor.java:338)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:965)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:1384)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:548)
at
org.apache.wink.server.internal.providers.entity.html.HtmlProvider.include(HtmlProvider.java:75)
... 58 more Caused by: java.io.FileNotFoundException: JSPG0036E:
Failed to find resource
/HtmlDefaultRepresentation/defaultHtmlEntry.jsp ... 64 more
The runtime environment is WebSphere server 8.5.
It looks as on the first time the wrong provider is chosen, the header explicitely states that JSON should be used as response. The HTTP headers sent from client side also implicite state that JSON is expected:
Accept text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Encoding gzip, deflate Accept-Language en,de;q=0.5
Content-Type application/json
What is causing that problem and how to avoid it?
Check the log for previous errors.
When the exception is thrown while generating response, the alternative provider (in that case - HtmlProvider) is used.
Exception can be caused by configuration problem or missing dependency.

Local EJB Bean Not Found using Indirect JNDI which was working earlier

I am using EJB 2.1 in a separate module in a multi-module Maven Application. I am using indirect JNDI (ie. using java:comp/env/ Not used it much). Also I am using EJB 2.1 for the first time. But since this is only a local simple EJB so not much problem.
The wiered bit about it is that it was working but suddenly without having changed any part relevant to it, it has stopped working now and I am getting NameNotFoundException. The things are done correctly as it was working. I am pretty sure about it.
First my code,
ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar id="ejb-jar_ID" version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
<display-name>sr-g0a-ejb</display-name>
<enterprise-beans>
<session id="CreateAclService">
<ejb-name>CreateAclService</ejb-name>
<local-home>com.sre.g0a.CreateAclServiceLocalHome</local-home>
<local>com.sre.g0a.CreateAclServiceLocal</local>
<ejb-class>com.sre.g0a.CreateAclServiceBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<security-identity>
<description></description>
<run-as>
<description></description>
<role-name>ACL_TECH_USER</role-name>
</run-as>
</security-identity>
</session>
</enterprise-beans>
<assembly-descriptor>
<security-role>
<description>
ACL_TECH_USER</description>
<role-name>ACL_TECH_USER</role-name>
</security-role>
<method-permission>
<role-name>ACL_TECH_USER</role-name>
<method>
<ejb-name>CreateAclService</ejb-name>
<method-intf>Local</method-intf>
<method-name>createAclRole</method-name>
<method-params>
<method-param>com.sre.edms.bsc.types.EDMSAcl</method-param>
<method-param>com.sre.edms.bsc.ids.EDMSDocumentID</method-param>
</method-params>
</method>
</method-permission>
<container-transaction>
<method>
<ejb-name>CreateAclService</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>NotSupported</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
The Snippet from the web module (on the server) where from I am accessing the EJB method.
Hashtable<String, String> hashTable = new Hashtable<String, String>();
hashTable.put(Context.INITIAL_CONTEXT_FACTORY,
"com.ibm.websphere.naming.WsnInitialContextFactory");
//hashTable.put(Context.PROVIDER_URL, "corbaloc:iiop:localhost:9080");
Context initialContext;
try {
initialContext = new InitialContext(hashTable);
CreateAclServiceLocalHome home = (CreateAclServiceLocalHome) initialContext
.lookup("java:comp/env/ejb/CreateAclService");
//.lookup("ejblocal:ejb/CreateAclServiceLocal");
CreateAclServiceLocal service = home.create();
eDMSAcl = service.createAclRole(eDMSAcl, edmsDocumentID);
} catch (NamingException ne) {
LOGGER.log(Level.WARNING, "NamingException Occured", ne);
throw new GEMException("Failed to create ACL. NamingException Occured");
} catch (CreateException ce) {
LOGGER.log(Level.WARNING, "CreateException Occured", ce);
throw new GEMException("Failed to create ACL");
} catch (BscServiceException be) {
LOGGER.log(Level.WARNING, "BscServiceException Occured", be);
throw new GEMException("Failed to create ACL");
}
Snippet from my web.xml which shows the ejb-ref tag
<ejb-local-ref id="EJBLocalRef_1343037878938">
<description>
</description>
<ejb-ref-name>ejb/CreateAclService</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.sre.g0a.CreateAclServiceLocalHome</local-home>
<local>com.sre.g0a.CreateAclServiceLocal</local>
<ejb-link>sr-g0a-ejb.jar#CreateAclService</ejb-link>
</ejb-local-ref>
Now the stacktrace of my Exception (NamingNotFoundException)
[7/24/12 12:34:26:629 IST] 00001720 GEMEBesUtil W NamingException Occured
com.ibm.websphere.naming.CannotInstantiateObjectException: A NameNotFoundException occurred on an indirect lookup on the name java:comp/env/ejb/CreateAclService. The name java:comp/env/ejb/CreateAclService maps to a JNDI name in deployment descriptor bindings for the application performing the JNDI lookup. Make sure that the JNDI name mapping in the deployment descriptor binding is correct. If the JNDI name mapping is correct, make sure the target resource can be resolved with the specified name relative to the default initial context. [Root exception is javax.naming.NameNotFoundException: Name ejb not found in context "ejblocal:".]
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:1081)
at com.ibm.ws.naming.urlbase.UrlContextHelper.processBoundObjectForLookup(UrlContextHelper.java:181)
at com.ibm.ws.naming.java.javaURLContextRoot.processBoundObjectForLookup(javaURLContextRoot.java:850)
at com.ibm.ws.naming.urlbase.UrlContextImpl.lookupExt(UrlContextImpl.java:1454)
at com.ibm.ws.naming.java.javaURLContextImpl.lookupExt(javaURLContextImpl.java:477)
at com.ibm.ws.naming.java.javaURLContextRoot.lookupExt(javaURLContextRoot.java:485)
at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:370)
at org.apache.aries.jndi.DelegateContext.lookup(DelegateContext.java:161)
at javax.naming.InitialContext.lookup(InitialContext.java:436)
at com.sre.g0a.server.util.GEMEBesUtil.createEDMSAcl(GEMEBesUtil.java:250)
at com.sre.g0a.server.util.GEMEBesUtil.formSrGemDocForCreation(GEMEBesUtil.java:180)
at com.sre.g0a.server.services.ImportComponentServiceImpl.createDocument(ImportComponentServiceImpl.java:65)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:551)
at com.sre.g0a.server.integration.GWTSpringController.processCall(GWTSpringController.java:57)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1188)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:763)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:454)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1020)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3703)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:962)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1659)
Caused by: javax.naming.NameNotFoundException: Name ejb not found in context "ejblocal:".
at com.ibm.ws.naming.ipbase.NameSpace.getParentCtxInternal(NameSpace.java:1969)
at com.ibm.ws.naming.ipbase.NameSpace.retrieveBinding(NameSpace.java:1376)
at com.ibm.ws.naming.ipbase.NameSpace.lookupInternal(NameSpace.java:1219)
at com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpace.java:1141)
at com.ibm.ws.naming.urlbase.UrlContextImpl.lookupExt(UrlContextImpl.java:1436)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1425)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1475)
at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory$1.run(IndirectJndiLookupObjectFactory.java:373)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory.getObjectInstanceExt(IndirectJndiLookupObjectFactory.java:223)
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:990)
... 44 more
The problem was the binding.xmi file was not getting included. Included that and it worked.

Categories