[JBoss JIRA] Created: (JBWS-1857) Never create the same JAXBContext more than once
by Johann Gyger (JIRA)
Never create the same JAXBContext more than once
------------------------------------------------
Key: JBWS-1857
URL: http://jira.jboss.com/jira/browse/JBWS-1857
Project: JBoss Web Services
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: jbossws-jaxws
Affects Versions: jbossws-1.2.1
Reporter: Johann Gyger
service.getPort() may become an expensive operation (i.e., several seconds) when using a non-trivial WSDL with complex types. We have been able to track down our performance problems to an incorrect usage of JAXB-RI in JBOSS-JAXWS. According to https://wsit.dev.java.net/servlets/ReadMsg?list=dev&msgNo=66, creating new instances of JAXBContext is an expensive operation.
In our WSDL we counted 28 instance creations of JAXBContext. Most of them are created through the following call hierarchy:
JAXBContext.newInstance(Class[], Map<String,?>) line: 570
JAXBContext.newInstance(Class...) line: 522
JAXBAccessor$1.create(Class) line: 67
JAXBAccessor$1.create(ParameterMetaData) line: 54
ParameterMetaData.eagerInitialize() line: 470
OperationMetaData.eagerInitialize(List<Method>) line: 469
ClientEndpointMetaData(EndpointMetaData).eagerInitializeOperations() line: 516
ClientEndpointMetaData(EndpointMetaData).initializeInternal() line: 502
ClientEndpointMetaData(EndpointMetaData).eagerInitialize() line: 490
JAXWSClientMetaDataBuilder.rebuildEndpointMetaData(EndpointMetaData, Class<?>) line: 292
ServiceDelegateImpl.getPortInternal(EndpointMetaData, Class<T>) line: 274
ServiceDelegateImpl.getPort(QName, Class<T>) line: 200
A JProbe analysis (see attached file) revealed that actually most of the time (96.4%) of service.getPort() is spent in JAXBContext.newInstance(). Please see attached JProbe report.
Compared to JAX-WS RI (Metro) the performance of service.getPort() is extremely bad.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 5 months
[JBoss JIRA] Updated: (JBWS-2186) Transforming from SAAJ SOAPBody to StreamResult throws IndexOutOfBoundsException
by Alessio Soldano (JIRA)
[ http://jira.jboss.com/jira/browse/JBWS-2186?page=all ]
Alessio Soldano updated JBWS-2186:
----------------------------------
Fix Version/s: jbossws-native-3.0.3
> Transforming from SAAJ SOAPBody to StreamResult throws IndexOutOfBoundsException
> --------------------------------------------------------------------------------
>
> Key: JBWS-2186
> URL: http://jira.jboss.com/jira/browse/JBWS-2186
> Project: JBoss Web Services
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: jbossws-native
> Environment: OS X, JDK 1.5, JBoss AS 4.2.2
> Reporter: Arjen Poutsma
> Fix For: jbossws-native-3.0.3
>
> Attachments: saaj-test.zip
>
>
> When running the following program within JBoss:
> MessageFactory messageFactory = MessageFactory.newInstance();
> Transformer transformer = TransformerFactory.newInstance().newTransformer();
> SOAPMessage message = messageFactory.createMessage();
> Document document = createDocument();
> SOAPBody body = message.getSOAPBody();
> transformer.transform(new DOMSource(document), new DOMResult(body));
> body = message.getSOAPBody();
> transformer.transform(new DOMSource(body), new StreamResult(System.out));
> a IndexOutOfBoundsException is thrown on the last line. The attached zip file contains a simple Servlet which can be used to reproduce this.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 5 months
[JBoss JIRA] Updated: (JBWS-2185) NPE in JBossXSEntityResolver while deploying wsconsume generated WS
by Thomas Diesler (JIRA)
[ http://jira.jboss.com/jira/browse/JBWS-2185?page=all ]
Thomas Diesler updated JBWS-2185:
---------------------------------
Assignee: (was: Thomas Diesler)
> NPE in JBossXSEntityResolver while deploying wsconsume generated WS
> -------------------------------------------------------------------
>
> Key: JBWS-2185
> URL: http://jira.jboss.com/jira/browse/JBWS-2185
> Project: JBoss Web Services
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: jbossws-native
> Environment: Recognized on Linux 2.6.24-16/x86 using Sun's JDK 1.5.0_07-b03
> Reproduced on Windows Vista/x86 using Sun's JDK 1.5.0_14-b03
> Reporter: Maximilian Schmidt
>
> Deploying a bottom-up webservice, which uses complex messages (compiled from eGIF/UBL2 schemas), results in a NPE as shown below:
> java.lang.NullPointerException
> at org.jboss.ws.metadata.wsdl.xmlschema.JBossXSEntityResolver.getXMLInputSource(JBossXSEntityResolver.java:167)
> at org.jboss.ws.metadata.wsdl.xmlschema.JBossXSEntityResolver.resolveEntity(JBossXSEntityResolver.java:135)
> at org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaLoader.resolveDocument(Unknown Source)
> at org.apache.xerces.impl.xs.traversers.XSDHandler.resolveSchema(Unknown Source)
> at org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(Unknown Source)
> at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
> at org.jboss.ws.tools.JavaToXSD.parseSchema(JavaToXSD.java:182)
> at org.jboss.ws.tools.wsdl.WSDL11Reader.processTypes(WSDL11Reader.java:391)
> at org.jboss.ws.tools.wsdl.WSDL11Reader.processTypes(WSDL11Reader.java:406)
> at org.jboss.ws.tools.wsdl.WSDL11Reader.processDefinition(WSDL11Reader.java:172)
> at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:128)
> at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.processOrGenerateWSDL(JAXWSWebServiceMetaDataBuilder.java:373)
> at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.buildWebServiceMetaData(JAXWSWebServiceMetaDataBuilder.java:158)
> at org.jboss.ws.metadata.builder.jaxws.JAXWSServerMetaDataBuilder.setupProviderOrWebService(JAXWSServerMetaDataBuilder.java:50)
> at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderJSE.buildMetaData(JAXWSMetaDataBuilderJSE.java:63)
> at org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect.create(UnifiedMetaDataDeploymentAspect.java:66)
> at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.deploy(DeploymentAspectManagerImpl.java:115)
> at org.jboss.wsf.container.jboss42.ArchiveDeployerHook.deploy(ArchiveDeployerHook.java:97)
> at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:90)
> at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
> at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
> at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
> at $Proxy45.start(Unknown Source)
> at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
> at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
> at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
> at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
> at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
> at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
> at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
> at $Proxy9.deploy(Unknown Source)
> at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
> at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
> at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
> at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
> at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
> Generating a WSDL from classes using wsprovide and afterwards way back to code using wsconsume results in a web service that on deployment produces the very same error, although wsprovide/wsconsume work flawlessly. See the mentioned forum thread for more information or take a look at
> http://page.mi.fu-berlin.de/schmidtm/jbossws-jaxb/
> where the mentioned WSDL along with an eclipse/ant project that generates a deployable WAR can be found and used to reproduce the problem.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 5 months
[JBoss JIRA] Updated: (JBWS-751) Multiple schema imports with the same namespace
by Thomas Diesler (JIRA)
[ http://jira.jboss.com/jira/browse/JBWS-751?page=all ]
Thomas Diesler updated JBWS-751:
--------------------------------
Assignee: (was: Thomas Diesler)
> Multiple schema imports with the same namespace
> -----------------------------------------------
>
> Key: JBWS-751
> URL: http://jira.jboss.com/jira/browse/JBWS-751
> Project: JBoss Web Services
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: tools-jaxrpc
> Reporter: Thomas Diesler
>
> <types>
> <xs:schema>
> <xs:import namespace="uri:tranHistory" schemaLocation="TransactionHistoryRq.xsd"/>
> <xs:import namespace="uri:tranHistory" schemaLocation="TransactionHistoryRs.xsd"/>
> <xs:import namespace="uri:tranHistory" schemaLocation="StatusRs.xsd"/>
> </xs:schema>
> </types>
> Current handling of schema imports is incorrect, since it does not allow for multiple imports with the same namespace.
> private void handleSchemaImports(Element schemaEl, URL wsdlLoc) throws MalformedURLException
> {
> if (wsdlLoc == null)
> throw new IllegalArgumentException("Cannot process import, parent location not set");
>
> Iterator it = DOMUtils.getChildElements(schemaEl, new QName(Constants.NS_SCHEMA_XSD, "import"));
> while (it.hasNext())
> {
> Element includeEl = (Element)it.next();
> String schemaLocation = includeEl.getAttribute("schemaLocation");
> String namespace = includeEl.getAttribute("namespace");
>
> log.trace("handleSchemaImport: [namespace=" + namespace + ",schemaLocation=" + schemaLocation + "]");
>
> // Skip, let the entity resolver resolve these
> if (namespace.length() > 0 && schemaLocation.length() > 0)
> {
> URL currLoc = this.getLocationURL(wsdlLoc, schemaLocation);
> schemaLocationsMap.put(namespace, currLoc);
> }
> else
> {
> log.warn("Skip invalid schema import: [namespace=" + namespace + ",schemaLocation=" + schemaLocation + "]");
> }
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 5 months
[JBoss JIRA] Updated: (JBWS-2186) Transforming from SAAJ SOAPBody to StreamResult throws IndexOutOfBoundsException
by Thomas Diesler (JIRA)
[ http://jira.jboss.com/jira/browse/JBWS-2186?page=all ]
Thomas Diesler updated JBWS-2186:
---------------------------------
Assignee: (was: Thomas Diesler)
> Transforming from SAAJ SOAPBody to StreamResult throws IndexOutOfBoundsException
> --------------------------------------------------------------------------------
>
> Key: JBWS-2186
> URL: http://jira.jboss.com/jira/browse/JBWS-2186
> Project: JBoss Web Services
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: jbossws-native
> Environment: OS X, JDK 1.5, JBoss AS 4.2.2
> Reporter: Arjen Poutsma
> Attachments: saaj-test.zip
>
>
> When running the following program within JBoss:
> MessageFactory messageFactory = MessageFactory.newInstance();
> Transformer transformer = TransformerFactory.newInstance().newTransformer();
> SOAPMessage message = messageFactory.createMessage();
> Document document = createDocument();
> SOAPBody body = message.getSOAPBody();
> transformer.transform(new DOMSource(document), new DOMResult(body));
> body = message.getSOAPBody();
> transformer.transform(new DOMSource(body), new StreamResult(System.out));
> a IndexOutOfBoundsException is thrown on the last line. The attached zip file contains a simple Servlet which can be used to reproduce this.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 5 months