You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by it...@daimler.com on 2012/09/28 14:57:55 UTC

JPA Enhancement throws java.lang.VerifyError: JVMVRFY012 for method pcClearFields() event with version 2.3.0-SNAPSHOT under WAS 8.0.0.4

Hello everyone,

I'm running into a severe problem when trying to use a WAR project under 
WAS 8.0.0.4 that contains enhanced classes by the OpenJPA version 
2.3.0-SNAPSHOT, the corresponding openjpa-maven-plugin (version 
2.3.0-SNAPSHOT). I get the following exception when trying to execute the 
first query:

java.lang.VerifyError: JVMVRFY012 Stackform inkonsistent; 
Klasse=frontend/model/database/DbApproval, Methode=pcClearFields()V, PC=22
        at java.lang.J9VMInternals.verifyImpl(Native Method)
        at java.lang.J9VMInternals.verify(J9VMInternals.java:85)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:162)
        at java.lang.Class.forNameImpl(Native Method)
        at java.lang.Class.forName(Class.java:136)
        at frontend.model.database.DbDocument.class$(DbDocument.java)
        at frontend.model.database.DbDocument.<clinit>(DbDocument.java)
        at java.lang.J9VMInternals.initializeImpl(Native Method)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:228)
        at java.lang.Class.forNameImpl(Native Method)
        at java.lang.Class.forName(Class.java:170)
        at org.apache.openjpa.meta.MetaDataRepository.classForName(
MetaDataRepository.java:1552)
        at 
org.apache.openjpa.meta.MetaDataRepository.loadPersistentTypesInternal(
MetaDataRepository.java:1528)
        at org.apache.openjpa.meta.MetaDataRepository.loadPersistentTypes(
MetaDataRepository.java:1506)
        at 
org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(
AbstractBrokerFactory.java:283)
        at 
org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(
AbstractBrokerFactory.java:239)
        at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(
AbstractBrokerFactory.java:213)
        at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(
DelegatingBrokerFactory.java:156)
        at 
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(
EntityManagerFactoryImpl.java:227)
        at 
com.ibm.ws.persistence.EntityManagerFactoryImpl.createEntityManager(
EntityManagerFactoryImpl.java:71)
        at 
com.ibm.ws.persistence.EntityManagerFactoryImpl.createEntityManager(
EntityManagerFactoryImpl.java:35)
        at com.ibm.ws.jpa.management.JPAEMPool.getEntityManager(
JPAEMPool.java:140)
        at 
com.ibm.ws.jpa.management.JPATxEntityManager.getEMInvocationInfo(
JPATxEntityManager.java:242)
        at 
com.ibm.ws.jpa.management.JPATxEntityManager.getEMInvocationInfo(
JPATxEntityManager.java:174)
        at com.ibm.ws.jpa.management.JPAEntityManager.createNativeQuery(
JPAEntityManager.java:339)
        at frontend.boundary.DatabaseAccessGateway.getDatabaseNameAndUser(
DatabaseAccessGateway.java:35)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at com.ibm.ejs.container.EJSContainer.invokeProceed(
EJSContainer.java:6158)
        at 
com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(
InvocationContextImpl.java:568)
        at 
org.apache.webbeans.ejb.common.interceptor.OpenWebBeansEjbInterceptor.callInterceptorsAndDecorators(
OpenWebBeansEjbInterceptor.java:521)
        at 
org.apache.webbeans.ejb.common.interceptor.OpenWebBeansEjbInterceptor.callToOwbInterceptors(
OpenWebBeansEjbInterceptor.java:199)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at 
com.ibm.ejs.container.interceptors.InterceptorProxy.invokeInterceptor(
InterceptorProxy.java:227)
        at 
com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(
InvocationContextImpl.java:548)
        at org.apache.webbeans.ejb.WSEJBInterceptor.callToOwbInterceptors(
WSEJBInterceptor.java:136)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at 
com.ibm.ejs.container.interceptors.InterceptorProxy.invokeInterceptor(
InterceptorProxy.java:227)
        at 
com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(
InvocationContextImpl.java:548)
        at 
com.ibm.ejs.container.interceptors.InvocationContextImpl.doAroundInvoke(
InvocationContextImpl.java:229)
        at com.ibm.ejs.container.EJSContainer.invoke(
EJSContainer.java:6049)
        at 
frontend.boundary.EJSLocalNSFDatabaseAccessGateway_541396be.getDatabaseNameAndUser(EJSLocalNSFDatabaseAccessGateway_541396be.java)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at 
org.apache.webbeans.ejb.common.proxy.EjbBeanProxyHandler.invoke(
EjbBeanProxyHandler.java:204)
        at 
