5 Replies Latest reply on Nov 16, 2010 1:37 PM by Peter Johnson

    Caused by: java.lang.ClassCastException: org.jboss.resource.adapter.jdbc.WrapperDataSource

    Gnanasekaran Sakthivel Newbie

      Hi

       

      I have been struggling to get my application run in JBoss 5.1.0.

      It deploys well until now in JBoss 4.0.3. We do exploded EAR deployment.

      I have gone past several ClassCastExceptions. Details could be found in the following thread - http://community.jboss.org/thread/158178?tstart=0

       

      Now I have this exception...

       

      Exception Stack Trace:

       

      2010-11-10 13:59:32,339 INFO   [com.ra.v4.application.ServiceLocator] (main) Entering  ServiceLocator

      2010-11-10 13:59:32,339 INFO   [com.ra.v4.application.ServiceLocator] (main) Exiting  ServiceLocator

      2010-11-10 13:59:32,339 INFO   [com.ra.v4.application.ServiceLocator] (main) Entering  ServiceLocator.getDataSource()

      2010-11-10 13:59:32,339 INFO   [com.ra.v4.application.ServiceLocator] (main) obj is not an instanceof  DataSource

      2010-11-10 13:59:32,339 INFO   [com.ra.v4.application.ServiceLocator] (main) Exiting  ServiceLocator.getDataSource()

      2010-11-10 13:59:32,339 ERROR  [STDERR] (main) java.lang.NullPointerException

      2010-11-10 13:59:32,355 ERROR  [STDERR] (main)          at  com.ra.v4.importer.data.ConnectionPool.<init>(ConnectionPool.java:144)

      2010-11-10 13:59:32,355 ERROR  [STDERR] (main)          at  com.ra.v4.importer.data.ConnectionPool.<clinit>(ConnectionPool.java:40)

      2010-11-10 13:59:32,355 ERROR  [STDERR] (main)          at  com.ra.v4.common.plugin.SAPlugin.init(SAPlugin.java:144)

      2010-11-10 13:59:32,355 ERROR  [STDERR] (main)          at  org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1158)

      2010-11-10 13:59:32,355 ERROR  [STDERR] (main)          at  org.apache.struts.action.ActionServlet.init(ActionServlet.java:473)

      2010-11-10 13:59:32,371 ERROR  [STDERR] (main)          at  javax.servlet.GenericServlet.init(GenericServlet.java:212)

      2010-11-10 13:59:32,371 ERROR  [STDERR] (main)          at  org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)

      2010-11-10 13:59:32,371 ERROR  [STDERR] (main)          at  org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:950)

      2010-11-10 13:59:32,371 ERROR  [STDERR] (main)          at  org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4122)

      2010-11-10 13:59:32,371 ERROR  [STDERR] (main)          at  org.apache.catalina.core.StandardContext.start(StandardContext.java:4421)

      2010-11-10 13:59:32,386 ERROR  [STDERR] (main)          at  org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)

      2010-11-10 13:59:32,386 ERROR  [STDERR] (main)          at  org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)

      2010-11-10 13:59:32,386 ERROR  [STDERR] (main)          at  org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)

      2010-11-10 13:59:32,386 ERROR  [STDERR] (main)          at  org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)

      2010-11-10 13:59:32,402 ERROR  [STDERR] (main)          at  org.jboss.web.deployers.WebModule.start(WebModule.java:97)

      2010-11-10 13:59:32,402 ERROR  [STDERR] (main)          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native  Method)

      2010-11-10 13:59:32,402 ERROR  [STDERR] (main)          at  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

      2010-11-10 13:59:32,402 ERROR  [STDERR] (main)          at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      2010-11-10 13:59:32,402 ERROR  [STDERR] (main)          at  java.lang.reflect.Method.invoke(Method.java:592)

      2010-11-10 13:59:32,418 ERROR  [STDERR] (main)          at  org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

      2010-11-10 13:59:32,418 ERROR  [STDERR] (main)          at  org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)

      2010-11-10 13:59:32,418 ERROR  [STDERR] (main)          at  org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

      2010-11-10 13:59:32,433 ERROR  [STDERR] (main)          at  org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

      2010-11-10 13:59:32,433 ERROR  [STDERR] (main)          at  org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)

      2010-11-10 13:59:32,433 ERROR  [STDERR] (main)          at  org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)

      2010-11-10 13:59:32,433 ERROR  [STDERR] (main)          at $Proxy38.start(Unknown  Source)

      2010-11-10 13:59:32,433 ERROR  [STDERR] (main)          at  org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)

      2010-11-10 13:59:32,449 ERROR  [STDERR] (main)          at  org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)

      2010-11-10 13:59:32,449 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

      2010-11-10 13:59:32,464 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

      2010-11-10 13:59:32,464 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

      2010-11-10 13:59:32,464 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

      2010-11-10 13:59:32,464 ERROR  [STDERR] (main)          at  org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)

      2010-11-10 13:59:32,480 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

      2010-11-10 13:59:32,480 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

      2010-11-10 13:59:32,480 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

      2010-11-10 13:59:32,480 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

      2010-11-10 13:59:32,480 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

      2010-11-10 13:59:32,496 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

      2010-11-10 13:59:32,496 ERROR  [STDERR] (main)          at  org.jboss.system.ServiceController.doChange(ServiceController.java:688)

      2010-11-10 13:59:32,496 ERROR  [STDERR] (main)          at  org.jboss.system.ServiceController.start(ServiceController.java:460)

      2010-11-10 13:59:32,496 ERROR  [STDERR] (main)          at  org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)

      2010-11-10 13:59:32,511 ERROR  [STDERR] (main)          at  org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)

      2010-11-10 13:59:32,511 ERROR  [STDERR] (main)          at  org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)

      2010-11-10 13:59:32,511 ERROR  [STDERR] (main)          at  org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)

      2010-11-10 13:59:32,511 ERROR  [STDERR] (main)          at  org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)

      2010-11-10 13:59:32,511 ERROR  [STDERR] (main)          at  org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)

      2010-11-10 13:59:32,527 ERROR  [STDERR] (main)          at  org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)

      2010-11-10 13:59:32,527 ERROR  [STDERR] (main)          at  org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)

      2010-11-10 13:59:32,527 ERROR  [STDERR] (main)          at  org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)

      2010-11-10 13:59:32,527 ERROR  [STDERR] (main)          at  org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)

      2010-11-10 13:59:32,543 ERROR  [STDERR] (main)          at  org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)

      2010-11-10 13:59:32,543 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

      2010-11-10 13:59:32,543 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

      2010-11-10 13:59:32,543 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

      2010-11-10 13:59:32,543 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

      2010-11-10 13:59:32,558 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

      2010-11-10 13:59:32,558 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

      2010-11-10 13:59:32,558 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

      2010-11-10 13:59:32,558 ERROR  [STDERR] (main)          at  org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)

      2010-11-10 13:59:32,574 ERROR  [STDERR] (main)          at  org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)

      2010-11-10 13:59:32,574 ERROR  [STDERR] (main)          at  org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

      2010-11-10 13:59:32,574 ERROR  [STDERR] (main)          at  org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)

      2010-11-10 13:59:32,574 ERROR  [STDERR] (main)          at  org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)

      2010-11-10 13:59:32,589 ERROR  [STDERR] (main)          at  org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)

      2010-11-10 13:59:32,589 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

      2010-11-10 13:59:32,589 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

      2010-11-10 13:59:32,589 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

      2010-11-10 13:59:32,589 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

      2010-11-10 13:59:32,605 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

      2010-11-10 13:59:32,605 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

      2010-11-10 13:59:32,605 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

      2010-11-10 13:59:32,605 ERROR  [STDERR] (main)          at  org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)

      2010-11-10 13:59:32,605 ERROR  [STDERR] (main)          at  org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)

      2010-11-10 13:59:32,621 ERROR  [STDERR] (main)          at  org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

      2010-11-10 13:59:32,621 ERROR  [STDERR] (main)          at  org.jboss.Main.boot(Main.java:221)

      2010-11-10 13:59:32,621 ERROR  [STDERR] (main)          at  org.jboss.Main$1.run(Main.java:556)

      2010-11-10 13:59:32,621 ERROR  [STDERR] (main)          at  java.lang.Thread.run(Thread.java:595)

      2010-11-10 13:59:32,621 ERROR  [com.ra.v4.importer.data.ConnectionPool] (main) Could not initialize  datasource!!! null

      2010-11-10 13:59:33,605 ERROR  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/MY_PROJECT]]  (main) StandardWrapper.Throwable

      java.lang.ExceptionInInitializerError

                  at  com.ra.v4.events.scheduler.SchedulerService.<init>(SchedulerService.java:36)

                  at  com.ra.v4.events.scheduler.SchedulerService.<clinit>(SchedulerService.java:34)

                  at  com.ra.v4.common.plugin.SAPlugin.init(SAPlugin.java:151)

                  at  org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1158)

                  at  org.apache.struts.action.ActionServlet.init(ActionServlet.java:473)

                  at  javax.servlet.GenericServlet.init(GenericServlet.java:212)

                  at  org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)

                  at  org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:950)

                  at  org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4122)

                  at  org.apache.catalina.core.StandardContext.start(StandardContext.java:4421)

                  at  org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)

                  at  org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)

                  at  org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)

                  at  org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)

                  at  org.jboss.web.deployers.WebModule.start(WebModule.java:97)

                  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:592)

                  at  org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

                  at  org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)

                  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:668)

                  at  org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)

                  at  $Proxy38.start(Unknown Source)

                  at  org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)

                  at  org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)

                  at  org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

                  at  org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

                  at  org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

                  at  org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

                  at  org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)

                  at  org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

                  at  org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

                  at  org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

                  at  org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

                  at  org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

                  at  org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

                  at  org.jboss.system.ServiceController.doChange(ServiceController.java:688)

                  at  org.jboss.system.ServiceController.start(ServiceController.java:460)

                  at  org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)

                  at  org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)

                  at  org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)

                  at  org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)

                  at  org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)

                  at  org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)

                  at  org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)

                  at  org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)

                  at  org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)

                  at  org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)

                  at  org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)

                  at  org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

                  at  org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

                  at  org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

                  at  org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

                  at  org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

                  at  org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

                  at  org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

                  at  org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)

                  at  org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)

                  at  org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

                  at  org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)

                  at  org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)

                  at  org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)

                  at  org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

                  at  org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

                  at  org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

                  at  org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

                  at  org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

                  at  org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

                  at  org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

                  at  org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)

                  at  org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)

                  at  org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

                  at  org.jboss.Main.boot(Main.java:221)

                  at  org.jboss.Main$1.run(Main.java:556)

                  at  java.lang.Thread.run(Thread.java:595)

      Caused by:  java.lang.RuntimeException: Could not initialize DaoConfig for Scheduler.   Cause: com.ibatis.dao.client.DaoException: Error while configuring DaoManager.   Cause: com.ibatis.common.exception.NestedRuntimeException: Error occurred.   Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:  com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath  '/sqlMapConfig/transactionManager/dataSource/end()'.  Cause:  com.ibatis.sqlmap.client.SqlMapException: Error initializing DataSource.  Could  not instantiate DataSourceFactory.  Cause: java.lang.ClassCastException: org.jboss.resource.adapter.jdbc.WrapperDataSource

      Caused by: java.lang.ClassCastException:  org.jboss.resource.adapter.jdbc.WrapperDataSource

      Caused by:  com.ibatis.sqlmap.client.SqlMapException: Error initializing DataSource.  Could  not instantiate DataSourceFactory.  Cause: java.lang.ClassCastException:  org.jboss.resource.adapter.jdbc.WrapperDataSource

      Caused by:  java.lang.ClassCastException:  org.jboss.resource.adapter.jdbc.WrapperDataSource

      Caused by:  com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath  '/sqlMapConfig/transactionManager/dataSource/end()'.  Cause:  com.ibatis.sqlmap.client.SqlMapException: Error initializing DataSource.  Could  not instantiate DataSourceFactory.  Cause: java.lang.ClassCastException:  org.jboss.resource.adapter.jdbc.WrapperDataSource

      Caused by:  java.lang.ClassCastException:  org.jboss.resource.adapter.jdbc.WrapperDataSource

      Caused by:  com.ibatis.sqlmap.client.SqlMapException: Error initializing DataSource.  Could  not instantiate DataSourceFactory.  Cause: java.lang.ClassCastException:  org.jboss.resource.adapter.jdbc.WrapperDataSource

      Caused by:  java.lang.ClassCastException:  org.jboss.resource.adapter.jdbc.WrapperDataSource

      Caused by:  com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:  com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath  '/sqlMapConfig/transactionManager/dataSource/end()'.  Cause:  com.ibatis.sqlmap.client.SqlMapException: Error initializing DataSource.  Could  not instantiate DataSourceFactory.  Cause: java.lang.ClassCastException:  org.jboss.resource.adapter.jdbc.WrapperDataSource

      Caused by:  java.lang.ClassCastException:  org.jboss.resource.adapter.jdbc.WrapperDataSource

      Caused by:  com.ibatis.sqlmap.client.SqlMapException: Error initializing DataSource.  Could  not instantiate DataSourceFactory.  Cause: java.lang.ClassCastException:  org.jboss.resource.adapter.jdbc.WrapperDataSource

      Caused by:  java.lang.ClassCastException:  org.jboss.resource.adapter.jdbc.WrapperDataSource

      Caused by:  com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath  '/sqlMapConfig/transactionManager/dataSource/end()'.  Cause:  com.ibatis.sqlmap.client.SqlMapException: Error initializing DataSource.  Could  not instantiate DataSourceFactory.  Cause: java.lang.ClassCastException:  org.jboss.resource.adapter.jdbc.WrapperDataSource

      Caused by:  java.lang.ClassCastException:  org.jboss.resource.adapter.jdbc.WrapperDataSource

       

        • 1. Re: Caused by: java.lang.ClassCastException: org.jboss.resource.adapter.jdbc.WrapperDataSource
          Peter Johnson Master

          This is the first error:

           

          2010-11-10 13:59:32,339 ERROR  [STDERR] (main) java.lang.NullPointerException

          2010-11-10  13:59:32,355 ERROR  [STDERR] (main)          at   com.ra.v4.importer.data.ConnectionPool.<init>(ConnectionPool.java:144)

           

          The com.ra.v4.importer.data.ConnectionPool does not belong to JBoss AS, so I assume it is one of your classes, or from a third-party library that you obtained. You will need to debug that code and find out why it is getting an NPE.

           

          By the way, I usually ignore all errors (such as the class cast expcetion) except the first one because they often go away once the first error is resolved.

          • 2. Re: Caused by: java.lang.ClassCastException: org.jboss.resource.adapter.jdbc.WrapperDataSource
            Gnanasekaran Sakthivel Newbie

            Thanks Peter Johnson

             

            You are correct. But something got wrong with JNDI lookup. It used to work good in JBoss AS 4.0.3.


            Object obj = context.lookup("java:comp/env/MY_PROJECT_DS");  is giving null now.

             

            Do you have any guess how to go about this?

            • 3. Re: Caused by: java.lang.ClassCastException: org.jboss.resource.adapter.jdbc.WrapperDataSource
              Peter Johnson Master

              Did you remember to also deploy the *-ds.xml file that deploys your data source?

              • 4. Re: Caused by: java.lang.ClassCastException: org.jboss.resource.adapter.jdbc.WrapperDataSource
                Gnanasekaran Sakthivel Newbie

                Yes *ds.xml is there as usual in the server/default/deploy folder


                Initially I had one easj2ee.jar in my project web-inf/lib. Since it had InitialContext class, I thought it was redundant and can be removed. So I removed it just to see what happens. Thats when I got the (NullPointer) exception (which is the reason I opened this discussion, you can see in the begining). This NuuPointer exception is when I got null datasource returned for initialcontext.lookup call. Object obj = context.lookup("java:comp/env/"+dataSourceName);

                 

                2010-11-10 13:59:32,339 INFO   [com.ra.v4.application.ServiceLocator] (main) Exiting  ServiceLocator.getDataSource()

                2010-11-10 13:59:32,339 ERROR  [STDERR] (main) java.lang.NullPointerException

                2010-11-10  13:59:32,355 ERROR  [STDERR] (main)          at   com.ra.v4.importer.data.ConnectionPool.<init>(ConnectionPool.java:144)

                2010-11-10  13:59:32,355 ERROR  [STDERR] (main)          at   com.ra.v4.importer.data.ConnectionPool.<clinit>(ConnectionPool.java:40)

                2010-11-10 13:59:32,355 ERROR  [STDERR] (main)          at  com.ra.v4.common.plugin.SAPlugin.init(SAPlugin.java:144)

                2010-11-10 13:59:32,355 ERROR  [STDERR] (main)          at

                 


                I am including some more details:

                 

                JMX Console - JNDI Tree View (It looks like datasource is bound to JNDI)

                java:  Namespace

                  +- JmsXA (class:  org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)

                  +- DefaultDS (class:  org.jboss.resource.adapter.jdbc.WrapperDataSource)

                  +- policyRegistration (class:  org.jboss.security.plugins.JBossPolicyRegistration)

                  +- SecurityProxyFactory (class:  org.jboss.security.SubjectSecurityProxyFactory)

                  +- app (class:  org.jnp.interfaces.NamingContext)

                  |   +- Manager (class:  javax.inject.manager.Manager)

                  +- comp (class:  javax.namingMain.Context)

                  +-  TransactionPropagationContextExporter (class:  com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)

                  +- ClusteredConnectionFactory  (class:  org.jboss.jms.client.JBossConnectionFactory)

                  +- TransactionManager (class:  com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate)

                  +- ClusteredXAConnectionFactory  (class:  org.jboss.jms.client.JBossConnectionFactory)

                  +- timedCacheFactory (class:  javax.naming.Context)

                Failed to lookup: timedCacheFactory,  errmsg=org.jboss.util.TimedCachePolicy

                  +- ConnectionFactory (class:  org.jboss.jms.client.JBossConnectionFactory)

                  +- ManagementView (class:  org.jboss.aop.generatedproxies.AOPProxy$3)

                  +- jdbc (class:  org.jnp.interfaces.NamingContext)

                  |   +- MY_PROJECT_JNDI_DS (class:  org.jboss.resource.adapter.jdbc.WrapperDataSource)

                |   +- MY_PROJECT_JNDI_DS_SQLDV  (class:  org.jboss.resource.adapter.jdbc.WrapperDataSource)

                  +- jaas (class:  javax.naming.Context)

                  |   +- HsqlDbRealm (class:  org.jboss.security.plugins.SecurityDomainContext)

                  |   +- profileservice (class:  org.jboss.security.plugins.SecurityDomainContext)

                  +-  TransactionPropagationContextImporter (class:  com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)

                  +- DeploymentManager (class:  org.jboss.aop.generatedproxies.AOPProxy$4)

                  +- Mail (class:  javax.mail.Session)

                  +- XAConnectionFactory (class:  org.jboss.jms.client.JBossConnectionFactory)

                  +-  TransactionSynchronizationRegistry (class:  com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple)

                  +- DefaultJMSProvider (class:  org.jboss.jms.jndi.JNDIProviderAdapter)

                  +- securityManagement (class:  org.jboss.security.integration.JNDIBasedSecurityManagement

                 

                In code, I am accessing like this; this should not matter. Because thats the way it was when we used JBoss 4.0.3 and now as well.

                Object obj = context.lookup("java:comp/env/MY_PROJECT_DS");

                 

                jboss-web.xml

                 

                <?xml version="1.0" encoding="ISO-8859-1"?>
                <jboss-web>
                   <resource-ref>
                      <res-ref-name>MY_PROJECT_DS</res-ref-name>
                      <jndi-name>java:/jdbc/MY_PROJECT_JNDI_DS</jndi-name>     
                   </resource-ref>    
                </jboss-web>

                 

                 

                Please note the JNDI tree thats shown above is same both times (I mean with and without easj2ee.jar in web-inf/lib). But the exceptions are different. Following is the exception after I put back this easj2ee.jar into web-inf/lib.

                 

                 

                 

                My logfile & exception stacktrace is:

                 

                2010-11-12 09:38:49,071 INFO   [org.jboss.jms.server.connectionfactory.ConnectionFactory] (main)  org.jboss.jms.server.connectionfactory.ConnectionFactory@f8c64f  started

                2010-11-12 09:38:49,071 INFO   [org.jboss.jms.server.destination.QueueService] (main) Queue[/queue/ExpiryQueue]  started, fullSize=200000, pageSize=2000,  downCacheSize=2000

                2010-11-12 09:38:49,555 INFO   [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (main)

                Bound ConnectionManager  'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name  'java:JmsXA'

                2010-11-12 09:38:49,696 INFO   [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (main)

                Bound ConnectionManager  'jboss.jca:service=DataSourceBinding,name=jdbc/MY_PROJECT_JNDI_DS' to JNDI name  'java:jdbc/MY_PROJECT_JNDI_DS'

                2010-11-12 09:38:49,852 INFO   [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (main)

                Bound ConnectionManager  'jboss.jca:service=DataSourceBinding,name=jdbc/MY_PROJECT_JNDI_DS_SQLDV'  to JNDI name  'java:jdbc/MY_PROJECT_JNDI_DS_MYMY_PROJECTSQLDV'

                2010-11-12 09:39:06,868 INFO   [org.jboss.ejb3.deployers.JBossASKernel] (main) Created KernelDeployment for:  profileservice-secured.jar

                2010-11-1

                ......

                2010-11-12 09:40:13,603 ERROR  [com.ra.v4.licensekey.key.LicenseKeyClientVerifier] (main) EXCEPTION OCCURED  WHILE Executing verifyLicenseKeySignature in LicenseKeyClientVerifier  :java.io.FileNotFoundException:  C:\jboss-5.1.0.GA\server\default\conf\maryland_sa_production_public.key (The  system cannot find the file specified)

                2010-11-12 09:40:13,619 ERROR  [com.ra.v4.common.plugin.SAPlugin] (main) Exception occured while executing  verifyLicenseKeySignature() in the SAPlugin  initialization:com.ra.v4.licensekey.exception.LicenseKeyException:  java.io.FileNotFoundException:  C:\jboss-5.1.0.GA\server\default\conf\maryland_sa_production_public.key (The  system cannot find the file specified)

                2010-11-12 09:40:13,712 INFO   [com.ra.v4.business.BusinessProcessMappingsDigester] (main) Entering  BusinessProcessMappingsDigester [digester]

                2010-11-12 09:40:13,822 INFO   [com.ra.v4.business.BusinessProcessMappingsDigester] (main) Exiting  BusinessProcessMappings [digester] after PARSING

                2010-11-12 09:40:13,884 INFO   [com.ra.v4.application.ServiceLocator] (main) Entering  ServiceLocator

                2010-11-12 09:40:14,041 SEVERE  [com.ra.v4.application.ServiceLocator] (main) Error while initializing  ServiceLocator :javax.naming.NoInitialContextException: Cannot instantiate  class: org.jnp.interfaces.NamingContextFactory [Root exception is  java.lang.ClassCastException:  org.jnp.interfaces.NamingContextFactory]

                2010-11-12 09:40:14,041 INFO   [com.ra.v4.application.ServiceLocator] (main) Exiting  ServiceLocator

                2010-11-12 09:40:14,041 INFO   [com.ra.v4.application.ServiceLocator] (main) Entering  ServiceLocator.getDataSource() - looking up datasource  [MY_PROJECT_DS]

                2010-11-12 09:40:14,041 ERROR  [STDERR] (main) java.lang.NullPointerException

                2010-11-12 09:40:14,056 ERROR  [STDERR] (main)          at  com.ra.v4.application.ServiceLocator.getDataSource(ServiceLocator.java:53)

                2010-11-12 09:40:14,056 ERROR  [STDERR] (main)          at  com.ra.v4.importer.data.ConnectionPool.<init>(ConnectionPool.java:143)

                2010-11-12 09:40:14,056 ERROR  [STDERR] (main)          at  com.ra.v4.importer.data.ConnectionPool.<clinit>(ConnectionPool.java:40)

                2010-11-12 09:40:14,056 ERROR  [STDERR] (main)          at  com.ra.v4.common.plugin.SAPlugin.init(SAPlugin.java:144)

                2010-11-12 09:40:14,056 ERROR  [STDERR] (main)          at  org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1158)

                2010-11-12 09:40:14,072 ERROR  [STDERR] (main)          at  org.apache.struts.action.ActionServlet.init(ActionServlet.java:473)

                2010-11-12 09:40:14,072 ERROR  [STDERR] (main)          at  javax.servlet.GenericServlet.init(GenericServlet.java:212)

                2010-11-12 09:40:14,072 ERROR  [STDERR] (main)          at  org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)

                2010-11-12 09:40:14,072 ERROR  [STDERR] (main)          at  org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:950)

                2010-11-12 09:40:14,072 ERROR  [STDERR] (main)          at  org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4122)

                2010-11-12 09:40:14,087 ERROR  [STDERR] (main)          at  org.apache.catalina.core.StandardContext.start(StandardContext.java:4421)

                2010-11-12 09:40:14,087 ERROR  [STDERR] (main)          at  org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)

                2010-11-12 09:40:14,087 ERROR  [STDERR] (main)          at  org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)

                2010-11-12 09:40:14,087 ERROR  [STDERR] (main)          at  org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)

                2010-11-12 09:40:14,087 ERROR  [STDERR] (main)          at  org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)

                2010-11-12 09:40:14,103 ERROR  [STDERR] (main)          at  org.jboss.web.deployers.WebModule.start(WebModule.java:97)

                2010-11-12 09:40:14,103 ERROR  [STDERR] (main)          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native  Method)

                2010-11-12 09:40:14,103 ERROR  [STDERR] (main)          at  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                2010-11-12 09:40:14,103 ERROR  [STDERR] (main)          at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                2010-11-12 09:40:14,103 ERROR  [STDERR] (main)          at  java.lang.reflect.Method.invoke(Method.java:592)

                2010-11-12 09:40:14,119 ERROR  [STDERR] (main)          at  org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

                2010-11-12 09:40:14,119 ERROR  [STDERR] (main)          at  org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)

                2010-11-12 09:40:14,119 ERROR  [STDERR] (main)          at  org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

                2010-11-12 09:40:14,119 ERROR  [STDERR] (main)          at  org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

                2010-11-12 09:40:14,119 ERROR  [STDERR] (main)          at  org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)

                2010-11-12 09:40:14,119 ERROR  [STDERR] (main)          at  org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)

                2010-11-12 09:40:14,134 ERROR  [STDERR] (main)          at $Proxy38.start(Unknown  Source)

                2010-11-12 09:40:14,134 ERROR  [STDERR] (main)          at  org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)

                2010-11-12 09:40:14,134 ERROR  [STDERR] (main)          at  org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)

                2010-11-12 09:40:14,134 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

                2010-11-12 09:40:14,134 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

                2010-11-12 09:40:14,150 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

                2010-11-12 09:40:14,150 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

                2010-11-12 09:40:14,150 ERROR  [STDERR] (main)          at  org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)

                2010-11-12 09:40:14,150 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

                2010-11-12 09:40:14,166 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

                2010-11-12 09:40:14,166 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

                2010-11-12 09:40:14,166 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

                2010-11-12 09:40:14,166 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

                2010-11-12 09:40:14,166 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

                2010-11-12 09:40:14,181 ERROR  [STDERR] (main)          at  org.jboss.system.ServiceController.doChange(ServiceController.java:688)

                2010-11-12 09:40:14,212 ERROR  [STDERR] (main)          at  org.jboss.system.ServiceController.start(ServiceController.java:460)

                2010-11-12 09:40:14,212 ERROR  [STDERR] (main)          at  org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)

                2010-11-12 09:40:14,212 ERROR  [STDERR] (main)          at  org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)

                2010-11-12 09:40:14,212 ERROR  [STDERR] (main)          at  org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)

                2010-11-12 09:40:14,228 ERROR  [STDERR] (main)          at  org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)

                2010-11-12 09:40:14,228 ERROR  [STDERR] (main)          at  org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)

                2010-11-12 09:40:14,228 ERROR  [STDERR] (main)          at  org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)

                2010-11-12 09:40:14,228 ERROR  [STDERR] (main)          at  org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)

                2010-11-12 09:40:14,228 ERROR  [STDERR] (main)          at  org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)

                2010-11-12 09:40:14,244 ERROR  [STDERR] (main)          at  org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)

                2010-11-12 09:40:14,244 ERROR  [STDERR] (main)          at  org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)

                2010-11-12 09:40:14,244 ERROR  [STDERR] (main)          at  org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)

                2010-11-12 09:40:14,244 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

                2010-11-12 09:40:14,244 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

                2010-11-12 09:40:14,259 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

                2010-11-12 09:40:14,259 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

                2010-11-12 09:40:14,259 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

                2010-11-12 09:40:14,259 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

                2010-11-12 09:40:14,275 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

                2010-11-12 09:40:14,275 ERROR  [STDERR] (main)          at  org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)

                2010-11-12 09:40:14,275 ERROR  [STDERR] (main)          at  org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)

                2010-11-12 09:40:14,275 ERROR  [STDERR] (main)          at  org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

                2010-11-12 09:40:14,275 ERROR  [STDERR] (main)          at  org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)

                2010-11-12 09:40:14,291 ERROR  [STDERR] (main)          at  org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)

                2010-11-12 09:40:14,291 ERROR  [STDERR] (main)          at  org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)

                2010-11-12 09:40:14,291 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

                2010-11-12 09:40:14,291 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

                2010-11-12 09:40:14,306 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

                2010-11-12 09:40:14,306 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

                2010-11-12 09:40:14,306 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

                2010-11-12 09:40:14,306 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

                2010-11-12 09:40:14,306 ERROR  [STDERR] (main)          at  org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

                2010-11-12 09:40:14,322 ERROR  [STDERR] (main)          at  org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)

                2010-11-12 09:40:14,322 ERROR  [STDERR] (main)          at  org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)

                2010-11-12 09:40:14,322 ERROR  [STDERR] (main)          at  org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

                2010-11-12 09:40:14,322 ERROR  [STDERR] (main)          at  org.jboss.Main.boot(Main.java:221)

                2010-11-12 09:40:14,322 ERROR  [STDERR] (main)          at  org.jboss.Main$1.run(Main.java:556)

                2010-11-12 09:40:14,337 ERROR  [STDERR] (main)          at  java.lang.Thread.run(Thread.java:595)

                2010-11-12 09:40:14,337 ERROR  [com.ra.v4.importer.data.ConnectionPool] (main) Could not initialize  datasource!!! null

                2010-11-12 09:40:15,119 ERROR  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/MY_PROJECT]]  (main) StandardWrapper.Throwable

                java.lang.ExceptionInInitializerError

                            at  com.ra.v4.events.scheduler.SchedulerService.<init>(SchedulerService.java:36)

                            at  com.ra.v4.events.scheduler.SchedulerService.<clinit>(SchedulerService.java:34)

                            at  com.ra.v4.common.plugin.SAPlugin.init(SAPlugin.java:151)

                            at  org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1158)

                            at  org.apache.struts.action.ActionServlet.init(ActionServlet.java:473)

                            at  javax.servlet.GenericServlet.init(GenericServlet.java:212)

                            at  org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)

                            at  org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:950)

                            at  org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4122)

                            at  org.apache.catalina.core.StandardContext.start(StandardContext.java:4421)

                            at  org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)

                            at  org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)

                            at  org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)

                            at  org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)

                            at  org.jboss.web.deployers.WebModule.start(WebModule.java:97)

                            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:592)

                            at  org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

                            at  org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)

                            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:668)

                            at  org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)

                            at  $Proxy38.start(Unknown Source)

                            at  org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)

                            at  org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)

                            at  org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

                            at  org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

                            at  org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

                            at  org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

                            at  org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)

                            at  org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

                            at  org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

                            at  org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

                            at  org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

                            at  org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

                            at  org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

                            at  org.jboss.system.ServiceController.doChange(ServiceController.java:688)

                            at  org.jboss.system.ServiceController.start(ServiceController.java:460)

                            at  org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)

                            at  org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)

                            at  org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)

                            at  org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)

                            at  org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)

                            at  org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)

                            at  org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)

                            at  org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)

                            at  org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)

                            at  org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)

                            at  org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)

                            at  org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

                            at  org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

                            at  org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

                            at  org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

                            at  org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

                            at  org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

                            at  org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

                            at  org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)

                            at  org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)

                            at  org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

                            at  org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)

                            at  org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)

                            at  org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)

                            at  org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

                            at  org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

                            at  org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

                            at  org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

                            at  org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

                            at  org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

                            at  org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

                            at  org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)

                            at  org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)

                            at  org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

                            at  org.jboss.Main.boot(Main.java:221)

                            at  org.jboss.Main$1.run(Main.java:556)

                            at  java.lang.Thread.run(Thread.java:595)

                Caused by:  java.lang.RuntimeException: Could not initialize DaoConfig for Scheduler.   Cause: com.ibatis.dao.client.DaoException: Error while configuring DaoManager.   Cause: com.ibatis.common.exception.NestedRuntimeException: Error occurred.   Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:  com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath  '/sqlMapConfig/transactionManager/dataSource/end()'.  Cause:  com.ibatis.sqlmap.client.SqlMapException: There was an error configuring  JndiDataSourceDaoTransactionPool. Cause: javax.naming.NoInitialContextException:  Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root  exception is java.lang.ClassCastException:  org.jnp.interfaces.NamingContextFactory]

                Caused by:  javax.naming.NoInitialContextException: Cannot instantiate class:  org.jnp.interfaces.NamingContextFactory [Root exception is  java.lang.ClassCastException:  org.jnp.interfaces.NamingContextFactory]

                Caused by:  com.ibatis.sqlmap.client.SqlMapException: There was an error configuring  JndiDataSourceDaoTransactionPool. Cause: javax.naming.NoInitialContextException:  Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root  exception is java.lang.ClassCastException:  org.jnp.interfaces.NamingContextFactory]

                Caused by:  javax.naming.NoInitialContextException: Cannot instantiate class:  org.jnp.interfaces.NamingContextFactory [Root exception is  java.lang.ClassCastException:  org.jnp.interfaces.NamingContextFactory]

                Caused by:  com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath  '/sqlMapConfig/transactionManager/dataSource/end()'.  Cause:  com.ibatis.sqlmap.client.SqlMapException: There was an error configuring  JndiDataSourceDaoTransactionPool. Cause: javax.naming.NoInitialContextException:  Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root  exception is java.lang.ClassCastException:  org.jnp.interfaces.NamingContextFactory]

                Caused by:  javax.naming.NoInitialContextException: Cannot instantiate class:  org.jnp.interfaces.NamingContextFactory [Root exception is  java.lang.ClassCastException:  org.jnp.interfaces.NamingContextFactory]

                Caused by:  com.ibatis.sqlmap.client.SqlMapException: There was an error configuring  JndiDataSourceDaoTransactionPool. Cause: javax.naming.NoInitialContextException:  Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root  exception is java.lang.ClassCastException:  org.jnp.interfaces.NamingContextFactory]

                Caused by:  javax.naming.NoInitialContextException:

                --------------------------------------------------------------------------------------

                 

                 

                Thanks

                 


                • 5. Re: Caused by: java.lang.ClassCastException: org.jboss.resource.adapter.jdbc.WrapperDataSource
                  Peter Johnson Master

                  Here is the first error:

                   

                  2010-11-12  09:40:13,603 ERROR  [com.ra.v4.licensekey.key.LicenseKeyClientVerifier]  (main) EXCEPTION OCCURED  WHILE Executing verifyLicenseKeySignature in  LicenseKeyClientVerifier  :java.io.FileNotFoundException:   C:\jboss-5.1.0.GA\server\default\conf\maryland_sa_production_public.key  (The  system cannot find the file specified)

                  2010-11-12  09:40:13,619 ERROR  [com.ra.v4.common.plugin.SAPlugin] (main) Exception  occured while executing  verifyLicenseKeySignature() in the SAPlugin   initialization:com.ra.v4.licensekey.exception.LicenseKeyException:

                   

                  From this I would guess that you need a license key to run this library. Until you get the license key issue resolved, I would ignore any other errors (including the NPE).