Re: Help with Cayenne Deployment?

From: Michael Mangus (mdmangu..mail.com)
Date: Wed Mar 02 2005 - 18:42:04 EST

  • Next message: Andrus Adamchik: "Re: Mapping SQL query results to a Entity Object"

    Hi to all,

    Thank you for your responses. I will try your suggestions soon. I
    was mostly curious, but I deployed the extracted app to our systems
    with a short cut to the desktop that launches the app through javaw.

    I am very impressed with Cayenne's capabilities with the Artist
    Tapestry tutorial app and actually using Cayenne for our first
    deployed standalone application. I definetly look forward to giving
    Java with these frameworks our tools of choice versus ASP.NET. It
    blows my mind how I can take an cayenne.xml file and completely
    regenerate a database schema.

    The other question I had is with using Cayenne.jar or jars in genaral
    in standalone appications. I had to extract the jars inside my
    application's root directory for them to be available to the
    appication. I tried putting Cayenne.jar and other jars in the root
    directory, but it would not load them.

    I think MIke Kienenberger might have answered these questions with his
    Manifest example. I'm new to deploying Java appications. I'm sure
    I'll learn a lot more as I attempt more projects in Java.

    I will attempt your suggesions.

    Again, Thank You.

    What is a good mailing list for general java questions or swing
    related questions? I am going bonkers on using swing.JList and trying
    to clear it in a JScrollablePane. My code shows the DefaultModelList
    isEmpty when I call clear() or removeAllElements(), but it still shows
    the data in the list and actually appends any other called data that
    should have been refreshed when the list is loaded with new data. So
    I'm not sure if it is JList, Model, or the JScrollPane.setViewportView
    that I am having difficulty with or if I have to somehow notify the
    component of a change.

    Sorry for the off topic question.

    Michael

    On Wed, 02 Mar 2005 12:31:35 -0500, Mike Kienenberger
    <mkienen..laska.net> wrote:
    > "Gentry, Michael (Contractor)" <michael_gentr..anniemae.com> wrote:
    > > 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).
    >
    > I've built a small project that uses an executable jar.
    >
    > The trick is this:
    >
    > <jar ....
    >
    > <manifest>
    > [...]
    >
    > <attribute name="Class-Path" value="${unlod-base.jar.name}
    > ${jmf.jar.name}"/>
    >
    > <attribute name="Main-Class"
    > value="org.gamenet.application.mm8leveleditor.MM8LevelEditor"/>
    >
    > [...]
    > </manifest>
    >
    > </jar>
    >
    >
    > > -----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 - 18:42:41 EST