You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Kevin Sutter (JIRA)" <ji...@apache.org> on 2012/09/01 17:11:07 UTC

[jira] [Commented] (OPENJPA-2240) JVMVRFY012 when using openjpa together with hyperjaxb3

    [ https://issues.apache.org/jira/browse/OPENJPA-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13446732#comment-13446732 ] 

Kevin Sutter commented on OPENJPA-2240:
---------------------------------------

Piotr, I found an even easier solution (I hope)...  As I was checking into the updating of the Serp code, I noticed there was a later version of Serp (1.14.1) that stated, "Fix class constant copying bug."  Sounds familiar, huh? So, I re-built a local copy of OpenJPA 2.2.0  and a local copy of Serp 1.14.1.  Tried your test project and all is working.  I also verified that all of the JUnits are also working.  The problem is that this version of Serp is not in the Maven Central repo...  And, I'm not exactly sure how to get it there...  It's a SourceForge project.  If anybody has any insights on how to get it published to the maven repo, let me know.  Otherwise, I'll dig into it further this weekend.

In the mean time, I'll upload a copy of the Serp 1.14.1 jar and pom in case you want to install it into your local repo and try some testing.  Thanks.
                
> 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
>         Attachments: mvn.out, OpenJpa2240BugTestProject_v1.1.tar.gz
>
>
> 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
For more information on JIRA, see: http://www.atlassian.com/software/jira