java.lang.ClassCastException: com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > WebSphere > WebSphere Portal Server > java.lang.ClassCastException: com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

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


View Ip Address Report This Message To A Moderator Edit/Delete Message


Click Here to See the Profile for iceman95 Click here to Send iceman95 a Private Message Find more posts by iceman95 Add iceman95 to your buddy list
 
08-30-04 08:08 PM

Through various Google searches, I've seen several references to the ClassCa
stException that is the subject of this thread.  Unfortunately, I haven't se
en 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




[ Post a follow-up to this message ]



    Re: java.lang.ClassCastException: com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource  
Gabriela Buda


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-12-04 10: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
>







[ Post a follow-up to this message ]



smader is offline     Re: java.lang.ClassCastException: com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource  
smader


View Ip Address Report This Message To A Moderator Edit/Delete Message


Click Here to See the Profile for smader Click here to Send smader a Private Message Find more posts by smader Add smader to your buddy list
 
04-19-05 10: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 on
ly referred to in the JNDI definition of my datasource), then it worked well
.

regards
Stefan




[ Post a follow-up to this message ]



    Re: java.lang.ClassCastException: com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-03-06 01:03 AM

There might be a problem whith datasource. There is an option "Use this data
source 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.





[ Post a follow-up to this message ]



    Re: java.lang.ClassCastException: com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-03-06 01:03 AM

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 a
nd clicking on the "Referen
ces" tab at the bottom of the view.  Then just click "Add..." and select "Re
source Reference" or "Resource Environment Reference" as appropriate.





[ Post a follow-up to this message ]



dheeraj821 is offline     java.lang.ClassCastException: com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource  
dheeraj821


View Ip Address Report This Message To A Moderator Edit/Delete Message


Click Here to See the Profile for dheeraj821 Click here to Send dheeraj821 a Private Message Find more posts by dheeraj821 Add dheeraj821 to your buddy list
 
07-21-06 03:51 PM

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_NA
ME);

                // 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" e
rror 

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 a nd clicking on the "Referen ces" tab at the bottom of the view. Then just click "Add..." and select "Resource Refer ence" or "Resource Environment Reference" as appropriate.




[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:53 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register