Skip to main content

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

Hi Giorgio,

I don't have that many ideas concerning your problem, but it seems to be some ClassLoader problem. Can you please ensure the following:

- is the package containing your DataSourceConnectionConfigPlugin implementation exported in your bundle ?
- do you import the packages org.eclipse.smila.connectivity.framework.schema.config and org.eclipse.smila.connectivity.framework.schema.config.interfaces ?
- do your build.properties include plugin.xml and schemas in bin.includes ?


This issue could also be an accidental limitation, that one would have to follow the name pattern " org.eclipse.smila.connectivity.framework.agent.*". I don't expect this, but I have not implemented an Agent or Crawler with another prefix as you did.


Could you provide a complete stack trace for the exception along with your DataSourceConfiguration file, schema files and manifest ?

Bye,
Daniel

-----Ursprüngliche Nachricht-----
Von: smila-user-bounces@xxxxxxxxxxx [mailto:smila-user-bounces@xxxxxxxxxxx] Im Auftrag von Giorgio Sironi
Gesendet: Freitag, 30. April 2010 19:06
An: Smila project user mailing list
Betreff: [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
_______________________________________________
smila-user mailing list
smila-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/smila-user


Back to the top