-->
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.  [ 3 posts ] 
Author Message
 Post subject: hibernate deployment on jboss-3.2.1
PostPosted: Fri Dec 12, 2003 2:16 am 
Newbie

Joined: Wed Dec 10, 2003 8:40 pm
Posts: 14
Location: Sydney
When deploying the hibernate MBean as part of my application I keep getting a javax.naming.NameAlreadyBoundException. I have followed the instructions posted on the website and I'm wondering if there are any dependencies or ordering that needs to be specified in the deployment descriptors

here is the stack trace:


16:56:27,023 INFO [EjbModule] Creating
16:56:27,036 INFO [EjbModule] Deploying OrganizationBean
16:56:27,057 INFO [EjbModule] Deploying MainBean
16:56:27,084 INFO [EjbModule] Created
16:56:27,160 INFO [HibernateServiceMBean] starting service at JNDI name: java:/comp/env/Hibernate/SessionFactory
16:56:27,162 INFO [HibernateServiceMBean] service properties: {hibernate.session_factory_name=java:/comp/env/Hibernate/SessionFactory, hibernate.transaction.manager_lookup_class=net.sf.hibernate.transaction.JBossTransactionManagerLookup, hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect, hibernate.show_sql=false, hibernate.use_outer_join=true, hibernate.transaction.factory_class=net.sf.hibernate.transaction.JTATransactionFactory, hibernate.connection.datasource=java:/HibTrafficliteDS, jta.UserTransaction=UserTransaction}
16:56:27,203 INFO [Environment] Hibernate 2.1 final
16:56:27,214 INFO [Environment] hibernate.properties not found
16:56:27,219 INFO [Environment] using CGLIB reflection optimizer
16:56:27,230 INFO [Configuration] Mapping resource: com/generator/dom/hibernate/Assignment.hbm.xml
16:56:27,697 INFO [Binder] Mapping class: com.generator.dom.hibernate.Assignment -> assignments
16:56:27,950 INFO [Configuration] Mapping resource: com/generator/dom/hibernate/Company.hbm.xml
16:56:28,125 INFO [Binder] Mapping class: com.generator.dom.hibernate.Company -> companies
16:56:28,576 INFO [Configuration] Mapping resource: com/generator/dom/hibernate/Contact.hbm.xml
16:56:28,728 INFO [Binder] Mapping class: com.generator.dom.hibernate.Contact -> contacts
16:56:28,733 INFO [Configuration] Mapping resource: com/generator/dom/hibernate/Country.hbm.xml
16:56:28,883 INFO [Binder] Mapping class: com.generator.dom.hibernate.Country -> countries
16:56:28,885 INFO [Configuration] Mapping resource: com/generator/dom/hibernate/Issue.hbm.xml
16:56:29,040 INFO [Binder] Mapping class: com.generator.dom.hibernate.Issue -> issues
16:56:29,049 INFO [Configuration] Mapping resource: com/generator/dom/hibernate/Item.hbm.xml
16:56:29,217 INFO [Binder] Mapping class: com.generator.dom.hibernate.Item -> items
16:56:29,220 INFO [Configuration] Mapping resource: com/generator/dom/hibernate/Priority.hbm.xml
16:56:29,369 INFO [Binder] Mapping class: com.generator.dom.hibernate.Priority -> priorities
16:56:29,371 INFO [Configuration] Mapping resource: com/generator/dom/hibernate/Project.hbm.xml
16:56:29,535 INFO [Binder] Mapping class: com.generator.dom.hibernate.Project -> projects
16:56:29,549 INFO [Configuration] Mapping resource: com/generator/dom/hibernate/ProjectTemplate.hbm.xml
16:56:29,705 INFO [Binder] Mapping class: com.generator.dom.hibernate.ProjectTemplate -> project_templates
16:56:29,715 INFO [Configuration] Mapping resource: com/generator/dom/hibernate/Role.hbm.xml
16:56:29,901 INFO [Binder] Mapping class: com.generator.dom.hibernate.Role -> roles
16:56:29,904 INFO [Configuration] Mapping resource: com/generator/dom/hibernate/State.hbm.xml
16:56:30,052 INFO [Binder] Mapping class: com.generator.dom.hibernate.State -> states
16:56:30,054 INFO [Configuration] Mapping resource: com/generator/dom/hibernate/Status.hbm.xml
16:56:30,214 ERROR [XMLHelper] Error parsing XML: XML InputStream(24) Attribute "not-null" must be declared for element type "key".
16:56:30,217 ERROR [XMLHelper] Error parsing XML: XML InputStream(25) Attribute "not-null" must be declared for element type "many-to-many".
16:56:30,219 INFO [Binder] Mapping class: com.generator.dom.hibernate.Status -> status
16:56:30,220 INFO [Binder] Mapping collection: com.generator.dom.hibernate.Status.types -> status_statustypex
16:56:30,229 INFO [HibernateServiceMBean] Could not build SessionFactory using the MBean classpath - will try again using client classpath: Error reading resource: com/generator/dom/hibernate/Status.hbm.xml
16:56:30,273 INFO [SessionFactoryObjectFactory] Factory name: java:/comp/env/Hibernate/SessionFactory
16:56:30,281 INFO [NamingHelper] JNDI InitialContext properties:{}
16:56:30,318 INFO [NamingHelper] Creating subcontext: env
16:56:30,320 INFO [NamingHelper] Creating subcontext: Hibernate
16:56:30,322 INFO [SessionFactoryObjectFactory] Bound factory to JNDI name: java:/comp/env/Hibernate/SessionFactory
16:56:30,323 WARN [SessionFactoryObjectFactory] InitialContext did not implement EventContext
16:56:30,365 INFO [EjbModule] Starting
16:56:30,367 INFO [EjbModule] Started
16:56:30,368 INFO [EJBDeployer] Deployed: file:/usr/local/jboss-3.2.1/server/default/tmp/deploy/server/default/deploy/trafficlite.ear/49.trafficlite.ear-contents/trafficlite-ejb.jar
16:56:30,874 INFO [jbossweb] Registered jboss.web:Jetty=0,JBossWebApplicationContext=13,context=/trafficlite
16:56:30,909 INFO [jbossweb] Extract jar:file:/usr/local/jboss-3.2.1/server/default/tmp/deploy/server/default/deploy/trafficlite.ear/49.trafficlite.ear-contents/trafficlite.war!/ to /tmp/Jetty_0_0_0_0_8080__trafficlite/webapp
16:56:31,597 WARN [jbossweb] WARNING: Configuration error on jar:file:/usr/local/jboss-3.2.1/server/default/tmp/deploy/server/default/deploy/trafficlite.ear/49.trafficlite.ear-contents/trafficlite.war!/
javax.naming.NameAlreadyBoundException; remaining name 'env'
at org.jnp.server.NamingServer.createSubcontext(NamingServer.java:451)
at org.jnp.interfaces.NamingContext.createSubcontext(NamingContext.java:811)
at org.jnp.interfaces.NamingContext.createSubcontext(NamingContext.java:797)
at org.jboss.web.AbstractWebContainer.parseWebAppDescriptors(AbstractWebContainer.java:505)
at org.jboss.web.AbstractWebContainer$DescriptorParser.parseWebAppDescriptors(AbstractWebContainer.java:935)
at org.jboss.jetty.JBossWebApplicationContext.setUpENC(JBossWebApplicationContext.java:342)
at org.jboss.jetty.JBossWebApplicationContext.startHandlers(JBossWebApplicationContext.java:301)
at org.mortbay.http.HttpContext.start(HttpContext.java:1798)
at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext.java:421)
at org.mortbay.j2ee.J2EEWebApplicationContext.start(J2EEWebApplicationContext.java:85)
at org.jboss.jetty.JBossWebApplicationContext.start(JBossWebApplicationContext.java:89)
at org.jboss.jetty.Jetty.deploy(Jetty.java:331)
at org.jboss.jetty.JettyService.performDeploy(JettyService.java:242)
at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:357)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
at sun.reflect.GeneratedMethodAccessor28.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:549)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy7.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:200)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:211)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:190)

16:56:31,606 INFO [jbossweb] Stopped WebApplicationContext[/trafficlite,Traffic Lite]
16:56:31,619 INFO [jbossweb] Deregister jboss.web:Jetty=0,JBossWebApplicationContext=13,context=/trafficlite
16:56:31,620 INFO [jbossweb] Successfully undeployed file:/usr/local/jboss-3.2.1/server/default/tmp/deploy/server/default/deploy/trafficlite.ear/49.trafficlite.ear-contents/trafficlite.war
16:56:31,623 ERROR [MainDeployer] could not start deployment: file:/usr/local/jboss-3.2.1/server/default/tmp/deploy/server/default/deploy/trafficlite.ear/49.trafficlite.ear-contents/trafficlite.war
org.jboss.deployment.DeploymentException: - nested throwable: (javax.naming.NameAlreadyBoundException; remaining name 'env')
at org.jboss.jetty.Jetty.deploy(Jetty.java:353)
at org.jboss.jetty.JettyService.performDeploy(JettyService.java:242)
at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:357)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
at sun.reflect.GeneratedMethodAccessor28.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:549)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy7.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:200)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:211)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:190)
Caused by: javax.naming.NameAlreadyBoundException; remaining name 'env'
at org.jnp.server.NamingServer.createSubcontext(NamingServer.java:451)
at org.jnp.interfaces.NamingContext.createSubcontext(NamingContext.java:811)
at org.jnp.interfaces.NamingContext.createSubcontext(NamingContext.java:797)
at org.jboss.web.AbstractWebContainer.parseWebAppDescriptors(AbstractWebContainer.java:505)
at org.jboss.web.AbstractWebContainer$DescriptorParser.parseWebAppDescriptors(AbstractWebContainer.java:935)
at org.jboss.jetty.JBossWebApplicationContext.setUpENC(JBossWebApplicationContext.java:342)
at org.jboss.jetty.JBossWebApplicationContext.startHandlers(JBossWebApplicationContext.java:301)
at org.mortbay.http.HttpContext.start(HttpContext.java:1798)
at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext.java:421)
at org.mortbay.j2ee.J2EEWebApplicationContext.start(J2EEWebApplicationContext.java:85)
at org.jboss.jetty.JBossWebApplicationContext.start(JBossWebApplicationContext.java:89)
at org.jboss.jetty.Jetty.deploy(Jetty.java:331)
... 18 more
16:56:31,631 ERROR [MainDeployer] could not start deployment: file:/usr/local/jboss-3.2.1/server/default/deploy/trafficlite.ear
org.jboss.deployment.DeploymentException: - nested throwable: (javax.naming.NameAlreadyBoundException; remaining name 'env')
at org.jboss.jetty.Jetty.deploy(Jetty.java:353)
at org.jboss.jetty.JettyService.performDeploy(JettyService.java:242)
at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:357)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
at sun.reflect.GeneratedMethodAccessor28.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:549)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy7.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:200)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:211)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:190)
Caused by: javax.naming.NameAlreadyBoundException; remaining name 'env'
at org.jnp.server.NamingServer.createSubcontext(NamingServer.java:451)
at org.jnp.interfaces.NamingContext.createSubcontext(NamingContext.java:811)
at org.jnp.interfaces.NamingContext.createSubcontext(NamingContext.java:797)
at org.jboss.web.AbstractWebContainer.parseWebAppDescriptors(AbstractWebContainer.java:505)
at org.jboss.web.AbstractWebContainer$DescriptorParser.parseWebAppDescriptors(AbstractWebContainer.java:935)
at org.jboss.jetty.JBossWebApplicationContext.setUpENC(JBossWebApplicationContext.java:342)
at org.jboss.jetty.JBossWebApplicationContext.startHandlers(JBossWebApplicationContext.java:301)
at org.mortbay.http.HttpContext.start(HttpContext.java:1798)
at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext.java:421)
at org.mortbay.j2ee.J2EEWebApplicationContext.start(J2EEWebApplicationContext.java:85)
at org.jboss.jetty.JBossWebApplicationContext.start(JBossWebApplicationContext.java:89)
at org.jboss.jetty.Jetty.deploy(Jetty.java:331)
... 18 more
16:56:31,639 ERROR [URLDeploymentScanner] Failed to deploy: org.jboss.deployment.scanner.URLDeploymentScanner$DeployedURL@bdf46d87{ url=file:/usr/local/jboss-3.2.1/server/default/deploy/trafficlite.ear, deployedLastModified=1071208384000 }
org.jboss.deployment.DeploymentException: - nested throwable: (javax.naming.NameAlreadyBoundException; remaining name 'env')
at org.jboss.jetty.Jetty.deploy(Jetty.java:353)
at org.jboss.jetty.JettyService.performDeploy(JettyService.java:242)
at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:357)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
at sun.reflect.GeneratedMethodAccessor28.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:549)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy7.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:200)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:211)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:190)
Caused by: javax.naming.NameAlreadyBoundException; remaining name 'env'
at org.jnp.server.NamingServer.createSubcontext(NamingServer.java:451)
at org.jnp.interfaces.NamingContext.createSubcontext(NamingContext.java:811)
at org.jnp.interfaces.NamingContext.createSubcontext(NamingContext.java:797)
at org.jboss.web.AbstractWebContainer.parseWebAppDescriptors(AbstractWebContainer.java:505)
at org.jboss.web.AbstractWebContainer$DescriptorParser.parseWebAppDescriptors(AbstractWebContainer.java:935)
at org.jboss.jetty.JBossWebApplicationContext.setUpENC(JBossWebApplicationContext.java:342)
at org.jboss.jetty.JBossWebApplicationContext.startHandlers(JBossWebApplicationContext.java:301)
at org.mortbay.http.HttpContext.start(HttpContext.java:1798)
at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext.java:421)
at org.mortbay.j2ee.J2EEWebApplicationContext.start(J2EEWebApplicationContext.java:85)
at org.jboss.jetty.JBossWebApplicationContext.start(JBossWebApplicationContext.java:89)
at org.jboss.jetty.Jetty.deploy(Jetty.java:331)
... 18 more

Has anybody else had the same problem??

cheers
andy


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 12, 2003 5:09 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Not sure if its related but there is a report of parsing errors in one of the hbm files. I would fix that first.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 15, 2003 6:50 pm 
Newbie

Joined: Wed Dec 10, 2003 8:40 pm
Posts: 14
Location: Sydney
I fixed the metadata errors, but the NameAlreadyBoundException is still happening

cheers
andy


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