JAXWS in Websphere - websphere

I wrote a simple Webservice as below in Netbeans.
#WebService()
public class CRSEncryptString {
/**
* Web service operation
*/
#WebMethod(operationName = "encryptString")
public String encryptString(#WebParam(name = "plainText")
String plainText) {
System.out.println("************* ");
String cipher = plainText;
System.out.println("***************************");
return cipher;
}
}
Added jars with are related to JAX-WS like:
activation.jar,FastInfoset.jar,http.jar,jaxb jars, jaxws jars, saaj jars, etc
Its working fine in Tomcat and Weblogic.
But, while running in Websphere 6.1 its giving error.
Following is serverlog:
[2/17/12 17:22:53:421 IST] 0000003c AdminHelper A ADMN1009I: An attempt is made to start the JAXWS-Test1_war application.
[2/17/12 17:22:54:390 IST] 0000003c ApplicationMg A WSVR0200I: Starting application: JAXWS-Test1_war
[2/17/12 17:22:54:452 IST] 0000003c ApplicationMg A WSVR0204I: Application: JAXWS-Test1_war Application build level: Unknown
[2/17/12 17:22:54:624 IST] 0000003c WebGroup A SRVE0169I: Loading Web Module: JAXWS-Test1.war.
[2/17/12 17:22:54:936 IST] 0000003c http I WSSERVLET12: JAX-WS context listener initializing
[2/17/12 17:22:55:264 IST] 0000003c http E WSSERVLET11: failed to parse runtime descriptor: java.lang.LinkageError: You are loading old SAAJ from jar:file:/E:/Program%20Files/Websphere6_1/lib/j2ee.jar!/javax/xml/soap/MessageFactory.class
java.lang.LinkageError: You are loading old SAAJ from jar:file:/E:/Program%20Files/Websphere6_1/lib/j2ee.jar!/javax/xml/soap/MessageFactory.class
at com.sun.xml.ws.api.SOAPVersion.<init>(SOAPVersion.java:184)
at com.sun.xml.ws.api.SOAPVersion.<clinit>(SOAPVersion.java:83)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)
at com.sun.xml.ws.api.BindingID.<clinit>(BindingID.java:318)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.createBinding(DeploymentDescriptorParser.java:302)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:243)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:147)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:108)
at com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:605)
at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:265)
at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:271)
at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:88)
at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:157)
at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:653)
at com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:606)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:333)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:549)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1295)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1129)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:567)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:814)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:948)
at com.ibm.ws.runtime.component.ApplicationMgrImpl$1.run(ApplicationMgrImpl.java:1478)
at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:3731)
at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:3813)
at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:245)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1483)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:62)
at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:265)
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1089)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:971)
at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:231)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:238)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:833)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802)
at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1055)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:948)
at com.ibm.ws.management.application.AppManagementImpl._startApplication(AppManagementImpl.java:1285)
at com.ibm.ws.management.application.AppManagementImpl.startApplication(AppManagementImpl.java:1184)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:62)
at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:265)
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1089)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:971)
at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:231)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:238)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:833)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802)
at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1055)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:948)
at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:139)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at com.ibm.ws.management.connector.soap.SOAPConnector.invoke(SOAPConnector.java:338)
at com.ibm.ws.management.connector.soap.SOAPConnector.service(SOAPConnector.java:206)
at com.ibm.ws.management.connector.soap.SOAPConnection.handleRequest(SOAPConnection.java:55)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:680)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:484)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498)
Caused by: java.lang.NoSuchMethodError: javax/xml/soap/MessageFactory.newInstance(Ljava/lang/String;)Ljavax/xml/soap/MessageFactory;
at com.sun.xml.ws.api.SOAPVersion.<init>(SOAPVersion.java:178)
... 78 more
[2/17/12 17:22:55:467 IST] 0000003c WebApp E WSSERVLET11: failed to parse runtime descriptor: java.lang.LinkageError: You are loading old SAAJ from jar:file:/E:/Program%20Files/Websphere6_1/lib/j2ee.jar!/javax/xml/soap/MessageFactory.class
[2/17/12 17:22:55:514 IST] 0000003c ServletWrappe I SRVE0242I: [JAXWS-Test1_war] [/JAXWS-Test1] [CRSEncryptString]: Initialization successful.
[2/17/12 17:22:55:530 IST] 0000003c VirtualHost I SRVE0250I: Web Module <null> has been bound to default_host[*:9080,*:80,*:9443,*:5060,*:5061,*:443].
[2/17/12 17:22:55:561 IST] 0000003c ApplicationMg A WSVR0221I: Application started: JAXWS-Test1_war
[2/17/12 17:23:05:714 IST] 00000048 ServletWrappe I SRVE0242I: [JAXWS-Test1_war] [/JAXWS-Test1] [/index.jsp]: Initialization successful.
Please suggest me further.
Thanks in advance..........

