How do I make embedded OC4J use IBM Db2 schema mapping - JHeadstart

I am using JDeveloper 903 with a datasource which happens to be of type IBM DB2. Whenever, I try to deploy and test an entity bean from withinn JDeveloper, the embedded OC4J seems to be using a different database schema mapping scheme than what is required by IBM DB2. As a result of this OC4J tries to autocreate tables with wrong syntax and obviously fails. Can somebody tell me how do I get things setup correctly.
TIA
Vimal

Related

Deploying mapviewer on application server

I'm using mapviewer on standalone OC4J, now i'm trying to deploy it on application server. It worked ok but when i'm trying to create a data source i got this error
Data source cannot be created : oracle.jdbc.pool.OracleDataSource.setConnectionCachingEnabled(Z)V
how can i solve this problem 
Hi,
On which version of application server you are deploying? On 10.1.3 or older?
Andrejus 
i'm deploying on application server 10.1.2 
From the error message it seems that connection can't be created in cache. May be you are picking up and trying to connect to database using wrong address? Also, you need to check - may be connection pooling and caching isn't enabled in Oracle Application Server.
Andrejus 
I'm not sure about connection pooling and caching, can you tell me please how to check it? 
Sorry but i think there's a missunderstanding here
i'm not talking about the AS Datasources. The case excatly is that
Firstly I created OC4j instance and deploying ear file of mapviewer on application server and created a user with admin role ,the status now , on application server control it is working ,and I can access the map viewer admin page ( http://server-name:port/mapviewer) and I clicked on admin and entered the username and password I created on and I could login successfully after that I tried to create datasource and entered the same entries I used before to create datasource but I faced this error message :
Data source cannot be created : oracle.jdbc.pool.OracleDataSource.setConnectionCachingEnabled(Z)V
I am sure of Host ,Port , Sid ,User and Password
waiting for your reply 
You appear to be deploying the latest MapViewer 11g EA1 kit, which uses JDBC 10g's new implicit connection caching feature. The problem is probably because the app server 10.1.2 does not have this new JDBC driver.
You can try create a mapviewer data source by re-using a container data source, as described in this FAQ:
http://www.oracle.com/technology/products/mapviewer/htdocs/faq_1012/mvfaq_1012.html#oc4jds
Otherwise, you will have to deploy it on iAS 10.1.3 which is the only tested platform for the new MapVIewer preview kit.
thanks 
Hi,
I have deployed MapViewer 11g EA1 on my OAS 10.1.2.0.2 and created map data source without any problem. And, it is working for few weeks without errors. Tomorrow, I will check which JDBC driver version is installed.
Andrejus 
I have checked my JDBC version, it is:
1. Oracle JDBC Drivers release 10.1.0.2.0
2. Driver name: ojdbc14.jar
With such configuration I can create MapViewer 11g EA1 map datasource.
Andrejus 
The problem was in my JDBC Driver, thanks alot for your help

Problems with Toplink & ( Apache Derby | HSQLDB )

Is there any problem using embedded databases with Toplink like Apache Derby and HSQLDB?? I can't map in JDeveloper 10.1.3.0.3.3412 and the new version of JDev say "Object must have a schema". The problem is:
java.lang.NullPointerException     at oracle.jdeveloper.offlinedb.handler.ImportHandler.findReferenceInObjs(ImportHandler.java:490)
at oracle.jdeveloper.offlinedb.handler.ImportHandler.findOrConvertReference(ImportHandler.java:467)
at oracle.jdeveloper.offlinedb.handler.ImportHandler.setupReferences(ImportHandler.java:438)
at oracle.jdeveloper.offlinedb.handler.ImportHandler.setupReferences(ImportHandler.java:448)
at oracle.jdeveloper.offlinedb.handler.ImportHandler.setupReferences(ImportHandler.java:412)
at oracle.jdeveloper.offlinedb.handler.AbstractTransferHandler.copyObjectsForTransfer(AbstractTransferHandler.java:945)
at oracle.jdeveloper.offlinedb.handler.ImportHandler.copyObjectsForTransfer(ImportHandler.java:944)
at oracle.jdeveloper.offlinedb.handler.AbstractTransferHandler.run(AbstractTransferHandler.java:348)
at
oracle.ide.dialogs.ProgressBar.run(ProgressBar.java:551)
at
java.lang.Thread.run(Thread.java:534)
Could anyone help me?
Thanks...
[]'s 
Are you specifying the database platform in your connection to be be Cloudscape or HSQL? With JDev 10.1.3 I had no problem generating entities from exisiting tables in a Derby network server using the Cloudscape platform setting--you can also use the DB2 jdbc drivers with Derby (http://db.apache.org/derby/docs/dev/adminguide/cadminapps810777.html). In this case you'd use the DB2 platform. Both drivers work fine when generating classes from tables.
Note that I had Derby running as a server, not embedded. At runtime I could use an embedded Derby instance but during dev an embedded instance would be empty every time I reconnect.
--Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Contact Two Datasources in Weblogic 10 in a single transaction

Hi,
my requirement is to create two datasource which points to two different schemas of oracle 10 g database.
In a single transaction i may be in requireemnt of contacting both the datasource to get respective db connection and do a insert/update.
I created two datasources A and B which use Oracle 9 thin driver.
When my application starts my app is able to get connection of datasource A and unable to get connection on datasource B. what may be the problem ??
both uses Oracle non-XA driver with one phase commit;
Let me know how to connect to two diff datasources in a single transaction.
Thanks in Advance.
--
Sreehari. 
Do you get like any error for second datasource like jndi lookup failed or exactly what do you see error. If I understand your usecase:
DataSource_1 -> Uses ConnectionPool_1 -> DB Schema_1
DataSource_2 -> Uses ConnectionPool_2 -> DB Schema_2.
So in your java application, I guess you are using JNDI Lookup and pass above Datasources unique JNDI names, and get 2 instances. I mean you have like 2 sets of Jndi lookup code to get 2 connection objects. This looks pretty straight forward. Does not matter what drivers you use.
Are you reusing any objects in your code, like have a single connection object and then close it and try to recycle it for second something like that...If not, check for any errors in the log files.
Ravi Jegga

weblogic 11g EJB 2.1

Dears,
we are facing problem while migration application from weblogic 7 to weblogic 11g.
Our Application use EJB 2.1 CMP and oracle database
we use both XA and non XA drivers
Application use two DB schema A and B .On Performing the operation the Data from schema A Table is copied to schema B Table using EJB create and then same Data from A is remove using EJB remove .The application then call another class that calls stored procedure to perform operation on the updated data in Schema B Table . weblogic 7 works fine in this case.
we got error in weblogic 11g while fetching the data from schema B that is update by EJB.Note that both EJB and database calling are part of the same transaction.
In my opinion weblogic and database state is not synchronized.There might be some weblogic parameter that need to be define to solve this problem.
Kindly help me in this regard 
"we got error in weblogic 11g while fetching the data from schema B"
and what error might that be? 
no data found

How do I make embedded OC4J use IBM Db2 schema mapping

I am using JDeveloper 903 with a datasource which happens to be of type IBM DB2. Whenever, I try to deploy and test an entity bean from withinn JDeveloper, the embedded OC4J seems to be using a different database schema mapping scheme than what is required by IBM DB2. As a result of this OC4J tries to autocreate tables with wrong syntax and obviously fails. Can somebody tell me how do I get things setup correctly.
TIA
Vimal

Categories

Resources