Migration bug?

2010-01-02 Thread Mark Woollard
Am using Wonder Project migration for the first time. The initial database 
creation works but am now trying to add a single column as the second revision 
of the database. When running application am getting error as follows:

Jan 02 17:13:28 TheApp[53817] INFO  er.extensions.jdbc.ERXJDBCUtilities  - 
Executing alter table t_position null c_abbreviation longtext NOT NULL
Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Commit Internal Transaction
Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Begin Internal Transaction
Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  evaluateExpression: 
com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: UPDATE _dbupdater SET 
lockowner = NULL, updatelock = ? WHERE modelname = ? withBindings: 
1:0(updateLock), 2:MockDraft(modelName)
Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Commit Internal Transaction
Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Begin Internal Transaction
Jan 02 17:14:20 TheApp[53817] DEBUG NSLog  -  === Rollback Internal Transaction
Jan 02 17:14:36 TheApp[53817] ERROR er.extensions.appserver.ERXApplication  - 
TheApp failed to start.
MySQLSyntaxErrorException: You have an error in your SQL syntax; check the 
manual that corresponds to your MySQL server version for the right syntax to 
use near 'null c_abbreviation longtext NOT NULL' at line 1

The database is mysql, and it seems to me that the alter statement is incorrect 
on the first line of the log, there should be 'add column' rather than 'null'. 
The migration class is as follows:

public class DbVersion1 extends Migration {

@Override
public void downgrade(EOEditingContext ec, ERXMigrationDatabase 
database)
throws Throwable {

database.existingTableNamed(t_position).existingColumnNamed(c_abbreviation).delete();
}

@Override
public void upgrade(EOEditingContext ec, ERXMigrationDatabase database)
throws Throwable {
ERXMigrationTable table = 
database.existingTableNamed(t_position);
table.newStringColumn(c_abbreviation, false, );
}
}

The new column is using the varchar10 prototype. Am stuck as can't see why the 
sql is being generated incorrectly. Anyone have any ideas?

Thanks
Mark



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

This email sent to arch...@mail-archive.com

Re: Migration bug?

2010-01-02 Thread Mike Schrag
WO 5.4 breaks sql generation ... you need to use the custom mysql plugin that 
has been posted on the wonder list.

ms

On Jan 2, 2010, at 12:23 PM, Mark Woollard wrote:

 Am using Wonder Project migration for the first time. The initial database 
 creation works but am now trying to add a single column as the second 
 revision of the database. When running application am getting error as 
 follows:
 
 Jan 02 17:13:28 TheApp[53817] INFO  er.extensions.jdbc.ERXJDBCUtilities  - 
 Executing alter table t_position null c_abbreviation longtext NOT NULL
 Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Commit Internal Transaction
 Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Begin Internal Transaction
 Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  evaluateExpression: 
 com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: UPDATE _dbupdater 
 SET lockowner = NULL, updatelock = ? WHERE modelname = ? withBindings: 
 1:0(updateLock), 2:MockDraft(modelName)
 Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Commit Internal Transaction
 Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Begin Internal Transaction
 Jan 02 17:14:20 TheApp[53817] DEBUG NSLog  -  === Rollback Internal 
 Transaction
 Jan 02 17:14:36 TheApp[53817] ERROR er.extensions.appserver.ERXApplication  - 
 TheApp failed to start.
 MySQLSyntaxErrorException: You have an error in your SQL syntax; check the 
 manual that corresponds to your MySQL server version for the right syntax to 
 use near 'null c_abbreviation longtext NOT NULL' at line 1
 
 The database is mysql, and it seems to me that the alter statement is 
 incorrect on the first line of the log, there should be 'add column' rather 
 than 'null'. The migration class is as follows:
 
 public class DbVersion1 extends Migration {
 
   @Override
   public void downgrade(EOEditingContext ec, ERXMigrationDatabase 
 database)
   throws Throwable {
   
 database.existingTableNamed(t_position).existingColumnNamed(c_abbreviation).delete();
   }
 
   @Override
   public void upgrade(EOEditingContext ec, ERXMigrationDatabase database)
   throws Throwable {
   ERXMigrationTable table = 
 database.existingTableNamed(t_position);
   table.newStringColumn(c_abbreviation, false, );
   }
 }
 
 The new column is using the varchar10 prototype. Am stuck as can't see why 
 the sql is being generated incorrectly. Anyone have any ideas?
 
 Thanks
 Mark
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com
 
 This email sent to msch...@mdimension.com

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

This email sent to arch...@mail-archive.com

Re: Migration bug?

2010-01-02 Thread David LeBer
Before we go any further, are you using WO5.4 and MySQL without using Ramsey's 
MySQL plugin?

http://issues.objectstyle.org/jira/browse/WONDER-339

