Eclipse + Jetty + Tapestry

From: sastan (sasta..-d-o-t.com)
Date: Fri Apr 29 2005 - 06:31:11 EDT

  • Next message: Damir Bijuklic: "Re: Problems with cayenne, tapestry and postgres"

    Hello,

    i try to get Cayenne work with Tapestry + JettyLauncher + Eclipse. I set
    a very simple use case. It is only a page with a form to save a title in
    a db. I create a table in the db with an id-field and a title-field. The
    created files are below.

    Starting the app i get the following exception.

    org.objectstyle.cayenne.CayenneRuntimeException [v.1.1.1 March 13 2005]
    No DataMap found for query with root: class edot.todolist.ToDo
    unlabeledMessage: No DataMap found for query with root: class
    edot.todolist.ToDo Stack Trace:
          * org.objectstyle.cayenne.access.DataDomain.performQueries(DataDomain.java:633)
          * org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.java:1408)
          * org.objectstyle.cayenne.access.Transaction.performQueries(Transaction.java:179)
          * org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.java:1366)
          * org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java:1622)
          * org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java:1485)
          * edot.todolist.Home.pageBeginRender(Home.java:43)

    In the pageBeginRender() Method i simple do:
    ((Visit) getVisit()).getContext().performQuery(new
    SelectQuery(ToDo.class));

    Thats all. I allready put Cayenne.jar as first in the classpath. The
    generated xml-files are directliy in the src-folder and also in the
    contect/WEB-INF/classes-folder.

    I thank you for any help.

    sastan

    ######
    <data-map project-version="1.1">
            <property name="defaultPackage" value="edot.todolist"/>
            <db-entity name="ToDo">
                    <db-attribute name="id" type="INTEGER" isPrimaryKey="true"
    isMandatory="true"/>
                    <db-attribute name="title" type="LONGVARCHAR" isMandatory="true"/>
            </db-entity>
            <obj-entity name="ToDo" className="edot.todolist.ToDo"
    dbEntityName="ToDo">
                    <obj-attribute name="title" type="java.lang.String"
    db-attribute-path="title"/>
            </obj-entity>
    </data-map>

    #####
    package edot.todolist;

    import auto._ToDo;

    public class ToDo extends _ToDo {

    }
    ####
    package auto;

    /** Class _ToDo was generated by Cayenne.
      * It is probably a good idea to avoid changing this class manually,
      * since it may be overwritten next time code is regenerated.
      * If you need to make any customizations, please use subclass.
      */
    public class _ToDo extends org.objectstyle.cayenne.CayenneDataObject {

        public static final String TITLE_PROPERTY = "title";

        public static final String ID_PK_COLUMN = "id";

        public void setTitle(String title) {
            writeProperty("title", title);
        }
        public String getTitle() {
            return (String)readProperty("title");
        }
    }



    This archive was generated by hypermail 2.0.0 : Fri Apr 29 2005 - 06:31:25 EDT