I solved the problem by changing the classloader policy of the Websphere through admin console, i.e, from Parent_first to Parent_last policy....

In general, I think you're going to have difficulty with JAX-WS under WebSphere if you're not using WebSphere's own implementation. So you'll want to not deploy any extra jars but instead use the ones that are already in WebSphere 7.

If you are using RAD, you should add the Websphere Application Server runtime to your Project Build Path, instead of adding external jars.

It is risky to change the classloader order in Websphere since you are loading custom implementations which may not be supported by Websphere and you may get runtime errors like LinkageErrors and ClassCastException etc. since different implementations coexists in the same Java process. The best way is to use the IBM supported Jax-WS programming model.
Alternatively you can use a custom webservice engine by disabling IBM´s
-Dcom.ibm.websphere.webservices.DisableIBMJAXWSEngine=true

Related

What does error SRVE0315E indicate in ibm websphere liberty server?

I have WebSphere application server liberty - 17.0.0.2 installed. When i try to hit website URL after turning up crsServer, The front page displays "An error has occurred. Please contact your system administrator" message.
Initially everything was working fine but suddenly the storeFront stopped showing and there is below error printed in console.
SRVE0315E: An exception occurred: java.lang.Throwable: javax.servlet.ServletException: java.lang.NullPointerException
Here are the logs
[1/16/23 19:50:48:986 IST] 00000020 com.ibm.commerce.foundation.logging.ExtendedInfo I CWXFR9010I: Extended information : [URL=http://appsrv-05.kotsovolos.gr:8080/webapp/remote/preview/] [parameters=null] [userId=-1002]
[1/16/23 19:50:49:018 IST] 00000020 com.ibm.ws.logging.internal.impl.IncidentImpl I FFDC1015I: An FFDC Incident has been created: "javax.servlet.ServletException: java.lang.NullPointerException com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter 144" at ffdc_23.01.16_19.50.48.0.log
[1/16/23 19:50:49:049 IST] 00000020 com.ibm.ws.logging.internal.impl.IncidentImpl I FFDC1015I: An FFDC Incident has been created: "javax.servlet.ServletException: java.lang.NullPointerException com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter 82" at ffdc_23.01.16_19.50.49.0.log
[1/16/23 19:50:49:064 IST] 00000020 com.ibm.ws.logging.internal.impl.IncidentImpl I FFDC1015I: An FFDC Incident has been created: "javax.servlet.ServletException: java.lang.NullPointerException com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters 1064" at ffdc_23.01.16_19.50.49.1.log
[1/16/23 19:50:49:064 IST] 00000020 com.ibm.ws.webcontainer.webapp E SRVE0315E: An exception occurred: java.lang.Throwable: javax.servlet.ServletException: java.lang.NullPointerException
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:5027)
at com.ibm.ws.webcontainer31.osgi.webapp.WebApp31.handleRequest(WebApp31.java:528)
at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.handleRequest(DynamicVirtualHost.java:315)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1025)
at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:280)
at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:967)
at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.wrapHandlerAndExecute(HttpDispatcherLink.java:359)
at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.ready(HttpDispatcherLink.java:318)
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:471)
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleNewRequest(HttpInboundLink.java:405)
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.processRequest(HttpInboundLink.java:285)
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.ready(HttpInboundLink.java:256)
at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:174)
at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:83)
at com.ibm.ws.tcpchannel.internal.WorkQueueManager.requestComplete(WorkQueueManager.java:504)
at com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQueueManager.java:574)
at com.ibm.ws.tcpchannel.internal.WorkQueueManager.workerRun(WorkQueueManager.java:929)
at com.ibm.ws.tcpchannel.internal.WorkQueueManager$Worker.run(WorkQueueManager.java:1018)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.lang.Thread.run(Thread.java:785)
Caused by: javax.servlet.ServletException: java.lang.NullPointerException
at com.ibm.commerce.store.servlet.StoreRuntimeServletFilter.doFilter(StoreRuntimeServletFilter.java:529)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:207)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
at com.ibm.commerce.store.preview.servlet.PreviewFilter.doFilter(PreviewFilter.java:97)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:207)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
at com.ibm.commerce.cf.servlet.ExecutionContextFilter.doFilter(ExecutionContextFilter.java:311)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:207)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:1021)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1143)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:4983)
... 20 more
Caused by: java.lang.NullPointerException
at com.ibm.commerce.store.servlet.StoreRuntimeServletFilter.doFilterAction(StoreRuntimeServletFilter.java:636)
at com.ibm.commerce.store.servlet.StoreRuntimeServletFilter$1.run(StoreRuntimeServletFilter.java:410)
at com.ibm.commerce.store.servlet.StoreRuntimeServletFilter.doFilter(StoreRuntimeServletFilter.java:433)
... 31 more
I am trying to solve this error but i am not able to find root cause. even in the official documentations i am not able to find information on SRVE0315E. can anyone guide me what can be issue??
It means that an exception was thrown when trying to call a servlet. In this case the exception is a NullPointerException thrown from a Servlet Filter. The exception stack in your question indicates exactly where this occurred:
Caused by: java.lang.NullPointerException
at com.ibm.commerce.store.servlet.StoreRuntimeServletFilter.doFilterAction(StoreRuntimeServletFilter.java:636)
at com.ibm.commerce.store.servlet.StoreRuntimeServletFilter$1.run(StoreRuntimeServletFilter.java:410)
at com.ibm.commerce.store.servlet.StoreRuntimeServletFilter.doFilter(StoreRuntimeServletFilter.java:433)
The com.ibm.commerce.store.servlet.StoreRuntimeServletFilter class is not a Liberty class and the source is not in the question so I cannot comment on what caused it to throw a NullPointerException, but you would need to either look to the source of that class, or contact the owner of it for more information on why this occurred.

