-->
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.  [ 3 posts ] 
Author Message
 Post subject: JBoss 3.2.6 configuration
PostPosted: Thu Oct 28, 2004 7:30 am 
Newbie

Joined: Thu Oct 28, 2004 7:22 am
Posts: 5
Hibernate version: 2.1.5 (inside JBoss distribution)

hello,

with JBoss 3.2.6 it seems Hibernate is inside the distribution, but how must it be configurate to use my DataSource already defined ?
i change hibernate-deployer-service.xml to:

<mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=Hibernate">
<attribute name="SessionFactoryName">java:/hibernate/SessionFactory</attribute>
<attribute name="DatasourceName">java:/DefaultDS</attribute>
<attribute name="Dialect">net.sf.hibernate.dialect.Oracle9Dialect</attribute>
</mbean>

but i get errors in JBoss start...


12:29:53,250 INFO [Environment] Hibernate 2.1.5
12:29:53,250 INFO [Environment] hibernate.properties not found
12:29:53,250 INFO [Environment] using CGLIB reflection optimizer
12:29:53,265 ERROR [Hibernate] Starting failed jboss.har:service=Hibernate
java.lang.NullPointerException
at org.jboss.hibernate.jmx.Hibernate.buildSessionFactory(Hibernate.java:460)
at org.jboss.hibernate.jmx.Hibernate.startService(Hibernate.java:444)
...
...
...



thanks for any help

Arnaud


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 28, 2004 10:32 am 
Beginner
Beginner

Joined: Mon Sep 08, 2003 10:56 am
Posts: 35
You don't change hibernate-deployer-service.xml. That file should be left intact. Along the lines of:

Code:
<server>
   <mbean code="org.jboss.hibernate.har.HARDeployer"                          name="jboss.har:service=HARDeployer">
        <attribute name="ValidateDTDs">false</attribute>
        </mbean>
</server>


You then want to package all your hibernate persistant classes, and their hbm.xml files into a jar named *whateveryouwant*.har The har extension is required.

Inside the har archive, you need a META-INF directory with a hibernate-service.xml descriptor file, that's where you throw your mbean configuration.
Code:
<mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=Hibernate">
<attribute name="SessionFactoryName">java:/hibernate/SessionFactory</attribute>
<attribute name="DatasourceName">java:/DefaultDS</attribute>
<attribute name="Dialect">net.sf.hibernate.dialect.Oracle9Dialect</attribute>
</mbean>


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 29, 2004 4:37 am 
Newbie

Joined: Thu Oct 28, 2004 7:22 am
Posts: 5
Thanks for your reply, i'll try it :)


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