WebSphere Application Server - problem mapping database to CMP Bean

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Application Server > March 2006 > problem mapping database to CMP Bean





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 problem mapping database to CMP Bean

2006-03-08, 5:58 pm

Hello guys,

I'm having some problem on deploying CMP Beans on Websphere.

After trying to execute 'findByPrimaryKey', it accuses a 'Table not found' (ORA-00942) error. I've double checked the pool settings and mappings lots of times,
and they seem to be correct!! =/
For some reason I don't know, it seems to be connecting to the wrong
database...
Has anyone gone through this before?
I've migrated my system from Extend to Websphere. Does Websphere considers
what's in 'data-sources.xml'?

Any help would be SO much appreciated.
I'm trying to solve this for almost a week without any success at all.

Thanks!
Pedro

com.ibm.ws.ejbpersistence.utilpm.PersistenceManagerException: PMGR6022E: Error using adapter to create or execute an Interaction. com.ibm.ws.rsadapter.cci.WSInteractionImpl@6c5ef346

at com.ibm.ws.ejbpersistence.dataaccess.DataAccessRequestImpl.executeOneRowFBPK(Unknown Source)
at com.ibm.ws.ejbpersistence.beanextensions. ConcreteBeanStatefulInstanceExtensionImp
l.fetchRecordFromDataStore(Unknown Source)
at com.ibm.ws.ejbpersistence.beanextensions. ConcreteBeanStatefulInstanceExtensionImp
l.hydrateRecordForLoad(Unknown Source)
at com.ibm.ws.ejbpersistence.beanextensions. ConcreteBeanStatefulInstanceExtensionImp
l.executeLoad(Unknown Source)

(...)

at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback. complete(NewConnectionInitialReadCallbac
k.java(Compiled Code))

at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled Code))

at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))

at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
Caused by: java.sql.SQLException: ORA-00942: table or view does not exist

DSRA0010E: SQL State = 42000, Error Code = 942
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java(Compiled Code))

(...)

[3/3/06 18:33:45:645 BRT] 0000006d ExceptionUtil E CNTR0019E: EJB threw an unexpected (non-declared) exception during invocation of method "findByPrimaryKey". Exception data: com.ibm.ws.exception.WsEJBException

2006-03-11, 5:52 pm

Hey Meduri,

Where can I find resources.xml?

What I'm trying to do now is to find out which query is my application
(through CMP Beans) executing. I've read on some foruns that Websphere
can change the name of the table, for example, TABLE can be TABLE1, so
this would be the reason for the 'table or view not found error'.


2006-03-17, 2:59 am

resources.xml will be a file under WAS config. I wouldn't be manually editing the files. Adminconsole or was tools is the recommended way. Watch the deploy process again as db mapping is done. I don't understand why WAS will be renaming tables.

HTH.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com