On 2010-01-02, at 12:23 PM, Mark Woollard wrote:

 Am using Wonder Project migration for the first time. The initial database 
 creation works but am now trying to add a single column as the second 
 revision of the database. When running application am getting error as 
 follows:
 
 Jan 02 17:13:28 TheApp[53817] INFO  er.extensions.jdbc.ERXJDBCUtilities  - 
 Executing alter table t_position null c_abbreviation longtext NOT NULL
 Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Commit Internal Transaction
 Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Begin Internal Transaction
 Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  evaluateExpression: 
 com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: UPDATE _dbupdater 
 SET lockowner = NULL, updatelock = ? WHERE modelname = ? withBindings: 
 1:0(updateLock), 2:MockDraft(modelName)
 Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Commit Internal Transaction
 Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Begin Internal Transaction
 Jan 02 17:14:20 TheApp[53817] DEBUG NSLog  -  === Rollback Internal 
 Transaction
 Jan 02 17:14:36 TheApp[53817] ERROR er.extensions.appserver.ERXApplication  - 
 TheApp failed to start.
 MySQLSyntaxErrorException: You have an error in your SQL syntax; check the 
 manual that corresponds to your MySQL server version for the right syntax to 
 use near 'null c_abbreviation longtext NOT NULL' at line 1
 
 The database is mysql, and it seems to me that the alter statement is 
 incorrect on the first line of the log, there should be 'add column' rather 
 than 'null'. The migration class is as follows:
 
 public class DbVersion1 extends Migration {
 
   @Override
   public void downgrade(EOEditingContext ec, ERXMigrationDatabase 
 database)
   throws Throwable {
   
 database.existingTableNamed(t_position).existingColumnNamed(c_abbreviation).delete();
   }
 
   @Override
   public void upgrade(EOEditingContext ec, ERXMigrationDatabase database)
   throws Throwable {
   ERXMigrationTable table = 
 database.existingTableNamed(t_position);
   table.newStringColumn(c_abbreviation, false, );
   }
 }
 
 The new column is using the varchar10 prototype. Am stuck as can't see why 
 the sql is being generated incorrectly. Anyone have any ideas?
 
 Thanks
 Mark
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/dleber_wodev%40codeferous.com
 
 This email sent to dleber_wo...@codeferous.com

;david

--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site:   http://codeferous.com
blog:   http://davidleber.net
profile:http://www.linkedin.com/in/davidleber
twitter:http://twitter.com/rebeld
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org




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

This email sent to arch...@mail-archive.com


Re: Migration bug?

2010-01-02 Thread Mark Woollard
Thanks - thats it - plugin fixes problem
Mark

On 2 Jan 2010, at 17:29, Mike Schrag wrote:

 WO 5.4 breaks sql generation ... you need to use the custom mysql plugin that 
 has been posted on the wonder list.
 
 ms
 
 On Jan 2, 2010, at 12:23 PM, Mark Woollard wrote:
 
 Am using Wonder Project migration for the first time. The initial database 
 creation works but am now trying to add a single column as the second 
 revision of the database. When running application am getting error as 
 follows:
 
 Jan 02 17:13:28 TheApp[53817] INFO  er.extensions.jdbc.ERXJDBCUtilities  - 
 Executing alter table t_position null c_abbreviation longtext NOT NULL
 Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Commit Internal Transaction
 Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Begin Internal Transaction
 Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  evaluateExpression: 
 com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: UPDATE _dbupdater 
 SET lockowner = NULL, updatelock = ? WHERE modelname = ? withBindings: 
 1:0(updateLock), 2:MockDraft(modelName)
 Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Commit Internal Transaction
 Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Begin Internal Transaction
 Jan 02 17:14:20 TheApp[53817] DEBUG NSLog  -  === Rollback Internal 
 Transaction
 Jan 02 17:14:36 TheApp[53817] ERROR er.extensions.appserver.ERXApplication  
 - TheApp failed to start.
 MySQLSyntaxErrorException: You have an error in your SQL syntax; check the 
 manual that corresponds to your MySQL server version for the right syntax to 
 use near 'null c_abbreviation longtext NOT NULL' at line 1
 
 The database is mysql, and it seems to me that the alter statement is 
 incorrect on the first line of the log, there should be 'add column' rather 
 than 'null'. The migration class is as follows:
 
 public class DbVersion1 extends Migration {
 
  @Override
  public void downgrade(EOEditingContext ec, ERXMigrationDatabase 
 database)
  throws Throwable {
  
 database.existingTableNamed(t_position).existingColumnNamed(c_abbreviation).delete();
  }
 
  @Override
  public void upgrade(EOEditingContext ec, ERXMigrationDatabase database)
  throws Throwable {
  ERXMigrationTable table = 
 database.existingTableNamed(t_position);
  table.newStringColumn(c_abbreviation, false, );
  }
 }
 
 The new column is using the varchar10 prototype. Am stuck as can't see why 
 the sql is being generated incorrectly. Anyone have any ideas?
 
 Thanks
 Mark
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com
 
 This email sent to msch...@mdimension.com
 

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

