Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[smila-user] Agent configuration loading

I'm now tyring to run a unit test as a Junit Plugin Test for a custom
Agent. I copied nearly everything from the wiki and the FeedAgent test
bundle.
When calling ConfigurationLoader.unmarshall(), however, it says:
[ERROR] ConfigurationLoader -
org.eclipse.smila.connectivity.framework.schema.exceptions.SchemaNotFoundException:
JAXB Schema is not found in the bundle plug-in "it.polimi.chansonnier"
which is the bundle that contains my Agent, and that I set in my
example configuration loaded here:
<DataSourceConnectionConfig
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:noNamespaceSchemaLocation="../it.polimi.chansonnier/schemas/YoutubeLinkGrabberAgentDataSourceConnectionConfigSchema.xsd"
>
  <DataSourceID>foo</DataSourceID>
  <SchemaID>it.polimi.chansonnier</SchemaID>
  <DataConnectionID>
    <Agent>LinkGrabberAgent</Agent>
  </DataConnectionID>
  <DeltaIndexing>full</DeltaIndexing>
  <Attributes></Attributes>
  <Process></Process>
</DataSourceConnectionConfig>

I hacked AbstractPluginRegistryBase to see how it was loading the configuration,
  protected void initialize() {
    final IExtensionPoint extensionPoint =
      Platform.getExtensionRegistry().getExtensionPoint(getExtensionPointFullName());
    System.out.println(extensionPoint);
     ....
The result:
Messing with: it.polimi.chansonnier4.it.polimi.chansonnier1
Messing with: org.eclipse.smila.connectivity.framework.crawler.web
Messing with: org.eclipse.smila.connectivity.framework.crawler.jdbc
Messing with: org.eclipse.smila.connectivity.framework.crawler.filesystem
Messing with: org.eclipse.smila.connectivity.framework.agent.mock
Messing with: org.eclipse.smila.connectivity.framework.agent.feed
Messing with: org.eclipse.smila.connectivity.framework.agent.jobfile

(I added different suffixes to the occurrences of
it.polimi.chansonnier to see which were the one concatenated to form
an incorrect bundle name). The first (4) is the bundle name from its
MANIFEST.MF, while the second (1) is the id attribute of extension in
plugin.xml. I don't know why they are both used by concatenation
instead of using one of them like in the other bundles...

-- 
Giorgio Sironi
Piccolo Principe & Web Engineer
http://giorgiosironi.blogspot.com
http://twitter.com/giorgiosironi


Back to the top