Re: Strange Oracle Connection Issue

From: Michael Lepine (mikelepin..mail.com)
Date: Mon Aug 20 2007 - 17:41:36 EDT

  • Next message: Mike Kienenberger: "Re: Strange Oracle Connection Issue"

    My assumption was that this had been created, but I am trying to verify
    this. I do not have full control over this Solaris environment which adds to
    the fun.

    The issue I'm having a hard time understanding is why a connection is made
    successfully in my Java test code (via a homegrown connection polling
    mechanism), but Cayenne cannot connect to the same database. It seems like
    these should either both work or both fail.

    On 8/20/07, Mike Kienenberger <mkienen..mail.com> wrote:
    >
    > Your windows box has a configured tnsnames.ora file somewhere,
    > probably somewhere like
    > \Oracle\product\10.1.0\Client_1\network\ADMIN\tnsnames.ora.
    >
    > You probably need to configure the same file on your Solaris box.
    > Either that or use the fully-qualified domain name to your server (and
    > you still might have issues).
    >
    > On 8/20/07, Michael Lepine <mikelepin..mail.com> wrote:
    > > Hello all, I am running into a perplexing issue. I am trying to run an
    > > application I've written (using Cayenne) on a Solaris 10 box and keep
    > > getting connection errors. During development, I modified the Cayenne
    > > driver.xml file many times with different database connection parameters
    > and
    > > have never had a problem until now. The app was tested on Windows and
    > this
    > > is the first time it's being run on Solaris. The database version is
    > Oracle
    > > 10g and the error is:
    > >
    > > ORA-12505, TNS:listener does not currently know of SID given in connect
    > > descriptor
    > >
    > > (I've pasted a more detailed stacktrace with the error below.)
    > >
    > > This is odd because I am using the same service_name/sid, host and port
    > data
    > > to connect to the database via TOAD. I have also tested the connection
    > by
    > > creating another (Java) connection pool with the same connection
    > parameters.
    > > I even changed the connection parameters to reference another database
    > that
    > > I've connected to as well and get the same error.
    > >
    > > So, I'm at a loss and hope that somebody out there has some ideas.
    > Thanks
    > > for any help.
    > >
    > >
    > >
    > > The error I'm seeing is:
    > >
    > > [java] ERROR [Thread-3] - [v.2.0.3 May 6 2007] Error detecting
    > database
    > > type
    > > [java] org.apache.cayenne.CayenneRuntimeException: [v.2.0.3 May 6
    > 2007]
    > > Error detecting database type
    > > [java] at org.apache.cayenne.dba.AutoAdapter.loadAdapter(
    > > AutoAdapter.java:159)
    > > [java] at org.apache.cayenne.dba.AutoAdapter.getAdapter(
    > > AutoAdapter.java:129)
    > > [java] at org.apache.cayenne.dba.AutoAdapter.getExtendedTypes(
    > > AutoAdapter.java:239)
    > > [java] at org.apache.cayenne.access.DataNode.performQueries(
    > > DataNode.java:246)
    > > [java] at
    > org.apache.cayenne.access.DataDomainQueryAction.runQuery(
    > > DataDomainQueryAction.java:301)
    > > [java] at
    > > org.apache.cayenne.access.DataDomainQueryAction.access$000(
    > > DataDomainQueryAction.java:60)
    > > [java] at
    > > org.apache.cayenne.access.DataDomainQueryAction$1.transform(
    > > DataDomainQueryAction.java:273)
    > > [java] at org.apache.cayenne.access.DataDomain.runInTransaction
    > (
    > > DataDomain.java:836)
    > > [java] at
    > > org.apache.cayenne.access.DataDomainQueryAction.runQueryInTransaction(
    > > DataDomainQueryAction.java:270)
    > > [java] at
    > > org.apache.cayenne.access.DataDomainQueryAction.interceptOIDQuery(
    > > DataDomainQueryAction.java:138)
    > > [java] at
    > org.apache.cayenne.access.DataDomainQueryAction.execute(
    > > DataDomainQueryAction.java:107)
    > > [java] at org.apache.cayenne.access.DataDomain.onQuery(
    > > DataDomain.java:746)
    > > [java] at
    > org.apache.cayenne.util.ObjectContextQueryAction.runQuery
    > > (ObjectContextQueryAction.java:217)
    > > [java] at
    > org.apache.cayenne.access.DataContextQueryAction.execute(
    > > DataContextQueryAction.java:54)
    > > [java] at org.apache.cayenne.access.DataContext.onQuery(
    > > DataContext.java:1387)
    > > [java] at org.apache.cayenne.access.DataContext.performQuery(
    > > DataContext.java:1376)
    > > [java] at org.apache.cayenne.DataObjectUtils.objectForQuery(
    > > DataObjectUtils.java:254)
    > > [java] at org.apache.cayenne.DataObjectUtils.objectForPK(
    > > DataObjectUtils.java:240)
    > > [java] at org.apache.cayenne.DataObjectUtils.objectForPK(
    > > DataObjectUtils.java:149)
    > > [java] at
    > > com.goperiscope.dataaccess.cayenne.CayennePersistenceManager.findObject(
    > > CayennePersistenceManager.java:26)
    > > [java] at com.goperiscope.dao.ProcessStatusCodes.getInstance(
    > > ProcessStatusCodes.java:65)
    > > [java] at
    > > com.goperiscope.alaska.SynchronizationProcess.createSynchJob(
    > > SynchronizationProcess.java:540)
    > > [java] at com.goperiscope.alaska.SynchronizationProcess.execute
    > (
    > > SynchronizationProcess.java:144)
    > > [java] at com.wsc.process.Process.runProcess(Process.java:176)
    > > [java] at com.wsc.process.Process$1.run(Process.java:343)
    > > [java] at java.util.TimerThread.mainLoop(Timer.java:432)
    > > [java] at java.util.TimerThread.run(Timer.java:382)
    > > Caused by: java.sql.SQLException: Listener refused the connection with
    > the
    > > following error:
    > > [java] ORA-12505, TNS:listener does not currently know of SID given
    > in
    > > connect descriptor
    > >
    >



    This archive was generated by hypermail 2.0.0 : Mon Aug 20 2007 - 17:42:08 EDT