I've added you to the Tuscany JIRA group so could you see if that has made a difference (you may need to log off/on to JIRA)? This maybe a step we're missing for new committers so let me know and i'll work out exactly what needs to be done for everyone.
...ant On Jan 30, 2008 11:59 AM, Mark Combellack (JIRA) <tuscany-dev@ws.apache.org> wrote: > > [ > https://issues.apache.org/jira/browse/TUSCANY-2023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12563985#action_12563985] > > Mark Combellack commented on TUSCANY-2023: > ------------------------------------------ > > NOTE: I am going to submit a fix for this issue. However, I cannot assign > this to myself as I dont' have permission to do so in JIRA > > > NPE if callback service has multiple interfaces one of which does not > have a callback > > > ------------------------------------------------------------------------------------- > > > > Key: TUSCANY-2023 > > URL: https://issues.apache.org/jira/browse/TUSCANY-2023 > > Project: Tuscany > > Issue Type: Bug > > Components: Java SCA Java Implementation Extension > > Environment: implementation-java project trunk SVN revision > 616727 > > Linux > > Reporter: Mark Combellack > > Priority: Minor > > Fix For: Java-SCA-Next > > > > > > Whilst deploying a sample application, I ran into the following NPE. > > java.lang.NullPointerException > > at > org.apache.tuscany.sca.implementation.java.introspect.impl.ServiceProcessor.createCallback > (ServiceProcessor.java:138) > > at > org.apache.tuscany.sca.implementation.java.introspect.impl.ServiceProcessor.visitField > (ServiceProcessor.java:117) > > at > org.apache.tuscany.sca.implementation.java.impl.JavaClassIntrospectorImpl.introspectClass > (JavaClassIntrospectorImpl.java:92) > > at > org.apache.tuscany.sca.implementation.java.impl.JavaImplementationFactoryImpl.createJavaImplementation > (JavaImplementationFactoryImpl.java:53) > > at > org.apache.tuscany.sca.implementation.java.xml.JavaImplementationProcessor.resolve > (JavaImplementationProcessor.java:154) > > at > org.apache.tuscany.sca.implementation.java.xml.JavaImplementationProcessor.resolve > (JavaImplementationProcessor.java:65) > > at > org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint$LazyStAXArtifactProcessor.resolve > (DefaultStAXArtifactProcessorExtensionPoint.java:242) > > at > org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor.resolve > (ExtensibleStAXArtifactProcessor.java:108) > > at > org.apache.tuscany.sca.assembly.xml.BaseAssemblyProcessor.resolveImplementation > (BaseAssemblyProcessor.java:241) > > at > org.apache.tuscany.sca.assembly.xml.CompositeProcessor.resolve( > CompositeProcessor.java:794) > > at > org.apache.tuscany.sca.assembly.xml.CompositeProcessor.resolve( > CompositeProcessor.java:74) > > at > org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor.resolve > (ExtensibleStAXArtifactProcessor.java:108) > > at > org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor.resolve( > CompositeDocumentProcessor.java:113) > > at > org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor.resolve( > CompositeDocumentProcessor.java:47) > > at > org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor.resolve > (ExtensibleURLArtifactProcessor.java:86) > > at > org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.processResolvePhase > (ContributionServiceImpl.java:423) > > at > org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.addContribution > (ContributionServiceImpl.java:333) > > at > org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.contribute > (ContributionServiceImpl.java:155) > > at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain > .<init>(DefaultSCADomain.java:125) > > at > org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance( > SCADomain.java:230) > > ... 22 more > > The problem is caused by having a Service Implementation that implements > two interfaces. One interface has a callback and the other interface does > not. > > The code in the ServiceProcessor is: > > 1 for (Service service : type.getServices()) { > > 2 JavaInterface javaInterface = > (JavaInterface)service.getInterfaceContract().getCallbackInterface(); > > 3 if (baseType == javaInterface.getJavaClass()) { > > 4 callbackService = service; > > 5 } > > 6 } > > Line 1: Check each Service > > Line 2: Get the callback interface for the Service > > Line 3: See if the Java Class for the callback interface matches what we > are looking for > > The NPE is caused by line 3 when inspecting the second interface that > does not have a callback. The issue is that javaInterface will be null since > there is no callback. > > The fix is simple - simply add a null check > > -- > This message is automatically generated by JIRA. > - > You can reply to this email to add a comment to the issue online. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >