Re: Remote Example

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Apr 28 2009 - 05:17:46 EDT

  • Next message: Peter: "Re: Remote Example"

    Thanks, maybe we'll finally update the examples for inclusion with the
    download.

    Andrus

    On Apr 26, 2009, at 12:22 AM, Peter Karich wrote:

    > Hi again,
    >
    > finally I got the mavenized tutorial in the subversion working.
    >
    > So, again step by step:
    >
    > 1. get the remote-object-persistence-tutorial from source and replace
    > the dependencies with the latest versions (I used cayenne 3.0M5 - see
    > the appended pom's).
    >
    > 2. update the autogenerated classes with the 3.0M5 modeler (upgrading
    > the cayenne.xml to the latest version was done by the modeler
    > automagically)
    >
    > 3. set up the database correctly (I used h2) und create the schema
    > with
    > the modeler (generate db schema)
    >
    > 4. start the webapp via mvn jetty:run
    > Check if the webapplication is properly running:
    > A. no exceptions in the logs [1]
    > B. go to http://localhost:8080/cayenne-rop-server-tutorial/ should
    > show you 'Artists: No artists found'
    >
    > 5. start the client
    > Check if this was successful:
    > A. no exceptions in the logs [2]
    > B. if you uncomment the line with 'deleteChapter(context)' and run
    > the
    > client again, then there should be 'Artists:Pablo Picasso' visible
    > (e.g.
    > check with the browser)
    >
    > Hope someone can benefit from this.
    >
    > Regards,
    > Peter.
    >
    >
    > [1]
    > 2009-04-25 23:07:31.806::INFO: Logging to STDERR via
    > org.mortbay.log.StdErrLog
    > [jetty:run]
    > Configuring Jetty for project: Cayenne ROP Server Tutorial
    > Webapp source directory =
    > /home/peterk/Dokumente/quell/cayenne-src/docs/quick-start-rop/
    > cayenne-rop-server-tutorial/src/main/webapp
    > Reload Mechanic: automatic
    > web.xml file =
    > /home/peterk/Dokumente/quell/cayenne-src/docs/quick-start-rop/
    > cayenne-rop-server-tutorial/src/main/webapp/WEB-INF/web.xml
    > Classes =
    > /home/peterk/Dokumente/quell/cayenne-src/docs/quick-start-rop/
    > cayenne-rop-server-tutorial/target/classes
    > Configuring Jetty from xml configuration file =
    > /home/peterk/Dokumente/quell/cayenne-src/docs/quick-start-rop/
    > cayenne-rop-server-tutorial/jetty-run-config.xml
    > Context path = /cayenne-rop-server-tutorial
    > Tmp directory = determined at runtime
    > Web defaults = org/mortbay/jetty/webapp/webdefault.xml
    > Web overrides = none
    > Webapp directory =
    > /home/peterk/Dokumente/quell/cayenne-src/docs/quick-start-rop/
    > cayenne-rop-server-tutorial/src/main/webapp
    > Starting jetty 6.1.16 ...
    > 2009-04-25 23:07:32.177::INFO: jetty-6.1.16
    > 2009-04-25 23:07:32.480::INFO: No Transaction manager found - if your
    > webapp requires one, please configure one.
    > 25.04.2009 23:07:32 org.apache.cayenne.conf.RuntimeLoadDelegate
    > startedLoading
    > INFO: started configuration loading.
    > 25.04.2009 23:07:32 org.apache.cayenne.conf.RuntimeLoadDelegate
    > shouldLoadDataDomain
    > INFO: loaded domain: ROPServerTutorial
    > 25.04.2009 23:07:33 org.apache.cayenne.conf.RuntimeLoadDelegate
    > loadDataMap
    > INFO: loaded <map name='ROPServerTutorialDomainMap'
    > location='ROPServerTutorialDomainMap.map.xml'>.
    > 25.04.2009 23:07:33 org.apache.cayenne.conf.RuntimeLoadDelegate
    > shouldLoadDataNode
    > INFO: loading <node name='ROPServerTutorialDomainNode'
    > datasource='ROPServerTutorialDomainNode.driver.xml'
    > factory='org.apache.cayenne.conf.DriverDataSourceFactory'>.
    > 25.04.2009 23:07:33 org.apache.cayenne.conf.RuntimeLoadDelegate
    > shouldLoadDataNode
    > INFO: using factory: org.apache.cayenne.conf.DriverDataSourceFactory
    > 25.04.2009 23:07:33 org.apache.cayenne.conf.DriverDataSourceFactory
    > load
    > INFO: loading driver information from
    > 'ROPServerTutorialDomainNode.driver.xml'.
    > 25.04.2009 23:07:33
    > org.apache.cayenne.conf.DriverDataSourceFactory$DriverHandler init
    > INFO: loading driver org.h2.Driver
    > 25.04.2009 23:07:33
    > org.apache.cayenne.conf.DriverDataSourceFactory$LoginHandler init
    > INFO: loading user name and password.
    > 25.04.2009 23:07:33 org.apache.cayenne.access.QueryLogger
    > logPoolCreated
    > INFO: Created connection pool:
    > jdbc:h2:/home/peterk/Dokumente/quell/cayenne-src/docs/quick-start-
    > rop/db/h2db;MVCC=TRUE
    > Driver class: org.h2.Driver
    > Min. connections in the pool: 1
    > Max. connections in the pool: 1
    > 25.04.2009 23:07:33 org.apache.cayenne.conf.RuntimeLoadDelegate
    > shouldLoadDataNode
    > INFO: loaded datasource.
    > 25.04.2009 23:07:33 org.apache.cayenne.conf.RuntimeLoadDelegate
    > initAdapter
    > INFO: no adapter set, using automatic adapter.
    > 25.04.2009 23:07:33 org.apache.cayenne.conf.RuntimeLoadDelegate
    > shouldLinkDataMap
    > INFO: loaded map-ref: ROPServerTutorialDomainMap.
    > 25.04.2009 23:07:33 org.apache.cayenne.conf.RuntimeLoadDelegate
    > finishedLoading
    > INFO: finished configuration loading in 436 ms.
    > 2009-04-25 23:07:33.642::INFO: Started
    > SelectChannelConnecto...0.0.0:8080
    > Started Jetty Server
    >
    >
    >
    > [2]
    > 25.04.2009 23:18:53
    > org.apache.cayenne.remote.hessian.HessianConnection
    > connect
    > INFO: Connecting to
    > [cayenne-user:******..ttp://localhost:8080/cayenne-rop-server-tutorial/cayenne-service
    > ]
    > - dedicated session.
    > 25.04.2009 23:18:53
    > org.apache.cayenne.remote.hessian.HessianConnection
    > connect
    > INFO: === Connected, session:
    > org
    > .apache.cayenne.remote.RemoteSessio..6e431[sessionId=1wpdq1onkfmua]
    > - took 295 ms.
    > 25.04.2009 23:18:53 org.apache.cayenne.remote.BaseConnection
    > sendMessage
    > INFO: --- Message 0: Bootstrap
    > 25.04.2009 23:18:53 org.apache.cayenne.remote.BaseConnection
    > sendMessage
    > INFO: === Message 0: Bootstrap done - took 170 ms.
    > 25.04.2009 23:18:53 org.apache.cayenne.remote.BaseConnection
    > sendMessage
    > INFO: --- Message 1: Query
    > 25.04.2009 23:18:53 org.apache.cayenne.remote.BaseConnection
    > sendMessage
    > INFO: === Message 1: Query done - took 61 ms.
    > 25.04.2009 23:18:53 org.apache.cayenne.remote.BaseConnection
    > sendMessage
    > INFO: --- Message 2: flush-cascade-sync
    > 25.04.2009 23:18:53 org.apache.cayenne.remote.BaseConnection
    > sendMessage
    > INFO: === Message 2: flush-cascade-sync done - took 59 ms.
    > 25.04.2009 23:18:53 org.apache.cayenne.remote.BaseConnection
    > sendMessage
    > INFO: --- Message 3: Query
    > 25.04.2009 23:18:53 org.apache.cayenne.remote.BaseConnection
    > sendMessage
    > INFO: === Message 3: Query done - took 23 ms.
    > 25.04.2009 23:18:54 org.apache.cayenne.remote.BaseConnection
    > sendMessage
    > INFO: --- Message 4: Query
    > 25.04.2009 23:18:54 org.apache.cayenne.remote.BaseConnection
    > sendMessage
    > INFO: === Message 4: Query done - took 18 ms.
    > 25.04.2009 23:18:54 org.apache.cayenne.remote.BaseConnection
    > sendMessage
    > INFO: --- Message 5: Query
    > 25.04.2009 23:18:54 org.apache.cayenne.remote.BaseConnection
    > sendMessage
    > INFO: === Message 5: Query done - took 23 ms.
    > <!--
    > Licensed to the Apache Software Foundation (ASF) under one
    > or more contributor license agreements. See the NOTICE file
    > distributed with this work for additional information
    > regarding copyright ownership. The ASF licenses this file
    > to you under the Apache License, Version 2.0 (the
    > "License"); you may not use this file except in compliance
    > with the License. You may obtain a copy of the License at
    >
    > http://www.apache.org/licenses/LICENSE-2.0
    >
    > Unless required by applicable law or agreed to in writing,
    > software distributed under the License is distributed on an
    > "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    > KIND, either express or implied. See the License for the
    > specific language governing permissions and limitations
    > under the License.
    > -->
    > <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
    > "
    >
    > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd
    > ">
    >
    > <modelVersion>4.0.0</modelVersion>
    >
    > <parent>
    > <groupId>org.apache.cayenne.rop.tutorials</groupId>
    > <artifactId>cayenne-rop-tutorial-parent</artifactId>
    > <version>3.0-SNAPSHOT</version>
    > </parent>
    >
    > <artifactId>cayenne-rop-client-tutorial</artifactId>
    > <packaging>jar</packaging>
    > <name>Cayenne ROP Client Tutorial</name>
    > <dependencies>
    >
    > <dependency>
    > <groupId>org.apache.cayenne</groupId>
    > <artifactId>cayenne-server</artifactId>
    > <version>3.0M5</version>
    > </dependency>
    >
    > <dependency>
    > <groupId>org.objectstyle.ashwood</groupId>
    > <artifactId>ashwood</artifactId>
    > <version>2.0</version>
    > </dependency>
    >
    > <dependency>
    > <groupId>asm</groupId>
    > <artifactId>asm</artifactId>
    > <version>3.0</version>
    > </dependency>
    >
    > <dependency>
    > <groupId>asm</groupId>
    > <artifactId>asm-commons</artifactId>
    > <version>3.0</version>
    > </dependency>
    >
    > <dependency>
    > <groupId>commons-collections</groupId>
    > <artifactId>commons-collections</artifactId>
    > <version>3.1</version>
    > </dependency>
    >
    > <dependency>
    > <groupId>commons-logging</groupId>
    > <artifactId>commons-logging</artifactId>
    > <version>1.1</version>
    > <exclusions>
    > <exclusion>
    > <groupId>log4j</groupId>
    > <artifactId>log4j</artifactId>
    > </exclusion>
    > <exclusion>
    > <groupId>logkit</groupId>
    > <artifactId>logkit</artifactId>
    > </exclusion>
    > <exclusion>
    > <groupId>junit</groupId>
    > <artifactId>junit</artifactId>
    > </exclusion>
    > <exclusion>
    > <groupId>avalon-framework</groupId>
    > <artifactId>avalon-framework</artifactId>
    > </exclusion>
    > <exclusion>
    > <groupId>javax.servlet</groupId>
    > <artifactId>servlet-api</artifactId>
    > </exclusion>
    > </exclusions>
    > </dependency>
    >
    > <dependency>
    > <groupId>com.caucho</groupId>
    > <artifactId>resin-hessian</artifactId>
    > <version>3.1.6</version>
    > <scope>provided</scope>
    > </dependency>
    >
    > </dependencies>
    >
    > <build>
    > <plugins>
    > <plugin>
    > <groupId>org.apache.maven.plugins</groupId>
    > <artifactId>maven-jar-plugin</artifactId>
    > <configuration>
    > <archive>
    > <manifest>
    > <mainClass>cayenne.tutorial.client.Main</
    > mainClass>
    > <addClasspath>true</addClasspath>
    > </manifest>
    > </archive>
    > </configuration>
    > </plugin>
    > <plugin>
    > <artifactId>maven-compiler-plugin</artifactId>
    > <version>2.0.2</version>
    > <configuration>
    > <source>1.5</source>
    > <target>1.5</target>
    > <encoding>UTF-8</encoding>
    > </configuration>
    > </plugin>
    > <plugin>
    > <groupId>org.apache.maven.plugins</groupId>
    > <artifactId>maven-dependency-plugin</artifactId>
    > <executions>
    > <execution>
    > <id>copy-dependencies</id>
    > <phase>package</phase>
    > <goals>
    > <goal>copy-dependencies</goal>
    > </goals>
    >
    > <configuration>
    > <outputDirectory>$
    > {project.build.directory}</outputDirectory>
    > <overWriteReleases>false</
    > overWriteReleases>
    > <overWriteSnapshots>true</
    > overWriteSnapshots>
    > </configuration>
    >
    > </execution>
    > </executions>
    > </plugin>
    > </plugins>
    > </build>
    >
    > <pluginRepositories>
    > <pluginRepository>
    > <snapshots>
    > <enabled>true</enabled>
    > <updatePolicy>daily</updatePolicy>
    > </snapshots>
    > <id>apache-snapshot-repo</id>
    > <name>apache-snapshot-repo</name>
    > <url>http://people.apache.org/repo/m2-snapshot-
    > repository</url>
    > </pluginRepository>
    > </pluginRepositories>
    >
    > <repositories>
    > <repository>
    > <snapshots>
    > <enabled>true</enabled>
    > <updatePolicy>daily</updatePolicy>
    > </snapshots>
    > <id>apache-snapshot-repo</id>
    > <name>apache-snapshot-repo</name>
    > <url>http://people.apache.org/repo/m2-snapshot-
    > repository</url>
    > </repository>
    >
    > <repository>
    > <id>caucho</id>
    > <name>Caucho Repository</name>
    > <url>http://caucho.com/m2>
    > <layout>default</layout>
    > <snapshots>
    > <enabled>false</enabled>
    > </snapshots>
    > <releases>
    > <enabled>true</enabled>
    > </releases>
    > </repository>
    >
    > </repositories>
    > </project>
    >
    > <?xml version="1.0" encoding="UTF-8"?>
    >
    > <!--
    >
    > Licensed to the Apache Software Foundation (ASF) under one
    > or more contributor license agreements. See the NOTICE file
    > distributed with this work for additional information
    > regarding copyright ownership. The ASF licenses this file
    > to you under the Apache License, Version 2.0 (the
    > "License"); you may not use this file except in compliance
    > with the License. You may obtain a copy of the License at
    >
    >
    http://www.apache.org/licenses/LICENSE-2.0
    >
    > Unless required by applicable law or agreed to in writing,
    > software distributed under the License is distributed on an
    > "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    > KIND, either express or implied. See the License for the
    > specific language governing permissions and limitations
    > under the License.
    > -->
    >
    >
    >
    > <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
    > "
    >
    > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd
    > ">
    >
    > <modelVersion>4.0.0</modelVersion>
    >
    > <parent>
    > <groupId>org.apache.cayenne.rop.tutorials</groupId>
    > <artifactId>cayenne-rop-tutorial-parent</artifactId>
    > <version>3.0-SNAPSHOT</version>
    > </parent>
    >
    > <artifactId>cayenne-rop-server-tutorial</artifactId>
    > <packaging>war</packaging>
    > <name>Cayenne ROP Server Tutorial</name>
    >
    > <dependencies>
    >
    > <dependency>
    > <groupId>org.apache.cayenne</groupId>
    > <artifactId>cayenne-server</artifactId>
    > <version>3.0M5</version>
    > </dependency>
    >
    > <dependency>
    > <groupId>org.objectstyle.ashwood</groupId>
    > <artifactId>ashwood</artifactId>
    > <version>2.0</version>
    > </dependency>
    >
    > <dependency>
    > <groupId>asm</groupId>
    > <artifactId>asm</artifactId>
    > <version>3.0</version>
    > </dependency>
    >
    > <dependency>
    > <groupId>asm</groupId>
    > <artifactId>asm-commons</artifactId>
    > <version>3.0</version>
    > </dependency>
    >
    > <dependency>
    > <groupId>commons-collections</groupId>
    > <artifactId>commons-collections</artifactId>
    > <version>3.1</version>
    > </dependency>
    >
    > <dependency>
    > <groupId>commons-logging</groupId>
    > <artifactId>commons-logging</artifactId>
    > <version>1.1</version>
    > <exclusions>
    > <exclusion>
    > <groupId>log4j</groupId>
    > <artifactId>log4j</artifactId>
    > </exclusion>
    > <exclusion>
    > <groupId>logkit</groupId>
    > <artifactId>logkit</artifactId>
    > </exclusion>
    > <exclusion>
    > <groupId>junit</groupId>
    > <artifactId>junit</artifactId>
    > </exclusion>
    > <exclusion>
    > <groupId>avalon-framework</groupId>
    > <artifactId>avalon-framework</artifactId>
    > </exclusion>
    > <exclusion>
    > <groupId>javax.servlet</groupId>
    > <artifactId>servlet-api</artifactId>
    > </exclusion>
    > </exclusions>
    > </dependency>
    >
    > <dependency>
    > <groupId>velocity</groupId>
    > <artifactId>velocity</artifactId>
    > <version>1.3</version>
    > </dependency>
    >
    > <!--<dependency>
    > <groupId>org.apache.derby</groupId>
    > <artifactId>derby</artifactId>
    > <version>10.4.2.0</version>
    > </dependency>-->
    >
    > <dependency>
    > <groupId>com.h2database</groupId>
    > <artifactId>h2</artifactId>
    > <version>1.1.111</version>
    > </dependency>
    >
    > <dependency>
    > <groupId>com.caucho</groupId>
    > <artifactId>resin-hessian</artifactId>
    > <version>3.1.6</version>
    > <!--<scope>provided</scope>-->
    > <scope>compile</scope>
    > </dependency>
    >
    > <dependency>
    > <groupId>org.apache.cayenne.rop.tutorials</groupId>
    > <artifactId>cayenne-rop-client-tutorial</artifactId>
    > <version>${version}</version>
    > </dependency>
    > </dependencies>
    >
    > <build>
    > <finalName>cayenne-rop-server-tutorial</finalName>
    > <plugins>
    > <plugin>
    > <groupId>org.mortbay.jetty</groupId>
    > <artifactId>maven-jetty-plugin</artifactId>
    > <configuration>
    > <jettyConfig>jetty-run-config.xml</jettyConfig>
    > <userRealms>
    > <userRealm
    > implementation="org.mortbay.jetty.security.HashUserRealm">
    > <name>Cayenne Realm</name>
    > <config>jetty-realm.properties</config>
    > </userRealm>
    > </userRealms>
    > </configuration>
    > </plugin>
    > <plugin>
    > <artifactId>maven-compiler-plugin</artifactId>
    > <version>2.0.2</version>
    > <configuration>
    > <source>1.6</source>
    > <target>1.6</target>
    > <encoding>UTF-8</encoding>
    > </configuration>
    > </plugin>
    > </plugins>
    > </build>
    >
    > <repositories>
    > <repository>
    > <id>apache-snapshots</id>
    > <name>Apache Snapshots Repository</name>
    > <url>http://people.apache.org/repo/m2-snapshot-repository/
    > </url>
    > <layout>default</layout>
    > <snapshots>
    > <enabled>true</enabled>
    > <updatePolicy>weekly</updatePolicy>
    > <checksumPolicy>ignore</checksumPolicy>
    > </snapshots>
    > </repository>
    > <repository>
    > <id>caucho</id>
    > <name>Caucho Repository</name>
    > <url>http://caucho.com/m2>
    > <layout>default</layout>
    > <snapshots>
    > <enabled>false</enabled>
    > </snapshots>
    > <releases>
    > <enabled>true</enabled>
    > </releases>
    > </repository>
    > </repositories>
    >
    > </project>
    >



    This archive was generated by hypermail 2.0.0 : Tue Apr 28 2009 - 05:18:31 EDT