RE: Help with Cayenne Deployment?

From: Gentry, Michael \(Contractor\) ("Gentry,)
Date: Wed Mar 02 2005 - 11:56:27 EST

  • Next message: Mike Kienenberger: "Re: Help with Cayenne Deployment?"

    I had trouble creating executable JARs and found an Eclipse plugin
    called "Fat Jar" which made everything work. Maybe it can help you
    create your JAR, too (and all required resources for your application).

    /dev/mrg

    -----Original Message-----
    From: Andrus Adamchik [mailto:andru..bjectstyle.org]
    Sent: Tuesday, March 01, 2005 10:37 PM
    To: cayenne-use..bjectstyle.org
    Subject: Re: Help with Cayenne Deployment?

    > When I
    > export the executable jar from eclipse and attempt to run the
    > application I get the following error:

    I assume that's from command line, right?

    > I can get the application to run if I extract the jar.

    That likely means that the JAR file is OK, but your command line
    classpath is not. What command line options do you use in both cases
    (jar and extracted jar)?

    Andrus

    On Feb 26, 2005, at 4:32 AM, Michael Mangus wrote:

    > Hi,
    >
    > I have no problems running the project in NetBeans or Eclipse. When I
    > export the executable jar from eclipse and attempt to run the
    > application I get the following error:
    >
    > [v.1.1 December 6 2004] Error during Configuration initialization.
    > [v.1.1 December 6 2004] Load failures. Main configuration class:
    > org.objectstyle.cayenne.conf.DefaultConfiguration, details:
    > domain.map.name.NorthWind, domain.map.location=NorthWind.map.xml,
    > reason: map location not found.
    > I can get the application to run if I extract the jar.
    >
    > Current Layout of eclipse:
    >
    > Project CologDataImport
    > src
    > com.sewell.CologDataImport
    > Main.java, etc
    > com.sewell.CologDataImport.domain
    > com.sewell.CologDataImport.domain.auto
    > com.sewell.CologDataImport.util
    > cayenne.xml
    > Northwind.map.xml
    > SRVR1DCNode.driver.xml
    >
    > lib
    > com.microsoft.*
    > org.apache.*
    > org.objectstyle.*
    >
    > In my class that uses the DataContext:
    >
    > import org.objectstyle.cayenne.access.DataContext;
    > import org.objectstyle.cayenne.query.SQLTemplate;
    > import org.objectstyle.cayenne.conf.Configuration;
    > import org.objectstyle.cayenne.access.DataDomain;
    > ....
    >
    > Configuration conf = Configuration.getSharedConfiguration();
    > DataDomain domain = conf.getDomain();
    >
    > DataContext context = DataContext.createDataContext();
    >
    > I am not sure what I need to do to get this to run as an exexcutable
    > jar file.
    >
    > Thank you for your help!
    >
    >
    > Michael
    >



    This archive was generated by hypermail 2.0.0 : Wed Mar 02 2005 - 11:56:34 EST