wood burning stoves 2.0*
The moose likes Websphere and the fly likes WAS4.0 Problems connecting to Oracle using Merant Drivers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "WAS4.0 Problems connecting to Oracle using Merant Drivers" Watch "WAS4.0 Problems connecting to Oracle using Merant Drivers" New topic
Author

WAS4.0 Problems connecting to Oracle using Merant Drivers

Steve Granton
Ranch Hand

Joined: Jan 13, 2002
Posts: 200
Hi,
We are using DB2 as our Websphere repository and the application database is Oracle.
We were having problems connecting to Oracle 8.1.6 as apparently it is not supported by WAS4.0 so we decided to use the Merant Drivers and the Merant Sequelink Server 5.1 to connect to Oracle as we've used the Merant Drivers to connect to SQL Server previously on WAS3.5.
I followed the installation instructions (http://www7b.boulder.ibm.com/wsdd/library/techarticles/0109_hiranniah/0109_hiranniahpt2.html) and created a database named WAS with a user and password of EJSADMIN. I then created the required user with the commands below (from the article) on the WAS database:
Installation
Follow the first three steps of configuring Merant Server with Oracle as the administrative database for WebSphere.

Use the following command at the Oracle command prompt to create the user:
create user dbuser1 identified by dbpwd1 default tablespace users \
temporary tablespace temp profile default account unlock;
Ensure XA connectivity for the user. Enter the following from the Oracle command prompt:
grant select on "SYS"."DBA_PENDING_TRANSACTIONS" to dbuser1;
So after all this I restart the Merant Service and then restart the Websphere service. I created a JDBC provider using the com.merant.sequelink.jdbcx.datasource.SequeLinkDataSource class with a classpath pointing at the sljcx.jar.
I then created a data source giving the following values:
serverName ip of my server
portNumber 19996
user EJSADMIN
password EJSADMIN
databaseName TEST
I then tested the connection and received the 'Test Connection Ran Successfully' message
I started the application and tried to hit the database and got the following error:
[04/05/02 16:42:25:391 BST] 4c7aff67 ExceptionUtil X CNTR0020E: Non-application exception occurred while processing method handleEvent on bean BeanId(tickets#ejb_EjbSearch.jar#com.versko.tickets.business.EjbSearch, null): javax.ejb.EJBException: SQLException in findByEventName : java.sql.SQLException: [MERANT][SequeLink JDBC Driver][Oracle]ORA-00942: table or view does not exist
at com.versko.tickets.entity.performance.PerformanceDm.findByEventName(Unknown Source)
at com.versko.tickets.business.Search.EjbSearchBean.handleEvent(Unknown Source)
at com.versko.tickets.business.Search.EJSRemoteStatelessEjbSearch.handleEvent(EJSRemoteStatelessEjbSearch.java:61)
at com.versko.tickets.business.Search._EjbSearch_Stub.handleEvent(_EjbSearch_Stub.java:275)
at com.versko.controller.business.ControllerBean.handleEvent(Unknown Source)
at com.versko.controller.business.ControllerBean.handleEvent(Unknown Source)
at com.versko.controller.business.EJSRemoteStatelessController.handleEvent(EJSRemoteStatelessController.java:25)
at com.versko.controller.business._Controller_Stub.handleEvent(_Controller_Stub.java:267)
at com.versko.controller.web.WebTierEventHandler.processBusinessEvent(Unknown Source)
at com.versko.tickets.web.SearchWteHandler.generateXml(Unknown Source)
at com.versko.controller.web.WebTierEventHandler.processEvent(Unknown Source)
at com.versko.controller.web.Controller.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:167)
at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:297)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:110)
at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:523)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:282)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:112)
at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:91)
at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:184)
at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
at com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:106)
at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:125)
at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315)
at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:323)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252)
at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)
The table does exist in the specified database so I'm not sure what is happening here or why I'm getting this error.
Any ideas?
Cheers,
Steve
Simon Song
Ranch Hand

Joined: Feb 01, 2002
Posts: 217
First of all, i have no problem in using Oracle's type 4 driver to create datasource against Oracle 8.1.6. Oracle 9i support is available with FP3.
I haven't used Merant against Oracle. But under which schema the Oracle table is created? Who is the default user of your datasource?


Simon Song
Certified Entperise Developer of Websphere
Steve Granton
Ranch Hand

Joined: Jan 13, 2002
Posts: 200
Simon,
Thanks for the reply. I'm very interested to hear you were able to connect to 8.1.6 using the type 4 driver.
Could you tell me the following:
Which implementation class were you using as the JDBC provider?
Which jar file(s) you used for the classpath? Was it the classes12.zip?
Could you provide me with a breakdown of the custom properties that you set - url, etc?
Cheers,
Steve
[ May 07, 2002: Message edited by: Steve Granton ]
Jay Damon
Ranch Hand

Joined: Jul 31, 2001
Posts: 282
(1) oracle.jdbc.pool.OracleConnectionPoolDataSource
(URL prefix = jdbcracle
(2) classes12.zip
(3) You MUST add the following Resource Property:
1. Name: URL(MUST BE IN UPPERCASE!)
2. Type: java.lang.String
3. Value: jdbcracle:thinname)port)db)
Optionally, you may specify:
1. Name: user
2. Type: java.lang.String
3. Value: (username)
and:
1. Name: password
2. Type: java.lang.String
3. Value: (password)
However, I generally specify (user) and (password) in the DataSource since the password is seen as plain text if specified as a Resource Property.
[ May 07, 2002: Message edited by: Jay Damon ]
Steve Granton
Ranch Hand

Joined: Jan 13, 2002
Posts: 200
Hi,
Jay, are you referring to WAS3.5? I can see the url prefix when setting up a Data Source in my WAS 3.5 but there isn't an equivalent in WAS4.0 AE - or if there is I haven't found it yet!
I haven't tried putting the URL in uppercase - I'll give it a go.
Cheers,
Steve
 
jQuery in Action, 2nd edition
 
subject: WAS4.0 Problems connecting to Oracle using Merant Drivers