0 Replies Latest reply on Oct 15, 2005 2:58 PM by Jesus Torrecilla Lucas

    Integrating hibernate 3 with jboss 4.0.3

    Jesus Torrecilla Lucas Newbie

      I try to deploy hibernate 3 with jboss 4, i have done the victorhibernate.har archive in server/default/deploy directory. I put in this file the following hibernate-service.xml file

      <?xml version="1.0" encoding="UTF-8" ?>
       <!DOCTYPE server (View Source for full doctype...)>
      - <!-- $Id: properties-service.xml,v 1.5 2003/08/27 04:34:12 patriot1burke Exp $
       -->
      - <server>
      - <mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=Hibernate">
       <depends>jboss.jca:service=RARDeployer</depends>
       <attribute name="DatasourceName">java:/OracleDS</attribute>
       <attribute name="Dialect">net.sf.hibernate.dialect.Oracle9Dialect</attribute>
       <attribute name="SessionFactoryName">java:/hibernate/SessionFactory</attribute>
       <attribute name="CacheProviderClass">net.sf.hibernate.cache.HashtableCacheProvider</attribute>
       </mbean>
       </server>

      when i deploy i obtain the following error
      20:48:50,109 INFO [Server] Starting JBoss (MX MicroKernel)...
      20:48:50,109 INFO [Server] Release ID: JBoss [Zion] 4.0.3RC2 (build: CVSTag=Branch_4_0 date=200508131404)
      20:48:50,109 INFO [Server] Home Dir: D:\jboss-4.0.3RC2
      20:48:50,109 INFO [Server] Home URL: file:/D:/jboss-4.0.3RC2/
      20:48:50,109 INFO [Server] Library URL: file:/D:/jboss-4.0.3RC2/lib/
      20:48:50,109 INFO [Server] Patch URL: null
      20:48:50,109 INFO [Server] Server Name: default
      20:48:50,109 INFO [Server] Server Home Dir: D:\jboss-4.0.3RC2\server\default
      20:48:50,125 INFO [Server] Server Home URL: file:/D:/jboss-4.0.3RC2/server/default/
      20:48:50,125 INFO [Server] Server Data Dir: D:\jboss-4.0.3RC2\server\default\data
      20:48:50,125 INFO [Server] Server Temp Dir: D:\jboss-4.0.3RC2\server\default\tmp
      20:48:50,125 INFO [Server] Server Config URL: file:/D:/jboss-4.0.3RC2/server/default/conf/
      20:48:50,125 INFO [Server] Server Library URL: file:/D:/jboss-4.0.3RC2/server/default/lib/
      20:48:50,125 INFO [Server] Root Deployment Filename: jboss-service.xml
      20:48:50,125 INFO [Server] Starting General Purpose Architecture (GPA)...
      20:48:50,515 INFO [ServerInfo] Java version: 1.5.0_01,Sun Microsystems Inc.
      20:48:50,515 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.5.0_01-b08,Sun Microsystems Inc.
      20:48:50,515 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
      20:48:51,093 INFO [Server] Core system initialized
      20:48:53,203 INFO [WebService] Using RMI server codebase: http://jesus:8083/
      20:48:53,250 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
      20:48:53,562 INFO [NamingService] Started jndi bootstrap jnpPort=1099, rmiPort=1098, backlog=50, bindAddress=/0.0.0.0, Client SocketFactory=null, Server SocketFactory=org.jboss.net.sockets.DefaultSocketFactory@ad093076
      20:49:07,859 INFO [Embedded] Catalina naming disabled
      20:49:08,687 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8099
      20:49:08,687 INFO [Catalina] Initialization processed in 750 ms
      20:49:08,703 INFO [StandardService] Starting service jboss.web
      20:49:08,718 INFO [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.5.9
      20:49:08,781 INFO [StandardHost] XML validation disabled
      20:49:08,843 INFO [Catalina] Server startup in 156 ms
      20:49:09,046 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/
      20:49:10,000 INFO [WebappLoader] Dual registration of jndi stream handler: factory already defined
      20:49:10,781 INFO [TomcatDeployer] deploy, ctxPath=/ws4ee, warUrl=.../tmp/deploy/tmp60314jboss-ws4ee-exp.war/
      20:49:11,031 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jbossweb-tomcat55.sar/ROOT.war/
      20:49:11,390 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
      20:49:15,031 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
      20:49:16,890 INFO [MailService] Mail Service bound to java:/Mail
      20:49:17,578 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-local-jdbc.rar
      20:49:17,781 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-xa-jdbc.rar
      20:49:17,953 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
      20:49:18,125 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
      20:49:18,312 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms/jms-ra.rar
      20:49:18,468 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/mail-ra.rar
      20:49:19,625 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
      20:49:20,078 INFO [A] Bound to JNDI name: queue/A
      20:49:20,093 INFO [B] Bound to JNDI name: queue/B
      20:49:20,093 INFO [C] Bound to JNDI name: queue/C
      20:49:20,093 INFO [D] Bound to JNDI name: queue/D
      20:49:20,093 INFO [ex] Bound to JNDI name: queue/ex
      20:49:20,140 INFO [testTopic] Bound to JNDI name: topic/testTopic
      20:49:20,140 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
      20:49:20,156 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
      20:49:20,156 INFO [testQueue] Bound to JNDI name: queue/testQueue
      20:49:20,515 INFO [UILServerILService] JBossMQ UIL service available at : /0.0.0.0:8093
      20:49:20,609 INFO [DLQ] Bound to JNDI name: queue/DLQ
      20:49:20,968 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
      20:49:21,203 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=OracleDS' to JNDI name 'java:OracleDS'
      20:49:21,468 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=XAOracleDS' to JNDI name 'java:XAOracleDS'
      20:49:26,218 INFO [Environment] Hibernate 3.1 beta 2
      20:49:26,218 INFO [Environment] hibernate.properties not found
      20:49:26,234 INFO [Environment] using CGLIB reflection optimizer
      20:49:26,234 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
      20:49:26,437 INFO [Configuration] Searching for mapping documents in jar: victorhibernate.har
      20:49:26,437 INFO [Configuration] Found mapping document in jar: com/genuitec/hibernate/Bonus.hbm.xml
      20:49:26,453 ERROR [XMLHelper] Error parsing XML: XML InputStream(-1) Premature end of file.
      20:49:26,484 WARN [ServiceController] Problem starting service jboss.har:service=Hibernate
      org.hibernate.MappingException: Could not read mapping documents from jar: victorhibernate.har
      at org.hibernate.cfg.Configuration.addJar(Configuration.java:522)
      at org.jboss.hibernate.jmx.Hibernate.handleMappings(Hibernate.java:302)
      at org.jboss.hibernate.jmx.Hibernate.buildSessionFactory(Hibernate.java:229)
      at org.jboss.hibernate.jmx.Hibernate.startService(Hibernate.java:130)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:287)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:236)
      at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.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:245)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:974)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:453)
      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.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:245)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy4.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:276)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:973)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:963)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:774)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
      at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy9.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:319)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:192)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:265)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:287)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:236)
      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:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.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:245)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:974)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:453)
      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.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:245)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy4.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:276)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:973)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:774)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:721)
      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:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy5.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:451)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:328)
      at org.jboss.Main.boot(Main.java:187)
      at org.jboss.Main$1.run(Main.java:438)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: org.hibernate.MappingException: Could not parse mapping document in input stream
      at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:413)
      at org.hibernate.cfg.Configuration.addJar(Configuration.java:519)
      ... 96 more
      Caused by: org.dom4j.DocumentException: Error on line -1 of document : Premature end of file. Nested exception: Premature end of file.
      at org.dom4j.io.SAXReader.read(SAXReader.java:350)
      at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:404)
      ... 97 more
      20:49:26,562 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
      20:49:26,875 INFO [EARDeployer] Init J2EE application: file:/D:/jboss-4.0.3RC2/server/default/deploy/Victor.ear/
      20:49:27,296 INFO [EjbModule] Deploying VictorBean
      20:49:27,531 INFO [EjbModule] Deploying VictorSession
      20:49:27,796 INFO [BaseLocalProxyFactory] Bound EJB LocalHome 'VictorBean' to jndi 'local/VictorBean@4056860'
      20:49:30,609 INFO [ProxyFactory] Bound EJB Home 'VictorSession' to jndi 'VictorSession'
      20:49:30,609 INFO [EJBDeployer] Deployed: file:/D:/jboss-4.0.3RC2/server/default/deploy/Victor.ear/VictorEjb.jar/
      20:49:30,703 INFO [TomcatDeployer] deploy, ctxPath=/VictorWeb, warUrl=.../deploy/Victor.ear/VictorWeb.war/
      20:49:31,468 INFO [EARDeployer] Started J2EE application: file:/D:/jboss-4.0.3RC2/server/default/deploy/Victor.ear/
      20:49:31,468 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

      --- MBeans waiting for other MBeans ---
      ObjectName: jboss.har:service=Hibernate
      State: FAILED
      Reason: org.hibernate.MappingException: Could not read mapping documents from jar: victorhibernate.har
      I Depend On:
      jboss.jca:service=RARDeployer

      --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
      ObjectName: jboss.har:service=Hibernate
      State: FAILED
      Reason: org.hibernate.MappingException: Could not read mapping documents from jar: victorhibernate.har
      I Depend On:
      jboss.jca:service=RARDeployer


      20:49:31,781 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8099
      20:49:32,078 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
      20:49:32,109 INFO [JkMain] Jk running ID=0 time=0/94 config=null
      20:49:32,125 INFO [Server] JBoss (MX MicroKernel) [4.0.3RC2 (build: CVSTag=Branch_4_0 date=200508131404)] Started in 42s:0ms


      please help me i am desesperated