Problem to connect RAC database JDBC
Hi all,
I am facing a problem when i connected to RAC (Oracle 10g) database by JDBC in applet.Error: The Network adapter could not establish the connection.
I use the following connection String:
DriverManager.getConnection("jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.212)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.213)(PORT = 1521))(LOAD_BALANCE = yes)(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = TIGER)(FAILOVER_MODE =(TYPE = SELECT)(METHOD = BASIC)(RETRIES = 180)(DELAY = 5))))","dev","dev");
I have ping those IP. its ok also i have checked in Frame. its connect smoothly.. But, why this problem happened in Applet...
Please help me..
Thank yoy
An applet, per default security policies, can only connect back to the IP address from which it originated (and, if you are running over a proxy, there is a good chance that this won't work either). So, unless the DB exists on the same machine as the web service, this is a no go.
If you wish to connect to a different address with an applet, a signed jar/applet may do the trick, otherwise, the user on the client machine must alter their security policy. Bad idea for them to do this, and very bad idea for your application (applet) to rely on this being, or having been, done.
Similar Messages
-
Problem in connecting to database from webdynpro for java
Hi
I have a problem in connecting to database from webdynpro application
I am using oracle 10 express edition as database and was able to connect to database from a java application.But was unable to connect from a webdynpro for java.
<b>I guess webdynpro for java uses open sql instead of vendor sql(I looked in the visual admin ,DB is using open sql) so unable to connect to database.Am i right.?</b>
Do i need to make any settings in the visual admin to make it work?
How to solve this problem.Please give me pointers
Thanks
BalaHi,
For connecting to Oracle, either you can use the normal JDBC connectivty code directly which is given below :
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@Oracle_server_ip:Oracle port:SID of the Database","user_name","password");
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("your query");
In case you want to fetch data through ejbs, these are the steps to be followed :
1) Open the J2EE perspective
2) Create an EJB Module project
3) Right click on ejbModule, create a new EJB (select your EJB type)
4) While creating the ejb itself, you can add business methods by clicking Next in the UI. Another option is after creating the ejb, write the method in the bean, then select the method from ejb-jar.xml -> <bean name> ->method. Right click and select propogate to local & remote.
5) Double click on ejb-j2ee-engine.xml. select your bean and specify a Jndi name for eg: MyJndi.
6) Right click on the EJB project and add classes12.zip file (provided by Oracle) to its build path. (under libraries tab). Also check the same file under Order & Export.
7) Create an Enterprise Application project.
8) Right click on the EJB module project and select add to EAR project, then select the created EAR project.
9) Right click on the EJB project, select Build EJB Archive
10) Right click on the EAR project, select Build Application Archive
11) Open the WebDynpro perspective, open a new project, right click on the project ->properties. Do the following configurations :-
Java Build path - select the EJB project from projects , check the selected project under Order & Export
Project references select the EAR project
WebDynpro references select sharing references tab, click add & make an entry as : <vendor>/<EAR project name without .ear extension>
You can find the vendor name under application-j2ee-engine.xml file of the EAR project. By default it is sap.com. So if my EAR projects name is ABC, my entry would look like sap.com/ABC
12) Now the configurations are over and the EJB can be invoked by writing the client code inside the webdynpro component. Like:
InitialContext context = new InitialContext();
Object obj = context.lookup("MyJndi");
MyEJBHome home = MyEJBHome)PortableRemoteObject.narrow(obj,MyEJBHome.class);
MyEJB mybean = home.create();
int a = 0;
a= mybean.add(10,15);
wdContext.currentContextElement().setSum(a);
where MyEJB is my EJB name and MyJndi is my JNDI name
To connect to Oracle , you can write the usual Java code (given below) as a business methos of the ejb (similar to add() method in the example). And access it like mybean.<businessMethodName>().
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@Oracle_server_ip:Oracle port:SID of the Database","user_name","password");
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("your query");
Extracted from Re: Webdynpro and Oracle
http://help.sap.com/saphelp_webas630/helpdata/en/b0/6e62f30cbe9e44977c78dbdc7a6b27/frameset.htm
May be of use to understand the VA Conf /people/varadharajan.krishnasamy/blog/2007/02/27/configuring-jdbc-connector-service-to-perform-database-lookups
Regards
Ayyapparaj -
Not able to connect RAC database from client
Hi there
Recently I have configured RAC in test environment. version 11.2.0.1. OS Redhat 5.9. Everything seems to be fine except not able to connect rac database from client. Error is as under :
C:\Documents and Settings\pbl>sqlplus test1/test1@myrac
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Nov 17 14:29:06 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-12545: Connect failed because target host or object does not exist
Enter user-name:
myrac =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac-scan)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = racdb.testdb.com.bd)
Please give me your valuable suggestion to overcome the issue.
Regards
Jeweluser13134974 wrote:
ORA-12545: Connect failed because target host or object does not exist
This error means that the hostname or IP address used in the TNS connection string, failed to resolve or connect.
Your client is making two connections. The first connection is to the SCAN listener. It matches a db instance for your connection request based on service requested, available registered service handlers, load balancing, and so on. It then send a redirect to your client informing it of the handler for that service.
Your client then does a second connection to this service (a local RAC listener that will provide you with a connection to the local RAC instance). This is what seems to be failing in your case.
The SCAN listener's redirect uses the hostname of the server that the local listener is running on. Your client needs to resolve that hostname (of a RAC node) to an IP address. This likely fails.
You can add the RAC node hostnames to your client platforms hosts file. The appropriate action however would be to ensure that DNS is used for name resolution instead. -
ATG CIM: Not able to connect to database jdbc:oracle:thin
Hi All,
I am trying to setup a ATG environment on windows boxes. Below is the setup:
VM1) DC - Windows Domain Controller (Windows Server 2008)
VM2) javadb - Oracle 11g (Windows Server 2008)
VM3) javaweb - ATG 10.0.3 / WebLogic wlserver_10.3/ TomCat 7 (Windows Server 2008)
Installation / Setup Progress
* Oracle 11g installation successful. Sample DB successfully created.
* WebLogic installation successful. Base_Domain successfully created.
* Able to create successful connection to Oracle (javadb vm) from TomCat (javaweb vm) and query data
Error: When configuring CIM I keep on getting >> "Not able to connect to database jdbc:oracle:thin:@javadb:1521:SampleDB @ scott"+_
Corrective action already taken:
1) Disabled firewall on all boxes
2) Added path of JDBC driver (ojdbc6.jar) in Environment Variables
3) Tested Oracle 11g (javadb vm) connectivity both from Eclipse and Tomcat. Which is successful
4) Cleared all files under C:\ATG\ATG10.0.3\CIM\data to reset CIM
Please refer CIM details below:
===========================================
CIM DISPLAY START
===========================================
-------ENTER CONNECTION DETAILS-----------------------------------------------
enter [h]elp, [m]ain menu, [q]uit to exit
Production Core
Select Database Type
*[1] Oracle Thin
[2] MS SQL
[3] iNet MS SQL
[4] DB2
[5] My SQL
Select one > 1
Enter User Name [[system]] > scott
Enter Password [[**********]] > **********
Re-enter Password > **********
Enter Host Name [[javadb]] > javadb
Enter Port Number [[1521]] > 1521
Enter Database Name [[sampledb]] > SampleDB
Enter Database URL [[jdbc:oracle:thin:@javadb:1521:SampleDB]]
>
Enter Driver Path [[C:/Oracle/Middleware/wlserver_10.3/server/lib/ojdbc6.jar]]
Enter JNDI Name [[ATGProductionDS]] >
-------CONFIGURE DATASOURCE PRODUCTION CORE-----------------------------------
enter [h]elp, [m]ain menu, [q]uit to exit
[C] Connection Details - Done
*[T] Test Connection
[S] Create Schema
Import Initial Data
[D] Drop Schema
[O] Configure Another Datasource
> T
-------TEST DATASOURCE CONNECTION---------------------------------------------
enter [h]elp, [m]ain menu, [q]uit to exit
Production Core
>> Not able to connect to database jdbc:oracle:thin:@javadb:1521:SampleDB @ scott
===========================================
CIM DISPLAY END
===========================================
===========================================
CIM LOG START
===========================================
**** Warning Mon Jul 23 22:46:25 IST 2012 1343063785645 atg.cim.worker.status.StatusUpdateValidator Status id nonswitchingCore-DatasourceConnectionTemplateStep is unknown.
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator Not able to connect to database jdbc:oracle:thin:@javadb:1521:SampleDB : -1 java.lang.ArrayIndexOutOfBoundsException: -1
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at oracle.jdbc.driver.T4CTTIoauthenticate.setSessionFields(T4CTTIoauthenticate.java:948)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at oracle.jdbc.driver.T4CTTIoauthenticate.<init>(T4CTTIoauthenticate.java:225)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:358)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:538)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:228)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at java.sql.DriverManager.getConnection(DriverManager.java:582)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at java.sql.DriverManager.getConnection(DriverManager.java:185)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.service.jdbc.BasicDataSource.getDriverManagerConnection(BasicDataSource.java:526)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.service.jdbc.BasicDataSource.getDriverManagerConnection(BasicDataSource.java:588)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.service.jdbc.BasicDataSource.getConnection(BasicDataSource.java:475)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.service.jdbc.FakeXADataSource.getXAConnection(FakeXADataSource.java:671)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.service.jdbc.MonitoredDataSource.createResource(MonitoredDataSource.java:837)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.service.resourcepool.ResourcePool.populateSlot(ResourcePool.java:2064)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.service.resourcepool.ResourcePool.checkOut(ResourcePool.java:1332)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.service.jdbc.MonitoredDataSource.co(MonitoredDataSource.java:1792)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.service.jdbc.MonitoredDataSource.getConnection(MonitoredDataSource.java:1070)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.worker.databaseconfig.TestJdbcConnectionValidator.performTestConnection(TestJdbcConnectionValidator.java:319)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.worker.databaseconfig.TestJdbcConnectionValidator.validate(TestJdbcConnectionValidator.java:266)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.step.StepExecutor.executeValidations(StepExecutor.java:280)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.ui.text.TextDisplay.processStep(TextDisplay.java:338)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.ui.UIDispatchImpl.processStep(UIDispatchImpl.java:89)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.step.StepExecutor.processStep(StepExecutor.java:201)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.step.StepExecutor.processCurrentStep(StepExecutor.java:80)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.runner.Runner.run(Runner.java:152)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.command.types.LaunchTemplate.execute(LaunchTemplate.java:69)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.command.CommandExecutor.execute(CommandExecutor.java:128)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.command.CommandExecutor.executeCommands(CommandExecutor.java:156)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.step.StepExecutor.processStep(StepExecutor.java:129)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.step.StepExecutor.processCurrentStep(StepExecutor.java:80)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.runner.Runner.run(Runner.java:152)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.command.types.LaunchTemplate.execute(LaunchTemplate.java:69)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.command.CommandExecutor.execute(CommandExecutor.java:128)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.command.CommandExecutor.executeCommands(CommandExecutor.java:156)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.step.StepExecutor.processStep(StepExecutor.java:129)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.step.StepExecutor.processCurrentStep(StepExecutor.java:80)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.runner.Runner.run(Runner.java:152)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.command.types.LaunchTemplate.execute(LaunchTemplate.java:69)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.command.CommandExecutor.execute(CommandExecutor.java:128)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.command.CommandExecutor.executeCommands(CommandExecutor.java:156)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.step.StepExecutor.processStep(StepExecutor.java:129)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.step.StepExecutor.processCurrentStep(StepExecutor.java:80)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.runner.Runner.run(Runner.java:152)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.command.types.LaunchWizard.execute(LaunchWizard.java:73)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.command.CommandExecutor.execute(CommandExecutor.java:128)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.command.CommandExecutor.executeCommands(CommandExecutor.java:156)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.step.StepExecutor.processStep(StepExecutor.java:216)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.step.StepExecutor.processCurrentStep(StepExecutor.java:80)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.runner.Runner.run(Runner.java:152)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.flow.CimFlow.startupFlow(CimFlow.java:69)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.flow.CimFlowCreator.startDefaultCimFlow(CimFlowCreator.java:78)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.Launcher.startCimFlow(Launcher.java:168)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator at atg.cim.Launcher.main(Launcher.java:68)
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792213 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator
**** Error Mon Jul 23 22:46:32 IST 2012 1343063792218 atg.cim.worker.databaseconfig.TestJdbcConnectionValidator Error initializing connection from parameters. Test for jdbc connection failed
===========================================
CIM LOG END
===========================================
Any suggestion how to resolve this issue. Thanks in advance.
cheers,
Sandeep
Edited by: 948180 on Jul 23, 2012 11:29 PMHi,
Earlier my ojdbc6.jar path was not at the beginning of ClassPath. I have made necessary changes. Please refer below:
Environment Variables Settings on machine where CIM resides:
PATH = C:\Oracle\Middleware\wlserver_10.3\server\lib\ojdbc6.jar+;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Java\jre7\bin;C:\Program Files\Apache Software Foundation\Tomcat 7.0\bin;C:\Program Files\cvsnt;C:\Program Files\Java\jdk1.7.0\bin;C:\Program Files\Sun\JavaDB\bin;C:\Program Files\Sun\JavaDB\lib;;C:\ATG\ATG10.0.3\MySQL\win32\bin;C:\ATG\ATG10.0.3\home\bin\;C:\Oracle\Middleware\wlserver_10.3\server\lib\;
Note: I have verified by ojdbc6.jar path.
Below are the precise steps I executed after updating my environment variables and restarting CMD.
===========================================
CIM DISPLAY START
===========================================
C:\ATG\ATG10.0.3\home\bin>cim.bat
Nucleus running
_ | () |
__ _ | |_ __ _ ----
/ _` | | __| / _` |
| (_| | | |_ | (_| |
\__,_| \__| \__, |
|___/
Configuration Installation Manager
=======CIM MAIN MENU============================================================
enter [h]elp, [q]uit to exit
Choose the task you want to perform:
*[1] Database Configuration
[2] Server Instance Configuration
[3] Application Assembly & Deployment
[P] Product Selection - Done (ATG B2C Commerce)
[A] Select Application Server - Done (Weblogic Online)
[C] Custom CIM Plugin Launcher
> 1
-------CALCULATE DATASOURCE DEPENDENCIES----------------------------------------
enter [h]elp, [m]ain menu, [q]uit to exit
Calculating Datasource Dependencies. View log file at C:/ATG/ATG10.0.3/home/
../CIM/log/cim.log
|. . |
|. . |
-------SELECT A DATASOURCE TO CONFIGURE-----------------------------------------
enter [h]elp, [m]ain menu, [q]uit to exit
*[P] Publishing
[C] Production Core
[D] Done
> c
-------CONFIGURE DATASOURCE PRODUCTION CORE-------------------------------------
enter [h]elp, [m]ain menu, [q]uit to exit
[C] Connection Details - Done
*[T] Test Connection
[S] Create Schema
Import Initial Data
[D] Drop Schema
[O] Configure Another Datasource
> t
-------TEST DATASOURCE CONNECTION-----------------------------------------------
enter [h]elp, [m]ain menu, [q]uit to exit
Production Core
>> Not able to connect to database jdbc:oracle:thin:@javadb:1521:SampleDB @
scott
*[E] Edit Connection Details
[R] Redo
[D] Done
> e
-------RE-USE VALUES FROM PREVIOUS DATASOURCE-----------------------------------
enter [h]elp, [m]ain menu, [q]uit to exit
Production Core
Base on previous database details:
[1] system@jdbc:oracle:thin:@javadb:1521:sampledb
[2] scott@jdbc:oracle:thin:@javadb:1521:SampleDB
*[3] None/Use Existing
Select one > 2
-------ENTER CONNECTION DETAILS-------------------------------------------------
enter [h]elp, [m]ain menu, [q]uit to exit
Production Core
Select Database Type
*[1] Oracle Thin
[2] MS SQL
[3] iNet MS SQL
[4] DB2
[5] My SQL
Select one > 1
Enter User Name [[scott]] > scott
Enter Password [[**********]] > **********
Re-enter Password > **********
Enter Host Name [[javadb]] > javadb
Enter Port Number [[1521]] > 1521
Enter Database Name [[SampleDB]] > SampleDB
Enter Database URL [[jdbc:oracle:thin:@javadb:1521:SampleDB]]
> jdbc:oracle:thin:@javadb:1521:SampleDB
Enter Driver Path [[C:/Oracle/Middleware/wlserver_10.3/server/lib/ojdbc6.jar]
] > C:\Oracle\Middleware\wlserver_10.3\server\lib\ojdbc6.jar
Enter JNDI Name [[ATGProductionDS]] > ATGProductionDS
-------CONFIGURE DATASOURCE PRODUCTION CORE-------------------------------------
enter [h]elp, [m]ain menu, [q]uit to exit
[C] Connection Details - Done
*[T] Test Connection
[S] Create Schema
[I] Import Initial Data
[D] Drop Schema
[O] Configure Another Datasource
> T
-------TEST DATASOURCE CONNECTION-----------------------------------------------
enter [h]elp, [m]ain menu, [q]uit to exit
Production Core
>> Not able to connect to database jdbc:oracle:thin:@javadb:1521:SampleDB @
scott
*[E] Edit Connection Details
[R] Redo
[D] Done
>
===========================================
CIM DISPLAY END
===========================================
Don't understand what could possibly be going wrong.
Cheers,
Sandeep
Edited by: 948180 on Jul 24, 2012 12:23 AM -
Problem in connecting to database using oracle jdbc thin driver
hi
i am trying to connect to a database using oracle thin driver.
i am getting following error:
java.sql.sqlexception:Io exception: the network adapter could not establish the connection
Io exception: the network adapter could not establish the connection
the connection string has the property of using a dedicated server
for this reason i have put USE_DEDICATED_SERVER=ON in sqlnet.ora file...
we did not face this problem while connecting to other databases which do not have the property of dedicated server in their connection string in tnsnames.ora file.
please suggest a solution for this.
thanks and regards,
asifIf you are using the thin driver, sqlnet.ora does not come into play. None of Oracle networking does. That is one of the great things about using the thin driver, no need to have the client installed.
That error is due to incorrect connection info you are supplying or the machine you are connection from can't ping the machine it is trying to connect to. -
I have problems to connect with Database Server in MDM SP5
Hi,
I am upgrading to SP and get problems to connect to the database server. I am able to start and stop the MDM server, but if I tru to create a new repsoitory or unarchive a repository I get this errormessage. "Unable to connect with Datase Server". In ealier versions og MDM i did not give any username or password whwn I made a new repositirt. Do you need to that no?
I see in the mds.ini file that there is defined a user "Sql Server DBA Username=master ". I sthis the user we shall use or is there another user?
Regars John-Kjell HosetHi John,
I too faced the same problem and get rid of it by installing
SQL Server 2000 Driver for JDBC Service Pack 3
which you can download from
http://www.microsoft.com/downloads/details.aspx?FamilyId=07287B11-0502-461A-B138-2AA54BFDC03A&displaylang=en
and i installed Microsoft SQL Server 2000 Desktop Engine (MSDE 2000) Release A
which you can download from
http://www.microsoft.com/downloads/details.aspx?FamilyID=413744D1-A0BC-479F-BAFA-E4B278EB9147&displaylang=en
Install with setup SAPWD="YourPassword"
I connected MDM Console wiht DBMS with Login credentials as
UserName sa
Password YourPassword
Hope this help to solve your problem.
Regards,
Santosh. -
Problem in connectivity with database
Hi anyone,
I have installed Oracle-8i database and Developer-6i in Windows-95. I am facing the following problem in connectivity:
In the connection dialogue box, I enter user/passwd as scott/tiger and host string as odbc:polite. I am getting an error message "OCA-30002 ubofscr function not supported".
In schema builder, table1 is the default name of a new table created. On renaming the table name, I am getting the error message:
"OBE-15467: Name already in use. Please choose another name"
whereas no such table name exists in the database.
If table1 is accepted as the new table name, I am encountering another error message:
"OBE-15361: Error in creating primary/unique constraint for table1. [POL-5228] message file is not loaded".Please use CODE tags when posting code. You are losing some of the plus signs of string concatenation to the forum's formatting beast.
Preferred solution: Don't use Access as a database. The JDBC-ODBC bridge is always troublesome.
If you must use Access...
Well the message is easy enough to understand: it can't find the database db1.mdb.
You say you put db1.mdb in the web directory. Obviously the computer is not looking there (silly computer for not looking where you put the file)
So it is up to you to be smart and tell the computer exactly where to go.
Using application.getRealPath("/db1.mdb") in place of "db1.mdb" will probably work in a JSP.
String databaseURL = accessDBURLPrefix + application.getRealPath("/db1.mdb") + accessDBURLSuffix;cheers,
evnafets -
Please help, probleme de connection to database oracle and java
Ihave a problem to make connection to database Oracle when I use a simple code of java
======================
import java.sql.*;
public class Exemple1 {
public static void main (String args[]) {
Statement stmt = null;
Connection con=null;
try {
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
con = DriverManager.getConnection ("jdbc:oracle:thin:@localhost:1521:GB","scott","tiger");
catch (Exception e) { System.out.println(e); }
=================
I have :
* Linux (Fedora core3).
* Oracle 10g
My var. environ.:
* ORACLE_HOME=/u01/app/oracle/product/10.1.0/Db_1
* PATH=$ORACLE_HOME/bin
* CLASSPATH=$ORACLE_HOME/jdbc/lib/ojdbc14.jar
the error is:
Exception in thread "main" java.lang.NoClassDefFoundError: while resolving class: oracle.sql.CharacterSet
at java.lang.VMClassLoader.resolveClass(java.lang.Class) (/usr/lib/libgcj.so.5.0.0)
at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.5.0.0)
at JvResolvePoolEntry(java.lang.Class, int) (/usr/lib/libgcj.so.5.0.0)
at oracle.jdbc.driver.DBConversion.DBConversion(short, short, short) (Unknown Source)
at oracle.jdbc.driver.T4CConnection.connect(java.lang.String, java.util.Properties) (Unknown Source)
at oracle.jdbc.driver.T4CConnection.logon() (Unknown Source)
I don't know what's heppen exactly?If
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
is replaced
with
Class.forName("oracle.jdbc.driver.OracleDriver");does the java.lang.NoClassDefFoundError: while resolving class: oracle.sql.CharacterSet get generated? -
How to connect the database (JDBC) using service name rather than SID
How should we make the connection to the database using service name. Initially, we are using the SID to make the database connection, with following setting in the data-source.xml in OC4J using ABCDB as the SID.
<data-sources>
<data-source
class="com.evermind.sql.DriverManagerDataSource"
name="jdbc/ABCDB"
location="jdbc/ABCDB"
pooled-location="jdbc/OracleDSPooled"
xa-location="jdbc/xa/OracleDSXA"
connection-driver="oracle.jdbc.driver.OracleDriver"
username="ABC"
password="ABC"
url="jdbc:oracle:thin:@191.1.4.126:1521:ABCDB"
/>
</data-sources>
It work, but now we need to make the connection using this service name ABCSERVICE, but it doesn't work in the OC4J (JDBC). May I know how should we handle this connection?
Thanks and Regards,
PangFinally, I got the solution to make the database connection using service name, with putting the tnsname setting in URL portion.
url="jdbc:oracle:thin:@(description=(address=(host=191.1.4.126)(protocol=tcp)(port=1521))(connect_data=(SERVICE_NAME = ABCSERVICE)))"
And now, it is working fine.
Regards,
Pang -
Problem with connection to database when PC is connected to network
Hi,
I can't connect to my database locally when my PC (with database) is connected to network. When I try run enterpsise manager I see that Database Instance is down, Agent Connection to Instance is down with error ORA-12505 and Listener is up. When I try connect by sqlplus I see errors :ORA-01034 :Oracle not avilable and ORA-27101:shared memory realm does not exists. When I was installing database my PC was not connected to network.
When I disconnect my PC from network, after few minutes I can run enterprise manager, can connect to Oracle and everything is OK.Moreover after that I can connect PC to network and still everything is OK.
What is the reason of this problem and what can I do that I could always connect to Oracle, whenever my PC is connected or disconeccted to network?
Thanks
Jarekuser9290950 wrote:
Hi,
As I wrote in my previous post when I was installing database my PC was not connected to network.
And as was already replied.
My guess is that you installed on a network with dynamic IP and now you have a different IP address or none. If this is the case it is a clear indication that you didn't waste any time reading the installation documentation before you installed. This might be a great time to do so.Now, go back and read the installation guide. Pay particular attention to the section titled "Database Network Topics", especially the part about loopback adapters.
Servers process don't work very well with DHCP assigned addresses, causing the clients to have to guess where the server is.
version of Windows- Windows XP ( I test there my java program which connects to Oracle),
version of Oracle - 10g Release 2,
Oracle database service is running,
IP address which I gets is dynamic. After getting this addres I can't connect to database.
My TNSNAMES.ORA file:
SMSINFO =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = SMSINFO)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
Thanks
Jarek -
Problem Test Connection with Database by Oracle9i JDeveloper
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
void oracle.jdbc.dbaccess.DBError.throwSqlException(java.lang.String, java.lang.String, int)
DBError.java:187
void oracle.jdbc.dbaccess.DBError.throwSqlException(int, java.lang.Object)
DBError.java:229
void oracle.jdbc.dbaccess.DBError.throwSqlException(java.io.IOException)
DBError.java:342
void oracle.jdbc.driver.OracleConnection.<init>(oracle.jdbc.dbaccess.DBAccess, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
OracleConnection.java:415
java.sql.Connection oracle.jdbc.driver.OracleDriver.getConnectionInstance(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
OracleDriver.java:485
java.sql.Connection oracle.jdbc.driver.OracleDriver.connect(java.lang.String, java.util.Properties)
OracleDriver.java:337
java.sql.Connection java.sql.DriverManager.getConnection(java.lang.String, java.util.Properties, java.lang.ClassLoader)
DriverManager.java:517
java.sql.Connection java.sql.DriverManager.getConnection(java.lang.String, java.util.Properties)
DriverManager.java:146
java.sql.Connection oracle.jdeveloper.cm.JdbcConnectionWrapper.createConnectionImpl(java.lang.String, java.lang.String, java.util.Properties)
JdbcConnectionWrapper.java:146
void oracle.jdeveloper.cm.JdbcConnectionWrapper.createConnection(oracle.jdeveloper.cm.ConnectionDescriptor)
JdbcConnectionWrapper.java:110
java.sql.Connection oracle.jdeveloper.cm.JdbcConnectionWrapper.getJdbcConnection()
JdbcConnectionWrapper.java:175
java.lang.Object oracle.jdeveloper.cm.JdbcConnectionWrapper.getPresentation(java.lang.String)
JdbcConnectionWrapper.java:162
void oracle.jdevimpl.cm.dt.browser.jdbc.JdbcBrowser.openConnectionBrowser(oracle.jdeveloper.cm.dt.ConnectionBrowsable)
JdbcBrowser.java:133
java.lang.Object oracle.jdeveloper.cm.dt.ConnectionNode$NodeOpen.doWork()
ConnectionNode.java:202
void oracle.jdeveloper.cm.dt.ProgressRunnable.run()
ProgressRunnable.java:193
void oracle.ide.dialogs.ProgressBar.run()
ProgressBar.java:527
void java.lang.Thread.run()
Thread.java:484Is the TNS Listener running on the target machine in which the database is running? Is the host, port, and SID correct (note that SID is different than Service Name)
Rob -
Applet security problems while connecting with database
i hav problem in the japplet connecting with sql database
it gives security access denied error while running program as my driver is jdbc:odbc:bridge driver
so for resolving this error how can i turn off security of applet and also which security permission to be change?
plz replybaftos wrote:
Maybe I should question the need to access a local database on the client PC.
But anyway, the normal way to obtain security clearance is to use a signed applet.
Another possibility is to grant the applet all permissions by modifying the security policy file of each client to grant your applet 'all permissions'. Note that in this case you must have access to each and every client PC or ask them to do so before running the applet.Database access at client's machine is ridiculous. I doubt this is what OP wants.
@OP: request you to post the original security issue and the environment details.
Thanks,
Mrityunjoy -
Not able to connect RAC database
hi all
i am using oracle 10.2 RAC on suse enterprse linux server 10.1
from node 1 i am able to connect database but from node 2 i m not able to connect..
when try to connect system/test.. its hang and didnt dispaly any error messg..
even yesterday i was able to connect on node2 but at that i was not able to execute query like..select * from all_users...its just hang..but i was able to execute select username from all_users... and it was working wothour any error..thanx
output of crs_stat -t
Name Type Target State Host
ora.rubikon.db application ONLINE ONLINE rubikon121
ora....ikon.cs application ONLINE ONLINE rubikon120
ora....on1.srv application ONLINE ONLINE rubikon120
ora....on2.srv application ONLINE ONLINE rubikon121
ora....n1.inst application ONLINE ONLINE rubikon120
ora....n2.inst application ONLINE ONLINE rubikon121
ora....SM1.asm application ONLINE ONLINE rubikon120
ora....20.lsnr application ONLINE ONLINE rubikon120
ora....120.gsd application ONLINE ONLINE rubikon120
ora....120.ons application ONLINE OFFLINE
ora....120.vip application ONLINE ONLINE rubikon120
ora....SM2.asm application ONLINE ONLINE rubikon121
ora....21.lsnr application ONLINE ONLINE rubikon121
ora....121.gsd application ONLINE ONLINE rubikon121
ora....121.ons application OFFLINE OFFLINE
ora....121.vip application ONLINE ONLINE rubikon121
output of alter.log file
Errors in file /opt/app/oracle/admin/rubikon/bdump/rubikon2_smon_12332.trc:
ORA-00604: error occurred at recursive SQL level 2
ORA-04021: timeout occurred while waiting to lock object
Mon Sep 20 12:53:12 2010
Errors in file /opt/app/oracle/admin/rubikon/bdump/rubikon2_reco_12334.trc:
ORA-00604: error occurred at recursive SQL level 3
ORA-04021: timeout occurred while waiting to lock object
Mon Sep 20 13:05:40 2010
Errors in file /opt/app/oracle/admin/rubikon/bdump/rubikon2_smon_12332.trc:
ORA-00604: error occurred at recursive SQL level 2
ORA-04021: timeout occurred while waiting to lock object
Mon Sep 20 13:20:52 2010
Errors in file /opt/app/oracle/admin/rubikon/bdump/rubikon2_smon_12332.trc:
ORA-00604: error occurred at recursive SQL level 2
ORA-04021: timeout occurred while waiting to lock object
Mon Sep 20 13:36:04 2010
Errors in file /opt/app/oracle/admin/rubikon/bdump/rubikon2_smon_12332.trc:
ORA-00604: error occurred at recursive SQL level 2
ORA-04021: timeout occurred while waiting to lock object
Mon Sep 20 13:38:12 2010
Errors in file /opt/app/oracle/admin/rubikon/bdump/rubikon2_reco_12334.trc:
ORA-00604: error occurred at recursive SQL level 3
ORA-04021: timeout occurred while waiting to lock object
Mon Sep 20 13:51:16 2010
Errors in file /opt/app/oracle/admin/rubikon/bdump/rubikon2_smon_12332.trc:
ORA-00604: error occurred at recursive SQL level 2
ORA-04021: timeout occurred while waiting to lock object
Mon Sep 20 14:06:28 2010
Errors in file /opt/app/oracle/admin/rubikon/bdump/rubikon2_smon_12332.trc:
ORA-00604: error occurred at recursive SQL level 2
ORA-04021: timeout occurred while waiting to lock object
Mon Sep 20 14:21:40 2010
Errors in file /opt/app/oracle/admin/rubikon/bdump/rubikon2_smon_12332.trc:
ORA-00604: error occurred at recursive SQL level 2
ORA-04021: timeout occurred while waiting to lock object
Mon Sep 20 14:23:12 2010
Errors in file /opt/app/oracle/admin/rubikon/bdump/rubikon2_reco_12334.trc:
ORA-00604: error occurred at recursive SQL level 3
ORA-04021: timeout occurred while waiting to lock object
Mon Sep 20 14:36:52 2010
Errors in file /opt/app/oracle/admin/rubikon/bdump/rubikon2_smon_12332.trc:
ORA-00604: error occurred at recursive SQL level 2
ORA-04021: timeout occurred while waiting to lock object
Mon Sep 20 14:52:04 2010
Errors in file /opt/app/oracle/admin/rubikon/bdump/rubikon2_smon_12332.trc:
ORA-00604: error occurred at recursive SQL level 2
ORA-04021: timeout occurred while waiting to lock object
Mon Sep 20 15:07:16 2010
Errors in file /opt/app/oracle/admin/rubikon/bdump/rubikon2_smon_12332.trc:
ORA-00604: error occurred at recursive SQL level 2
ORA-04021: timeout occurred while waiting to lock object
Mon Sep 20 15:08:12 2010
Errors in file /opt/app/oracle/admin/rubikon/bdump/rubikon2_reco_12334.trc:
ORA-00604: error occurred at recursive SQL level 3
ORA-04021: timeout occurred while waiting to lock object
Mon Sep 20 15:22:28 2010
Errors in file /opt/app/oracle/admin/rubikon/bdump/rubikon2_smon_12332.trc:
ORA-00604: error occurred at recursive SQL level 2
ORA-04021: timeout occurred while waiting to lock object
Mon Sep 20 15:37:40 2010
Errors in file /opt/app/oracle/admin/rubikon/bdump/rubikon2_smon_12332.trc:
ORA-00604: error occurred at recursive SQL level 2
ORA-04021: timeout occurred while waiting to lock object
Mon Sep 20 15:52:52 2010
Errors in file /opt/app/oracle/admin/rubikon/bdump/rubikon2_smon_12332.trc:
ORA-00604: error occurred at recursive SQL level 2
ORA-04021: timeout occurred while waiting to lock object
Mon Sep 20 15:53:12 2010
Errors in file /opt/app/oracle/admin/rubikon/bdump/rubikon2_reco_12334.trc:
ORA-00604: error occurred at recursive SQL level 3
ORA-04021: timeout occurred while waiting to lock object -
Problem in connect to database?
hello experts,
when i am trying to connect with sqlplus with my user following error is showing:
ora 01034: oracle not available
ora 27101shared memory realm SGA does not exist.
suddendly this error is showing. i just connect successfully before 10 minuts.
please help me how to resolve it and what is the problem.
but when i can connect to sysdba i hgiven message:
connected to an ideal instance.
thanks
yashsqlplus / as sysdba
startup ;Also how Many Instance you have ?
Do you have one more than once on same server ?
How many Memory (Ram) Server have ? -
Problem in connecting to database..
Hi all,
I have deployed a application onto Oracle App Server. In that application i am using sql loader to load file. But it is throwing me:
ns main err code: 12560
TNS-12560: TNS:protocol adapter error
ns secondary err code: 0
nt main err code: 530
TNS-00530: Protocol adapter error
nt secondary err code: 38
nt OS err code: 0
When i checked then what oracle app server does that it change the ORACLE_HOME while deploying application and after that if i run the sql loader then it try to search the SID in new environment set and that why it throws error.
I tried to set the environment variable explicitly but still it throws me the same error.
Pls help me to solve this.
ThanksIf ur IAS is in windows, create bat file which will set the ORACLE_HOME, TNS_ADMIN and then call sql loader else create a shell script which sets the above and call the shell script
Rajesh Alex
Maybe you are looking for
-
Tape Device is access in SQL 2005
Hello everybody, I have problem that, i can access the tape drive using NTBACKUP for database backup. But when i trying to open the Media Contents (in SQL server 2005--> when i right click on R3DUMP0) ) then generate the error message cannot open
-
Firefox freezes after page competes opening
When I open Firefox 5 on my new HP dv6t Quad core laptop (Windows 7, 6gm memory), it will open normally, but when the home page finishes opening, it freezes and will not do anything. I can't even X out of it. I have to start Task Manager and close it
-
Color difference between LCD monitor and iMac monitor?
So I recently purchased a 27" iMac (purchased it last week) and have hooked up my previous monitor, a 24" Apple LCD cinema display (aluminum enclosure) to have a dual-monitor setup. Both are using Apple's stock color profiles, but the LCD cinema disp
-
Is that possible to remove that "," comma for year.
Dear All, Please help me how to remove "," comma for year.in attached analyzer report screen shot.(the year is the formula variable). Regards, shan
-
Hi, I successfully upgraded the Apex instance from 3.2 to 4.0.2.00.07 - I also applied the patch. All existing applications worked as before. However, when I tried to copy an existing application (with old theme 20 plus some customized templates) and