-->
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: error to configurate
PostPosted: Wed Nov 02, 2005 5:35 am 
Newbie

Joined: Wed Oct 26, 2005 5:31 am
Posts: 6
hello,
im doing a little stand alone application with hibernate 3.0.5
I'm wraiting all configuration file and i want to try to write a string in my database.
I have this error
Code:
GRAVE: Initial SessionFactory creation failed.
java.lang.NumberFormatException: For input string: "3 "
   at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
   at java.lang.Integer.parseInt(Integer.java:477)
   at java.lang.Integer.parseInt(Integer.java:518)
   at org.hibernate.util.PropertiesHelper.getInt(PropertiesHelper.java:23)
   at org.hibernate.connection.DriverManagerConnectionProvider.configure(DriverManagerConnectionProvider.java:40)
   at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:80)
   at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:362)
   at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:60)
   at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1463)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1004)
   at HibernateUtil.<clinit>(HibernateUtil.java:16)
   at Go.main(Go.java:25)
java.lang.ExceptionInInitializerError
   at HibernateUtil.<clinit>(HibernateUtil.java:20)
   at Go.main(Go.java:25)
Caused by: java.lang.NumberFormatException: For input string: "3 "
   at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
   at java.lang.Integer.parseInt(Integer.java:477)
   at java.lang.Integer.parseInt(Integer.java:518)
   at org.hibernate.util.PropertiesHelper.getInt(PropertiesHelper.java:23)
   at org.hibernate.connection.DriverManagerConnectionProvider.configure(DriverManagerConnectionProvider.java:40)
   at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:80)
   at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:362)
   at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:60)
   at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1463)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1004)
   at HibernateUtil.<clinit>(HibernateUtil.java:16)
   ... 1 more
Exception in thread "main"

What are the causes of this error?
thank you
bye


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 02, 2005 6:10 am 
Senior
Senior

Joined: Thu Aug 04, 2005 4:54 am
Posts: 153
Location: Birmingham, UK
Post hibernate.cfg.xml as stated in forum guidelines. Also post anything elese which may be relevant.

The error occurs because something is expecting a number and you're supplying "3 ".


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 02, 2005 6:22 am 
Newbie

Joined: Wed Oct 26, 2005 5:31 am
Posts: 6
i'm removing the precedent problem......
now i have this error
Code:
INFO: Cache provider: org.hibernate.cache.EhCacheProvider
2-nov-2005 11.15.55 HibernateUtil <clinit>
GRAVE: Initial SessionFactory creation failed.
java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException
   at java.lang.Class.getDeclaredConstructors0(Native Method)
   at java.lang.Class.privateGetDeclaredConstructors(Class.java:1610)
   at java.lang.Class.getConstructor0(Class.java:1922)
   at java.lang.Class.newInstance0(Class.java:278)
   at java.lang.Class.newInstance(Class.java:261)
   at org.hibernate.cfg.SettingsFactory.createCacheProvider(SettingsFactory.java:323)
   at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:219)
   at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1463)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1004)
   at HibernateUtil.<clinit>(HibernateUtil.java:16)
   at Go.main(Go.java:25)
java.lang.ExceptionInInitializerError
   at HibernateUtil.<clinit>(HibernateUtil.java:21)
   at Go.main(Go.java:25)
Caused by: java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException
   at java.lang.Class.getDeclaredConstructors0(Native Method)
   at java.lang.Class.privateGetDeclaredConstructors(Class.java:1610)
   at java.lang.Class.getConstructor0(Class.java:1922)
   at java.lang.Class.newInstance0(Class.java:278)
   at java.lang.Class.newInstance(Class.java:261)
   at org.hibernate.cfg.SettingsFactory.createCacheProvider(SettingsFactory.java:323)
   at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:219)
   at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1463)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1004)
   at HibernateUtil.<clinit>(HibernateUtil.java:16)
   ... 1 more
Exception in thread "main"

what's the problem?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 02, 2005 7:10 am 
Senior
Senior

Joined: Thu Aug 04, 2005 4:54 am
Posts: 153
Location: Birmingham, UK
You're missing a jar. Most likely ehcache. Check the documentation to see what jars are needed for correct operation.


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.