Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 4.0, 4.1_b07
    • Fix Version/s: None
    • Component/s: web_services
    • Labels:
      None
    • Environment:

      SE 1.7.0_51-b1 and SE 1.8.0_05-b13
      OS X Mavericks

      Description

      Basic HelloWorld WS (see below) doesnt work.
      Tested using the GF Web Admin WS Tester UI.

      SE 1.7.0_51-b13 + GF 4.0 b89 : OK
      SE 1.7.0_51-b13 + GF 4.0.1 b7 : FAIL - see below
      SE 1.8.0_05-b13 + GF 4.0 b89 : FAIL - see below
      SE 1.8.0_05-b13 + GF 4.0.1 b7 : FAIL - see below

      --8<--
      package delabassee;

      import javax.jws.WebService;
      import javax.jws.WebMethod;
      import javax.jws.WebParam;
      import javax.ejb.Stateless;

      @WebService(serviceName = "MyWebService")
      @Stateless()
      public class NewWebService {

      @WebMethod(operationName = "hello")
      public String hello(@WebParam(name = "name") String txt)

      { return "Hello " + txt + " !"; }

      }
      --8<--

      GF 4.0.1 / SE 7 :
      java.lang.NullPointerException at java.util.Hashtable.put(Hashtable.java:514) at java.util.Properties.setProperty(Properties.java:161) at java.lang.System.setProperty(System.java:787) at org.glassfish.webservices.monitoring.WebServiceTesterServlet.wsImport(WebServiceTesterServlet.java:619) at org.glassfish.webservices.monitoring.WebServiceTesterServlet.initializePort(WebServiceTesterServlet.java:526) at org.glassfish.webservices.monitoring.WebServiceTesterServlet.doGet(WebServiceTesterServlet.java:173) at org.glassfish.webservices.monitoring.WebServiceTesterServlet.invoke(WebServiceTesterServlet.java:104) at org.glassfish.webservices.EjbWebServiceServlet.service(EjbWebServiceServlet.java:143) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.glassfish.grizzly.servlet.ServletHandler.doServletService(ServletHandler.java:223) at org.glassfish.grizzly.servlet.ServletHandler.service(ServletHandler.java:174) at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167) at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201) at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175) at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235) at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545) at java.lang.Thread.run(Thread.java:744)

      GF 4.0.1 / SE 8 :
      java.lang.NullPointerException at java.util.Hashtable.put(Hashtable.java:459) at java.util.Properties.setProperty(Properties.java:166) at java.lang.System.setProperty(System.java:793) at org.glassfish.webservices.monitoring.WebServiceTesterServlet.wsImport(WebServiceTesterServlet.java:619) at org.glassfish.webservices.monitoring.WebServiceTesterServlet.initializePort(WebServiceTesterServlet.java:526) at org.glassfish.webservices.monitoring.WebServiceTesterServlet.doGet(WebServiceTesterServlet.java:173) at org.glassfish.webservices.monitoring.WebServiceTesterServlet.invoke(WebServiceTesterServlet.java:104) at org.glassfish.webservices.EjbWebServiceServlet.service(EjbWebServiceServlet.java:143) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.glassfish.grizzly.servlet.ServletHandler.doServletService(ServletHandler.java:223) at org.glassfish.grizzly.servlet.ServletHandler.service(ServletHandler.java:174) at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167) at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201) at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175) at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235) at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545) at java.lang.Thread.run(Thread.java:745)

      GF 4.0 / SE 8 :
      "Internal Error" (no exception shown). From GF log :
      [SEVERE] service exception: java.lang.AssertionError: org.xml.sax.SAXParseException; systemId: bundle://158.0:1/com/sun/tools/xjc/reader/xmlschema/bindinfo/binding.xsd; lineNumber: 52; columnNumber: 88; schema_reference: Failed to read schema document 'xjc.xsd', because 'bundle' access is not allowed due to restriction set by the accessExternalSchema property. at com.sun.tools.xjc.SchemaCache.newValidator(SchemaCache.java:80) at com.sun.tools.xjc.reader.internalizer.SCDBasedBindingSet.apply(SCDBasedBindingSet.java:237) at com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:541) at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:269) at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:95) at com.sun.tools.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:142) at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildJAXBModel(WSDLModeler.java:2298) at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:198) at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:141) at com.sun.tools.ws.wscompile.WsimportTool.buildWsdlModel(WsimportTool.java:444) at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:205) at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:183) at com.sun.tools.ws.util.WSToolsObjectFactoryImpl.wsimport(WSToolsObjectFactoryImpl.java:60) at com.sun.tools.ws.spi.WSToolsObjectFactory.wsimport(WSToolsObjectFactory.java:88) at org.glassfish.webservices.monitoring.WebServiceTesterServlet.wsImport(WebServiceTesterServlet.java:642) at org.glassfish.webservices.monitoring.WebServiceTesterServlet.initializePort(WebServiceTesterServlet.java:528) at org.glassfish.webservices.monitoring.WebServiceTesterServlet.doGet(WebServiceTesterServlet.java:169) at org.glassfish.webservices.monitoring.WebServiceTesterServlet.invoke(WebServiceTesterServlet.java:104) at org.glassfish.webservices.EjbWebServiceServlet.service(EjbWebServiceServlet.java:136) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.glassfish.grizzly.servlet.ServletHandler.doServletService(ServletHandler.java:242) at org.glassfish.grizzly.servlet.ServletHandler.service(ServletHandler.java:193) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246) at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191) at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168) at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189) at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544) at java.lang.Thread.run(Thread.java:745) Caused by: org.xml.sax.SAXParseException; systemId: bundle://158.0:1/com/sun/tools/xjc/reader/xmlschema/bindinfo/binding.xsd; lineNumber: 52; columnNumber: 88; schema_reference: Failed to read schema document 'xjc.xsd', because 'bundle' access is not allowed due to restriction set by the accessExternalSchema property. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:441) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(XSDHandler.java:4162) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaFatalError(XSDHandler.java:4141) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:2168) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.resolveSchema(XSDHandler.java:2078) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.constructTrees(XSDHandler.java:1008) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:620) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:616) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:574) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:540) at com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:255) at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:638) at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:670) at com.sun.tools.xjc.SchemaCache.newValidator(SchemaCache.java:77) ... 39 more
      [WARNING] schema_reference: Failed to read schema document 'NewWebService?xsd=1', because 'http' access is not allowed due to restriction set by the accessExternalSchema property.

        Activity

        Hide
        miroslav.kos added a comment - - edited

        Please let me know, if the changing configuration is acceptable for you. Problem #2 fixed in code. Thanks

        Show
        miroslav.kos added a comment - - edited Please let me know, if the changing configuration is acceptable for you. Problem #2 fixed in code. Thanks
        Hide
        Joe Di Pol added a comment -

        r63449: Added JVM option "-Dcom.sun.xml.bind.disableXmlSecurity=true" to domain.xml

        Show
        Joe Di Pol added a comment - r63449: Added JVM option "-Dcom.sun.xml.bind.disableXmlSecurity=true" to domain.xml
        Hide
        Joe Di Pol added a comment - - edited

        Adding the JVM option caused a failure when security manager is on, so I had to revert r63449:

        javax.xml.parsers.ParserConfigurationException: FEATURE_SECURE_PROCESSING: 
         Cannot set the feature to false when security manager is present.
        	at com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl.setFeature(SAXParserFactoryImpl.java:122)
        	at com.sun.xml.bind.v2.util.XmlFactory.createParserFactory(XmlFactory.java:128)
        	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.getXMLReader(UnmarshallerImpl.java:154)
        	at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:172)
        

        So it looks like we may need a more sophisticated fix.

        Show
        Joe Di Pol added a comment - - edited Adding the JVM option caused a failure when security manager is on, so I had to revert r63449: javax.xml.parsers.ParserConfigurationException: FEATURE_SECURE_PROCESSING: Cannot set the feature to false when security manager is present. at com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl.setFeature(SAXParserFactoryImpl.java:122) at com.sun.xml.bind.v2.util.XmlFactory.createParserFactory(XmlFactory.java:128) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.getXMLReader(UnmarshallerImpl.java:154) at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:172) So it looks like we may need a more sophisticated fix.
        Hide
        David Delabassee added a comment -

        ?! This (simple web service) now works ok on B8 (Jul15) with and without the security manager?!

        Show
        David Delabassee added a comment - ?! This (simple web service) now works ok on B8 (Jul15) with and without the security manager?!
        Hide
        miroslav.kos added a comment -

        There were several commits for this issue, the last one fixing the issue is from 07/11:

        r63469 | miroslav.kos | 2014-07-11 11:26:48 +0200 (Fri, 11 Jul 2014) | 1 line
        GLASSFISH-21099: set javax.xml.accessExternalSchema=all

        Recently also test added to QL:
        r63483 | miroslav.kos | 2014-07-14 17:58:31 +0200 (Mon, 14 Jul 2014) | 1 line
        GLASSFISH-21099: added test into QL tests

        Show
        miroslav.kos added a comment - There were several commits for this issue, the last one fixing the issue is from 07/11: r63469 | miroslav.kos | 2014-07-11 11:26:48 +0200 (Fri, 11 Jul 2014) | 1 line GLASSFISH-21099 : set javax.xml.accessExternalSchema=all Recently also test added to QL: r63483 | miroslav.kos | 2014-07-14 17:58:31 +0200 (Mon, 14 Jul 2014) | 1 line GLASSFISH-21099 : added test into QL tests

          People

          • Assignee:
            miroslav.kos
            Reporter:
            David Delabassee
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: