Hi everybody,
I tried to create this service using JCA and JMX following the
instructions on
http://ww.hibernate.org/66.html, but
when I deployed the service (hibernate-service.sar), i got this error
on server.log of Jboss (default):
2003-11-18 18:56:38,757 INFO [net.sf.hibernate.dialect.Dialect] Using
dialect: net.sf.hibernate.dialect.Oracle9Dialect
2003-11-18 18:56:38,757 INFO [net.sf.hibernate.util.NamingHelper]
JNDI InitialContext properties:{}
2003-11-18 18:56:38,773 INFO
[net.sf.hibernate.connection.DatasourceConnectionProvider] Using
datasource: java:/OracleDS
2003-11-18 18:56:38,773 INFO
[net.sf.hibernate.impl.SessionFactoryImpl]
Use outer join fetching: false
2003-11-18 18:56:38,789 INFO
[net.sf.hibernate.impl.SessionFactoryImpl]
Use scrollable result sets: true
2003-11-18 18:56:38,789 INFO
[net.sf.hibernate.impl.SessionFactoryImpl]
JDBC 2 max batch size: 15
2003-11-18 18:56:38,789 INFO
[net.sf.hibernate.impl.SessionFactoryImpl]
Transaction strategy: net.sf.hibernate.transaction.JTATransactionFactory
2003-11-18 18:56:38,789 INFO [net.sf.hibernate.util.NamingHelper]
JNDI InitialContext properties:{}
2003-11-18 18:56:38,789 INFO
[net.sf.hibernate.transaction.JTATransactionFactory] Locating
TransactionManager using:
net.sf.hibernate.transaction.JBossTransactionManagerLookup
2003-11-18 18:56:38,804 INFO [net.sf.hibernate.util.NamingHelper]
JNDI InitialContext properties:{}
2003-11-18 18:56:38,804 INFO
[net.sf.hibernate.transaction.JTATransactionFactory] TransactionManager
lookup successful
2003-11-18 18:56:39,851 WARN [org.jboss.system.ServiceController]
Problem starting service
jboss.jca:service=HibernateFactory,name=HibernateFactory
java.lang.ArrayIndexOutOfBoundsException: 1
at net.sf.hibernate.persister.EntityPersister.initPropertyPaths(EntityPersister.java:918)
at net.sf.hibernate.persister.EntityPersister.initPropertyPaths(EntityPersister.java:888)
at net.sf.hibernate.persister.EntityPersister.postInstantiate(EntityPersister.java:113)
at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:223)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:627)
at net.sf.hibernate.jmx.HibernateService.buildSessionFactory(HibernateService.java:162)
at net.sf.hibernate.jmx.HibernateService.start(HibernateService.java:131)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
>
> at
> org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
>
> at $Proxy14.start(Unknown Source)
>
> at
> org.jboss.system.ServiceController.start(ServiceController.java:394)
>
> at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown
> Source)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:324)
>
> at
> org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
>
> at
> org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
>
> at
> org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
>
> at $Proxy4.start(Unknown Source)
>
> at
> org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
>
> at
> org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
>
> at
> org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
>
> at
> org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
>
> at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown
> Source)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:324)
>
> at
> org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
>
> at
> org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
>
> at
> org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
>
> at $Proxy6.deploy(Unknown Source)
>
> at
> org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
>
> at
> org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:458)
>
> at
> org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
>
> at
> org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
>
> at
> org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
>
> 2003-11-18 18:56:39,960 INFO [org.jboss.deployment.MainDeployer]
> Deployed package:
> file:/C:/jboss-3.2.2/server/default/deploy/hibernate-service.sar
>
> 2003-11-18 18:56:39,960 ERROR
> [org.jboss.deployment.scanner.URLDeploymentScanner] MBeanException:
> Exception in MBean operation 'checkIncompleteDeployments()'
>
> Cause: Incomplete Deployment listing:
>
> Packages waiting for a deployer:
>
> <none>
>
> Incompletely deployed packages:
>
> [org.jboss.deployment.DeploymentInfo@d8bcc04a {
> url=file:/C:/jboss-3.2.2/server/default/deploy/hibernate-service.sar }
>
> deployer: org.jboss.deployment.SARDeployer@1c9a690
>
> status: null
>
> state: FAILED
>
> watch:
> file:/C:/jboss-3.2.2/server/default/deploy/hibernate-service.sar
>
> lastDeployed: 1069191413648
>
> lastModified: 1069191413632
>
> mbeans:
>
> ]MBeans waiting for classes:
>
> <none>
>
> MBeans waiting for other MBeans:
>
> [ObjectName: jboss.jca:service=HibernateFactory,name=HibernateFactory
>
> state: FAILED
>
> I Depend On: jboss.jca:service=RARDeployer
>
> jboss.jca:service=LocalTxCM,name=OracleDS
>
>
>
> Depends On Me: java.lang.ArrayIndexOutOfBoundsException: 1]
>
>
>
>
>
> JBOSS-SERVICE.XML
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <server>
>
> <mbean code="net.sf.hibernate.jmx.HibernateService"
> name="jboss.jca:service=HibernateFactory,name=HibernateFactory">
>
> <depends>jboss.jca:service=RARDeployer</depends>
>
> <depends>jboss.jca:service=LocalTxCM,name=OracleDS</depends>
>
> <!-- Make it deploy ONLY after DataSource had been started -->
>
> <attribute
> name="MapResources">mapping/Campaign.hbm.xml,mapping/CampaignInteraction.hbm.xml,mapping/CampaignItem.hbm.xml,mapping/CampaignItemType.hbm.xml,mapping/CampaignItemUrl.hbm.xml,mapping/CampaignLevel.hbm.xml,mapping/CampaignSchedule.hbm.xml,mapping/Contact.hbm.xml,mapping/Country.hbm.xml,mapping/Customer.hbm.xml,mapping/EmailJob.hbm.xml,mapping/InteractionType.hbm.xml,mapping/ItemFormat.hbm.xml,mapping/Language.hbm.xml,mapping/Login.hbm.xml,mapping/Position.hbm.xml,mapping/Question.hbm.xml,mapping/QuestionOption.hbm.xml,mapping/Region.hbm.xml,mapping/SegmentationContact.hbm.xml,mapping/SegmentationField.hbm.xml,mapping/SegmentationOption.hbm.xml,mapping/SendFormat.hbm.xml,mapping/SubscriberToSend.hbm.xml,mapping/SubscribersList.hbm.xml,mapping/SubscribersListMember.hbm.xml,mapping/SubscribersListType.hbm.xml,mapping/Survey.hbm.xml,mapping/SurveyAnswer.hbm.xml,mapping/SurveyQuestion.hbm.xml,mapping/UploadOption.hbm.xml,mapping/UploadProcess.hbm.xml,mapping/UploadResult.hbm.xml
,mapping/UploadResultOption.hbm.xml</attribute>
>
> <attribute
> name="JndiName">java:/hibernate/HibernateFactory</attribute>
>
> <attribute name="Datasource">java:/OracleDS</attribute>
>
> <attribute
> name="Dialect">net.sf.hibernate.dialect.Oracle9Dialect</attribute>
>
> <attribute
> name="TransactionStrategy">net.sf.hibernate.transaction.JTATransactionFactory</attribute>
>
> <attribute
> name="TransactionManagerLookupStrategy">net.sf.hibernate.transaction.JBossTransactionManagerLookup</attribute>
>
> <attribute name="UseOuterJoin">false</attribute>
>
> <attribute name="ShowSql">false</attribute>
>
> <attribute name="UserTransactionName">UserTransaction</attribute>
>
> </mbean>
>
> </server>
>
>
> I don