Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 50388 invoked from network); 19 Jun 2008 12:13:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Jun 2008 12:13:41 -0000 Received: (qmail 12069 invoked by uid 500); 19 Jun 2008 12:13:41 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 12030 invoked by uid 500); 19 Jun 2008 12:13:41 -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 12004 invoked by uid 99); 19 Jun 2008 12:13:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Jun 2008 05:13:41 -0700 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [131.111.8.136] (HELO ppsw-6.csi.cam.ac.uk) (131.111.8.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Jun 2008 12:12:50 +0000 X-Cam-SpamDetails: Not scanned X-Cam-AntiVirus: No virus found X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mailgate.admin.cam.ac.uk ([131.111.150.75]:10516 helo=sterling) by ppsw-6.csi.cam.ac.uk (ppsw.cam.ac.uk [131.111.8.136]:25) with smtp id 1K9J0j-0006Xa-JP (Exim 4.67) for user@cayenne.apache.org (return-path ); Thu, 19 Jun 2008 13:13:05 +0100 Received: from ted-send.internal.admin.cam.ac.uk ([10.0.64.91]) by sterling; Thu, 19 Jun 2008 12:13:03 +0000 (GMT) X-AuditID: 0a004059-ac1cabb000000a46-b6-485a4d4e0497 Received: from angelone.internal.admin.cam.ac.uk (zaphod.internal.admin.cam.ac.uk [10.0.64.17]) by ted.internal.admin.cam.ac.uk (Symantec Mail Security) with ESMTP id 856FB1614 for ; Thu, 19 Jun 2008 12:13:02 +0000 (GMT) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Configuring SSL Date: Thu, 19 Jun 2008 13:13:02 +0100 Message-ID: <08A76A0FD53A3B42ACC7E28512D4D4A802132610@angelone.internal.admin.cam.ac.uk> In-Reply-To: <1F34B674-CBD6-4BE0-89DE-962536A6C46E@objectstyle.org> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Configuring SSL Thread-Index: AcjRZd5OAu2m3+d2TyCSCNOnUeVmkgAn2F4Q References: <08A76A0FD53A3B42ACC7E28512D4D4A8021325EC@angelone.internal.admin.cam.ac.uk> <4B12F559-469B-4E94-9956-7D2379CC6082@pvv.ntnu.no> <08A76A0FD53A3B42ACC7E28512D4D4A8021325EF@angelone.internal.admin.cam.ac.uk> <3C1FCBB8-DA76-4304-89F4-E0BF9B7C2561@objectstyle.org> <08A76A0FD53A3B42ACC7E28512D4D4A8021325F4@angelone.internal.admin.cam.ac.uk> <46B01BB2-85C8-47D2-ADD6-DE6805FDF6F4@objectstyle.org> <08A76A0FD53A3B42ACC7E28512D4D4A802132603@angelone.internal.admin.cam.ac.uk> <3A584E37-F7E2-4989-8DE5-FE7B5DC7A983@objectstyle.org> <08A76A0FD53A3B42ACC7E28512D4D4A802132604@angelone.internal.admin.cam.ac.uk> <8039A1ED-1F9D-4F34-9D65-DD3FF5FC9170@objectstyle.org> <08A76A0FD53A3B42ACC7E28512D4D4A802132606@angelone.internal.admin.cam.ac.uk> <1F3D609B-B07F-4680-9BC4-2B83113F413A@objectstyle.org> <08A76A0FD53A3B42ACC7E28512D4D4A802132607@angelone.internal.admin.cam.ac.uk> <55D8F5DC-498C-4857-AAEA-F9B3D9DCF397@objectstyle.org> <08 A76A0FD 53A3B42ACC7E 28512D4D4A80213260B@angelone.internal.admin.cam.ac.uk> <1F34B674-CBD6-4BE0-89DE-962536A6C46E@objectstyle.org> From: "Elena Doyle" To: X-Brightmail-Tracker: AAAAAwqhaCsKohWoCqIWRw== X-Virus-Checked: Checked by ClamAV on apache.org Andrus, I actually got the custom factory to work as in if it is not a secure = connection, I can connect using my custom class. But if I try to go to a secure site, I get this Caused by: java.sql.SQLException: Io exception: Remote host closed = connection during handshake at = oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112= ) at = oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146= ) at = oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255= ) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387) at = oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:441)= at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:165) at = oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.ja= va:35) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverCo= nnectionFactory.java:38) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConn= ectionFactory.java:294) at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDa= taSource.java:1247) at = org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.= java:1221) Which is what I get if I do not do extra properties. -----Original Message----- From: Andrus Adamchik [mailto:andrus@objectstyle.org]=20 Sent: 18 June 2008 18:07 To: user@cayenne.apache.org Subject: Re: Configuring SSL Ah... DBCP depends on another Commons library. You will need commons- = pool jars as well: http://commons.apache.org/pool/ Andrus On Jun 18, 2008, at 7:58 PM, Elena Doyle wrote: > I have ran it with the cayenne.xml pointing to my custom factory class = > and I got > > java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/=20 > GenericObjectPool > at > custom > .oracle > .access > .OracleSSLDataSourceFactory > .getDataSource(OracleSSLDataSourceFactory.java:39) > at > org > .apache > .cayenne > .conf > .RuntimeLoadDelegate.shouldLoadDataNode(RuntimeLoadDelegate.java:297) > at org.apache.cayenne.conf.ConfigLoader > $NodeHandler.init(ConfigLoader.java:330) > at org.apache.cayenne.conf.ConfigLoader > $DomainHandler.startElement(ConfigLoader.java:219) > at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1672) > at org.apache.crimson.parser.Parser2.content(Parser2.java:1963) > at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691) > at org.apache.crimson.parser.Parser2.content(Parser2.java:1963) > at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691) > at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:667) > at org.apache.crimson.parser.Parser2.parse(Parser2.java:337) > at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:=20 > 448) > at > org.apache.cayenne.conf.ConfigLoader.loadDomains(ConfigLoader.java:78) > at > org > .apache > .cayenne > .conf.DefaultConfiguration.initialize(DefaultConfiguration.java:161) > at > org > .apache > .cayenne > .conf.Configuration.initializeSharedConfiguration(Configuration.java:=20 > 276) > at > org > .apache > .cayenne > .conf.Configuration.initializeSharedConfiguration(Configuration.java:=20 > 258) > at > org > .apache > .cayenne > .conf.Configuration.initializeSharedConfiguration(Configuration.java:=20 > 239) > at > org > .apache > .cayenne > .conf.Configuration.getSharedConfiguration(Configuration.java:176) > at > org > .apache > .cayenne.access.DataContext.createDataContext(DataContext.java:229) > at uk.ac.cam.admin.ed284.Main.main(Main.java:9) > Exception in thread "main" > > By default the mapping file points to DriverDataSourceFactory. I=20 > presume that is what I am trying to customise and I need to make sure=20 > I have in my custom factory everything DriverDataSourceFactory Does? > > Elena > > -----Original Message----- > From: Andrus Adamchik [mailto:andrus@objectstyle.org] > Sent: 18 June 2008 17:13 > To: user@cayenne.apache.org > Subject: Re: Configuring SSL > > > On Jun 18, 2008, at 7:05 PM, Elena Doyle wrote: > >> I currently have cayenne.jar in the build path > > Hmm... That should be all you need. That's what I meant by=20 > "classpath". There is an alternative in Eclipse. Once you have an=20 > empty class that is declared to implement the interface, e.g.: > > public class OracleSSLDataSourceFactory implements DataSourceFactory = > { > > } > > You can right click on this class icon and select "Source -> Override/ = > Implement Methods...", and then select all methods from=20 > DataSourceFactory interface as shown by Eclipse. > > Andrus >