JDBCRowSet与DB2无法正常工作

时间:2013-05-09 12:34:43

标签: jdbc xpages xpages-extlib

我偶然发现(在我试图弄清楚的所有头发上),我不知道这是一个错误还是我没有正确地做事。

我已经通过UpdateSite DB将最新版本的扩展库(v9)安装到我的domino 8.5.3FP2服务器上,并通过相同的UpdateSite DB安装了OSGI DB2驱动程序。

在此之后,我将XpagesJDBC.nsf数据库配置为指向我的DB2 Express-C数据库(db2.jdbc文件)并开始测试。当我使用主页上使用设置功能创建的两个表(用户,状态)中的数据时,一切都很有效。

然后我修改了 xpages.DBUtil java类,使其具有不同的Schema名称以及 xpages.DataInitializer java类来创建相同的两个表,但是模式名称作为SQL语句的一部分。 (例如“创建表用户(...”“创建表mySchema.users(..”

我重新设置了主页和我的表格中的设置功能,其中创建并填充了正确的数据。元数据功能(左手导航)全部正常工作,正确显示我的表和模式。

然而,JDBC_RowSetDatasource页面都是碎片。将我的数据源SQLTable从“users”更改为“mySchema.users”非常有效,页面上的所有内容都可以正常工作

    <xp:this.data>
       <xe:jdbcRowSet connectionName="db2" var="jdbcData1" sqlTable="users" showDeleted="true">
       </xe:jdbcRowSet>
    </xp:this.data>

    <xp:this.data>
       <xe:jdbcRowSet connectionName="db2" var="jdbcData1" sqlTable="mySchema.users" showDeleted="true">
       </xe:jdbcRowSet>
    </xp:this.data>

除了.acceptChanges()方法调用。

    <xp:button value="Save Changes" id="button1">
       <xp:eventHandler event="onclick" submit="true" refreshMode="complete">
          <xp:this.action><![CDATA[#{javascript:jdbcData1.acceptChanges()}]]></xp:this.action>
       </xp:eventHandler>
    </xp:button>

当我想将更改提交到数据库时,我得到一个sql异常(见下文)

SQLCODE -108说: [SQL0108N名称“”的限定符数量错误

我做错了什么,或者这是一个需要记录的缺陷?看起来使用自定义架构时出现问题? 感谢和抱歉长信息:)

SQL STACK-TRACE

    HTTP JVM: com.ibm.db2.jcc.am.mo: DB2 SQL Error: SQLCODE=-108, SQLSTATE=42601, SQLERRMC=USERS, DRIVER=4.7.85
    HTTP JVM:  at com.ibm.db2.jcc.am.dd.a(dd.java:676)
    HTTP JVM:  at com.ibm.db2.jcc.am.dd.a(dd.java:60)
    HTTP JVM:  at com.ibm.db2.jcc.am.dd.a(dd.java:127)
    HTTP JVM:  at com.ibm.db2.jcc.am.nm.c(nm.java:2493)
    HTTP JVM:  at com.ibm.db2.jcc.am.nm.d(nm.java:2470)
    HTTP JVM:  at com.ibm.db2.jcc.am.nm.a(nm.java:1950)
    HTTP JVM:  at com.ibm.db2.jcc.t4.db.g(db.java:139)
    HTTP JVM:  at com.ibm.db2.jcc.t4.db.a(db.java:39)
    HTTP JVM:  at com.ibm.db2.jcc.t4.t.a(t.java:32)
    HTTP JVM:  at com.ibm.db2.jcc.t4.sb.h(sb.java:135)
    HTTP JVM:  at com.ibm.db2.jcc.am.nm.gb(nm.java:1921)
    HTTP JVM:  at com.ibm.db2.jcc.am.om.kc(om.java:2806)
    HTTP JVM:  at com.ibm.db2.jcc.am.om.qc(om.java:2921)
    HTTP JVM:  at com.ibm.db2.jcc.am.om.setObject(om.java:1738)
    HTTP JVM:  at com.ibm.xsp.extlib.jdbc.datasource.xpages.JdbcPoolConnection$PoolPreparedStatement.setObject(JdbcPoolConnection.java:1006)
    HTTP JVM:  at com.sun.rowset.internal.CachedRowSetWriter.updateOriginalRow(CachedRowSetWriter.java:495)
    HTTP JVM:  at com.sun.rowset.internal.CachedRowSetWriter.writeData(CachedRowSetWriter.java:355)
    HTTP JVM:  at com.sun.rowset.CachedRowSetImpl.acceptChanges(CachedRowSetImpl.java:875)
    HTTP JVM:  at com.sun.rowset.CachedRowSetImpl.acceptChanges(CachedRowSetImpl.java:934)
    HTTP JVM:  at com.ibm.xsp.extlib.jdbc.model.JdbcRowSetAccessor.acceptChanges(JdbcRowSetAccessor.java:425)
    HTTP JVM:  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    HTTP JVM:  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    HTTP JVM:  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    HTTP JVM:  at java.lang.reflect.Method.invoke(Method.java:611)
    HTTP JVM:  at com.ibm.jscript.types.JavaAccessObject.call(JavaAccessObject.java:321)
    HTTP JVM:  at com.ibm.jscript.types.FBSObject.call(FBSObject.java:161)
    HTTP JVM:  at com.ibm.jscript.ASTTree.ASTCall.interpret(ASTCall.java:175)
    HTTP JVM:  at com.ibm.jscript.ASTTree.ASTProgram.interpret(ASTProgram.java:119)
    HTTP JVM:  at com.ibm.jscript.ASTTree.ASTProgram.interpretEx(ASTProgram.java:139)
    HTTP JVM:  at com.ibm.jscript.JSExpression._interpretExpression(JSExpression.java:435)
    HTTP JVM:  at com.ibm.jscript.JSExpression.access$1(JSExpression.java:424)
    HTTP JVM:  at com.ibm.jscript.JSExpression$2.run(JSExpression.java:414)
    HTTP JVM:  at java.security.AccessController.doPrivileged(AccessController.java:284)
    HTTP JVM:  at com.ibm.jscript.JSExpression.interpretExpression(JSExpression.java:410)
    HTTP JVM:  at com.ibm.jscript.JSExpression.evaluateValue(JSExpression.java:251)
    HTTP JVM:  at com.ibm.jscript.JSExpression.evaluateValue(JSExpression.java:234)
    HTTP JVM:  at com.ibm.xsp.javascript.JavaScriptInterpreter.interpret(JavaScriptInterpreter.java:221)
    HTTP JVM:  at com.ibm.xsp.binding.javascript.JavaScriptMethodBinding.invoke(JavaScriptMethodBinding.java:111)
    HTTP JVM:  at com.ibm.xsp.application.ActionListenerImpl.processAction(ActionListenerImpl.java:60)
    HTTP JVM:  at javax.faces.component.UICommand.broadcast(UICommand.java:324)
    HTTP JVM:  at com.ibm.xsp.component.UIEventHandler.broadcast(UIEventHandler.java:366)
    HTTP JVM:  at com.ibm.xsp.component.UIDataPanelBase.broadcast(UIDataPanelBase.java:400)
    HTTP JVM:  at com.ibm.xsp.extlib.component.layout.UIVarPublisherBase.broadcast(UIVarPublisherBase.java:183)
    HTTP JVM:  at com.ibm.xsp.component.UIDataPanelBase.broadcast(UIDataPanelBase.java:400)
    HTTP JVM:  at com.ibm.xsp.component.UIViewRootEx.broadcast(UIViewRootEx.java:1535)
    HTTP JVM:  at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:307)
    HTTP JVM:  at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:428)
    HTTP JVM:  at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:94)
    HTTP JVM:  at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:210)
    HTTP JVM:  at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:96)
    HTTP JVM:  at com.ibm.xsp.controller.FacesControllerImpl.execute(FacesControllerImpl.java:250)
    HTTP JVM:  at com.ibm.xsp.webapp.FacesServlet.serviceView(FacesServlet.java:223)
    HTTP JVM:  at com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:204)
    HTTP JVM:  at com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:160)
    HTTP JVM:  at com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:138)
    HTTP JVM:  at com.ibm.xsp.webapp.DesignerFacesServlet.service(DesignerFacesServlet.java:103)
    HTTP JVM:  at com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(ComponentModule.java:583)
    HTTP JVM:  at com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(NSFComponentModule.java:1281)
    HTTP JVM:  at com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:854)
    HTTP JVM:  at com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(ComponentModule.java:803)
    HTTP JVM:  at com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(ComponentModule.java:572)
    HTTP JVM:  at com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(NSFComponentModule.java:1265)
    HTTP JVM:  at com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:658)
    HTTP JVM:  at com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:481)
    HTTP JVM:  at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:341)
    HTTP JVM:  at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:297)
    HTTP JVM:  at com.ibm.domino.xsp.bridge.        
    HTTP.engine.XspCmdManager.service(XspCmdManager.java:272)

0 个答案:

没有答案