5 Replies Latest reply on Jul 27, 2011 4:21 PM by Wolfgang Knauf

    Could not instantiate connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider

    RAM S Newbie

      Caused by: org.hibernate.HibernateException: Could not instantiate connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider

      at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:77)

      at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)

      at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)

      at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)

      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)

      at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:713)

        • 1. Re: Could not instantiate connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
          Wolfgang Knauf Master

          Hi,

           

          any "inner exception"?

           

          Dou you use Spring? The only helpful page I found in the web about this was: http://forum.springsource.org/showthread.php?29822-Upgrade-from-2.0rc3-to-2.0final-causes-quot-Could-not-instantiate-connection-provider-quot

          Does the workaround provided there help?

           

          If not: please post more details about your app.

           

          Best regards

           

          Wolfgang

          • 2. Re: Could not instantiate connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
            RAM S Newbie

            Hi,

             

            We are not using any spring here. We are using JPA(EJB3) with hibernate for persisting. We are using seam framework.

            At the time of JBOSS start up the below error is occuring.

            I have two different versions of hibernate3.jar running one in the jboss home lib directory and another one specific for my application(i.e updgraded version of hibernate jar) under the ear lib directory.I have copied the relevant hibernate related dependency jars in the application lib directory as well

             

            1)hibernate-validator-3.1.0.GA.jar

            2)hibernate-jpa-2.0-api-1.0.0.Final.jar

            3)hibernate3.jar

             

             

            At the time of JBOSS Server Start up

            ==========================

            2011-07-26 16:25:09,452 DEBUG [org.hibernate.ejb.Ejb3Configuration] Processing PersistenceUnitInfo [
            name: onsApp
            persistence provider classname: org.hibernate.ejb.HibernatePersistence
            classloader: org.jboss.mx.loading.UnifiedClassLoader3@16655a7{ url=file:/C:/Java/jboss-4.2.3.GA/server/default/tmp/deploy/tmp43736onsApp.ear ,addedOrder=51}
            Temporary classloader: org.jboss.mx.loading.UnifiedClassLoader3@d03e03{ url=file:/C:/Java/jboss-4.2.3.GA/server/default/tmp/deploy/tmp43736onsApp.ear ,addedOrder=0}
            excludeUnlistedClasses: false
            JTA datasource: org.jboss.resource.adapter.jdbc.WrapperDataSource@1e6cb2a
            Non JTA datasource: null
            Transaction type: JTA
            PU root URL: file:/C:/Java/jboss-4.2.3.GA/server/default/tmp/deploy/tmp43736onsApp.ear-contents/onsApp.jar
            Jar files URLs []
            Managed classes names []
            Mapping files names []
            Properties [
              hibernate.jndi.java.naming.factory.url.pkgs: org.jboss.naming:org.jnp.interfaces
              hibernate.cache.provider_class: org.hibernate.cache.HashtableCacheProvider
              hibernate.jndi.java.naming.factory.initial: org.jnp.interfaces.NamingContextFactory
              hibernate.transaction.manager_lookup_class: org.hibernate.transaction.JBossTransactionManagerLookup
              hibernate.dialect: org.hibernate.dialect.SQLServerDialect
              hibernate.format_sql: true
              hibernate.jacc.ctx.id: onsApp.jar
              hibernate.cache.region_prefix: onsApp_ear,onsApp_jar,onsApp
              hibernate.session_factory_name: persistence.units:ear=onsApp.ear,jar=onsApp.jar,unitName=onsApp
              jboss.entity.manager.factory.jndi.name: java:/onsAppEntityManagerFactory
              hibernate.hbm2ddl.auto: update
              hibernate.bytecode.use_reflection_optimizer: false
              hibernate.show_sql: true
              hibernate.bytecode.provider: javassist]
            2011-07-26 16:25:09,452 DEBUG [org.hibernate.ejb.Ejb3Configuration] Detect class: true; detect hbm: true
            2011-07-26 16:25:09,452 DEBUG [org.hibernate.ejb.Ejb3Configuration] Detect class: true; detect hbm: true
            2011-07-26 16:25:09,452 INFO  [org.hibernate.ejb.Ejb3Configuration] found EJB3 Entity bean: org.arjis.ons.entity.AddressSubscription
            2011-07-26 16:25:09,452 INFO  [org.hibernate.ejb.Ejb3Configuration] found EJB3 Entity bean: org.arjis.ons.entity.ApplicationTypes
            2011-07-26 16:25:09,452 INFO  [org.hibernate.ejb.Ejb3Configuration] found EJB3 Entity bean: org.arjis.ons.entity.DataFeeds
            2011-07-26 16:25:09,468 INFO  [org.hibernate.ejb.Ejb3Configuration] found EJB3 Entity bean: org.arjis.ons.entity.DriversLicenseSubscription
            2011-07-26 16:25:09,468 INFO  [org.hibernate.ejb.Ejb3Configuration] found EJB3 Entity bean: org.arjis.ons.entity.FileData
            2011-07-26 16:25:09,468 INFO  [org.hibernate.ejb.Ejb3Configuration] found EJB3 Entity bean: org.arjis.ons.entity.FileUploadEntity
            2011-07-26 16:25:09,483 INFO  [org.hibernate.ejb.Ejb3Configuration] found EJB3 Entity bean: org.arjis.ons.entity.PersonIdSubscription
            2011-07-26 16:25:09,483 INFO  [org.hibernate.ejb.Ejb3Configuration] found EJB3 Entity bean: org.arjis.ons.entity.PersonSubscription
            2011-07-26 16:25:09,483 INFO  [org.hibernate.ejb.Ejb3Configuration] found EJB3 Entity bean: org.arjis.ons.entity.SSNSubscription
            2011-07-26 16:25:09,483 INFO  [org.hibernate.ejb.Ejb3Configuration] found EJB3 Entity bean: org.arjis.ons.entity.Subscription
            2011-07-26 16:25:09,483 INFO  [org.hibernate.ejb.Ejb3Configuration] found EJB3 Entity bean: org.arjis.ons.entity.SubscriptionValue
            2011-07-26 16:25:09,483 INFO  [org.hibernate.ejb.Ejb3Configuration] found EJB3 Entity bean: org.arjis.ons.entity.TempFileData
            2011-07-26 16:25:09,483 INFO  [org.hibernate.ejb.Ejb3Configuration] found EJB3 Entity bean: org.arjis.ons.entity.VehicleSubscription
            2011-07-26 16:25:09,640 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@3f6e5a, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@19747c9{ url=null ,addedOrder=0}
            2011-07-26 16:25:09,640 INFO  [org.hibernate.cfg.Configuration] Reading mappings from resource : META-INF/orm.xml
            2011-07-26 16:25:09,640 DEBUG [org.hibernate.util.DTDEntityResolver] trying to resolve system-id [file:///C:/Java/jboss-4.2.3.GA/bin/orm_1_0.xsd]
            2011-07-26 16:25:09,640 DEBUG [org.hibernate.cfg.EJB3DTDEntityResolver] recognized EJB3 ORM namespace; attempting to resolve on classpath under org/hibernate/ejb
            2011-07-26 16:25:09,640 DEBUG [org.hibernate.cfg.EJB3DTDEntityResolver] located [file:///C:/Java/jboss-4.2.3.GA/bin/orm_1_0.xsd] in classpath
            2011-07-26 16:25:09,671 INFO  [org.hibernate.ejb.Ejb3Configuration] [PersistenceUnit: onsApp] META-INF/orm.xml found
            2011-07-26 16:25:09,671 DEBUG [org.hibernate.cfg.AnnotationConfiguration] Execute first pass mapping processing
            2011-07-26 16:25:09,671 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@3f6e5a, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@39029b{ url=null ,addedOrder=0}
            2011-07-26 16:25:09,671 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@3f6e5a, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@16f3f86{ url=null ,addedOrder=0}
            2011-07-26 16:25:09,671 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@3f6e5a, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@b3826f{ url=null ,addedOrder=0}
            2011-07-26 16:25:09,671 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@3f6e5a, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@1d22889{ url=null ,addedOrder=0}
            2011-07-26 16:25:09,671 DEBUG [org.hibernate.cfg.AnnotationConfiguration] Process hbm files
            2011-07-26 16:25:09,671 DEBUG [org.hibernate.cfg.AnnotationConfiguration] Process annotated classes
            2011-07-26 16:25:09,671 DEBUG [org.hibernate.cfg.AnnotationConfiguration] processing manytoone fk mappings
            2011-07-26 16:25:09,671 DEBUG [org.hibernate.cfg.Configuration] processing extends queue
            2011-07-26 16:25:09,671 DEBUG [org.hibernate.cfg.Configuration] processing collection mappings
            2011-07-26 16:25:09,671 DEBUG [org.hibernate.cfg.Configuration] processing native query and ResultSetMapping mappings
            2011-07-26 16:25:09,671 DEBUG [org.hibernate.cfg.Configuration] processing association property references
            2011-07-26 16:25:09,671 DEBUG [org.hibernate.cfg.Configuration] processing foreign key constraints
            2011-07-26 16:25:09,687 DEBUG [org.hibernate.ejb.util.NamingHelper] Not Ejb3Configuration to JNDI, no JNDI name configured
            2011-07-26 16:25:09,687 DEBUG [org.hibernate.cfg.Configuration] Preparing to build session factory with filters : {}
            2011-07-26 16:25:09,687 DEBUG [org.hibernate.cfg.AnnotationConfiguration] Execute first pass mapping processing
            2011-07-26 16:25:09,687 DEBUG [org.hibernate.cfg.AnnotationConfiguration] Process hbm files
            2011-07-26 16:25:09,687 DEBUG [org.hibernate.cfg.AnnotationConfiguration] Process annotated classes
            2011-07-26 16:25:09,687 DEBUG [org.hibernate.cfg.AnnotationConfiguration] processing manytoone fk mappings
            2011-07-26 16:25:09,687 DEBUG [org.hibernate.cfg.Configuration] processing extends queue
            2011-07-26 16:25:09,687 DEBUG [org.hibernate.cfg.Configuration] processing collection mappings
            2011-07-26 16:25:09,687 DEBUG [org.hibernate.cfg.Configuration] processing native query and ResultSetMapping mappings
            2011-07-26 16:25:09,687 DEBUG [org.hibernate.cfg.Configuration] processing association property references
            2011-07-26 16:25:09,687 DEBUG [org.hibernate.cfg.Configuration] processing foreign key constraints
            2011-07-26 16:25:09,687 INFO  [org.hibernate.connection.ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
            2011-07-26 16:25:09,687 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@3f6e5a, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@133a7af{ url=null ,addedOrder=0}
            2011-07-26 16:25:09,687 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@3f6e5a, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@4600f0{ url=null ,addedOrder=0}
            2011-07-26 16:25:09,687 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@3f6e5a, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@1e79b10{ url=null ,addedOrder=0}
            2011-07-26 16:25:09,687 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@3f6e5a, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@e51e67{ url=null ,addedOrder=0}
            2011-07-26 16:25:09,687 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@3f6e5a, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@19a6cd4{ url=null ,addedOrder=0}
            2011-07-26 16:25:09,687 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@3f6e5a, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@15efe34{ url=null ,addedOrder=0}
            2011-07-26 16:25:09,687 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@3f6e5a, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@1830ec7{ url=null ,addedOrder=0}
            2011-07-26 16:25:09,687 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@3f6e5a, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@661950{ url=null ,addedOrder=0}
            2011-07-26 16:25:09,687 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@3f6e5a, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@d45f89{ url=null ,addedOrder=0}
            2011-07-26 16:25:09,687 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@3f6e5a, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@cc5c6c{ url=null ,addedOrder=0}
            2011-07-26 16:25:09,687 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@3f6e5a, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@408caa{ url=null ,addedOrder=0}
            2011-07-26 16:25:09,687 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@3f6e5a, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@1d30fe7{ url=null ,addedOrder=0}
            2011-07-26 16:25:09,702 FATAL [org.hibernate.connection.ConnectionProviderFactory] Could not instantiate connection provider
            java.lang.ClassCastException: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
            at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:73)
            at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)
            at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)
            at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
            at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
            at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:713)
            at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:127)
            at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:246)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:103)
            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(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            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.GeneratedMethodAccessor9.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            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 $Proxy129.start(Unknown Source)
            at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:120)
            at org.jboss.ejb3.Ejb3Deployment.startPersistenceUnits(Ejb3Deployment.java:627)
            at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:351)
            at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:91)
            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(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            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.GeneratedMethodAccessor9.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            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 $Proxy33.start(Unknown Source)
            at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:512)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            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.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
            at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
            at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
            at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
            at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
            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 $Proxy34.start(Unknown Source)
            at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
            at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
            at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            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 $Proxy9.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.GeneratedMethodAccessor3.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            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.GeneratedMethodAccessor9.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            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:304)
            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(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            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:508)
            at java.lang.Thread.run(Unknown Source)
            2011-07-26 16:25:09,702 DEBUG [org.jboss.ejb3.ServiceDelegateWrapper] Starting failed persistence.units:ear=onsApp.ear,jar=onsApp.jar,unitName=onsApp
            javax.persistence.PersistenceException: org.hibernate.HibernateException: Could not instantiate connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
            at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:720)
            at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:127)
            at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:246)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:103)
            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(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            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.GeneratedMethodAccessor9.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            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 $Proxy129.start(Unknown Source)
            at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:120)
            at org.jboss.ejb3.Ejb3Deployment.startPersistenceUnits(Ejb3Deployment.java:627)
            at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:351)
            at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:91)
            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(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            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.GeneratedMethodAccessor9.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            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 $Proxy33.start(Unknown Source)
            at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:512)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            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.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
            at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
            at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
            at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
            at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
            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 $Proxy34.start(Unknown Source)
            at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
            at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
            at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            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 $Proxy9.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.GeneratedMethodAccessor3.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            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.GeneratedMethodAccessor9.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            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:304)
            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(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            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:508)
            at java.lang.Thread.run(Unknown Source)
            Caused by: org.hibernate.HibernateException: Could not instantiate connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
            at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:77)
            at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)
            at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)
            at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
            at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
            at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:713)
            ... 145 more
            2011-07-26 16:25:09,702 WARN  [org.jboss.system.ServiceController] Problem starting service persistence.units:ear=onsApp.ear,jar=onsApp.jar,unitName=onsApp

            • 3. Re: Could not instantiate connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
              RAM S Newbie

              Hi,

               

              I get rid of the previous problem.there was missing class file inside org.hibernate.ejb.HibernatePersistence(hibernate3.jar) which i copied in the application lib directory ,so it was picking from the jboss server lib directory(which is the lower version of hibernate) the above issue was occuring.the class cast exception.

              When i copied the latest hibernate3.jar in the application lib directory which includes this org.hibernate.ejb.HibernatePersistence file the below exception is occuring

               

               

              java.lang.ClassCastException

               

              : org.hibernate.ejb.HibernatePersistence

              at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(

              PersistenceUnitDeployment.java:245)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(

              Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

              at java.lang.reflect.Method.invoke(Unknown Source)

              at org.jboss.ejb3.ServiceDelegateWrapper.startService(

              ServiceDelegateWrapper.java:103)

              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(Unknown Source)

              at java.lang.reflect.Method.invoke(Unknown Source)

              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.GeneratedMethodAccessor9.invoke(Unknown Source)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

              at java.lang.reflect.Method.invoke(Unknown Source)

              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 $Proxy353.start(Unknown Source)

              at org.jboss.ejb3.JmxKernelAbstraction.install(

              JmxKernelAbstraction.java:120)

              at org.jboss.ejb3.Ejb3Deployment.startPersistenceUnits(

              Ejb3Deployment.java:627)

              at org.jboss.ejb3.Ejb3Deployment.start(

              Ejb3Deployment.java:351)

              at org.jboss.ejb3.Ejb3Module.startService(

              Ejb3Module.java:91)

              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(Unknown Source)

              at java.lang.reflect.Method.invoke(Unknown Source)

              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.GeneratedMethodAccessor9.invoke(Unknown Source)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

              at java.lang.reflect.Method.invoke(Unknown Source)

              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 $Proxy33.start(Unknown Source)

              at org.jboss.ejb3.EJB3Deployer.start(

              EJB3Deployer.java:512)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(

              Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

              at java.lang.reflect.Method.invoke(Unknown Source)

              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.interceptor.DynamicInterceptor.invoke(

              DynamicInterceptor.java:97)

              at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(

              InterceptorServiceMBeanSupport.java:238)

              at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(

              DeployerInterceptor.java:87)

              at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(

              SubDeployerInterceptorSupport.java:188)

              at org.jboss.deployment.SubDeployerInterceptor.invoke(

              SubDeployerInterceptor.java:95)

              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 $Proxy34.start(Unknown Source)

              at org.jboss.deployment.MainDeployer.start(

              MainDeployer.java:1025)

              at org.jboss.deployment.MainDeployer.start(

              MainDeployer.java:1015)

              at org.jboss.deployment.MainDeployer.deploy(

              MainDeployer.java:819)

              at org.jboss.deployment.MainDeployer.deploy(

              MainDeployer.java:782)

              at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

              at java.lang.reflect.Method.invoke(Unknown Source)

              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 $Proxy9.deploy(Unknown Source)

              at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(

              URLDeploymentScanner.java:421)

              at org.jboss.deployment.scanner.URLDeploymentScanner.scan(

              URLDeploymentScanner.java:610)

              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(

              AbstractDeploymentScanner.java:263)

              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(

              AbstractDeploymentScanner.java:274)

              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(

              AbstractDeploymentScanner.java:225)

               

              • 4. Re: Could not instantiate connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
                RAM S Newbie

                Hi,

                 

                I get rid of the previous problem.there was missing class file inside org.hibernate.ejb.HibernatePersistence(hibernate3.jar) which i copied in the application lib directory ,so it was picking from the jboss server lib directory(which is the lower version of hibernate) the above issue was occuring.the class cast exception.

                When i copied the latest hibernate3.jar in the application lib directory which includes this org.hibernate.ejb.HibernatePersistence file the below exception is occuring

                 

                java.lang.ClassCastException: org.hibernate.ejb.HibernatePersistence
                at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:245)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                at java.lang.reflect.Method.invoke(Unknown Source)
                at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:103)
                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(Unknown Source)
                at java.lang.reflect.Method.invoke(Unknown Source)
                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.GeneratedMethodAccessor9.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                at java.lang.reflect.Method.invoke(Unknown Source)
                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 $Proxy353.start(Unknown Source)
                at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:120)
                at org.jboss.ejb3.Ejb3Deployment.startPersistenceUnits(Ejb3Deployment.java:627)
                at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:351)
                at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:91)
                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(Unknown Source)
                at java.lang.reflect.Method.invoke(Unknown Source)
                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.GeneratedMethodAccessor9.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                at java.lang.reflect.Method.invoke(Unknown Source)
                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 $Proxy33.start(Unknown Source)
                at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:512)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                at java.lang.reflect.Method.invoke(Unknown Source)
                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.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
                at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
                at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
                at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
                at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
                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 $Proxy34.start(Unknown Source)
                at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
                at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                at java.lang.reflect.Method.invoke(Unknown Source)
                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 $Proxy9.deploy(Unknown Source)
                at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
                at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
                at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
                at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
                at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)

                • 5. Re: Could not instantiate connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
                  Wolfgang Knauf Master

                  Hi,

                   

                  I found this wiki article on upgrading Hibernate in JBoss 4.2.x: http://jaitechwriteups.blogspot.com/2008/08/how-to-upgrade-hibernate-in-jboss.html

                  (probably the author will read this thread, too ;-)). Maybe it will help - you have to configure the classloader.

                   

                  Taking a look at the versions mentioned in the article, it seems you are actually trying to downgrade Hibernate. Is there a requirement which forces you to do so? If possible, stay with the hibernate version bundled with JBoss and remove all hibernate JARs from your own app.

                   

                  Best regards

                   

                  Wolfgang