Hi Stefan,

Thanks for your response. I guess the issue is something else. Because if I 
comment the properties I've mentioned below, the Migrations work without any 
error.

Farrukh

On 2010-09-23, at 10:47 AM, Stefan Klein wrote:

> Hi Farrukh,
> 
> my first guess is, that the db user you are using does not have write 
> permissions.
> 
> On the other hand I had the same exceptions playing with ERMigration and 
> MaxDB:
> 
> 1) MaxDB doesn't like the table name _dbupdater (only with surrounded ")
> 2) Tried er.migration.JDBC.dbUpdaterTableName=DBUPDATESTATE in the Properties 
> file
> 3) Stumbled in uppercase - lowercase pitfall
> 4) Created table DBUPDATER via sql
> 
> CREATE TABLE DBUPDATESTATE (
>     lockowner VARCHAR(100), 
>     modelname VARCHAR(100) NOT NULL, 
>     updatelock INTEGER NOT NULL, 
>     version INTEGER NOT NULL);
> //.
> ALTER TABLE DBUPDATESTATE ADD PRIMARY KEY (modelname)
> //.
> 
> insert into DBUPDATESTATE (modelname, version, updatelock, lockowner) values 
> ('YourModelName', -1, 0, NULL) 
> 
> 5) That works
> 
> Stefan
> 
> Am 23.09.10 08:55, schrieb Farrukh Ijaz:
>> 
>> Hi,
>> 
>> During the conversion process for Migration, I've started facing issue for 
>> one of our frameworks where in the Properties file following properties are 
>> defined:
>> 
>> er.extensions.ERXJDBCAdaptor.className=er.extensions.jdbc.ERXJDBCAdaptor
>> er.extensions.ERXJDBCAdaptor.useConnectionBroker = true
>> 
>> dbMinConnectionsGLOBAL=1
>> dbMaxConnectionsGLOBAL=5
>> dbMaxCheckoutGLOBAL=600
>> dbDebugLevelGLOBAL=3
>> 
>> However if my project use this framework, the Migrations fail with following 
>> exception:
>> 
>> ERROR: relation "_dbupdater" does not existat 
>> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1548)
>> at 
>> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1316)
>> at 
>> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:191)
>> at 
>> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
>> at 
>> org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:351)
>> at 
>> org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:305)
>> at 
>> com.webobjects.jdbcadaptor.JDBCChannel._bindInputVariablesWithBindingsAndExecute(JDBCChannel.java:263)
>> at 
>> com.webobjects.jdbcadaptor.JDBCChannel._evaluateExpression(JDBCChannel.java:337)
>> at 
>> com.webobjects.jdbcadaptor.JDBCChannel.updateValuesInRowsDescribedByQualifier(JDBCChannel.java:176)
>> at 
>> er.extensions.jdbc.ERXJDBCAdaptor$Channel.updateValuesInRowsDescribedByQualifier(ERXJDBCAdaptor.java:278)
>> at 
>> er.extensions.migration.ERXJDBCMigrationLock._tryLock(ERXJDBCMigrationLock.java:93)
>> at 
>> er.extensions.migration.ERXJDBCMigrationLock.tryLock(ERXJDBCMigrationLock.java:69)
>> at 
>> er.extensions.migration.ERXMigrator$ERXMigrationAction.doPerform(ERXMigrator.java:451)
>> at 
>> er.extensions.eof.ERXEOAccessUtilities$ChannelAction.perform(ERXEOAccessUtilities.java:1487)
>> at 
>> er.extensions.migration.ERXMigrator$ERXMigrationAction.perform(ERXMigrator.java:50001)
>> at er.extensions.migration.ERXMigrator.migrateToLatest(ERXMigrator.java:201)
>> at 
>> er.extensions.appserver.ERXApplication.finishInitialization(ERXApplication.java:1184)
>> ...
>> 
>>  at 
>> com.webobjects.jdbcadaptor.JDBCContext._jdbcErrorWithChannel(JDBCContext.java:170)
>>  at 
>> com.webobjects.jdbcadaptor.JDBCChannel._evaluateExpression(JDBCChannel.java:344)
>>  at 
>> com.webobjects.jdbcadaptor.JDBCChannel.updateValuesInRowsDescribedByQualifier(JDBCChannel.java:176)
>>  at 
>> er.extensions.jdbc.ERXJDBCAdaptor$Channel.updateValuesInRowsDescribedByQualifier(ERXJDBCAdaptor.java:278)
>>  at 
>> er.extensions.migration.ERXJDBCMigrationLock._tryLock(ERXJDBCMigrationLock.java:93)
>>  at 
>> er.extensions.migration.ERXJDBCMigrationLock.tryLock(ERXJDBCMigrationLock.java:69)
>>  at 
>> er.extensions.migration.ERXMigrator$ERXMigrationAction.doPerform(ERXMigrator.java:451)
>>  at 
>> er.extensions.eof.ERXEOAccessUtilities$ChannelAction.perform(ERXEOAccessUtilities.java:1487)
>>  at 
>> er.extensions.migration.ERXMigrator$ERXMigrationAction.perform(ERXMigrator.java:50001)
>>  at er.extensions.migration.ERXMigrator.migrateToLatest(ERXMigrator.java:201)
>>  at 
>> er.extensions.appserver.ERXApplication.finishInitialization(ERXApplication.java:1184)
>>  ...
>> 2010-09-23 09:49:08,200 ERROR QSTPTRMS[-:12345 0] 
>> er.extensions.appserver.ERXApplication (ERXApplication.java:1301)  - 
>> QSTPTRMS failed to start.
>>  er.extensions.migration.ERXMigrationFailedException: Failed to create lock 
>> table. Try executing:
>> CREATE TABLE _dbupdater (lockowner varchar(100) , modelname varchar(100)  
>> NOT NULL, updatelock int4  NOT NULL, version int4  NOT NULL);
>> 
>> .
>>  at 
>> er.extensions.migration.ERXMigrationFailedException.fillInStackTrace(ERXMigrationFailedException.java:50001)
>>  at java.lang.Throwable.<init>(Throwable.java:218)
>>  at java.lang.Exception.<init>(Exception.java:59)
>>  at java.lang.RuntimeException.<init>(RuntimeException.java:61)
>>  at 
>> er.extensions.migration.ERXMigrationFailedException.<init>(ERXMigrationFailedException.java:14)
>>  at 
>> er.extensions.migration.ERXJDBCMigrationLock._tryLock(ERXJDBCMigrationLock.java:159)
>>  at 
>> er.extensions.migration.ERXJDBCMigrationLock.tryLock(ERXJDBCMigrationLock.java:69)
>>  at 
>> er.extensions.migration.ERXMigrator$ERXMigrationAction.doPerform(ERXMigrator.java:451)
>>  at 
>> er.extensions.eof.ERXEOAccessUtilities$ChannelAction.perform(ERXEOAccessUtilities.java:1487)
>>  at 
>> er.extensions.migration.ERXMigrator$ERXMigrationAction.perform(ERXMigrator.java:50001)
>>  at er.extensions.migration.ERXMigrator.migrateToLatest(ERXMigrator.java:201)
>>  at 
>> er.extensions.appserver.ERXApplication.finishInitialization(ERXApplication.java:1184)
>>  ...
>> Caused by: java.lang.NullPointerException
>>  at 
>> er.extensions.jdbc.ERXJDBCUtilities.executeUpdateScript(ERXJDBCUtilities.java:646)
>>  at 
>> er.extensions.jdbc.ERXJDBCUtilities.executeUpdateScript(ERXJDBCUtilities.java:597)
>>  at 
>> er.extensions.jdbc.ERXJDBCUtilities.executeUpdateScript(ERXJDBCUtilities.java:579)
>>  at 
>> er.extensions.migration.ERXJDBCMigrationLock._tryLock(ERXJDBCMigrationLock.java:152)
>>  ... 26 more
>> 2010-09-23 09:49:08,201 WARN  QSTPTRMS[-:12345 0] NSLog 
>> (ERXNSLogLog4jBridge.java:43)  - A fatal exception occurred: Failed to 
>> create lock table. Try executing:
>> CREATE TABLE _dbupdater (lockowner varchar(100) , modelname varchar(100)  
>> NOT NULL, updatelock int4  NOT NULL, version int4  NOT NULL);
>> 
>> .
>>  [2010-9-23 9:49:8 AST] <main> 
>> er.extensions.migration.ERXMigrationFailedException: Failed to create lock 
>> table. Try executing:
>> CREATE TABLE _dbupdater (lockowner varchar(100) , modelname varchar(100)  
>> NOT NULL, updatelock int4  NOT NULL, version int4  NOT NULL);
>> 
>> .
>>  at 
>> er.extensions.migration.ERXMigrationFailedException.fillInStackTrace(ERXMigrationFailedException.java:50001)
>>  at java.lang.Throwable.<init>(Throwable.java:218)
>>  at java.lang.Exception.<init>(Exception.java:59)
>>  at java.lang.RuntimeException.<init>(RuntimeException.java:61)
>>  at 
>> er.extensions.migration.ERXMigrationFailedException.<init>(ERXMigrationFailedException.java:14)
>>  at 
>> er.extensions.migration.ERXJDBCMigrationLock._tryLock(ERXJDBCMigrationLock.java:159)
>>  at 
>> er.extensions.migration.ERXJDBCMigrationLock.tryLock(ERXJDBCMigrationLock.java:69)
>>  at 
>> er.extensions.migration.ERXMigrator$ERXMigrationAction.doPerform(ERXMigrator.java:451)
>>  at 
>> er.extensions.eof.ERXEOAccessUtilities$ChannelAction.perform(ERXEOAccessUtilities.java:1487)
>>  at 
>> er.extensions.migration.ERXMigrator$ERXMigrationAction.perform(ERXMigrator.java:50001)
>>  at er.extensions.migration.ERXMigrator.migrateToLatest(ERXMigrator.java:201)
>>  at 
>> er.extensions.appserver.ERXApplication.finishInitialization(ERXApplication.java:1184)
>>  ...
>> Caused by: java.lang.NullPointerException
>>  at 
>> er.extensions.jdbc.ERXJDBCUtilities.executeUpdateScript(ERXJDBCUtilities.java:646)
>>  at 
>> er.extensions.jdbc.ERXJDBCUtilities.executeUpdateScript(ERXJDBCUtilities.java:597)
>>  at 
>> er.extensions.jdbc.ERXJDBCUtilities.executeUpdateScript(ERXJDBCUtilities.java:579)
>>  at 
>> er.extensions.migration.ERXJDBCMigrationLock._tryLock(ERXJDBCMigrationLock.java:152)
>>  ... 26 more
>> 
>> Any ideas?
>> 
>> Thanks,
>> 
>> Farrukh
>> 
>>  _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      ([email protected])
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/stefan.klein%40buero-sde.de
>> 
>> This email sent to [email protected]
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com
> 
> This email sent to [email protected]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to