tuscany-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Clough (JIRA)" <...@tuscany.apache.org>
Subject [jira] Commented: (TUSCANY-3378) NPE in XSDModelResolver when many schemas
Date Fri, 20 Nov 2009 16:02:39 GMT

    [ https://issues.apache.org/jira/browse/TUSCANY-3378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780615#action_12780615
] 

Martin Clough commented on TUSCANY-3378:
----------------------------------------

The problem is caused because the facade schema does not have a source URI. This can be fixed
like this:

          if (facade == null) {
              // This will add the facade into the collection
              facade = new XmlSchema(ns, AGGREGATED_XSD, schemaCollection);
+             // Set Source URI on facade to prevent NPE in loadOnDemand 
+             facade.setSourceURI(AGGREGATED_XSD); 
          }



> NPE in XSDModelResolver when many schemas
> -----------------------------------------
>
>                 Key: TUSCANY-3378
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3378
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core Runtime
>    Affects Versions: Java-SCA-1.5
>            Reporter: Martin Clough
>
> Using Tuscany with a large publicly-available schema with over 400 schemas and WSDL files,
it throws a NPE in XSDModel Resolver:
> Caused by: java.lang.NullPointerException
> 	at org.apache.tuscany.sca.xsd.xml.XSDModelResolver.loadOnDemand(XSDModelResolver.java:190)
> 	at org.apache.tuscany.sca.xsd.xml.XSDModelResolver.aggregate(XSDModelResolver.java:236)
> 	at org.apache.tuscany.sca.xsd.xml.XSDModelResolver.resolveModel(XSDModelResolver.java:110)
> 	at org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver.resolveModel(ExtensibleModelResolver.java:179)
> 	at org.apache.tuscany.sca.interfacedef.wsdl.xml.WSDLModelResolver.readInlineSchemas(WSDLModelResolver.java:491)
> 	at org.apache.tuscany.sca.interfacedef.wsdl.xml.WSDLModelResolver.loadDefinition(WSDLModelResolver.java:427)
> 	at org.apache.tuscany.sca.interfacedef.wsdl.xml.WSDLModelResolver.aggregate(WSDLModelResolver.java:263)
> 	at org.apache.tuscany.sca.interfacedef.wsdl.xml.WSDLModelResolver.resolveModel(WSDLModelResolver.java:297)
> 	at org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver.resolveModel(ExtensibleModelResolver.java:179)
> 	at org.apache.tuscany.sca.interfacedef.wsdl.xml.WSDLInterfaceProcessor.resolveWSDLInterface(WSDLInterfaceProcessor.java:244)
> 	at org.apache.tuscany.sca.interfacedef.wsdl.xml.WSDLInterfaceProcessor.resolve(WSDLInterfaceProcessor.java:300)
> 	at org.apache.tuscany.sca.interfacedef.wsdl.xml.WSDLInterfaceProcessor.resolve(WSDLInterfaceProcessor.java:59)
> 	at org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint$LazyStAXArtifactProcessor.resolve(DefaultStAXArtifactProcessorExtensionPoint.java:388)
> 	at org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor.resolve(ExtensibleStAXArtifactProcessor.java:183)
> 	at org.apache.tuscany.sca.assembly.xml.BaseAssemblyProcessor.resolveContracts(BaseAssemblyProcessor.java:444)
> 	at org.apache.tuscany.sca.assembly.xml.CompositeProcessor.resolve(CompositeProcessor.java:988)
> 	at org.apache.tuscany.sca.assembly.xml.CompositeProcessor.resolve(CompositeProcessor.java:89)
> 	at org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint$LazyStAXArtifactProcessor.resolve(DefaultStAXArtifactProcessorExtensionPoint.java:388)
> 	at org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor.resolve(ExtensibleStAXArtifactProcessor.java:183)
> 	at org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor.resolve(CompositeDocumentProcessor.java:222)
> 	at org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor.resolve(CompositeDocumentProcessor.java:58)
> 	at org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor.resolve(ExtensibleURLArtifactProcessor.java:106)
> 	at org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.processResolvePhase(ContributionServiceImpl.java:625)
> 	at org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.addContribution(ContributionServiceImpl.java:430)
> 	at org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.contribute(ContributionServiceImpl.java:198)
> 	at org.apache.tuscany.sca.node.impl.NodeImpl.configureNode(NodeImpl.java:529)
> 	at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:377)
> 	... 30 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message