Jchem cartridge installation - Local TNS name does not work

User 5374c4c22c

18-05-2009 08:45:09

I am having an issue with the installation of the jchem cartridge (details below). The error I am getting is:


The TNS name ORCL doesn't work with sqlplus. Please, specify another one.


My TNS name in my tnsnames.ora is definetly ORCL. When I connect with sqlplus manually with ~sqlplus username/password@ORCL it works fine


Has this been encountered before, or is there any way skip this step? (The TNS name is not needed in this case as everything is localhost)


Cheers
Mark


Here is the full output:


./bash install-interact.sh
+ /usr/java/jdk1.6.0_13/bin/java -classpath ../lib/jchem.jar:/app/oracle/product/11.1.0/db_1/jdbc/lib/ojdbc5.jar:/app/oracle/product/11.1.0/db_1/jdbc/lib/ojdbc14.jar -Djava.util.logging.config.file=conf/logging.properties chemaxon.jchem.cartridge.install.InstallCmdLine --oracle-home /app/oracle/product/11.1.0/db_1

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: .....hidden.....:
INFO: Server process start-ed.
INFO: Listening on network interface 0.0.0.0/0.0.0.0 at port 1099...

DBA login [.....hidden.....]:
DBA password:        

Name of the cartridge owner: jchem_cartridge
Password of the cartridge owner:        

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

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


====> The TNS name ORCL doesn't work with sqlplus. Please, specify another one.

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



====> The TNS name orcl doesn't work with sqlplus. Please, specify another one.Local TNS

ChemAxon aa7c50abf8

18-05-2009 09:40:54

Hi Mark,


This check typically works well and it cannot be skipped.


