JCartridge Error: java.sql.SQLException: ORA-29532:

User 358ce23aa2

28-10-2009 14:42:16

Dear support team,


I got error messages when installing jcargridge by using "install-interact.sh" script.


the details of error messages are as follow:


******************************************


  You have entered the following parameters:


==========================================


 Name of the Oracle host.: 10.66.2.244


Oracle listener port: 1521


Name of the Oracle instance: ORCL


The host name of the JChem Server: 10.66.2.244


The port at which the JChem Server accepts connections: 1099


maximum memory allocated to JChem Server: 700m


DBA login: SYSTEM


Name of the cartridge owner: jchem


Local TNS name of the Oracle instance.: ORCL


The role for basic JChem Cartridge user privileges: JCC_BASIC_ROLE


The basic role for basic JChem Cartridge user privileges doesn't exist. Do you want to create it now?: y


 Proceed with the Install? (y,n) [n]: y


INFO: Creating schema jchem


INFO: Checking JChem Server at 10.66.2.244:1099...


INFO: Loading PL/SQL script jcart.jar into jchem's schema...


INFO: Loading PL/SQL script jchem_cart.sql_i into jchem's schema...


INFO: Loading PL/SQL script jchem_util.sql into jchem's schema...


INFO: Loading PL/SQL script jchem_opti.sql into jchem's schema...


INFO: Loading PL/SQL script privman.sql into jchem's schema...


INFO: Testing with user jchem...


java.sql.SQLException: ORA-29532: Java call terminated by uncaught Java exception: java.lang.Exception: Problem connecting to JChemServer: rmi://10.66.2.244:1099: the Permission (java.net.SocketPermission localhost resolve) has not been granted to JCHEM. The PL/SQL to grant this is dbms_java.grant_permission( 'JCHEM', 'SYS:java.net.SocketPermission', 'localhost', 'resolve' )...............


********************************************************************


OS: linux, Oracle: 10g, JDK4.2.1


what else should I do to avoid the error before using "install-interact.sh" to install jcartridge?


by the way, please refer my .bash_profile content (as follows) to see if there are any errors.


***********************************


  PATH=$PATH:$HOME/bin


export JAVA_HOME=/home/jchem/ChemAxon/JChem/jre


#export JAVA_HOME=/u01/app/oracle/product/10.2.0/jre/1.4.2


#export JAVA_HOME=/u01/app/oracle/product/10.2.0/jdk/jre


export AWT_TOOLKIT=MToolkit


export ORACLE_BASE=/u01/app/oracle


export ORACLE_HOME=/u01/app/oracle/product/10.2.0


export ORACLE_SID=ORCL


export PATH=$PATH:$ORACLE_HOME/bin:$JAVA_HOME/bin


export PATH


unset USERNAME


*************************************************


Thanks for your kind support!!


Albert

ChemAxon aa7c50abf8

28-10-2009 16:06:43

Dear Albert,


Which JChem version is it?


Is everything (Oracle, JChem Server and install-interact.sh) running (or supposed to run) on the same host?


Peter

User 358ce23aa2

29-10-2009 02:51:56

Dear Peter


I really appreciate your prompt reply, becuase it' really an urgent case to me!


My JChem version is 5.2.04 and Oracle is 10g R2.


Everything (Oracle, JChem Server and install-interact.sh) are running on the same host.


Besides, i am confused about the JAVA_HOME envirament varible.


i discovered that three different path regarding JAVA:


 /u01/app/oracle/product/10.2.0/jre/1.4.2, /u01/app/oracle/product/10.2.0/jdk, /home/jchem/ChemAxon/JChem/jre


The previous two paths are in my oracle directory and third java are from uncompressing the jcartridge pack. The problem is which path that i should use as JAVA_HOME Path.


i tried to test every paths to install jcartridge (by install-intract.sh). Only one path (/home/jchem/ChemAxon/JChem/jre) works... 


would you please help me to figure the problems?


Thanks for your patience and kind support!!


Albert


 


 

ChemAxon aa7c50abf8

