Re: field with auto-increment

Raoul Pierre <[email protected]>
Newsgroups gmane.comp.java.keel.devel
Message-ID <[email protected]>
Gene,

I get error with hsqldb.

Keel creates database with sql command  like:

CREATE TABLE T_person (personId INTEGER not null, lastname VARCHAR(80) 
not null, firstname VARCHAR(80) not null, birthdate VARCHAR(80) null, 
birthplace VARCHAR(80) null, PRIMARY KEY (personId))

with no "identity" instruction for personId field,

and then:

[AbstractWebappClientConnector] Set working dir to 'C:\Program 
Files\Apache Software Foundation\Tomcat 5.0\webapps\pop4\WEB-INF'
java.lang.NullPointerException
    at 
org.keel.services.persist.defaultpersist.DefaultPersistentBase.setAutoIncrement(DefaultPersistentBase.java:1612)
    at 
org.keel.services.persist.defaultpersist.DefaultPersistent.add(DefaultPersistent.java:143)
    at 
org.keel.services.persist.base.AbstractPersistentFactory.createRecords(AbstractPersistentFactory.java:554)
    at 
org.keel.services.persist.defaultpersist.DefaultPersistentFactory.createTables(DefaultPersistentFactory.java:203)
    at 
org.keel.services.persist.defaultpersist.DefaultPersistentFactory.createTables(DefaultPersistentFactory.java:218)
    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:324)
    at 
org.apache.avalon.fortress.impl.factory.PassThroughInvocationHandler.invoke(PassThroughInvocationHandler.java:68)
    at $Proxy10.createTables(Unknown Source)
    at org.keel.models.util.CreateDB.execute(CreateDB.java:48)
    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:324)
    at 
org.apache.avalon.fortress.impl.factory.PassThroughInvocationHandler.invoke(PassThroughInvocationHandler.java:68)
    at $Proxy3.execute(Unknown Source)
    at 
org.keel.services.model.defaultmodel.DefaultModelRequest.execute(DefaultModelRequest.java:195)
    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:324)
    at 
org.apache.avalon.fortress.impl.factory.PassThroughInvocationHandler.invoke(PassThroughInvocationHandler.java:68)
    at $Proxy1.execute(Unknown Source)
    at 
org.keel.servers.direct.KeelDirectServer.execute(KeelDirectServer.java:230)
    at 
org.keel.servers.direct.KeelDirectServer$MultiThreadedProcessor.run(KeelDirectServer.java:271)
12 avr. 2005 23:17:39 org.keel.clients.DefaultClientConnector logError
GRAVE: No elements in response from server
12 avr. 2005 23:17:39 org.keel.clients.DefaultClientConnector logError
GRAVE: Stack for error from createdb, Key: 'nodb Message: Unable to 
create database tables:
org.keel.services.persist.PersistenceException:
    at 
org.keel.services.persist.defaultpersist.DefaultPersistentFactory.createTables(DefaultPersistentFactory.java:211)
    at 
org.keel.services.persist.defaultpersist.DefaultPersistentFactory.createTables(DefaultPersistentFactory.java:218)
    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:324)
    at 
org.apache.avalon.fortress.impl.factory.PassThroughInvocationHandler.invoke(PassThroughInvocationHandler.java:68)
    at $Proxy10.createTables(Unknown Source)
    at org.keel.models.util.CreateDB.execute(CreateDB.java:48)
    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:324)
    at 
org.apache.avalon.fortress.impl.factory.PassThroughInvocationHandler.invoke(PassThroughInvocationHandler.java:68)
    at $Proxy3.execute(Unknown Source)
    at 
org.keel.services.model.defaultmodel.DefaultModelRequest.execute(DefaultModelRequest.java:195)
    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:324)
    at 
org.apache.avalon.fortress.impl.factory.PassThroughInvocationHandler.invoke(PassThroughInvocationHandler.java:68)
    at $Proxy1.execute(Unknown Source)
    at 
org.keel.servers.direct.KeelDirectServer.execute(KeelDirectServer.java:230)
    at 
org.keel.servers.direct.KeelDirectServer$MultiThreadedProcessor.run(KeelDirectServer.java:271)

-----------------------------------------
java.lang.NullPointerException
    at 
org.keel.services.persist.defaultpersist.DefaultPersistentBase.setAutoIncrement(DefaultPersistentBase.java:1612)
    at 
org.keel.services.persist.defaultpersist.DefaultPersistent.add(DefaultPersistent.java:143)


Any idea?

Pierre


Gene a écrit :

> I use it successfully with svc-persist-default and mysql, but don't 
> know about hsqlDB.  All that confirms is that the xdoclet tags are 
> being generated properly.
>
> hth
> gene
>
> Raoul Pierre wrote:
>
>> Hello,
>>
>> Can we use
>>
>>     *  auto-increment="identity"
>>
>> in a @persist.field meta data with svc-persist-default and hsqlDB?
>>
>> Pierre
>>
>>
>>
>>
>> http://keelframework.org/documentation.shtml
>> Keelgroup mailing list
>> [email protected]
>> http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com
>>
> http://keelframework.org/documentation.shtml
> Keelgroup mailing list
> [email protected]
> http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com
>
>
>




http://keelframework.org/documentation.shtml
Keelgroup mailing list
[email protected]
http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.