-->
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.  [ 7 posts ] 
Author Message
 Post subject: Annotations and Tomcat instead of JBoss
PostPosted: Sat Jun 04, 2005 12:25 pm 
Regular
Regular

Joined: Tue May 24, 2005 9:06 am
Posts: 64
Hibernate version: 3.0.5
Hibernate version: 3.0beta2
Name and version of the database you are using: MySQL 4.1.12
Tomcat version: 5.5.9
JDK version: 5.0_03

At runtime I get this warning:
"WARN org.hibernate.hql.QuerySplitter - no persistent classes found for query class: FROM db.KundeData AS kunde ..."
Therefore, the result set of the is empty.

Using *.hbm.xml instead of annotations this warning disappears.

I'm just guessing:
* Tomcat comes bundled with a *read-only* JNDI context
* Is there a problem with annotations?


Top
 Profile  
 
 Post subject: Re: Annotations and Tomcat instead of JBoss
PostPosted: Sat Jun 04, 2005 12:26 pm 
Regular
Regular

Joined: Tue May 24, 2005 9:06 am
Posts: 64
[quote="juergen.zimmermann"]
Annotations version: 3.0beta2


Top
 Profile  
 
 Post subject: Re: Annotations and Tomcat instead of JBoss [stacktrace]
PostPosted: Sun Jun 05, 2005 2:26 am 
Regular
Regular

Joined: Tue May 24, 2005 9:06 am
Posts: 64
Here is a stack trace if I'm adding a persistent class via AnnotationConfiguration instead of declaring it in hibernate.cfg.xml

-------------------------------------------------------------------------------
DEBUG db.hibernate.HibernateServlet - BEGIN init
INFO org.hibernate.cfg.Environment - Hibernate 3.0.5
INFO org.hibernate.cfg.Environment - loaded properties from resource hibernate.properties: {hibernate.connection.autocommit=false, hibernate.cglib.use_reflection_optimizer=true, hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect, hibernate.show_sql=false, hibernate.connection.url=jdbc:mysql:///widb, hibernate.connection.driver_class=com.mysql.jdbc.Driver, hibernate.connection.datasource=java:comp/env/jdbc/widb}
INFO org.hibernate.cfg.Environment - using CGLIB reflection optimizer
INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
INFO org.hibernate.cfg.AnnotationConfiguration - Mapping class using metadata: db.KundeData
FATAL db.hibernate.HibernateUtil - Initial SessionFactory cannot be created
java.lang.NoSuchMethodError: org.hibernate.cfg.Mappings.<init>(Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/List;Ljava/util/List;Lorg/hibernate/cfg/NamingStrategy;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)V
at org.hibernate.cfg.ExtendedMappings.<init>(ExtendedMappings.java:43)
at org.hibernate.cfg.AnnotationConfiguration.createExtendedMappings(AnnotationConfiguration.java:125)
at org.hibernate.cfg.AnnotationConfiguration.addAnnotatedClass(AnnotationConfiguration.java:94)
at db.hibernate.HibernateUtil.<clinit>(HibernateUtil.java:27)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at db.hibernate.HibernateServlet.init(HibernateServlet.java:23)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3857)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4118)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 06, 2005 5:31 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
are you sure you're using Hibernate 3.0.5 and Hibernate Annotations 3.0beta2
lookis like a version mismatch to me.

_________________
Emmanuel


Top
 Profile  
 
 Post subject: Annotations and Tomcat instead of JBoss
PostPosted: Mon Jun 06, 2005 6:13 am 
Regular
Regular

Joined: Tue May 24, 2005 9:06 am
Posts: 64
You are right. I'd forgotten to unzip the beta2 version and therefore
was using beta1 :-(

Thanks for the immediate support!


Top
 Profile  
 
 Post subject: Suggestion: Bundle Hibernate with annotations
PostPosted: Tue Apr 25, 2006 3:09 pm 
Newbie

Joined: Sun Apr 23, 2006 10:24 pm
Posts: 1
Similar to what the Spring folks did with spring.jar mega-jar, could the hibernate team bundle hibernate with annotations. I see a lot of errors posted on the net with this sort of problem:

java.lang.NoSuchMethodError: org.hibernate.cfg.Mappings.<init>(Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/List;Ljava/util/List;Lorg/hibernate/cfg/NamingStrategy;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 27, 2006 10:36 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
sure, use Jboss Embeddable EJB3, everything is set up for you

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 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.