-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: java.lang.TypeNotPresentException
PostPosted: Wed Jul 06, 2005 11:28 am 
Beginner
Beginner

Joined: Sun Jun 13, 2004 9:49 pm
Posts: 38
I'm trying to perform an hbm2ddl from within Maven. I've fought myself through many problems and am completely stuck on this one.

The task starts executing by fails with javax.persistence.EmbeddableSuperclass not being found. But, the class loaded before this was javax.persistence.Inheritence!

These is really strange. There must be something wrong with dependencies etc.

Anyone give me any pointers as to why this is happening?


Hibernate version: 3.1-alpha1
Hibernate annotations version: 3.1-beta3
Hibernate tools version: 3.0.0-alpha4

maven.xml (snippet):

<postGoal name="java:compile">
<ant:taskdef
name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask">
<classpath><path refid="maven.dependency.classpath"/></classpath>
</ant:taskdef>
<hibernatetool destdir="${maven.build.dir}/schema">
<classpath><path location="${maven.build.dest}"/></classpath>
<annotationconfiguration configurationfile="${pom.build.sourceDirectory}/hibernate.cfg.xml"/>
<hbm2ddl drop="false" outputfilename="${maven.final.name}.sql"/>
</hibernatetool>
</postGoal>

Part of debug output below.

[hibernatetool] [DEBUG] Finding class javax.persistence.Inheritance
[hibernatetool] [DEBUG] Loaded from /home/djb/.maven/repository/hibernate/jars/ejb-3.0-edr2.jar javax/persistence/Inheritance.class
[hibernatetool] [DEBUG] Class javax.persistence.Inheritance loaded from ant loader (parentFirst)
[hibernatetool] [DEBUG] Finding class javax.persistence.EmbeddableSuperclass
popping off org.apache.maven.jelly.MavenJellyContext@77ff92f5 for org.apache.maven.jelly.MavenJellyContext@2c09505f in maven-xdoc-plugin:maven-xdoc-plugin
popping off org.apache.maven.jelly.MavenJellyContext@36d1c778 for org.apache.maven.jelly.MavenJellyContext@67eb366 in maven-artifact-plugin:maven-artifact-plugin
popping off org.apache.maven.jelly.MavenJellyContext@2fa918d5 for org.apache.maven.jelly.MavenJellyContext@69d6065 in maven-pom-plugin:maven-pom-plugin
popping off org.apache.maven.jelly.MavenJellyContext@7c0b6548 for org.apache.maven.jelly.MavenJellyContext@50269997 in maven-clean-plugin:maven-clean-plugin
popping off org.apache.maven.jelly.MavenJellyContext@6d126b07 for org.apache.maven.jelly.MavenJellyContext@5430d082 in dolby-pics-core:pics-core-db-model

BUILD FAILED
File...... /home/djb/workspaces/eclipse-SDK-3.1/workspace/pics-core-db-model/maven.xml
Element... hibernatetool
Line...... 62
Column.... 54
java.lang.TypeNotPresentException: Type javax.persistence.EmbeddableSuperclass not present
org.apache.maven.werkz.UnattainableGoalException: Unable to obtain goal [dev] -- /home/djb/workspaces/eclipse-SDK-3.1/workspace/pics-core-db-model/maven.xml:62:54: <hibernatetool> java.lang.TypeNotPresentException: Type javax.persistence.EmbeddableSuperclass not present
at org.apache.maven.werkz.Goal.fire(Goal.java:663)
at org.apache.maven.werkz.Goal.attain(Goal.java:592)
at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:693)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
at org.apache.maven.cli.App.doMain(App.java:511)
at org.apache.maven.cli.App.main(App.java:1258)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.werken.forehead.Forehead.run(Forehead.java:551)
at com.werken.forehead.Forehead.main(Forehead.java:581)
org.apache.commons.jelly.JellyTagException: /home/djb/workspaces/eclipse-SDK-3.1/workspace/pics-core-db-model/maven.xml:62:54: <hibernatetool> java.lang.TypeNotPresentException: Type javax.persistence.EmbeddableSuperclass not present
at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:671)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:259)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
at org.apache.maven.werkz.jelly.PostGoalTag$1.firePostGoal(PostGoalTag.java:103)
at org.apache.maven.werkz.Goal.firePostGoalCallbacks(Goal.java:727)
at org.apache.maven.werkz.Goal.fire(Goal.java:671)
at org.apache.maven.werkz.Goal.attain(Goal.java:592)
at org.apache.maven.werkz.WerkzProject.attainGoal(WerkzProject.java:210)
at org.apache.maven.jelly.tags.werkz.MavenAttainGoalTag.doTag(MavenAttainGoalTag.java:114)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:150)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTag.java:78)
at org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.performAction(MavenGoalTag.java:109)
at org.apache.maven.werkz.Goal.fire(Goal.java:656)
at org.apache.maven.werkz.Goal.attain(Goal.java:592)
at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:693)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
at org.apache.maven.cli.App.doMain(App.java:511)
at org.apache.maven.cli.App.main(App.java:1258)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.werken.forehead.Forehead.run(Forehead.java:551)
at com.werken.forehead.Forehead.main(Forehead.java:581)
Caused by: java.lang.TypeNotPresentException: Type javax.persistence.EmbeddableSuperclass not present
at org.apache.tools.ant.Task.perform(Task.java:373)
at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:195)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247)
... 28 more
Caused by: java.lang.TypeNotPresentException: Type javax.persistence.EmbeddableSuperclass not present
at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:98)
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:107)
at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:31)
at sun.reflect.annotation.AnnotationParser.parseSig(AnnotationParser.java:351)
at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:175)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52)
at java.lang.Class.initAnnotationsIfNecessary(Class.java:2998)
at java.lang.Class.getAnnotation(Class.java:2958)
at org.hibernate.cfg.InheritanceState.setInheritanceType(InheritanceState.java:25)
at org.hibernate.cfg.AnnotationBinder.buildInheritanceStates(AnnotationBinder.java:1642)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:171)
at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:825)
at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:51)
at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:150)
at org.hibernate.tool.ant.Hbm2DDLGeneratorTask.execute(Hbm2DDLGeneratorTask.java:38)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:115)
at org.apache.tools.ant.Task.perform(Task.java:364)
... 30 more
Caused by: java.lang.ClassNotFoundException: javax.persistence.EmbeddableSuperclass
at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:95)
... 47 more

daz


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 07, 2005 11:30 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
try with the latest cvs version

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.