-
1. Re: OnException error type class not found in FUSE but works in Studio IDE
davsclaus Sep 11, 2014 2:15 AM (in response to rmuell01)You need to add OSGi import in your custom bundle, for this package net.sf.json so your application can load classes from this package, eg the exception.
Usually you can do this in the pom.xml for the felix bundle plugin
-
2. Re: OnException error type class not found in FUSE but works in Studio IDE
rmuell01 Sep 15, 2014 6:27 PM (in response to davsclaus)Thank you Claus. Hopefully you are referring to org.apache.felix
here is the pom snippet where I added net.sf.json-lib.json.lib...
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.7</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>camel-blueprint-unmarshal</Bundle-SymbolicName>
<Private-Package>com.mycompany.camel.blueprint.unmarshal.*</Private-Package>
<Import-Package>*,
net.sf.json-lib.json.lib</Import-Package>
</instructions>
</configuration>
</plugin>
<plugin>
I had the bundle plugin w '*'.
Why would you have to add individual packages when the ' * ' refers to all?
Rob
-
3. Re: OnException error type class not found in FUSE but works in Studio IDE
davsclaus Sep 18, 2014 3:07 AM (in response to rmuell01)There is a dynamic import package you can give a try
<DynamicImport-Package>*</DynamicImport-Package>
-
4. Re: OnException error type class not found in FUSE but works in Studio IDE
john.gabriel Jun 28, 2017 7:56 AM (in response to rmuell01)Could you please clarify below issue...
Caused by: java.lang.LinkageError: loader constraint violation: when resolving method "net.sf.json.JSONSerializer.toJSON(Ljava/lang/Object;)Lnet/sf/json/JSON;" the class loader (instance of org/apache/felix/framework/BundleWiringImpl$BundleClassLoaderJava5) of the current class, org/apache/camel/dataformat/xmljson/XmlJsonDataFormat, and the class loader (instance of org/apache/felix/framework/BundleWiringImpl$BundleClassLoaderJava5) for the method's defining class, net/sf/json/JSONSerializer, have different Class objects for the type net/sf/json/JSON used in the signature
Server: Fuse 6.3
while deploying it loads the class...and no issues... if we restart the server or update the bundle above issue is coming...