Spring boot remote Websphere EJB call

I have Websphere thin client jars in my classpath and a sample spring boot application. I am unable to make remote ejb call because it is throwing corab exception. I am using oracle jdk1.8 to make websphere ejb call
09:50:28.505 com.ibm.rmi.corba.PluginRegistry instantiatePlugins:119 P=428317:O=0:CT ORBRas[default] java.lang.ClassNotFoundException: com.ibm.ws.wlm.client.WLMClient (no security manager: RMI class loader disabled)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:396)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:186)
at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:637)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:219)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:152)
at com.sun.corba.se.impl.util.JDKBridge.loadClassM(JDKBridge.java:189)
at com.sun.corba.se.impl.util.JDKBridge.loadClass(JDKBridge.java:86)
at com.sun.corba.se.impl.javax.rmi.CORBA.Util.loadClass(Util.java:602)
at javax.rmi.CORBA.Util.loadClass(Util.java:265)
at com.ibm.rmi.corba.PluginRegistry.instantiatePlugins(PluginRegistry.java:116)
at com.ibm.rmi.corba.ORB.instantiatePlugins(ORB.java:1518)
at com.ibm.rmi.corba.ORB.orbParameters(ORB.java:1423)
at com.ibm.rmi.corba.ORB.set_parameters(ORB.java:1349)
at com.ibm.CORBA.iiop.ORB.set_parameters(ORB.java:1697)
at org.omg.CORBA.ORB.init(ORB.java:353)
at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:92)
at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:169)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:64)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:44)
at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:85)
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.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:505)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:466)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:128)
at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:765)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:164)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:179)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:155)
at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:87)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:152)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:179)
at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:104)
at org.springframework.jndi.JndiLocatorDelegate.lookup(JndiLoc
The above log shows the corba errors generated by ibm jar files.
java.lang.ClassNotFoundException: com.ibm.ws.wlm.client.WLMClient
Looks like this is the class you're missing.
You'll need to add the com.ibm.ws.wlm.jar to your class path.

ADMU0111E: Program exiting with error: java.lang.NullPointerException

when i start the web sphere server getting below error
[4/10/17 20:56:16:804 IST] 00000001 WsServerLaunc E ADMU3007E: Exception java.lang.NullPointerException
at com.ibm.ws.management.launcher.LaunchCommand.processDefaultJvmOptions(LaunchCommand.java:1252)
at com.ibm.ws.management.launcher.LaunchCommand.setParamsFromJavaProcessDef(LaunchCommand.java:1206)
at com.ibm.ws.management.launcher.LaunchCommand.setParamsFromProcessDef(LaunchCommand.java:624)
at com.ibm.ws.management.launcher.LaunchCommand.init(LaunchCommand.java:368)
at com.ibm.ws.management.launcher.LaunchCommand.<init>(LaunchCommand.java:268)
at com.ibm.ws.management.tools.WsServerLauncher.initializeRepositoryAndLauncher(WsServerLauncher.java:424)
at com.ibm.ws.management.tools.WsServerLauncher.runTool(WsServerLauncher.java:279)
at com.ibm.ws.management.tools.AdminTool.executeUtility(AdminTool.java:269)
at com.ibm.ws.management.tools.WsServerController.executeUtilityOnWindows(WsServerController.java:136)
at com.ibm.ws.management.tools.WsServerLauncher.main(WsServerLauncher.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:613)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:277)
[4/10/17 20:56:16:804 IST] 00000001 AdminTool E ADMU0111E: Program exiting with error: java.lang.NullPointerException
at com.ibm.ws.management.launcher.LaunchCommand.processDefaultJvmOptions(LaunchCommand.java:1252)
at com.ibm.ws.management.launcher.LaunchCommand.setParamsFromJavaProcessDef(LaunchCommand.java:1206)
at com.ibm.ws.management.launcher.LaunchCommand.setParamsFromProcessDef(LaunchCommand.java:624)
at com.ibm.ws.management.launcher.LaunchCommand.init(LaunchCommand.java:368)
at com.ibm.ws.management.launcher.LaunchCommand.<init>(LaunchCommand.java:268)
at com.ibm.ws.management.tools.WsServerLauncher.initializeRepositoryAndLauncher(WsServerLauncher.java:424)
at com.ibm.ws.management.tools.WsServerLauncher.runTool(WsServerLauncher.java:279)
at com.ibm.ws.management.tools.AdminTool.executeUtility(AdminTool.java:269)
at com.ibm.ws.management.tools.WsServerController.executeUtilityOnWindows(WsServerController.java:136)
at com.ibm.ws.management.tools.WsServerLauncher.main(WsServerLauncher.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:613)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:277)
[4/10/17 20:56:16:804 IST] 00000001 AdminTool A ADMU0111E: Program exiting with error: java.lang.NullPointerException
at com.ibm.ws.management.launcher.LaunchCommand.processDefaultJvmOptions(LaunchCommand.java:1252)
at com.ibm.ws.management.launcher.LaunchCommand.setParamsFromJavaProcessDef(LaunchCommand.java:1206)
at com.ibm.ws.management.launcher.LaunchCommand.setParamsFromProcessDef(LaunchCommand.java:624)
at com.ibm.ws.management.launcher.LaunchCommand.init(LaunchCommand.java:368)
at com.ibm.ws.management.launcher.LaunchCommand.<init>(LaunchCommand.java:268)
at com.ibm.ws.management.tools.WsServerLauncher.initializeRepositoryAndLauncher(WsServerLauncher.java:424)
at com.ibm.ws.management.tools.WsServerLauncher.runTool(WsServerLauncher.java:279)
at com.ibm.ws.management.tools.AdminTool.executeUtility(AdminTool.java:269)
at com.ibm.ws.management.tools.WsServerController.executeUtilityOnWindows(WsServerController.java:136)
at com.ibm.ws.management.tools.WsServerLauncher.main(WsServerLauncher.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:613)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:277)
[4/10/17 20:56:16:820 IST] 00000001 AdminTool A ADMU1211I: To obtain a full trace of the failure, use the -trace option.
[4/10/17 20:56:16:820 IST] 00000001 AdminTool A ADMU0211I: Error details may be seen in the file: C:\Apps\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\server1\startServer.log
How to resolve this issue ?
Your question may already be answered here: Websphere won't start. Also, if you see warning or error messages in the C:\Apps\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\server1\startServer.log and native_stdout(err).log files, please post them as they may better inform the cause of the exception.
Posting the same answer from the other question related for your reference:
Check if the serverindex.xml is having 0 size. If not, check if the serverindex.xml file is corrupted by opening it using Notepad ++ or similar tool. The file you need to refer is: \config\cells\Node01Cell\nodes\Node01.
If there are no backups, it is possible to use one of the temp file from \wstemp\anonymous<>\workspace\cells\Node01Cell\nodes\Node01
Hope it helps.

