source mySql save

0 views
Skip to first unread message

clogan

unread,
Jan 16, 2009, 2:10:34 PM1/16/09
to Persevere
(2009-01-15 nightly)
How do I get a xStore.newItem(<data>) record to save back to mySql?

It appears that I can create one in both my browser and from explorer,
but it does not save back to mySql that I can see from phpMyAdmin.
What am I missing? How do I set this up so that the auto-inc field
which is the id does not need to be specified from the browser or P
server?

clogan

unread,
Jan 16, 2009, 2:24:24 PM1/16/09
to Persevere
If I supply the id/key value, "2", it gets set to "s$2" for example.
It gives the appearance of working, but nothing gets written to mySQL.

clogan

unread,
Jan 21, 2009, 10:25:03 AM1/21/09
to Persevere
Is there a way for me to turn on traces/logs so I can see what is
going on?
I looked over javadocs, but I'm still clueless as to where to look
concerning traces or code.

Kris Zyp

unread,
Jan 21, 2009, 11:27:37 AM1/21/09
to persevere...@googlegroups.com

clogan wrote:
> On Jan 16, 2:24 pm, clogan <charleswlo...@yahoo.com> wrote:
>
>> If I supply the id/key value, "2", it gets set to "s$2" for example.
>> It gives the appearance of working, but nothing gets written to mySQL.
>>
>> On Jan 16, 2:10 pm, clogan <charleswlo...@yahoo.com> wrote:
>>
>>
>>> (2009-01-15 nightly)
>>> How do I get a xStore.newItem(<data>) record to save back to mySql?
>>>

I assume you are calling xStore.save(). Is this resulting in a POST? Can
you see the response from the server/Persevere? Is this where you see
"s$2"? Do you have a auto-generated identity column in your table?

> Is there a way for me to turn on traces/logs so I can see what is
> going on?
> I looked over javadocs, but I'm still clueless as to where to look
> concerning traces or code.
>

You can do this at the console to turn on JDBC logging:
java.sql.DriverManager.setLogStream(java.lang.System.out);
But that doesn't print any of the actual SQL statements that are issued,
so it may not be helpful. I probably need to add debugging statements in
the code itself, so this can be turned on, perhaps through log4j or
something. I need to figure out how that is done, since I don't want
logging statements printing out all the SQL for everyone.

Kris

clogan

unread,
Jan 21, 2009, 1:07:49 PM1/21/09
to Persevere
below...

On Jan 21, 11:27 am, Kris Zyp <kris...@gmail.com> wrote:
> clogan wrote:
> > On Jan 16, 2:24 pm, clogan <charleswlo...@yahoo.com> wrote:
>
> >> If I supply the id/key value, "2", it gets set to "s$2" for example.
> >> It gives the appearance of working, but nothing gets written to mySQL.
>
> >> On Jan 16, 2:10 pm, clogan <charleswlo...@yahoo.com> wrote:
>
> >>> (2009-01-15 nightly)
> >>> How do I get a xStore.newItem(<data>) record to save back to mySql?
>
> I assume you are calling xStore.save(). Is this resulting in a POST?

Correct. Working from the "Getting Started" doc as a base for testing
basic functionality from browser..

> Can you see the response from the server/Persevere? Is this where you see "s$2"?
> Do you have a auto-generated identity column in your table?

Ok, let me lay out what I've tried...

First, I have a table in mySql with the following fields:
id, int, not null, primary key (auto incr)
user, tinytext, null
email, tinytext, null
startcmd, tinytext, not null
startargs, text, null
stopcmd, tinytext, null
priority, int, not null, def: 2
state, tinytext, null
status, text, null
progress, int, no null, def: 0
submitstamp, timestamp, not null, def: CURRENT_TIMESTAMP
startstamp, timestamp, null
stopstamp, timestamp, null
userlog, tinytext, null
fulllog, tinytext, null

If I create a new item, ex: jobsStore.newItem
({user:"xxx",email:"xxx",startcmd:"startit"});
I get get for POST, Response:
500 Internal Server Error

Post
{"user":"xxx","email":"xxx","startcmd":"startit"}
Response
"No value specified for parameter 1"

(This is how the Getting Started shows params.)

So, if I do it again supplying id:"2" (maybe key is needed), I get:
500 Internal Server Error

Header
Content-ID: </jobs/2>

