-->
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: Deploying Hibernate as SAR on JBoss - Error: id generator
PostPosted: Thu Feb 05, 2004 10:47 pm 
Beginner
Beginner

Joined: Thu Feb 05, 2004 10:39 pm
Posts: 44
I have set up my ant builds as docmented in help doc 66.html. I am trying to set up Hibernate as a MBean service on JBoss 3.2.2 RC4.

I have 1 JAR and 1 SAR, a JAR with one persistent class and the SAR with the hibernate xml files, the hibernate.properties file and jboss-service.xml for the MBean.

If I deplpy the SAR after my JAR, I get this print out:

19:54:35,055 INFO [Configuration] Mapping resource: com/forisent/framework/itemOrganizer/store/entity/ElementToGroupDTO
.hbm.xml
19:54:35,205 INFO [Binder] Mapping class: com.forisent.framework.itemOrganizer.store.entity.ElementToGroupDTO -> Relati
noship
19:54:35,396 INFO [Configuration] processing one-to-many association mappings
19:54:35,396 INFO [Configuration] processing one-to-one association property references
19:54:35,396 INFO [Configuration] processing foreign key constraints
19:54:35,446 INFO [Dialect] Using dialect: net.sf.hibernate.dialect.MySQLDialect
19:54:35,446 INFO [SettingsFactory] Use outer join fetching: true
19:54:35,456 INFO [NamingHelper] JNDI InitialContext properties:{}
19:54:35,456 INFO [DatasourceConnectionProvider] Using datasource: java:/itemOrganizer
19:54:35,466 INFO [TransactionFactoryFactory] Transaction strategy: net.sf.hibernate.transaction.JTATransactionFactory
19:54:35,466 INFO [NamingHelper] JNDI InitialContext properties:{}
19:54:35,476 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: net.sf.hibernate.transactio
n.JBossTransactionManagerLookup
19:54:35,476 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
19:54:35,476 INFO [NamingHelper] JNDI InitialContext properties:{}
19:54:35,476 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: net.sf.hibernate.transactio
n.JBossTransactionManagerLookup
19:54:35,476 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
19:54:35,796 INFO [SettingsFactory] Use scrollable result sets: true
19:54:35,796 INFO [SettingsFactory] JDBC 2 max batch size: 15
19:54:35,796 INFO [SettingsFactory] Query language substitutions: {}
19:54:35,796 INFO [SettingsFactory] cache provider: net.sf.ehcache.hibernate.Provider
19:54:35,816 INFO [Configuration] instantiating and configuring caches
19:54:35,996 INFO [SessionFactoryImpl] building session factory
19:54:36,157 INFO [HibernateServiceMBean] Could not build SessionFactory using the MBean classpath - will try again using client classpath: could not instantiate id generator
19:54:36,157 INFO [SessionFactoryObjectFactory] Factory name: java:/HibernateFactory
19:54:36,157 INFO [NamingHelper] JNDI InitialContext properties:{}
19:54:36,157 INFO [SessionFactoryObjectFactory] Bound factory to JNDI name: java:/HibernateFactory
19:54:36,157 WARN [SessionFactoryObjectFactory] InitialContext did not implement EventContext
19:54:36,167 INFO [MainDeployer] Deployed package: file:/C:/JBoss/server/default/deploy/Hibernate.sar


Code:
With the errors stating: Could not build SessionFactory using the MBean classpath - will try again using client classpath: could not instantiate id generator


I have placed all the required hibernate JARs in my deploy/default.lib directory.

What is going wrong here? Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 06, 2004 12:23 am 
Beginner
Beginner

Joined: Thu Feb 05, 2004 10:39 pm
Posts: 44
ok, duh,

I specified the generator class as only : uuid instead of uuid.string.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 24, 2004 12:50 am 
Beginner
Beginner

Joined: Thu Jan 08, 2004 4:40 am
Posts: 48
Location: Bangkok, Thailand
Please show your mapping doc.
# When asking questions, give at least: the Hibernate version
# your mapping documents
# the Java code between sessionFactory.openSession() and session.close()
# the full stack trace of any exception that occurs
# the name and version of the database you are using
# a debug level Hibernate log excerpt is also appreciated

_________________
<name>arin</name>
<at>netplus software</at>


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 17, 2004 6:09 pm 
Newbie

Joined: Fri Jun 11, 2004 1:35 am
Posts: 18
Hello!!
I have the same problem that Junior.
Could not build SessionFactory.......
I using hibernate 2.1.4 and jboss 3.2.3.
I have a file hibernate.sar and my structure is:

co/edu/escuelaing/Usuario.class
mappings/Usuario.hbm.xml
META-INF/jboss-service.xml

and my jboss-service is:

and file jboss-service.xml it is:

<server>
<mbean code="net.sf.hibernate.jmx.HibernateService" name="jboss.jca:service=HibernateFactory,
name=HibernateFactory">
<depends>jboss.jca:service=RARDeployer</depends>
<depends>jboss.jca:service=LocalTxCM,name=SigmaDS</depends>
<!-- Make it deploy ONLY after DataSource had been started -->
<attribute name="MapResources">/mappings/Usuario.hbm.xml</attribute>
<attribute name="JndiName">java:/hibernate/HibernateFactory</attribute>
<attribute name="Datasource">java:/SigmaDS</attribute>
<attribute name="Dialect">net.sf.hibernate.dialect.PostgreSQLDialect</attribute>
<attribute name="TransactionStrategy">net.sf.hibernate.transaction.JTATransactionFactory</attribute>
<attribute name="TransactionManagerLookupStrategy">net.sf.hibernate.transaction.JBossTransactionManagerLookup</attribute>
<attribute name="UseOuterJoin">false</attribute>
<attribute name="ShowSql">false</attribute>
<attribute name="UserTransactionName">UserTransaction</attribute>
</mbean>
</server>

Thanks!!


Marcela Moreno


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.