Hi. 
I upgraded my jboss from 3.x to 4 series and I got a problem with my hibernate 
sar. My application was deployed as an EAR with a SAR inside:

app.ear
 --- app.sar
 ------(hbm.xml files)
 ------meta-inf
 ---------jboss-service.xml (referencing classpath to external jars)
 ---app.war(...)
 --- meta-inf (...)

But something weird started to happen. The service is registered, the jboss log 
does not give any error, but when I try to lookup it just returns null. It does 
not return a not-found error... what is strange! I see that there is a more 
integrated way to do this with the har archive... but I found the wiki unclear 
on how to use it. I just don't TRUST it! can't make it work.
is the sar deprecated for hibernate deployment? I really wanted to  make my EAR 
JBOSS VERSION INDEPENDENT.
my jboss-service is:

  | <server>
  |    <classpath codebase='deploy/pettwo.ear/pettwo.war/WEB-INF/lib/' 
archives='*' />
  |    <classpath codebase='deploy/pettwo.ear/' archives='*' />
  |    <mbean code="org.hibernate.jmx.HibernateService" 
name="jboss.jca:service=pettwoHibernateSessionFactory">
  |        <depends>jboss.jca:service=RARDeployer</depends>
  |        <attribute name="MapResources">
  | (...my files...)
  | </attribute>
  |        <attribute 
name="JndiName">java:/hibernate/pettwoSessionFactory</attribute>
  |        <attribute name="Datasource">java:/jdbc/pettwo</attribute>
  |        <attribute 
name="Dialect">org.hibernate.dialect.PostgreSQLDialect</attribute>
  |        <attribute 
name="UserTransactionName">java:comp/UserTransaction</attribute>
  |        <attribute 
name="TransactionStrategy">org.hibernate.transaction.JTATransactionFactory</attribute>
  |        <attribute 
name="TransactionManagerLookupStrategy">org.hibernate.transaction.JBossTransactionManagerLookup</attribute>
  |    </mbean>
  | </server>
  | 
my java lookup code is:


  |     InitialContext ic = new InitialContext();
  |     SessionFactory _sessionFactory = (SessionFactory) 
ic.lookup("java:/hibernate/pettwoSessionFactory");
  | 

the jboss log:

anonymous wrote : 2005-08-05 18:09:58,984 DEBUG 
[org.hibernate.impl.SessionFactoryObjectFactory] initializing class 
SessionFactoryObjectFactory
  | 2005-08-05 18:09:58,984 DEBUG 
[org.hibernate.impl.SessionFactoryObjectFactory] JNDI lookup: 
hibernate/pettwoSessionFactory
  | 2005-08-05 18:09:58,984 DEBUG 
[org.hibernate.impl.SessionFactoryObjectFactory] lookup: 
uid=402880830588776801058877718c0000
  | 2005-08-05 18:09:58,984 WARN  
[org.hibernate.impl.SessionFactoryObjectFactory] Not found: 
402880830588776801058877718c0000
  | 
It worked fine on jboss 3x series. 
Thanks

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3888739#3888739

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3888739


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to