<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Re: AS7-4857 correct JPA dependency injection (stop injecting javassist a…  …nd let Hibernate include envers)
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/lafr">Frank Langelage</a> in <i>JBoss AS 7 Development</i> - <a href="https://community.jboss.org/message/757461#757461">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Attached you find the complete serverlog of the redeployment of my ear without the javassist dependency.</p><p>The stacktrace for the first Entity deployed:</p><p>11:26:22,409 ERROR [org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer#getProxyFactory] HHH000142: Javassist Enhancement failed: biz.mbisoftware.fn.ejb.entity.MbiAsyst: java.lang.RuntimeException: by java.lang.NoClassDefFoundError: javassist/util/proxy/ProxyObject</p><p>&#160;&#160;&#160; at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:510)</p><p>&#160;&#160;&#160; at javassist.util.proxy.ProxyFactory.createClass2(ProxyFactory.java:487)</p><p>&#160;&#160;&#160; at javassist.util.proxy.ProxyFactory.createClass1(ProxyFactory.java:423)</p><p>&#160;&#160;&#160; at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:395)</p><p>&#160;&#160;&#160; at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxyFactory(JavassistLazyInitializer.java:163) [hibernate-core-4.1.6.Final.jar:4.1.6.Final]</p><p>&#160;&#160;&#160; at org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.postInstantiate(JavassistProxyFactory.java:66) [hibernate-core-4.1.6.Final.jar:4.1.6.Final]</p><p>&#160;&#160;&#160; at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:221) [hibernate-core-4.1.6.Final.jar:4.1.6.Final]</p><p>&#160;&#160;&#160; at org.hibernate.tuple.entity.AbstractEntityTuplizer.&lt;init&gt;(AbstractEntityTuplizer.java:212) [hibernate-core-4.1.6.Final.jar:4.1.6.Final]</p><p>&#160;&#160;&#160; at org.hibernate.tuple.entity.PojoEntityTuplizer.&lt;init&gt;(PojoEntityTuplizer.java:82) [hibernate-core-4.1.6.Final.jar:4.1.6.Final]</p><p>&#160;&#160;&#160; at sun.reflect.GeneratedConstructorAccessor110.newInstance(Unknown Source) [:1.6.0_35]</p><p>&#160;&#160;&#160; at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [rt.jar:1.6.0_35]</p><p>&#160;&#160;&#160; at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [rt.jar:1.6.0_35]</p><p>&#160;&#160;&#160; at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:135) [hibernate-core-4.1.6.Final.jar:4.1.6.Final]</p><p>&#160;&#160;&#160; at org.hibernate.tuple.entity.EntityTuplizerFactory.constructDefaultTuplizer(EntityTuplizerFactory.java:188) [hibernate-core-4.1.6.Final.jar:4.1.6.Final]</p><p>&#160;&#160;&#160; at org.hibernate.tuple.entity.EntityMetamodel.&lt;init&gt;(EntityMetamodel.java:341) [hibernate-core-4.1.6.Final.jar:4.1.6.Final]</p><p>&#160;&#160;&#160; at org.hibernate.persister.entity.AbstractEntityPersister.&lt;init&gt;(AbstractEntityPersister.java:505) [hibernate-core-4.1.6.Final.jar:4.1.6.Final]</p><p>&#160;&#160;&#160; at org.hibernate.persister.entity.SingleTableEntityPersister.&lt;init&gt;(SingleTableEntityPersister.java:146) [hibernate-core-4.1.6.Final.jar:4.1.6.Final]</p><p>&#160;&#160;&#160; at sun.reflect.GeneratedConstructorAccessor109.newInstance(Unknown Source) [:1.6.0_35]</p><p>&#160;&#160;&#160; at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [rt.jar:1.6.0_35]</p><p>&#160;&#160;&#160; at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [rt.jar:1.6.0_35]</p><p>&#160;&#160;&#160; at org.hibernate.persister.internal.PersisterFactoryImpl.create(PersisterFactoryImpl.java:163) [hibernate-core-4.1.6.Final.jar:4.1.6.Final]</p><p>&#160;&#160;&#160; at org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:135) [hibernate-core-4.1.6.Final.jar:4.1.6.Final]</p><p>&#160;&#160;&#160; at org.hibernate.internal.SessionFactoryImpl.&lt;init&gt;(SessionFactoryImpl.java:381) [hibernate-core-4.1.6.Final.jar:4.1.6.Final]</p><p>&#160;&#160;&#160; at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1746) [hibernate-core-4.1.6.Final.jar:4.1.6.Final]</p><p>&#160;&#160;&#160; at org.hibernate.ejb.EntityManagerFactoryImpl.&lt;init&gt;(EntityManagerFactoryImpl.java:94) [hibernate-entitymanager-4.1.6.Final.jar:4.1.6.Final]</p><p>&#160;&#160;&#160; at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:905) [hibernate-entitymanager-4.1.6.Final.jar:4.1.6.Final]</p><p>&#160;&#160;&#160; at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:890) [hibernate-entitymanager-4.1.6.Final.jar:4.1.6.Final]</p><p>&#160;&#160;&#160; at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74) [hibernate-entitymanager-4.1.6.Final.jar:4.1.6.Final]</p><p>&#160;&#160;&#160; at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:197) [jboss-as-jpa-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]</p><p>&#160;&#160;&#160; at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.access$500(PersistenceUnitServiceImpl.java:57) [jboss-as-jpa-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]</p><p>&#160;&#160;&#160; at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:96) [jboss-as-jpa-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]</p><p>&#160;&#160;&#160; at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_35]</p><p>&#160;&#160;&#160; at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_35]</p><p>&#160;&#160;&#160; at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_35]</p><p>&#160;&#160;&#160; at org.jboss.threads.JBossThread.run(JBossThread.java:122)</p><p>Caused by: javassist.CannotCompileException: by java.lang.NoClassDefFoundError: javassist/util/proxy/ProxyObject</p><p>&#160;&#160;&#160; at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:170)</p><p>&#160;&#160;&#160; at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:502)</p><p>&#160;&#160;&#160; ... 34 more</p><p>Caused by: java.lang.NoClassDefFoundError: javassist/util/proxy/ProxyObject</p><p>&#160;&#160;&#160; at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.6.0_35]</p><p>&#160;&#160;&#160; at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [rt.jar:1.6.0_35]</p><p>&#160;&#160;&#160; at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [rt.jar:1.6.0_35]</p><p>&#160;&#160;&#160; at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) [:1.6.0_35]</p><p>&#160;&#160;&#160; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_35]</p><p>&#160;&#160;&#160; at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_35]</p><p>&#160;&#160;&#160; at javassist.util.proxy.FactoryHelper.toClass2(FactoryHelper.java:182)</p><p>&#160;&#160;&#160; at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:164)</p><p>&#160;&#160;&#160; ... 35 more</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>As said, I do not use javassist in my application. It's nowhere mentioned in my source and build files.</p><p>I might need it indirectly, because I'm using drools in my application.</p><p>jar -tvf $BIN/*.ear</p><p>&#160;&#160;&#160;&#160; 0 Sun Sep 02 11:16:14 CEST 2012 META-INF/</p><p>&#160;&#160; 174 Sun Sep 02 11:16:12 CEST 2012 META-INF/MANIFEST.MF</p><p>&#160; 2634 Mon May 07 18:34:36 CEST 2012 META-INF/application.xml</p><p>924165 Sun Sep 02 11:16:10 CEST 2012 ejb-entity.jar</p><p> 61800 Sun Sep 02 11:16:10 CEST 2012 ejb-session-common.jar</p><p>149853 Sun Sep 02 11:16:10 CEST 2012 ejb-session-core.jar</p><p> 15499 Sun Sep 02 11:16:10 CEST 2012 ejb-session-costing.jar</p><p> 31943 Sun Sep 02 11:16:10 CEST 2012 ejb-session-distribution.jar</p><p> 20667 Sun Sep 02 11:16:10 CEST 2012 ejb-session-inventory.jar</p><p> 20973 Sun Sep 02 11:16:10 CEST 2012 ejb-session-param.jar</p><p> 98661 Sun Sep 02 11:16:10 CEST 2012 ejb-session-planning.jar</p><p> 29973 Sun Sep 02 11:16:10 CEST 2012 ejb-session-production.jar</p><p> 15897 Sun Sep 02 11:16:10 CEST 2012 ejb-session-purchase.jar</p><p>304208 Sun Sep 02 11:16:12 CEST 2012 ejb-session-sales.jar</p><p>&#160; 9274 Sun Sep 02 11:16:12 CEST 2012 ws-common.war</p><p> 39903 Sun Sep 02 11:16:12 CEST 2012 ws-core.war</p><p>&#160; 5514 Sun Sep 02 11:16:12 CEST 2012 ws-costing.war</p><p>&#160; 5130 Sun Sep 02 11:16:12 CEST 2012 ws-distribution.war</p><p>&#160;&#160; 671 Sun Sep 02 11:16:12 CEST 2012 ws-external.war</p><p>&#160; 5859 Sun Sep 02 11:16:12 CEST 2012 ws-inventory.war</p><p> 12585 Sun Sep 02 11:16:12 CEST 2012 ws-planning.war</p><p> 16421 Sun Sep 02 11:16:12 CEST 2012 ws-production.war</p><p>&#160; 9608 Sun Sep 02 11:16:12 CEST 2012 ws-purchase.war</p><p> 15157 Sun Sep 02 11:16:12 CEST 2012 ws-sales.war</p><p>&#160; 3074 Sun Sep 02 11:16:12 CEST 2012 web.war</p><p>&#160;&#160;&#160;&#160; 0 Sun Sep 02 11:16:14 CEST 2012 lib/</p><p>163650 Sun Sep 02 11:16:14 CEST 2012 lib/antlr-runtime.jar</p><p>162079 Sun Sep 02 11:16:14 CEST 2012 lib/bltypes.jar</p><p> 89635 Sun Sep 02 11:16:14 CEST 2012 lib/common.jar</p><p>1285617 Sun Sep 02 11:16:14 CEST 2012 lib/commons-math3.jar</p><p>1128541 Sun Sep 02 11:16:14 CEST 2012 lib/drools-compiler.jar</p><p>2842962 Sun Sep 02 11:16:14 CEST 2012 lib/drools-core.jar</p><p> 57611 Sun Sep 02 11:16:14 CEST 2012 lib/drools-decisiontables.jar</p><p> 54925 Sun Sep 02 11:16:14 CEST 2012 lib/drools-templates.jar</p><p>1674737 Sun Sep 02 11:16:14 CEST 2012 lib/ecj.jar</p><p> 60197 Sun Sep 02 11:16:14 CEST 2012 lib/flattree-0.5.jar</p><p>&#160; 7040 Sun Sep 02 11:16:14 CEST 2012 lib/furnplan.jar</p><p>288098 Sun Sep 02 11:16:14 CEST 2012 lib/htmlparser.jar</p><p> 11039 Sun Sep 02 11:16:14 CEST 2012 lib/imos-net.jar</p><p> 86149 Sun Sep 02 11:16:14 CEST 2012 lib/interfaces.jar</p><p> 65507 Sun Sep 02 11:16:14 CEST 2012 lib/javatuples.jar</p><p>725735 Sun Sep 02 11:16:14 CEST 2012 lib/jxl.jar</p><p>181418 Sun Sep 02 11:16:14 CEST 2012 lib/knowledge-api.jar</p><p>&#160; 8814 Sun Sep 02 11:16:14 CEST 2012 lib/knowledge-internal-api.jar</p><p>741061 Sun Sep 02 11:16:14 CEST 2012 lib/mvel2.jar</p><p> 14146 Sun Sep 02 11:16:14 CEST 2012 lib/opencsv.jar</p><p>136689 Sun Sep 02 11:16:14 CEST 2012 lib/twt-design.jar</p><p>937265 Sun Sep 02 11:16:14 CEST 2012 lib/twt-insight.jar</p><p> 68593 Sun Sep 02 11:16:14 CEST 2012 lib/wsclient.jar</p><p>184018 Sun Sep 02 11:16:14 CEST 2012 lib/wstypes.jar</p><p>&#160; 1103 Thu Feb 16 17:10:56 CET 2012 mbi_deploy.xml</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/757461#757461">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss AS 7 Development at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>