RE: Configuring SSL

From: Elena Doyle (ed28..dmin.cam.ac.uk)
Date: Thu Jun 19 2008 - 11:16:29 EDT

  • Next message: Øyvind Harboe: "Peak memory usage for Cayenne"

    Andrus,

    Thank you. I will try that and see what happens.

    Elena

    -----Original Message-----
    From: Andrus Adamchik [mailto:andru..bjectstyle.org]
    Sent: 19 June 2008 13:17
    To: use..ayenne.apache.org
    Subject: Re: Configuring SSL

    At this point there's not much I can do to help... I guess you should try writing a simple JDBC
    example to see that the property makes a difference outside Cayenne/DBCP. If it does, check your
    implementation of the factory, if it doesn't - check the Oracle setup.

    Andrus

    On Jun 19, 2008, at 3:13 PM, Elena Doyle wrote:
    > 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.<init>(PhysicalConnection.java:
    > 441)
    > at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
    > at
    > oracle
    > .jdbc
    > .driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
    > at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
    > at
    > org
    > .apache
    > .commons
    > .dbcp
    > .DriverConnectionFactory
    > .createConnection(DriverConnectionFactory.java:38)
    > at
    > org
    > .apache
    > .commons
    > .dbcp
    > .PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:
    > 294)
    > at
    > org
    > .apache
    > .commons
    > .dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.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:andru..bjectstyle.org]
    > Sent: 18 June 2008 18:07
    > To: use..ayenne.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/
    >> 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:
    >> 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:
    >> 276)
    >> at
    >> org
    >> .apache
    >> .cayenne
    >> .conf.Configuration.initializeSharedConfiguration(Configuration.java:
    >> 258)
    >> at
    >> org
    >> .apache
    >> .cayenne
    >> .conf.Configuration.initializeSharedConfiguration(Configuration.java:
    >> 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
    >> presume that is what I am trying to customise and I need to make sure
    >> I have in my custom factory everything DriverDataSourceFactory Does?
    >>
    >> Elena
    >>
    >> -----Original Message-----
    >> From: Andrus Adamchik [mailto:andru..bjectstyle.org]
    >> Sent: 18 June 2008 17:13
    >> To: use..ayenne.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
    >> "classpath". There is an alternative in Eclipse. Once you have an
    >> 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
    >> DataSourceFactory interface as shown by Eclipse.
    >>
    >> Andrus
    >>
    >
    >



    This archive was generated by hypermail 2.0.0 : Thu Jun 19 2008 - 11:21:20 EDT