Cannot connect to database using JDBC
Hello!
I am trying to connect to my local database using this script:
import java.sql.*;
public class test{
public static void main (String[] args){
try
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","scott","tiger");
Statement StmtPersoane = conn.createStatement();
ResultSet CrsPersoane =StmtPersoane.executeQuery("select p.* from personal p");
int jMarca = 0;
while(CrsPersoane.next()){
jMarca = CrsPersoane.getInt("marca");
System.out.println(jMarca);
CrsPersoane.close();
StmtPersoane.close();
conn.close();
catch(SQLException e)
e.printStackTrace();
}When compiling i am getting this error: Error(7,58): cannot access class oracle.jdbc.driver.OracleDriver; file oracle\jdbc\driver\OracleDriver.class not found
I have set a CLASSPATH enviroment variable with value : D:\oracle10g\product\10.1.0\Db_1\jdbc\lib\ojdbc14.jar
Please provide some hints. Thanks in advace !
Problem solved with the connection, but now i'm getting another error when i am trying to parse an error. Here is the code a little bit modified:
import java.sql.*;
import java.text.*;
import java.text.ParseException;
import java.util.*;
public class test{
public static void main (String[] args){
try
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","scott","tiger");
Statement StmtPersoane;
StmtPersoane = conn.createStatement();
ResultSet CrsPersoane =StmtPersoane.executeQuery("select marca from personal");
int jMarca;
jMarca = 0;
java.util.Date dataJava = new java.text.SimpleDateFormat("dd/mm/yyyy").parse("04/10/2006");
java.sql.Date dataSql = new java.sql.Date(dataJava.getTime());
System.out.println("Data: "+dataSql);
System.out.println("Angajatii sunt:");
while(CrsPersoane.next()){
jMarca = CrsPersoane.getInt("marca");
System.out.println(jMarca);
CrsPersoane.close();
StmtPersoane.close();
conn.close();
catch(SQLException e)
e.printStackTrace();
}The error:
Error(24,81): unreported exception: java.text.ParseException; must be caught or declared to be thrown
Any ideas ?
Similar Messages
-
Linux non-oracle user cannot connect to database using TNS
LS,
I've installed Oracle 11gR2 on a linux box (name="ilmserver") running CentOS 5.4 (based on RHEL).
Created user "oracle" and groups "oinstall" and "dba".
Installation under user "oracle" went fine, and logged in as "oracle" user I can - naturally - access the database easily (via SQL+, or using SQL Developer it works via Basic, TNS, and Advanced (=jdbc)).
I have a second user on the linux box called "informatica", on which I have installed Informatica ILM 5.3.2, which uses the Oracle database as its repository.
The "informatica" user has been granted the same groups as the "oracle" user, i.e. "oinstall" and "dba".
I have severe problems accessing the Oracle database as the "informatica" user.
Using SQL Developer I can access the database using the "Basic" method, but not TNS.
But guess what: for ILM to work to its fullest extent I need to implement an environment variable called TNS_ADMIN.
I have implemented it, it sits in bash_profile and as such works fine:
+[informatica@ilmserver ~]$ echo $TNS_ADMIN+
+/home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin+
But as for being able to access it:
+[informatica@ilmserver ~]$ cat $TNS_ADMIN/tnsnames.ora+
cat: /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora: Permission denied
Somehow I thought that granting "oinstall" group to "informatica" user would take care of this. Obviously it doesn't. I also granted "dba" group to "informatica", to no avail apparently.
This is then - I assume - also the reason that when I want to connect using TNS from within SQL Developer, the dropdown list is empty (because it's not able to read TNSNAMES.ORA).
Does anyone know how to resolve this issue?
Thanks heaps!
Cheers, PatrickJust ran all+ commands for oracle user:
*[oracle@ilmserver ~]$ id*
uid=502(oracle) gid=504(oinstall) groups=503(dba),504(oinstall),505(asmdba),506(asmadmin) context=user_u:system_r:unconfined_t
*[oracle@ilmserver ~]$ env | sort*
COLORTERM=gnome-terminal
CVS_RSH=ssh
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-m8BEsoxTeM,guid=7c9a73a7390af7742e606e004e571934
DESKTOP_SESSION=default
DESKTOP_STARTUP_ID=
DISPLAY=:0.0
G_BROKEN_FILENAMES=1
GDMSESSION=default
GDM_XSERVER_LOCATION=local
GNOME_DESKTOP_SESSION_ID=Default
GNOME_KEYRING_SOCKET=/tmp/keyring-TQlAPU/socket
GTK_RC_FILES=/etc/gtk/gtkrc:/home/oracle/.gtkrc-1.2-gnome2
HISTSIZE=1000
HOME=/home/oracle
HOSTNAME=ilmserver
INPUTRC=/etc/inputrc
JAVA_HOME=/usr/java/jdk1.7.0
LANG=en_US.UTF-8
LESSOPEN=|/usr/bin/lesspipe.sh %s
LOGNAME=oracle
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
MAIL=/var/spool/mail/oracle
ORACLE_BASE=/home/oracle/app/oracle
ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_1
ORACLE_HOSTNAME=ilmserver
ORACLE_SID=orcl
PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/oracle/bin:/usr/java/jdk1.7.0/bin:/usr/sbin:/sbin:/home/oracle/app/oracle/product/11.2.0/dbhome_1/bin
PWD=/home/oracle
SESSION_MANAGER=local/ilmserver:/tmp/.ICE-unix/14477
SHELL=/bin/bash
SHLVL=2
SSH_AGENT_PID=14513
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SSH_AUTH_SOCK=/tmp/ssh-INwup14477/agent.14477
TERM=xterm
TNS_ADMIN=/home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin
USERNAME=oracle
USER=oracle
_=/usr/bin/env
WINDOWID=24117329
XAUTHORITY=/tmp/.gdm9ITN0V
XMODIFIERS=@im=none
*[oracle@ilmserver ~]$ ls -l /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora*
-rw-r----- 1 oracle oinstall 879 Aug 24 21:39 /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
*[oracle@ilmserver ~]$ ls -ld /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/*
drwxr-xr-x 3 oracle oinstall 4096 Aug 24 21:39 /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/
*[oracle@ilmserver ~]$ ls -ld /home/oracle/app/oracle/product/11.2.0/dbhome_1/*
drwxr-xr-x 74 oracle oinstall 4096 Aug 23 19:00 /home/oracle/app/oracle/product/11.2.0/dbhome_1/
*[oracle@ilmserver ~]$ ls -ld /home/oracle/app/oracle/product/11.2.0/*
drwxr-xr-x 3 oracle oinstall 4096 Aug 23 18:21 /home/oracle/app/oracle/product/11.2.0/
[*oracle@ilmserver ~]$ ls -ld /home/oracle/app/oracle/product/*
drwxr-xr-x 3 oracle oinstall 4096 Aug 23 18:21 /home/oracle/app/oracle/product/
*[oracle@ilmserver ~]$ ls -ld /home/oracle/app/oracle/*
drwxr-xr-x 10 oracle oinstall 4096 Aug 24 17:29 /home/oracle/app/oracle/
*[oracle@ilmserver ~]$ ls -ld /home/oracle/app/*
drwxr-xr-x 4 oracle oinstall 4096 Aug 23 18:21 /home/oracle/app/
*[oracle@ilmserver ~]$ ls -ld /home/oracle/*
drwx------ 22 oracle oinstall 4096 Aug 25 20:55 /home/oracle/
Naturally the "oracle" user has full access to its own directories.
A thought just occurred to me. I assume that theoretically it's possible to grant read privilige to informatica user on all these directories... would that do the trick?
But even if so, makes me wonder whether that is "best practice".
Also, I cannot imagine I'm the first person to encounter this scenario, and therefore there must be some standard approach to enable this.
Any suggestions/thoughts?
As for the TNSNAMES.ORA suggestion, I guess that is possible. Makes administration of TNSNAMES a bit more cumbersome though, as in, 2 files to maintain... risk of getting out of sync when making 'quick and dirty' changes without thinking things through too much (which shouldn't happen... but sometimes does anyway).
I'd prefer a solution where "informatica" has genuine access to TNSNAMES.ORA.
Thanks, Patrick
ps the bold bits with env.var LS_COLORS are unintentional, but don't know how to turn that off -
Cannot connect to Database using JavaWebServer
Hello,
I am trying to connect to the database using the javawebserver2.0
but when executed i get the following exception
can any please tell when what cud be the possible problem
Exception is:
500 Internal Server Error
The servlet named TxValidateUser at the requested URL
http://nt17:6060/servlet/TxValidateUser;$sessionid$JWA24MAAAAAAFQDEYB3AAAA
reported this exception: access denied (java.net.SocketPermission 192.100.192.122:1521 connect,resolve). Please report this to the administrator of the web server.
java.security.AccessControlException: access denied (java.net.SocketPermission 192.100.192.122:1521 connect,resolve) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:267) at java.security.AccessController.checkPermission(AccessController.java:394) at java.lang.SecurityManager.checkPermission(SecurityManager.java:540) at java.lang.SecurityManager.checkConnect(SecurityManager.java:1039) at java.net.Socket.(Socket.java:257) at java.net.Socket.(Socket.java:95) at oracle.net.nt.TcpNTAdapter.connect(Unknown Source) at oracle.net.nt.ConnOption.connect(Unknown Source) at oracle.net.nt.ConnStrategy.execute(Unknown Source) at oracle.net.resolver.AddrResolution.resolveAndExecute(Unknown Source) at oracle.net.ns.NSProtocol.establishConnection(Unknown Source) at oracle.net.ns.NSProtocol.connect(Unknown Source) at oracle.jdbc.ttc7.TTC7Protocol.connect(TTC7Protocol.java:1213) at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:209) at oracle.jdbc.driver.OracleConnection.(OracleConnection.java:249) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:172) at TxValidateUser.service(TxValidateUser.java:201) at javax.servlet.http.HttpServlet.service(HttpServlet.java:840) at com.sun.server.ServletState.callService(ServletState.java:226) at com.sun.server.ServletManager.callServletService(ServletManager.java:936) at com.sun.server.http.servlet.InvokerServlet.service(InvokerServlet.java:137) at javax.servlet.http.HttpServlet.service(HttpServlet.java:840) at com.sun.server.ServletState.callService(ServletState.java:226) at com.sun.server.ServletManager.callServletService(ServletManager.java:936) at com.sun.server.ProcessingState.invokeTargetServlet(ProcessingState.java:423) at com.sun.server.http.HttpProcessingState.execute(HttpProcessingState.java:79) at com.sun.server.http.stages.Runner.process(Runner.java:79) at com.sun.server.ProcessingSupport.process(ProcessingSupport.java:294) at com.sun.server.Service.process(Service.java:204) at com.sun.server.http.HttpServiceHandler.handleRequest(HttpServiceHandler.java:374) at com.sun.server.http.HttpServiceHandler.handleRequest(HttpServiceHandler.java:166) at com.sun.server.HandlerThread.run(HandlerThread.java:162)
Thanks
ROhanPlease reply sumone its urgent
regards
rohan -
Cannot connect to database using Oracle Forms 10g
hi,
I had installed Oracle 10g database and Oracle Forms 10g on Windows Vista Home Basic. However, I was unable to connect to
the database in Oracle Form using scott/scott for database "orcl", with the following error message:
ORA-00604: error occured at recursive SQL level 1
ORA-01009: missing mandatory parameter
However, I could access to the database using this set of username and password. Am I missing something? Thanks.Hi,
After a successful installation of forms 10g in vista, I'm about to run OPatch Universal Installer for the patch 7047034
in order to fix the form bugs. However, I cannot run the command "opatch apply C:\oracle_form\Patch26_Rel_10105\7047034"
with the error "The Oracle Home c:\devsuitehome_1 is not registered with the Central Inventory.". Then I try to create a
oraInst.loc file, but not much change still. The situation is that oracle 10g is installed before oracle developer suite
10g, and when I try to set oracle_home to oracle 10g's path ("C:\oracle\product\10.2.0\db_1") and run "opatch lsinventory",
it returns the correct result; when oracle developer suite 10g's path ("c:\devsuitehome_1") is set as the oracle_home,
the same command would return a different result as "LsInventory: OPatch Exception while accessing O2O".
I've verified through Oracle Universal Installer that the Central Inventory has included both as oracle_home (oracle 10g
and oracle developer suite 10g). I'm very confused now, though it seems that the problem could be solved by registering the
Central Inventory with oraacle developer suite 10g's path. Thanks. -
Cannot connect to database using the Upgrade Simulation Tool
I have installed the Upgrade Simulation Tool on my system and when I try to run the tool my system works in the for awhile in the background and creates the _Simulation mdf and ldf files and a .bck file. After 3 or 4 minutes it gives me an error "Cannot connect to the database".
It looks to me like it is connecting to the database because it is creating the files in the SQL Data folder. I have tried to run it on several databases and get the same results.
Thank you, JeffHi,
You may not have the ability to upgrade it directly.
He does have the ability.
When downloading Pl 42, it is cleary marked as "Upgrader", which means it can be used for upgrade (in this case simulation) from a lower version than 2007A
Patchlevel which are marked as "patch" are suitable only for updating the PL within the very same version of SAP Business One.
This tool should run under 2007 system I believe.
The Upgrade Simulation tool was designed in orderto test an upgrade, therefore it can run at a machine where 2005 version is installed. Technically speaking it creates a second SBO-common, which can be used only with the special designed (read only) client of the tool.
Jeff, you should check access rights of your SQL Data folder.Maybe grant user "Everyone" modifying rights to that folder. In addition you could try to detach a DB and move the related *.mdf and *.ldf to another folder where no access denied rights were applied.
If using MSSQL 2005 create via ODBC a Native Client connection to the Server, although you might just working locally only.
Regards
Mario -
Cannot connect to database using SQL*Plus
Hi, I have Oracle 10g XE installed in my labtop and I cannot connect using SQL*Plus.
I can connect using the broser User Interface though, which I was able to do after doing the following procedure to change the password of the sys account:
- open a command prompt
- - type sqlplus
- On the “Enter user-name” line, type /as sysdba
- On the SQL> prompt, type alter user sys identified by NewPassword;
But the thing is that even though I am able to connect using sys/NewPassword from my browser UI, I dont get the same result when doing it using the SQL prompt.
What I am trying to do is this:
SQL> connect sys/NewPassword
Then I get first a warming saying that I need to use either sysdba or sysoper to connect to the system account, but neither of those work.
Can anyone advice me on this matter?
Thanks in advanceThanks for that.
I run the command to list the usernames on the database and I got SYS and SYSTEM in the list. But again, when I try to use SYS with a password that I know is working because I can access it through the browser UI, it doesnt work. It seems like this sys is different to the sys I used in the UI.
I dont know if I am explaining myself correclty... In the Browser UI I use sys, and a password and I get connected to the sys account. However, if I try to use the same sys.password combination from my sqlplus prompt, I get error messages
Does this make sense at all? -
Not able to connect to database using jdbc
Respected sir/madam,
I am new to java and i am trying to connect to database which is necessary for me in project when i wrote the code using class.forName i am able to compile but when runnig i am getting two exceptionns one is oracle.jdbc.driver.oracledriver not found or excetion in thread main class not found please help meSubash,
1) Please refrain from cross-posting (posting the same message into two or more forums). This question was better asked in the JDBC forum as you eventually put it but you already posted here so if that happens again next time just leave the original thread be.
2) Your compilation classpath and your runtime classpath are not related. As a matter of fact with well written JDBC code and under most conditions you should not need your driver in your compilation classpath at all, only your runtime one.
3) Your driver is not in your runtime classpath. That is the error that you need to resolve. -
Cannot connect to database using SQL Developer
Ok. Here are the facts:
1) I can connect to the database using PL/SQL Developer.
2) I wanted to try SQL Developer and I am unable to connect to the same database with SQL Developer. I provide username and password and select "network alias" and click test and I get "Network adaptor could not be established"
3) TNS names.ora file resides on a mapped drive which clearly is accessible by PL/SQL developer but not by SQL developer.
What am i missing?
Thanks a lotIf you can select a network alias, then sqldeveloper has found your tnsnames and the problem lies elsewhere.
Is the network drive specified by a UNC? SQLDeveloper doesn't work well with unc names. -
Cannot connect local database using net service_name
Good Morning to all ;
FYI : This question wrongly posted under high availability. Now it was removed from there.
I am trying to connect my local database using remote authentication.
but getting error. Client & Server reside on same server.
SQL> conn u1/u1@primdb
ERROR: ORA-12545: Connect failed because target host or object does not exist
SQL> conn / as sysdba
Connected.
SQL> show parameter db_name;
NAME TYPE VALUE
db_name string primary
SQL> show parameter service_names;
NAME TYPE VALUE
service_names string mydb
SQL> show parameter db_domain;
NAME TYPE VALUE
db_domain string primary.com
SQL> show parameter global_name;
NAME TYPE VALUE
global_names boolean FALSE
SQL> select * from global_name;
GLOBAL_NAME
PRIMARY
[oracle@localhost admin]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 18-JAN-2014 16:32:08
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oel5.linuxserver)(PORT=1521)))
TNS-12545: Connect failed because target host or object does not exist
TNS-12560: TNS:protocol adapter error
TNS-00515: Connect failed because target host or object does not exist
Listener failed to start. See the error message(s) above...
my listener.ora file contents :
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = primary)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(GLOBAL_DBNAME = mydb.primary.com)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oel5.linuxserver)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
my tnsnames.ora contents
primdb=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST= oel5.linuxserver)(PORT=1521))
(CONNECT_DATA =
(SERVER=DEDICATED)
(SERVICE_NAME = mydb)
$ tnsping primdb
TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 18-JAN-2014 16:40:55
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST= oel5.linuxserver)(PORT=1521))) (CONNECT_DATA = (SERVER=DEDICATED) (SERVICE_NAME = mydb)))
TNS-12545: Connect failed because target host or object does not exist
Thanks in advance ..Good Morning Ed Stevens ;
Nice to see you once again !
I remember , you are very familiar with oracle net services.
I read your article. Exploring the LOCAL_LISTENER parameter
Now i have removed listener.ora & tnsnames.ora files .
now the listener is registered as dynamically'
SQL> alter system register;
Ed Stevens wrote ..
simply do a "ping oel5.linuxserver" and report the result.
$ ping oel5.linuxserver
ping: unknown host oel5.linuxserver
$ hostname
localhost.localdomain
$ echo $ORACLE_HOSTNAME
oel5.linuxserver
my new tnsnames.ora contents
primdb =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = oel5.linuxserver)(PORT=1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = mydb)
$ tnsping primdb
TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 18-JAN-2014 19:57:13
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = oel5.linuxserver)(PORT=1521)))
(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = mydb)))
TNS-12545: Connect failed because target host or object does not exist -
Cannot connect to database using Oracle Data Access
I have been able to connect to my database through SqlPlus, but I cannot make the connection to the database through my ASP.Net program.
I set up my connection string following the following format:
*"Data Source=(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = X.X.X.X)(PORT = X)))(CONNECT_DATA =(SERVICE_NAME = SID)(INSTANCE_NAME = SID))(HS = OK)); User Id=Blah; Password=Blah";*
When the program tries to open the connetion, it through
OracleException was caught
Oracle.DataAccess.Client.OracleException was caught
Message=""
StackTrace:
at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx pOpoSqlValCtx, Object src, String procedure)*
at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src)
at Oracle.DataAccess.Client.OracleConnection.Open()
at GlobalIQ.Services.DatabaseLayer.SetUpConnection() in C:\GlobalIQ\GlobalIQ\Services\DatabaseLayer.cs:line 30
InnerException:
I do not know if this is because I didn't set something up correctly or that I am missing something. Thanks in advanceuser13488403 wrote:
I have been able to connect to my database through SqlPlus, but I cannot make the connection to the database through my ASP.Net program. ODP, ASP-NET providers etc. forums are here
http://forums.oracle.com/forums/category.jspa?categoryID=44
>
I set up my connection string following the following format:
*"Data Source= ... (HS = OK)) ...Is the HS part really needed? -
Trying to Install RMS application 13.2.2 and I get past the pre-installation checks and when I get to the Data Source details and enter the data source details with the check box checked to validate the schema/Test Data Source I get the following error:
Error Connecting to database URL jdbc:oracle:oci:@rmsdbtst as user rms13 java.lang.Exception:UnsatisfiedLinkError encountered when using the Oracle driver. Please check that the library path is set up properly or switch to the JDBC thin client oracle/jdbc/driver/T2CConnection.getLibraryVersioNumber()
Checks performed:
RMS Application code location and directory contents:
[oracle@test-rms-app application]$ pwd
/binary_files/STAGING_DIR/rms/application
[oracle@test-rms-app application]$ ls -ltr
total 144
-rw-r--r-- 1 oracle oinstall 272 Dec 7 2010 version.properties
-rw-r--r-- 1 oracle oinstall 405 Jan 16 2011 expected-object-counts.properties
-rw-r--r-- 1 oracle oinstall 892 May 13 2011 ant.install.properties.sample
-rw-r--r-- 1 oracle oinstall 64004 Jun 6 2011 build.xml
drwxr-xr-x 9 oracle oinstall 4096 Jun 16 2011 rms13
drwxr-xr-x 3 oracle oinstall 4096 Jun 16 2011 installer-resources
drwxr-xr-x 3 oracle oinstall 4096 Jun 16 2011 antinstall
drwxr-xr-x 2 oracle oinstall 4096 Jun 16 2011 ant-ext
drwxr-xr-x 5 oracle oinstall 4096 Jun 16 2011 ant
-rw-r--r-- 1 oracle oinstall 11324 Dec 18 09:18 antinstall-config.xml.ORIG
-rwxr-xr-x 1 oracle oinstall 4249 Dec 18 10:01 install.sh
drwxr-xr-x 4 oracle oinstall 4096 Dec 18 10:06 common
-rw-r--r-- 1 oracle oinstall 16244 Dec 19 10:37 antinstall-config.xml
-rw-r--r-- 1 oracle oinstall 689 Dec 19 10:37 ant.install.log
[oracle@test-rms-app application]$
Application installation:
[oracle@test-rms-app application]$ ./install.sh
THIS IS the driver directory
Verified $ORACLE_SID.
Verified SQL*Plus exists.
Verified write permissions.
Verified formsweb.cfg read permissions.
Verified Registry.dat read permissions.
Verified Java version 1.4.2.x or greater. Java version - 1.6.0
Verified Tk2Motif.rgb settings.
Verified frmcmp_batch.sh status.
WARNING: Oracle Enterprise Linux not detected. Some components may not install properly.
Verified $DISPLAY - 172.16.129.82:0.0.
This installer will ask for your "My Oracle Support" credentials.
Preparing installer. This may take a few moments.
Your internet connection type is: NONE
Integrating My Oracle Support into the product installer workflow...
[move] Moving 1 file to /binary_files/STAGING_DIR/rms/application
Installer preparation complete.
MW_HOME=/u01/app/oracle/Middleware/NewMiddleware1034
ORACLE_HOME=/u01/app/oracle/Middleware/NewMiddleware1034/as_1
ORACLE_INSTANCE=/u01/app/oracle/Middleware/NewMiddleware1034/asinst_1
DOMAIN_HOME=/u01/app/oracle/Middleware/NewMiddleware1034/user_projects/domains/rmsClassDomain
WLS_INSTANCE=WLS_FORMS
ORACLE_SID=rmsdbtst
JAVA_HOME=/u01/app/oracle/jrockit-jdk1.6.0_45-R28.2.7-4.1.0
Launching installer...
To make sure I have connectivity from the app server to the database (on a database server) here are the steps followed:
[oracle@test-rms-app application]$ tnsping rmsdbtst
TNS Ping Utility for Linux: Version 11.1.0.7.0 - Production on 19-DEC-2013 10:41:40
Copyright (c) 1997, 2008, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = test-rms-db.vonmaur.vmc)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SID = rmsdbtst)))
OK (0 msec)
[oracle@test-rms-app application]$
[oracle@test-rms-app application]$ sqlplus rms13@rmsdbtst
SQL*Plus: Release 11.1.0.7.0 - Production on Thu Dec 19 10:46:18 2013
Copyright (c) 1982, 2008, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@test-rms-app application]$
[oracle@test-rms-app application]$ ping test-rms-db
PING test-rms-db.vonmaur.vmc (192.168.1.140) 56(84) bytes of data.
64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=1 ttl=64 time=0.599 ms
64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=2 ttl=64 time=0.168 ms
64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=3 ttl=64 time=0.132 ms
64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=4 ttl=64 time=0.158 ms
64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=5 ttl=64 time=0.135 ms
--- test-rms-db.vonmaur.vmc ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4001ms
rtt min/avg/max/mdev = 0.132/0.238/0.599/0.181 ms
[oracle@test-rms-app application]$
[oracle@test-rms-app application]$ uname -a
Linux test-rms-app.vonmaur.vmc 2.6.18-128.el5 #1 SMP Wed Jan 21 08:45:05 EST 2009 x86_64 x86_64 x86_64 GNU/Linux
[oracle@test-rms-app application]$
[oracle@test-rms-app application]$ cat /etc/*-release
Enterprise Linux Enterprise Linux Server release 5.3 (Carthage)
Red Hat Enterprise Linux Server release 5.3 (Tikanga)
[oracle@test-rms-app application]$
The database is created and all the batch file scripts have been successfully deployed. Now working on the application server. The Weblogic server is installed and 11g forms and reports are installed successfully.
Any help would be helpful.
Thanks,
Ram.Please check MOS Notes:
FAQ: RWMS 13.2 Installation and Configuration (Doc ID 1307639.1) -
How to Connect Microsoft SQL 2000 database using JDBC
Hi all..
I want to connect Microsoft SQL 2000 database using JDBC. I want from initial steps also. (about JDBC driver & its installation)
ThankzJust checkout the SQL Server JDBC Driver Documentation at the manfacturer's site: http://msdn2.microsoft.com/en-us/data/aa937724.aspx
-
Connecting to DB2 Database using JDBC for select/Insert
Hi,
I am trying to connect to an DB2 Database using JDBC adapter, I have build an UDF for the same.
The UDF will try to query the database in the form of Select and INSERT.I am using the LOOKUP API provided by SAP.When I try to execute the UDF I have received the following error.can any of you provide the solution for the error and also is it that the JDBC adapter has to be situated on Central Adapter engine to execute the API, can the JDBC adapter used for executing the INSERT statement.
Exception during processing the payload.Problem when calling an adapter by using communication channel JDBC_PIDB_Receiver_CC (Party: , Service: XIDB_BSRV, Object ID: 59f2d7694acc3e81840f89b0169d9323) XI AF API call failed. Module exception: (No information available). Cause Exception: (No information available).
com.sap.aii.mapping.lookup.LookupException: Problem when calling an adapter by using communication channel JDBC_PIDB_Receiver_CC (Party: , Service: XIDB_BSRV, Object ID: 59f2d7694acc3e81840f89b0169d9323) XI AF API call failed. Module exception: (No information available). Cause Exception: (No information available).
at com.sap.aii.ibrun.server.lookup.AdapterProxyLocal.execute(AdapterProxyLocal.java:131)
at com.sap.aii.ibrun.server.lookup.SystemAccessorInternal.execute(SystemAccessorInternal.java:68)
at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:149)
at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:77)
at com.sap.aii.utilxi.hmis.server.HmisServiceImpl.invokeMethod(HmisServiceImpl.java:169)
at com.sap.aii.utilxi.hmis.server.HmisServer.process(HmisServer.java:178)
at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:296)
at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:211)
at com.sap.aii.utilxi.hmis.web.workers.HmisInternalClient.doWork(HmisInternalClient.java:70)
at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doWork(HmisServletImpl.java:496)
at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doPost(HmisServletImpl.java:634)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
Root Cause:
com.sap.aii.af.service.api.AFException: XI AF API call failed. Module exception: (No information available). Cause Exception: (No information available).
at com.sap.aii.af.service.api.AdapterAccess.sendMsg(AdapterAccess.java:214)
at com.sap.aii.af.service.api.AdapterAccess.execute(AdapterAccess.java:283)
at com.sap.aii.ibrun.server.lookup.AdapterProxyLocal.execute(AdapterProxyLocal.java:123)
at com.sap.aii.ibrun.server.lookup.SystemAccessorInternal.execute(SystemAccessorInternal.java:68)
at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:149)
at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:77)
at com.sap.aii.utilxi.hmis.server.HmisServiceImpl.invokeMethod(HmisServiceImpl.java:169)
at com.sap.aii.utilxi.hmis.server.HmisServer.process(HmisServer.java:178)
at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:296)
at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:211)
at com.sap.aii.utilxi.hmis.web.workers.HmisInternalClient.doWork(HmisInternalClient.java:70)
at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doWork(HmisServletImpl.java:496)
at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doPost(HmisServletImpl.java:634)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
Thanks,
Kiran.Hi,
have you deployed the JDBC driver for your DB2 database in your XI system........if not, then ask your basis guys to find the weblog to deploy the JDBC driver in XI system and then deploy your DB2 database driver in your JDBC driver in XI system............
then again execute your scenario.
Regards,
Rajeev Gupta -
Problem connecting to Mysql using JDBC
Hi Everyone,
I am trying to connect Mysql ad java applet and I am using the Mysql jdbc connector.
I Took the mysql-connector-java-5.0.8-bin.jar file and put that in the library of jdk.
Now i used the following code to connect to the database using Netbeans.
package testmysql;
import java.sql.*;
public class Main
public static void main (String[] args)
Connection conn = null;
try
String userName = "root";
String password = "";
String url = "jdbc:mysql://localhost/rpms";
Class.forName ("com.mysql.jdbc.Driver").newInstance ();
conn = DriverManager.getConnection (url, userName, password);
System.out.println ("Database connection established");
catch (Exception e)
System.err.println ("Cannot connect to database server");
finally
if (conn != null)
try
conn.close ();
System.out.println ("Database connection terminated");
catch (Exception e) { /* ignore close errors */ }
But it displays Cannot connect to database server
thoughMysql server is running.
Can anyone tell me wats the prob in this.
thanksString url = "jdbc:mysql://localhost/rpms";
Class.forName ("com.mysql.jdbc.Driver").newInstance ();
Is rpms the MySQL database?
Is the database on the default port 3306?
Is the MySQL JDBC JAR file in the classpath of the applet?
newInstance() is not required to be invoked unless using <= JDK 2.0
Replace:
catch (Exception e)
System.err.println ("Cannot connect to database server");
with:
catch (Exception e)
System.err.println (e.getMessage());
Edited by: dvohra09 on Apr 10, 2009 10:54 PM
Edited by: dvohra09 on Apr 10, 2009 10:55 PM
Edited by: dvohra09 on Apr 10, 2009 10:58 PM -
Cannot connect to database via JApplet
Hi,
I created a Java application which allows me to send information to my mysql database using the jdbc connector via a JFrame. However when i modified the file to be a JApplet the info will not sent and i cannot connect to the database? Any particular reason for this?
I need it to be a JApplet so i can add it to a browser window.
Code: ( java )
private void save ()
Connection conn = null;
try
Statement stmt;
String userName = "root";
String password = "PASSWORD";
String url = "jdbc:mysql://localhost:3306/DATABASE";
Class.forName ("com.mysql.jdbc.Driver").newInstance ();
conn = DriverManager.getConnection (url, userName, password);
System.out.println ("Database connection established");
//Get a statement object
stmt = conn.createStatement();
stmt.executeUpdate( "INSERT INTO TABLE(Info i know to put in) VALUES('Values i know to put in')");
catch (Exception e)
System.err.println ("Cannot connect to database server");
finally
{if (conn != null)
{try
{conn.close ();
System.out.println ("Database connection terminated");
catch (Exception e) { /* ignore close errors*/ }
As i said above it works fine as a JFrame but not as a JApplet. Any help would be great.
Thanks GYour error reporting is not good. You print a meanningless message or ignore the error.
Print the stacktrace in the catch blocks.
Change the code, rerun it and then check the Java Console for output.
I'm guessing you'll see a security error. Unsigned applets can't access the client file system. If so, sign the applet.
Maybe you are looking for
-
Hi, I have an issue in MCTG. For some sales offices the value of Orders: Cost is showing as zero and for some sales offices the report is showing value. Why is it so?Any known reasons? Also is there any standard report which will show sales orders co
-
I made a form for retrieving a password in case the person forgot their password, and what I wanted to know is there a way to highlight the form field they got wrong so they know exactly which to correct? One more thing can you guys look at my code a
-
How to make avi videos in elements 10?
-
Hi 1. can any one explain me what do we mean by cumulative results for payroll. 2. How to retreive payroll data report, Are there any specific function modules to US payroll results. Thanks
-
HT1420 I deauthorized my computer by accident and I'm trying to reauthorize it, HELP!
It shows in my account settings the 0 computers are authorized but where I guess it;s supposed to say "Authorize this Computer" it' doesn;t say. Can anyone help?