This email sent to arch...@mail-archive.com

Re: Migration bug?

2010-01-02 Thread Ray Kiddy


On Jan 2, 2010, at 10:18 AM, Mark Woollard wrote:


Thanks - thats it - plugin fixes problem
Mark


It occurs to me that we can have ERXApplication, at  
applicationDidLaunch time or thereabouts, check (1) are your models  
using MySQL? and (2) are you using 5.3 or 5.4? and then we could  
switch the plugin in the connection dictionary of the loaded models.


Or is this a road we might not want to start going down?

- ray



On 2 Jan 2010, at 17:29, Mike Schrag wrote:

WO 5.4 breaks sql generation ... you need to use the custom mysql  
plugin that has been posted on the wonder list.


ms

On Jan 2, 2010, at 12:23 PM, Mark Woollard wrote:

Am using Wonder Project migration for the first time. The initial  
database creation works but am now trying to add a single column  
as the second revision of the database. When running application  
am getting error as follows:


Jan 02 17:13:28 TheApp[53817] INFO   
er.extensions.jdbc.ERXJDBCUtilities  - Executing alter table  
t_position null c_abbreviation longtext NOT NULL
Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Commit Internal  
Transaction
Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Begin Internal  
Transaction
Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  evaluateExpression:  
com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: UPDATE  
_dbupdater SET lockowner = NULL, updatelock = ? WHERE modelname  
= ? withBindings: 1:0(updateLock), 2:MockDraft(modelName)
Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Commit Internal  
Transaction
Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Begin Internal  
Transaction
Jan 02 17:14:20 TheApp[53817] DEBUG NSLog  -  === Rollback  
Internal Transaction
Jan 02 17:14:36 TheApp[53817] ERROR  
er.extensions.appserver.ERXApplication  - TheApp failed to start.
MySQLSyntaxErrorException: You have an error in your SQL syntax;  
check the manual that corresponds to your MySQL server version for  
the right syntax to use near 'null c_abbreviation longtext NOT  
NULL' at line 1


The database is mysql, and it seems to me that the alter statement  
is incorrect on the first line of the log, there should be 'add  
column' rather than 'null'. The migration class is as follows:


public class DbVersion1 extends Migration {

@Override
	public void downgrade(EOEditingContext ec, ERXMigrationDatabase  
database)

throws Throwable {
		 
database 
.existingTableNamed 
(t_position).existingColumnNamed(c_abbreviation).delete();

}

@Override
	public void upgrade(EOEditingContext ec, ERXMigrationDatabase  
database)

throws Throwable {
		ERXMigrationTable table =  
database.existingTableNamed(t_position);

table.newStringColumn(c_abbreviation, false, );
}
}

The new column is using the varchar10 prototype. Am stuck as can't  
see why the sql is being generated incorrectly. Anyone have any  
ideas?


Thanks
Mark



___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com

This email sent to msch...@mdimension.com




___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/ray%40ganymede.org

This email sent to r...@ganymede.org


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

This email sent to arch...@mail-archive.com

Re: Migration bug?

2010-01-02 Thread Chuck Hill
One problem is that this plugin may only build under 5.4.  Which is  
why it has not yet been added to Wonder.



On Jan 2, 2010, at 2:01 PM, Ray Kiddy wrote:



On Jan 2, 2010, at 10:18 AM, Mark Woollard wrote:


Thanks - thats it - plugin fixes problem
Mark


It occurs to me that we can have ERXApplication, at  
applicationDidLaunch time or thereabouts, check (1) are your models  
using MySQL? and (2) are you using 5.3 or 5.4? and then we could  
switch the plugin in the connection dictionary of the loaded models.


Or is this a road we might not want to start going down?

- ray



On 2 Jan 2010, at 17:29, Mike Schrag wrote:

WO 5.4 breaks sql generation ... you need to use the custom mysql  
plugin that has been posted on the wonder list.


ms

On Jan 2, 2010, at 12:23 PM, Mark Woollard wrote:

Am using Wonder Project migration for the first time. The initial  
database creation works but am now trying to add a single column  
as the second revision of the database. When running application  
am getting error as follows:


Jan 02 17:13:28 TheApp[53817] INFO   
er.extensions.jdbc.ERXJDBCUtilities  - Executing alter table  
t_position null c_abbreviation longtext NOT NULL
Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Commit Internal  
Transaction
Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Begin Internal  
Transaction
Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  evaluateExpression:  
com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: UPDATE  
_dbupdater SET lockowner = NULL, updatelock = ? WHERE modelname  
= ? withBindings: 1:0(updateLock), 2:MockDraft(modelName)
Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Commit Internal  
Transaction
Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Begin Internal  
Transaction
Jan 02 17:14:20 TheApp[53817] DEBUG NSLog  -  === Rollback  
Internal Transaction
Jan 02 17:14:36 TheApp[53817] ERROR  
er.extensions.appserver.ERXApplication  - TheApp failed to start.
MySQLSyntaxErrorException: You have an error in your SQL syntax;  
check the manual that corresponds to your MySQL server version  
for the right syntax to use near 'null c_abbreviation longtext  
NOT NULL' at line 1


The database is mysql, and it seems to me that the alter  
statement is incorrect on the first line of the log, there should  
be 'add column' rather than 'null'. The migration class is as  
follows:


public class DbVersion1 extends Migration {

@Override
	public void downgrade(EOEditingContext ec, ERXMigrationDatabase  
database)

throws Throwable {
		 
database 
.existingTableNamed 
(t_position).existingColumnNamed(c_abbreviation).delete();

}

@Override
	public void upgrade(EOEditingContext ec, ERXMigrationDatabase  
database)

throws Throwable {
		ERXMigrationTable table =  
database.existingTableNamed(t_position);

table.newStringColumn(c_abbreviation, false, );
}
}

The new column is using the varchar10 prototype. Am stuck as  
can't see why the sql is being generated incorrectly. Anyone have  
any ideas?


Thanks
Mark



___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com

This email sent to msch...@mdimension.com




___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/ray%40ganymede.org

This email sent to r...@ganymede.org


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net

This email sent to ch...@global-village.net


--
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects







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

This email sent to arch...@mail-archive.com


Re: Migration bug?

2010-01-02 Thread Ray Kiddy


On Jan 2, 2010, at 4:31 PM, Chuck Hill wrote:

One problem is that this plugin may only build under 5.4.  Which is  
why it has not yet been added to Wonder.




The ant build system knows whether the environment it is in is running  
5.4 or 5.3. Or it easily could. The variables exist. They may need to  
plugged into the targets.


I assume the Maven and eclipse build environments do or can know the  
WO version also.


Is there a build system where this is known to be a problem? I can pre- 
flight the changes to the ant build system to enable conditional  
builds of the plugin and we'll see.


cheers - ray



On Jan 2, 2010, at 2:01 PM, Ray Kiddy wrote:



On Jan 2, 2010, at 10:18 AM, Mark Woollard wrote:


Thanks - thats it - plugin fixes problem
Mark


It occurs to me that we can have ERXApplication, at  
applicationDidLaunch time or thereabouts, check (1) are your models  
using MySQL? and (2) are you using 5.3 or 5.4? and then we could  
switch the plugin in the connection dictionary of the loaded models.


Or is this a road we might not want to start going down?

- ray



On 2 Jan 2010, at 17:29, Mike Schrag wrote:

WO 5.4 breaks sql generation ... you need to use the custom mysql  
plugin that has been posted on the wonder list.


ms

On Jan 2, 2010, at 12:23 PM, Mark Woollard wrote:

Am using Wonder Project migration for the first time. The  
initial database creation works but am now trying to add a  
single column as the second revision of the database. When  
running application am getting error as follows:


Jan 02 17:13:28 TheApp[53817] INFO   
er.extensions.jdbc.ERXJDBCUtilities  - Executing alter table  
t_position null c_abbreviation longtext NOT NULL
Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Commit  
Internal Transaction
Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Begin Internal  
Transaction
Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -   
evaluateExpression: com.webobjects.jdbcadaptor.MySQLPlugIn 
$MySQLExpression: UPDATE _dbupdater SET lockowner = NULL,  
updatelock = ? WHERE modelname = ? withBindings:  
1:0(updateLock), 2:MockDraft(modelName)
Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Commit  
Internal Transaction
Jan 02 17:14:11 TheApp[53817] DEBUG NSLog  -  === Begin Internal  
Transaction
Jan 02 17:14:20 TheApp[53817] DEBUG NSLog  -  === Rollback  
Internal Transaction
Jan 02 17:14:36 TheApp[53817] ERROR  
er.extensions.appserver.ERXApplication  - TheApp failed to start.
MySQLSyntaxErrorException: You have an error in your SQL syntax;  
check the manual that corresponds to your MySQL server version  
for the right syntax to use near 'null c_abbreviation longtext  
NOT NULL' at line 1


The database is mysql, and it seems to me that the alter  
statement is incorrect on the first line of the log, there  
should be 'add column' rather than 'null'. The migration class  
is as follows:


public class DbVersion1 extends Migration {

@Override
	public void downgrade(EOEditingContext ec, ERXMigrationDatabase  
database)

throws Throwable {
		 
database 
.existingTableNamed 
(t_position).existingColumnNamed(c_abbreviation).delete();

}

@Override
	public void upgrade(EOEditingContext ec, ERXMigrationDatabase  
database)

throws Throwable {
		ERXMigrationTable table =  
database.existingTableNamed(t_position);

table.newStringColumn(c_abbreviation, false, );
}
}

The new column is using the varchar10 prototype. Am stuck as  
can't see why the sql is being generated incorrectly. Anyone  
have any ideas?


Thanks
Mark



___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com

This email sent to msch...@mdimension.com




___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/ray%40ganymede.org

This email sent to r...@ganymede.org


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net

This email sent to ch...@global-village.net


--
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects










___
Do not post admin requests 

Re: Migration bug?

2010-01-02 Thread Mike Schrag
 One problem is that this plugin may only build under 5.4.  Which is why it 
 has not yet been added to Wonder.
 
 The ant build system knows whether the environment it is in is running 5.4 or 
 5.3. Or it easily could. The variables exist. They may need to plugged into 
 the targets.
 
 I assume the Maven and eclipse build environments do or can know the WO 
 version also.
 
 Is there a build system where this is known to be a problem? I can pre-flight 
 the changes to the ant build system to enable conditional builds of the 
 plugin and we'll see.
 
 cheers - ray
it needs to build on both 5.3 and 5.4. i really don't want random pieces of 
wonder that only exist in 5.4. it will only make it confusing for people.

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

This email sent to arch...@mail-archive.com


Another newbie question

2010-01-02 Thread Mark Woollard
I have a component (java/html/api/woo/wod) and want to create a derived 
component that specialises some of the java functionality, but doesn't need to 
modify the html of the base component. I can't figure out how to get the 
derived component to return the base class html since the derived classes just 
extend the java class.

Thanks
Mark

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

This email sent to arch...@mail-archive.com


Re: Another newbie question

2010-01-02 Thread Andrew Lindesay
Hi Mark;

If I understand you correctly, I would typically create smaller re-usable 
components to put into two different larger components.

cheers.

 I have a component (java/html/api/woo/wod) and want to create a derived 
 component that specialises some of the java functionality, but doesn't need 
 to modify the html of the base component. I can't figure out how to get the 
 derived component to return the base class html since the derived classes 
 just extend the java class.

___
Andrew Lindesay
www.lindesay.co.nz

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

This email sent to arch...@mail-archive.com


Re: Another newbie question

2010-01-02 Thread Mark Woollard
Maybe expanding will make things clearer...

There is a base component FieldEditor which does in-place editing using the 
AjaxInPlace component + 2 ERXWOTemplate instances for the edit and view modes. 
I then am wanting to derive from this to create StringFieldEditor / 
IntegerFieldEditor / etc that specialize the java to provide view and edit 
values in different ways as required. The html in FieldEditor component doesn't 
need to change, and it doesn't make sense to me to have multiple copies in the 
derived classes. What I'd like to happen is the base class html be used and the 
overridden getter methods in the derived java class provide the data for 
display. Is this an approach that applicable to WO? If not how would this be 
approached to limit duplication of code / html?

Thanks
Mark


On 3 Jan 2010, at 02:04, Andrew Lindesay wrote:

 Hi Mark;
 
 If I understand you correctly, I would typically create smaller re-usable 
 components to put into two different larger components.
 
 cheers.
 
 I have a component (java/html/api/woo/wod) and want to create a derived 
 component that specialises some of the java functionality, but doesn't need 
 to modify the html of the base component. I can't figure out how to get the 
 derived component to return the base class html since the derived classes 
 just extend the java class.
 
 ___
 Andrew Lindesay
 www.lindesay.co.nz
 

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

This email sent to arch...@mail-archive.com


Re: Another newbie question

2010-01-02 Thread Chuck Hill

Hi Mark,

This not part of WO, possibly due to concerns about efficiency and  
optimization (see JavaDoc below).  You can add a method to your  
component (or better, to a custom super class) to achieve this:


/**
 * Allows a component to inherit the template (.html and .wod  
files) from another component.

 * pUsage:/p
 * pre
 * public WOElement template() {
 * return inheritTemplateFrom(AddAddress, CoreUI);
 * }
 * /pre
 * This very simple implementation does have some limitations:
 * ol
 * liIt can't he used to inherit the template of another  
component inheriting a template./li
 * liIt can't handle having two components with the same name  
in different packages/li

 * liIt does not use WO template caching/li
 * /ol
 *
 * @see com.webobjects.appserver.WOComponent#template()
 *
 * @param componentName the name of the component whose template  
will be inherited
 * @param frameworkName name of the framework the component is  
in, or null if in the application

 * @return the template form the indicated component
 */
