[
https://issues.apache.org/jira/browse/OPENJPA-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13422470#comment-13422470
]
Kevin Sutter commented on OPENJPA-2240:
---------------------------------------
Hmmm... The error you reported sounds identical to the Java 7 class format
errors that were corrected via
https://issues.apache.org/jira/browse/OPENJPA-2122 and
https://issues.apache.org/jira/browse/OPENJPA-2085. But, both of these were
resolved before the 2.2.0 release was cut...
In your Environment, you mention both the IBM and Sun JDKs. What version of
Java are you using? I will assume Java 7 since we never experienced the
VerifyError before that. Is it possible for you to try Java 6? I'm just
looking for a quick workaround for you since figuring out the necessary changes
to ASM and/or Serp will take some time (if this is a new problem).
You also mention that this affects OpenJPA 2.2.0. Can you verify that this
version is actually in use in your scenario. And, have you tried to turn on
Trace during the enhancement process to verify that ASM is getting invoked to
"clean up" these StackMapTable issues?
Thanks for your help in attempting to debug this problem.
Kevin
> 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