frontend.boundary.DatabaseAccessGateway_$$_javassist_35.getDatabaseNameAndUser(DatabaseAccessGateway_$$_javassist_35.java)
        at frontend.boundary.DataAccessService.getDatabaseNameAndUser(
DataAccessService.java:31)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at org.apache.webbeans.intercept.InterceptorHandler.invoke(
InterceptorHandler.java:287)
        at 
org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(
NormalScopedBeanInterceptorHandler.java:98)
        at 
frontend.boundary.DataAccessService_$$_javassist_34.getDatabaseNameAndUser(DataAccessService_$$_javassist_34.java)
        at frontend.system.Configuration.retrieveDatabaseInfo(
Configuration.java:119)
        at frontend.system.Configuration.getDatabaseName(
Configuration.java:99)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at org.apache.webbeans.intercept.InterceptorHandler.invoke(
InterceptorHandler.java:287)
        at 
org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(
NormalScopedBeanInterceptorHandler.java:98)
        at 
frontend.system.Configuration_$$_javassist_33.getDatabaseName(Configuration_$$_javassist_33.java)
        at frontend.view.model.System.getDatabaseName(System.java:34)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at org.apache.webbeans.intercept.InterceptorHandler.invoke(
InterceptorHandler.java:287)
        at 
org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(
NormalScopedBeanInterceptorHandler.java:98)
        at 
frontend.view.model.System_$$_javassist_32.getDatabaseName(System_$$_javassist_32.java)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at javax.el.BeanELResolver.getValue(BeanELResolver.java:91)
        at javax.el.CompositeELResolver.getValue(
CompositeELResolver.java:55)
        at 
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(
FacesCompositeELResolver.java:142)
        at org.apache.el.parser.AstValue.getValue(AstValue.java:173)
        at org.apache.el.ValueExpressionImpl.getValue(
ValueExpressionImpl.java:283)
        at org.apache.webbeans.el.WrappedValueExpression.getValue(
WrappedValueExpression.java:68)
        at 
org.apache.myfaces.view.facelets.el.ELText$ELTextVariable.writeText(
ELText.java:213)
        at 
org.apache.myfaces.view.facelets.el.ELText$ELTextComposite.writeText(
ELText.java:125)
        at 
org.apache.myfaces.view.facelets.compiler.TextInstruction.write(
TextInstruction.java:48)
        at 
org.apache.myfaces.view.facelets.compiler.UIInstructions.encodeBegin(
UIInstructions.java:46)
        at org.apache.myfaces.view.facelets.compiler.UILeaf.encodeAll(
UILeaf.java:214)
        at javax.faces.component.UIComponent.encodeAll(
UIComponent.java:622)
        at javax.faces.component.UIComponent.encodeAll(
UIComponent.java:622)
        at 
org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.renderView(
FaceletViewDeclarationLanguage.java:1320)
        at org.apache.myfaces.application.ViewHandlerImpl.renderView(
ViewHandlerImpl.java:263)
        at javax.faces.application.ViewHandlerWrapper.renderView(
ViewHandlerWrapper.java:59)
        at javax.faces.application.ViewHandlerWrapper.renderView(
ViewHandlerWrapper.java:59)
        at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(
RenderResponseExecutor.java:85)
        at org.apache.myfaces.lifecycle.LifecycleImpl.render(
LifecycleImpl.java:239)
        at 
org.apache.myfaces.extensions.validator.core.startup.ExtValLifecycleWrapper.render(
ExtValLifecycleWrapper.java:79)
        at 
org.apache.myfaces.extensions.cdi.jsf2.impl.listener.phase.CodiLifecycleWrapper.render(
CodiLifecycleWrapper.java:126)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:191)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(
ServletWrapper.java:1224)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(
ServletWrapper.java:774)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(
ServletWrapper.java:456)
        at 
com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(
ServletWrapperImpl.java:178)
        at 
com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(
WebAppFilterManager.java:1032)
        at 
com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(
CacheServletWrapper.java:87)
        at com.ibm.ws.webcontainer.WebContainer.handleRequest(
WebContainer.java:895)
        at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(
WSWebContainer.java:1662)
        at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(
WCChannelLink.java:195)
        at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(
HttpInboundLink.java:452)
        at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(
HttpInboundLink.java:511)
        at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(
HttpInboundLink.java:305)
        at 
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(
HttpICLReadCallback.java:83)
        at 
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(
AioReadCompletionListener.java:165)
        at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(
AbstractAsyncFuture.java:217)
        at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(
AsyncChannelFuture.java:161)
        at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
        at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
        at com.ibm.io.async.ResultHandler.runEventProcessingLoop(
ResultHandler.java:775)
        at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1659)

I've read about OPENJPA issues regarding this problem and updated the 
openJPA maven plugin to version 2.3.0-SNAPSHOT. I cannot easily update 
openjpa itself within WAS 8, as it tightly integrated. Is this a new bug 
regarding the inconsistent stack form or should this be solved by the 
existing JIRAs and therefore withing 2.3.0-SNAPSHOT. I checked, it uses 
serp-1.14.1 instead of the older version.

