[
https://issues.apache.org/jira/browse/TUSCANY-3681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913031#action_12913031
]
Scott Kurz commented on TUSCANY-3681:
-------------------------------------
So the issue here is that you're using the SCAClient getService() API to get a
proxy to a service configured with binding.jms.
I'm a bit ignorant though, so forgive me for the dumb question to the general
ML... is it valid to use this API with a service configured with non-default
binding?
If so, it seems we simply have a bug, as the "self" reference doesn't fully
initialize in WireFormatJMSDefaultReferenceProvider.
This comment in the WireFormatJMSDefaultReferenceProvider code itself questions
if this is valid, (though I'm not sure if the scope of this question is the
same as the one I'm asking):
// TODO - can be null if it's a $self$ reference. Need to decide if
// that's valid
if (reference.getReference() == null){
interfaceContract = reference.getInterfaceContract();
return;
-- Scott
> NullPointerException in WireFormatJMSDefaultReferenceInterceptor
> ----------------------------------------------------------------
>
> Key: TUSCANY-3681
> URL: https://issues.apache.org/jira/browse/TUSCANY-3681
> Project: Tuscany
> Issue Type: Bug
> Affects Versions: Java-SCA-1.6
> Environment: JDK 1.6.0_21, Windows XP
> Reporter: Sebastian Millies
> Attachments: test.zip
>
>
> I call a service method exposed by a JMS binding. However, at the time when
> the constructor of
> org.apache.tuscany.sca.binding.jms.wireformat.jmsdefault.runtim.WireFormatJMSDefaultReferenceInterceptor
> is executed, the inputWrapperMap argument is empty (size 0), which leads to a
> NullPointerException later on when the requestMsg is constructed in method
> invokeRequest.
> The stack trace is this:
> java.lang.NullPointerException
> at
> org.apache.tuscany.sca.binding.jms.wireformat.jmsdefault.runtime.WireFormatJMSDefaultReferenceInterceptor.invokeRequest(WireFormatJMSDefaultReferenceInterceptor.java:99)
> at
> org.apache.tuscany.sca.binding.jms.wireformat.jmsdefault.runtime.WireFormatJMSDefaultReferenceInterceptor.invoke(WireFormatJMSDefaultReferenceInterceptor.java:78)
> at
> org.apache.tuscany.sca.binding.jms.provider.RRBJMSBindingInvoker.invoke(RRBJMSBindingInvoker.java:203)
> at
> org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:55)
> at
> org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:349)
> at
> org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:193)
> at $Proxy10.log_lmt(Unknown Source)
> at logtester.LogServiceTester.main(LogServiceTester.java:49)
> strangely, the Exception goes away when I specify a wire format of
> "jmsTextXML"
> on the binding (as shown below), but not if I specify "jmsdefault". I don't
> expect to be passing text messages.
> <service name="LogService">
> <interface.java interface="com.softwareag.ps.platform.log.LogService"/>
> <binding.jms
> initialContextFactory="org.apache.activemq.jndi.ActiveMQInitialContextFactory"
> jndiURL="tcp://localhost:61619">
> <destination create="ifnotexist" name="RequestQueue" type="queue"/>
> <ts:wireFormat.jmsTextXML/>
> </binding.jms>
> </service>
> I attach a very bare bones Eclipse project with one interface, one impl
> class, one composite file and one testdriver. The project uses a user library
> called TUSCANY for the Tuscany classes.
> -- Sebastian
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.