-->
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.  [ 6 posts ] 
Author Message
 Post subject: Getting startet with hibernate 3 - Initialize hibernate
PostPosted: Sat Sep 03, 2005 3:31 pm 
Beginner
Beginner

Joined: Wed Jul 20, 2005 2:57 pm
Posts: 28
Hi!

I got the following message appears when I try to initialize:

....
Quote:
16183 [main] INFO org.hibernate.cfg.Configuration - Configured SessionFactory: null
16193 [main] INFO org.hibernate.cfg.Configuration - processing extends queue
16193 [main] INFO org.hibernate.cfg.Configuration - processing collection mappings
16193 [main] INFO org.hibernate.cfg.Configuration - processing association property references
16193 [main] INFO org.hibernate.cfg.Configuration - processing foreign key constraints
16564 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!)
16564 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Hibernate connection pool size: 20
16564 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - autocommit mode: false
16574 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - using driver: org.postgresql.Driver at URL: jdbc:postgresql://localhost:5432/EMF-MODEL-DB
16574 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - connection properties: {user=postgres, password=****}
17014 [main] INFO org.hibernate.cfg.SettingsFactory - RDBMS: PostgreSQL, version: 8.0.2
17014 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC driver: PostgreSQL Native Driver, version: PostgreSQL 8.0 JDBC3 with SSL (build 310)
17044 [main] INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.PostgreSQLDialect
17054 [main] INFO org.hibernate.transaction.TransactionFactoryFactory - Using default transaction strategy (direct JDBC transactions)
17064 [main] INFO org.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
17064 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled
17064 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic session close at end of transaction: disabled
17064 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC batch size: 15
17064 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC batch updates for versioned data: disabled
17064 [main] INFO org.hibernate.cfg.SettingsFactory - Scrollable result sets: enabled
17064 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): disabled
17064 [main] INFO org.hibernate.cfg.SettingsFactory - Connection release mode: null
17064 [main] INFO org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1
17064 [main] INFO org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled
17064 [main] INFO org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key: disabled
17064 [main] INFO org.hibernate.cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
17074 [main] INFO org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
17074 [main] INFO org.hibernate.cfg.SettingsFactory - Query language substitutions: {}
17074 [main] INFO org.hibernate.cfg.SettingsFactory - Second-level cache: enabled
17074 [main] INFO org.hibernate.cfg.SettingsFactory - Query cache: disabled
17074 [main] INFO org.hibernate.cfg.SettingsFactory - Cache provider: org.hibernate.cache.EhCacheProvider
17084 [main] INFO org.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: disabled
17084 [main] INFO org.hibernate.cfg.SettingsFactory - Structured second-level cache entries: disabled
17094 [main] INFO org.hibernate.cfg.SettingsFactory - Echoing all SQL to stdout
17094 [main] INFO org.hibernate.cfg.SettingsFactory - Statistics: disabled
17094 [main] INFO org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled
17094 [main] INFO org.hibernate.cfg.SettingsFactory - Default entity-mode: pojo
Unhandled event loop exception
Reason:
java.lang.NoClassDefFoundError



Does anybody what could be wrong?

Any help is greatly appreciated!
Thanks in advance,
Kurt


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 03, 2005 4:06 pm 
Pro
Pro

Joined: Fri Sep 02, 2005 4:21 am
Posts: 206
Location: Vienna
Hi,

You cut the trace just at the line where it could have become interesting. Could you provide a bit more?

Basically java.lang.NoClassDefFoundError means that you're missing a jar file on your class path - but without other information it is not possible to say more.

Erik


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 04, 2005 2:06 pm 
Beginner
Beginner

Joined: Wed Jul 20, 2005 2:57 pm
Posts: 28
Thank you for your quick response!

I copied all messages. After the "java.lang.NoClassDefFoundError" message the program stops.

I will check the jar files.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 05, 2005 5:39 am 
Beginner
Beginner

Joined: Wed Jul 20, 2005 2:57 pm
Posts: 28
You where right. I forgot a jarfile.
But now I get this exception.