public WOElement inheritTemplateFrom(String componentName, String  
frameworkName)

{
String componentPath = componentName + .wo/ + componentName  
+ .;
String htmlString =  
ResourceManagerAdditions.stringFromResource(componentPath + html,  
null, session().languages());
String wodString =  
ResourceManagerAdditions.stringFromResource(componentPath + wod,  
null, session().languages());
return WOComponent.templateWithHTMLString(htmlString,  
wodString, session().languages());

}


Enjoy!


Chuck


On Jan 2, 2010, at 6:20 PM, Mark Woollard wrote:


Maybe expanding will make things clearer...

There is a base component FieldEditor which does in-place editing  
using the AjaxInPlace component + 2 ERXWOTemplate instances for the  
edit and view modes. I then am wanting to derive from this to create  
StringFieldEditor / IntegerFieldEditor / etc that specialize the  
java to provide view and edit values in different ways as required.  
The html in FieldEditor component doesn't need to change, and it  
doesn't make sense to me to have multiple copies in the derived  
classes. What I'd like to happen is the base class html be used and  
the overridden getter methods in the derived java class provide the  
data for display. Is this an approach that applicable to WO? If not  
how would this be approached to limit duplication of code / html?


Thanks
Mark


On 3 Jan 2010, at 02:04, Andrew Lindesay wrote:


Hi Mark;

If I understand you correctly, I would typically create smaller re- 
usable components to put into two different larger components.


cheers.

I have a component (java/html/api/woo/wod) and want to create a  
derived component that specialises some of the java functionality,  
but doesn't need to modify the html of the base component. I can't  
figure out how to get the derived component to return the base  
class html since the derived classes just extend the java class.


___
Andrew Lindesay
www.lindesay.co.nz



___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net

This email sent to ch...@global-village.net


--
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects







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

This email sent to arch...@mail-archive.com


Re: Another newbie question

2010-01-02 Thread Andrew Lindesay
Hello Mark;

Could you use a java.text.Format subclass and bind this into the 
FieldEditor component using a format binding to provide for the differing 
parser/formatter -- much in the fashion by which WOTextField works?

cheers.

 There is a base component FieldEditor which does in-place editing using the 
 AjaxInPlace component + 2 ERXWOTemplate instances for the edit and view 
 modes. I then am wanting to derive from this to create StringFieldEditor / 
 IntegerFieldEditor / etc that specialize the java to provide view and edit 
 values in different ways as required. The html in FieldEditor component 
 doesn't need to change, and it doesn't make sense to me to have multiple 
 copies in the derived classes. What I'd like to happen is the base class html 
 be used and the overridden getter methods in the derived java class provide 
 the data for display. Is this an approach that applicable to WO? If not how 
 would this be approached to limit duplication of code / html?

___
Andrew Lindesay
www.lindesay.co.nz

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

This email sent to arch...@mail-archive.com


Re: Another newbie question

2010-01-02 Thread Mark Woollard
Thanks for the input - a couple of questions on this.

1) Can't find ResourceManagerAdditions - what do I need to add?
2) Although not relevant for what I want to do, the frameworkName parameter 
isn't used.

Thanks
Mark

On 3 Jan 2010, at 02:24, Chuck Hill wrote:

 Hi Mark,
 
 This not part of WO, possibly due to concerns about efficiency and 
 optimization (see JavaDoc below).  You can add a method to your component (or 
 better, to a custom super class) to achieve this:
 
/**
 * Allows a component to inherit the template (.html and .wod files) 
 from another component.
 * pUsage:/p
 * pre
 * public WOElement template() {
 * return inheritTemplateFrom(AddAddress, CoreUI);
 * }
 * /pre
 * This very simple implementation does have some limitations:
 * ol
 * liIt can't he used to inherit the template of another component 
 inheriting a template./li
 * liIt can't handle having two components with the same name in 
 different packages/li
 * liIt does not use WO template caching/li
 * /ol
 *
 * @see com.webobjects.appserver.WOComponent#template()
 *
 * @param componentName the name of the component whose template will be 
 inherited
 * @param frameworkName name of the framework the component is in, or null 
 if in the application
 * @return the template form the indicated component
 */
