Scott,
You could try to set your
services.LoggingService.sql.level=DEBUG
Then you should get the output of your sql queries in the log that would
give you a better clue as to what is happening.
regards
Dave Meaker
> -----Original Message-----
> From: Weaver, Scott [mailto:[EMAIL PROTECTED]]
> Sent: 10 September 2001 17:46
> To: '[EMAIL PROTECTED]'
> Subject: Problems with DB2/400 Database, Turbine and Village
>
>
> Hi All,
>
> I've been playing with Turbine for about 2 weeks now and have
> run into a
> problem using Turbine with a DB2/400 database (for all you
> non-IBM AS400
> folks, that is the version of DB2 that runs on the IBM
> AS400). I was able
> to put together all the needed velocity scripts and the appropriate
> torque\templates\sql\base\db2400\db.props file so that Torque
> would work and
> create the database correctly. I also have created a db adapter for
> DB2/400. I successfully got Turbine running against the
> DB2/400 database
> and can successfully log in but when I try to create a new
> user (or any
> other type of record) I receive the stack trace and errors
> posted below.
>
> It seems that the SQL syntax of the prepared statement is not fully
> compatible with DB2/400. Is there anyway I can get Turbine
> to print to the
> log the SQL of the PeparedStatement so I can review it? I've set
> services.LoggingService.sql.level=INFO along with appending
> trace and error
> properties to the end of my jdbc url
> (database.default.url=jdbc:as400://ohio/jportal;errors=full;tr
> ace=true) and
> I still do not see anything more than the log below.
>
>
> p.s.
> I have seen some post in the archives about village failing
> to insert BLOB
> objects into certain databases (I think it was postgres???)
> and I know that
> DB2/400 has only had BLOB support for a VERY short time
> (meaning I don't
> trust it). Could that be my problem?
>
>
>
> Thanks for the help,
> Scott
>
>
> ----------------------- turbine.log
> --------------------------------------------------------------------
>
>
> [Mon Sep 10 11:44:47 EDT 2001] -- ERROR --
> TurbineUser.valueUnbobund():
> Failed to save user object: [SQL0104] Token USER_ID was not
> valid. Valid
> tokens: =. Cause . . . . . : A syntax error was detected at
> token USER_ID.
> Token USER_ID is not a valid token. A partial list of valid
> tokens is =.
> This list assumes that the statement is correct up to the
> token. The error
> may be earlier in the statement, but the syntax of the
> statement appears to
> be valid up to this point. Recovery . . . : Do one or more of the
> following and try the request again: -- Verify the SQL
> statement in the area
> of the token USER_ID. Correct the statement. The error could
> be a missing
> comma or quotation mark, it could be a misspelled word, or it could be
> related to the order of clauses. -- If the error token is
> <END-OF-STATEMENT>, correct the SQL statement because it does
> not end with a
> valid clause.
> [Mon Sep 10 11:44:47 EDT 2001] -- ERROR --
> Exception:
> org.apache.turbine.util.security.DataBackendException:
> Failed to save user object: [SQL0104] Token USER_ID was not
> valid. Valid
> tokens: =. Cause . . . . . : A syntax error was detected at
> token USER_ID.
> Token USER_ID is not a valid token. A partial list of valid
> tokens is =.
> This list assumes that the statement is correct up to the
> token. The error
> may be earlier in the statement, but the syntax of the
> statement appears to
> be valid up to this point. Recovery . . . : Do one or more of the
> following and try the request again: -- Verify the SQL
> statement in the area
> of the token USER_ID. Correct the statement. The error could
> be a missing
> comma or quotation mark, it could be a misspelled word, or it could be
> related to the order of clauses. -- If the error token is
> <END-OF-STATEMENT>, correct the SQL statement because it does
> not end with a
> valid clause.
> Stack Trace follows:
> java.sql.SQLException: [SQL0104] Token USER_ID was not
> valid. Valid
> tokens: =. Cause . . . . . : A syntax error was detected at
> token USER_ID.
> Token USER_ID is not a valid token. A partial list of valid
> tokens is =.
> This list assumes that the statement is correct up to the
> token. The error
> may be earlier in the statement, but the syntax of the
> statement appears to
> be valid up to this point. Recovery . . . : Do one or more of the
> following and try the request again: -- Verify the SQL
> statement in the area
> of the token USER_ID. Correct the statement. The error could
> be a missing
> comma or quotation mark, it could be a misspelled word, or it could be
> related to the order of clauses. -- If the error token is
> <END-OF-STATEMENT>, correct the SQL statement because it does
> not end with a
> valid clause.
> at
> com.ibm.as400.access.JDError.throwSQLException(JDError.java:359)
> at
> com.ibm.as400.access.AS400JDBCStatement.commonPrepare(AS400JDB
> CStatement.jav
> a:1011)
> at
> com.ibm.as400.access.AS400JDBCPreparedStatement.<init>(AS400JD
> BCPreparedStat
> ement.java:159)
> at
> com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS40
> 0JDBCConnectio
> n.java:1329)
> at
> com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS40
> 0JDBCConnectio
> n.java:1281)
> at
> com.workingdogs.village.Record.saveWithUpdate(Record.java:254)
> at com.workingdogs.village.Record.save(Record.java:187)
> at com.workingdogs.village.Record.save(Record.java:166)
> at
> org.apache.turbine.om.peer.BasePeer.insertOrUpdateRecord(BaseP
> eer.java:860)
> at
> org.apache.turbine.om.peer.BasePeer.doUpdate(BasePeer.java:1680)
> at
> org.apache.turbine.om.peer.BasePeer.doUpdate(BasePeer.java:1578)
> at
> org.apache.turbine.om.security.peer.TurbineUserPeer.doUpdate(T
> urbineUserPeer
> .java:463)
> at
> org.apache.turbine.services.security.db.DBUserManager.store(DB
> UserManager.ja
> va:272)
> rethrown as
> org.apache.turbine.util.security.DataBackendException: Failed to
> save user object: [SQL0104] Token USER_ID was not valid.
> Valid tokens: =.
> Cause . . . . . : A syntax error was detected at token
> USER_ID. Token
> USER_ID is not a valid token. A partial list of valid tokens
> is =. This
> list assumes that the statement is correct up to the token.
> The error may
> be earlier in the statement, but the syntax of the statement
> appears to be
> valid up to this point. Recovery . . . : Do one or more of
> the following
> and try the request again: -- Verify the SQL statement in the
> area of the
> token USER_ID. Correct the statement. The error could be a
> missing comma or
> quotation mark, it could be a misspelled word, or it could be
> related to the
> order of clauses. -- If the error token is
> <END-OF-STATEMENT>, correct the
> SQL statement because it does not end with a valid clause.
> at
> org.apache.turbine.services.security.db.DBUserManager.store(DB
> UserManager.ja
> va:276)
> at
> org.apache.turbine.services.security.BaseSecurityService.saveU
> ser(BaseSecuri
> tyService.java:379)
> at
> org.apache.turbine.services.security.TurbineSecurity.saveUser(
> TurbineSecurit
> y.java:261)
> at
> org.apache.turbine.om.security.TurbineUser.valueUnbound(Turbin
> eUser.java:649
> )
> at
> org.apache.catalina.session.StandardSession.setAttribute(Stand
> ardSession.jav
> a:1050)
> at
> org.apache.catalina.session.StandardSessionFacade.setAttribute
> (StandardSessi
> onFacade.java:191)
> at
> org.apache.catalina.session.StandardSessionFacade.putValue(Sta
> ndardSessionFa
> cade.java:196)
> at
> org.apache.turbine.services.rundata.DefaultTurbineRunData.save
> (DefaultTurbin
> eRunData.java:1361)
> at
> org.apache.turbine.modules.actions.LogoutUser.doPerform(Logout
> User.java:106)
> at org.apache.turbine.modules.Action.perform(Action.java:87)
> at
> org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:122)
> at org.apache.turbine.Turbine.doGet(Turbine.java:393)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(Application
> FilterChain.java:247)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> cationFilterCh
> ain.java:193)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
> rapperValve.ja
> va:255)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:5
> 66)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardC
> ontextValve.ja
> va:225)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:5
> 66)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(Aut
> henticatorBase
> .java:472)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:5
> 64)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.core.StandardContext.invoke(StandardContex
> t.java:2252)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> Valve.java:164
> )
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:5
> 66)
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValv
> e.java:446)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:5
> 64)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
> gineValve.java
> :163)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:5
> 66)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.connector.http.HttpProcessor.process(HttpP
> rocessor.java:
> 875)
> at
> org.apache.catalina.connector.http.HttpProcessor.run(HttpProce
> ssor.java:952)
> at java.lang.Thread.run(Thread.java:484)
>
> [Mon Sep 10 11:45:13 EDT 2001] -- INFO -- Forced id retrieval
> - no available
> vector
> [Mon Sep 10 11:45:14 EDT 2001] -- ERROR --
> Turbine.handleException: null
> [Mon Sep 10 11:45:14 EDT 2001] -- ERROR --
> Exception: java.lang.reflect.InvocationTargetException
> Stack Trace follows:
> java.lang.reflect.InvocationTargetException:
> java.sql.SQLException:
> [SQL0104] Token ID_TABLE_ID was not valid. Valid tokens: =.
> Cause . . . . .
> : A syntax error was detected at token ID_TABLE_ID. Token
> ID_TABLE_ID is
> not a valid token. A partial list of valid tokens is =.
> This list assumes
> that the statement is correct up to the token. The error may
> be earlier in
> the statement, but the syntax of the statement appears to be
> valid up to
> this point. Recovery . . . : Do one or more of the
> following and try the
> request again: -- Verify the SQL statement in the area of the token
> ID_TABLE_ID. Correct the statement. The error could be a
> missing comma or
> quotation mark, it could be a misspelled word, or it could be
> related to the
> order of clauses. -- If the error token is
> <END-OF-STATEMENT>, correct the
> SQL statement because it does not end with a valid clause.
> at
> com.ibm.as400.access.JDError.throwSQLException(JDError.java:359)
> at
> com.ibm.as400.access.AS400JDBCStatement.commonPrepare(AS400JDB
> CStatement.jav
> a:1011)
> at
> com.ibm.as400.access.AS400JDBCPreparedStatement.<init>(AS400JD
> BCPreparedStat
> ement.java:159)
> at
> com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS40
> 0JDBCConnectio
> n.java:1329)
> at
> com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS40
> 0JDBCConnectio
> n.java:1281)
> at
> com.workingdogs.village.Record.saveWithUpdate(Record.java:254)
> at com.workingdogs.village.Record.save(Record.java:187)
> at com.workingdogs.village.Record.save(Record.java:166)
> at
> org.apache.turbine.om.peer.BasePeer.insertOrUpdateRecord(BaseP
> eer.java:860)
> at
> org.apache.turbine.om.peer.BasePeer.doUpdate(BasePeer.java:1680)
> at
> org.apache.turbine.util.db.IDBroker.storeIDs(IDBroker.java:554)
> at
> org.apache.turbine.util.db.IDBroker.getNextIds(IDBroker.java:371)
> at
> org.apache.turbine.util.db.IDBroker.getIdAsBigDecimal(IDBroker
> .java:285)
> at
> org.apache.turbine.om.peer.BasePeer.doInsert(BasePeer.java:746)
> at
> org.apache.turbine.om.peer.BasePeer.doInsert(BasePeer.java:657)
> at
> org.apache.turbine.services.security.db.DBUserManager.createAc
> count(DBUserMa
> nager.java:399)
> rethrown as
> org.apache.turbine.util.security.DataBackendException: Failed to
> create account 'scott': [SQL0104] Token ID_TABLE_ID was not
> valid. Valid
> tokens: =. Cause . . . . . : A syntax error was detected at token
> ID_TABLE_ID. Token ID_TABLE_ID is not a valid token. A
> partial list of
> valid tokens is =. This list assumes that the statement is
> correct up to
> the token. The error may be earlier in the statement, but
> the syntax of the
> statement appears to be valid up to this point. Recovery . .
> . : Do one
> or more of the following and try the request again: -- Verify the SQL
> statement in the area of the token ID_TABLE_ID. Correct the
> statement. The
> error could be a missing comma or quotation mark, it could be
> a misspelled
> word, or it could be related to the order of clauses. -- If
> the error token
> is <END-OF-STATEMENT>, correct the SQL statement because it
> does not end
> with a valid clause.
> at
> org.apache.turbine.services.security.db.DBUserManager.createAc
> count(DBUserMa
> nager.java:404)
> at
> org.apache.turbine.services.security.BaseSecurityService.addUs
> er(BaseSecurit
> yService.java:392)
> at
> org.apache.turbine.services.security.TurbineSecurity.addUser(T
> urbineSecurity
> .java:430)
> at
> org.apache.turbine.flux.modules.actions.user.FluxUserAction.do
> Insert(FluxUse
> rAction.java:133)
> at java.lang.reflect.Method.invoke(Native Method)
> at
> org.apache.turbine.util.velocity.VelocityActionEvent.executeEv
> ents(VelocityA
> ctionEvent.java:166)
> at
> org.apache.turbine.util.velocity.VelocityActionEvent.perform(V
> elocityActionE
> vent.java:114)
> at
> org.apache.turbine.modules.actions.VelocityAction.perform(Velo
> cityAction.jav
> a:114)
> at
> org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:122)
> at
> org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPa
> ge.java:143)
> at org.apache.turbine.modules.Page.build(Page.java:90)
> at
> org.apache.turbine.modules.PageLoader.exec(PageLoader.java:123)
> at org.apache.turbine.Turbine.doGet(Turbine.java:447)
> at org.apache.turbine.Turbine.doPost(Turbine.java:537)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(Application
> FilterChain.java:247)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> cationFilterCh
> ain.java:193)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
> rapperValve.ja
> va:255)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:5
> 66)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardC
> ontextValve.ja
> va:225)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:5
> 66)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(Aut
> henticatorBase
> .java:472)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:5
> 64)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.core.StandardContext.invoke(StandardContex
> t.java:2252)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> Valve.java:164
> )
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:5
> 66)
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValv
> e.java:446)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:5
> 64)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
> gineValve.java
> :163)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:5
> 66)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.connector.http.HttpProcessor.process(HttpP
> rocessor.java:
> 875)
> at
> org.apache.catalina.connector.http.HttpProcessor.run(HttpProce
> ssor.java:952)
> at java.lang.Thread.run(Thread.java:484)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]