glassfish
  1. glassfish
  2. GLASSFISH-18357

Web Service Client fails with NullPointerException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Works as designed
    • Affects Version/s: 3.1.2_b21
    • Fix Version/s: None
    • Component/s: web_services
    • Labels:
      None
    • Environment:

      Windows 7 64

      Description

      I'm encountering problems using a WebService client from a Web-Application. The application is packaged in a war and contains two EJB jars. The web service is called from a JSF Backing Bean (CDI Request Scope). Following exception occurs:

      Information: WSP5018: Loaded WSIT configuration from file: file:/C:/glassfish3_1_2_22/glassfish/domains/domain1/generated/jsp/It/loader_2096641453/META-INF/wsit-client.xml.
      Information: Missing required extension methods detected on 'javax.transaction.TransactionManager' implementation 'com.sun.enterprise.transaction.TransactionManagerHelper':
      getTxLogLocation

      Information: txlogdir isnull
      Schwerwiegend: An error occured while invoking FeedProvider web service.
      java.lang.NullPointerException
      at java.io.File.<init>(File.java:251)
      at com.sun.xml.ws.tx.at.internal.WSATGatewayRM.setTxLogDirs(WSATGatewayRM.java:430)
      at com.sun.xml.ws.tx.at.internal.WSATGatewayRM.setupRecovery(WSATGatewayRM.java:136)
      at com.sun.xml.ws.tx.at.internal.WSATGatewayRM.create(WSATGatewayRM.java:127)
      at com.sun.xml.ws.tx.at.internal.WSATGatewayRM.create(WSATGatewayRM.java:115)
      at com.sun.xml.ws.tx.at.runtime.AtTubeFactory.createTube(AtTubeFactory.java:78)
      at com.sun.xml.ws.assembler.TubeCreator.createTube(TubeCreator.java:84)
      at com.sun.xml.ws.assembler.TubelineAssemblerFactoryImpl$MetroTubelineAssembler.createClient(TubelineAssemblerFactoryImpl.java:130)
      at com.sun.xml.ws.client.Stub.createPipeline(Stub.java:314)
      at com.sun.xml.ws.client.Stub.<init>(Stub.java:286)
      at com.sun.xml.ws.client.Stub.<init>(Stub.java:230)
      at com.sun.xml.ws.client.Stub.<init>(Stub.java:245)
      at com.sun.xml.ws.client.sei.SEIStub.<init>(SEIStub.java:91)
      at com.sun.xml.ws.client.WSServiceDelegate.getStubHandler(WSServiceDelegate.java:725)
      at com.sun.xml.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:703)
      at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:387)
      at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:363)
      at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:345)
      at javax.xml.ws.Service.getPort(Service.java:134)
      at de.WebserviceClient.getFeedBeanPort(FeedProviderBeanService.java:56)

      The client classes are generated using Netbeans and packages as a seperate jar. The Webservice itself is deployed as EJB on a Glassfish 2.1.1 server. On Glassfish 3.1.1 this NullPointerException does not occur.

        Activity

        Hide
        Bhakti Mehta added a comment -

        Assigning to Martin

        Show
        Bhakti Mehta added a comment - Assigning to Martin
        Hide
        Martin Grebac added a comment -

        Arjav is handling Tx ... to me it appears like an issue which is supposed to be already fixed in 3.1.2?

        Show
        Martin Grebac added a comment - Arjav is handling Tx ... to me it appears like an issue which is supposed to be already fixed in 3.1.2?
        Hide
        arjavdesai added a comment -

        Can you please clarify the following for this issue:

        1. What exactly is the topology? Are you saving a Glassfish 2.1.1 server hosting a WSAT enabled service and then trying to have client application on 3.1.2_b21?

        2. Where do you see this exception? I am assuming on client side and as you mention if you use 3.1.1 on client side instead of 3.1.2_b21, it works i.e there is no NPE.

        3. Will it be possible for you to upload your test service and client application?

        Thanks,
        Arjav

        Show
        arjavdesai added a comment - Can you please clarify the following for this issue: 1. What exactly is the topology? Are you saving a Glassfish 2.1.1 server hosting a WSAT enabled service and then trying to have client application on 3.1.2_b21? 2. Where do you see this exception? I am assuming on client side and as you mention if you use 3.1.1 on client side instead of 3.1.2_b21, it works i.e there is no NPE. 3. Will it be possible for you to upload your test service and client application? Thanks, Arjav
        Hide
        arjavdesai added a comment -

        Just FYI:

        As Martin mentioned, we did fix a similiar issue http://java.net/jira/browse/WSIT-1606 with Metro rev: 6958 and http://java.net/jira/browse/GLASSFISH-18143 was fixed with GFS rev: 51946.

        But 3.1.2_b21 should have fix for that i.e. Metro inside that is based on rev: 6964 and GFS rev: 52471

        Show
        arjavdesai added a comment - Just FYI: As Martin mentioned, we did fix a similiar issue http://java.net/jira/browse/WSIT-1606 with Metro rev: 6958 and http://java.net/jira/browse/GLASSFISH-18143 was fixed with GFS rev: 51946. But 3.1.2_b21 should have fix for that i.e. Metro inside that is based on rev: 6964 and GFS rev: 52471
        Hide
        Puls added a comment -

        Hi.

        Unfortunately I cannot upload the project itself. I'll try to describe my scenario.

        WebService: GF 2.1 (b60e-fcs), Java 1.6_26, Suse Linux

        WebService Client: GF 3.1.2 b22, Java 1.7_2, Windows 7 64

        2. The exception occurs on the Client side. If the client is used from GF 3.1.1 The exception does not occur and the call succeeds. I create the client as follows (omminting try-catch):

        QName qName = new QName("http://ejb.feed.de/", "FeedProviderBeanService");
        URL wsUrl = new URL(url);
        FeedProviderBeanService feedProvider = new FeedProviderBeanService(wsUrl, qName);
        FeedProviderBean result = feedProvider.getFeedProviderBeanPort();

        The exception occurs on the last line. And will only occur the first time the service is created. It will therefore not happen again until I restart glassfish.

        Let me know if you need any further information.

        Thanks for your help
        Phil

        Show
        Puls added a comment - Hi. Unfortunately I cannot upload the project itself. I'll try to describe my scenario. WebService: GF 2.1 (b60e-fcs), Java 1.6_26, Suse Linux WebService Client: GF 3.1.2 b22, Java 1.7_2, Windows 7 64 2. The exception occurs on the Client side. If the client is used from GF 3.1.1 The exception does not occur and the call succeeds. I create the client as follows (omminting try-catch): QName qName = new QName("http://ejb.feed.de/", "FeedProviderBeanService"); URL wsUrl = new URL(url); FeedProviderBeanService feedProvider = new FeedProviderBeanService(wsUrl, qName); FeedProviderBean result = feedProvider.getFeedProviderBeanPort(); The exception occurs on the last line. And will only occur the first time the service is created. It will therefore not happen again until I restart glassfish. Let me know if you need any further information. Thanks for your help Phil
        Hide
        arjavdesai added a comment -

        Thanks for quick update Phil!

        Are you deploying just the client on GF 3.1.2 b22, Java 1.7_2, Windows 7 64?

        Can you please deploy a simple POJO WS before deploying client app and run your scenario again? This is required as suggested in release notes based on http://java.net/jira/browse/WSIT-1500.

        Show
        arjavdesai added a comment - Thanks for quick update Phil! Are you deploying just the client on GF 3.1.2 b22, Java 1.7_2, Windows 7 64? Can you please deploy a simple POJO WS before deploying client app and run your scenario again? This is required as suggested in release notes based on http://java.net/jira/browse/WSIT-1500 .
        Hide
        Puls added a comment -

        Deploying a WebService before deploying the application with the client fixes the problem. The txLogLocation is correctly set.

        Show
        Puls added a comment - Deploying a WebService before deploying the application with the client fixes the problem. The txLogLocation is correctly set.
        Hide
        arjavdesai added a comment -

        Thanks Phil!

        Show
        arjavdesai added a comment - Thanks Phil!

          People

          • Assignee:
            arjavdesai
            Reporter:
            Puls
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: