WebSphere Portal Server - java.lang.ClassCastException: com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > July 2006 > java.lang.ClassCastException: com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author java.lang.ClassCastException: com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource
iceman95

2004-08-30, 3:08 pm

Through various Google searches, I've seen several references to the ClassCastException that is the subject of this thread. Unfortunately, I haven't seen a solution that cures the exception yet.

I'm not using any EJBs, just SQL in a class, using a datasource.

I've configured the datasource on the PortalServer (AIX 5.1 machine) exactly as it's configured in the test environment in WSAD, but no luck.

Can anyone help?

Thanks,

Andy
Gabriela Buda

2004-11-12, 5:52 pm

Did you find a solution for this? It seems we have the same problem when
lookup for the datasource defined at the WAS level (with a WPS)
Thank you,
Gabriela

"iceman95" <iceman95.1bz9mw@mail.webservertalk.com> a écrit dans le message
de news: iceman95.1bz9mw@mail.webservertalk.com...
>
> Through various Google searches, I've seen several references to the
> ClassCastException that is the subject of this thread. Unfortunately,
> I haven't seen a solution that cures the exception yet.
>
> I'm not using any EJBs, just SQL in a class, using a datasource.
>
> I've configured the datasource on the PortalServer (AIX 5.1 machine)
> exactly as it's configured in the test environment in WSAD, but no
> luck.
>
> Can anyone help?
>
> Thanks,
>
> Andy
>
>
>
> --
> iceman95
> ------------------------------------------------------------------------
> Posted via http://www.webservertalk.com
> ------------------------------------------------------------------------
> View this thread: http://www.webservertalk.com/message371466.html
>



smader

2005-04-19, 5:19 am

Hi,

I had the same Exception.
The problem was that I had the Oracle Driver (classes12.zip) included in my EAR File. When I removed it from the EAR file (the Oracle Driver was then only referred to in the JNDI definition of my datasource), then it worked well.

regards
Stefan

2006-04-02, 8:03 pm

There might be a problem whith datasource. There is an option "Use this datasource in Container managed persistance (CMP)" for predefined datasource.
We had the same exception trying to start our EAR. After we switched on the option, application successfully started.

2006-04-02, 8:03 pm

I haven't seen the entire stack trace, so I'm grasping at straws here: Did you properly reference your DataSource in the ibm-web-bnd.xmi file? In RAD, you can add resource references by editing your web deployment descriptor and clicking on the "Referen
ces" tab at the bottom of the view. Then just click "Add..." and select "Resource Reference" or "Resource Environment Reference" as appropriate.
dheeraj821

2006-07-21, 10:51 am

Hi,
I am facing a similar problem and i am not able to solve it .
The code is

private final static String DATASOURCE_NAME = "jdbc/MyDataSource";
private DB2DataSource dataSource;

// Create a starting context for naming operations
InitialContext registry = new InitialContext();
//dataSource = (DB2DataSource) registry.lookup(DATASOURCE_NAME);

// instead of doing at 1 go , have done it in 2 steps

java.lang.Object obj = registry.lookup(DATASOURCE_NAME);
dataSource = (DB2DataSource) obj;

here when I am casting the object to a DB2DataSource it is giving
"java.lang.ClassCastException: com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource" error

when I change the DB2DataSource to plain DataSource ..it is working fine .
I need the DB2DataSource object explicitly.
Can anybody help me out on this ?


Thanks in advance ,
Dheeraj

quote:
Originally posted by
I haven't seen the entire stack trace, so I'm grasping at straws here: Did you properly reference your DataSource in the ibm-web-bnd.xmi file? In RAD, you can add resource references by editing your web deployment descriptor and clicking on the "Referen
ces" tab at the bottom of the view. Then just click "Add..." and select "Resource Reference" or "Resource Environment Reference" as appropriate.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com