Worklight Server6.0 Installation on WAS - websphere

I have WAS v8.0.0.3 running on my machine. I've installed worklight server v6.0 on WAS using IBM Installation manager. But using this config, when i try to install a woklight .war of an application and try to access console, it throws an exception.
Error 500: java.lang.RuntimeException: BaseProjectLocal is null
From the logs, while accessing application console, this exception comes:
[8/21/13 3:32:28:986 PDT] 0000008b LocalTranCoor E WLTC0017E: Resources rolled back due to setRollbackOnly() being called.
[8/21/13 3:32:28:997 PDT] 0000008b webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[ServletNameNotFound]: java.lang.RuntimeException: BaseProjectLocal is null
at com.worklight.common.util.BaseProjectLocal.get(BaseProjectLocal.java:41)
at com.worklight.server.util.ProjectLocal.get(ProjectLocal.java:55)
at com.worklight.server.util.ProjectLocal.getCoreBeanFactoryS(ProjectLocal.java:95)
at com.worklight.core.util.RssBrokerUtils.getBeanFactory(RssBrokerUtils.java:60)
While starting the application, this exception comes in logs:
[8/21/13 3:37:56:992 PDT] 000000a5 webapp E com.ibm.ws.webcontainer.webapp.WebApp notifyServletContextCreated SRVE0283E: Exception caught while initializing context: {0}
java.lang.NullPointerException
at com.worklight.server.bundle.project.JeeProjectActivator.contextInitialized(JeeProjectActivator.java:105)
at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1651)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:410)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:749)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:422)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:714)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1160)
I fear if something is wrong with installation configuration or database configuration. I'm using mySQL database as backend for worklight. Installation has created Datasource on WAS and test connection also succeeds.
Any help would be highly appreciated.

The IBM Installation Manager does not install Worklight into your existing WAS installation.
In Worklight 6.0 all that it currently does, is:
extract the Worklight framework files and place them in your HD
extract Ant task scripts
You then need to edit these Ant task scripts with your database and .war information and run them to actually install.
Make sure you read the IBM Worklight 6.0 Information Center at:
http://pic.dhe.ibm.com/infocenter/wrklight/v6r0m0/topic/com.ibm.worklight.help.doc/admin/c_installation.html

Related

java.lang.NoClassDefFoundError in firebase admin

I have log4j in spring boot project which uses firebase admin
Randomly firebase admin threw this error even if it is not in use.
Exception in thread "firebase-database-worker" java.lang.NoClassDefFoundError: ch/qos/logback/classic/spi/ThrowableProxy
at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:119)
at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:419)
at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383)
at ch.qos.logback.classic.Logger.error(Logger.java:538)
at com.google.firebase.database.core.JvmPlatform$1.handleException(JvmPlatform.java:57)
at com.google.firebase.database.utilities.DefaultRunLoop.handleExceptionInternal(DefaultRunLoop.java:102)
at com.google.firebase.database.utilities.DefaultRunLoop.access$000(DefaultRunLoop.java:34)
at com.google.firebase.database.utilities.DefaultRunLoop$1.afterExecute(DefaultRunLoop.java:65)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1157)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2022-08-13 22:27:22,729 INFO [http-nio-9658-exec-190]
It seems like it needs a different log library, and when I tried to install ch/qos
The project won't work. unless I removed it from the pom.xml
Does anyone have a solution?
i don't want to change my log library as I can't replace firebase now

Error Migrating from Spring 3.2.2 to 4.0.2

We are trying to migrate a Spring MVC application from 3.2.2 to 4.0.2 and receive the below error.
The .jar files in the lib folder are (all below jar files have been changed to 4.0.2 version):
spring-beans-3.2.2.RELEASE.jar spring-context-3.2.2.RELEASE.jar
spring-core-3.2.2.RELEASE.jar spring-expression-3.2.2.RELEASE.jar
spring-orm-3.2.2.RELEASE.jar spring-web-3.2.2.RELEASE.jar
spring-webmvc-3.2.2.RELEASE.jar
Also added one more jar : spring-aop-4.0.2.RELEASE
ERROR:
[9/28/15 1:43:54:731 EDT] 00000026 ServletWrappe E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0014E: Uncaught service() exception root cause /xbnp/sprin
g/BenefitDistributionParameter.jsp: com.ibm.websphere.servlet.error.ServletErrorReport: java.lang.NoSuchMethodError: org/springframework/web/servlet/tags/form/InputTag.
setDisabled(Ljava/lang/String;)V
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:695)
at com.ibm._jsp._BenefitDistributionParameter._jspService(_BenefitDistributionParameter.java:1953)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
Caused by: java.lang.NoSuchMethodError: org/springframework/web/servlet/tags/form/InputTag.setDisabled(Ljava/lang/String;)V
at com.ibm._jsp._BenefitDistributionParameter._jspx_meth_spring_input_1(_BenefitDistributionParameter.java:2010)
at com.ibm._jsp._BenefitDistributionParameter._jspService(_BenefitDistributionParameter.java:624)
How can we rectify this error?

Jersey 2.10 in IBM WebSphere