public WOElement inheritTemplateFrom(String componentName, String 
 frameworkName)
{
String componentPath = componentName + .wo/ + componentName + .;
String htmlString = 
 ResourceManagerAdditions.stringFromResource(componentPath + html, null, 
 session().languages());
String wodString = 
 ResourceManagerAdditions.stringFromResource(componentPath + wod, null, 
 session().languages());
return WOComponent.templateWithHTMLString(htmlString, wodString, 
 session().languages());
}
 
 
 Enjoy!
 
 
 Chuck
 
 
 On Jan 2, 2010, at 6:20 PM, Mark Woollard wrote:
 
 Maybe expanding will make things clearer...
 
 There is a base component FieldEditor which does in-place editing using the 
 AjaxInPlace component + 2 ERXWOTemplate instances for the edit and view 
 modes. I then am wanting to derive from this to create StringFieldEditor / 
 IntegerFieldEditor / etc that specialize the java to provide view and edit 
 values in different ways as required. The html in FieldEditor component 
 doesn't need to change, and it doesn't make sense to me to have multiple 
 copies in the derived classes. What I'd like to happen is the base class 
 html be used and the overridden getter methods in the derived java class 
 provide the data for display. Is this an approach that applicable to WO? If 
 not how would this be approached to limit duplication of code / html?
 
 Thanks
 Mark
 
 
 On 3 Jan 2010, at 02:04, Andrew Lindesay wrote:
 
 Hi Mark;
 
 If I understand you correctly, I would typically create smaller re-usable 
 components to put into two different larger components.
 
 cheers.
 
 I have a component (java/html/api/woo/wod) and want to create a derived 
 component that specialises some of the java functionality, but doesn't 
 need to modify the html of the base component. I can't figure out how to 
 get the derived component to return the base class html since the derived 
 classes just extend the java class.
 
 ___
 Andrew Lindesay
 www.lindesay.co.nz
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
 
 This email sent to ch...@global-village.net
 
 -- 
 Chuck Hill Senior Consultant / VP Development
 
 Practical WebObjects - for developers who want to increase their overall 
 knowledge of WebObjects or who are trying to solve specific problems.
 http://www.global-village.net/products/practical_webobjects
 
 
 
 
 
 
 

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

This email sent to arch...@mail-archive.com


Re: Another newbie question

2010-01-02 Thread Chuck Hill


On Jan 2, 2010, at 6:52 PM, Mark Woollard wrote:


Thanks for the input - a couple of questions on this.

1) Can't find ResourceManagerAdditions - what do I need to add?


This is from the GVC Frameworks (http://www.global-village.net/chill/gvc_frameworks 
).  File attached.


ResourceManagerAdditions.java
Description: Binary data





2) Although not relevant for what I want to do, the frameworkName  
parameter isn't used.


Use null, that is the WO standard for things in the Application bundle.


Chuck



On 3 Jan 2010, at 02:24, Chuck Hill wrote:


Hi Mark,

This not part of WO, possibly due to concerns about efficiency and  
optimization (see JavaDoc below).  You can add a method to your  
component (or better, to a custom super class) to achieve this:


  /**
   * Allows a component to inherit the template (.html and .wod  
files) from another component.

   * pUsage:/p
   * pre
   * public WOElement template() {
   * return inheritTemplateFrom(AddAddress, CoreUI);
   * }
   * /pre
   * This very simple implementation does have some limitations:
   * ol
   * liIt can't he used to inherit the template of another  
component inheriting a template./li
   * liIt can't handle having two components with the same name  
in different packages/li

   * liIt does not use WO template caching/li
   * /ol
   *
   * @see com.webobjects.appserver.WOComponent#template()
   *
   * @param componentName the name of the component whose template  
will be inherited
   * @param frameworkName name of the framework the component is  
in, or null if in the application

   * @return the template form the indicated component
   */
  public WOElement inheritTemplateFrom(String componentName, String  
frameworkName)

  {
  String componentPath = componentName + .wo/ + componentName  
+ .;
  String htmlString =  
ResourceManagerAdditions.stringFromResource(componentPath + html,  
null, session().languages());
  String wodString =  
ResourceManagerAdditions.stringFromResource(componentPath + wod,  
null, session().languages());
  return WOComponent.templateWithHTMLString(htmlString,  
wodString, session().languages());

  }


Enjoy!


Chuck


On Jan 2, 2010, at 6:20 PM, Mark Woollard wrote:


Maybe expanding will make things clearer...

There is a base component FieldEditor which does in-place editing  
using the AjaxInPlace component + 2 ERXWOTemplate instances for  
the edit and view modes. I then am wanting to derive from this to  
create StringFieldEditor / IntegerFieldEditor / etc that  
specialize the java to provide view and edit values in different  
ways as required. The html in FieldEditor component doesn't need  
to change, and it doesn't make sense to me to have multiple copies  
in the derived classes. What I'd like to happen is the base class  
html be used and the overridden getter methods in the derived java  
class provide the data for display. Is this an approach that  
applicable to WO? If not how would this be approached to limit  
duplication of code / html?


Thanks
Mark


On 3 Jan 2010, at 02:04, Andrew Lindesay wrote:


Hi Mark;

If I understand you correctly, I would typically create smaller  
re-usable components to put into two different larger components.


cheers.

