-->
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.  [ 5 posts ] 
Author Message
 Post subject: No Attribute found with name: MapResources
PostPosted: Fri Nov 12, 2004 7:35 pm 
Newbie

Joined: Fri Nov 12, 2004 7:16 pm
Posts: 1
I am geting following error when I try to deploy hibernate Mbean in JBoss 4.0,

org.jboss.deployment.DeploymentException: No Attribute found with name: MapResources

Hibernate version:2.1.6

Mapping documents:

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

Full stack trace of any exception that occurs:
Code:
The Exception:
org.jboss.deployment.DeploymentException: No Attribute found with name: MapResources
rces
at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.ja
va:340)
at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigura
tor.java:160)
at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java
:114)
at org.jboss.system.ServiceController.install(ServiceController.java:200
)
at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:242)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy4.install(Unknown Source)
at org.jboss.deployment.SARDeployer.create(SARDeployer.java:208)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:889)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:881)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:745)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:141)



Name and version of the database you are using:MySQL 4.1.6

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


I tried to google for this problem but couldn't find any useful info.

HAR structure:
Code:
|-com
   |-utkarsh
            |-abhyasika
                 |-hibernate
                       |- Category.class
                       |- Category.hbm.xml
|-META-INF
      |- hibernate-service.xml
|-hibernate.cfg.xml
|-hibernate.properties


hibernate-service.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE server>

<server>
   <mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=Hibernate">
       <depends>jboss.har:service=HARDeployer</depends>
       <depends>jboss.jca:service=LocalTxCM,name=MySqlDS</depends>
       <attribute name="MapResources">com/utkarsh/abhyasika/hibernate/Category.hbm.xml
       </attribute>
       <attribute name="DatasourceName">java:/MySQLDS</attribute>
       <attribute name="Dialect">net.sf.hibernate.dialect.MySQLDialect</attribute>
       <attribute name="UseOuterJoin">true</attribute>
       <attribute name="ShowSql">false</attribute>
       <attribute name="UserTransactionName">UserTransaction</attribute>
       <attribute name="TransactionStrategy">net.sf.hibernate.transaction.JTATransactionFactory</attribute>
       <attribute name="TransactionManagerLookupStrategy">net.sf.hibernate.transaction.JBossTransactionManagerLookup</attribute>
      <attribute name="SessionFactoryName">java:/hibernate/SessionFactory</attribute>
   <attribute name="CacheProviderClass">net.sf.hibernate.cache.HashtableCacheProvider</attribute>
   <attribute name="Hbm2ddlAuto">update</attribute>
   </mbean>
</server>   


Any ideas as to what could be problem?

Thanks
Utkarsh


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 12, 2004 11:36 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Sure. org.jboss.hibernate.jmx.Hibernate does not have a MapResources property. No need to define them; the deployer responsible for har archives finds them automatically in the archive.


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 01, 2005 9:12 pm 
Newbie

Joined: Sun May 01, 2005 7:14 pm
Posts: 2
Sorry that I bump up this old thread again, but I have the opposite to this problem. I'm using JBoss 4.0.1SP1 and the Hibernate version that comes with it (2.1.6). I've created a .HAR-file with the following content:

META-INF/MANIFEST.MF
META-INF/hibernate-service.xml
de/poly/databean/persistence/Nutzer.hbm.xml
de/poly/databean/persistence/Nutzer.class

hibernate-service.xml

Code:
<server>
   <mbean code="net.sf.hibernate.jmx.HibernateService" name="jboss.jca:service=TestServ">
       <depends>jboss.jca:service=RARDeployer</depends>
       <attribute name="JndiName">java:/hibernate/TestSession</attribute>
       <attribute name="Datasource">java:Wetten</attribute>
       <attribute name="Dialect">net.sf.hibernate.dialect.MySQLDialect</attribute>
       <attribute name="ShowSql">false</attribute>
   </mbean>

</server>


When I leave the file like this, the mappings aren't created upon deployment (what they should according to what I've read) which results in "no persister"-errors when trying to use these classes in my code.
When I add the following line
Code:
<attribute name="MapResources">de/poly/databean/persistence/Nutzer.hbm.xml</attribute>

and deploy it, the log shows that the mappings were correctly done and my code also works.

Now out of pure interest:
What may cause this very different behaviour? Was there something changed with Hibernate in 4.0.1SP1?


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 02, 2005 9:52 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Look I'm not sure how I can explain this any more clearly than I already have in other posts (hint, search!).

JBoss has its own Hibernate MBEan (hint, which you are not using!).


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 02, 2005 11:27 am 
Newbie

Joined: Sun May 01, 2005 7:14 pm
Posts: 2
Ok, I found it out.
Sorry for that question :(.


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