• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

Entity Beans in Web Sphere 3.5 with Oracle8i as DB

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I am new to Web Sphere3.5 and EJB I wanted deploy Entity beans with Oracle8i as the database.
I am able to create the Data Source, then I deploy the Entity Bean. But once I try to start the server the Entity bean doesn�t start. it gives the following error
-----------------------------------------------------------------------------------------------------------
10/6/01 2:00 PM : Command Default Container.start Sub-command Error.
10/6/01 2:00 PM : WARNING [pc1/Default Server]: Could not create bean table "EJB.CabinBeanTbl" due to java.sql.SQLException: Io exception: The Network Adapter could not establish the connection at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:323) at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:260) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260) at com.ibm.ejs.cm.pool.JDBC1xConnectionFactory.createConnection(JDBC1xConnectionFactory.java:32) at com.ibm.ejs.cm.pool.ConnectionPool.createConnection(ConnectionPool.java:637) at com.ibm.ejs.cm.pool.ConnectionPool.createOrWaitForConnection(ConnectionPool.java:590) at com.ibm.ejs.cm.pool.ConnectionPool.findFreeConnection(ConnectionPool.java:520) at com.ibm.ejs.cm.pool.ConnectionPool.findConnectionForTx(ConnectionPool.java:472) at com.ibm.ejs.cm.pool.ConnectionPool.allocateConnection(ConnectionPool.java:424) at com.ibm.ejs.cm.pool.ConnectionPool.getConnection(ConnectionPool.java:169) at com.ibm.ejs.cm.DataSourceImpl.getConnection(DataSourceImpl.java:113) at com.ibm.ejs.sm.active.ActiveEJBContainer.createBeanTable(ActiveEJBContainer.java:653) at com.ibm.ejs.sm.active.ActiveEJBContainer.startBean(ActiveEJBContainer.java:526) at com.ibm.ejs.sm.active.ActiveEnterpriseBean.startAction(ActiveEnterpriseBean.java:55) at com.ibm.ejs.sm.active.ActiveObject.startObject(ActiveObject.java:663) at com.ibm.ejs.sm.active.ActiveObject.start(ActiveObject.java:110) at com.ibm.ejs.sm.active.ActiveObject.operateOnContainedObjects(ActiveObject.java:565) at com.ibm.ejs.sm.active.ActiveEJBContainer.startAction(ActiveEJBContainer.java:365) at com.ibm.ejs.sm.active.ActiveObject.startObject(ActiveObject.java:663) at com.ibm.ejs.sm.active.ActiveObject.start(ActiveObject.java:110) at java.lang.reflect.Method.invoke(Native Method) at com.ibm.ejs.sm.agent.AdminAgentImpl.activeObjectInvocation(AdminAgentImpl.java:93) at com.ibm.ejs.sm.active.ActiveObject.invokeContainedObject(ActiveObject.java:468) at com.ibm.ejs.sm.agent.AdminAgentImpl.activeObjectInvocation(AdminAgentImpl.java:110) at com.ibm.ejs.sm.agent.AdminAgentImpl.invokeActiveObject(AdminAgentImpl.java:62) at com.ibm.ejs.sm.agent._AdminAgentImpl_Tie._invoke(Unknown Source) at com.ibm.CORBA.iiop.ExtendedServerDelegate.dispatch(Unknown Source) at com.ibm.CORBA.iiop.ORB.process(Unknown Source) at com.ibm.CORBA.iiop.WorkerThread.run(Unknown Source) at com.ibm.ejs.oa.pool.ThreadPool$PooledThread.run(ThreadPool.java:528)
10/6/01 2:00 PM : WARNING [pc1/Default Server]: Failed to start the bean "Cabin" java.sql.SQLException: Io exception: The Network Adapter could not establish the connection at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:323) at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:260) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260) at com.ibm.ejs.cm.pool.JDBC1xConnectionFactory.createConnection(JDBC1xConnectionFactory.java:32) at com.ibm.ejs.cm.pool.ConnectionPool.createConnection(ConnectionPool.java:637) at com.ibm.ejs.cm.pool.ConnectionPool.createOrWaitForConnection(ConnectionPool.java:590) at com.ibm.ejs.cm.pool.ConnectionPool.findFreeConnection(ConnectionPool.java:520) at com.ibm.ejs.cm.pool.ConnectionPool.findConnectionForTx(ConnectionPool.java:472) at com.ibm.ejs.cm.pool.ConnectionPool.allocateConnection(ConnectionPool.java:424) at com.ibm.ejs.cm.pool.ConnectionPool.getConnection(ConnectionPool.java:169) at com.ibm.ejs.cm.DataSourceImpl.getConnection(DataSourceImpl.java:113) at com.ibm.ejs.sm.active.ActiveEJBContainer.createBeanTable(ActiveEJBContainer.java:653) at com.ibm.ejs.sm.active.ActiveEJBContainer.startBean(ActiveEJBContainer.java:526) at com.ibm.ejs.sm.active.ActiveEnterpriseBean.startAction(ActiveEnterpriseBean.java:55) at com.ibm.ejs.sm.active.ActiveObject.startObject(ActiveObject.java:663) at com.ibm.ejs.sm.active.ActiveObject.start(ActiveObject.java:110) at com.ibm.ejs.sm.active.ActiveObject.operateOnContainedObjects(ActiveObject.java:565) at com.ibm.ejs.sm.active.ActiveEJBContainer.startAction(ActiveEJBContainer.java:365) at com.ibm.ejs.sm.active.ActiveObject.startObject(ActiveObject.java:663) at com.ibm.ejs.sm.active.ActiveObject.start(ActiveObject.java:110) at java.lang.reflect.Method.invoke(Native Method) at com.ibm.ejs.sm.agent.AdminAgentImpl.activeObjectInvocation(AdminAgentImpl.java:93) at com.ibm.ejs.sm.active.ActiveObject.invokeContainedObject(ActiveObject.java:468) at com.ibm.ejs.sm.agent.AdminAgentImpl.activeObjectInvocation(AdminAgentImpl.java:110) at com.ibm.ejs.sm.agent.AdminAgentImpl.invokeActiveObject(AdminAgentImpl.java:62) at com.ibm.ejs.sm.agent._AdminAgentImpl_Tie._invoke(Unknown Source) at com.ibm.CORBA.iiop.ExtendedServerDelegate.dispatch(Unknown Source) at com.ibm.CORBA.iiop.ORB.process(Unknown Source) at com.ibm.CORBA.iiop.WorkerThread.run(Unknown Source) at com.ibm.ejs.oa.pool.ThreadPool$PooledThread.run(ThreadPool.java:528)
10/6/01 2:00 PM : Command "Default Container.start" failed.
------------------------------------------------------------------------------------------------------------
can somebody tell me where am I going wrong

thanks
Prabhat Gupta
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It appears that your database connection is not set up correctly. Could you post the parameters you used to set up your datasource?

------------------
Kyle Brown,
Author of Enterprise Java (tm) Programming with IBM Websphere
See my homepage at http://members.aol.com/kgb1001001 for other WebSphere information.
 
Gupta Prabhat
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kyle
Here are the steps I followed.
I created a table called CABIN in oracle which has a default database / SID called "oracle" the user ID is "scott". Password is "tiger".
The OS is Windows2000 and I log on as Administrator
The Process I followed are pasted in This HTML File ( Huge file, takes time to download)
http://www.mycgiserver.com/~prabhat/WS3.5WithOracle8ia.html
The JAR file I deployed is http://www.mycgiserver.com/~prabhat/CabinJar.jar
The source for the EJB and Client is
http://www.mycgiserver.com/~prabhat/source.zip
thanks
Prabhat Gupta
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not familar with WAS3.5. But the following is recommended:
do not use "scott" and "tiger" as user name and password in oracle. It is the guest account. It have very limitted priviledge. You can try DBA account by default is UID: system, password: manager). This account have full priviledge.
I think this is the reason you get the Exception of:
"ORA-01031: Insufficient privileges".
Also I recommend you write some code to make sure that DataSource is set correctly before deploy Entity bean.
Also I guess you need to add : orcl at the end of jdbc.oracle.thin:@IPAddress:1521("orcl" is the default database name, you may change it depend on the database name you set. I not sure with this because I am not familar with WAS3.5. I know it is need this in WAS4.0)
Good luck!
 
Kyle Brown
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Huiming,
I think you've got something here. The id MUST have create permissions on the database, and you're right, "scott" doesn't.
Kyle

------------------
Kyle Brown,
Author of Enterprise Java (tm) Programming with IBM Websphere
See my homepage at http://members.aol.com/kgb1001001 for other WebSphere information.
 
Gupta Prabhat
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Huiming and Kyle
I tried with UID: system, password: manager and the code worked,
I did not add : SID/database name at the end of jdbc.oracle.thin:@IPAddress:1521("orc")
Thanks for your Help
Prabhat Gupta
 
A feeble attempt to tell you about our stuff that makes us money
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic