-->
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: Problem in container interceptor jboss.har:service=Hibernate
PostPosted: Wed Aug 25, 2004 4:14 pm 
Newbie

Joined: Wed Aug 25, 2004 3:51 pm
Posts: 1
Location: NYC
Following the instructions on the JBoss Wiki (http://www.jboss.org/wiki/Wiki.jsp?page=JBossHibernate) I get the following error:
Code:
15:56:05,977 INFO  [EjbModule] Deploying PropertyManagementSession
15:56:06,060 WARN  [EjbModule] Could not load the org.jboss.hibernate.session.EjbInterceptor interceptor for this container
net.sf.hibernate.HibernateException: Hibernate service is not registered: jboss.har:service=Hibernate
        at org.jboss.hibernate.session.SessionContext.resolveSessionFactory(SessionContext.java:299)
        at org.jboss.hibernate.session.SessionContext.<init>(SessionContext.java:102)
        at org.jboss.hibernate.session.SessionContext.<init>(SessionContext.java:86)
        at org.jboss.hibernate.session.EjbInterceptor.importXml(EjbInterceptor.java:57)
        at org.jboss.ejb.EjbModule.addInterceptors(EjbModule.java:860)
        at org.jboss.ejb.EjbModule.initializeContainer(EjbModule.java:743)
        at org.jboss.ejb.EjbModule.createStatelessSessionContainer(EjbModule.java:547)
        at org.jboss.ejb.EjbModule.createContainer(EjbModule.java:502)
        at org.jboss.ejb.EjbModule.createService(EjbModule.java:316)
        at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:237)
        at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:219)

....
This error comes after adding the following into standardjboss.xml :
Code:
<container-name>Hibernate Stateless SessionBean</container-name>
<call-logging>true</call-logging>
<container-interceptors>
<interceptor>org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.SecurityInterceptor</interceptor>
<!-- CMT -->
<interceptor transaction="Container">org.jboss.ejb.plugins.TxInterceptorCMT</int
erceptor>
<interceptor transaction="Container" metricsEnabled="true">org.jboss.ejb.plugins
.MetricsInterceptor</interceptor>
<interceptor transaction="Container">org.jboss.ejb.plugins.StatelessSessionInsta
nceInterceptor</interceptor>
<!-- BMT not feasible using Hibernate interceptor with 'transaction' scope!!!! -
->
<!-- Notice that the service name is the same as that used to define the MBean -
->
<interceptor service="jboss.har:service=Hibernate" scope="transaction">org.jboss
.hibernate.session.EjbInterceptor</interceptor>
</container-interceptors>
</container-configuration>

-----

my jboss.xml inside the .ear has the following entry (for the SSB I'm using) :
Code:
<session>
         <ejb-name>PropertyManagementSession</ejb-name>
         <jndi-name>rpmaster.server.session.PropertyManagementSession</jndi-name>
         <local-jndi-name>local/rpmaster.server.session.PropertyManagementSession</local-jndi-name>
         <configuration-name>Hibernate Stateless SessionBean</configuration-name>

      </session>


-------

my jboss-service.xml inside my Hibernate.har file looks like this :
Code:
<mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=Hibernate">
    <attribute name="DatasourceName">java:/PostgresDS</attribute>
    <attribute name="SessionFactoryName">java:/hibernate/SessionFactory</attribute>
    <attribute name="Dialect">net.sf.hibernate.dialect.PostgreSQLDialect</attribute>
    <attribute name="CacheProviderClass">net.sf.hibernate.cache.HashtableCacheProvider</attribute>
    <attribute name="Hbm2ddlAuto">create-drop</attribute>
    </mbean>


and the .har file itself has the following structure :

+ jboss-service.xml
+ my
+ project
+path
|--- class1.hbm.xml
|--- class1.class
...

------------
inside my EAR, the jboss-app.xml has the following :
Code:
<jboss-app>
  <loader-repository>rpmaster:loader=rpmaster.ear</loader-repository>


    <module><har>Hibernate.har</har></module>

</jboss-app>

and of course that archive is included in the EAR.
--------------

I am using JBoss3.2.6RC1 . I DID update the 2 files hibernate-deployer-service.xml and jboss-hibernate.jar . Anyone have any idea how I get JBoss to register the "Hibernate" service ?

THanks in Advance

S3ma4


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 26, 2004 5:41 am 
Beginner
Beginner

Joined: Mon Aug 16, 2004 6:09 am
Posts: 46
Location: Geneva, Switzerland
Hi,

Note that what's used to be jboss-service.xml in case of hibernate har deployment must be renamed to hibernate-service.xml. It's missed in wiki.
Your har just not been deployed. Fix it and make sure you can see jboss.har:service=Hibernate in jmx console.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 26, 2004 5:53 am 
Newbie

Joined: Sat Aug 14, 2004 6:44 am
Posts: 17
Location: Auckland, NZ
To quote the wiki

Quote:
When a HAR is processed by the HAR Deployer, a Hibernate MBean instance is created based on the HAR's meta-inf/hibernate-service.xml and the contents of the har (the mappings are processed using Hibernate's Configuration.addJar() method).


You appear to have called renamed the hibernate-service.xml and then you don't appear to have put it into the meta-inf of the HAR file.


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.