Note that there are some explanatory texts on larger screens.

plurals
  1. POHibernate instrumentation transform failure: cannot find class (HHH000373)
    primarykey
    data
    text
    <p>I'm attempting to enable Hibernate instrumentation for the entities in a Maven project. Instrumentation seems to work normally on entities with only fields of standard types defined by the Java API (String, BigDecimal, etc.), but when the instrumentation task attempts to work on classes which have fields of types defined by other classes in my project, it fails with the following error:</p> <pre><code>[instrument] processing class : com.test.entity.EntityWithCustomTypes; file = C:\Project\Project-ejb\target\classes\com\test\entity\EntityWithCustomTypes.class Mar 21, 2013 10:00:24 AM org.hibernate.bytecode.internal.javassist.JavassistClassTransformer doTransform ERROR: HHH000373: Unable to transform class: cannot find com.test.bo.CustomType </code></pre> <p>I've tried deliberately instrumenting the CustomType class (which shouldn't be necessary); the instrumentation processes it, but it still errors out on EntityWithCustomTypes.</p> <p>Here is the plugin I'm using in my pom.xml; the project was generated using a JBoss 7 Java EE archetype, and I'm attempting to execute the instrumentation in the EJB module POM:</p> <pre><code>&lt;plugin&gt; &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt; &lt;version&gt;1.3&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;configuration&gt; &lt;tasks&gt; &lt;taskdef name="instrument" classname="org.hibernate.tool.instrument.javassist.InstrumentTask"&gt; &lt;classpath&gt; &lt;path refid="maven.dependency.classpath" /&gt; &lt;path refid="maven.compile.classpath" /&gt; &lt;path refid="maven.runtime.classpath" /&gt; &lt;path refid="maven.plugin.classpath" /&gt; &lt;dirset dir="${project.build.outputDirectory}" /&gt; &lt;/classpath&gt; &lt;/taskdef&gt; &lt;instrument verbose="false"&gt; &lt;fileset dir="${project.build.outputDirectory}"&gt; &lt;include name="**/entity/*.class" /&gt; &lt;/fileset&gt; &lt;/instrument&gt; &lt;/tasks&gt; &lt;/configuration&gt; &lt;phase&gt;package&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;run&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;org.hibernate&lt;/groupId&gt; &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt; &lt;version&gt;4.1.10.Final&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;javassist&lt;/groupId&gt; &lt;artifactId&gt;javassist&lt;/artifactId&gt; &lt;version&gt;3.12.1.GA&lt;/version&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;/plugin&gt; </code></pre> <p>I can verify that the compile phase is generating the class in question (CustomType), so I cannot understand why Hibernate's JavassistClassTransformer is unable to find it.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload