This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes BEA/Weblogic and the fly likes problem in creating datasource i Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "problem in creating datasource i" Watch "problem in creating datasource i" New topic
Author

problem in creating datasource i

AmitCdac Grover
Greenhorn

Joined: Mar 30, 2005
Posts: 26
hi ..........


i have created a CMP bean. now i want to deploy the bean . but the problem is before that i have to create datasource and connection pool

i want to connect with the Oracle...

In connection pool i did the following entries
name: EmployeeOraclePool

URL :jdbc racle:thin:@server ort:sid

Driver class name: oracle.jdbc.driver.OracleDriver

Properties
(key=value): user=SCOTT

ACLName:
Password:
Open String Password:

is the obove entries are correct my database is not on the my machine it is remote and its ip address is 192.2.2.37 and the connection string is MSRT
where sould i do this entries..

can it is necessary to give the ACLNAME ,password and Open String Password
if yes what are the entries for these.


there r two option in weblogic server for creating datasource
1. datasources
2. Tsdatasources

which option i have to choose and why...

apart from above is there is any another setting which i have to do while making datasource or connection pool..


after making what should i do to complete my deploy bean.

regards
amit grover
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
You should check the documentation, http://e-docs.bea.com.

You asked where to put your IP, that's the "server" in URL. Is MSRT the database name, that goes in the sid position. You also need a port number for the URL. You need the user and password for logging into the database.

jdbcracle:thin:@server:port:sid

datasources vs Tsdatasources, do you mean "TxDataSources"?

Quote from BEA's documentation :

WebLogic Server supports two types of DataSource objects:

DataSources (for local transactions only)
TxDataSources (for distributed transactions)
AmitCdac Grover
Greenhorn

Joined: Mar 30, 2005
Posts: 26
i have given all the entries as told by u.

first i make connection pool

name: PoolName
url: jdbc racle:thin:@192.168.3.27:1521:st
driver class name: oracle.jdbc.xa.client.OracleXADataSource
Properties
(key=value):user=scott
password=tiger

ACL name: -NA-
Password: -NA-
Open String Password: -NA-

after that i create the XA datasources becoz my datsource is in remote machine

after creating the connection pool and XA datasources i open my cmp bean in
weblogic builder.

i done the following things..

1. give the datasource name and table name in the persistence tab in right pane.

2. in CMP fiels i done the mapping of

firstname with FIRST_NAME
id with ID
lastname with LAST_NAME

( FIRST_NAME, ID, LAST_NAME IS IN THE CUSTOMER TABLE IN DATABASE)

NOW I TRY TO DEPLOY the bean it gives me the following error


weblogic.management.ApplicationException: activate failed forCmpEmp

Start server side stack trace:
weblogic.management.ApplicationException: activate failed forCmpEmp
{
Module Name: CmpEmp, Error: Exception activating module: EJBModule(CmpEmp,status=PREPARED)


Unable to deploy EJB: EmpCmpBean2 from CmpEmp.jar:

Errors encountered ''The Container-Managed Persistence Entity EJB failed while creating its SQL Type Map. The error was:
Internal error: Cannot obtain XAConnection Creation of XAConnection for pool EmployeePool failed after waitSecs:99',
'Error encountered while attempting to create Default DBMS Table: 'Customer'. Error Text: 'Internal error: Cannot obtain XAConnection Creation of XAConnection for pool EmployeePool failed after waitSecs:98'.''




TargetException:

Unable to deploy EJB: EmpCmpBean2 from CmpEmp.jar:

Errors encountered ''The Container-Managed Persistence Entity EJB failed while creating its SQL Type Map. The error was:
Internal error: Cannot obtain XAConnection Creation of XAConnection for pool EmployeePool failed after waitSecs:99',
'Error encountered while attempting to create Default DBMS Table: 'Customer'. Error Text: 'Internal error: Cannot obtain XAConnection Creation of XAConnection for pool EmployeePool failed after waitSecs:98'.''




}

at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:1093)

at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:1074)

at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:1110)

at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:730)

at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:24)

at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)

at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)

End server side stack trace

{
Module Name: CmpEmp, Error: Exception activating module: EJBModule(CmpEmp,status=PREPARED)


Unable to deploy EJB: EmpCmpBean2 from CmpEmp.jar:

Errors encountered ''The Container-Managed Persistence Entity EJB failed while creating its SQL Type Map. The error was:
Internal error: Cannot obtain XAConnection Creation of XAConnection for pool EmployeePool failed after waitSecs:99',
'Error encountered while attempting to create Default DBMS Table: 'Customer'. Error Text: 'Internal error: Cannot obtain XAConnection Creation of XAConnection for pool EmployeePool failed after waitSecs:98'.''




TargetException:

Unable to deploy EJB: EmpCmpBean2 from CmpEmp.jar:

Errors encountered ''The Container-Managed Persistence Entity EJB failed while creating its SQL Type Map. The error was:
Internal error: Cannot obtain XAConnection Creation of XAConnection for pool EmployeePool failed after waitSecs:99',
'Error encountered while attempting to create Default DBMS Table: 'Customer'. Error Text: 'Internal error: Cannot obtain XAConnection Creation of XAConnection for pool EmployeePool failed after waitSecs:98'.''

}

i didnot understand what is this error .how can i resolve this problem




regards
amit grover

i also want to know that what is the server path in wiblogic 7.0
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
Did you try using non-XA?

What do you mean by server path?
AmitCdac Grover
Greenhorn

Joined: Mar 30, 2005
Posts: 26
i don'nt know which entries i have to do in connnection pool for non-XA
before that i did the following entries in connecton pool

URL=jdbc racle:thin:@192.168.3.27:1521:st
driver class name=oracle.jdbc.xa.client.OracleXADataSource
properties= user=scott
password=tiger

now plz tell me which entries i have to do for non-XA connection pool.
and i also don'nt know what is this non-XA connection pool.

server path
--------

actually it is not the server path it is the server classpath..
before that i tried to call class from one one jar file to another jar file some body from javaranch told me that put jar file into server classpath
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
I don't remember how configuring a connection pool worked in 7.0, but your driver class would be something like oracle.jdbc.driver.OracleDriver.

Somehow you ended up with driver as oracle.jdbc.xa.client.OracleXADataSource, I suggest trying
oracle.jdbc.driver.OracleDriver

It may be unrelated to your problem, but it seems simpler.

If you still have problems I'd suggest simplifying what you are trying to diagnose. Can you reach the database using sqlplus or somthing like that? How about a simple jdbc call?
AmitCdac Grover
Greenhorn

Joined: Mar 30, 2005
Posts: 26
Thanx , Now its working
 
Consider Paul's rocket mass heater.
 
subject: problem in creating datasource i