-->
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.  [ 4 posts ] 
Author Message
 Post subject: tutorial chapter 1
PostPosted: Sun May 20, 2007 7:07 am 
Newbie

Joined: Sun May 20, 2007 6:58 am
Posts: 3
Hi, directly from the distribution

The tutorial chapter 1 gives me constant error, im sure i' not the only one how gets this. Please upgrade your tutorial. I simply follow all the steps

compiling with java 1.5 and java 1.4.2 is the same


STEP: delete the line
<property name="hbm2ddl.auto">create</property>
THEN

ant run -Daction=list

[java] 12:58:03,718 INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured
[java] java.lang.reflect.UndeclaredThrowableException
[java] at $Proxy0.createQuery(Unknown Source)
[java] at events.EventManager.listEvents(Unknown Source)
[java] at events.EventManager.main(Unknown Source)
[java] Caused by: java.lang.reflect.InvocationTargetException



http://www.hibernate.org/ForumMailingli ... AskForHelp

Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

[b]Hibernate version: 3[/b]

[b]Mapping documents:[/b]

[b]Code between sessionFactory.openSession() and session.close():[/b]

[b]Full stack trace of any exception that occurs:[/b]
[java] java.lang.reflect.UndeclaredThrowableException
[java] at $Proxy0.createQuery(Unknown Source)
[java] at events.EventManager.listEvents(Unknown Source)
[java] at events.EventManager.main(Unknown Source)
[java] Caused by: java.lang.reflect.InvocationTargetException

[b]Name and version of the database you are using:[/b]
HSQLDB
[b]The generated SQL (show_sql=true):[/b]

[b]Debug level Hibernate log excerpt:[/b]
INFO

Problems with Session and transaction handling?
dontknow
Read this: http://hibernate.org/42.html



HF


Last edited by hflhomenl on Sun May 20, 2007 7:44 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sun May 20, 2007 7:43 am 
Newbie

Joined: Sun May 20, 2007 6:58 am
Posts: 3
If we copy <i>all of the jars</i> jars from the distribution, to our lib directory as tipped in section 1.2. Part 1 - The first Hibernate Application the error is gone.

HF


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 20, 2007 2:03 pm 
Regular
Regular

Joined: Sun Sep 17, 2006 2:48 am
Posts: 81
Location: California
Do you have a name attribute in the session-factory element in hibernate.cfg.xml ? Try removing that since you dont need JNDI at this stage.

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 20, 2007 3:53 pm 
Newbie

Joined: Sun May 20, 2007 6:58 am
Posts: 3
no there isn't, and that was not the error,
next line: something with
java.lang.reflect.UndeclaredThrowableException

since most hibernate jars are unfamiliar : just include all of them.
the tutorial specifies a few, but not every single one that's required

HF

<hibernate-configuration>

<session-factory>

<!-- Database connection settings -->
<property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="connection.url">jdbc:hsqldb:hsql://localhost</property>
<property name="connection.username">sa</property>
<property name="connection.password"></property>

<!-- JDBC connection pool (use the built-in) -->
<property name="connection.pool_size">1</property>

<!-- SQL dialect -->
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>

<!-- Enable Hibernate's automatic session context management -->
<property name="current_session_context_class">thread</property>

<!-- Disable the second-level cache -->
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>

<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>

<!-- Drop and re-create the database schema on startup -->
<!--
<property name="hbm2ddl.auto">create</property>
-->
<mapping resource="events/Event.hbm.xml"/>
<mapping resource="events/Person.hbm.xml"/>
</session-factory>

</hibernate-configuration>


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