I'm trying to set up a new project using Maven. I'm new to Cayenne and Maven. I use NetBeans 6.1 and I've managed to get everything compiled. However, when I try to run it, it falls at the first hurdle. This is my program:

    public static void main(String[] args) {
        DataContext context = DataContext.createDataContext();
    }

It fails with the following messages:

Exception in thread "main" org.objectstyle.cayenne.ConfigurationException: [v.1.2.4 October 8 2007] Error during Configuration initialization. [v.1.2.4 October 8 2007] Load failures. Main configuration class: org.objectstyle.cayenne.conf.DefaultConfiguration, details: domain.node.name=XwRepositoryNode, domain.node.datasource=XwRepositoryNode.driver.xml, reason: DataSource load failed - org.apache.cayenne.conf.DriverDataSourceFactory at org .objectstyle .cayenne .conf.Configuration.initializeSharedConfiguration(Configuration.java: 321) at org .objectstyle .cayenne .conf.Configuration.initializeSharedConfiguration(Configuration.java: 294) at org .objectstyle .cayenne .conf.Configuration.initializeSharedConfiguration(Configuration.java: 275) at org .objectstyle .cayenne.conf.Configuration.getSharedConfiguration(Configuration.java: 212) at org .objectstyle .cayenne.access.DataContext.createDataContext(DataContext.java:242)
        at org.vimia.xw.PopulateNst.main(PopulateNst.java:23)

I've got org.apache.cayenne.conf.DriverDataSourceFactory in my classpath by using org.apache.cayenne.unpublished:cayenne-jdk1.5- unpublished:3.0-SNAPSHOT.

I downloaded Cayenne 3.0-SNAPSHOT and built and installed it in my local repository.

I've tried changing cayenne-log.properties to switch on debugging, but I don't think it is being found. I get the impression that the file XwRepositoryNode.driver.xml is not being found either. I have copied them both manually to the same place as cayenne.xml. I know cayenne.xml is being found because I got a different error complaining about that before I did the manual copy.

Where do these files go? How do I tell Maven about these files so it copies them to the right place for run-time?

Steve

Reply via email to