Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-3595

Problems with REST binding in OSGi

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Java-SCA-2.0-M5
    • Fix Version/s: Java-SCA-1.x
    • Labels:
    • Environment:
      Tuscany started with: java -jar modules/osgi-3.5.0-v20090520.jar -clean -console -configuration features/configuration

      Description

      Exporting a REST service via an OSGi bundle fails.

      At first I got following exception:

      java.lang.IllegalStateException: java.lang.NoClassDefFoundError: org/apache/tuscany/sca/interfacedef/java/JavaInterface
      at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:173)
      at org.apache.tuscany.sca.node.osgi.impl.NodeManager.bundleStarted(NodeManager.java:117)
      at org.apache.tuscany.sca.node.osgi.impl.NodeManager.bundleChanged(NodeManager.java:139)
      at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:916)
      at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:220)
      at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149)
      at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEventPrivileged(Framework.java:1350)
      at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1301)
      at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:362)
      at org.eclipse.osgi.framework.internal.core.AbstractBundle.updateWorker(AbstractBundle.java:625)
      at org.eclipse.osgi.framework.internal.core.AbstractBundle.update(AbstractBundle.java:572)
      at org.eclipse.osgi.framework.internal.core.AbstractBundle.update(AbstractBundle.java:555)
      at org.apache.felix.shell.impl.UpdateCommandImpl.execute(UpdateCommandImpl.java:96)
      at org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Activator.java:286)
      at org.apache.felix.shell.tui.Activator$ShellTuiRunnable.run(Activator.java:184)
      at java.lang.Thread.run(Thread.java:637)
      Caused by: java.lang.NoClassDefFoundError: org/apache/tuscany/sca/interfacedef/java/JavaInterface
      at org.apache.tuscany.sca.binding.rest.provider.RESTServiceBindingProvider.registerWithJAXRS(RESTServiceBindingProvider.java:217)
      at org.apache.tuscany.sca.binding.rest.provider.RESTServiceBindingProvider.start(RESTServiceBindingProvider.java:143)
      at org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl$1.run(CompositeActivatorImpl.java:423)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.startEndpoint(CompositeActivatorImpl.java:421)
      at org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.start(CompositeActivatorImpl.java:377)
      at org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.start(CompositeActivatorImpl.java:309)
      at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:147)
      ... 15 more

      After adding org.apache.tuscany.sca.interfacedef.java;version="2.0.0" to the MANIFEST.MF of tuscany-binding-rest-runtime the next error occured:

      java.lang.IllegalStateException: java.lang.NoClassDefFoundError: org/apache/tuscany/sca/core/invocation/ProxyFactory
      at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:173)
      at org.apache.tuscany.sca.node.osgi.impl.NodeManager.bundleStarted(NodeManager.java:117)
      at org.apache.tuscany.sca.node.osgi.impl.NodeManager.bundleChanged(NodeManager.java:139)
      at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:916)
      at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:220)
      at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149)
      at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEventPrivileged(Framework.java:1350)
      at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1301)
      at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:362)
      at org.eclipse.osgi.framework.internal.core.AbstractBundle.updateWorker(AbstractBundle.java:625)
      at org.eclipse.osgi.framework.internal.core.AbstractBundle.update(AbstractBundle.java:572)
      at org.eclipse.osgi.framework.internal.core.AbstractBundle.update(AbstractBundle.java:555)
      at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._update(FrameworkCommandProvider.java:380)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter.java:155)
      at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:303)
      at org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(FrameworkConsole.java:288)
      at org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:224)
      at java.lang.Thread.run(Thread.java:637)
      Caused by: java.lang.NoClassDefFoundError: org/apache/tuscany/sca/core/invocation/ProxyFactory
      at org.apache.tuscany.sca.binding.rest.provider.RESTServiceBindingProvider.registerWithJAXRS(RESTServiceBindingProvider.java:222)
      at org.apache.tuscany.sca.binding.rest.provider.RESTServiceBindingProvider.start(RESTServiceBindingProvider.java:143)
      at org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl$1.run(CompositeActivatorImpl.java:423)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.startEndpoint(CompositeActivatorImpl.java:421)
      at org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.start(CompositeActivatorImpl.java:377)
      at org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.start(CompositeActivatorImpl.java:309)
      at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:147)
      ... 21 more
      Caused by: java.lang.ClassNotFoundException: org.apache.tuscany.sca.core.invocation.ProxyFactory
      at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:489)
      at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:405)
      at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:393)
      at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
      ... 29 more

      Adding org.apache.tuscany.sca.core.invocation to the MANIFEST.MF did not solve that issue.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                lresende Luciano Resende
                Reporter:
                alexblotny Alexander Blotny
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: