-->
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.  [ 2 posts ] 
Author Message
 Post subject: Problem starting service jboss.jca
PostPosted: Fri Jun 17, 2005 3:31 am 
Newbie

Joined: Fri Jun 17, 2005 3:26 am
Posts: 2
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hallo!
I try to start my JBoss Server and it always tell me this error.

Who can help me?

Thank's!

Hibernate version: 3.0

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:
2005-06-17 09:12:31,902 WARN [org.jboss.system.ServiceController] Problem starting service jboss.jca:service=HibernateFactory,name=HibernateFactory
java.lang.NoClassDefFoundError
at org.hibernate.impl.SessionFactoryImpl.<clinit>(SessionFactoryImpl.java:319)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1055)
at org.hibernate.jmx.HibernateService.buildSessionFactory(HibernateService.java:64)
at org.hibernate.jmx.HibernateService.start(HibernateService.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
at $Proxy13.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:394)
at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy6.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:274)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:394)
at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:589)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:384)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:291)
at org.jboss.Main.boot(Main.java:150)
at org.jboss.Main$1.run(Main.java:395)
at java.lang.Thread.run(Thread.java:534)

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Top
 Profile  
 
 Post subject: Problem starting service jboss.jca
PostPosted: Fri Jun 17, 2005 3:41 am 
Newbie

Joined: Fri Jun 17, 2005 3:26 am
Posts: 2
I'll complet my message :
Trace in my JBoss :

