Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JiBX 1.1.5
-
Fix Version/s: JiBX 1.2.2
-
Component/s: None
-
Labels:None
-
Environment:Windows XP, using RAD 7 IDE with WebSphere 6.2 application server, using Java 5
-
Number of attachments :
Description
When declaring a bindg with the "-" caracter in the name attribute of the <binding> element this exeption is throwed when executing the .class method to the binded class.
Example:
<binding name="some-name">
<mapping name="filter-group" class="MyClass">
<value name="logical-operator" field="attA"/>
<collection field="attB"/>
</mapping>
</binding>
public MyClass {
private String attA;
private ArrayList<String> attB;
}
The JiBX binder runs fine, but when executing MyClass.class this error is throwed
java.lang.LinkageError: LinkageError while defining class: MyClass
Could not be defined due to: (MyClass) method name is invalid at offset=0
This is often caused by having a class defined at multiple
locations within the classloader hierarchy. Other potential causes
include compiling against an older or newer version of the class
that has an incompatible method signature.
Dumping the current context classloader hierarchy:
==> indicates defining classloader
==>[0]
com.ibm.ws.classloader.CompoundClassLoader@4cc04cc
Local ClassPath: C:\Projects\...\classes;C:\Projects\...\lib\atacama-athens-module-1.1.0.jar;C:\Projects\...\lib\atacama-core-1.1.0.jar;C:\Projects\...\lib\atacama-https-transport-module-1.0.0.jar;C:\Projects\...\lib\atacama-saml-library-1.1.1.jar;C:\Projects\...\lib\atacama-saml-module-1.1.0.jar;C:\Projects\...\lib\atacama-shibboleth-module-1.1.0.jar;C:\Projects\...\lib\batik.jar;C:\Projects\...\lib\commons-beanutils-1.7.0.jar;C:\Projects\...\lib\commons-chain-1.1.jar;C:\Projects\...\lib\commons-codec-1.3.jar;C:\Projects\...\lib\commons-collections-3.2.jar;C:\Projects\...\lib\commons-configuration-1.4.jar;C:\Projects\...\lib\commons-digester-1.8.jar;C:\Projects\...\lib\commons-discovery-0.4.jar;C:\Projects\...\lib\commons-httpclient-3.1.jar;C:\Projects\...\lib\commons-id-0.1-dev.jar;C:\Projects\...\lib\commons-io-1.3.jar;C:\Projects\...\lib\commons-jxpath-1.2.jar;C:\Projects\...\lib\commons-lang-2.3.jar;C:\Projects\...\lib\commons-logging-1.0.3.jar;C:\Projects\...\lib\commons-pool-1.2.jar;C:\Projects\...\lib\db2jcc.jar;C:\Projects\...\lib\db2jcc_license_cu.jar;C:\Projects\...\lib\DrainServletFilter-8.11.0.4.jar;C:\Projects\...\lib\jai_codec-1.1.3.jar;C:\Projects\...\lib\jai_core-1.1.3.jar;C:\Projects\...\lib\jakarta-oro-2.0.8.jar;C:\Projects\...\lib\jamon-2.7.jar;C:\Projects\...\lib\jibx-extras.jar;C:\Projects\...\lib\jibx-run.jar;C:\Projects\...\lib\js.jar;C:\Projects\...\lib\json.jar;C:\Projects\...\lib\kaleidoscope-8.11.0.4.jar;C:\Projects\...\lib\log4j-1.2.8.jar;C:\Projects\...\lib\ojdbc14.jar;C:\Projects\...\lib\quartz-all-1.6.0.jar;C:\Projects\...\lib\serializer-2.7.1.jar;C:\Projects\...\lib\spring-beans-2.5.2.jar;C:\Projects\...\lib\spring-context-2.5.2.jar;C:\Projects\...\lib\spring-core-2.5.2.jar;C:\Projects\...\lib\spring-web-2.5.2.jar;C:\Projects\...\lib\spring-webmvc-2.5.2.jar;C:\Projects\...\lib\spring-webmvc-struts-2.5.2.jar;C:\Projects\...\lib\stax-api.jar;C:\Projects\...\lib\struts-core-1.3.8.jar;C:\Projects\...\lib\struts-taglib-1.3.8.jar;C:\Projects\...\lib\xalan-2.7.1.jar;C:\Projects\...\lib\xercesImpl-2.9.0.jar;C:\Projects\...\lib\xml-apis-2.0.2.jar;C:\Projects\...\lib\xmlsec-1.4.2.jar;C:\Projects\...\lib\xpp3.jar;C:\Projects\...
Delegation Mode: PARENT_LAST
[1] com.ibm.ws.classloader.JarClassLoader@559030610 Local Classpath: Delegation mode: PARENT_FIRST
[2] com.ibm.ws.classloader.ProtectionClassLoader@16ca16ca
[3] com.ibm.ws.bootstrap.ExtClassLoader@3d423d42
[4] org.eclipse.osgi.framework.adaptor.core.CDSBundleClassLoader@73227322
[5] sun.misc.Launcher$AppClassLoader@28c028c
[6] sun.misc.Launcher$ExtClassLoader@c760c76
Verified that this is checked in the current code, reporting a binding validation error if the binding name contains invalid characters (ones which are not Java identifier part characters).