[jboss-user] Error Configuring persistent unit in jpa throwing strange class cast exception

Stephen Davidson gorky at freenet.carleton.ca
Fri Sep 11 16:01:09 EDT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Vamsi.

This list does not seem to be monitored any more by anyone from the
JBoss Group.  I do not know the answer to this question, so I would
suggest trying the Forums.

Good luck!

Regards,
Steve

vamsi wrote:
> 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</connection-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>(_PersistenceUnitInfoImpl.java:111_)
> 
>       at
> org.jboss.jpa.deployment.PersistenceUnitDeployment.start(_PersistenceUnitDeployment.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(_ReflectionUtils.java:59_)
> 
>       at
> org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(_ReflectMethodInfoImpl.java:150_)
> 
>       at
> org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(_BasicMethodJoinPoint.java:66_)
> 
>       at
> org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(_KernelControllerContextAction.java:241_)
> 
>       at
> org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(_ExecutionWrapper.java:47_)
> 
>       at
> org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(_KernelControllerContextAction.java:109_)
> 
>       at
> org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(_KernelControllerContextAction.java:70_)
> 
>       at
> org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(_LifecycleAction.java:221_)
> 
>       at
> org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(_InstallsAwareAction.java:54_)
> 
>       at
> org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(_InstallsAwareAction.java:42_)
> 
>       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.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.install(_AbstractController.java:774_)
> 
>       at
> org.jboss.dependency.plugins.AbstractController.install(_AbstractController.java:540_)
> 
>       at
> org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(_BeanMetaDataDeployer.java:121_)
> 
>       at
> org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(_BeanMetaDataDeployer.java:51_)
> 
>       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.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(Unknown Source)
> 
>  
> 
>  
> 
>  
> 
>  
> 
> Thanks & Regards,
> 
> **VAMSI **
> 
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> jboss-user mailing list
> jboss-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-user

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iEYEARECAAYFAkqqrIUACgkQSphIUSiVzgYdUACg0sbiqmKPTSdCpuC2DD2guppr
VZQAn1KC5cxbP6JLu14OtDsylOzYhf62
=Xvyc
-----END PGP SIGNATURE-----



More information about the jboss-user mailing list