2005-06-17 09:12:31,480 INFO [org.hibernate.cfg.SettingsFactory] RDBMS: Oracle, version: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
2005-06-17 09:12:31,480 INFO [org.hibernate.cfg.SettingsFactory] JDBC driver: Oracle JDBC driver, version: 9.2.0.3.0
2005-06-17 09:12:31,715 INFO [org.hibernate.dialect.Dialect] Using dialect: org.hibernate.dialect.Oracle9Dialect
2005-06-17 09:12:31,746 INFO [org.hibernate.transaction.TransactionFactoryFactory] Transaction strategy: org.hibernate.transaction.JTATransactionFactory
2005-06-17 09:12:31,746 INFO [org.hibernate.util.NamingHelper] JNDI InitialContext properties:{}
2005-06-17 09:12:31,761 INFO [org.hibernate.transaction.TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
2005-06-17 09:12:31,761 INFO [org.hibernate.transaction.TransactionManagerLookupFactory] instantiated TransactionManagerLookup
2005-06-17 09:12:31,761 INFO [org.hibernate.cfg.SettingsFactory] Automatic flush during beforeCompletion(): disabled
2005-06-17 09:12:31,761 INFO [org.hibernate.cfg.SettingsFactory] Automatic session close at end of transaction: disabled
2005-06-17 09:12:31,761 INFO [org.hibernate.cfg.SettingsFactory] JDBC batch size: 20
2005-06-17 09:12:31,761 INFO [org.hibernate.cfg.SettingsFactory] JDBC batch updates for versioned data: disabled
2005-06-17 09:12:31,777 INFO [org.hibernate.cfg.SettingsFactory] Scrollable result sets: enabled
2005-06-17 09:12:31,777 INFO [org.hibernate.cfg.SettingsFactory] JDBC3 getGeneratedKeys(): enabled
2005-06-17 09:12:31,777 INFO [org.hibernate.cfg.SettingsFactory] Connection release mode: null
2005-06-17 09:12:31,777 INFO [org.hibernate.cfg.SettingsFactory] Maximum outer join fetch depth: 2
2005-06-17 09:12:31,777 INFO [org.hibernate.cfg.SettingsFactory] Default batch fetch size: 1
2005-06-17 09:12:31,777 INFO [org.hibernate.cfg.SettingsFactory] Generate SQL with comments: disabled
2005-06-17 09:12:31,777 INFO [org.hibernate.cfg.SettingsFactory] Order SQL updates by primary key: disabled
2005-06-17 09:12:31,777 INFO [org.hibernate.cfg.SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
2005-06-17 09:12:31,793 INFO [org.hibernate.hql.ast.ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
2005-06-17 09:12:31,793 INFO [org.hibernate.cfg.SettingsFactory] Query language substitutions: {}
2005-06-17 09:12:31,793 INFO [org.hibernate.cfg.SettingsFactory] Second-level cache: enabled
2005-06-17 09:12:31,793 INFO [org.hibernate.cfg.SettingsFactory] Query cache: enabled
2005-06-17 09:12:31,793 INFO [org.hibernate.cfg.SettingsFactory] Cache provider: org.hibernate.cache.EhCacheProvider
2005-06-17 09:12:31,808 INFO [org.hibernate.cfg.SettingsFactory] Optimize cache for minimal puts: disabled
2005-06-17 09:12:31,808 INFO [org.hibernate.cfg.SettingsFactory] Structured second-level cache entries: enabled
2005-06-17 09:12:31,808 INFO [org.hibernate.cfg.SettingsFactory] Query cache factory: org.hibernate.cache.StandardQueryCacheFactory
2005-06-17 09:12:31,855 INFO [org.hibernate.cfg.SettingsFactory] Echoing all SQL to stdout
2005-06-17 09:12:31,855 INFO [org.hibernate.cfg.SettingsFactory] Statistics: disabled
2005-06-17 09:12:31,855 INFO [org.hibernate.cfg.SettingsFactory] Deleted entity synthetic identifier rollback: disabled
2005-06-17 09:12:31,871 INFO [org.hibernate.cfg.SettingsFactory] Default entity-mode: pojo
2005-06-17 09:12:31,902 WARN [org.jboss.system.ServiceController] Problem starting service jboss.jca:service=HibernateFactory,name=HibernateFactory
java.lang.NoClassDefFoundError
at org.hibernate.impl.SessionFactoryImpl.<clinit>(SessionFactoryImpl.java:319)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1055)
at org.hibernate.jmx.HibernateService.buildSessionFactory(HibernateService.java:64)
at org.hibernate.jmx.HibernateService.start(HibernateService.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
....


/*******************************************************/
JBoss-Service :

<server>
<mbean code="org.hibernate.jmx.HibernateService" name="jboss.jca:service=HibernateFactory,
name=HibernateFactory">
<depends>jboss.jca:service=RARDeployer</depends>
<depends>jboss.jca:service=XATxCM,name=MYDB</depends>
<!-- Make it deploy ONLY after DataSource had been started -->
<attribute name="MapResources">
...... my Resources
</attribute>
<attribute name="JndiName">java:/hibernate/HibernateFactory</attribute>
<attribute name="Datasource">java:/MYDB</attribute>
<attribute name="Dialect">org.hibernate.dialect.Oracle9Dialect</attribute>
<attribute name="TransactionStrategy">org.hibernate.transaction.JTATransactionFactory</attribute>
<attribute name="TransactionManagerLookupStrategy">org.hibernate.transaction.JBossTransactionManagerLookup</attribute>
<!-- <attribute name="UseOuterJoin">true</attribute>-->
<attribute name="ShowSqlEnabled">true</attribute>
<attribute name="UserTransactionName">UserTransaction</attribute>
<attribute name="QueryCacheEnabled">true</attribute>
<!-- <attribute name="CacheProvider">org.hibernate.cache.OSCacheProvider</attribute>-->
<!-- <attribute name="CacheProvider">org.hibernate.cache.TreeCacheProvider</attribute>-->
<attribute name="CacheProviderClass">org.hibernate.cache.EhCacheProvider</attribute>
<attribute name="JdbcBatchSize">20</attribute>
<attribute name="MaximumFetchDepth">2</attribute>
<attribute name="GetGeneratedKeysEnabled">true</attribute>
<attribute name="CommentsEnabled">false</attribute>
<!-- <atttribute name="JdbcFetchSize">20</atttribute>-->

</mbean>
</server>


/**************************************************/
SessionFactoryUtils :

public static final String JNDI_HIBERNATE_FACTORY = "java:/hibernate/HibernateFactory";
...
public SessionFactory getSessionFactory() throws NamingException {
if (sessionFactory == null) {
sessionFactory = (SessionFactory) new InitialContext().lookup(JNDI_HIBERNATE_FACTORY);
if (log.isDebugEnabled()) {
log.debug("Neue SessionFactory erzeugt (" + JNDI_HIBERNATE_FACTORY + "): " + sessionFactory.toString());
}
} else {
if (log.isDebugEnabled()) {
log.debug("Reuse der SessionFactory: " + sessionFactory.toString());
}
}
return sessionFactory;
}


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