I have a component (java/html/api/woo/wod) and want to create a  
derived component that specialises some of the java  
functionality, but doesn't need to modify the html of the base  
component. I can't figure out how to get the derived component  
to return the base class html since the derived classes just  
extend the java class.


___
Andrew Lindesay
www.lindesay.co.nz



___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net

This email sent to ch...@global-village.net


--
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects











--
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects







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

This email sent to arch...@mail-archive.com

Re: Another newbie question

2010-01-02 Thread Mark Woollard
Thanks - subclasses are now working:-)
Mark

On 3 Jan 2010, at 03:08, Chuck Hill wrote:

 
 On Jan 2, 2010, at 6:52 PM, Mark Woollard wrote:
 
 Thanks for the input - a couple of questions on this.
 
 1) Can't find ResourceManagerAdditions - what do I need to add?
 
 This is from the GVC Frameworks 
 (http://www.global-village.net/chill/gvc_frameworks).  File attached.
 ResourceManagerAdditions.java
 
 
 
 2) Although not relevant for what I want to do, the frameworkName parameter 
 isn't used.
 
 Use null, that is the WO standard for things in the Application bundle.
 
 
 Chuck
 
 
 On 3 Jan 2010, at 02:24, Chuck Hill wrote:
 
 Hi Mark,
 
 This not part of WO, possibly due to concerns about efficiency and 
 optimization (see JavaDoc below).  You can add a method to your component 
 (or better, to a custom super class) to achieve this:
 
  /**
   * Allows a component to inherit the template (.html and .wod files) 
 from another component.
   * pUsage:/p
   * pre
   * public WOElement template() {
   * return inheritTemplateFrom(AddAddress, CoreUI);
   * }
   * /pre
   * This very simple implementation does have some limitations:
   * ol
   * liIt can't he used to inherit the template of another component 
 inheriting a template./li
   * liIt can't handle having two components with the same name in 
 different packages/li
   * liIt does not use WO template caching/li
   * /ol
   *
   * @see com.webobjects.appserver.WOComponent#template()
   *
   * @param componentName the name of the component whose template will be 
 inherited
   * @param frameworkName name of the framework the component is in, or null 
 if in the application
   * @return the template form the indicated component
   */
  public WOElement inheritTemplateFrom(String componentName, String 
 frameworkName)
  {
  String componentPath = componentName + .wo/ + componentName + .;
  String htmlString = 
 ResourceManagerAdditions.stringFromResource(componentPath + html, null, 
 session().languages());
  String wodString = 
 ResourceManagerAdditions.stringFromResource(componentPath + wod, null, 
 session().languages());
  return WOComponent.templateWithHTMLString(htmlString, wodString, 
 session().languages());
  }
 
 
 Enjoy!
 
 
 Chuck
 
 
 On Jan 2, 2010, at 6:20 PM, Mark Woollard wrote:
 
 Maybe expanding will make things clearer...
 
 There is a base component FieldEditor which does in-place editing using 
 the AjaxInPlace component + 2 ERXWOTemplate instances for the edit and 
 view modes. I then am wanting to derive from this to create 
 StringFieldEditor / IntegerFieldEditor / etc that specialize the java to 
 provide view and edit values in different ways as required. The html in 
 FieldEditor component doesn't need to change, and it doesn't make sense to 
 me to have multiple copies in the derived classes. What I'd like to happen 
 is the base class html be used and the overridden getter methods in the 
 derived java class provide the data for display. Is this an approach that 
 applicable to WO? If not how would this be approached to limit duplication 
 of code / html?
 
 Thanks
 Mark
 
 
 On 3 Jan 2010, at 02:04, Andrew Lindesay wrote:
 
 Hi Mark;
 
 If I understand you correctly, I would typically create smaller re-usable 
 components to put into two different larger components.
 
 cheers.
 
 I have a component (java/html/api/woo/wod) and want to create a derived 
 component that specialises some of the java functionality, but doesn't 
 need to modify the html of the base component. I can't figure out how to 
 get the derived component to return the base class html since the 
 derived classes just extend the java class.
 
 ___
 Andrew Lindesay
 www.lindesay.co.nz
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
 
 This email sent to ch...@global-village.net
 
 -- 
 Chuck Hill Senior Consultant / VP Development
 
 Practical WebObjects - for developers who want to increase their overall 
 knowledge of WebObjects or who are trying to solve specific problems.
 http://www.global-village.net/products/practical_webobjects
 
 
 
 
 
 
 
 
 
 -- 
 Chuck Hill Senior Consultant / VP Development
 
 Practical WebObjects - for developers who want to increase their overall 
 knowledge of WebObjects or who are trying to solve specific problems.
 http://www.global-village.net/products/practical_webobjects
 
 
 
 
 
 
 

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

This email sent to