-->
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: Simple Hibernate Application .. what is wrong ?
PostPosted: Sat Sep 24, 2005 5:14 am 
Newbie

Joined: Sat Sep 24, 2005 5:07 am
Posts: 5
Hii,
I am developing a simple hibernate application to understand this technology. I am using postgresql database and apache tomcat web server...

I configure my system as far as I known...
However I am getting a misterious error message from browser, which says
as root of the problem,
"java.lang.NoClassDefFoundError: org/dom4j/io/SAXReader"


what is it all about .. ?
am I missing something ?... what should I do to fix it.. ?


thanks..


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 24, 2005 6:39 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
check lib/readme.txt to see what libs are required.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 24, 2005 7:35 am 
Pro
Pro

Joined: Fri Sep 02, 2005 4:21 am
Posts: 206
Location: Vienna
You very concretely miss a dom4j.jar in your class path but as it is probably not the only one you're missing, you should follow max's advice.

Erik


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 26, 2005 4:53 am 
Newbie

Joined: Sat Sep 24, 2005 5:07 am
Posts: 5
hii,

thanks for your answers... it was all about my enviromental variables...

anyway.. I have faced another problem which I dont think that related with DB, becouse I tried Mysql and postgresql and have seen same output from apache server....


which is
"org.hibernate.HibernateException: database product name cannot be null""


it may all about the DB but I havent been able to figure out it yet...

what may couse that exception ? ...


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 26, 2005 5:00 am 
Pro
Pro

Joined: Fri Sep 02, 2005 4:21 am
Posts: 206
Location: Vienna
atoprak wrote:
"org.hibernate.HibernateException: database product name cannot be null""

Never seen this one. Could you post the whole stack trace as well as any Hibernate configuration and properties file?

Erik


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 26, 2005 5:12 am 
Beginner
Beginner

Joined: Tue Aug 30, 2005 9:40 am
Posts: 29
in the hibernate.cg.xml

we have to mention the DB details explicitly.

Otherwise we will get this type of error.

pls check your configuration details.

Srini


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 26, 2005 5:26 am 
Newbie

Joined: Sat Sep 24, 2005 5:07 am
Posts: 5
this is hibernate.cfg.xml

<hibernate-configuration>
<session-factory name="foo">
<property name="show_sql">true</property>
<mapping resource="org/hibernate/test/Simple.hbm.xml"/>
<class-cache
class="org.hibernate.test.Simple"
region="Simple"
usage="read-write"/>
</session-factory>
</hibernate-configuration

I havent change it, should I ????? ....


this is the related part of the hibernate.properties

#MySQL

hibernate.dialect org.hibernate.dialect.MySQLDialect
hibernate.dialect org.hibernate.dialect.MySQLInnoDBDialect
#hibernate.dialect org.hibernate.dialect.MySQLMyISAMDialect
hibernate.connection.driver_class com.mysql.jdbc.Driver
hibernate.connection.url jdbc:mysql:///localhost/intengotest
hibernate.connection.username root
hibernate.connection.password ******

I think I have to choose one of the dialects ... ISAM or Inno


and this is the http500 report

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.hibernate.HibernateException: database product name cannot be null
org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:57)
org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:39)
org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:374)
org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:110)
org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1463)
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1004)
form.doGet(form.java:31)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

note The full stack trace of the root cause is available in the Apache Tomcat/5.5.11 logs.



if it is all about hibernate.cfg.xml, I shame ver very much .. and sorry... but tuttorials dont talk about that ...


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.