-->
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.  [ 1 post ] 
Author Message
 Post subject: HibernateFactory not bound!
PostPosted: Wed Apr 12, 2006 9:48 am 
Newbie

Joined: Wed Oct 19, 2005 8:04 am
Posts: 19
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

[b]Hibernate version:3.0.5[/b]

[b]Mapping documents: turundaja-hibernate.sar[/b]

I use Jboss 4.0. and Postresql.

I have such a problem that i need to run that application under new server and it is workin ok on the old one.
It seems to deploy ok. But when i try to login into that application i get some problem with security module or smth, may be it is Jaas problem.

javax.security.auth.login.LoginException: java.lang.ExceptionInInitializerError
at ee.mobi.congam.DAOFactory.getUserDAO(DAOFactory.java:37)
at ee.mobi.congam.auth.DBLoginModule.validate(DBLoginModule.java:352)
at ee.mobi.congam.auth.DBLoginModule.login(DBLoginModule.java:162)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)

blabla

Caused by: ee.mobi.congam.ConGamException: Exception initialling DAO: HibernateF
actory not bound
at ee.mobi.congam.DAO.<clinit>(DAO.java:45)
... 54 more

at javax.security.auth.login.LoginContext.invoke(LoginContext.java:872)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:1
86)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:6
80)
bla bla bla

So i decided to deploy just one .sar and see what happens and get it while deploying:

16:21:39,812 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
MBeans waiting for other MBeans:
ObjectName: jboss.jca:service=HibernateFactory,name=HibernateFactory
state: CONFIGURED
I Depend On: jboss.jca:service=RARDeployer
jboss.jca:service=LocalTxCM,name=jdbc/psql/turundaja

Depends On Me:

MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM:
ObjectName: jboss.jca:service=LocalTxCM,name=jdbc/psql/turundaja
state: NOTYETINSTALLED
I Depend On:
Depends On Me: jboss.jca:service=HibernateFactory,name=HibernateFactory

Here is part of postgres-ds.xml:

<local-tx-datasource>
<jndi-name>/jdbc/psql/turundaja</jndi-name>
<connection-url>jdbc:postgresql://localhost:5432/turundaja</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<user-name>turundaja</user-name>
<password></password>
</local-tx-datasource>

Here is jboss-service.xml

<?xml version="1.0"?>
<server>

<mbean code="org.hibernate.jmx.HibernateService"
name="jboss.jca:service=HibernateFactory,name=HibernateFactory">

<!-- Required services -->
<depends>jboss.jca:service=RARDeployer</depends>
<depends>jboss.jca:service=LocalTxCM,name=jdbc/psql/turundaja</depends>

<!-- Bind the Hibernate service to JNDI -->
<attribute name="JndiName">java:/HibernateFactory</attribute>

<!-- Datasource settings -->
<attribute name="Datasource">java:/jdbc/psql/turundaja</attribute>
<attribute name="Dialect">org.hibernate.dialect.PostgreSQLDialect</attribute>

<!-- Transaction integration -->
<attribute name="TransactionStrategy">
org.hibernate.transaction.JTATransactionFactory</attribute>
<attribute name="TransactionManagerLookupStrategy">
org.hibernate.transaction.JBossTransactionManagerLookup</attribute>
<attribute name="FlushBeforeCompletionEnabled">true</attribute>
<attribute name="AutoCloseSessionEnabled">true</attribute>

<!-- Fetching options -->
<attribute name="MaximumFetchDepth">5</attribute>

<!-- Second-level caching -->
<attribute name="SecondLevelCacheEnabled">true</attribute>
<attribute name="CacheProviderClass">org.hibernate.cache.EhCacheProvider</attribute>
<attribute name="QueryCacheEnabled">true</attribute>

<!-- Logging -->
<attribute name="ShowSqlEnabled">true</attribute>

<!-- Mapping files -->
<attribute name="MapResources"> ...mappings, xmls....
</attribute>

</mbean>

</server>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.