CannotGetJdbcConnectionException and StaleConnectionException problems

I have recently run into a problem while trying to access my database through a java web application. I keep getting a CannotGetJdbcConnectionException along with a StaleConnectionException. I am using Websphere v8.5 as my local machine server. I have tried testing the Data Source Connection in the Administrative console and it always comes back successful. But whenever I try to access my application I get the above Exceptions. Does anyone have an idea of why this keeps happening and how I could possibly fix it? Below is the error message I keep getting.
I am using DB2 for my database
[10/1/15 7:47:23:550 CDT] 00000073 FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Dev2\Utilities\IBM\AppServers\profiles\AppSrv03\logs\ffdc\server1_ef037f_15.10.01_07.47.23.5493440764669613130910.txt com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest() 309
[10/1/15 7:47:23:553 CDT] 00000073 webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[mvc-dispatcher]: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.ibm.websphere.ce.cm.StaleConnectionException: null DSRA0010E: SQL State = 56038, Error Code = -4,700
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:628)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:693)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:720)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:770)
at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.query(NamedParameterJdbcTemplate.java:190)
at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.query(NamedParameterJdbcTemplate.java:202)
at com.shelter.trac.dao.AgencyDao.getStatesNDistricts(AgencyDao.java:32)
at com.shelter.trac.serviceManager.AgencyManager.getStatesNDistricts(AgencyManager.java:27)
at com.shelter.trac.controller.ApiController.getStatesNDistricts(ApiController.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:613)
at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:214)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:748)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:876)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:931)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:822)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:575)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:807)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1214)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:774)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:456)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1027)
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:458)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:522)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:311)
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:1783)
Caused by: com.ibm.websphere.ce.cm.StaleConnectionException: null DSRA0010E: SQL State = 56038, Error Code = -4,700
at com.ibm.ws.rsadapter.spi.ServerFunction.handleStaleStatement(ServerFunction.java:693)
at com.ibm.ws.rsadapter.AdapterUtil.mapException(AdapterUtil.java:2277)
at com.ibm.ws.rsadapter.AdapterUtil.translateSQLException(AdapterUtil.java:1582)
at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getConnection(WSRdbDataSource.java:2243)
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.getConnection(WSManagedConnectionFactoryImpl.java:1761)
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:1506)
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:1096)
at com.ibm.ejs.j2c.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:2086)
at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1766)
at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:3264)
at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2567)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:1544)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:1027)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:642)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:609)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
... 48 more
I did some more research on the subject especially the StaleConnectionException, and most of the article talked about the JDBC exceptions timing out or going stale. So I went into Websphere Administration Console and started looking around for properties about connections. In the Resources -> JDBC -> Data source -> [your Datasource] there is a page about "Websphere Application Server Data Source Propeties" and in it is a section called "Connection Validation Properties". I decided to give it a shot and checked the Validate New Connections checkbox and left the Number of Retries and Retry interval to their default settings and tested the app and it worked.

