org.eclipse.birt.report.data.oda.jdbc.JDBCException: Missing properties in Connection.open(Propertie
来源:互联网 发布:js给html元素赋值 编辑:程序博客网 时间:2024/06/14 03:23
最近在学习birt报表,在使用library公用数据源浏览报表时,出现了
“org.eclipse.birt.report.data.oda.jdbc.JDBCException: Missing properties in Connection.open(Properties).”的异常信息,具体表现为预览和运行报表都能正常显示,但是在tomcat里运行时则报错,从网上找了一些相关资料,现记录一下解决办法:
先说说报错的原因是由于找不到库所在的文件导致的,因此解决办法是将库所在目录进行修改。
首先查看工程的web.xml文件中“BIRT_RESOURCE_PATH”属性的设置,此属性设置的是“用户资源存放路径,这些资源包括 library 文件,image 文件等。默认是当前根目录。”比如我的设置为“/library”,则表示是所有的库文件都是在跟木下的library目录下。
查看报错报表文件的xml源代码,发现引入的库路径为“library/ds.rptlibrary”,这是在将库文件拖放到报表文件时自动添加的,此时完成报表后在预览和运行时可以正常看到结果,但是在tomcat下会执行出错,即标题提示的错误。
解决办法:
a.删除报表文件的ds.rptlibrary引用;
b.点击eclipse上方的菜单栏“窗口”→“首选项”,左侧找到“报表设计”→“资源”,点击“选择”找到当前工程下的library目录,然后确定退出。
c.重新将ds.rptlibrary引入到报表文件中。
d.预览、运行报表均正常,在tomcat下执行也正常。
个人理解首选项中设置的资源属性是相对工程的library配置,当拖放library到报表文件时,birt会读取此配置并添加相对路径(默认为当前工程路径,因此当此配置为空时添加的是library/ds.rptlibrary),此时预览报表正常。当启动tomcat后,web.xml中的配置则会将此配置定义为library目录下,然后再根据默认的配置library/ds.rptlibrary查找,此时查找库的路径相对于工程下的“/library/library/ds.rptlibrary”文件,此时当然找不到库文件了。修改后则保证了在预览和在tomcat下运行报表时查找的路径均为工程下的library目录,从而保证了报表正常解析。
- org.eclipse.birt.report.data.oda.jdbc.JDBCException: Missing properties in Connection.open(Propertie
- org.eclipse.birt.report.data.oda.jdbc.JDBCException: Missing properties in Connection.open(Propertie
- 关于birt使用library时报org.eclipse.birt.report.data.oda.jdbc.JDBCException: Missing properties in Connection.open(Properties).的问题
- org.eclipse.birt.report.exception.ViewerException: The report file does not exist or contains erro
- OSGI实战中的问题:Exception in org.eclipse.datatools.enablement.oda.ws.ui.Activator.start()
- birt报表报错, There is no report design object available.org.eclipse.birt.report.exception.ViewerExcepti
- org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for
- org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for
- Eclipse安装propertie,eclipse.properties插,Properties Edito,properties插件,properties预览
- Birt report
- org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Cannot open connection; uncategorized SQLException for
- Could not open JDBC Connection for transaction; nested exception is org.apache.commons.dbcp.SQLNest
- Could not open JDBC Connection for transaction; nested exception is org.apache.commons.dbcp.SQLNest
- 如何用程序指定Birt报表的JDBC Connection(转载)
- org.hibernate.exception.JDBCConnectionException: Cannot open connection
- org.hibernate.exception.GenericJDBCException: Cannot open connection
- org.hibernate.exception.JDBCConnectionException: Cannot open connection
- org.hibernate.exception.GenericJDBCException: Cannot open connection
- 汇编、解释、编译
- MyEclipse 8.5 安装 axis2 插件 .
- 10大优秀的移动Web应用程序开发框架推荐
- Ksoap SoapPrimitive 与 SoapObject
- ultraedit恢复初始化
- org.eclipse.birt.report.data.oda.jdbc.JDBCException: Missing properties in Connection.open(Propertie
- 于23种设计模式的有趣见
- 设计模式总结
- luogu1638
- linux 设置用户id 设置组id
- unity基础开发----unity串口通信
- 网站首页被K如何24小时内恢复
- 使用CocoaPods来做iOS程序的包依赖管理
- Asp编码优化技巧8则