[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.technology.ecf] Re: Initial setup problems

ken, scott,

the reason for this behaviour is (without looking at the code),
that the test plugin declares an extension for the org.eclipse.ui.startup
extension point. this extension will start/initialize the plugin even
if it is not used at once. a class is specified there that implements
the IStartup interface.

most probably the name of the plugin class is given there,
but the class does NOT implement the IStartup interface.

when the eclipse ui plugin reads its extensions, it tries to
instantiate the plugin class, cast it to IStartup - and fails!
failing during startup means, that the plugin classloader is NOT
initialized! subsequent calls into the plugin's code will end
in NoClassLoaderFound or ClassNotFound exceptions.

you should implement IStartup (due to a bug in the eclipse startup
sequence preferably NOT the plugin class) and leave the earlyStartup()
method EMPTY! initialization code should go into start(...) or startup(...),
the presence of IStartup/earlyStartup() is enough to make the normal
plugin startup happen (with calls to start(...) and startup(...)).

hope this helps ;-)

cheers
/eike



Ken Gilmer wrote:

Hey Scott,

Thanks for your help. Yeah, I tried that as well. When I run the "JUnit Plug-in Test" on AllTests.java, I get the following console output. I am using OS X.
Thanks
ken


"Error: " java.lang.IllegalArgumentException: No ClassLoader found for testplugin: org.eclipse.ecf.test
Unhandled Exception
Reason:
Unable to execute early startup code for an extension
Bad extension specification
Reason:
startup class must implement org.eclipse.ui.IStartup
Unhandled Exception
Reason:
Unable to execute early startup code for an extension
Bad extension specification
Reason:
startup class must implement org.eclipse.ui.IStartup
Unhandled Exception
Reason:
Unable to execute early startup code for an extension
Bad extension specification
Reason:
startup class must implement org.eclipse.ui.IStartup
Unhandled Exception
Reason:
Unable to execute early startup code for an extension
Bad extension specification
Reason:
startup class must implement org.eclipse.ui.IStartup
Unhandled Exception
Reason:
Unable to execute early startup code for an extension
Bad extension specification
Reason:
startup class must implement org.eclipse.ui.IStartup
Unhandled Exception
Reason:
Unable to execute early startup code for an extension
Bad extension specification
Reason:
startup class must implement org.eclipse.ui.IStartup
Unhandled Exception
Reason:
Unable to execute early startup code for an extension
Bad extension specification
Reason:
startup class must implement org.eclipse.ui.IStartup
Unhandled Exception
Reason:
Unable to execute early startup code for an extension
Bad extension specification
Reason:
startup class must implement org.eclipse.ui.IStartup
Unhandled Exception
Reason:
Unable to execute early startup code for an extension
Bad extension specification
Reason:
startup class must implement org.eclipse.ui.IStartup
Bad extension specification
Reason:
startup class must implement org.eclipse.ui.IStartup
Bad extension specification
Reason:
startup class must implement org.eclipse.ui.IStartup



Scott Lewis wrote:

Hi Ken/all,


Ken Gilmer wrote:

Hello All!

I am just getting started evaluating ECF and have done the initial checkout of code. When I run the JUnit test suite I get this error on the testCreateSharedObject test. Sure enough org.eclipse.ecf.provider.generic.Client does not exist in my source tree. Running AllTest produces errors for all tests of a similiar nature. I used the PSF file to import the source into 3.1M4 today. Are there additional resources required?


I think that the problem is just that you need to run these tests via the Eclipse 'JUnit Plugin-Test' from the Run/Debug rather than the plain 'ol 'JUnit Test'. This just runs the JUnit tests with a different (eclipse runtime) context.


The reason for this is that the JUnit Plugin-Test creates a whole new workspace, and initializes all the plugins in that workspace. The ECF SharedObjectContainerFactory is initialized by the OSGI plugin loading process (since other plugins implement the containerFactory extension point), and so it doesn't get initialized when run as a simple JUnit test.


If this doesn't help please let all know.


Scott



TIA, Ken Gilmer


org.eclipse.ecf.core.SharedObjectContainerInstantiationException: SharedObjectContainerDescription named 'org.eclipse.ecf.provider.generic.Client' not found
at

org.eclipse.ecf.core.SharedObjectContainerFactory.getDescriptionByName(SharedObjectContainerFactory.java:131)




at

org.eclipse.ecf.core.SharedObjectContainerFactory.makeSharedObjectContainer(SharedObjectContainerFactory.java:217)




at

org.eclipse.ecf.test.CreateSharedObjectTest.testCreateSharedObject(CreateSharedObjectTest.java:36)




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:324) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at

org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:474)




at

org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:342)




at

org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:194)