Soap Request Error in Websphere Portal

The scenario is,
We created a Webservice (say WS1) using WebExperience factory V8.0.0.2 and the websphere application server is V8.0.0.10. The WS1 has an operation which calls another webservice (say WS2) for some authentication. All are soap services. When testing this scenario locally we were able to invoke the underlying webservice WS2 and was able to get the response.
I deployed it in Webphere Portal, wp_profile, but when I called the service WS1 it is showing some SOAP error. The error is happening when WS1 invokes WS2. We are using Portal 8.0 and the Application Server version is 8.0.0.10.
I changed the class loading to parent last in the application module. But it is still showing the error.
Stack trace is given
Category: bowstreet.system.server.logging.event.criterion.abnormal
Priority: ERROR
Msg: Component: SERVICE
Caught an exception processing a message style web service call.
The associated exception is: java.lang.reflect.InvocationTargetException
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.apache.axis.providers.java.MsgProvider.processMessage(MsgProvider.java:141)
at com.bowstreet.axis.providers.WebAppMSGProvider.processMessage(WebAppMSGProvider.java:46)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1214)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:774)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:456)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:125)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:77)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:926)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1023)
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: java.rmi.RemoteException: Error in method BatchInvoke_al. Error in method getDetail_ws.invoke. Error in method getDetail_ws.invokeInternal. javax/xml/soap/MessageFactory.newInstance(Ljava/lang/String;)Ljavax/xml/soap/MessageFactory;
at com.bowstreet.axis.WebAppRPCInterface.aMethod(WebAppRPCInterface.java:68)
... 41 more
Can anyone help me on this issue..
The WARs you're deploying to the two servers (working and non-working) are different one is dev mode WAR built by deploying from designer (which is a dual mode WAR that supports the WEF standalone servlet mode plus portlets) and the other an exported portlet WAR. If so, then the two WARs would have different sets of JARs (less jars in the portlet WAR which defers to portal for some of those APIs).
Please cross checked the module class loader in the application module.
saaj-api.jar will be missing in dev mode war bulid.
Remove the saaj-api.jar from the lib and export the war and deploy.
Can you provide the libraries using in the Applications?
Please check whether any dependant jar files is loading twice after starting the application.
You can view the loaded class files in the application server console.

Resources