Statement.GeneratedKeysNotRequested

55 views
Skip to first unread message

leazar

unread,
Mar 3, 2009, 6:26:17 PM3/3/09
to Persevere


Hoping someone may have seen this before .... I'm using an
applications server connected to MySQL and while I can pull data out
and display it in my grid using PersvereStore, when I go to add data
I'm seeing the following response in the POST request:

I'm using Monday's nightly

java.sql.SQLException: !Statement.GeneratedKeysNotRequested!

The stack trace in my logs appears as:

java.sql.SQLException: !
Statement.GeneratedKeysNotRequested!
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
at com.mysql.jdbc.StatementImpl.getGeneratedKeys(StatementImpl.java:
1814)
at org.persvr.datasource.DatabaseDataSource.executeAndGetGeneratedKey
(Unknown Source)
at org.persvr.datasource.DatabaseTableDataSource$2.finished(Unknown
Source)
at org.persvr.data.PersistableObject.persistNewObject(Unknown Source)
at org.persvr.data.NewObjectId.persistIfNeeded(Unknown Source)
at org.persvr.data.Transaction.commit(Unknown Source)
at org.persvr.remote.Client.commitTransaction(Unknown Source)
at org.persvr.remote.PersevereFilter.doFilter(Unknown Source)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter
(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter
(WebAppFilterChain.java:130)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter
(WebAppFilterChain.java:87)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter
(WebAppFilterManager.java:832)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters
(WebAppFilterManager.java:742)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters
(WebAppFilterManager.java:695)
at com.ibm.ws.wswebcontainer.filter.WebAppFilterManager.invokeFilters
(WebAppFilterManager.java:101)
at
com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilters
(DefaultExtensionProcessor.java:818)
at
com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest
(DefaultExtensionProcessor.java:768)
at
com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.handleRequest
(DefaultExtensionProcessor.java:113)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:
3440)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest
(WebGroup.java:267)
at com.ibm.ws.webcontainer.WebContainer.handleRequest
(WebContainer.java:815)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest
(WebContainer.java:1461)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready
(WCChannelLink.java:118)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination
(HttpInboundLink.java:458)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation
(HttpInboundLink.java:387)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready
(HttpInboundLink.java:267)
at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators
(NewConnectionInitialReadCallback.java:214)
at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete
(NewConnectionInitialReadCallback.java:113)
at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted
(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback
(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions
(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop
(ResultHandler.java:743)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)

the mydatabase.json file in the config directory has the following:

{
"id":"myDatabase.json",
"sources":[
{
"name":"names",

"sourceClass":"org.persvr.datasource.DatabaseTableDataSource",
"driver":"com.mysql.jdbc.Driver",
"connection":"jdbc:mysql://localhost/aol?
user=root&password=XXXXX",
"table":"names",
"idColumn":"id",
"dataColumns":[
"firstname",
"lastname",
"created"
],
"schema":{
"data":{
"$ref":"../names/"
}
}
}
]
}

The database table appears as the following:
create table names (id int not null auto_increment, primary key(id),
lastname varchar(30), firstname varchar(30), created varchar(50));


Kris Zyp

unread,
Mar 3, 2009, 7:10:21 PM3/3/09
to persevere...@googlegroups.com
Are you using MySQL version 5.1.7? There is known regression that version.

leazar

unread,
Mar 4, 2009, 9:41:34 AM3/4/09
to Persevere

The version is 5.0.27-community-nt .... I'm running on XP

leazar

unread,
Mar 4, 2009, 1:37:06 PM3/4/09
to Persevere

looks like this was self inflicted,
I'm running with MySQL 5.0.27, but was using mysql_connector
5.1.7 ..... I dropped back to the 5.0.8 connector and all seems to
work.

good post describing the bug in MySQL 5.1.7 is located here:
http://bugs.mysql.com/bug.php?id=41448
Reply all
Reply to author
Forward
0 new messages