You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Steave <st...@gmail.com> on 2008/09/18 20:23:20 UTC

errors with derby and hsqldb (i need to switch from mysql to an embedded db)

Hello,

I've written a little app wich use cayenne.
I have (quite the same) the following runtime exception  using Derby and
hsqldb, but not using MySql.
The exception is absolutely not clear to me, than please could someone
explain me where I'm doing wrong???

Some notes:
1 - I'm using a custom DataSourceFactory cause I've done some little
integration with Spring framework (inject the datasource during startup),
     I think it is not the problem (I can post the class if you need)
2 - I'm using dbcp to pool connections (may be that dbcp give problems with
embedded dbs? I don't think ... )

the datasource url:
jdbc:hsqldb:file:/Users/steeve_work/hsqldbs/canvassManagerdb
The exception is thrown after  the commit, the select statement returns one
row as expected

Ah, this is the method:

public class CayenneCanvassDao [ ... ]

    public List<Canvass> getCanvasses()
    {
            SelectQuery q = new SelectQuery(CayCanvass.class);
            Ordering o = new Ordering("db:id", Ordering.ASC);
            q.addOrdering(o);
            return (List<Canvass>)getDataContext().performQuery(q);
     }
[ ... ]

CayCanvass extends auto._CayCanvass and implements Canvass (i've done some
abstractions :-) )

Sorry for my BAD engish :-)
MANY MANY MANY THANKS!!!!!

PS, if you need more details, please ask for it!