The problem even occurs, when WAS 8 does the enhancement itself. 

The class itself is defined as follows:

@Entity
@Table(name = "GENEHMIGUNG")
public class DbApproval implements Serializable
{
    /** ID necessary for serialization */
    private static final long serialVersionUID = 7890436335290264198L;

    @Id
    @Column(name = "GEN_ID")
    private long id;

    @Column(name = "GEN_TEXT")
    private String text;

    @Column(name = "GEN_STATUS")
    private int state;

    @Column(name = "GEN_SCO_ID")
    private long scoringId;

    @Column(name = "GEN_AUTO_GENEHMIGUNG_KZ")
    @ExternalValues({ "true=Y", "false=N" })
    @Type(String.class)
    private boolean noAutomaticApprovalPermitted;

    @Column(name = "GEN_EL_EURO")
    private BigDecimal expectedLoss;

    @Column(name = "GEN_EL_PROZENT")
    private BigDecimal expectedLossInPercent;

    @Column(name = "GEN_SCOREKLASSE")
    private String scoreClass;

    @Column(name = "GEN_SCORING_DATUM")
    private Date scoringDate;

    @Column(name = "GEN_ENTSCHEIDUNG")
    @Type(String.class)
    private int decision;

    @Column(name = "GEN_AENDERUNGSTYP")
    @Enumerated(EnumType.ORDINAL)
    private ApprovalModificationType modificationType;

    @Column(name = "GEN_AENDERUNGSENTSCHEIDUNG")
    private int modificationDecision;

    @Column(name = "GEN_KOMM_VERHINDERN_KZ")
    private boolean noCommunicationAllowed;

    @Column(name = "GEN_INSERT_DATUM")
    private Date insertDate;

    @Column(name = "GEN_INSERT_USER_ID")
    private String insertUserId;

    @Column(name = "GEN_UPDATE_DATUM")
    private Date updateDate;

    @Column(name = "GEN_UPDATE_USER_ID")
    private String updateUserId;

    @Version
    @Column(name = "GEN_VERSION")
    private long version;

    @OneToOne(fetch = FetchType.LAZY, cascade = CascadeType.REFRESH)
    @JoinColumn(name = "GEN_VTR_ID", referencedColumnName = "VTR_ID")
    private DbContract contract;

    @OneToMany(mappedBy = "approval", fetch = FetchType.LAZY, cascade = 
CascadeType.REFRESH)
    @OrderBy("number ASC")
    private List<DbCollateral> collaterals;

    @Column(name = "GEN_KL_STATUS_KZ")
    @ExternalValues({ "true=J", "false=N", "false=null" })
    @Type(String.class)
    private boolean klStateSet;

    @Column(name = "GEN_KAUTIONSOLL")
    private BigDecimal securityDeposit;

    @Column(name = "GEN_RISIKOBUDGET")
    private BigDecimal riskBudget;

    @Column(name = "GEN_BANKBUERGSCHAFT")
    private BigDecimal bankGuaranty;

    @Column(name = "GEN_SONSTBESICHERUNG")
    @ExternalValues({"true=J", "false=N", "false=null"})
    @Type(String.class)
    private boolean additionalCollateralPresent;

    @Column(name = "GEN_REGELN_PRUEFBAR")
    private boolean expertRulesTestable;

    @Column(name = "GEN_REGELN_GEPRUEFT")
    private boolean expertRulesTested;

    @OneToMany(mappedBy = "approval", fetch = FetchType.LAZY, cascade = 
CascadeType.REFRESH)
    private List<DbTask> tasks;

    @OneToOne(mappedBy = "approval", fetch = FetchType.LAZY, cascade = 
CascadeType.REFRESH)
    private DbDocument document;

            ...
}

Hopefully, somebody can help me out here!

Best regards,

Heiko

--
Heiko Kopp

If you are not the intended addressee, please inform us immediately that you have received this e-mail in error, and delete it. We thank you for your cooperation.  

Re: JPA Enhancement throws java.lang.VerifyError: JVMVRFY012 for method pcClearFields() event with version 2.3.0-SNAPSHOT under WAS 8.0.0.4

Posted by Kevin Sutter <kw...@gmail.com>.
Hi Heiko,
*>  but currently it seems the problem only affects complex entities
included as attributes in
other entities, not attributes with primitive types or simple classes like
Integer, BigDecimal or Date.*

This is very likely...  The other issues that were recently discovered were
with "complex" entities.  It's just surprising that after all of these
years with basically the same enhancement processing that we are now
hitting issues.  Some of them were due to Java 7 verification (as
previously noted), but now this is the second one that seems unrelated to
Java 7 usage...

