On 5/30/08, roshan joseph <[EMAIL PROTECTED]> wrote: > > Hi Rajani, > The java component I uses has a jms binding and this is invoked by a > message send to the queue. So by making this an OSGI bundle, will I be able > to get the java component working?
Yes, I hope so. If what you are looking is a dummy bundle with the manifest file, I can try > that way, will update you soon. The bundle should import the sdo packages (same as your other OSGi bundle). And then I hope they will be able to interoperate. I do need to look at fixing this properly in Tuscany, but the simpler fix for now for you to make progress will be to use a bundle for your java component. Regards > Roshan > > > "Rajini Sivaram (JIRA)" <tuscany-dev@ws.apache.org> wrote: > > [ > https://issues.apache.org/jira/browse/TUSCANY-2307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12595937#action_12595937] > > Rajini Sivaram commented on TUSCANY-2307: > ----------------------------------------- > > Roshan, > > Is the Java component (which is invoking the OSGi service) inside an OSGi > bundle contribution? If not, will it be possible to make it an OSGi bundle > contribution (jar file with OSGi manifest headers)? > > > > > Calling OSGi Service with SDO data > > ---------------------------------- > > > > Key: TUSCANY-2307 > > URL: https://issues.apache.org/jira/browse/TUSCANY-2307 > > Project: Tuscany > > Issue Type: Bug > > Components: Java SCA OSGi Integration > > Affects Versions: Java-SCA-1.2 > > Environment: Windows XP, Java Tuscany Sca runtime > > Reporter: Roshan Joseph > > Fix For: Java-SDO-Next > > > > > > Hi, > > I am trying to call an OSGi service from my sca java service running in > the Tuscany SCA runtime. I uses the itest\osgi-implementation sample for SDO > as my osgi service and calls the getGreetings method with SDO data as the > input parameter for this call. > > I am reusing the HelloWorldService.jar which is in the > itest\osgi-implementation folder for my OSGi service component. The > composite file of my java service is something like as shown below. > > > xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0" xmlns:dbsdo=" > http://tuscany.apache.org/xmlns/sca/databinding/sdo/1.0" > > xmlns:hw="http://com.siemens.hintegration" > name="motionreactorComposite"> > > > > > > > > > > > > > > > > > jndiURL="tcp://localhost:61616"> > > > > > > > > > > > > > > > > > > > > > bundleSymbolicName="ds.helloworld.sdo.HelloWorldService"/> > > > > > > > > The actual code in my java component where I make the call to OSGi > service is as follows: > > // Call the OSGi service > > Name name = HelloworldFactory.INSTANCE.createName(); > > name.setFirst(firstName); > > name.setLast(lastName); > > String hello = helloWorldService.getGreetings(name); > > getLogger().info("OSGi iTest Sample Call: " + Hello); > > getLogger().info("OsgiService called"); > > In the debug mode when the call reaches the OSgi component, I get a > illegal argument exception. The error log looks like as shown below. > > - Exception occured while calling OSGi service > > java.lang.IllegalArgumentException: argument type mismatch > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > > at java.lang.reflect.Method.invoke(Unknown Source) > > at > org.apache.tuscany.sca.implementation.osgi.invocation.OSGiTargetInvoker.invokeMethod(OSGiTargetInvoker.java:171) > > at > org.apache.tuscany.sca.implementation.osgi.invocation.OSGiRemotableInvoker.invokeMethod(OSGiRemotableInvoker.java:75) > > at > org.apache.tuscany.sca.implementation.osgi.invocation.OSGiTargetInvoker.invokeTarget(OSGiTargetInvoker.java:143) > > at > org.apache.tuscany.sca.implementation.osgi.invocation.OSGiTargetInvoker.invoke(OSGiTargetInvoker.java:188) > > at > org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:103) > > at > org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61) > > at > org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:103) > > at > org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:286) > > at > org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154) > > at $Proxy8.getGreetings(Unknown Source) > > at > com.siemens.hintegration.MotionReactorImpl.getGreetings(MotionReactorImpl.java:178) > > at > com.siemens.hintegration.MotionReactorImpl.onMotionDetected(MotionReactorImpl.java:111) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > > at java.lang.reflect.Method.invoke(Unknown Source) > > at > org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:109) > > at > org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:108) > > at > org.apache.tuscany.sca.core.invocation.RuntimeWireInvoker.invoke(RuntimeWireInvoker.java:110) > > at > org.apache.tuscany.sca.core.invocation.RuntimeWireInvoker.invoke(RuntimeWireInvoker.java:85) > > at > org.apache.tuscany.sca.core.invocation.RuntimeWireInvoker.invoke(RuntimeWireInvoker.java:79) > > at > org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.invoke(RuntimeWireImpl.java:134) > > at > org.apache.tuscany.sca.binding.jms.provider.JMSBindingListener.invokeService(JMSBindingListener.java:114) > > at > org.apache.tuscany.sca.binding.jms.provider.JMSBindingListener.onMessage(JMSBindingListener.java:67) > > at > org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:854) > > at > org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:99) > > at > org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:166) > > at > org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:117) > > at > org.apache.activemq.thread.PooledTaskRunner.access$100(PooledTaskRunner.java:26) > > at > org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:44) > > at > edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987) > > at > edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528) > > at java.lang.Thread.run(Unknown Source) > > Regards > > Roshan > > -- > This message is automatically generated by JIRA. > - > You can reply to this email to add a comment to the issue online. > > > > -- Thank you... Regards, Rajini