[the stack trace]
INFO main org.apache.cayenne.conf.RuntimeLoadDelegate - started
configuration loading.
INFO main org.apache.cayenne.conf.RuntimeLoadDelegate - loaded domain:
CanvassDomain
INFO main org.apache.cayenne.conf.RuntimeLoadDelegate - loaded <map
name='CanvassDomainMap' location='CanvassDomainMap.map.xml'>.
INFO main org.apache.cayenne.conf.RuntimeLoadDelegate - loading <node
name='CanvassDomainNode' datasource='CanvassDomainNode.driver.xml'
factory='org.apache.cayenne.conf.DriverDataSourceFactory'>.
INFO main org.apache.cayenne.conf.RuntimeLoadDelegate - using factory:
com.steeve.canvassmanager.orm.cayenne.utils.DataSourceFactoryImpl
INFO main org.apache.cayenne.conf.RuntimeLoadDelegate - loaded datasource.
INFO main org.apache.cayenne.conf.RuntimeLoadDelegate - loaded map-ref:
CanvassDomainMap.
INFO main org.apache.cayenne.conf.RuntimeLoadDelegate - finished
configuration loading in 107 ms.
[...]
INFO http-8080-Processor24 org.apache.cayenne.access.QueryLogger - --- will
run 1 query.
INFO http-8080-Processor24 org.apache.cayenne.access.QueryLogger - ---
transaction started.
INFO http-8080-Processor24 org.apache.cayenne.access.QueryLogger - SELECT
t0.title, t0.id FROM Canvass t0 ORDER BY t0.id - prepared in 34 ms.
INFO http-8080-Processor24 org.apache.cayenne.access.QueryLogger - ===
returned 1 row. - took 83 ms.
INFO http-8080-Processor24 org.apache.cayenne.access.QueryLogger - +++
transaction committed.
INFO http-8080-Processor24 org.apache.cayenne.access.QueryLogger - --- will
run 1 query.
INFO http-8080-Processor24 org.apache.cayenne.access.QueryLogger - ---
transaction started.
INFO http-8080-Processor24 org.apache.cayenne.access.QueryLogger - select *
from  Canvass c where c.id = (select MAX(c.id) from Canvass c)
INFO http-8080-Processor24 org.apache.cayenne.access.QueryLogger - ===
returned 1 row. - took 6 ms.
INFO http-8080-Processor24 org.apache.cayenne.access.QueryLogger - +++
transaction committed.
ERROR http-8080-Processor24
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/GWTCanvassManager]
- Exception while dispatching incoming RPC call
java.lang.RuntimeException:
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public
abstract java.util.List
com.steeve.canvassmanager.gwt.client.rpc.CanvassServices.listCanvasses()'
threw an unexpected exception: org.apache.cayenne.CayenneRuntimeException:
[v.2.0.4 October 8 2007] Null value for 'id'. Snapshot:
org.apache.cayenne.DataRow@25a397[values={TITLE=asd, ID=200},
version=-9223372036854775806, replaces=-9223372036854775808]. Prefix: null
at
org.gwtwidgets.server.spring.GWTRPCServiceExporter.handleExporterProcessingException(GWTRPCServiceExporter.java:344)
at
org.gwtwidgets.server.spring.GWTRPCServiceExporter.processCall(GWTRPCServiceExporter.java:313)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86)
at
org.gwtwidgets.server.spring.GWTRPCServiceExporter.handleRequest(GWTRPCServiceExporter.java:363)
at
org.springframework.web.context.support.HttpRequestHandlerServlet.service(HttpRequestHandlerServlet.java:63)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:613)
Caused by: com.google.gwt.user.server.rpc.UnexpectedException: Service
method 'public abstract java.util.List
com.steeve.canvassmanager.gwt.client.rpc.CanvassServices.listCanvasses()'
threw an unexpected exception: org.apache.cayenne.CayenneRuntimeException:
[v.2.0.4 October 8 2007] Null value for 'id'. Snapshot:
org.apache.cayenne.DataRow@25a397[values={TITLE=asd, ID=200},
version=-9223372036854775806, replaces=-9223372036854775808]. Prefix: null
at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:360)
at
org.gwtwidgets.server.spring.GWTRPCServiceExporter.handleInvocationTargetException(GWTRPCServiceExporter.java:215)
at
org.gwtwidgets.server.spring.GWTRPCServiceExporter.processCall(GWTRPCServiceExporter.java:304)
... 18 more
Caused by: org.apache.cayenne.CayenneRuntimeException: [v.2.0.4 October 8
2007] Null value for 'id'. Snapshot:
org.apache.cayenne.DataRow@25a397[values={TITLE=asd,
ID=200}, version=-9223372036854775806, replaces=-9223372036854775808].
Prefix: null
at
org.apache.cayenne.access.ObjectResolver.createObjectId(ObjectResolver.java:254)
at
org.apache.cayenne.access.ObjectResolver.objectFromDataRow(ObjectResolver.java:196)
at
org.apache.cayenne.access.ObjectResolver.objectsFromDataRows(ObjectResolver.java:117)
at
org.apache.cayenne.access.ObjectResolver.synchronizedObjectsFromDataRows(ObjectResolver.java:97)
at
org.apache.cayenne.access.DataDomainQueryAction.interceptObjectConversion(DataDomainQueryAction.java:319)
at
org.apache.cayenne.access.DataDomainQueryAction.execute(DataDomainQueryAction.java:116)
at org.apache.cayenne.access.DataDomain.onQuery(DataDomain.java:746)
at
org.apache.cayenne.util.ObjectContextQueryAction.runQuery(ObjectContextQueryAction.java:217)
at
org.apache.cayenne.access.DataContextQueryAction.execute(DataContextQueryAction.java:54)
at org.apache.cayenne.access.DataContext.onQuery(DataContext.java:1395)
at org.apache.cayenne.access.DataContext.performQuery(DataContext.java:1384)
at
com.steeve.canvassmanager.dao.cayenne.CayenneCanvassDao.lastCanvass(CayenneCanvassDao.java:58)
at
com.steeve.canvassmanager.gwt.server.rpc.CanvassServicesImpl.listCanvasses(CanvassServicesImpl.java:72)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.gwtwidgets.server.spring.GWTRPCServiceExporter.invokeMethodOnService(GWTRPCServiceExporter.java:148)
at
org.gwtwidgets.server.spring.GWTRPCServiceExporter.processCall(GWTRPCServiceExporter.java:298)
... 18 more

RE: errors with derby and hsqldb (i need to switch from mysql to an embedded db)

Posted by Scott Anderson <sa...@airvana.com>.
> Than I suppose that the problem is hsqldb, which return "ID" as column
> name, also if it was created as "id", am i right?

I've never used HSQLDB, but I know Derby likes to think of its table and
field names as all upper-case. Derby does not, however, appear to be
case sensitive from my experience.

-----Original Message-----
From: Steave [mailto:stefanonafets@gmail.com] 
Sent: Friday, September 19, 2008 9:42 AM
To: user@cayenne.apache.org
Subject: Re: errors with derby and hsqldb (i need to switch from mysql
to an embedded db)

YES IT WORKS!!!!

I've modified both the SQLTemplate string and dbAttribute in Cayenne
Modeler
(i've put every table and column name in uppercase, just to be sure (it
also
looks more sql compliant :-) )) and now it works!!!
I also had to change a "db:id" in "db:ID" somewhere in an ordering
clausule,
but it's ok :-)

Than I suppose that the problem is hsqldb, which return "ID" as column
name,
also if it was created as "id", am i right?

Scott, Andrey, thank you a lot!!!!
Also thanks to all the guys who spend time to develop Cayenne and
support
stupid guys with stupid questions like mine :-)

Thank you!!

ps, sorry for "Steave" name that appair when I send a mails with gmail,
I
don't know why it happens and how to change this behivour.
My name is Stefano Parravicini, sorry if I forgot to inroduce me :-)

Thank you again

2008/9/19 Andrey Razumovsky <ra...@gmail.com>

> Oh, i meant you should probably rename DbAttribute 'id' to 'ID' in
> Cayenne Modeler
>
> 2008/9/19, Andrey Razumovsky <ra...@gmail.com>:
> > Hi Steave,
> >
> >  ID is obviously not null following snapshot output
(values={TITLE=asd,
> >  ID=200}), but ID is uppercase here, so when you use
dataRow.get("id")
> >  it will return null. I think you must use uppercased "id", e.g.
> >
> >
> >  SQLTemplate template = new SQLTemplate(CayCanvass.class, "select *
> >
> > from  Canvass c where c.ID = (select MAX(c.ID) from Canvass c)");
> >
> >  Still, I do not know enough about Derby and HSQL to tell for sure
why
> >  it happened.
> >
> >  Hope that helps,
> >  Andrey
> >
> >  2008/9/18, Steave <st...@gmail.com>:
> >
> > > ps, no rows in Canvass have id column = null ,
> >  >  and the table reflects the ddl written in my last mail
> >  >
> >  >
> >  >  2008/9/18 Steave <st...@gmail.com>
> >  >
> >  >
> >  > > For schema, do you intend the db schema?
> >  >  > If it is,
> >  >  >
> >  >  > well, this is the CREATE statement generated by modeler for
hsqldb:
> >  >  >
> >  >  > CREATE CACHED TABLE Canvass (id BIGINT NOT NULL, title
VARCHAR(150)
> NULL,
> >  >  > PRIMARY KEY (id)
> >  >  > ;
> >  >  >
> >  >  > In the modeler, both "Pk" and "Mandarory" are checked for id
> column.
> >  >  >
> >  >  >
> >  >  > 2008/9/18 Scott Anderson <sa...@airvana.com>
> >  >  >
> >  >  > > Null value for 'id'.
> >  >  >>
> >  >  >> Is id set to NULL in the schema, but MANDATORY in the Cayenne
map?
> I'm
> >  >  >> not sure if I'm interpreting the error correctly, but it
sounds
> like
> >  >  >> Cayenne sees a NULL where it doesn't expect one.
> >  >  >>
> >  >  >
> >  >  >
> >  >
> >
>

Re: errors with derby and hsqldb (i need to switch from mysql to an embedded db)

Posted by Steave <st...@gmail.com>.
YES IT WORKS!!!!

I've modified both the SQLTemplate string and dbAttribute in Cayenne Modeler
(i've put every table and column name in uppercase, just to be sure (it also
looks more sql compliant :-) )) and now it works!!!
I also had to change a "db:id" in "db:ID" somewhere in an ordering clausule,
but it's ok :-)

Than I suppose that the problem is hsqldb, which return "ID" as column name,
also if it was created as "id", am i right?

Scott, Andrey, thank you a lot!!!!
Also thanks to all the guys who spend time to develop Cayenne and support
stupid guys with stupid questions like mine :-)

Thank you!!

ps, sorry for "Steave" name that appair when I send a mails with gmail, I
don't know why it happens and how to change this behivour.
My name is Stefano Parravicini, sorry if I forgot to inroduce me :-)

Thank you again

2008/9/19 Andrey Razumovsky <ra...@gmail.com>

