leazar
unread,Mar 3, 2009, 6:26:17 PM3/3/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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));