cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Problems running Cayenne ORM Tier and CWS Client Tier on the same JVM.
Date Thu, 24 Jan 2008 08:38:28 GMT

I've got problems running Cayenne ORM Tier and CWS Client Tier on the same JVM.
In Cayenne doc there is described a way for reusing CLIENT objects between server and client.
So i want to 'use this reuse'.

I deploy CWS on my server and put this code somewhere on server JVM (in a SessionBean, actually)
as written in docs:

DataDomain defaultDomain = Configuration.getSharedConfiguration().getDomain();
DataChannel serverChannel = new ClientServerChannel(defaultDomain);
ObjectContext context = new CayenneContext(serverChannel);
Class cl = _myclass_;
SelectQuery select = new SelectQuery(cl);
...and so on

The problem is that it works only when _myclass_ is a STANDART Cayenne class, NOT a CLIENT
cayenne persistence class, otherwise i get the

org.apache.cayenne.CayenneRuntimeException: [v.3.0M2 Oct 28 2007 16:09:02] No DataMap found,
can't route query org.apache.cayenne.query.SelectQuery@6258e1[root=class com.nic.porshe.clc.Uchgroup,name=<null>]

exception! Then where's the 'reuse' of client classes?

When i'm making queries on client using HessianConnection, everything works fine (with client

I think the problem is that Configuration.getSharedConfiguration() returns wrong, 'standart'
configuration. My cayenne.xml and depend xml-description contain information about both types
of classes, client and standart.
So maybe i must fix there?


View raw message