• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem in creating datasource i

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

jdbc:oracle: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
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you try using non-XA?

What do you mean by server path?
 
AmitCdac Grover
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanx , Now its working
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic