Hi,
I have upgraded to cayanne 2.0.1 from 1.2.1
I have opened the cayenne.xml file with the new modeler and accepted to
upgrade.
then I have generated the dataobjects again and saved cayanne.xml.
I have copied the knew cayanne.jar file to my lib directory, but when I
try to run simple queries I get the following exception:
java.lang.NoClassDefFoundError: org/objectstyle/cayenne/query/Query
see details below.
it seems to be looking for the old Query class.
is it this a bug in the deployment of Cayenne or is it that I am doing
some thing wrong?
cheers
felipe
package test;
import java.util.List;
import org.apache.cayenne.CayenneException;
import org.apache.cayenne.access.DataContext;
import org.apache.cayenne.access.ResultIterator;
import org.apache.cayenne.query.SelectQuery;
import be.eurocontrol.pacs.cayenne.MeteoData;
import com.sun.jmx.mbeanserver.MetaData;
import sun.net.www.MeteredStream;
public class CleanMetarDataTest {
public static void main(String[] args) {
DataContext context = DataContext.createDataContext();
SelectQuery q = new SelectQuery(MeteoData.class);
List list = context.performQuery(q);
System.out.println(list.size());
}
INFO RuntimeLoadDelegate: started configuration loading.
INFO RuntimeLoadDelegate: loaded domain: PacsDomain
INFO RuntimeLoadDelegate: loaded <map name='PacsDomainMap'
location='PacsDomainMap.map.xml'>.
INFO RuntimeLoadDelegate: loading <node name='PacsDomainNode'
datasource='PacsDomainNode.driver.xml'
factory='org.apache.cayenne.conf.DriverDataSourceFactory'>.
INFO RuntimeLoadDelegate: using factory:
org.apache.cayenne.conf.DriverDataSourceFactory
INFO DriverDataSourceFactory: loading driver information from
'PacsDomainNode.driver.xml'.
INFO DriverDataSourceFactory: loading driver
oracle.jdbc.driver.OracleDriver
INFO DriverDataSourceFactory: loading user name and password.
INFO QueryLogger: Created connection pool:
jdbc:oracle:thin..risme8.eatchip.eurocontrol.be:1521:pe8
Driver class: oracle.jdbc.driver.OracleDriver
Min. connections in the pool: 1
Max. connections in the pool: 1
INFO RuntimeLoadDelegate: loaded datasource.
INFO RuntimeLoadDelegate: no adapter set, using automatic adapter.
INFO RuntimeLoadDelegate: loaded map-ref: PacsDomainMap.
INFO RuntimeLoadDelegate: finished configuration loading in 312 ms.
Exception in thread "main" java.lang.NoClassDefFoundError:
org/objectstyle/cayenne/query/Query
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.apache.cayenne.util.Util.getJavaClass(Util.java:579)
at
org.apache.cayenne.map.ObjEntity.getJavaClass(ObjEntity.java:224)
at
org.apache.cayenne.map.EntityResolver.constructCache(EntityResolver.java
:248)
at
org.apache.cayenne.map.EntityResolver._lookupObjEntity(EntityResolver.ja
va:607)
at
org.apache.cayenne.map.EntityResolver.lookupObjEntity(EntityResolver.jav
a:468)
at
org.apache.cayenne.query.BaseQueryMetadata.resolve(BaseQueryMetadata.jav
a:97)
at
org.apache.cayenne.query.SelectQuery.getMetaData(SelectQuery.java:151)
at
org.apache.cayenne.util.ObjectContextQueryAction.<init>(ObjectContextQue
ryAction.java:69)
at
org.apache.cayenne.access.DataContextQueryAction.<init>(DataContextQuery
Action.java:46)
at
org.apache.cayenne.access.DataContext.onQuery(DataContext.java:1386)
at org.apache.cayenne.access.DataContext.perf
____
This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful.
Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL, unless it is confirmed by appropriately signed hard copy.
Any views expressed in this message are those of the sender.
This archive was generated by hypermail 2.0.0 : Mon Oct 09 2006 - 07:11:01 EDT