[jboss-user] Error Configuring persistent unit in jpa throwing strange class cast exception
vamsi
vamsi.mandava at valuemomentum.biz
Fri Sep 11 07:08:33 EDT 2009
Hi All
I am trying to configure a jta data source to persitent unit for JPA.
It is throwing a strange class cast exception,I am able to bind the data
source successfully the problems comes into picture when using the jndi to
bind to persitent unit.
Ds file
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<use-java-context>false</use-java-context>
<jndi-name>jdbc/questionaire</jndi-name>
<connection-url>jdbc:jtds:sqlserver://calcas\sqlexpress:1443/questionaire</c
onnection-url>
<driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class>
<user-name>sa</user-name>
<password>Passw0rd</password>
<min-pool-size>10</min-pool-size>
<max-pool-size>20</max-pool-size>
<prepared-statement-cache-size>32</prepared-statement-cache-size>
<idle-timeout-minutes>300</idle-timeout-minutes>
</local-tx-datasource>
</datasources>
java.lang.ClassCastException: $Proxy263 cannot be cast to
javax.sql.DataSource
at
org.jboss.jpa.deployment.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoI
mpl.java:111)
at
org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDepl
oyment.java:275)
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.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUti
ls.java:59)
at
org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(Reflect
MethodInfoImpl.java:150)
at
org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoi
nt.java:66)
at
org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointD
ispatchWrapper.execute(KernelControllerContextAction.java:241)
at
org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrappe
r.java:47)
at
org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchEx
ecutionWrapper(KernelControllerContextAction.java:109)
at
org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJo
inPoint(KernelControllerContextAction.java:70)
at
org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(Li
fecycleAction.java:221)
at
org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(Instal
lsAwareAction.java:54)
at
org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(Instal
lsAwareAction.java:42)
at
org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInst
allAction(SimpleControllerContextAction.java:62)
at
org.jboss.dependency.plugins.action.AccessControllerContextAction.install(Ac
cessControllerContextAction.java:71)
at
org.jboss.dependency.plugins.AbstractControllerContextActions.install(Abstra
ctControllerContextActions.java:51)
at
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractContr
ollerContext.java:348)
at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.j
ava:1631)
at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractContr
oller.java:934)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractCont
roller.java:1082)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractCont
roller.java:984)
at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.j
ava:774)
at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.j
ava:540)
at
org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMeta
DataDeployer.java:121)
at
org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMeta
DataDeployer.java:51)
at
org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internal
Deploy(AbstractSimpleRealDeployer.java:62)
at
org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(Abstrac
tRealDeployer.java:50)
at
org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper
.java:171)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.j
ava:1439)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(Dep
loyersImpl.java:1157)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(Dep
loyersImpl.java:1178)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.ja
va:1098)
at
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractContr
ollerContext.java:348)
at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.j
ava:1631)
at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractContr
oller.java:934)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractCont
roller.java:1082)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractCont
roller.java:984)
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.ja
va:822)
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.ja
va:553)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.ja
va:781)
at
org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.j
ava:702)
at
org.jboss.system.server.profileservice.repository.MainDeployerAdapter.proces
s(MainDeployerAdapter.java:117)
at
org.jboss.system.server.profileservice.repository.ProfileDeployAction.instal
l(ProfileDeployAction.java:70)
at
org.jboss.system.server.profileservice.repository.AbstractProfileAction.inst
all(AbstractProfileAction.java:53)
at
org.jboss.system.server.profileservice.repository.AbstractProfileService.ins
tall(AbstractProfileService.java:361)
at
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractContr
ollerContext.java:348)
at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.j
ava:1631)
at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractContr
oller.java:934)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractCont
roller.java:1082)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractCont
roller.java:984)
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.ja
va:822)
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.ja
va:553)
at
org.jboss.system.server.profileservice.repository.AbstractProfileService.act
ivateProfile(AbstractProfileService.java:306)
at
org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(Profile
ServiceBootstrap.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(Unknown Source)
Thanks & Regards,
VAMSI
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20090911/3fb4f421/attachment.html
More information about the jboss-user
mailing list