hi andrus,
there must be a different handling of the dependencies in eclipse-jetty-launcher and the maven-jetty plugin.
if i run my app with jetty:run i get exceptions like:
2007-02-13 17:09:34.922::WARN: failed CayenneFilter
java.lang.NoClassDefFoundError: org/apache/commons/collections/map/ReferenceMap
at org.objectstyle.cayenne.event.EventSubject.<clinit>(EventSubject.java:82)
at org.objectstyle.cayenne.map.DbRelationship.<clinit>(DbRelationship.java:85)
at org.objectstyle.cayenne.map.MapLoader.processStartDbRelationship(MapLoader.java:556)
at org.objectstyle.cayenne.map.MapLoader.startElement(MapLoader.java:265)
...
i figured out, that one can add dependencies to the plugin, so i added all missing jars there (wich are already defined as dependencies in my pom) like this:
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.objectstyle.cayenne</groupId>
<artifactId>cayenne-nodeps</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>org.objectstyle.cayenne</groupId>
<artifactId>cayenne-modeler</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>1.8.0.1</version>
</dependency>
[...]
</dependencies>
</plugin>
after that jetty:run started without class-cast exception. instead cayenne could not find the jndi-resources.
the hsqldb-files are working, cause i still can start the app using the jetty-launcher-plugin without any problem...
:-(
-----Ursprüngliche Nachricht-----
Von: Andrus Adamchik [mailto:andru..bjectstyle.org]
Gesendet: Dienstag, 13. Februar 2007 16:49
An: use..ayenne.apache.org
Betreff: Re: cayenne with jetty6
Hi Peter,
[I stripped message that you quote, since it has no relation to the
topic you started.]
> perhaps someone could add the docs http://cayenne.apache.org/doc/
> tutorial-webapp.html with some usefull information about jetty6.
I don't think this is Jetty6-related at all.
> even with including all dependencies to the jetty-plugin i failed
> to use the jndi-backup-mechanism, wich i use successfully witch the
> jetty-launcher.
Anything is printed on the console during startup that can shed the
light on the problem?
A few things can go wrong:
* cayenne-modeler.jar and hsqldb.jar can be missing from dependencies
(although your message implies they are not)
* Sometimes local preferences database gets corrupted (it is a long-
standing issue that requires some serious modeler rework, switching
from HSQLDB to Derby or something else more reliable). The workaround
is to delete the preferences directory ($HOME/.cayenne/prefs), and
recreate the data sources from scratch.
Andrus
On Feb 13, 2007, at 6:10 AM, Peter Schröder wrote:
> hi there,
>
> i was trying to run the cayenne-filter with jetty6-maven-plugin,
> but it did not work out for me...
> even with including all dependencies to the jetty-plugin i failed
> to use the jndi-backup-mechanism, wich i use successfully witch the
> jetty-launcher.
>
> perhaps someone could add the docs http://cayenne.apache.org/doc/
> tutorial-webapp.html with some usefull information about jetty6.
>
> kind regards,
> peter
This archive was generated by hypermail 2.0.0 : Tue Feb 13 2007 - 11:19:27 EST