1 Reply Latest reply on Jul 6, 2012 1:22 AM by djordjevs

    Errai on Websphere

    djordjevs

      Hi,

       

      I am aware that Errai currently does not support Websphere as seen in https://issues.jboss.org/browse/ERRAI-56 and https://community.jboss.org/thread/201292.

      Unfortunately I don't have a choice, but to use Websphere. When I deploy and run my app in Websphere 7 I get the exceptions below. Please note the app works perfectly well in Tomcat.

       

      My question is, is the exception result of the CDI issue in Websphere or some other problem.

      1. If it is a non CDI related issue could you please provide some additional pointers where to look.

      2. If it is the CDI issue (looks like that), could you please give some advice how to convert Errai CDI apps into non-CDI aps to avoid this problem.

       

      On a different note, in both Tomcat and Websphere I am getting the lines related to marshaller class generation at runtime (in green colour).

      3. Can those classes be generated during build/compile time instead of at runtime?

       

      Thanks

      SDJ

       

      [5/07/12 10:13:35:175 EST] 00000017 SystemOut O WARN [ErraiMarshalling] could not locate marshaller class. will attempt dynamic generation.
      [5/07/12 10:13:35:722 EST] 00000017 SystemOut O INFO [MarshallerGeneratorFactory] generating marshalling class...
      [5/07/12 10:13:38:692 EST] 00000017 SystemOut O INFO [MarshallerGeneratorFactory] generated marshalling class in 2970ms.
      [5/07/12 10:13:59:579 EST] 00000017 SystemOut O ERROR [ErraiMarshalling] failed to load static marshallers

      java.lang.NoSuchMethodError:  org/eclipse/jdt/internal/compiler/batch/Main.compile([Ljava/lang/String;Ljava/io/PrintWriter;Ljava/io/PrintWriter;Lorg/eclipse/jdt/core/compiler/CompilationProgress;)Z


      at org.eclipse.jdt.core.compiler.batch.BatchCompiler.compile(BatchCompiler.java:52)

      at org.jboss.errai.codegen.util.ClassChangeUtil$JDTCompiler.compile(ClassChangeUtil.java:73)

      at org.jboss.errai.codegen.util.ClassChangeUtil.compileClass(ClassChangeUtil.java:156)

      at  org.jboss.errai.marshalling.server.util.ServerMarshallUtil.getGeneratedMarshallerFactoryForServer(ServerMarshallUtil.java:133)

      at org.jboss.errai.marshalling.server.MappingContextSingleton.loadPrecompiledMarshallers(MappingContextSingleton.java:99)

      at org.jboss.errai.marshalling.server.MappingContextSingleton.<clinit>(MappingContextSingleton.java:79)

      at java.lang.J9VMInternals.initializeImpl(Native Method)

      at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)

      at org.jboss.errai.bus.server.io.MessageFactory.getParts(MessageFactory.java:109)

      at org.jboss.errai.bus.server.io.MessageFactory.createCommandMessage(MessageFactory.java:93)

      at org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:117)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)

      at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1443)

      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:790)

      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443)

      at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175)

      at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3610)

      at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:274)

      at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:926)

      at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1557)

      at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:173)

      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)

      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)

      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:202)

      at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:766)

      at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:896)

      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)
      [5/07/12 10:13:59:579 EST] 00000017 SystemOut O WARN [ErraiMarshalling] failing over to dynamic marshallers ... performance may be affected.
      [5/07/12 10:13:59:688 EST] 00000017 servlet   E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0068E: Uncaught exception created in one of the service methods of the servlet ErraiServlet in application trecs-client-0_0_1-SNAPSHOT_war. Exception created : java.lang.NullPointerException

      at org.jboss.errai.marshalling.server.DecodingSession.getMarshallerInstance(DecodingSession.java:30)

      at  org.jboss.errai.marshalling.client.marshallers.ErraiProtocolEnvelopeMarshaller.doDermashall(ErraiProtocolEnvelopeMarshaller.java:56)

      at  org.jboss.errai.marshalling.client.marshallers.ErraiProtocolEnvelopeMarshaller.demarshall(ErraiProtocolEnvelopeMarshaller.java:46)

      at org.jboss.errai.bus.server.io.MessageFactory.getParts(MessageFactory.java:109)

      at org.jboss.errai.bus.server.io.MessageFactory.createCommandMessage(MessageFactory.java:93)

      at org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:117)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)

      at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1443)

      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:790)

      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443)

      at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175)

      at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3610)

      at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:274)

      at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:926)

      at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1557)

      at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:173)

      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)

      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)

      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:202)

      at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:766)

      at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:896)

      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)

       

      [5/07/12 10:14:00:079 EST] 00000017 FfdcProvider  I com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\dev\was\inst\profiles\AppSrv01\logs\ffdc\server1_55f555f5_12.07.05_10.13.59.87634785.txt com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch 448

      [5/07/12 10:14:00:142 EST] 00000017 LocalTranCoor E   WLTC0017E: Resources rolled back due to setRollbackOnly() being called.

      [5/07/12 10:14:00:157 EST] 00000017 webapp    E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[ErraiServlet]: java.lang.NullPointerException

      at org.jboss.errai.marshalling.server.DecodingSession.getMarshallerInstance(DecodingSession.java:30)

      at  org.jboss.errai.marshalling.client.marshallers.ErraiProtocolEnvelopeMarshaller.doDermashall(ErraiProtocolEnvelopeMarshaller.java:56)

      at  org.jboss.errai.marshalling.client.marshallers.ErraiProtocolEnvelopeMarshaller.demarshall(ErraiProtocolEnvelopeMarshaller.java:46)

      at org.jboss.errai.bus.server.io.MessageFactory.getParts(MessageFactory.java:109)

      at org.jboss.errai.bus.server.io.MessageFactory.createCommandMessage(MessageFactory.java:93)

      at org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:117)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)

      at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1443)

      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:790)

      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443)

      at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175)

      at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3610)

      at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:274)

      at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:926)

      at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1557)

      at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:173)

      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)

      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)

      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:202)

      at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:766)

      at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:896)

      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)
        • 1. Re: Errai on Websphere
          djordjevs

          Hi,

           

          I have tried to get hold of message bus on the server by doing MessageBus bus = ErraiBus.get(); and it did return a non null bus but the client subscription did not happen and I could not push the messages to the client. In this test I did not use @Service and @Inject annotations.

          Also this time I did not get [ErraiMarshalling] failed to load static marshallers issue (though could be because the objects had not initialised properly).

           

          So, would MessageBus bus = ErraiBus.get();  be a step in the right direction or is it totally wrong?

           

          Thanks

          SDJ