1. 为Birt Report Design建立Data Sets
问题: 建立Data Sets时,无论怎么样,数据库里的列就是无法导入到Birt里,试试其它表,发现有的表可以导入进来
解决:两个表不同的地方在于,倒不过来的表示我自己建立的,
怀疑权限不够,所以
(1)为Birt 对应的源数据库建立了用户 db2admin(这个db2admin也是建data source时的admin)
(2)赋予db2admin有select的权限
OK,重新连接Data Sets,问题解决
2. 画birt 饼图, 不管怎么搞,图形都是出不来,结果都是一样的,
问题: 图形实际的结果是要在运行后(Run->View Report)才能看见实际的结果
3. birt2.6.1 RC 和 tomcat 6.0.29
birtRUN TIME中的WebViewerExample拷贝到tomcat之后,运行测试,有报错,原来是log**.jar的问题
Tomcat 6 Note:
- If you are installing the Web Viewer on Tomcat 6, you will need to download the commons logging library . You can add this library to WebViewerExample/WEB-INF/lib or to Tomcat's lib directory.
下载这个包,把这个包底下的所有jar包都拷贝到上文目录,重启问题解决了
error log
javax.servlet.ServletException: Error instantiating servlet class org.eclipse.birt.report.servlet.ViewerServlet
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Thread.java:595)
root cause
java.lang.NoClassDefFoundError: org.apache.commons.logging.LogFactory
org.apache.axis.components.logger.LogFactory.class$(LogFactory.java:45)
org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:45)
java.security.AccessController.doPrivileged(Native Method)
org.apache.axis.components.logger.LogFactory.getLogF
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Thread.java:595)
root cause
java.lang.NoClassDefFoundError: org.apache.commons.logging.LogFactory
org.apache.axis.components.logger.LogFactory.class$(LogFactory.java:45)
org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:45)
java.security.AccessController.doPrivileged(Native Method)
org.apache.axis.components.logger.LogFactory.getLogF
3. tomcat 的
Tomcat Manager 的用户名。 无论我用户怎么改,manager的页面怎么也打不开,最后实在没有办法了,只好把tomcat重新解压一下,覆盖原来的文件。这样已经弄好的birt也不会受影响。
在新文件上,重新配置一下J:/apache-tomcat-6.0.29/conf/tomcat-users.xml,如下所示,一切都解决了哦!
<tomcat-users>
<!--
NOTE: By default, no user is included in the "manager" role required
to operate the "/manager" web application. If you wish to use this app,
you must define such a user - the username and password are arbitrary.
-->
<!--
NOTE: The sample user and role entries below are wrapped in a comment
and thus are ignored when reading this file. Do not forget to remove
<!.. ..> that surrounds them.
-->
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager"/>
<user username="admin" password="passw0rd" roles="tomcat,manager"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
</tomcat-users>
<!--
NOTE: By default, no user is included in the "manager" role required
to operate the "/manager" web application. If you wish to use this app,
you must define such a user - the username and password are arbitrary.
-->
<!--
NOTE: The sample user and role entries below are wrapped in a comment
and thus are ignored when reading this file. Do not forget to remove
<!.. ..> that surrounds them.
-->
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager"/>
<user username="admin" password="passw0rd" roles="tomcat,manager"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
</tomcat-users>