Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 37058 invoked from network); 23 Aug 2007 18:02:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Aug 2007 18:02:44 -0000 Received: (qmail 60669 invoked by uid 500); 23 Aug 2007 18:02:40 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 60423 invoked by uid 500); 23 Aug 2007 18:02:40 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 60414 invoked by uid 99); 23 Aug 2007 18:02:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Aug 2007 11:02:40 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.78.103.231] (HELO vorsha.objectstyle.org) (208.78.103.231) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 23 Aug 2007 18:02:31 +0000 Received: (qmail 29354 invoked from network); 23 Aug 2007 18:02:12 -0000 Received: from unknown (HELO ?:????h?IPv6:::1?) (127.0.0.1) by localhost with SMTP; 23 Aug 2007 18:02:12 -0000 Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: References: <8f985b960708201417u2311fe7fv522883cc6e95ea10@mail.gmail.com> <8f985b960708201448j5f47f015r7786537c73a4060d@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <2910A580-8D53-4B14-88AC-4DBD0BC28FBD@objectstyle.org> Content-Transfer-Encoding: 7bit From: Andrus Adamchik Subject: Re: Strange Oracle Connection Issue Date: Thu, 23 Aug 2007 21:02:06 +0300 To: user@cayenne.apache.org X-Mailer: Apple Mail (2.752.3) X-Virus-Checked: Checked by ClamAV on apache.org I just did a quick test with Oracle 10.2 on Linux. Both variants of the URL work. But since the one with slashes seems to be the future, I updated 3.0 Modeler to suggest it by default. Andrus On Aug 21, 2007, at 9:35 PM, Michael Lepine wrote: > I did figure out the reason for this issue. It was the JDBC URL. > From what > I've read, it appears that the supported format for the JDBC URL in > Oracle > 10g is slightly different than with previous versions. > > http://download-east.oracle.com/docs/cd/B19306_01/java.102/b14355/ > urls.htm#BEIDHCBA > > The old format (one generated by Cayenne 2.x): > > jdbc:oracle:thin:@localhost:1521:orcl > > new format (notice the inserted slashes especially between the port > and > service name): > > jdbc:oracle:thin:@//localhost:1521/orcl > > The new format works for me. > > The odd thing is that my tests against other 10g database instances > (both on > Windows and Solaris) worked fine with the older format. I'm really > not sure > what the underlying reason is, but this is how I got around it. > > Thanks to everyone for their responses. > > On 8/20/07, Mike Kienenberger wrote: >> >> I'm no expert, so I'm probably not the best person to ask, but here's >> some things that come to mind: >> >> 1) Using a different driver in Cayenne config. >> 2) Using a different path (or maybe home directory) for Cayenne >> config. >> 3) Using a different driver url for Cayenne config. >> >> On 8/20/07, Michael Lepine wrote: >>> 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 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 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.findObje >> ct( >>>>> 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 >>>>> >>>> >>> >>