RE: Configuring SSL

From: Elena Doyle (ed28..dmin.cam.ac.uk)
Date: Wed Jun 18 2008 - 12:58:21 EDT

  • Next message: Andrus Adamchik: "Re: Configuring SSL"

    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 : Wed Jun 18 2008 - 13:02:17 EDT