*>  The execution environment of WAS is however, IBM JDK 1.6 and we cannot
and did
not change that.
*
Good to hear.  :-)

*>  I will possibly open a PMR with IBM support if you think that this
would be
a good idea too.*

Yes, this would be a good idea.  Since you are experiencing this problem
with the code that came with WAS 8.0.0.4, then any eventual resolution to
the problem will need to be delivered via an APAR (iFix).  So, you might as
well get that wheel in motion.  Mention this discussion in the PMR and ask
for the PMR to be routed to the JPA L3 queue.  Thanks.

In the mean time, opening a JIRA would also be a good path.

Also, is it possible for you to provide the errant class files?  A simple
Eclipse project or Junit test that demonstrates the issue would be best.
In the past, when I have attempted to reproduce the customer's scenario in
these cases, I have not had much luck.  Not until a specific testcase was
provided.  Once we can reproduce the error, figuring out a solution is
relatively straight forward.

Thank you,
Kevin

On Sat, Sep 29, 2012 at 3:06 AM, Heiko Kopp <it...@daimler.com>wrote:

> Kevin Sutter wrote
> > Hi Heiko,
> > More questions than answers at this point...  Thanks for digging into the
> > existing issues related to these Java Verify Issues.
> >
> > o  Does this occur when running with straight WAS 8.0.0.4 with the
> OpenJPA
> > 2.1.x deliverable?
>
> Yes it does occur with that. I only used OpenJPA 2.3.0-SNAPSHOT together
> with the OpenJPA 2.3.0-SNAPSHOT maven plugin at compile/build time to do
> the
> enhancement. At runtime, OpenJPA is not included in the package (EAR/WAR),
> and the version delivered with IBM throws the error.
>
> I will possibly open a PMR with IBM support if you think that this would be
> a good idea too. I just wanted to figure out why this happens at all.
> Interestingly, I have another application on the very same WAS using
> absolutely the same tools and this one does not have the issue. No
> errors.... Weird!
>
> In the example posted in my previous message, it seems the entity
> DbDocument
> is responsible for the cause, so I removed it, but afterwards another
> entity
> with the same problem came up. I can dig more into that, but currently it
> seems the problem only affects complex entities included as attributes in
> other entities, not attributes with primitive types or simple classes like
> Integer, BigDecimal or Date.
>
>
> Kevin Sutter wrote
> > o  Are you, by chance, building and/or executing in a Java 7 environment?
> > As you have seen by the other JIRA Issues, Java 7 automatically verifies
> > all Class files now.  Before Java 7, many of these Verify errors were
> > eaten
> > and never output to the user.
>
> Yeah I saw that almost everything seemed to be related to Java 7. The
> execution environment of WAS is however, IBM JDK 1.6 and we cannot and did
> not change that.
>
> At first I had a IBM JDK 1.7 based Eclipse + WDT Tools, but after reading
> the issues with Java 7 and enhancements, I've completely removed Java 7
> SDKs/JREs from Eclipse and run Eclipse with the JDK shipped with IBM WAS
> (which is IBM SDK 1.6 SP2). I'm stuck to IBM SDKs here, as the WDT Tools
> only allow deployment to secured WebSphere Servers when Eclipse is setup
> with an IBM SDK :-(
>
>
> Kevin Sutter wrote
> > o  How are you doing the enhancement processing?  Are you doing
> > enhancement
> > at build time, or dynamically at runtime via the Container hook?
>
> Both, by default we use the org.apache.openjpa/openjpa-maven-plugin version
> 2.2.0 for build time enhancement in maven phase 'process-classes'. I
> changed
> to use the 2.3.0-SNAPSHOT version (which definitely used Serp 1.14.1 - we
> checked that too) when I saw the related issues, but: => the error occurs
> in
> both cases.
>
> Then, I completely disabled runtime enhancement by commenting out the
> plugin
> in the maven pom file, verified, that the class-files do not include any
> enhancements in the built EAR and deployed the application to WAS. => The
> error occurs too.
>
> So to answer your question. It happens in both ways, when enhancing at
> build
> time and at runtime.
>
> Thank you for your rapid response Kevin,
>
> looking forward to hearing your thoughts on this.
>
> Best regards,
>
> Heiko
>
>
>
> --
> View this message in context:
> http://openjpa.208410.n2.nabble.com/JPA-Enhancement-throws-java-lang-VerifyError-JVMVRFY012-for-method-pcClearFields-even-with-version-2-tp7581258p7581267.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>

Re: JPA Enhancement throws java.lang.VerifyError: JVMVRFY012 for method pcClearFields() event with version 2.3.0-SNAPSHOT under WAS 8.0.0.4

Posted by Heiko Kopp <it...@daimler.com>.
Kevin Sutter wrote
> Hi Heiko,
> More questions than answers at this point...  Thanks for digging into the
> existing issues related to these Java Verify Issues.
> 
> o  Does this occur when running with straight WAS 8.0.0.4 with the OpenJPA
> 2.1.x deliverable?

Yes it does occur with that. I only used OpenJPA 2.3.0-SNAPSHOT together
with the OpenJPA 2.3.0-SNAPSHOT maven plugin at compile/build time to do the
enhancement. At runtime, OpenJPA is not included in the package (EAR/WAR),
and the version delivered with IBM throws the error. 

I will possibly open a PMR with IBM support if you think that this would be
a good idea too. I just wanted to figure out why this happens at all.
Interestingly, I have another application on the very same WAS using
absolutely the same tools and this one does not have the issue. No
errors.... Weird!

In the example posted in my previous message, it seems the entity DbDocument
is responsible for the cause, so I removed it, but afterwards another entity
with the same problem came up. I can dig more into that, but currently it
seems the problem only affects complex entities included as attributes in
other entities, not attributes with primitive types or simple classes like
Integer, BigDecimal or Date.  


Kevin Sutter wrote
> o  Are you, by chance, building and/or executing in a Java 7 environment?
> As you have seen by the other JIRA Issues, Java 7 automatically verifies
> all Class files now.  Before Java 7, many of these Verify errors were
> eaten
> and never output to the user.

Yeah I saw that almost everything seemed to be related to Java 7. The
execution environment of WAS is however, IBM JDK 1.6 and we cannot and did
not change that. 

At first I had a IBM JDK 1.7 based Eclipse + WDT Tools, but after reading
the issues with Java 7 and enhancements, I've completely removed Java 7
SDKs/JREs from Eclipse and run Eclipse with the JDK shipped with IBM WAS
(which is IBM SDK 1.6 SP2). I'm stuck to IBM SDKs here, as the WDT Tools
only allow deployment to secured WebSphere Servers when Eclipse is setup
with an IBM SDK :-(


Kevin Sutter wrote
> o  How are you doing the enhancement processing?  Are you doing
> enhancement
> at build time, or dynamically at runtime via the Container hook?

Both, by default we use the org.apache.openjpa/openjpa-maven-plugin version
2.2.0 for build time enhancement in maven phase 'process-classes'. I changed
to use the 2.3.0-SNAPSHOT version (which definitely used Serp 1.14.1 - we
checked that too) when I saw the related issues, but: => the error occurs in
both cases.

Then, I completely disabled runtime enhancement by commenting out the plugin
in the maven pom file, verified, that the class-files do not include any
enhancements in the built EAR and deployed the application to WAS. => The
error occurs too.

So to answer your question. It happens in both ways, when enhancing at build
time and at runtime.

Thank you for your rapid response Kevin,

looking forward to hearing your thoughts on this.

Best regards,

Heiko



--
View this message in context: http://openjpa.208410.n2.nabble.com/JPA-Enhancement-throws-java-lang-VerifyError-JVMVRFY012-for-method-pcClearFields-even-with-version-2-tp7581258p7581267.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: JPA Enhancement throws java.lang.VerifyError: JVMVRFY012 for method pcClearFields() event with version 2.3.0-SNAPSHOT under WAS 8.0.0.4

Posted by Kevin Sutter <kw...@gmail.com>.
Hi Heiko,
More questions than answers at this point...  Thanks for digging into the
existing issues related to these Java Verify Issues.

o  Does this occur when running with straight WAS 8.0.0.4 with the OpenJPA
2.1.x deliverable?

o  Are you, by chance, building and/or executing in a Java 7 environment?
As you have seen by the other JIRA Issues, Java 7 automatically verifies
all Class files now.  Before Java 7, many of these Verify errors were eaten
and never output to the user.

o  How are you doing the enhancement processing?  Are you doing enhancement
at build time, or dynamically at runtime via the Container hook?

Thanks,
Kevin

On Fri, Sep 28, 2012 at 7:57 AM, <it...@daimler.com> wrote:

> Hello everyone,
>
> I'm running into a severe problem when trying to use a WAR project under
> WAS 8.0.0.4 that contains enhanced classes by the OpenJPA version
> 2.3.0-SNAPSHOT, the corresponding openjpa-maven-plugin (version
> 2.3.0-SNAPSHOT). I get the following exception when trying to execute the
> first query:
>
> java.lang.VerifyError: JVMVRFY012 Stackform inkonsistent;
> Klasse=frontend/model/database/DbApproval, Methode=pcClearFields()V, PC=22
>         at java.lang.J9VMInternals.verifyImpl(Native Method)
>         at java.lang.J9VMInternals.verify(J9VMInternals.java:85)
>         at java.lang.J9VMInternals.initialize(J9VMInternals.java:162)
>         at java.lang.Class.forNameImpl(Native Method)
>         at java.lang.Class.forName(Class.java:136)
>         at frontend.model.database.DbDocument.class$(DbDocument.java)
>         at frontend.model.database.DbDocument.<clinit>(DbDocument.java)
>         at java.lang.J9VMInternals.initializeImpl(Native Method)
>         at java.lang.J9VMInternals.initialize(J9VMInternals.java:228)
>         at java.lang.Class.forNameImpl(Native Method)
>         at java.lang.Class.forName(Class.java:170)
>         at org.apache.openjpa.meta.MetaDataRepository.classForName(
> MetaDataRepository.java:1552)
>         at
> org.apache.openjpa.meta.MetaDataRepository.loadPersistentTypesInternal(
> MetaDataRepository.java:1528)
>         at org.apache.openjpa.meta.MetaDataRepository.loadPersistentTypes(
> MetaDataRepository.java:1506)
>         at
> org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(
> AbstractBrokerFactory.java:283)
>         at
> org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(
> AbstractBrokerFactory.java:239)
>         at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(
> AbstractBrokerFactory.java:213)
>         at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(
> DelegatingBrokerFactory.java:156)
>         at
>
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(
> EntityManagerFactoryImpl.java:227)
>         at
> com.ibm.ws.persistence.EntityManagerFactoryImpl.createEntityManager(
> EntityManagerFactoryImpl.java:71)
>         at
> com.ibm.ws.persistence.EntityManagerFactoryImpl.createEntityManager(
> EntityManagerFactoryImpl.java:35)
>         at com.ibm.ws.jpa.management.JPAEMPool.getEntityManager(
> JPAEMPool.java:140)
>         at
> com.ibm.ws.jpa.management.JPATxEntityManager.getEMInvocationInfo(
> JPATxEntityManager.java:242)
>         at
> com.ibm.ws.jpa.management.JPATxEntityManager.getEMInvocationInfo(
> JPATxEntityManager.java:174)
>         at com.ibm.ws.jpa.management.JPAEntityManager.createNativeQuery(
> JPAEntityManager.java:339)
>         at frontend.boundary.DatabaseAccessGateway.getDatabaseNameAndUser(
> DatabaseAccessGateway.java:35)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:60)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:37)
>         at java.lang.reflect.Method.invoke(Method.java:611)
>         at com.ibm.ejs.container.EJSContainer.invokeProceed(
> EJSContainer.java:6158)
>         at
> com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(
> InvocationContextImpl.java:568)
>         at
>
> org.apache.webbeans.ejb.common.interceptor.OpenWebBeansEjbInterceptor.callInterceptorsAndDecorators(
> OpenWebBeansEjbInterceptor.java:521)
>         at
>
> org.apache.webbeans.ejb.common.interceptor.OpenWebBeansEjbInterceptor.callToOwbInterceptors(
> OpenWebBeansEjbInterceptor.java:199)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:60)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:37)
>         at java.lang.reflect.Method.invoke(Method.java:611)
>         at
> com.ibm.ejs.container.interceptors.InterceptorProxy.invokeInterceptor(
> InterceptorProxy.java:227)
>         at
> com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(
> InvocationContextImpl.java:548)
>         at org.apache.webbeans.ejb.WSEJBInterceptor.callToOwbInterceptors(
> WSEJBInterceptor.java:136)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:60)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:37)
>         at java.lang.reflect.Method.invoke(Method.java:611)
>         at
> com.ibm.ejs.container.interceptors.InterceptorProxy.invokeInterceptor(
> InterceptorProxy.java:227)
>         at
> com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(
> InvocationContextImpl.java:548)
>         at
> com.ibm.ejs.container.interceptors.InvocationContextImpl.doAroundInvoke(
> InvocationContextImpl.java:229)
>         at com.ibm.ejs.container.EJSContainer.invoke(
> EJSContainer.java:6049)
>         at
>
> frontend.boundary.EJSLocalNSFDatabaseAccessGateway_541396be.getDatabaseNameAndUser(EJSLocalNSFDatabaseAccessGateway_541396be.java)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:60)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:37)
>         at java.lang.reflect.Method.invoke(Method.java:611)
>         at
> org.apache.webbeans.ejb.common.proxy.EjbBeanProxyHandler.invoke(
> EjbBeanProxyHandler.java:204)
>         at
>
> frontend.boundary.DatabaseAccessGateway_$$_javassist_35.getDatabaseNameAndUser(DatabaseAccessGateway_$$_javassist_35.java)
>         at frontend.boundary.DataAccessService.getDatabaseNameAndUser(
> DataAccessService.java:31)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:60)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:37)
>         at java.lang.reflect.Method.invoke(Method.java:611)
>         at org.apache.webbeans.intercept.InterceptorHandler.invoke(
> InterceptorHandler.java:287)
>         at
> org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(
> NormalScopedBeanInterceptorHandler.java:98)
>         at
>
> frontend.boundary.DataAccessService_$$_javassist_34.getDatabaseNameAndUser(DataAccessService_$$_javassist_34.java)
>         at frontend.system.Configuration.retrieveDatabaseInfo(
> Configuration.java:119)
>         at frontend.system.Configuration.getDatabaseName(
> Configuration.java:99)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:60)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:37)
>         at java.lang.reflect.Method.invoke(Method.java:611)
>         at org.apache.webbeans.intercept.InterceptorHandler.invoke(
> InterceptorHandler.java:287)
>         at
> org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(
> NormalScopedBeanInterceptorHandler.java:98)
>         at
>
> frontend.system.Configuration_$$_javassist_33.getDatabaseName(Configuration_$$_javassist_33.java)
>         at frontend.view.model.System.getDatabaseName(System.java:34)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:60)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:37)
>         at java.lang.reflect.Method.invoke(Method.java:611)
>         at org.apache.webbeans.intercept.InterceptorHandler.invoke(
> InterceptorHandler.java:287)
>         at
> org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(
> NormalScopedBeanInterceptorHandler.java:98)
>         at
>
> frontend.view.model.System_$$_javassist_32.getDatabaseName(System_$$_javassist_32.java)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:60)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:37)
>         at java.lang.reflect.Method.invoke(Method.java:611)
>         at javax.el.BeanELResolver.getValue(BeanELResolver.java:91)
>         at javax.el.CompositeELResolver.getValue(
> CompositeELResolver.java:55)
>         at
> org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(
> FacesCompositeELResolver.java:142)
>         at org.apache.el.parser.AstValue.getValue(AstValue.java:173)
>         at org.apache.el.ValueExpressionImpl.getValue(
> ValueExpressionImpl.java:283)
>         at org.apache.webbeans.el.WrappedValueExpression.getValue(
> WrappedValueExpression.java:68)
>         at
> org.apache.myfaces.view.facelets.el.ELText$ELTextVariable.writeText(
> ELText.java:213)
>         at
> org.apache.myfaces.view.facelets.el.ELText$ELTextComposite.writeText(
> ELText.java:125)
>         at
> org.apache.myfaces.view.facelets.compiler.TextInstruction.write(
> TextInstruction.java:48)
>         at
> org.apache.myfaces.view.facelets.compiler.UIInstructions.encodeBegin(
> UIInstructions.java:46)
>         at org.apache.myfaces.view.facelets.compiler.UILeaf.encodeAll(
> UILeaf.java:214)
>         at javax.faces.component.UIComponent.encodeAll(
> UIComponent.java:622)
>         at javax.faces.component.UIComponent.encodeAll(
> UIComponent.java:622)
>         at
> org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.renderView(
> FaceletViewDeclarationLanguage.java:1320)
>         at org.apache.myfaces.application.ViewHandlerImpl.renderView(
> ViewHandlerImpl.java:263)
>         at javax.faces.application.ViewHandlerWrapper.renderView(
> ViewHandlerWrapper.java:59)
>         at javax.faces.application.ViewHandlerWrapper.renderView(
> ViewHandlerWrapper.java:59)
>         at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(
> RenderResponseExecutor.java:85)
>         at org.apache.myfaces.lifecycle.LifecycleImpl.render(
> LifecycleImpl.java:239)
>         at
>
> org.apache.myfaces.extensions.validator.core.startup.ExtValLifecycleWrapper.render(
> ExtValLifecycleWrapper.java:79)
>         at
>
> org.apache.myfaces.extensions.cdi.jsf2.impl.listener.phase.CodiLifecycleWrapper.render(
> CodiLifecycleWrapper.java:126)
>         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:191)
>         at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(
> ServletWrapper.java:1224)
>         at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(
> ServletWrapper.java:774)
>         at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(
> ServletWrapper.java:456)
>         at
> com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(
> ServletWrapperImpl.java:178)
>         at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(
> WebAppFilterManager.java:1032)
>         at
> com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(
> CacheServletWrapper.java:87)
>         at com.ibm.ws.webcontainer.WebContainer.handleRequest(
> WebContainer.java:895)
>         at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(
> WSWebContainer.java:1662)
>         at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(
> WCChannelLink.java:195)
>         at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(
> HttpInboundLink.java:452)
>         at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(
> HttpInboundLink.java:511)
>         at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(
> HttpInboundLink.java:305)
>         at
> com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(
> HttpICLReadCallback.java:83)
>         at
> com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(
> AioReadCompletionListener.java:165)
>         at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(
> AbstractAsyncFuture.java:217)
>         at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(
> AsyncChannelFuture.java:161)
>         at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
>         at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
>         at com.ibm.io.async.ResultHandler.runEventProcessingLoop(
> ResultHandler.java:775)
>         at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
>         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1659)
>
> I've read about OPENJPA issues regarding this problem and updated the
> openJPA maven plugin to version 2.3.0-SNAPSHOT. I cannot easily update
> openjpa itself within WAS 8, as it tightly integrated. Is this a new bug
> regarding the inconsistent stack form or should this be solved by the
> existing JIRAs and therefore withing 2.3.0-SNAPSHOT. I checked, it uses
> serp-1.14.1 instead of the older version.
>
> The problem even occurs, when WAS 8 does the enhancement itself.
>
> The class itself is defined as follows:
>
> @Entity
> @Table(name = "GENEHMIGUNG")
> public class DbApproval implements Serializable
> {
>     /** ID necessary for serialization */
>     private static final long serialVersionUID = 7890436335290264198L;
>
>     @Id
>     @Column(name = "GEN_ID")
>     private long id;
>
>     @Column(name = "GEN_TEXT")
>     private String text;
>
>     @Column(name = "GEN_STATUS")
>     private int state;
>
>     @Column(name = "GEN_SCO_ID")
>     private long scoringId;
>
>     @Column(name = "GEN_AUTO_GENEHMIGUNG_KZ")
>     @ExternalValues({ "true=Y", "false=N" })
>     @Type(String.class)
>     private boolean noAutomaticApprovalPermitted;
>
>     @Column(name = "GEN_EL_EURO")
>     private BigDecimal expectedLoss;
>
>     @Column(name = "GEN_EL_PROZENT")
>     private BigDecimal expectedLossInPercent;
>
>     @Column(name = "GEN_SCOREKLASSE")
>     private String scoreClass;
>
>     @Column(name = "GEN_SCORING_DATUM")
>     private Date scoringDate;
>
>     @Column(name = "GEN_ENTSCHEIDUNG")
>     @Type(String.class)
>     private int decision;
>
>     @Column(name = "GEN_AENDERUNGSTYP")
>     @Enumerated(EnumType.ORDINAL)
>     private ApprovalModificationType modificationType;
>
>     @Column(name = "GEN_AENDERUNGSENTSCHEIDUNG")
>     private int modificationDecision;
>
>     @Column(name = "GEN_KOMM_VERHINDERN_KZ")
>     private boolean noCommunicationAllowed;
>
>     @Column(name = "GEN_INSERT_DATUM")
>     private Date insertDate;
>
>     @Column(name = "GEN_INSERT_USER_ID")
>     private String insertUserId;
>
>     @Column(name = "GEN_UPDATE_DATUM")
>     private Date updateDate;
>
>     @Column(name = "GEN_UPDATE_USER_ID")
>     private String updateUserId;
>
>     @Version
>     @Column(name = "GEN_VERSION")
>     private long version;
>
>     @OneToOne(fetch = FetchType.LAZY, cascade = CascadeType.REFRESH)
>     @JoinColumn(name = "GEN_VTR_ID", referencedColumnName = "VTR_ID")
>     private DbContract contract;
>
>     @OneToMany(mappedBy = "approval", fetch = FetchType.LAZY, cascade =
> CascadeType.REFRESH)
>     @OrderBy("number ASC")
>     private List<DbCollateral> collaterals;
>
>     @Column(name = "GEN_KL_STATUS_KZ")
>     @ExternalValues({ "true=J", "false=N", "false=null" })
>     @Type(String.class)
>     private boolean klStateSet;
>
>     @Column(name = "GEN_KAUTIONSOLL")
>     private BigDecimal securityDeposit;
>
>     @Column(name = "GEN_RISIKOBUDGET")
>     private BigDecimal riskBudget;
>
>     @Column(name = "GEN_BANKBUERGSCHAFT")
>     private BigDecimal bankGuaranty;
>
>     @Column(name = "GEN_SONSTBESICHERUNG")
>     @ExternalValues({"true=J", "false=N", "false=null"})
>     @Type(String.class)
>     private boolean additionalCollateralPresent;
>
>     @Column(name = "GEN_REGELN_PRUEFBAR")
>     private boolean expertRulesTestable;
>
>     @Column(name = "GEN_REGELN_GEPRUEFT")
>     private boolean expertRulesTested;
>
>     @OneToMany(mappedBy = "approval", fetch = FetchType.LAZY, cascade =
> CascadeType.REFRESH)
>     private List<DbTask> tasks;
>
>     @OneToOne(mappedBy = "approval", fetch = FetchType.LAZY, cascade =
> CascadeType.REFRESH)
>     private DbDocument document;
>
>             ...
> }
>
> Hopefully, somebody can help me out here!
>
> Best regards,
>
> Heiko
>
> --
> Heiko Kopp
>
> If you are not the intended addressee, please inform us immediately that
> you have received this e-mail in error, and delete it. We thank you for
> your cooperation.