Hi,
I have put together an xxxxx.har file containing my hibernate session mbean definition, all my xxx.hbm.xml files and all the compiled classes generated using hibernate synchronizer.
When i put in my jboss 4.0.5 deploy directory I see the server try to read, parse and deploy. However I get:
[Mappings] duplicate import: com.xxxxxx.hibernate.blog.Advice->com.xxxxx.hibernate.blog.Advice
It seems to me that it is trying to parse my mappings twice. It first went through all my mappings, Advice being the first. Then at the end it tries to parse Advice again. Any suggestions on how to fix?
-Steve
13:22:45,781 INFO [Configuration] Searching for mapping documents in jar: xxxxx.har
13:22:45,781 INFO [Configuration] Found mapping document in jar: com/aa/hibernate/blog/Advice.hbm.xml
13:22:45,921 INFO [HbmBinder] Mapping class: com.aa.hibernate.blog.Advice -> advice
13:22:45,937 INFO [Configuration] Found mapping document in jar: com/aa/hibernate/blog/BlogComments.hbm.xml
13:22:45,953 INFO [HbmBinder] Mapping class: com.aa.hibernate.blog.BlogComments -> blog_comments
13:22:46,031 INFO [Configuration] Found mapping document in jar: com/aa/hibernate/blog/Blogs.hbm.xml
13:22:47,031 INFO [HbmBinder] Mapping class: com.aa.hibernate.lookup.State -> state
13:22:47,031 INFO [Configuration] Found mapping document in jar: com/aa/hibernate/lookup/Status.hbm.xml
13:22:47,031 INFO [HbmBinder] Mapping class: com.aa.hibernate.lookup.Status -> status
13:22:aa031 INFO [Configuration] Found mapping document in jar: com/aa/hibernate/lookup/Zodiac.hbm.xml
13:22:47,046 INFO [HbmBinder] Mapping class: com.aa.hibernate.lookup.Zodiac -> zodiac
13:22:47,046 INFO [Configuration] Found mapping document in jar: com/aa/hibernate/misc/UserSuggestion.hbm.xml
13:22:47,046 INFO [HbmBinder] Mapping class: com.aa.hibernate.misc.UserSuggestion -> suggestion
13:22:47,046 INFO [Configuration] Found mapping document in jar: com/aa/hibernate/people/Blocks.hbm.xml
13:22:47,062 INFO [HbmBinder] Mapping class: com.aa.hibernate.people.Blocks -> blocks
13:22:47,062 INFO [Configuration] Found mapping document in jar: com/aa/hibernate/people/Favorites.hbm.xml
13:22:47,062 INFO [HbmBinder] Mapping class: com.aa.hibernate.people.Favorites -> favorites
13:22:47,062 INFO [Configuration] Found mapping document in jar: com/aa/hibernate/people/Friends.hbm.xml
13:22:47,078 INFO [HbmBinder] Mapping class: com.aa.hibernate.people.Friends -> friends
... Many other mapping files
13:22:47,156 INFO [Configuration] Found mapping document in jar: com/a/hibernate/pim/UserBulletins.hbm.xml
13:22:47,203 INFO [HbmBinder] Mapping class: com.aa.hibernate.pim.UserBulletins -> user_bulletin
13:22:47,203 INFO [Configuration] Found mapping document in jar: com/aa/hibernate/blog/Advice.hbm.xml
13:22:47,218 INFO [Mappings] duplicate import: com.aa.hibernate.blog.Advice->com.aa.hibernate.blog.Advice
13:22:47,218 INFO [Mappings] duplicate import: com.aa.hibernate.blog.Advice->Advice
13:22:47,218 INFO [HbmBinder] Mapping class: com.aa.hibernate.blog.Advice -> advice
13:22:47,218 WARN [ServiceController] Problem starting service jboss.har:service=Hibernate
org.hibernate.InvalidMappingException: Could not read mapping documents from jar: a.har
at org.hibernate.cfg.Configuration.addJar(Configuration.java:582)
at org.jboss.hibernate.jmx.Hibernate.handleMappings(Hibernate.java:318)
at org.jboss.hibernate.jmx.Hibernate.buildConfiguration(Hibernate.java:208)
at org.jboss.hibernate.jmx.Hibernate.buildSessionFactory(Hibernate.java:228)
at org.jboss.hibernate.jmx.Hibernate.startService(Hibernate.java:155)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor3.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:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor6.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:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at sun.reflect.GeneratedMethodAccessor11.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:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy6.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
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:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
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:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
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:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:490)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.hibernate.DuplicateMappingException: Duplicate class/entity mapping com.aa.hibernate.blog.Advice
at org.hibernate.cfg.Mappings.addClass(Mappings.java:118)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:145)
at org.hibernate.cfg.Configuration.add(Configuration.java:424)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:465)
at org.hibernate.cfg.Configuration.addJar(Configuration.java:579)
... 97 more
13:22:47,390 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
13:22:47,921 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
Last edited by srockny05 on Sat Nov 11, 2006 3:38 pm, edited 3 times in total.
|