[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [smila-user] Agent configuration loading
|
On Tue, May 4, 2010 at 9:31 AM, <daniel.stucky@xxxxxxxxxxxxx> wrote:
> - is the package containing your DataSourceConnectionConfigPlugin implementation exported in your bundle ?
This was ok.
> - do you import the packages org.eclipse.smila.connectivity.framework.schema.config and org.eclipse.smila.connectivity.framework.schema.config.interfaces ?
This was ok, too.
> - do your build.properties include plugin.xml and schemas in bin.includes ?
build.properties was missing nearly everything, now it is:
source.. = code/src/,\
code/gen/
output.. = bin/
bin.includes = META-INF/, \
schemas/, \
plugin.xml, \
.
but still the exception is the same:
org.eclipse.smila.connectivity.framework.schema.exceptions.SchemaNotFoundException:
JAXB Schema is not found in the bundle plug-in
"it.polimi.chansonnier.agent"
at org.eclipse.smila.connectivity.framework.schema.internal.JaxbPluginContext.initilize(JaxbPluginContext.java:113)
at org.eclipse.smila.connectivity.framework.schema.internal.JaxbPluginContext.createValidatingUnmarshaller(JaxbPluginContext.java:175)
at org.eclipse.smila.connectivity.framework.schema.ConfigurationLoader.unmarshall(ConfigurationLoader.java:139)
at it.polimi.chansonnier.agent.test.LinkGrabberAgentTest.setUp(LinkGrabberAgentTest.java:57)
at junit.framework.TestCase.runBare(TestCase.java:128)
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:120)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:62)
at org.eclipse.pde.internal.junit.runtime.CoreTestApplication.run(CoreTestApplication.java:23)
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.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:574)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:32)
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(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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)
The problem, however, isn't there. If I edit
AbstractPluginRegistryBase::initialize() like this:
final IExtensionPoint extensionPoint =
Platform.getExtensionRegistry().getExtensionPoint(getExtensionPointFullName());
System.out.println(extensionPoint.getUniqueIdentifier());
final IExtension[] extensions = extensionPoint.getExtensions();
for (final IExtension extension : extensions) {
try {
System.out.println("Messing with: " + extension.getUniqueIdentifier());
System.out.println(" namespace: " +
extension.getNamespaceIdentifier());
System.out.println(" simple: " + extension.getSimpleIdentifier());
String identifier = extension.getUniqueIdentifier();
I get this output:
org.eclipse.smila.connectivity.framework.schema.extension
Messing with: it.polimi.chansonnier.agent.it.polimi.chansonnier.agent
namespace: it.polimi.chansonnier.agent
simple: it.polimi.chansonnier.agent
Messing with: org.eclipse.smila.connectivity.framework.crawler.web
namespace: org.eclipse.smila.connectivity.framework.crawler
simple: web
Messing with: org.eclipse.smila.connectivity.framework.crawler.jdbc
namespace: org.eclipse.smila.connectivity.framework.crawler
simple: jdbc
Messing with: org.eclipse.smila.connectivity.framework.crawler.filesystem
namespace: org.eclipse.smila.connectivity.framework.crawler
simple: filesystem
Messing with: org.eclipse.smila.connectivity.framework.agent.mock
namespace: org.eclipse.smila.connectivity.framework.agent
simple: mock
Messing with: org.eclipse.smila.connectivity.framework.agent.feed
namespace: org.eclipse.smila.connectivity.framework.agent
simple: feed
Messing with: org.eclipse.smila.connectivity.framework.agent.jobfile
namespace: org.eclipse.smila.connectivity.framework.agent
simple: jobfile
where namespace for my bundle is the bundle symbolic name in the
manifest, and simple is the id attribute in plugin.xml. The resulting
concatenation is what ConfigurationLoader looks for when the bundle
name is specified in a configuration file with <SchemaId>. So either
the assumption that the unique identifier of an extension point is its
bundle name is incorrect, or we should understand why
Platform.getExtensionRegistry().getExtensionPoint(...).getExtensions()
has an inconsistent behavior.
--
Giorgio Sironi
Piccolo Principe & Web Engineer
http://giorgiosironi.blogspot.com
http://twitter.com/giorgiosironi