The checkpoint which fails does this:



  1. Create a file jccinst.tmp in the default temporary directory (let's denote it with <tmp-dir>) with the content "quit"

  2. Execute the command sqlplus -L username/password@tnsname @<tmp-dir>/jccinst.tmp

  3. Delete <tmp-dir>/jccinst.tmp


One thing which comes to my mind is that sqlplus may not be on your PATH. But looking into the code which executes these steps, sqlplus is probably on your path, as the error message you reported is output only, if the underlying error message (coming from the above steps) contains either "ORA-12514" or "ORA-12154". And this is true only, if sqlplus could be found and started.


It may be irrelevant, but I am bugged with the tilde (~) character in front of sqlplus in your post:



When I connect with sqlplus manually with ~sqlplus username/password@ORCL it works fine



What does it mean?



Thanks

Peter

User 5374c4c22c

18-05-2009 10:30:08











Hi Peter,


Thanks for your swift reply. I followed the steps that the check takes. This is the output (No errors):


sqlplus -L username/password@ORCL @/tmp/jccinst.tmp

SQL*Plus: Release 11.1.0.6.0 - Production on Mon May 18 11:22:46 2009

Copyright (c) 1982, 2007, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


I can confirm the sqlplus is in my PATH.


Apologies for the misleading tilda. It was just a typo!


I forgot to include my version information:


jchem.version=5.2.1_1
jchem.main.version=5.2
jchem.veruln=5_2_01_1


Cheers
Mark


ChemAxon aa7c50abf8

18-05-2009 11:23:39

Mark,


It is probably not related to this particular problem, but Oracle 11gR1 has to be patched to fix Oracle bug 7713193. (Please see the Software Requirements: http://www.chemaxon.com/jchem/doc/admin/cartridge.html#req) Last time I checked the fix was available only for 11.1.0.7 whereas you appear to be on 11.1.0.6.


Thanks


Peter

ChemAxon aa7c50abf8

18-05-2009 13:57:22

Mark,


Please, could you add the following line to the jchem/cartridge/conf/logging.properties file?


chemaxon.level = FINESTThen start the installation again and abort the script with Ctrl-C just after entering ORCL when prompted for the TNS name. The error messages from executing sqlplus will be output under lines containing the "chemaxon.util.RuntimeUtils$1 run" string. Let's see if they provide more clues... (I expect they will.)


Thanks


Peter

User 5374c4c22c

18-05-2009 14:18:30

Dear Peter,


 


Okay, I entered the folowing line "chemaxon.level = FINEST" into the conf/logging.properties file and then ran the process again. Unforntuantely it looked exactly the same, with no new errors messages printed to the screen. I tried placing that line in various places in the logging.properties file in case it was being over-ridden, but to no avail.


 


Cheers
Mark

ChemAxon aa7c50abf8

18-05-2009 14:21:17

Sorry, Mark! I forgot to tell that you can find the extra logs in the jcart0.log file. (I am heavily multitasking here .)


Cheers,


Peter

User 5374c4c22c

18-05-2009 14:36:04

Dear Peter,


No, Its my bad for not checking more carefully. Okay, here is the contents of the log file:


 


Cheers
Mark


 


May 18, 2009 3:31:17 PM chemaxon.jchem.cartridge.install.ConnectUtil getConnection
FINER: Loading driver class oracle.jdbc.OracleDriver
May 18, 2009 3:31:17 PM chemaxon.jchem.cartridge.install.ConnectUtil getConnection
FINER: Connecting with url: jdbc:oracle:thin:@localhost:1521:orcl as SYSTEM
May 18, 2009 3:31:18 PM chemaxon.jchem.cartridge.install.Schema executeSql
FINE: SYSTEM: select systimestamp from dual
May 18, 2009 3:31:18 PM chemaxon.jchem.cartridge.install.Schema executeSql
FINE: After connect: SYSTEM
May 18, 2009 3:31:29 PM chemaxon.jchem.cartridge.install.ConnectUtil getConnection
FINER: Loading driver class oracle.jdbc.OracleDriver
May 18, 2009 3:31:29 PM chemaxon.jchem.cartridge.install.ConnectUtil getConnection
FINER: Connecting with url: jdbc:oracle:thin:@localhost:1521:orcl as jchem_cartridge
May 18, 2009 3:31:29 PM chemaxon.jchem.cartridge.install.InstallParameters checkLogin
FINEST: error code: 1017
May 18, 2009 3:31:29 PM chemaxon.jchem.cartridge.install.ConnectUtil getConnection
FINER: Loading driver class oracle.jdbc.OracleDriver
May 18, 2009 3:31:29 PM chemaxon.jchem.cartridge.install.ConnectUtil getConnection
FINER: Connecting with url: jdbc:oracle:thin:@localhost:1521:orcl as SYSTEM
May 18, 2009 3:31:44 PM chemaxon.util.RuntimeUtils exec
FINEST: Starting sqlplus -L SYSTEM@ORCL @/tmp/jccinst934180008552755061.tmp , input=***hidden***
...
May 18, 2009 3:31:44 PM chemaxon.util.RuntimeUtils startProcess
FINEST: Starting sqlplus -L SYSTEM@ORCL @/tmp/jccinst934180008552755061.tmp ...
May 18, 2009 3:31:44 PM chemaxon.util.RuntimeUtils startStreamReaper
FINE: Starting stream reaper for sqlplus::System.err...
May 18, 2009 3:31:44 PM chemaxon.util.RuntimeUtils startStreamReaper
FINE: Starting stream reaper for sqlplus::System.err...
May 18, 2009 3:31:44 PM chemaxon.util.RuntimeUtils$1 run
FINEST: Stream reaper for sqlplus::System.err is started.
May 18, 2009 3:31:44 PM chemaxon.util.RuntimeUtils$1 run
FINEST: Stream reaper for sqlplus::System.err is started.
May 18, 2009 3:31:44 PM chemaxon.util.RuntimeUtils$1 run
FINEST:
SQL*Plus: Release 11.1.0.6.0 - Production on Mon May 18 15:31:44 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.


May 18, 2009 3:31:44 PM chemaxon.util.RuntimeUtils$1 run
FINEST: Enter password:

May 18, 2009 3:31:44 PM chemaxon.util.RuntimeUtils$1 run
FINEST: ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified



May 18, 2009 3:31:44 PM chemaxon.util.RuntimeUtils$1 run
FINEST: SP2-0751: Unable to connect to Oracle. Exiting SQL*Plus

May 18, 2009 3:31:44 PM chemaxon.util.RuntimeUtils$1 run
FINEST: Stream reaper for sqlplus::System.err is finished.
May 18, 2009 3:31:44 PM chemaxon.util.RuntimeUtils$1 run
FINEST: Stream reaper for sqlplus::System.err is finished.

ChemAxon aa7c50abf8

18-05-2009 15:25:21

Mark,


I am still unable to see  how this might go wrong. The logs say the TNS listener pretends to know nothing about ORCL -- when contacted by sqlplus which has been started by the installer.


Did you do the command line test with sqlplus earlier in the same terminal window as you used to start the JChem Cartridge installer script?


Is there only one Oracle installation on this machine? Not even a second Oracle client installed?


Please, could post the output of the following commands:


$JAVA_HOME/bin/java -version


uname -a


Thanks


Peter

User 5374c4c22c

19-05-2009 07:47:20

Dear Peter,


 


Yes, it was really bugging me. So I shut down the instance and listeners and renamed the TNS name. I then logged out and logged in and restarted the database and tried again and it all worked!! Definitively, it was some quirk on my system and nothing to do with jchem. Sorry to have wasted you time, but I really appreciate your efforts.


 


Thanks again


Mark