Android Question config.properties RDC Oracle configuration

LéonE

Member
Licensed User
Longtime User
Hi,

I have the RDC (client and server) running for a SQLITE database.

config.properties (sqlite)
DriverClass=org.sqlite.JDBC
JdbcUrl=jdbc:sqlite:C:/Somewhere/Databases/MyDB.db
ServerPort=17178​
RunRLC.bat
"C:\Program Files\Java\jdk1.7.0_05\bin\java" -Xmx256m -cp .;libs\*;jdbc_driver\* anywheresoftware.b4a.remotedatabase.RemoteServer​


now i want to switch to oracle.
database = testdb
port = 1542
user = uname
pwd = pwdname
Lib location = C:\Somewhere\Oracle\jdbc_driver\lib\ojdbc14.jar
has someone an example for me how to configure (for oracle) the 2 files mentioned above?

Thanks.
 

LéonE

Member
Licensed User
Longtime User
Erel,

thanks for this quick reply. (read the link). and sorry for my ignorance.
do i understand right that i can copy all of the directory where now my sqlite configuration resides, and change the driver in the jdbc_driver (copying the right jar) folder and change the settings in config an runrlc file for an other instance.
the rest (of the other folder libs) will remain the same? no extra's?
 
Upvote 0

LéonE

Member
Licensed User
Longtime User
one last question:
<drivertype> is this for the RDC "thin" ?
doing like this:

JdbcUrl=jdbc : Oracle:thin:<Myuser>/<Mypassword>@<Mydatabase>
or
JdbcUrl=jdbc : Oracle:thin : 192.168.XXX.XXX:1521:MyDB, "MyUser", "MyPassw"

(spaces due to smiles.)
and does the "?Method=test" still functions?
 
Upvote 0

LéonE

Member
Licensed User
Longtime User
Got IT!

DriverClass=oracle.jdbc.OracleDriver
JdbcUrl=jdbc : Oracle:thin:usename/password@<IPadresshost:<DBPORT>:<database_sid>
ServerPort=17179

in \jdbc_driver i have:
ojdbc14.jar​

for those who search for Oracle connection.

Thanks again Erel for your great support.
 
Last edited:
Upvote 0

LTC

Member
Licensed User
Longtime User
Hi,
followed above DriverClass and JdbcUrl, but it always throw me "no suitable driver".
tried to download ojdbc6.jar from Oracle website, my oracle db version is 11.2.0.1
(even tried ojdbc7.jar, not working..)

error log enclosed.

could you help me with this issue?
 

Attachments

  • error.txt
    10.9 KB · Views: 293
Upvote 0

LéonE

Member
Licensed User
Longtime User
LTC, Erel,

as told before: I use ojdbc14.jar.

however. i have some more questions. the server is unix/linux or MS?
if unix/linux check your enviroment variables.
if MS check if your folder structure is OK
also look at the credentials of the user.

i uploaded my structure.
 

Attachments

  • Ora_root.jpg
    Ora_root.jpg
    18.8 KB · Views: 380
  • Ora_libs.jpg
    Ora_libs.jpg
    95.6 KB · Views: 362
  • Ora_jdbc.jpg
    Ora_jdbc.jpg
    14.5 KB · Views: 313
  • Server_runWin.jpg
    Server_runWin.jpg
    45.4 KB · Views: 315
Last edited:
Upvote 0

LTC

Member
Licensed User
Longtime User
@LeonE, yes, I did try to download ojdbc14.jar and put it in the jdbc_driver folder
although oracle website say it is for oracle 10g....

as for the config.properties, I renamed it because .properties extends not allowed to upload.
I post it here again.....

#Lines starting with '#' are comments.
#Backslash character at the end of line means that the command continues in the next line.
DriverClass=oracle.jdbc.OracleDriver
JdbcUrl=jdbc:Oracle:thin:tx/123@192.168.1.13:1521:cms
ServerPort=17178

#DriverClass=com.mysql.jdbc.Driver
#JdbcUrl=jdbc:mysql://localhost/test?characterEncoding=utf8
#SQL Server
#DriverClass=net.sourceforge.jtds.jdbc.Driver
#JdbcUrl=jdbc:jtds:sqlserver://<database server ip>/<database>
#User=tx
#Password=123
#ServerPort=17178
#If Debug is true then this file will be reloaded on every query.
#This is useful if you need to modify the queries.
Debug=true
#commands
#sql.create_table=CREATE TABLE animals (\
# id INT NOT NULL AUTO_INCREMENT,\
# name CHAR(30) NOT NULL,\
# image BLOB,\
# PRIMARY KEY (id))
#sql.insert_animal=INSERT INTO animals VALUES (null, ?,?)
#sql.select_animal=SELECT name, image FROM animals WHERE name = ?


sry if any inconvenience caused.

LTC
 
Upvote 0

LéonE

Member
Licensed User
Longtime User
no inconvenience.

differences with my startup (.bat-file) and yours:

mine : "C:\Program Files\Java\jdk1.7.0_05\bin\java" -Xmx256m -cp .;libs\*;jdbc_driver\* anywheresoftware.b4a.remotedatabase.RemoteServer

yours: "C:\Program Files (x86)\Java\jdk1.7.0_67\bin\java" -Xmx256m -cp .;libs\*;jdbc_driver\* anywheresoftware.b4a.remotedatabase.RemoteServer

for what i know often the (x86) gives problems and programs and/or env.variables are not read or found.
if you have the possibility to change, try to do something in that direction.

try also to login with the system user first (sqldeveloper or toad). see if you reach the database. if yes change the line:

JdbcUrl=jdbc:Oracle:thin:tx/123@192.168.1.13:1521:cms
in
JdbcUrl=jdbc:Oracle:thin:system/systemPWD@192.168.1.13:1521:cms

this will exclude unknown user problems
 
Upvote 0

LTC

Member
Licensed User
Longtime User
thanks for your reply,
tried to download/re-install "jdk-7u71-windows-i586.exe" for x86, same situation.

one thing interesting is that I tried to use this ojdbc6.jar in the B4J project to connect same database
it is ok to get result set.

so my thinking maybe "no suitable driver" is not refering jdbc, it means other jar files in the libs??

any idea?

thank again.
LTC
 
Upvote 0

LéonE

Member
Licensed User
Longtime User
what i said was that the (x86) might be the problem. the "no suitable driver" can also means "No driver found".
try to avoid the path x86. in this case operating system finds the jdbc, but not the rest of jars.
in what path are the files located? try to move them to "c:\b4a_ora" (the whole structure) change the path in bat file and look if it functioning than.
 
Upvote 0

LéonE

Member
Licensed User
Longtime User
i'm not talking about Java but RDC look at my first image (ora_root.jpg)
put that in a oneword path (no spaces) no (x86).
that's what i mean.
 
Upvote 0

LéonE

Member
Licensed User
Longtime User
Erel,

I found this:
The tasks that are deadlocking are Connection acquisition tasks. That is, c3p0 is trying to acquire new Connections from your database, and those Connection acquisition attempts are taking a long time. or exceded max connections or (like log said) trying to connect.

meight this be the issue? a time out? but with (as a lot of messages) wrong description?
 
Upvote 0
Top