> Oh, i meant you should probably rename DbAttribute 'id' to 'ID' in
> Cayenne Modeler
>
> 2008/9/19, Andrey Razumovsky <ra...@gmail.com>:
> > Hi Steave,
> >
> >  ID is obviously not null following snapshot output (values={TITLE=asd,
> >  ID=200}), but ID is uppercase here, so when you use dataRow.get("id")
> >  it will return null. I think you must use uppercased "id", e.g.
> >
> >
> >  SQLTemplate template = new SQLTemplate(CayCanvass.class, "select *
> >
> > from  Canvass c where c.ID = (select MAX(c.ID) from Canvass c)");
> >
> >  Still, I do not know enough about Derby and HSQL to tell for sure why
> >  it happened.
> >
> >  Hope that helps,
> >  Andrey
> >
> >  2008/9/18, Steave <st...@gmail.com>:
> >
> > > ps, no rows in Canvass have id column = null ,
> >  >  and the table reflects the ddl written in my last mail
> >  >
> >  >
> >  >  2008/9/18 Steave <st...@gmail.com>
> >  >
> >  >
> >  > > For schema, do you intend the db schema?
> >  >  > If it is,
> >  >  >
> >  >  > well, this is the CREATE statement generated by modeler for hsqldb:
> >  >  >
> >  >  > CREATE CACHED TABLE Canvass (id BIGINT NOT NULL, title VARCHAR(150)
> NULL,
> >  >  > PRIMARY KEY (id)
> >  >  > ;
> >  >  >
> >  >  > In the modeler, both "Pk" and "Mandarory" are checked for id
> column.
> >  >  >
> >  >  >
> >  >  > 2008/9/18 Scott Anderson <sa...@airvana.com>
> >  >  >
> >  >  > > Null value for 'id'.
> >  >  >>
> >  >  >> Is id set to NULL in the schema, but MANDATORY in the Cayenne map?
> I'm
> >  >  >> not sure if I'm interpreting the error correctly, but it sounds
> like
> >  >  >> Cayenne sees a NULL where it doesn't expect one.
> >  >  >>
> >  >  >
> >  >  >
> >  >
> >
>

Re: errors with derby and hsqldb (i need to switch from mysql to an embedded db)

Posted by Andrey Razumovsky <ra...@gmail.com>.
Oh, i meant you should probably rename DbAttribute 'id' to 'ID' in
Cayenne Modeler

2008/9/19, Andrey Razumovsky <ra...@gmail.com>:
> Hi Steave,
>
>  ID is obviously not null following snapshot output (values={TITLE=asd,
>  ID=200}), but ID is uppercase here, so when you use dataRow.get("id")
>  it will return null. I think you must use uppercased "id", e.g.
>
>
>  SQLTemplate template = new SQLTemplate(CayCanvass.class, "select *
>
> from  Canvass c where c.ID = (select MAX(c.ID) from Canvass c)");
>
>  Still, I do not know enough about Derby and HSQL to tell for sure why
>  it happened.
>
>  Hope that helps,
>  Andrey
>
>  2008/9/18, Steave <st...@gmail.com>:
>
> > ps, no rows in Canvass have id column = null ,
>  >  and the table reflects the ddl written in my last mail
>  >
>  >
>  >  2008/9/18 Steave <st...@gmail.com>
>  >
>  >
>  > > For schema, do you intend the db schema?
>  >  > If it is,
>  >  >
>  >  > well, this is the CREATE statement generated by modeler for hsqldb:
>  >  >
>  >  > CREATE CACHED TABLE Canvass (id BIGINT NOT NULL, title VARCHAR(150) NULL,
>  >  > PRIMARY KEY (id)
>  >  > ;
>  >  >
>  >  > In the modeler, both "Pk" and "Mandarory" are checked for id column.
>  >  >
>  >  >
>  >  > 2008/9/18 Scott Anderson <sa...@airvana.com>
>  >  >
>  >  > > Null value for 'id'.
>  >  >>
>  >  >> Is id set to NULL in the schema, but MANDATORY in the Cayenne map? I'm
>  >  >> not sure if I'm interpreting the error correctly, but it sounds like
>  >  >> Cayenne sees a NULL where it doesn't expect one.
>  >  >>
>  >  >
>  >  >
>  >
>

Re: errors with derby and hsqldb (i need to switch from mysql to an embedded db)

Posted by Andrey Razumovsky <ra...@gmail.com>.
Hi Steave,

ID is obviously not null following snapshot output (values={TITLE=asd,
ID=200}), but ID is uppercase here, so when you use dataRow.get("id")
it will return null. I think you must use uppercased "id", e.g.

SQLTemplate template = new SQLTemplate(CayCanvass.class, "select *
from  Canvass c where c.ID = (select MAX(c.ID) from Canvass c)");

Still, I do not know enough about Derby and HSQL to tell for sure why
it happened.

Hope that helps,
Andrey

2008/9/18, Steave <st...@gmail.com>:
> ps, no rows in Canvass have id column = null ,
>  and the table reflects the ddl written in my last mail
>
>
>  2008/9/18 Steave <st...@gmail.com>
>
>
> > For schema, do you intend the db schema?
>  > If it is,
>  >
>  > well, this is the CREATE statement generated by modeler for hsqldb:
>  >
>  > CREATE CACHED TABLE Canvass (id BIGINT NOT NULL, title VARCHAR(150) NULL,
>  > PRIMARY KEY (id)
>  > ;
>  >
>  > In the modeler, both "Pk" and "Mandarory" are checked for id column.
>  >
>  >
>  > 2008/9/18 Scott Anderson <sa...@airvana.com>
>  >
>  > > Null value for 'id'.
>  >>
>  >> Is id set to NULL in the schema, but MANDATORY in the Cayenne map? I'm
>  >> not sure if I'm interpreting the error correctly, but it sounds like
>  >> Cayenne sees a NULL where it doesn't expect one.
>  >>
>  >
>  >
>

Re: errors with derby and hsqldb (i need to switch from mysql to an embedded db)

Posted by Steave <st...@gmail.com>.
ps, no rows in Canvass have id column = null ,
and the table reflects the ddl written in my last mail

2008/9/18 Steave <st...@gmail.com>

> For schema, do you intend the db schema?
> If it is,
>
> well, this is the CREATE statement generated by modeler for hsqldb:
>
> CREATE CACHED TABLE Canvass (id BIGINT NOT NULL, title VARCHAR(150) NULL,
> PRIMARY KEY (id)
> ;
>
> In the modeler, both "Pk" and "Mandarory" are checked for id column.
>
>
> 2008/9/18 Scott Anderson <sa...@airvana.com>
>
> > Null value for 'id'.
>>
>> Is id set to NULL in the schema, but MANDATORY in the Cayenne map? I'm
>> not sure if I'm interpreting the error correctly, but it sounds like
>> Cayenne sees a NULL where it doesn't expect one.
>>
>
>

Re: errors with derby and hsqldb (i need to switch from mysql to an embedded db)

Posted by Steave <st...@gmail.com>.
For schema, do you intend the db schema?
If it is,

well, this is the CREATE statement generated by modeler for hsqldb:

CREATE CACHED TABLE Canvass (id BIGINT NOT NULL, title VARCHAR(150) NULL,
PRIMARY KEY (id)
;

In the modeler, both "Pk" and "Mandarory" are checked for id column.


2008/9/18 Scott Anderson <sa...@airvana.com>

> > Null value for 'id'.
>
> Is id set to NULL in the schema, but MANDATORY in the Cayenne map? I'm
> not sure if I'm interpreting the error correctly, but it sounds like
> Cayenne sees a NULL where it doesn't expect one.
>

RE: errors with derby and hsqldb (i need to switch from mysql to an embedded db)

Posted by Scott Anderson <sa...@airvana.com>.
> Null value for 'id'.

Is id set to NULL in the schema, but MANDATORY in the Cayenne map? I'm
not sure if I'm interpreting the error correctly, but it sounds like
Cayenne sees a NULL where it doesn't expect one.

Re: errors with derby and hsqldb (i need to switch from mysql to an embedded db)

Posted by Steave <st...@gmail.com>.
Sorry, I think i've missed the point, the exception occour in this method:

public class CayenneCanvassDao [ ... ]
public Canvass lastCanvass()
{
      SQLTemplate template = new SQLTemplate(CayCanvass.class, "select *
from  Canvass c where c.id = (select MAX(c.id) from Canvass c)");

        List<CayCanvass> res =
(List<CayCanvass>)getDataContext().performQuery(template);
        if ( res.size() == 1)
            return res.get(0);

        return null;
}
[...]

May be that the SQLTemplate ("select * from  Canvass c where c.id = (select
MAX(c.id) from Canvass c)") is not compatible with hsqldb and derby?
It is strange, because the query logger tells that it's ok:

INFO http-8080-Processor24 org.apache.cayenne.access.QueryLogger - ---
transaction started.
INFO http-8080-Processor24 org.apache.cayenne.access.QueryLogger - select *
from  Canvass c where c.id = (select MAX(c.id) from Canvass c)
INFO http-8080-Processor24 org.apache.cayenne.access.QueryLogger - ===
returned 1 row. - took 6 ms.
INFO http-8080-Processor24 org.apache.cayenne.access.QueryLogger - +++
transaction committed.

So in dubt...

2008/9/18 Steave <st...@gmail.com>

> Hello,
>
> I've written a little app wich use cayenne.
> I have (quite the same) the following runtime exception  using Derby and
> hsqldb, but not using MySql.
> The exception is absolutely not clear to me, than please could someone
> explain me where I'm doing wrong???
>
> Some notes:
> 1 - I'm using a custom DataSourceFactory cause I've done some little
> integration with Spring framework (inject the datasource during startup),
>      I think it is not the problem (I can post the class if you need)
> 2 - I'm using dbcp to pool connections (may be that dbcp give problems with
> embedded dbs? I don't think ... )
>
> the datasource url:
> jdbc:hsqldb:file:/Users/steeve_work/hsqldbs/canvassManagerdb
> The exception is thrown after  the commit, the select statement returns one
> row as expected
>
> Ah, this is the method:
>
> public class CayenneCanvassDao [ ... ]
>
>     public List<Canvass> getCanvasses()
>     {
>             SelectQuery q = new SelectQuery(CayCanvass.class);
>             Ordering o = new Ordering("db:id", Ordering.ASC);
>             q.addOrdering(o);
>             return (List<Canvass>)getDataContext().performQuery(q);
>      }
> [ ... ]
>
> CayCanvass extends auto._CayCanvass and implements Canvass (i've done some
> abstractions :-) )
>
> Sorry for my BAD engish :-)
> MANY MANY MANY THANKS!!!!!
>
> PS, if you need more details, please ask for it!
>
> [the stack trace]
> INFO main org.apache.cayenne.conf.RuntimeLoadDelegate - started
> configuration loading.
> INFO main org.apache.cayenne.conf.RuntimeLoadDelegate - loaded domain:
> CanvassDomain
> INFO main org.apache.cayenne.conf.RuntimeLoadDelegate - loaded <map
> name='CanvassDomainMap' location='CanvassDomainMap.map.xml'>.
> INFO main org.apache.cayenne.conf.RuntimeLoadDelegate - loading <node
> name='CanvassDomainNode' datasource='CanvassDomainNode.driver.xml'
> factory='org.apache.cayenne.conf.DriverDataSourceFactory'>.
> INFO main org.apache.cayenne.conf.RuntimeLoadDelegate - using factory:
> com.steeve.canvassmanager.orm.cayenne.utils.DataSourceFactoryImpl
> INFO main org.apache.cayenne.conf.RuntimeLoadDelegate - loaded datasource.
> INFO main org.apache.cayenne.conf.RuntimeLoadDelegate - loaded map-ref:
> CanvassDomainMap.
> INFO main org.apache.cayenne.conf.RuntimeLoadDelegate - finished
> configuration loading in 107 ms.
> [...]
> INFO http-8080-Processor24 org.apache.cayenne.access.QueryLogger - --- will
> run 1 query.
> INFO http-8080-Processor24 org.apache.cayenne.access.QueryLogger - ---
> transaction started.
> INFO http-8080-Processor24 org.apache.cayenne.access.QueryLogger - SELECT
> t0.title, t0.id FROM Canvass t0 ORDER BY t0.id - prepared in 34 ms.
> INFO http-8080-Processor24 org.apache.cayenne.access.QueryLogger - ===
> returned 1 row. - took 83 ms.
> INFO http-8080-Processor24 org.apache.cayenne.access.QueryLogger - +++
> transaction committed.
> INFO http-8080-Processor24 org.apache.cayenne.access.QueryLogger - --- will
> run 1 query.
> INFO http-8080-Processor24 org.apache.cayenne.access.QueryLogger - ---
> transaction started.
> INFO http-8080-Processor24 org.apache.cayenne.access.QueryLogger - select *
> from  Canvass c where c.id = (select MAX(c.id) from Canvass c)
> INFO http-8080-Processor24 org.apache.cayenne.access.QueryLogger - ===
> returned 1 row. - took 6 ms.
> INFO http-8080-Processor24 org.apache.cayenne.access.QueryLogger - +++
> transaction committed.
> ERROR http-8080-Processor24
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/GWTCanvassManager]
> - Exception while dispatching incoming RPC call
> java.lang.RuntimeException:
> com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public
> abstract java.util.List
> com.steeve.canvassmanager.gwt.client.rpc.CanvassServices.listCanvasses()'
> threw an unexpected exception: org.apache.cayenne.CayenneRuntimeException:
> [v.2.0.4 October 8 2007] Null value for 'id'. Snapshot:
> org.apache.cayenne.DataRow@25a397[values={TITLE=asd, ID=200},
> version=-9223372036854775806, replaces=-9223372036854775808]. Prefix: null
> at
> org.gwtwidgets.server.spring.GWTRPCServiceExporter.handleExporterProcessingException(GWTRPCServiceExporter.java:344)
> at
> org.gwtwidgets.server.spring.GWTRPCServiceExporter.processCall(GWTRPCServiceExporter.java:313)
> at
> com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86)
> at
> org.gwtwidgets.server.spring.GWTRPCServiceExporter.handleRequest(GWTRPCServiceExporter.java:363)
> at
> org.springframework.web.context.support.HttpRequestHandlerServlet.service(HttpRequestHandlerServlet.java:63)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
> at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
> at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
> at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
> at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
> at java.lang.Thread.run(Thread.java:613)
> Caused by: com.google.gwt.user.server.rpc.UnexpectedException: Service
> method 'public abstract java.util.List
> com.steeve.canvassmanager.gwt.client.rpc.CanvassServices.listCanvasses()'
> threw an unexpected exception: org.apache.cayenne.CayenneRuntimeException:
> [v.2.0.4 October 8 2007] Null value for 'id'. Snapshot:
> org.apache.cayenne.DataRow@25a397[values={TITLE=asd, ID=200},
> version=-9223372036854775806, replaces=-9223372036854775808]. Prefix: null
> at
> com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:360)
> at
> org.gwtwidgets.server.spring.GWTRPCServiceExporter.handleInvocationTargetException(GWTRPCServiceExporter.java:215)
> at
> org.gwtwidgets.server.spring.GWTRPCServiceExporter.processCall(GWTRPCServiceExporter.java:304)
> ... 18 more
> Caused by: org.apache.cayenne.CayenneRuntimeException: [v.2.0.4 October 8
> 2007] Null value for 'id'. Snapshot: org.apache.cayenne.DataRow@25a397[values={TITLE=asd,
> ID=200}, version=-9223372036854775806, replaces=-9223372036854775808].
> Prefix: null
> at
> org.apache.cayenne.access.ObjectResolver.createObjectId(ObjectResolver.java:254)
> at
> org.apache.cayenne.access.ObjectResolver.objectFromDataRow(ObjectResolver.java:196)
> at
> org.apache.cayenne.access.ObjectResolver.objectsFromDataRows(ObjectResolver.java:117)
> at
> org.apache.cayenne.access.ObjectResolver.synchronizedObjectsFromDataRows(ObjectResolver.java:97)
> at
> org.apache.cayenne.access.DataDomainQueryAction.interceptObjectConversion(DataDomainQueryAction.java:319)
> at
> org.apache.cayenne.access.DataDomainQueryAction.execute(DataDomainQueryAction.java:116)
> at org.apache.cayenne.access.DataDomain.onQuery(DataDomain.java:746)
> at
> org.apache.cayenne.util.ObjectContextQueryAction.runQuery(ObjectContextQueryAction.java:217)
> at
> org.apache.cayenne.access.DataContextQueryAction.execute(DataContextQueryAction.java:54)
> at org.apache.cayenne.access.DataContext.onQuery(DataContext.java:1395)
> at
> org.apache.cayenne.access.DataContext.performQuery(DataContext.java:1384)
> at
> com.steeve.canvassmanager.dao.cayenne.CayenneCanvassDao.lastCanvass(CayenneCanvassDao.java:58)
> at
> com.steeve.canvassmanager.gwt.server.rpc.CanvassServicesImpl.listCanvasses(CanvassServicesImpl.java:72)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
> org.gwtwidgets.server.spring.GWTRPCServiceExporter.invokeMethodOnService(GWTRPCServiceExporter.java:148)
> at
> org.gwtwidgets.server.spring.GWTRPCServiceExporter.processCall(GWTRPCServiceExporter.java:298)
> ... 18 more
>