I am setting up project with Jersey 2.10, JavaSE 1.7 in Websphere 8.5.5.2 (websphere 7.1 SDK)
When i deploy the project, i get this error
com.ibm.ws.webcontainer.webapp.WebApp commonInitializationFinally SRVE0266E: Error occured while initializing servlets: {0}
javax.servlet.ServletException: SRVE0207E: Uncaught initialization exception created by servlet
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:404)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:168)
I tried to delete the jersey libraries after deploying the project and map it to shared library (same jersey libraries) on websphere. The shared library is mapped to project now, but get other error when i run the application like below.
com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[RESTSrv01]: com.ibm.ws.webcontainer.webapp.WebAppErrorReport: Internal Server Error
at com.ibm.ws.webcontainer.webapp.WebAppDispatcherContext.sendError(WebAppDispatcherContext.java:626)
at com.ibm.ws.webcontainer.webapp.WebAppDispatcherContext.sendError(WebAppDispatcherContext.java:656)
at com.ibm.ws.webcontainer.srt.SRTServletResponse.sendError(SRTServletResponse.java:1301)
at org.glassfish.jersey.servlet.internal.ResponseWriter.commit(ResponseWriter.java:199)
at org.glassfish.jersey.server.ContainerResponse.close(ContainerResponse.java:412)
Any suggestion what could be the problem?

Class loading issue involving CXF on Websphere, parent last not helping

My problem concerns CXF and the wsdl4j_1.6.2.jar colliding with something, presumably the axis-wsdl4j.jar.
I have read: What's wrong with my Apache CXF client?
My project does not include the axis-wsdl4j.jar in the war. I have also asked our admin to switch Websphere to Parent Last. I still get this:
[12/13/12 16:01:28:378 CST] 0000001b ServletWrappe E SRVE0068E:
Uncaught exception thrown in one of the service methods of the
servlet: CXFServlet. Exceptio n thrown : java.lang.RuntimeException:
org.apache.cxf.interceptor.Fault:
javax/wsdl/xml/WSDLReader.readWSDL(Ljavax/wsdl/xml/WSDLLocator;Lorg/w3c/dom/Element;)
Ljavax/wsdl/Definition;
at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:116)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:322)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:122)
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:211)
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:213)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:154)
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:129)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:187)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:110)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:166)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1143)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:591)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3453)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:815)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:119)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
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:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture$1.run(AsyncChannelFuture.java:205)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473) Caused by: org.apache.cxf.interceptor.Fault:
javax/wsdl/xml/WSDLReader.readWSDL(Ljavax/wsdl/xml/WSDLLocator;Lorg/w3c/dom/Element;)Ljavax/wsdl/Definition;
at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:128)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:167)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:94)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:94)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
... 26 more Caused by: java.lang.NoSuchMethodError: javax/wsdl/xml/WSDLReader.readWSDL(Ljavax/wsdl/xml/WSDLLocator;Lorg/w3c/dom/Element;)Ljavax/wsdl/Definition;
at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:242)
at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:191)
at org.apache.cxf.wsdl11.WSDLServiceFactory.(WSDLServiceFactory.java:92)
at org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:203)
at org.apache.cxf.jaxws.ServiceImpl.(ServiceImpl.java:147)
at org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:97)
at javax.xml.ws.Service.(Service.java:35)
...
Project is built by Maven, deployed to Websphere via Continuum only; and all settings are changed via request. Application runs perfect on local Tomcat.
EDIT:
This was eventually fixed by:
Copy wsdl4j.jar to /usr/WebSphere/AppServer/appLibs/APPNAME directory.
Chmod 775 on previous.
In websphere admin console, environment (on left), Shared Libraries, and define a container wide shared library with name as APPNAME above.
Add the jar to the classpath of the shared library.
Servers (on left), APPNAME java, process management, Class Loader and make sure "Classes loaded with application class loader first"
Click on the class loader and assign the shared library to it.
Restart Server
i think you need to disable Jax ws engine
Try setting JVM property as below
com.ibm.websphere.webservices.DisableIBMJAXWSEngine=true
here is what i would do.
Turn on verbose class loading on WAS runtime and look at the JAR that contains WSDLReader.
Check if this is the JAR that you expected to be used in run-time (to start with) based on the verbose class loading.
HTH

Moving ehcache server from one machine to another

We have been using ehcache.server.1.0.0.war for almost a year.
This week we moved to new computer. We copied cache and changed ehcache.xml accordingly.
However, the new server is now not starting. It throws the error:
SEVERE: WSSERVLET11: failed to parse runtime descriptor: java.lang.NoSuchMethodError: org.slf4j.helpers.MessageFormatter.format(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple;
java.lang.NoSuchMethodError: org.slf4j.helpers.MessageFormatter.format(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple;
at org.slf4j.impl.JDK14LoggerAdapter.warn(JDK14LoggerAdapter.java:429)
at net.sf.ehcache.store.DiskStore.deleteIndexIfCorrupt(DiskStore.java:267)
at net.sf.ehcache.store.DiskStore.initialiseFiles(DiskStore.java:210)
at net.sf.ehcache.store.DiskStore.<init>(DiskStore.java:166)
at net.sf.ehcache.store.DiskStore.create(DiskStore.java:187)
at net.sf.ehcache.Cache.createDiskStore(Cache.java:1069)
at net.sf.ehcache.Cache.initialise(Cache.java:941)
at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:921)
at net.sf.ehcache.CacheManager.addConfiguredCaches(CacheManager.java:607)
at net.sf.ehcache.CacheManager.init(CacheManager.java:336)
at net.sf.ehcache.CacheManager.<init>(CacheManager.java:276)
at net.sf.ehcache.CacheManager.create(CacheManager.java:636)
at net.sf.ehcache.CacheManager.getInstance(CacheManager.java:657)
at net.sf.ehcache.server.soap.EhcacheWebServiceEndpoint.<init>(EhcacheWebServiceEndpoint.java:71)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
Any ideas appreciated.
java.lang.NoSuchMethodError: org.slf4j.helpers.MessageFormatter.format(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple;
This error happens when you have wrong slf4j version of the jar. Check carefully all jar versions/sizes on your old server and make sure they are the same on a new server.
Also diff. versions of the jars could be in your new app server system classpath that would interfere with your application classpath. You should configure class loading order policy in your deployment descriptor (its specific to the app server vendor you are using)

Resources