<p>For development/testing I want to load the the BIRT runtime with a separate classloader into a commandline app. Unfortunately [font="'courier new', courier, monospace;"]Platform.createFactoryObject()[/font] returns null

.<br />
<br />
But from the beginning:<br />
I've deployed for production a BirtService including the BIRT runtime as MBean (inside a SAR file) on JBoss 5.1 and it's working fine. All the jars of the lib folder of the runtime are placed at the root folder of the SAR and my classes (like the BirtService and the MBean) are placed inside the SAR with their packages as folders (as normally inside a JAR).<br />
<br />
For development/testing I want to load the content of this SAR with a separate classloader into a commandline app. Therefore I've extracted the SAR to a folder, created a URLClassLoader populated with the URLs of all the extracted JARs and the folder itself to get the contained classes.<br />
<br />
Now I'm able to load my BirtService using this CL by reflection and call it to start the Platform. But </p><pre class="_prettyXprint">Platform.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY)</pre><p>is failing with a </p><pre class="_prettyXprint">java.lang.ClassNotFoundException: org.eclipse.osgi.util.NLS</pre><p>If I'm creating a folder "plugins" inside the extraction folder I'm getting </p><pre class="_prettyXprint">org.eclipse.birt.core.framework.FrameworkException: Could not find the Framework...</pre><p>If I'm copying all the JARs to the "plugins" folder (now I have them twice!) createFactoryObject is returning null.</p><p> </p><p>The used config is</p><pre class="_prettyXprint">engineConfig.getAppContext().put( EngineConstants.APPCONTEXT_CLASSLOADER_KEY, Thread.currentThread().getContextClassLoader() );engineConfig.setEngineHome( new File( "req_comp/sarExtractionFolder" ).getAbsolutePath() );</pre><p>The contextCL is the CL I've used to load the content of the SAR.</p><p> </p><p>What is the difference of my deployment and the deployment as SAR inside JBoss? I don't understand why BIRT / OSGI (?) is starting up in a different way.</p><p> </p><p>Thanks,</p><p>Sam</p>