Xpages JDBC DB2 [英] Xpages JDBC DB2

查看:167
本文介绍了Xpages JDBC DB2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在测试通过扩展库对RDBMS的访问,但是没有成功.我安装了插件并扩展了Xpages扩展库,但是当我使用组合框测试xpage时,值是@JdbcDbColumn的关系表,下面的错误显示.我正在设计器中而不是服务器中在本地进行测试.

I´m testing the access to RDBMS through extension library, but there was no sucess. I installed the plugin and the Xpages extension library extended, but when I tested a xpage with combobox that the values are the relational table by the @JdbcDbColumn, the error below display. I´m testing in local in designer not a server.

执行JavaScript计算表达式时出错 脚本解释器错误,行= 2,列= 8:执行函数"@JdbcDbColumn"时出错 comp/env/jdbc/db2

Error while executing JavaScript computed expression Script interpreter error, line=2, col=8: Error while executing function '@JdbcDbColumn' comp/env/jdbc/db2

更新的信息:

我正在将Lotus Notes客户端版本8.5.3与UP1和关系数据库连接版本8.5.3.20130315-0724的扩展库组件一起使用. JDBC文件中的内容为:

I'm using Lotus Notes client version 8.5.3 with UP1 and Extension Library components of relational databases connectivity version 8.5.3.20130315-0724. The content in JDBC file is:

<jdbc> <driver>com.ibm.db2.jcc.DB2Driver</driver>
<url>jdbc:db2://hostname:50000/databasename</url> <user>userdb2</user>     
<password>password</password> </jdbc>

从log.nsf中:

HTTP JVM: com.ibm.xsp.webapp.FacesServlet$ExtendedServletException: com.ibm.xsp.exception.EvaluationExceptionEx: Error while executing JavaScript computed expression 
HTTP JVM: CLFAD0134E: Exception processing XPage request. For more detailed information, please consult error-log-0.xml located in c:/Lotus/Notes8/Data/domino/workspace/logs`

从日志错误-log-0.xml:

From log error-log-0.xml:

CLFAD0211E: Exception thrown;
CLFAD0246E: Exception occurred servicing request for: /Chapter12.nsf/teste_db2.xsp - HTTP Code: 500;
CLFAD0134E: Exception processing XPage request

我把try/catch和catch放了printStackTrace():

I put try/catch and the catch I put printStackTrace():

HTTP JVM: java.sql.SQLException, Caused by:
HTTP JVM: javax.naming.NameNotFoundException: comp/env/jdbc/db2
HTTP JVM: at com.ibm.pvc.jndi.internal.provider.java.FlatMappingContext.lookup(FlatMappingCon‌​text.java:118)
HTTP JVM: at com.ibm.pvc.jndi.internal.provider.java.FlatMappingContext.lookup(FlatMappingCon‌​text.java:140)
HTTP JVM: at javax.naming.InitialContext.lookup(InitialContext.java:436)

进一步更新: 我将连接文件"db2.jdbc"移到了WebContent/WEB-INF/JDBC并找到了驱动程序,但显示了以下错误:

Further update: I moved the connection file "db2.jdbc" to WebContent/WEB-INF/JDBC and the driver was found but the error below was displayed:

HTTP JVM: com.ibm.db2.jcc.c.SqlException: [ibm] [db2] [jcc] [10109] [10354] The version of the IBM Universal JDBC driver in use is not is licensed for connectivity to banks QDB2 data. 
HTTP JVM: To connect to this DB2 server, get a licensed version of IBM DB2 Universal Driver for JDBC and SQLJ copy. 
HTTP JVM:. An appropriate license file db2jcc_license _ * jar for this target platform must be installed in the classpath of the application. 
HTTP JVM: Connectivity banks QDB2 data is activated by one of the following license files: [db2jcc_license_cisuz.jar].

太好了!它的工作!我在目录中包含了许可证文件db2jcc_license_cisuz.jar.与DB2的集成适用于combobos的值,但是当我尝试在视图面板中使用时,会出现错误"HTTP Web服务器:未处理命令异常".怎么了? 我按照 NotesIn9 047 XPages和关系数据简介的说明进行了配置.. >

Great! Its working! I included the license file db2jcc_license_cisuz.jar in the directory. The integration with DB2 works in values of a combobos, but when I try to use in a view panel the error "HTTP Web Server: Command Not Handled Exception" occurs. What´s wrong? I configured view panel following the instructions of NotesIn9 047 Intro to XPages and Relational Data.

推荐答案

实际上,我的最佳猜测是它没有找到DB2 JDBC驱动程序,因为我认为这意味着您正在Notes客户端中预览该应用程序?您应该将DB2 JDBC驱动程序插件从C:\<db2-install>\java\db2jcc.jar复制到C:\<client-install>\jvm\lib\ext\.

Actually, my best guess is that it isn't finding the DB2 JDBC driver, as I take it you mean you are previewing the app in the Notes Client? You should copy the DB2 JDBC driver plugin from C:\<db2-install>\java\db2jcc.jar to C:\<client-install>\jvm\lib\ext\.

此外,您还应该将许可证文件从C:\<db2-install>\java\db2jcc_license.jar复制到C:\<client-install>\jvm\lib\ext\.

Furthermore, you should copy the license file as well, from C:\<db2-install>\java\db2jcc_license.jar to C:\<client-install>\jvm\lib\ext\.

另一个建议:

似乎找不到jdbc连接文件.该文件在您的应用程序中应命名为db2.jdbc,并且应位于WebContent\WEB-INF\jdbc文件夹中

It looks like it can't find the jdbc connection file. The file should be namesd db2.jdbc in your application, and it should be located in the WebContent\WEB-INF\jdbc folder

以前的类似问题:

已安装JDBC,但尝试连接时出错到Oracle

JDBC Ordeal:它不应该这么困难(部分已解决,新错误)

OpenNTF问题

这篇关于Xpages JDBC DB2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