-->
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: Entity not present
PostPosted: Thu Aug 03, 2006 6:30 pm 
Newbie

Joined: Thu Jul 06, 2006 12:01 pm
Posts: 5
I'm tryin to generate a EJB 3.0 Entity Bean on the fly, and then add it to an Ejb3Configuration instance using the method addAnnotatedClass(Class clazz), using this steps:

1- Initialize the application (in this point the application initialize a new Ejb3Configuration with no entity beans).

2. The Application generates the source code for a new EntityBean an then compile it.

3. I get the new Entity bean class and create a new Instance.

4. Add the new generated entity bean to the Ejb3Configuration.

When i try to add the generated class a get this:

java.lang.TypeNotPresentException: Type javax.persistence.Entity not present
......
......

the i can see:

Caused by: java.lang.ClassNotFoundException: javax.persistence.Entity
16:53:27,234 ERROR [STDERR] at java.net.URLClassLoader$1.run(Unknown Source)

its really strange, because i have all the nessesary libraries in my classpath, indeed it works ok if the EntityBean is not generated on the fly.

thanks in advance for any reply


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 07, 2006 1:31 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
you're generated class has a broken classloader

_________________
Emmanuel


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.