-
1. 3779198
tomislavr Oct 11, 2004 9:13 PM (in response to berkgypsy)I have the same problem . How can I configure JBossMQ for DefaultJMSProvider and MQSeriesJMSProvider for MQ Series and how can I test it .
in the Jmx-console I get only the JBSSMQProvider irrespective of changes in the jms-ds.xml and jboss-service.xml
Can you post (Cut and Paste ) the config files in the Fourm
Many thanks -
2. Re: using hibernate in jboss-4.0.0
berkgypsy Oct 12, 2004 2:43 PM (in response to berkgypsy)fixing this line corrected the problem:
-
3. Re: using hibernate in jboss-4.0.0
berkgypsy Oct 12, 2004 2:58 PM (in response to berkgypsy)more changes to make this 4.0.0 compatible, and now it's working, for those interested:
<server> <mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=Hibernate"> <depends>jboss.jca:service=LocalTxCM,name=TxOracleDS</depends> <attribute name="SessionFactoryName">java:/HibernateFactory</attribute> <attribute name="DatasourceName">java:/TxOracleDS</attribute> <attribute name="Dialect">net.sf.hibernate.dialect.Oracle9Dialect</attribute> <attribute name="CacheProviderClass">net.sf.hibernate.cache.HashtableCacheProvider</attribute> <attribute name="Hbm2ddlAuto">update</attribute> </mbean> </server>
-
4. Re: using hibernate in jboss-4.0.0
dapeng Oct 15, 2004 9:14 AM (in response to berkgypsy)Can you show a complete working example? Did you put the .HAR in your .EAR file? How do you access the SessionFactory? Where did you put the hibernate.hbm.xml?
Thanks for any help. -
5. Re: using hibernate in jboss-4.0.0
beyarecords Oct 21, 2004 6:41 PM (in response to berkgypsy)"berkgypsy" wrote:
more changes to make this 4.0.0 compatible, and now it's working, for those interested:<server> <mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=Hibernate"> <depends>jboss.jca:service=LocalTxCM,name=TxOracleDS</depends> <attribute name="SessionFactoryName">java:/HibernateFactory</attribute> <attribute name="DatasourceName">java:/TxOracleDS</attribute> <attribute name="Dialect">net.sf.hibernate.dialect.Oracle9Dialect</attribute> <attribute name="CacheProviderClass">net.sf.hibernate.cache.HashtableCacheProvider</attribute> <attribute name="Hbm2ddlAuto">update</attribute> </mbean> </server>
Hi,
i'm at the stage you were at when wrtting this article and well and truely stuck. My structure thus far is:
hibernate.har
inside the .har file I have two folders
1. meta-inf - containing hibernate-service.xml
2. test - containing my *.Class and *.hbm.xml files (Is this correct ?)
Do i have to call the test folder test.war or some such name?
In what file do i specify my mapresources? is it the hibernate-service.xml file itself? If so how do I specify the files.
I have scaned the available resources on this issue but the solutions are for different incarnations of jboss which have all have different implentations, and thus don't work.
I am currently running JBoss 3.2.6
many thanks for your help and time
Andrew -
6. Re: using hibernate in jboss-4.0.0
utkarshpune Nov 4, 2004 11:18 PM (in response to berkgypsy)Hello,
I am also getting the same error. Were you able to solve it? If yes please let me know the solution.
Thanks -
7. Re: using hibernate in jboss-4.0.0
utkarshpune Nov 8, 2004 9:30 PM (in response to berkgypsy)I am geting following error when I try to deploy hibernate Mbean,
org.jboss.deployment.DeploymentException: No Attribute found with name: MapResources
I tried to google for this problem but couldn't find any useful info.
My Abhyasika.har has following structure,
com <--This folder contains my package hierarchy with classes and hbm.xml files
META-INF <-- It contains hibernate-service.xml
hibernate.cfg.xml
hibernate.properties
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)
Here is my hibernate-service.xml<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE server> <!-- Generated file - Do not edit! --> <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>
Let me know as to what could be problem?
Thanks
Utkarsh -
8. Re: using hibernate in jboss-4.0.0
tomislavr Dec 6, 2004 11:54 AM (in response to berkgypsy)> My Abhyasika.har has following structure ,
> com <--This folder contains my package hierarchy with classes and
> hbm.xml files
> META-INF <-- It contains hibernate-service.xml
> hibernate.cfg.xml
> hibernate.properties
I don't know about the last two - I'm not using them, but for sure you have a problem because you are using attributes which now do not exist. For example, 'MapResources' att. is no longer required as Jboss will search inside .har for .hbm descriptors.
I'll give you a list of att. I found in Jboss source, so this is all you have now. Things have changed, and docs are not updated everywhere.
Also I've noticed a lot of questions about 'HarUrl' stuff - change mbean code att. to "org.jboss.hibernate.jmx.Hibernate" :)
Attributes:
datasourceName
dialect
sessionFactoryName
cacheProviderClass
cacheRegionPrefix
hbm2ddlAuto
defaultSchema
jdbcBatchSize
jdbcFetchSize
jdbcScrollableResultSetEnabled
queryCacheEnabled
querySubstitutions
maxFetchDepth
showSqlEnabled
getGeneratedKeysEnabled
username
password
TRANSACTION_MANAGER_STRATEGY
TRANSACTION_STRATEGY
hope this helps..
cheers,
Tomislav -
9. Re: using hibernate in jboss-4.0.0
yura_net Dec 9, 2004 12:12 PM (in response to berkgypsy)This is a full list of attributes:
Dirty
CacheProviderClass
CacheRegionPrefix
GetGeneratedKeysEnabled
SessionFactoryName
HarUrl
DefaultSchema
ShowSqlEnabled
QueryCacheEnabled
DatasourceName
Password
JdbcFetchSize
StateString
SessionFactoryRunning
JdbcBatchSize
JdbcScrollableResultSetEnabled
Hbm2ddlAuto
MaxFetchDepth
Name
QuerySubstitutions
Dialect
SessionFactoryInterceptor
Username
It's easy to find this in JBoss Web-Consol.
by default:
http://localhost:8080/web-console/
Just select System->JMX MBeans->jboss.har->jboss.har:servise=Hibernate and you will see all attributes and it's values. -
10. Re: using hibernate in jboss-4.0.0
rajs1 Dec 14, 2004 8:18 AM (in response to berkgypsy)I got it all working with Apache Derby as the database server, without a hitch (so far).
First one needs to replace (in default/lib) the jboss-hibernate.jar that comes with JBoss4RC2 with the one from this wiki
http://www.jboss.org/wiki/Wiki.jsp?page=JBossHibernate
Rename jboss-hibernate-NEW.jar as jboss-hibernate.jar.
Also configure the MBean as mentioned in the wiki:
My MBean is configured as:<mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=Hibernate"> <attribute name="DatasourceName">java:/DefaultDS</attribute> <attribute name="SessionFactoryName">java:/hibernate/SessionFactory</attribute> <attribute name="Dialect">net.sf.hibernate.dialect.DerbyDialect</attribute> <attribute name="CacheProviderClass">net.sf.hibernate.cache.HashtableCacheProvider</attribute> </mbean>
If you are going to use the Apache Derby DB then there is no dialect support for this at the moment but the requried files can be got from here
[url=http://opensource.atlassian.com/projects/hibernate/browse/HB-1224][http://opensource.atlassian.com/projects/hibernate/browse/HB-1224[/url]
compiled and incorprated into the hibernate2.jar file in default/lib
Finally my jboss-app.xml file is as follows:<!DOCTYPE jboss-app PUBLIC "-//JBoss//DTD J2EE Application 1.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-app_4_0.dtd"> <jboss-app> <module> <har>rlhibernate.har</har> </module> <module> <ejb>rlhibernate.jar</ejb> </module> </jboss-app>
The only thing I noticed is that this job-app.xml seems to go in as meta-inf/application.xml since my ear is created using an Ant script.
Doesn't seem to affect the deployment of the ear though.
Hope this helps.
Cheers
-raj -
11. Re: using hibernate in jboss-4.0.0
fabioquimbay Jan 5, 2005 9:16 AM (in response to berkgypsy)But, If I don't use the *.hbm.xml files within the har file, How can I to refer this files without the attribute: MapResources in my hibernate-service.xml ?
-
12. Re: using hibernate in jboss-4.0.0
tanghh4321 Mar 18, 2005 8:57 PM (in response to berkgypsy)rajs1
Would you mind post what you do to make derby works as a database server, I get some issues that seems to be hard to resolve. thanks. -
13. Re: using hibernate in jboss-4.0.0
redwave Apr 20, 2005 7:58 AM (in response to berkgypsy)hi utkarshpune,
ur problem will be solved when u remove all references to *hbm.xml files from hibernate-service.xml and put them in *.har file maintaining the class hierarchy.
Atleast this will solve ur current problem but i am not sure that Hibernate will still work as i am grappling it with from last 2 days and everytime i solve one problem there is another one just round the corner.
bye.
hope it helps u.