Export to GitHub

jtracert - issue #6

Jaxb 2


Posted on Jan 4, 2009 by Swift Panda

What steps will reproduce the problem? 1. Using jtracert in J2EE apps which uses JAXB 2 2. 3.

What is the expected output? What do you see instead? I see runtime exception. Execution of application fails:

com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 5 counts of IllegalAnnotationExceptions Property jTracertObjectCompanion is present but not specified in @XmlType.propOrder this problem is related to the following location: at public com.google.code.jtracert.model.JTracertObjectCompanion sk.npvr.jaxb.smv.GetCustomerInfoInputType.jTracertObjectCompanion at sk.npvr.jaxb.smv.GetCustomerInfoInputType at public javax.xml.bind.JAXBElement sk.npvr.jaxb.smv.ObjectFactory.createGetCustomerInfoInput(sk.npvr.jaxb.smv. GetCustomerInfoInputType) at sk.npvr.jaxb.smv.ObjectFactory

What version of the product are you using? On what operating system? 0.0.3, Windows

Please provide any additional information below.

Comment #1

Posted on Jan 6, 2009 by Happy Panda

jTracert adds synthetic field jTracertObjectCompanion to all instrumented classes. This field is used for calculating something like system hash code of objects, even if hashCode() method of instrumented class was overwriten.

This approach is incorrect - we should use java.lang.System.identityHashCode(Object x) method instead.

To be fixed in version 0.0.4

Comment #2

Posted on Jan 6, 2009 by Happy Panda

Comment deleted

Comment #3

Posted on Jan 27, 2009 by Happy Panda

I've added new sample application 'jaxbApplication' to the integration tests. It's now reproducible in revision r97.

Comment #4

Posted on Jan 27, 2009 by Happy Panda

Fixed in SVN revision r98

Comment #5

Posted on Jan 28, 2009 by Happy Panda

Fixed in jTracert 0.0.4

Comment #6

Posted on Feb 6, 2009 by Happy Panda

(No comment was entered for this change.)

Status: Verified

Labels:
Type-Defect Priority-Medium