-->
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: net.sf.hibernate.cfg.Environment.jvmSupportsGetGeneratedKeys
PostPosted: Thu Feb 12, 2004 5:18 am 
Newbie

Joined: Thu Feb 12, 2004 5:15 am
Posts: 5
Hello,

once I load my configuration from a hibernate.cfg.xml file and create a session factory on this configuration I get an "net.sf.hibernate.cfg.Environment.jvmSupportsGetGeneratedKeys()" error.
I already changed my id's to be of the type uuid.string - which should work with every JVM, isn't it?

CU
CBU


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 12, 2004 5:21 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Stack trace???


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 12, 2004 5:31 am 
Newbie

Joined: Thu Feb 12, 2004 5:15 am
Posts: 5
####<12.02.2004 10.31 Uhr CET> <Notice> <Security> <HER5297> <myserver> <main> <<WLS Kernel>> <> <BEA-090082> <Security initializing using security realm myrealm.>
####<12.02.2004 10.31 Uhr CET> <Notice> <WebLogicServer> <HER5297> <myserver> <main> <<WLS Kernel>> <> <BEA-000327> <Starting WebLogic Admin Server "myserver" for domain "mydomain">
####<12.02.2004 10.31 Uhr CET> <Error> <HTTP> <HER5297> <myserver> <main> <<WLS Kernel>> <> <BEA-101216> <Servlet: "action" failed to preload on startup in Web application: "/or".
javax.servlet.ServletException: net.sf.hibernate.cfg.Environment.jvmSupportsGetGeneratedKeys()Z
at com.puma.hibernate.sample.session.HibernateStrutsPlugin.initHibernate(HibernateStrutsPlugin.java:158)
at com.puma.hibernate.sample.session.HibernateStrutsPlugin.init(HibernateStrutsPlugin.java:105)
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1158)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(ServletStubImpl.java:993)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:869)
at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:848)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:787)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3252)
at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3197)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3174)
at weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java:688)
at weblogic.servlet.internal.WebService.preloadResources(WebService.java:483)
at weblogic.servlet.internal.ServletInitService.resume(ServletInitService.java:30)
at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:964)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359)
at weblogic.Server.main(Server.java:32)
>
####<12.02.2004 10.31 Uhr CET> <Notice> <WebLogicServer> <HER5297> <myserver> <main> <<WLS Kernel>> <> <BEA-000360> <Server started in RUNNING mode>
####<12.02.2004 10.31 Uhr CET> <Notice> <WebLogicServer> <HER5297> <myserver> <ListenThread.Default> <<WLS Kernel>> <> <BEA-000355> <Thread "ListenThread.Default" listening on port 7001, ip address *.*>


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 12, 2004 5:32 am 
Newbie

Joined: Thu Feb 12, 2004 5:15 am
Posts: 5
Sorry,

probably I should have supplied my environment: BEA WLS 8.1 SP2, Struts 1.1 and Hibernate 2.1.2.

CBU


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 12, 2004 5:33 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
That is not a stack trace.

You swallowed our stack by wrapping it in a ServletException.

C'mon, this is just basic stuff.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 12, 2004 5:34 am 
Newbie

Joined: Thu Feb 12, 2004 5:15 am
Posts: 5
And this is my hibernate cfg:

<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">

<hibernate-configuration>
<session-factory>
<!-- properties -->
<property name="dialect">net.sf.hibernate.dialect.MySQLDialect</property>
<property name="hbm2ddl.auto">update</property>
<property name="connection.username">test</property>
<property name="connection.password">test</property>
<property name="connection.url">jdbc:mysql://localhost:3306/test</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="show_sql">true</property>
<property name="use_outer_join">true</property>
<property name="transaction.factory_class">net.sf.hibernate.transaction.JDBCTransactionFactory</property>
<property name="dbcp.minIdle">1</property>

<!-- Cache -->
<property name="cache.use_query_cache">true</property>

<!-- mapping files -->
<mapping resource="com/puma/hibernate/sample/dao/User.hbm.xml"/>
<mapping resource="com/puma/hibernate/sample/dao/Role.hbm.xml"/>
</session-factory>

</hibernate-configuration>


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 12, 2004 5:45 am 
Newbie

Joined: Thu Feb 12, 2004 5:15 am
Posts: 5
Sorry,

Your post reminded me onto the something I always did - this time I was really lazy. I copied the hibernate source into my web project. While copying I realized that I already had an Environment class of an old version with in my web project ... which did not have that method.

Best ... remove the whole thread. Waste of your time, sorry.

CU
CBU


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.