Post
{"id":"2","user":"gsweezy","email":"gsweezy@alcatel-
lucent.com","startcmd":"startit"}

Response
"No value specified for parameter 1"

(What is parameter 1?)

If I create another (identical) item and save I get:
201 Created (18ms)

Header
Location http://localhost:8088/jobs/s$6

Post
{"id":"2","user":"gsweezy","email":"gsweezy@alcatel-
lucent.com","startcmd":"startit"}

Response
({"id":"s$6",
"email":"xxx",
"startcmd":"startit",
"user":"xxx"
})

If I look at the table in explorer, I see nothing.

Now, if I try to create the record from explorer.html...
CreatNewJobs
{"id":2,"user":"xxx","email":"xxx","startcmd":"startargs" }

206 Partial Content

Now, save
500 Internal Server Error

Post
{"id":2,"user":"xxx","email":"xxx","startcmd":"startargs"}

Response
"java.lang.Integer cannot be cast to java.lang.String"

(I don't know if I should have id as string or int going to persevere,
but int in mySql.)

I realize now that I was sending string for int for primary key. Try
again for "id":3 and quote/literal field names...
Same as explorer: "java.lang.Integer cannot be cast to
java.lang.String"

Try as string...
Same as before: "No value specified for parameter 1"

From explorer...
Create New jobs
{id:2,user:"xxx",startcmd:"xxx"}
Save
Syntax error
toString()()
undefined

Wow, now what??

> > Is there a way for me to turn on traces/logs so I can see what is
> > going on?
> > I looked over javadocs, but I'm still clueless as to where to look
> > concerning traces or code.
>
> You can do this at the console to turn on JDBC logging:
> java.sql.DriverManager.setLogStream(java.lang.System.out);
> But that doesn't print any of the actual SQL statements that are issued,
> so it may not be helpful. I probably need to add debugging statements in
> the code itself, so this can be turned on, perhaps through log4j or
> something. I need to figure out how that is done, since I don't want
> logging statements printing out all the SQL for everyone.
> Kris

Let me know when it's in a nightly and I'll try it, but ok if firebug
provides enough info.

Thanks,
Charlie

Kris Zyp

unread,
Jan 22, 2009, 11:00:30 AM1/22/09
to persevere...@googlegroups.com
You said that you are getting a 500 Internal Server Error a number of
times. Can you include the server log output for those errors? Perhaps
there is data missing for required columns?Anyway, sorry for the slow
response,
Kris

clogan

unread,
Jan 22, 2009, 11:32:29 AM1/22/09
to Persevere
Compared to some open source projects, I think you respond well. I
think you have a good thing here, and I'm just glad I get a
response! :-)
Please let me know of ways I can help. I would not consider myself a
java programmer or a very good js prgmr, but I'll give anything a try
if you just point me in a direction.
Every day I am getting a little more familiar with what is going on
beyond face value info - slow, but steady.

On Jan 22, 11:00 am, Kris Zyp <kris...@gmail.com> wrote:
> You said that you are getting a 500 Internal Server Error a number of
> times. Can you include the server log output for those errors? Perhaps
> there is data missing for required columns?Anyway, sorry for the slow
> response,
> Kris

Here is yesterdays recreation err.log:
...Hmm, we were having some network issues here yesterday, let me
verify its the same err today in the mean time...

2009-01-21 12:02:11.817::INFO: Logging to STDERR via
org.mortbay.log.StdErrLog
2009-01-21 12:02:12.739::INFO: jetty-6.1.14
2009-01-21 12:02:13.942::INFO: NO JSP Support for /, did not find
org.apache.jasper.servlet.JspServlet
Jan 21, 2009 12:02:28 PM org.persvr.remote.PersevereFilter init
INFO: Persevere v0.9.29 Started
2009-01-21 12:02:28.817::INFO: Opened C:\Program Files\Apache
Software Foundation\Apache2.2\persevere\logs\2009_01_21.request.log
2009-01-21 12:02:28.927::INFO: Started
SelectChann...@0.0.0.0:8080
2009-01-21 12:10:35.573::WARN: /channels
java.lang.RuntimeException: You must include a Client-Id or Create-
Client-Id header
at org.persvr.servlet.Channels.getEventStream(Unknown Source)
at org.persvr.servlet.Channels.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
502)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1124)
at org.persvr.remote.PersevereFilter.doFilter(Unknown Source)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1115)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:361)
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
417)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle
(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle
(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
534)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete
(HttpConnection.java:864)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:533)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:207)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
at org.mortbay.io.nio.SelectChannelEndPoint.run
(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run
(QueuedThreadPool.java:522)
Jan 21, 2009 12:11:19 PM org.persvr.remote.PersevereFilter doFilter
WARNING:
java.lang.RuntimeException: java.lang.RuntimeException:
java.sql.SQLException: No value specified for parameter 1
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 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1115)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:361)
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
417)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle
(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle
(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
534)
at org.mortbay.jetty.HttpConnection$RequestHandler.content
(HttpConnection.java:879)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:741)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:213)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
at org.mortbay.io.nio.SelectChannelEndPoint.run
(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run
(QueuedThreadPool.java:522)
Caused by: java.lang.RuntimeException: java.sql.SQLException: No value
specified for parameter 1
at org.persvr.data.PersistableObject.persistNewObject(Unknown Source)
at org.persvr.data.NewObjectId.persistIfNeeded(Unknown Source)
... 20 more
Caused by: java.sql.SQLException: No value specified for parameter 1
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.PreparedStatement.fillSendPacket
(PreparedStatement.java:2214)
at com.mysql.jdbc.PreparedStatement.fillSendPacket
(PreparedStatement.java:2138)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:
957)
at org.persvr.datasource.DatabaseDataSource.executeAndGetGeneratedKey
(Unknown Source)
at org.persvr.datasource.DatabaseTableDataSource$2.finished(Unknown
Source)
... 22 more
2009-01-21 12:15:44.603::WARN: /channels
java.lang.RuntimeException: You must include a Client-Id or Create-
Client-Id header
at org.persvr.servlet.Channels.getEventStream(Unknown Source)
at org.persvr.servlet.Channels.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
502)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1124)
at org.persvr.remote.PersevereFilter.doFilter(Unknown Source)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1115)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:361)
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
417)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle
(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle
(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
534)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete
(HttpConnection.java:864)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:533)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:207)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
at org.mortbay.io.nio.SelectChannelEndPoint.run
(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run
(QueuedThreadPool.java:522)
2009-01-21 12:20:53.585::WARN: /channels
java.lang.RuntimeException: You must include a Client-Id or Create-
Client-Id header
at org.persvr.servlet.Channels.getEventStream(Unknown Source)
at org.persvr.servlet.Channels.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
502)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1124)
at org.persvr.remote.PersevereFilter.doFilter(Unknown Source)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1115)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:361)
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
417)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle
(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle
(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
534)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete
(HttpConnection.java:864)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:533)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:207)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
at org.mortbay.io.nio.SelectChannelEndPoint.run
(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run
(QueuedThreadPool.java:522)
Jan 21, 2009 12:21:46 PM org.persvr.remote.PersevereFilter doFilter
WARNING:
java.lang.RuntimeException: java.lang.RuntimeException:
java.sql.SQLException: No value specified for parameter 1
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 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1115)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:361)
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
417)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle
(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle
(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
534)
at org.mortbay.jetty.HttpConnection$RequestHandler.content
(HttpConnection.java:879)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:741)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:213)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
at org.mortbay.io.nio.SelectChannelEndPoint.run
(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run
(QueuedThreadPool.java:522)
Caused by: java.lang.RuntimeException: java.sql.SQLException: No value
specified for parameter 1
at org.persvr.data.PersistableObject.persistNewObject(Unknown Source)
at org.persvr.data.NewObjectId.persistIfNeeded(Unknown Source)
... 20 more
Caused by: java.sql.SQLException: No value specified for parameter 1
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.PreparedStatement.fillSendPacket
(PreparedStatement.java:2214)
at com.mysql.jdbc.PreparedStatement.fillSendPacket
(PreparedStatement.java:2138)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:
957)
at org.persvr.datasource.DatabaseDataSource.executeAndGetGeneratedKey
(Unknown Source)
at org.persvr.datasource.DatabaseTableDataSource$2.finished(Unknown
Source)
... 22 more
2009-01-21 12:26:46.210::WARN: /channels
java.lang.RuntimeException: You must include a Client-Id or Create-
Client-Id header
at org.persvr.servlet.Channels.getEventStream(Unknown Source)
at org.persvr.servlet.Channels.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
502)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1124)
at org.persvr.remote.PersevereFilter.doFilter(Unknown Source)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1115)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:361)
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
417)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle
(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle
(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
534)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete
(HttpConnection.java:864)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:533)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:207)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
at org.mortbay.io.nio.SelectChannelEndPoint.run
(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run
(QueuedThreadPool.java:522)
2009-01-21 12:31:55.162::WARN: /channels
java.lang.RuntimeException: You must include a Client-Id or Create-
Client-Id header
at org.persvr.servlet.Channels.getEventStream(Unknown Source)
at org.persvr.servlet.Channels.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
502)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1124)
at org.persvr.remote.PersevereFilter.doFilter(Unknown Source)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1115)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:361)
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
417)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle
(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle
(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
534)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete
(HttpConnection.java:864)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:533)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:207)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
at org.mortbay.io.nio.SelectChannelEndPoint.run
(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run
(QueuedThreadPool.java:522)
Jan 21, 2009 12:35:42 PM org.persvr.remote.PersevereFilter doFilter
WARNING:
java.lang.RuntimeException: java.lang.RuntimeException:
java.sql.SQLException: No value specified for parameter 1
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 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1115)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:361)
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
417)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle
(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle
(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
534)
at org.mortbay.jetty.HttpConnection$RequestHandler.content
(HttpConnection.java:879)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:741)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:213)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
at org.mortbay.io.nio.SelectChannelEndPoint.run
(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run
(QueuedThreadPool.java:522)
Caused by: java.lang.RuntimeException: java.sql.SQLException: No value
specified for parameter 1
at org.persvr.data.PersistableObject.persistNewObject(Unknown Source)
at org.persvr.data.NewObjectId.persistIfNeeded(Unknown Source)
... 20 more
Caused by: java.sql.SQLException: No value specified for parameter 1
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.PreparedStatement.fillSendPacket
(PreparedStatement.java:2214)
at com.mysql.jdbc.PreparedStatement.fillSendPacket
(PreparedStatement.java:2138)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:
957)
at org.persvr.datasource.DatabaseDataSource.executeAndGetGeneratedKey
(Unknown Source)
at org.persvr.datasource.DatabaseTableDataSource$2.finished(Unknown
Source)
... 22 more
Jan 21, 2009 12:40:47 PM org.persvr.remote.PersevereFilter doFilter
WARNING:
java.lang.RuntimeException: java.lang.RuntimeException:
java.sql.SQLException: No value specified for parameter 1
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 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1115)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:361)
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
417)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle
(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle
(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
534)
at org.mortbay.jetty.HttpConnection$RequestHandler.content
(HttpConnection.java:879)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:741)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:213)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
at org.mortbay.io.nio.SelectChannelEndPoint.run
(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run
(QueuedThreadPool.java:522)
Caused by: java.lang.RuntimeException: java.sql.SQLException: No value
specified for parameter 1
at org.persvr.data.PersistableObject.persistNewObject(Unknown Source)
at org.persvr.data.NewObjectId.persistIfNeeded(Unknown Source)
... 20 more
Caused by: java.sql.SQLException: No value specified for parameter 1
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.PreparedStatement.fillSendPacket
(PreparedStatement.java:2214)
at com.mysql.jdbc.PreparedStatement.fillSendPacket
(PreparedStatement.java:2138)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:
957)
at org.persvr.datasource.DatabaseDataSource.executeAndGetGeneratedKey
(Unknown Source)
at org.persvr.datasource.DatabaseTableDataSource$2.finished(Unknown
Source)
... 22 more
Jan 21, 2009 12:53:49 PM org.persvr.remote.PersevereFilter doFilter
WARNING:
java.lang.ClassCastException: java.lang.Integer cannot be cast to
java.lang.String
at org.persvr.remote.JsonReceiver.idFromJSPONObject(Unknown Source)
at org.persvr.remote.JsonReceiver.convertParsedToObject(Unknown
Source)
at org.persvr.remote.PersevereFilter.doFilter(Unknown Source)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1115)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:361)
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
417)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle
(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle
(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
534)
at org.mortbay.jetty.HttpConnection$RequestHandler.content
(HttpConnection.java:879)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:741)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:213)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
at org.mortbay.io.nio.SelectChannelEndPoint.run
(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run
(QueuedThreadPool.java:522)
2009-01-21 12:55:57.864::WARN: /channels
java.lang.RuntimeException: You must include a Client-Id or Create-
Client-Id header
at org.persvr.servlet.Channels.getEventStream(Unknown Source)
at org.persvr.servlet.Channels.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
502)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1124)
at org.persvr.remote.PersevereFilter.doFilter(Unknown Source)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1115)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:361)
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
417)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle
(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle
(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
534)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete
(HttpConnection.java:864)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:533)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:207)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
at org.mortbay.io.nio.SelectChannelEndPoint.run
(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run
(QueuedThreadPool.java:522)
Jan 21, 2009 12:56:43 PM org.persvr.remote.PersevereFilter doFilter
WARNING:
java.lang.ClassCastException: java.lang.Integer cannot be cast to
java.lang.String
at org.persvr.remote.JsonReceiver.idFromJSPONObject(Unknown Source)
at org.persvr.remote.JsonReceiver.convertParsedToObject(Unknown
Source)
at org.persvr.remote.PersevereFilter.doFilter(Unknown Source)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1115)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:361)
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
417)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle
(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle
(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
534)
at org.mortbay.jetty.HttpConnection$RequestHandler.content
(HttpConnection.java:879)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:741)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:213)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
at org.mortbay.io.nio.SelectChannelEndPoint.run
(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run
(QueuedThreadPool.java:522)
Jan 21, 2009 12:57:45 PM org.persvr.remote.PersevereFilter doFilter
WARNING:
java.lang.RuntimeException: java.lang.RuntimeException:
java.sql.SQLException: No value specified for parameter 1
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 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1115)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:361)
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
417)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle
(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle
(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
534)
at org.mortbay.jetty.HttpConnection$RequestHandler.content
(HttpConnection.java:879)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:741)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:213)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
at org.mortbay.io.nio.SelectChannelEndPoint.run
(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run
(QueuedThreadPool.java:522)
Caused by: java.lang.RuntimeException: java.sql.SQLException: No value
specified for parameter 1
at org.persvr.data.PersistableObject.persistNewObject(Unknown Source)
at org.persvr.data.NewObjectId.persistIfNeeded(Unknown Source)
... 20 more
Caused by: java.sql.SQLException: No value specified for parameter 1
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.PreparedStatement.fillSendPacket
(PreparedStatement.java:2214)
at com.mysql.jdbc.PreparedStatement.fillSendPacket
(PreparedStatement.java:2138)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:
957)
at org.persvr.datasource.DatabaseDataSource.executeAndGetGeneratedKey
(Unknown Source)
at org.persvr.datasource.DatabaseTableDataSource$2.finished(Unknown
Source)
... 22 more
Jan 21, 2009 1:00:21 PM org.persvr.remote.PersevereFilter doFilter
WARNING:
java.lang.ClassCastException: java.lang.Integer cannot be cast to
java.lang.String
at org.persvr.remote.JsonReceiver.idFromJSPONObject(Unknown Source)
at org.persvr.remote.JsonReceiver.convertParsedToObject(Unknown
Source)
at org.persvr.remote.PersevereFilter.doFilter(Unknown Source)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1115)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:361)
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
417)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle
(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle
(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
534)
at org.mortbay.jetty.HttpConnection$RequestHandler.content
(HttpConnection.java:879)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:741)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:213)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
at org.mortbay.io.nio.SelectChannelEndPoint.run
(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run
(QueuedThreadPool.java:522)
2009-01-21 13:02:48.827::WARN: /channels
java.lang.RuntimeException: You must include a Client-Id or Create-
Client-Id header
at org.persvr.servlet.Channels.getEventStream(Unknown Source)
at org.persvr.servlet.Channels.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
502)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1124)
at org.persvr.remote.PersevereFilter.doFilter(Unknown Source)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1115)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:361)
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
417)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle
(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle
(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
534)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete
(HttpConnection.java:864)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:533)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:207)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
at org.mortbay.io.nio.SelectChannelEndPoint.run
(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run
(QueuedThreadPool.java:522)
2009-01-21 13:22:30.026::INFO: Shutdown hook executing
2009-01-21 13:22:30.026::INFO: Graceful shutdown
SelectChann...@0.0.0.0:8080
2009-01-21 13:22:30.135::INFO: Graceful shutdown
org.mortbay.jetty.webapp.WebAppContext@d8978c{/,file:/C:/Program
%20Files/Apache%20Software%20Foundation/Apache2.2/persevere/}
2009-01-21 13:22:31.244::INFO: Shutdown hook complete
> > Locationhttp://localhost:8088/jobs/s$6

clogan

unread,
Jan 22, 2009, 11:40:06 AM1/22/09
to Persevere
Here is my core.json entry too:
(I think I've tried with/without UTF-8.)

{
"driver":"com.mysql.jdbc.Driver",
"table":"jobs",
"sourceClass":"org.persvr.datasource.DatabaseTableDataSource",
"idColumn":"id",
"name":"jobs",
"connection":"jdbc:mysql://aurk17.aur.alcatel.com:3306/superbatch?
user=superbatch&password=superbatch!
&useUnicode=true&characterEncoding=utf-8&mysqlEncoding=utf8",
"schema":{
"data":{"$ref":"../jobs/"},
"prototype":{
}
},
"dataColumns":[
"id",
"user",
"email",
"startcmd",
"startargs",
"stopcmd",
"priority",
"state",
"status",
"progress",
"submitstamp",
"startstamp",
"stopstamp",
"userlog",
"fulllog"
],
"camelCaseColumnNames":false
} ],

Kris Zyp

unread,
Jan 22, 2009, 11:42:41 AM1/22/09
to persevere...@googlegroups.com
Thanks, yes, the exception does indicate that the problem is that there
are missing values. The problem is that the Persevere SQL data source is
expecting the newly created object to have all the property values that
correspond with the columns in the table (at least those you defined in
the config file). When they aren't all there it throws an error. This is
a bug, in the sense that Persevere should be able to save the object
even if all the properties aren't there. I'll file a ticket and get it
fixed. In the meantime you can probably get it to work by making sure
you have a property in the object for every column you have defined.

Kris

clogan

unread,
Jan 22, 2009, 11:45:35 AM1/22/09
to Persevere
Also, I think there are only two fields that are actually required
(from mySql) (not null and w/o default): "id" and "startcmd"
Maybe, I need to define rqrd in core.json - not clear to me?...
I'll try in explorer to see what happens.

Kris Zyp

unread,
Jan 22, 2009, 11:46:01 AM1/22/09
to persevere...@googlegroups.com
And that is the issue with Persevere, it is not properly handling
non-required fields right now.
Kris

clogan

unread,
Jan 22, 2009, 12:12:42 PM1/22/09
to Persevere
(nightly, 2009-01-15)
Ok, thanks. Then, I might have more issues for you now, hopefully
helpful...

Should rqrd fields be defined in schema somehow (NULL vs. NOT NULL vs
not NULL, DEFAULT / AUTO_INCR)?
** Should Persevere be able to pull DEFAULT values from mySql schema
and use these to help fill forms or should I be able to define my own
in core.json schema? ** I think this might be interesting.
Do I still need to define all the fields in order to read all the
data? - I would guess yes.
Do I need to match int with number and string with string, or will it
cast strings to numbers, etc.?

I tried sending numbers for ints and strings for text and I get the
following problem still:

2009-01-22 11:57:36.485::INFO: Logging to STDERR via
org.mortbay.log.StdErrLog
2009-01-22 11:57:37.047::INFO: jetty-6.1.14
2009-01-22 11:57:37.485::INFO: NO JSP Support for /, did not find
org.apache.jasper.servlet.JspServlet
Jan 22, 2009 11:57:45 AM org.persvr.remote.PersevereFilter init
INFO: Persevere v0.9.29 Started
2009-01-22 11:57:45.594::INFO: Opened C:\Program Files\Apache
Software Foundation\Apache2.2\persevere\logs\2009_01_22.request.log
2009-01-22 11:57:45.657::INFO: Started
SelectChann...@0.0.0.0:8080
Jan 22, 2009 11:59:48 AM org.persvr.remote.PersevereFilter doFilter
for

Post (this is all the fields)
{"id":
2,"user":"xxx","email":"xxx","startcmd":"startit","startargs":"","stopcmd":"","priority":
2,"state"
:"","status":"","progress":
0,"submitstamp":"","startstamp":"","stopstamp":"","userlog":"","fulllog":""
}

Response
"java.lang.Integer cannot be cast to java.lang.String"



> > SelectChannelConnec...@0.0.0.0:8080
> ...
>
> read more »

clogan

unread,
Jan 22, 2009, 12:17:07 PM1/22/09
to Persevere
When it is all made strings, I get, again (so, seems that there is a
casting issue too):

Jan 22, 2009 12:14:42 PM org.persvr.remote.PersevereFilter doFilter
> SelectChannelConnec...@0.0.0.0:8080
> ...
>
> read more »

Kris Zyp

unread,
Jan 23, 2009, 10:58:25 PM1/23/09
to persevere...@googlegroups.com
I checked in a fix for this (No value specified for parameter error) today.
Kris

clogan

unread,
Jan 26, 2009, 9:37:12 AM1/26/09
to Persevere
(persevere2009-01-26.tar.gz)

Almost there...

I can now create a record, but I still get errors.

Post:
{"user":"xxx","email":"xxx","startcmd":"startit"}

Response:
"!Statement.GeneratedKeysNotRequested!"

When I look at mySql directly, all is fine.

When I issue: http://localhost:8080/jobs
{}&&[
{"id":"jobs/1",
"id":1,
"user":"clogan",
"email":"charle...@alcatel-lucent.com",
"startcmd":"start",
"startargs":"args",
"stopcmd":"stop",
"priority":2,
"state":"1",
"status":"Accepted",
"progress":20,
"submitstamp":new Date(1231881691000),
"startstamp":null,
"stopstamp":null,
"userlog":null,
"fulllog":null
},
{"id":"jobs/s$0",
"user":"xxx",
"email":"xxx",
"startcmd":"startit",
"startargs":"",
"stopcmd":"",
"priority":"2",
"state":"",
"status":"",
"progress":"0",
"submitstamp":"",
"startstamp":"",
"stopstamp":"",
"userlog":"",
"fulllog":""
}]

**You can see that id field is missing and the assigned key is "s$0"
I should see id:2 and key of 2.

Almost there...
> > SelectChannelConnec...@0.0.0.0:8080
> ...
>
> read more »

clogan

unread,
Jan 26, 2009, 9:42:14 AM1/26/09
to Persevere
If I stop persevere server and restart, all is well with that record.

On Jan 26, 9:37 am, clogan <charliewlo...@gmail.com> wrote:
> (persevere2009-01-26.tar.gz)
>
> Almost there...
>
> I can now create a record, but I still get errors.
>
> Post:
> {"user":"xxx","email":"xxx","startcmd":"startit"}
>
> Response:
> "!Statement.GeneratedKeysNotRequested!"
>
> When I look at mySql directly, all is fine.
>
> When I issue:http://localhost:8080/jobs
> {}&&[
> {"id":"jobs/1",
>         "id":1,
>         "user":"clogan",
>         "email":"charles.lo...@alcatel-lucent.com",
> ...
>
> read more »

clogan

unread,
Jan 27, 2009, 10:14:03 AM1/27/09
to Persevere
...so this seems to be a problem. (Just in case you misunderstood my
last post to mean all is well. 8^) )
> ...
>
> read more »

Kris Zyp

unread,
Jan 27, 2009, 10:21:15 AM1/27/09
to persevere...@googlegroups.com
This means that somehow the generated id wasn't passed back to Persevere
from MySQL. Looking back on your configuration, maybe you should try
removing "id" from the "dataColumns", it only needs to be in the
"idColumn". Not sure if that is the cause or not.
Kris

clogan wrote:
> ...so this seems to be a problem. (Just in case you misunderstood my
> last post to mean all is well. 8^) )
>
> On Jan 26, 9:42 am, clogan <charliewlo...@gmail.com> wrote:
>
>> If I stop persevere server and restart, all is well with that record.
>>
>> On Jan 26, 9:37 am, clogan <charliewlo...@gmail.com> wrote:
>>
>>
>>> (persevere2009-01-26.tar.gz)
>>>
>>> Almost there...
>>>
>>> I can now create a record, but I still get errors.
>>>
>>> Post:
>>> {"user":"xxx","email":"xxx","startcmd":"startit"}
>>>
>>> Response:
>>> "!Statement.GeneratedKeysNotRequested!"
>>>
>>> When I look at mySql directly, all is fine.
>>>
>>> When I issue:http://localhost:8080/jobs
>>> {}&&[
>>> {"id":"jobs/1",
>>> "id":1,
>>> "user":"clogan",
>>> "email":"xxx",

clogan

unread,
Jan 27, 2009, 11:44:43 AM1/27/09
to Persevere
Ok, so I removed "id" from my field list.

Now, field "id" is fixed - this works. I can now reliably create
records to mySql.

BUT, I still get "Internal Server Error 500" in Firebug.
Response: "!Statement.GeneratedKeysNotRequested!"
Should this be generating an error just because I'm not supplying a
key that is autogenerated in mySql?

Also, note below that the "magic" text, "{}&&[" is still present.
Should it be there?

{}&&[
.
.
.
{"id":"jobs/3",
"user":"xxx",
"email":"xxx",
"startcmd":"startit",
"startargs":null,
"stopcmd":null,
"priority":2,
"state":null,
"status":null,
"progress":0,
"submitstamp":new Date(1233074002000),
"startstamp":null,
"stopstamp":null,
"userlog":null,
"fulllog":null
},
{"id":"jobs/4",
"user":"xxx",
"email":"xxx",
"startcmd":"startit",
"startargs":null,
"stopcmd":null,
"priority":2,
"state":null,
"status":null,
"progress":0,
"submitstamp":new Date(1233074014000),
"startstamp":null,
"stopstamp":null,
"userlog":null,
"fulllog":null
}]
> ...
>
> read more »

Kris Zyp

unread,
Jan 27, 2009, 4:31:06 PM1/27/09
to persevere...@googlegroups.com

clogan wrote:
> Ok, so I removed "id" from my field list.
>
> Now, field "id" is fixed - this works. I can now reliably create
> records to mySql.
>
> BUT, I still get "Internal Server Error 500" in Firebug.
> Response: "!Statement.GeneratedKeysNotRequested!"
> Should this be generating an error just because I'm not supplying a
> key that is autogenerated in mySql?
>

No, this would presumably be the result of Persevere not getting an
auto-generated key. Are you using the latest version of the MySQL
driver? I wonder if there something that isn't passing the generated key
through... And could you do a describe? Maybe I will try to recreate
your table locally to see if I can get the error...


> Also, note below that the "magic" text, "{}&&[" is still present.
> Should it be there?
>
> {}&&[
>

This is present to defend against CSRF attacks, as I described in the
"Related Question..." thread. If you are using the standard technique of
eval with paranthesis wrapping, this should parse fine.

Thanks,
Kris

clogan

unread,
Feb 4, 2009, 5:44:12 PM2/4/09
to Persevere
(sorry for long delay in responding - was taking a class)

jobs
Field Type Null Default Links to Comments MIME
id int(11) No
user tinytext Yes NULL
email tinytext Yes NULL
startcmd tinytext No
startargs text Yes NULL
stopcmd tinytext Yes NULL
priority int(11) No 2
state tinytext Yes NULL
status text Yes NULL text/plain
progress int(11) No 0
submitstamp timestamp No CURRENT_TIMESTAMP
startstamp timestamp Yes NULL
stopstamp timestamp Yes NULL
userlog tinytext Yes NULL
fulllog tinytext Yes NULL


Indexes:
Keyname Type Cardinality Field
PRIMARY PRIMARY 4 id


Space usage:
Type Usage
Data 232 B
Index 2,048 B
Total 2,280 B
Row Statistics:
Statements Value
Format dynamic
Rows 4
Row length ø 58
Row size ø 570 B
Next Autoindex 5
Creation Jan 21, 2009 at 12:25 PM
Last update Jan 27, 2009 at 11:33 AM

Is this what you need?
Ok. Thanks.

clogan

unread,
Feb 5, 2009, 9:09:07 AM2/5/09
to Persevere
And, here is the source description in core.json:

{
"driver":"com.mysql.jdbc.Driver",
"table":"jobs",
"sourceClass":"org.persvr.datasource.DatabaseTableDataSource",
"idColumn":"id",
"name":"jobs",
"connection":"jdbc:mysql://x.com:3306/xdb?
user=x&password=x&useUnicode=true&characterEncoding=utf-8&mysqlEncoding=utf8",
"schema":{
"data":{"$ref":"../jobs/"},
"prototype":{
}
},
"dataColumns":[
"user",
"email",
"startcmd",
"startargs",
"stopcmd",
"priority",
"state",
"status",
"progress",
"submitstamp",
"startstamp",
"stopstamp",
"userlog",
"fulllog"
],
"camelCaseColumnNames":false
} ],

Kris Zyp

unread,
Feb 9, 2009, 10:10:11 AM2/9/09
to persevere...@googlegroups.com
Did you ever say what version of MySql connector/JDBC driver you are
using? It appears that there are others that are experiencing this error
due to a regression in version 5.1.7 (your table seems to work properly
for me and I am using 5.1.6).
Kris

Kris Zyp

unread,
Feb 9, 2009, 10:56:21 AM2/9/09
to persevere...@googlegroups.com
Sorry, I forgot to actually include the link:
http://bugs.mysql.com/bug.php?id=41448
Kris

clogan

unread,
Feb 17, 2009, 10:40:40 AM2/17/09
to Persevere
Sorry, I missed this response in my email.
I'm using 5.1.7.
I'll get me 5.1.6 if I can find it.

Thanks.
You rock!
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages