[
https://issues.apache.org/jira/browse/OPENJPA-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13422959#comment-13422959
]
Piotr Klimczak commented on OPENJPA-2240:
-----------------------------------------
As i "cannot sleep" because of that bug, i have tried to trace is as you wish.
Unfortunately i have found nothing interesting:
122 INFO [main] openjpa.Tool - Enhancer running on type "class
pl.com.bgk.smx.kgapi.contract.basics.types.BasicResponseData$Offilne".
133 TRACE [main] openjpa.MetaData - Loading metadata for "class
pl.com.bgk.smx.kgapi.contract.basics.types.BasicResponseData$Offilne" under
mode "[META]".
133 TRACE [main] openjpa.MetaData - Parsing class
"pl.com.bgk.smx.kgapi.contract.basics.types.BasicResponseData$Offilne".
150 TRACE [main] openjpa.MetaData - Generating default metadata for type
"pl.com.bgk.smx.kgapi.contract.basics.types.BasicResponseData$Offilne".
151 TRACE [main] openjpa.MetaData - Using reflection for metadata generation.
159 TRACE [main] openjpa.MetaData - Set persistence-capable superclass of
"pl.com.bgk.smx.kgapi.contract.basics.types.BasicResponseData$Offilne" to
"null".
159 TRACE [main] openjpa.MetaData - Resolving metadata for
"pl.com.bgk.smx.kgapi.contract.basics.types.BasicResponseData$Offilne@1436046744".
160 TRACE [main] openjpa.MetaData - Resolving field
"pl.com.bgk.smx.kgapi.contract.basics.types.BasicResponseData$Offilne@1436046744.dataTimeItem".
163 TRACE [main] openjpa.MetaData - Resolving field
"pl.com.bgk.smx.kgapi.contract.basics.types.BasicResponseData$offi...@1436046744.hjid".
163 TRACE [main] openjpa.MetaData - Resolving field
"pl.com.bgk.smx.kgapi.contract.basics.types.BasicResponseData$Offilne@1436046744.offlineId".
163 TRACE [main] openjpa.MetaData - Resolving field
"pl.com.bgk.smx.kgapi.contract.basics.types.BasicResponseData$Offilne@1436046744.retry".
164 TRACE [main] openjpa.MetaData - Preparing mapping for
"pl.com.bgk.smx.kgapi.contract.basics.types.BasicResponseData$Offilne".
164 TRACE [main] openjpa.MetaData - Resolving mapping for
"pl.com.bgk.smx.kgapi.contract.basics.types.BasicResponseData$Offilne@1436046744".
164 TRACE [main] openjpa.Enhance - Enhancing type "class
pl.com.bgk.smx.kgapi.contract.basics.types.BasicResponseData$Offilne" loaded by
java.net.URLClassLoader@71a371a3.
173 WARN [main] openjpa.Enhance - Detected the following possible violations
of the restrictions placed on property access persistent types:
"pl.com.bgk.smx.kgapi.contract.basics.types.BasicResponseData$Offilne" uses
property access, but its field "offlineId" is accessed directly in method
"copyTo" defined in
"pl.com.bgk.smx.kgapi.contract.basics.types.BasicResponseData$Offilne".
"pl.com.bgk.smx.kgapi.contract.basics.types.BasicResponseData$Offilne" uses
property access, but its field "offlineId" is accessed directly in method
"copyTo" defined in
"pl.com.bgk.smx.kgapi.contract.basics.types.BasicResponseData$Offilne".
"pl.com.bgk.smx.kgapi.contract.basics.types.BasicResponseData$Offilne" uses
property access, but its field "retry" is accessed directly in method "copyTo"
defined in
"pl.com.bgk.smx.kgapi.contract.basics.types.BasicResponseData$Offilne".
"pl.com.bgk.smx.kgapi.contract.basics.types.BasicResponseData$Offilne" uses
property access, but its field "retry" is accessed directly in method "copyTo"
defined in
"pl.com.bgk.smx.kgapi.contract.basics.types.BasicResponseData$Offilne".
The class enhance is successful. The problem occurs on every each usage of this
class by an app. Even during junit test case.
If you need more debug info i will do my best to provide it.
Greetings,
Piotr
> JVMVRFY012 when using openjpa together with hyperjaxb3
> ------------------------------------------------------
>
> Key: OPENJPA-2240
> URL: https://issues.apache.org/jira/browse/OPENJPA-2240
> Project: OpenJPA
> Issue Type: Bug
> Components: Enhance
> Affects Versions: 2.2.0
> Environment: IBM-JDK, SUN-JDK
> Reporter: Piotr Klimczak
> Priority: Critical
> Labels: enhancement, hyperjaxb3, jpa, stubs, xsd
>
> We are facing a problem with class enhancing generated by hyperjaxb3.
> "Caused by: java.lang.VerifyError: JVMVRFY012 stack shape inconsistent;
> class=foo/Bar, metoda=pcgetDataTimeItem()Ljava/util/Date;, pc=7"
> The problem occurs on every usage of non JPA compatible type like
> XMLGregorianCalendar.
> For those types, the hyperjaxb3 plugin creates a kind of "proxy"
> setter/getter that uses JPA capable type.
> Example of such proxy getter/setter:
> <code>
> @Basic
> @Column(name = "DATATIMEITEM")
> @Temporal(TemporalType.TIMESTAMP)
> public Date getDataTimeItem() {
> return
> XmlAdapterUtils.unmarshall(XMLGregorianCalendarAsDateTime.class,
> this.getDataTime());
> }
> </code>
> then the XmlAdapterUtils.unmarshall looks like:
> <code>
> public static <ValueType, BoundType> BoundType unmarshall(
> Class<? extends XmlAdapter<ValueType, BoundType>>
> xmlAdapterClass,
> ValueType v) {
> try {
> final XmlAdapter<ValueType, BoundType> xmlAdapter =
> getXmlAdapter(xmlAdapterClass);
> return xmlAdapter.unmarshal(v);
> } catch (Exception ex) {
> throw new RuntimeException(ex);
> }
> }
> </code>
> I have found that the problem occurs only because of the type of
> XmlAdapterUtils.unmarshall method. The problem is that it's 1st type is a
> "Class". Changing the 1st type from Class type to any other like Object
> solves the problem but it is not a solution.
> I think the problem is somewhere in serp project as after the enhancment
> process of classes containing non JPA capable XSD types, each call of that
> class generates the JVMVRFY012 exception- even during junit tests.
> Please note, that this bug is a blocker for my project.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira