tuscany-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Millies, Sebastian" <Sebastian.Mill...@softwareag.com>
Subject Contributions and Runtime Classpath
Date Wed, 07 Dec 2011 15:27:59 GMT
Hello there,

I am having a class loading problem, and want to make sure that I understand
what a contribution is.

My setup is as follows: At some point I want my SCA code to dynamically load
classes (customer-specific stuff provided by the customer at deployment time).
For that purpose, jar-files are put in some extensions directory, and are loaded
when the node starts:

   File extensionsDir = new File( "extensions" );
    if( extensionsDir.exists() && extensionsDir.isDirectory() && extensionsDir.canRead()
) {
      for( File extension : extensionsDir.listFiles( EXTENSIONS_FILTER ) ) {
        URL contribURL = extension.toURI().toURL();
        contributions.add( new SCAContribution( contribURL.toExternalForm(), contribURL.toExternalForm()
) );

    SCANode node = factory.createSCANode( compositeURI,
                                          contributions.toArray( new SCAContribution[contributions.size()]
) );

When the node starts, one sees  the jars being loaded:
INFO: Loading contribution: file:/D:/foo/extensions/myclasses.jar

Is this not sufficient to make these classes available on the runtime classpath?
When I do

I get a ClassNotFoundException. What may I be overlooking?

n  Sebastian
IDS Scheer Consulting GmbH
Geschäftsführer/Managing Directors: Kamyar Niroumand, Ivo Totev
Sitz/Registered office: Altenkesseler Straße 17, 66115 Saarbrücken, Germany - Registergericht/Commercial
register: Saarbrücken HRB 19681

View raw message