Quote:
16524 [main] INFO org.hibernate.cfg.Configuration - Configured SessionFactory: null
16524 [main] INFO org.hibernate.cfg.Configuration - processing extends queue
16534 [main] INFO org.hibernate.cfg.Configuration - processing collection mappings
16534 [main] INFO org.hibernate.cfg.Configuration - processing association property references
16534 [main] INFO org.hibernate.cfg.Configuration - processing foreign key constraints
16814 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!)
16814 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Hibernate connection pool size: 20
16814 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - autocommit mode: false
16834 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - using driver: org.postgresql.Driver at URL: jdbc:postgresql://localhost:5432/EMF-MODEL-DB
16834 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - connection properties: {user=postgres, password=****}
17195 [main] INFO org.hibernate.cfg.SettingsFactory - RDBMS: PostgreSQL, version: 8.0.2
17195 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC driver: PostgreSQL Native Driver, version: PostgreSQL 8.0 JDBC3 with SSL (build 310)
17225 [main] INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.PostgreSQLDialect
17235 [main] INFO org.hibernate.transaction.TransactionFactoryFactory - Using default transaction strategy (direct JDBC transactions)
17235 [main] INFO org.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
17235 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled
17235 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic session close at end of transaction: disabled
17235 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC batch size: 15
17235 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC batch updates for versioned data: disabled
17235 [main] INFO org.hibernate.cfg.SettingsFactory - Scrollable result sets: enabled
17235 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): disabled
17235 [main] INFO org.hibernate.cfg.SettingsFactory - Connection release mode: null
17235 [main] INFO org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1
17235 [main] INFO org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled
17235 [main] INFO org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key: disabled
17235 [main] INFO org.hibernate.cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
17245 [main] INFO org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
17245 [main] INFO org.hibernate.cfg.SettingsFactory - Query language substitutions: {}
17245 [main] INFO org.hibernate.cfg.SettingsFactory - Second-level cache: enabled
17245 [main] INFO org.hibernate.cfg.SettingsFactory - Query cache: disabled
17245 [main] INFO org.hibernate.cfg.SettingsFactory - Cache provider: org.hibernate.cache.EhCacheProvider
17245 [main] INFO org.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: disabled
17245 [main] INFO org.hibernate.cfg.SettingsFactory - Structured second-level cache entries: disabled
17245 [main] INFO org.hibernate.cfg.SettingsFactory - Echoing all SQL to stdout
17245 [main] INFO org.hibernate.cfg.SettingsFactory - Statistics: disabled
17245 [main] INFO org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled
17255 [main] INFO org.hibernate.cfg.SettingsFactory - Default entity-mode: pojo
17285 [main] INFO org.hibernate.impl.SessionFactoryImpl - building session factory
17295 [main] WARN net.sf.ehcache.config.Configurator - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: bundleresource://3/ehcache-failsafe.xml
17355 [main] ERROR saveepackage - save fails: org.hibernate.MappingException: could not interpret id generator strategy: vm
org.hibernate.MappingException: could not instantiate id generator
at org.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:92)
at org.hibernate.mapping.SimpleValue.createIdentifierGenerator(SimpleValue.java:151)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:178)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1005)
at model.persistence.genDAO.base._BaseRootDAO.initialize(_BaseRootDAO.java:54)
at model.persistence.genDAO.base._BaseRootDAO.initialize(_BaseRootDAO.java:41)
at model.persistence.genDAO.base._BaseRootDAO.initialize(_BaseRootDAO.java:32)
at model.persistence.genDAO.E_Package.saveepackage(E_Package.java:97)
at model.persistence.genDAO.E_Package.getpackagecontent(E_Package.java:176)
at model.persistence.genDAO.E_Package.getsubpackages(E_Package.java:149)
at model.persistence.genDAO.E_Package.getRoot(E_Package.java:141)
at model.ecore.Reader.savepackageDB(Reader.java:107)
at controller.ComputeDBAction.run(ComputeDBAction.java:44)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:276)
at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:206)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:915)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:866)
at org.eclipse.jface.action.ActionContributionItem$7.handleEvent(ActionContributionItem.java:785)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2773)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2432)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:254)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
at org.eclipse.core.launcher.Main.run(Main.java:704)
at org.eclipse.core.launcher.Main.main(Main.java:688)
Caused by: org.hibernate.MappingException: could not interpret id generator strategy: vm
at org.hibernate.id.IdentifierGeneratorFactory.getIdentifierGeneratorClass(IdentifierGeneratorFactory.java:103)
at org.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:86)
... 36 more


I'm using hibernate3 so I don't understand te problem with "net.sf" -path.
Thanks for any help in advance, Kurt


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 05, 2005 5:48 am 
Regular
Regular

Joined: Tue Oct 07, 2003 10:20 am
Posts: 77
The problem is with the ID generator you've specified in your Class mapping files - you're using an unsupported value of "vm".

The supported ID generators can be found here:
http://www.hibernate.org/hib_docs/v3/reference/en/html_single/#mapping-declaration-id-generator

Also, are you migrating up from Hibernate 2? The net.sf reference is to the EHCache provider - if you look at the package naming section of the following migration guide that will explain the steps necessary to remove the warning.

Migration Guide: http://www.hibernate.org/250.html


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 05, 2005 6:22 am 
Beginner
Beginner

Joined: Wed Jul 20, 2005 2:57 pm
Posts: 28
Yes I try to migrate from hibernate 2.

Thanks for your great help,

Kurt


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