29-10-2009 14:01:47

Dear Albert,

JAVA_HOME must point to a Java 5 (or later) installation.


If everything is on the same host why didn't you leave the host information for Oracle and JChem Server at the default value: "localhost" (instead of giving a specific IP address)? This should not be problem, I am not sure why it comes to this error


The problem seems to be that


1. the installer did set the JChem Server host to the specific IP address (10.66.2.244) for the Java Stored Procedures (JSP) in Oracle;


2. the JSP calls JChem Server at the specific IP address, but Oracle thinks, unexpectedly, the user needs to have access to localhost instead of 10.66.2.244.


In my environment this setup (specific IP address instead of "localhost") appears to work as one would normally expect. Perhaps, your network environment has some atypical settings. For example, I can imagine that localhost resolves to 10.66.2.244 instead of 127.0.0.1 on your machine. (What's in your /etc/hosts file?)


You can try to


1. grant the socket permission as suggested in Oracle error message:


call dbms_java.grant_permission( 'JCHEM', 'SYS:java.net.SocketPermission', 'localhost', 'resolve,connect' ) and


2. check the installation as described in the


Testing the JChem Cartridge installation


section of the installation docs (http://www.chemaxon.com/jchem/doc/admin/cartridge.html#install).


Regards,


Peter

User 358ce23aa2

30-10-2009 08:19:48

Dea Peter,


Thanks for your informations again!


i re-installed jcartridge by using localhost instead of IP no..


But only when i changed IP to localhost in both tnsmanes.ora and listener.ora, the installation process is successful (installation always failed if i use IP, please also refer attached file for the setting details of tnsmans.ora and listener.ora files and the content of /etc/hosts. however, if i change IP to localhost in both tnsmanes.ora and listener.ora, i can't login my oracle db by using oracle client).


 the installation process details are as follow: 


**************************************************************************


[jchem@jchem cartridge]$ bash install-interact.sh


+ /home/jchem/ChemAxon/JChem/jre/bin/java -classpath ../lib/jchem.jar:/u01/app/oracle/product/10.2.0/jd                                                      bc/lib/ojdbc14.jar -Djava.util.logging.config.file=conf/logging.properties chemaxon.jchem.cartridge.ins       tall.InstallCmdLine --oracle-home /u01/app/oracle/product/10.2.0


 Name of the Oracle host. [localhost]:


 Oracle listener port [1521]:


 Name of the Oracle instance [mydb]: ORCL


 The host name of the JChem Server [localhost]:


 The port at which the JChem Server accepts connections [1099]:


maximum memory allocated to JChem Server [700m]:


INFO: Checking JChem Server at localhost:1099...


 ====> Trying to start JChem Server...


INFO: Using classpath: /home/jchem/ChemAxon/JChem/lib/jchem.jar:


INFO: Server process start-ed.


INFO: Listening on network interface 0.0.0.0/0.0.0.0 at port 1099...


 DBA login [SYSTEM]:


DBA password:


 Name of the cartridge owner: jchem


Password of the cartridge owner:


 ====> Schema jchem doesn't exists. It will be created


Local TNS name of the Oracle instance. [ORCL]: ORCL


 The role for basic JChem Cartridge user privileges [JCC_BASIC_ROLE]:


  You have entered the following parameters:


==========================================


 Name of the Oracle host.: localhost


Oracle listener port: 1521


Name of the Oracle instance: ORCL


The host name of the JChem Server: localhost


The port at which the JChem Server accepts connections: 1099


maximum memory allocated to JChem Server: 700m


DBA login: SYSTEM


Name of the cartridge owner: jchem


Local TNS name of the Oracle instance.: ORCL


The role for basic JChem Cartridge user privileges: JCC_BASIC_ROLE


 Proceed with the Install? (y,n) [n]: y


INFO: Creating schema jchem


INFO: Checking JChem Server at localhost:1099...


INFO: Loading PL/SQL script jcart.jar into jchem's schema...


INFO: Loading PL/SQL script jchem_cart.sql_i into jchem's schema...


INFO: Loading PL/SQL script jchem_util.sql into jchem's schema...


INFO: Loading PL/SQL script jchem_opti.sql into jchem's schema...


INFO: Loading PL/SQL script privman.sql into jchem's schema...


INFO: Testing with user jchem...


INFO: Using chemaxon.jchem.cartridge.util.cpool.Oracle10gDataSource


INFO: JDBC driver version: 11.1.0.7.0-Production


INFO: Test OK!


 ===============================


INSTALL SUCCESSFULLY COMPLETED.


===============================


********************************************************************


And there are no error message for the testing JChem Cartridge installation part!


Finally, i tried to connect server form client by using JChem Manager


then the following error occured:


An error occured. java.lang.ClassNotFoundException


oracle:jdbc.driver.OracleDriver  (please also refer the last part of attched file)


 


It's really kind of complicated. woud you please help me to figure out above problms?


Thnks for your patinece and big help!!


Albert

ChemAxon aa7c50abf8

30-10-2009 10:50:22

Hi Albert,


if i change IP to localhost in both tnsmanes.ora and listener.ora, i can't login my oracle db by using oracle client

I have no problem connecting with, e.g., sqlplus, when those configs are set to localhost. (This actually surprises me, because I'd instinctively think that the listener would then accept connections only from the localhost -- according to conventions.)


Since working out the intricacies of your site's network set-up appears to me a rather hopeless exercise (you could perhaps consult your system/network/database administrator on this issue), I can only reiterate my previous suggestion: set your Oracle config back to the previous state, install JChem Cartridge as well as you can, then



1. grant the socket permission as suggested in the Oracle error message:




call dbms_java.grant_permission( 'JCHEM', 'SYS:java.net.SocketPermission', 'localhost', 'resolve,connect' ) and




2. check the installation as described in the




Testing the JChem Cartridge installation




section of the installation docs (http://www.chemaxon.com/jchem/doc/admin/cartridge.html#install).


Have you tried the two steps above?



Finally, i tried to connect server form client by using JChem Manager
then the following error occured:
An error occured. java.lang.ClassNotFoundException
oracle:jdbc.driver.OracleDriver  (please also refer the last part of attched file)

Try


oracle:jdbc.OracleDriver 

instead of


oracle:jdbc.driver.OracleDriver 

 


Cheeers,


P.

ChemAxon aa7c50abf8

30-10-2009 10:56:38

Sorry, correctly:



oracle.jdbc.OracleDriver 


instead of



oracle:jdbc.driver.OracleDriver 


Notice the dot, instead of the colon.


 

User 358ce23aa2

02-11-2009 10:03:30

Dear Peter,


 


Thanks for your reply and help again. I had trid and followed your suggestions, but still didn't work. I use jchem manager from machin A (windows) to connect to Jchem and cartridge server (from machine B (linux)).  And also change the JDBC driver" to "oracle.jdbc.OracleDriver" instead of "oracle:jdbc.driver.OracleDriver". But still got the same error which i showed you privosly.


  the testing details are as follows:


SQL> call jchem_core_pkg.use_password('apple1');


 Call completed.


 SQL> select jchem_core_pkg.getenvironment () from dual;


 JCHEM_CORE_PKG.GETENVIRONMENT()


--------------------------------------------------------------------------------


Oracle environment:


Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod


PL/SQL Release 10.2.0.1.0 - Production


CORE    10.2.0.1.0      Production


TNS for Linux: Version 10.2.0.1.0 - Production


NLSRTL Version 10.2.0.1.0 - Production


 JChem Server environment:


Java VM vendor: Sun Microsystems Inc.


Java version: 1.6.0_11


Java VM version: 11.0-b16


 JCHEM_CORE_PKG.GETENVIRONMENT()


--------------------------------------------------------------------------------


JChem version: 5.2.4


JChem Index version: 5020100


JDBC driver version: 11.1.0.7.0-Production


To figure out where the questions is, i wnat to let you know what i did this time and the problems which confus me.


1 i used machine "hostname" (jchem) intead of "localhost" to install jchme cartridge. And also for oracle client (same as jchem manager) to connect oracle server (same as jchem server/ jcartridge server) successfully, i change the .ora (tnsname.ora, listener.ora)  default settng "localhost" to "jchem" (the server hostname) before insalling jchem cartridge. (Only if i added the maping of server ip to jchem in my client "hosts" file so that the oracle client can connect the server succesfuly. so i am really curious about know how do you use default localhost setting (in linstenr.ora, tnsname.ora) to connect the client and server?) 


2 in the "Configuring JChem Cartridge users" section, the steps 1-3 said that


Oracle 10gR1 users also have to grant the following permission:


call dbms_java.grant_permission( 'JCC_BASIC_ROLE', 'SYS:java.lang.RuntimePermission', 'shutdownHooks', '')


call  dbms_java.grant_permission( 'JCC_BASIC_ROLE', 'SYS:java.util.logging.LoggingPermission', 'control', '' )


i can't pass through this part. Is it ok if i neglect this part? becuase i think that my orcle vrsion is 10gR2 not 10gR1.


3 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 is okay for the system requirement? Because i saw the requirement info. on the webpage:


With Oracle 10gR2, patch level 10.2.0.3 or higher is required; with Oracle Real Application Cluster patch level 10.2.0.4 is required.  (Plase refer attached file for more detailed infomation.)


so I think the major problme is that the insallation part seems ok but i cna't use jchem manager to connect it and test it.


would you please give me suggestons how to do or test nex steps? Really appreciate your patinece and a lot help...


Best regards,


Albert


 

User 358ce23aa2

02-11-2009 10:41:27

By the way, should i do any ODBC configuration at client machin for jchem manager to connect server?


and as i asked you before, which java directory should i use as JAVA_HOME environment variable?


(java under oacle directory or jchem directory? In my case, only use java under jchem directory as java_home, my installation process can work. ) 


Thanks again!

ChemAxon aa7c50abf8

02-11-2009 17:04:40

Dear Albert,


And also change the JDBC driver" to "oracle.jdbc.OracleDriver" instead of "oracle:jdbc.driver.OracleDriver".

I suggest to open a separate topic for this problem. This is not related to JChem Cartridge installation. JChem Manager is a tool that can be used to import structures into a database (including Oracle) supported by JChem Base. It may be worthwhile to look at Instant JChem (for example). Instant JChem is easier to use than JChem Manager and in addition to importing, you can also use it for searching and for a lot more.


so i am really curious about know how do you use
default localhost setting (in linstenr.ora, tnsname.ora) to connect the
client and server?


Here are my Oracle network configuration files


listener.ora (for Oracle Server running on the host negev)


# listener.ora Network Configuration File: /opt/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /opt/oracle/product/10.2.0/db_1)
      (PROGRAM = extproc)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = negev)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
  )

tnsnames.ora (Oracle Client running on pokkermann):


# tnsnames.ora Network Configuration File: /opt/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

MYDB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = mydb)
    )
  )

NEGEV =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = negev)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = mydb)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

(Note that an Oracle Server is also running on pokkermann) On pokkermann I am connecting with SQL*PLus to mydb on negev executing:


sqlplus pkovacsuser_trunk/ciril@negev

the local tns name being negev.


 


i think that my orcle vrsion is 10gR2 not 10gR1. 

Yes, you apparently have 10gR2, so you can/should skip the 10gR1 specific parts of the installation.


3 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 is okay for the system requirement?

As stated in the Software Requirements, you need at the very least 10.2.0.3 -- but 10.2.0.4 is recommended. Though, the kind of problems you encountered with JChem Cartridge are unlikely to be caused by bugs in 10.2.0.1.


By the way, should i do any ODBC configuration at client machin for jchem manager to connect server?

No ODBC configuration is required.


and as i asked you before, which java directory should i use as JAVA_HOME environment variable?

As I replied earlier: JAVA_HOME must point to a Java 1.5 (or later) installation. You can verify the Java version by executing:


$JAVA_HOME/bin/java -version

Best regards,


Peter