Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [riena-dev] Always said interface not visible from class loader!

Hi,

I believe I only saw the MANIFEST.MF from the client not from common in your email. A usual error is that people define Eclipse-RegisterBuddy for commnication.core in their common bundle but not Require-Bundle for communication.core. How Buddy class loading only works if you all have a depenendy on the bundle that you register as a buddy.

if that does not help, please post the manifest.mf from your common bundle....

christian

Am 10.01.2010 um 17:02 schrieb 广亮 梁:

This problem is very annoying
I have tried adding Eclipse-RegisterBuddy: org.eclipse.riena.communication.core to the manifest.mf of my common bundle.
But the exception still occurred when creating the proxy!
---------------------------------
The following is the stacktrace:
---------------------------------
org.eclipse.core.runtime.CoreException: Plug-in com.gdb.eis.gui.client was unable to load class com.gdb.eis.gui.client.GdbUIClientApplication.
 at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:180)
 at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:162)
 at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:874)
 at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
 at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
 at org.eclipse.equinox.internorg.eclipse.core.runtime.CoreException: Plug-in com.gdb.eis.gui.client was unable to load class com.gdb.eis.gui.client.GdbUIClientApplication.
 at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:180)
 at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:162)
 at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:874)
 at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
 at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
 at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:189)
 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
 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.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
 at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
 at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
 at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
Caused by: org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle com.gdb.eis.gui.client (47).
 at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:125)
 at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)
 at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:211)
 at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:376)
 at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:452)
 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(Unknown Source)
 at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:321)
 at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:231)
 at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1193)
 at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:160)
 ... 16 more
Caused by: org.osgi.framework.BundleException: Exception in com.gdb.eis.gui.client.Activator.start() of bundle com.gdb.eis.gui.client.
 at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:805)
 at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:754)
 at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
 at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280)
 at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:408)
 at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111)
 ... 28 more
Caused by: java.lang.IllegalArgumentException: interface com.gdb.eis.common.service.ISystemService is not visible from class loader
 at java.lang.reflect.Proxy.getProxyClass(Unknown Source)
 at java.lang.reflect.Proxy.newProxyInstance(Unknown Source)
 at com.caucho.hessian.client.HessianProxyFactory.create(HessianProxyFactory.java:394)
 at com.caucho.hessian.client.HessianProxyFactory.create(HessianProxyFactory.java:354)
 at org.eclipse.riena.internal.communication.factory.hessian.RemoteServiceFactoryHessian.createProxy(RemoteServiceFactoryHessian.java:64)
 at org.eclipse.riena.communication.core.factory.RemoteServiceFactory.createProxy(RemoteServiceFactory.java:236)
 at org.eclipse.riena.communication.core.factory.RemoteServiceFactory.createAndRegisterProxy(RemoteServiceFactory.java:152)
 at org.eclipse.riena.communication.core.factory.RemoteServiceFactory.createAndRegisterProxy(RemoteServiceFactory.java:129)
 at org.eclipse.riena.communication.core.factory.ProxyFactory.andStart(ProxyFactory.java:68)
 at com.gdb.eis.gui.client.Activator.start(Activator.java:30)
 at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:782)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:773)
 ... 33 moreal.app.EclipseAppHandle.run(EclipseAppHandle.java:189)
 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
 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.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
 at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
 at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
 at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
Caused by: org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle com.gdb.eis.gui.client (47).
 at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:125)
 at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)
 at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:211)
 at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:376)
 at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:452)
 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(Unknown Source)
 at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:321)
 at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:231)
 at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1193)
 at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:160)
 ... 16 more
Caused by: org.osgi.framework.BundleException: Exception in com.gdb.eis.gui.client.Activator.start() of bundle com.gdb.eis.gui.client.
 at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:805)
 at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:754)
 at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
 at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280)
 at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:408)
 at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111)
 ... 28 more
Caused by: java.lang.IllegalArgumentException: interface com.gdb.eis.common.service.ISystemService is not visible from class loader
 at java.lang.reflect.Proxy.getProxyClass(Unknown Source)
 at java.lang.reflect.Proxy.newProxyInstance(Unknown Source)
 at com.caucho.hessian.client.HessianProxyFactory.create(HessianProxyFactory.java:394)
 at com.caucho.hessian.client.HessianProxyFactory.create(HessianProxyFactory.java:354)
 at org.eclipse.riena.internal.communication.factory.hessian.RemoteServiceFactoryHessian.createProxy(RemoteServiceFactoryHessian.java:64)
 at org.eclipse.riena.communication.core.factory.RemoteServiceFactory.createProxy(RemoteServiceFactory.java:236)
 at org.eclipse.riena.communication.core.factory.RemoteServiceFactory.createAndRegisterProxy(RemoteServiceFactory.java:152)
 at org.eclipse.riena.communication.core.factory.RemoteServiceFactory.createAndRegisterProxy(RemoteServiceFactory.java:129)
 at org.eclipse.riena.communication.core.factory.ProxyFactory.andStart(ProxyFactory.java:68)
 at com.gdb.eis.gui.client.Activator.start(Activator.java:30)
 at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:782)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:773)
 ... 33 more
-----------------------------
Activator.java
-----------------------------
public class Activator extends AbstractRienaUIPlugin {
 private static Activator plugin;
 /**
  * The constructor
  */
 public Activator() {
 }
 /*
  * (non-Javadoc)
  * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
  */
 @Override
 public void start(BundleContext context) throws Exception {
  System.out.println("start");
  super.start(context);
  // hack to force riena.core to load
  plugin = this;
  
  Register
  .remoteProxy(ISystemService.class)
  .usingUrl("http://localhost:8080/hessian/SystemServiceWS").withProtocol("hessian").andStart(context);
 }
 /*
  * (non-Javadoc)
  * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
  */
 public void stop(BundleContext context) throws Exception {
  super.stop(context);
  plugin = null;
  System.out.println("stop");
 }
 
 /**
  * @return the shared instance
  */
 public static Activator getDefault() {
  return plugin;
 }
}
--------------------------------------
MANIFEST.MF
-------------------------------------
Manifest-Version: 1.0
Bundle-Name: Gdb Demo
Bundle-Activator: com.gdb.eis.gui.client.Activator
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: compeople AG
Bundle-ManifestVersion: 2
Bundle-SymbolicName: com.gdb.eis.gui.client;singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.core.runtime,
 org.eclipse.ui,
 org.eclipse.ui.workbench,
 org.eclipse.riena.core,
 org.eclipse.riena.communication.core,
 org.eclipse.core.databinding,
 org.eclipse.core.databinding.beans,
 org.eclipse.jface.databinding,
 org.eclipse.riena.client;bundle-version="1.0.0",
 org.eclipse.equinox.security;bundle-version="1.0.1"
Bundle-Version: 1.1.0
Bundle-ClassPath: .
Import-Package: com.gdb.eis.common.service,
 com.gdb.eis.common.service.po,
 com.gdb.eis.common.util



好玩贺卡等你发,邮箱贺卡全新上线!<ATT00001.c>


Back to the top