| Summary: | NPE in wsat-simple quickstart on Openshift | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Nikoleta Hlavickova <nziakova> | ||||
| Component: | Quickstarts | Assignee: | sgilda | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Nikoleta Hlavickova <nziakova> | ||||
| Severity: | unspecified | Docs Contact: | Russell Dickenson <rdickens> | ||||
| Priority: | unspecified | ||||||
| Version: | 6.2.0 | CC: | bsutter, paul.robinson, pmuir | ||||
| Target Milestone: | DR1 | ||||||
| Target Release: | EAP 6.3.0 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2014-06-28 15:37:45 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
|
Description
Nikoleta Hlavickova
2013-11-25 13:52:52 UTC
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 |