JDBC ok but SQLPLUS does not work

Hi all,
I created a java app that can connected to a Oracle DB with JDBC, however, when I try to get connected to my DB using the SLQPLU I laways get this error:
[oracle@ipsm-sn01 ~]$ sqlplus myuser/mypass@orcl
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
The SID is properly exported:
export ORACLE_SID=orcl
The JDBC url looks like:
jdbc.url=jdbc:oracle:thin:@localhost:1521:orcl
jdbc.username=myuser
jdbc.password=mypass
I have read a lot of entries about a file named TNSNAMES.ORA, I have no such file set; but the java app has been running for months without it, so I think that's not the root cause.
Thanks in advanced.
Edited by: user7761672 on Sep 20, 2010 8:20 AM

user7761672 wrote:
I have read a lot of entries about a file named TNSNAMES.ORA, I have no such file set; but the java app has been running for months without it, so I think that's not the root cause.
Thanks in advanced.If you are to use a SQL*Plus on your desktop, the TNSNAMES.ORA is required. I think the reason why you are not getting any issue at all when you are running it thru java app is because the java app is doing that for you creating an image of TNSNAMES.ORA or the likes of it thru some interfaces to connect to the database. An example of this is our application user. They don't have any TNSNAMES.ORA installed on their PC when they run our inhouse apps connected to the oracle database.
.

Similar Messages

Maybe you are looking for

  • Combine two jsp pages into single

    hai how to combine two jsp pages in to one import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.strut

  • Automatic delivery date change based on logistics calendar

    Dear Experts, I have a certain plant for which i have 5 days working & for the rest i have all days working . My requirement is that the system should find out & change the delivery date in PO automatically , if the delivery date falls on a holiday .

  • Why are files viewed in Bridge a lot brighter than Mac Finder window?

    Why do my camera raw files appear a lot brighter when viewed in Adobe Bridge than when viewed in the Mac Finder Window?  Like a lot brighter.  I'm not really sure which is the 'correct' brightness. Thanks!

  • Where is the command log file? (I think that's what it is called)

    Someone recently used my computer and may have used some files or put some things on my computer that I would prefer they had not. Is there a file or system command that I can use to determine what has and has not been done on my computer? Or a file

  • Apple Manufacturer Warranty Cover GPU Failure?

    I've bought a macbook pro from a local computer store, it was used. It worked fine for 3 months then one day screen started flickering when i played videos. Now no videos work at all, and only boots in safe. I only use it for Xcode programing so not