Hide Forgot
After deploying the application to Openshift and accessing http://wsatsimple-YOUR_DOMAIN_NAME.rhcloud.com/WSATSimpleServletClient I see following output in browser: Quickstart: This example demonstrates the deployment of a WS-AT (WS-AtomicTransaction) enabled JAX-WS Web service bundled in a war archive for deployment to *JBoss Enterprise Application Platform 6*. and a NPE is logged into server log at the same time: ==> jbosseap/logs/server.log <== 2013/11/25 08:24:52,486 INFO [stdout] (http-127.9.52.129/127.9.52.129:8080-1) [CLIENT] Creating a new WS-AT User Transaction 2013/11/25 08:24:52,518 INFO [stdout] (http-127.9.52.129/127.9.52.129:8080-1) [CLIENT] Beginning Atomic Transaction (All calls to Web services that support WS-AT wil be included in this transaction) 2013/11/25 08:24:52,524 ERROR [stderr] (http-127.9.52.129/127.9.52.129:8080-1) java.lang.NullPointerException 2013/11/25 08:24:52,529 ERROR [stderr] (http-127.9.52.129/127.9.52.129:8080-1) at org.jboss.as.quickstarts.wsat.simple.servlet.WSATSimpleServletClient.doGet(WSATSimpleServletClient.java:91) 2013/11/25 08:24:52,529 ERROR [stderr] (http-127.9.52.129/127.9.52.129:8080-1) at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) 2013/11/25 08:24:52,530 ERROR [stderr] (http-127.9.52.129/127.9.52.129:8080-1) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) 2013/11/25 08:24:52,532 ERROR [stderr] (http-127.9.52.129/127.9.52.129:8080-1) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) 2013/11/25 08:24:52,532 ERROR [stderr] (http-127.9.52.129/127.9.52.129:8080-1) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) 2013/11/25 08:24:52,537 ERROR [stderr] (http-127.9.52.129/127.9.52.129:8080-1) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) 2013/11/25 08:24:52,546 ERROR [stderr] (http-127.9.52.129/127.9.52.129:8080-1) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) 2013/11/25 08:24:52,549 ERROR [stderr] (http-127.9.52.129/127.9.52.129:8080-1) at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) 2013/11/25 08:24:52,643 ERROR [stderr] (http-127.9.52.129/127.9.52.129:8080-1) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) 2013/11/25 08:24:52,647 ERROR [stderr] (http-127.9.52.129/127.9.52.129:8080-1) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) 2013/11/25 08:24:52,651 ERROR [stderr] (http-127.9.52.129/127.9.52.129:8080-1) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) 2013/11/25 08:24:52,657 ERROR [stderr] (http-127.9.52.129/127.9.52.129:8080-1) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) 2013/11/25 08:24:52,662 ERROR [stderr] (http-127.9.52.129/127.9.52.129:8080-1) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) 2013/11/25 08:24:52,662 ERROR [stderr] (http-127.9.52.129/127.9.52.129:8080-1) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) 2013/11/25 08:24:52,662 ERROR [stderr] (http-127.9.52.129/127.9.52.129:8080-1) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) 2013/11/25 08:24:52,662 ERROR [stderr] (http-127.9.52.129/127.9.52.129:8080-1) at java.lang.Thread.run(Thread.java:744) Output from 'rhc tail -a wsatsimple' before accessing the application on Openshift: ==> jbosseap/logs/server.log <== 2013/11/25 08:21:44,492 INFO [org.jboss.ws.cxf.deployment] (MSC service thread 1-2) JBWS024074: WSDL published to: file:/var/lib/openshift/52934c45500446e9e40000c2/jbosseap/standalone/data/wsdl/ROOT.war/RestaurantServiceATService.wsdl 2013/11/25 08:21:44,677 INFO [org.jboss.as.webservices] (MSC service thread 1-4) JBAS015539: Starting service jboss.ws.port-component-link 2013/11/25 08:21:47,041 INFO [org.jboss.as.webservices] (MSC service thread 1-1) JBAS015539: Starting service jboss.ws.endpoint."ROOT.war"."org.jboss.as.quickstarts.wsat.simple.RestaurantServiceATImpl" 2013/11/25 08:21:47,956 INFO [org.jboss.ws.common.management] (MSC service thread 1-1) JBWS022050: Endpoint registered: jboss.ws:context=,endpoint=org.jboss.as.quickstarts.wsat.simple.RestaurantServiceATImpl 2013/11/25 08:21:50,248 INFO [org.jboss.web] (ServerService Thread Pool -- 69) JBAS018210: Register web context: 2013/11/25 08:21:53,999 ERROR [org.jboss.remoting.remote.connection] (Remoting "wsatsimple-nziakova.rhcloud.com:MANAGEMENT" read-1) JBREM000200: Remote connection failed: java.io.IOException: Connection reset by peer 2013/11/25 08:21:56,357 INFO [org.jboss.as.server] (ServerService Thread Pool -- 37) JBAS018559: Deployed "ROOT.war" (runtime-name : "ROOT.war") 2013/11/25 08:21:56,858 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.9.52.129:9990/management 2013/11/25 08:21:56,863 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.9.52.129:9990 2013/11/25 08:21:56,864 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss EAP 6.1.1.GA (AS 7.2.1.Final-redhat-10) started in 243122ms - Started 208 of 347 services (136 services are passive or on-demand) ==> jbosseap/logs/boot.log <== 08:12:24,460 DEBUG [org.jboss.as.config] VM Arguments: -D[Standalone] -XX:+TieredCompilation -Xmx256m -XX:MaxPermSize=102m -XX:+AggressiveOpts -Dorg.apache.tomcat.util.LOW_MEMORY=true -DOPENSHIFT_APP_UUID=52934c45500446e9e40000c2 -Dorg.jboss.resolver.warning=true -Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Djboss.node.name=wsatsimple-nziakova.rhcloud.com -Djgroups.bind_addr=127.9.52.129 -Dorg.apache.coyote.http11.Http11Protocol.COMPRESSION=on -Dorg.jboss.boot.log.file=/var/lib/openshift/52934c45500446e9e40000c2/jbosseap/standalone/log/boot.log -Dlogging.configuration=file:/var/lib/openshift/52934c45500446e9e40000c2/jbosseap/standalone/configuration/logging.properties 08:12:46,336 WARN [org.jboss.as.messaging] JBAS011608: Element CLUSTERED is deprecated and will not be taken into account 08:12:54,430 INFO [org.jboss.as.controller.management-deprecated] JBAS014627: Attribute clustered is deprecated, and it might be removed in future version! 08:12:55,140 WARN [org.jboss.as.server] JBAS015883: No security realm defined for native management service; all access will be unrestricted. 08:12:55,255 INFO [org.xnio] XNIO Version 3.0.7.GA-redhat-1 08:12:55,335 INFO [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http) 08:12:55,335 WARN [org.jboss.as.server] JBAS015884: No security realm defined for http management service; all access will be unrestricted. 08:12:55,419 INFO [org.xnio.nio] XNIO NIO Implementation Version 3.0.7.GA-redhat-1 08:12:55,577 INFO [org.jboss.remoting] JBoss Remoting version 3.2.16.GA-redhat-1 08:12:55,942 WARN [org.jboss.as.logging] JBAS011511: Replacing handler 'FILE' during add operation. Either the handler type or the module name differs from the initial configuration.
How were you able to view the entire log? I tried all of the following: - rhc app tail -a wsatsimple - rhc tail -a wsatsimple - rhc tail wsatsimple All I see is; ==> jbosseap/logs/server.log <== 2013/11/25 12:11:14,738 ERROR [stderr] (http-/127.9.54.1:8080-1) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) 2013/11/25 12:11:14,738 ERROR [stderr] (http-/127.9.54.1:8080-1) at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) 2013/11/25 12:11:14,738 ERROR [stderr] (http-/127.9.54.1:8080-1) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) 2013/11/25 12:11:14,738 ERROR [stderr] (http-/127.9.54.1:8080-1) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) 2013/11/25 12:11:14,750 ERROR [stderr] (http-/127.9.54.1:8080-1) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) 2013/11/25 12:11:14,750 ERROR [stderr] (http-/127.9.54.1:8080-1) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) 2013/11/25 12:11:14,751 ERROR [stderr] (http-/127.9.54.1:8080-1) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) 2013/11/25 12:11:14,847 ERROR [stderr] (http-/127.9.54.1:8080-1) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) 2013/11/25 12:11:14,847 ERROR [stderr] (http-/127.9.54.1:8080-1) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) 2013/11/25 12:11:14,854 ERROR [stderr] (http-/127.9.54.1:8080-1) at java.lang.Thread.run(Thread.java:744)
I need Paul Robinson's help with this one. Adding him to this bug. Paul, when I deploy locally and access the client at http://localhost:8080/jboss-wsat-simple/WSATSimpleServletClient, there is no NullPointerException in the server log. When I use OpenShift, I am able to reproduce the NullPointer exception. Do you have any idea what is wrong here?
I did notice the default OpenShift config file now contains: <wsdl-host>${env.OPENSHIFT_GEAR_DNS}</wsdl-host> instead of: <wsdl-host>${env.OPENSHIFT_APP_DNS}</wsdl-host> I tried both with the same results.
Debugging shows UserTransactionFactory.userTransaction() returns NULL. Spoke with Paul R and he said it appears the XTS subsystem is not being loaded. Chatted wiht Ben Parees on IRC. He said OpenShift is still running EAP 6.1, so nothing has changed recently. He asked if it worked with the EAP 6.1 quickstarts. I'm not sure. We need to investigate. We may want to remove the OpenShift instructions for this quickstart for the 6.2 release.
(In reply to sgilda from comment #1) > How were you able to view the entire log? 1. rhc tail -a wsatsimple 2. access http://wsatsimple-YOUR_DOMAIN_NAME.rhcloud.com/WSATSimpleServletClient
XTS is enabled by modifying the standalone-xts.xml file in .openshift/config/standalone.xml. See the instructions here: https://github.com/jboss-developer/jboss-eap-quickstarts/blob/master/wsat-simple/README.md#configure-the-openshift-server Did you definitely do this and did you remember to git add+commit before pushing? These instructions are rather brittle IMO. Essentially we are updating the standalone.xml to give it the additional config needed to enable XTS and any dependent subsytems (WebServices for example). It's possible that this config has changed in EAP 6.1, and we are copying the old config across. However, i don't think this should matter as EAP 6.1 should be backwards compatible with older configuration. Things to try: 1) Make sure you are updating the standalone.xml. Has OpenShift changed the way it looks for overridden standalone.xml files? 2) Look at the full server log to see if XTS has started. Look out for a series of Web Service registrations. Here's one of them: 09:28:53,397 INFO [org.jboss.ws.cxf.metadata] (MSC service thread 1-9) JBWS024061: Adding service endpoint metadata: id=CompletionCoordinatorService address=http://localhost:8080/ws-t11-coordinator/CompletionCoordinatorService implementor=com.arjuna.webservices11.wsat.sei.CompletionCoordinatorPortTypeImpl serviceName={http://docs.oasis-open.org/ws-tx/wsat/2006/06}CompletionCoordinatorService portName={http://docs.oasis-open.org/ws-tx/wsat/2006/06}CompletionCoordinatorPortType annotationWsdlLocation=null wsdlLocationOverride=null mtomEnabled=false 3) Try and recreate the issue locally, by starting EAP with a modified standalone.xml. Make the same modifications as are suggested in the README.md for OpenShift. I'll ask Gytis to take a look at this today. If he is busy, I will take a look.
Yes. I did modify the .openshift/config/standalone.xml file as mentioned in the instructions. As I recall, most of it was already configured. The webservices subsystem was already there and matched except for the following: <wsdl-host>${env.OPENSHIFT_APP_DNS}</wsdl-host> It defaulted to: <wsdl-host>${env.OPENSHIFT_GEAR_DNS}</wsdl-host> When I print the environment variables,they are both the same so I don't think it's an issue: * OPENSHIFT_APP_DNS=wsatsimple-sgilda.rhcloud.com * OPENSHIFT_GEAR_DNS=wsatsimple-sgilda.rhcloud.com As I recall, I only had to add logger entry and the xts subsystem. I just tested it all again, following the instructions in the README and get the same NullPointerException. I will try with the quickstart that shipped with EAP 6.1. I wonder if OpenShift was ever tested for that release? I will attach the modified .openshift/config/standalone.xml file here so you can review.
Created attachment 829249 [details] standalone.xml file deployed to OpenShift Modified the file per instructions then did: $ git add .openshift/config/standalone.xml $ git commit -m 'update standalone.xml' $ git push
Thanks for trying this Sande. Can you provide the boot log from OpenShift?
You were right - XTS subsystem is not loaded, see the error from server log: 2013/11/26 06:59:44,880 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 64) JBAS014613: Operation ("add") failed - address: ([("subsystem" => "xts")]) - failure description: "JBAS014802: Cannot resolve expression 'expression \"http://${OPENSHIFT_INTERNAL_IP}:8080/ws-c11/ActivationService\"' -- java.lang.IllegalStateException: Failed to resolve expression: ${OPENSHIFT_INTERNAL_IP}" Readme says that you should add this configuration to standalone.xml: <subsystem xmlns="urn:jboss:domain:xts:1.0"> <xts-environment url="http://${OPENSHIFT_INTERNAL_IP}:8080/ws-c11/ActivationService"/> </subsystem> I replaced '${OPENSHIFT_INTERNAL_IP}' with '${env.OPENSHIFT_INTERNAL_IP}' and it works.
Great, thanks for investigating!
I just confirmed that the wsat-simple quickstart that shipped with EAP 6.1.0.GA had the same result: ==> jbosseap/logs/server.log <== 2013/11/26 08:13:59,746 INFO [stdout] (http-127.4.142.129/127.4.142.129:8080-1) [CLIENT] Creating a new WS-AT User Transaction 2013/11/26 08:13:59,818 INFO [stdout] (http-127.4.142.129/127.4.142.129:8080-1) [CLIENT] Beginning Atomic Transaction (All calls to Web services that support WS-AT wil be included in this transaction) 2013/11/26 08:13:59,819 ERROR [stderr] (http-127.4.142.129/127.4.142.129:8080-1) java.lang.NullPointerException 2013/11/26 08:13:59,825 ERROR [stderr] (http-127.4.142.129/127.4.142.129:8080-1) at org.jboss.as.quickstarts.wsat.simple.servlet.WSATSimpleServletClient.doGet(WSATSimpleServletClient.java:88) 2013/11/26 08:13:59,826 ERROR [stderr] (http-127.4.142.129/127.4.142.129:8080-1) at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
@Sande, once you edit readme please do this change too: Separate configuration of webservices and xts subsystem in 4th step in Configure the OpenShift Server section. There should be one step for each subsystem so it is clear that it is not the same subsystem.
Nikoleta: I should have read this thread before posting. I'll make the change you suggested. Thanks!
Nikoleta: Great catch! I updated the instructions and tested. It now works without error. Thanks! Fixed in this commit: https://github.com/jboss-developer/jboss-eap-quickstarts/commit/9ce443dafe40c5955cc8c636072313cd71af2a69
I just checked the EAP 6.0.1 version of this quickstart. It seems the wsat-simple quickstart always had ${OPENSHIFT_INTERNAL_IP} instead of ${env.OPENSHIFT_INTERNAL_IP} in the instructions. My guess is no one ever looked at the server log and assumed it was working.
This should be fixed in the current builds.
Verified with EAP 6.3.0 DR1