通过PHP使用Eclipse BIRT Report Designer

前端之家收集整理的这篇文章主要介绍了通过PHP使用Eclipse BIRT Report Designer前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我想在PHP webproject中使用Birt Reports.
因此我安装了推荐的 Java Bridge和BIRT Runtime
将JavaBridgeTemplate621.war和birt.war移动到我的Tomcat.

之后我写了一个叫BirtEngine的短课:

try {
    $ctx = java_context()->getServletContext();
    $this->birdEngine = java("org.eclipse.birt.PHP.birtengine.BirtEngine")->getBirtEngine($ctx);
    java_context()->onShutdown(
        java("org.eclipse.birt.PHP.birtengine.BirtEngine")->getShutdownHook()
    );
} catch (java_InternalException $e) {
    die($e->getMessage());
}

当我认识到$e-> getMessage()返回“”时,我看一下catalina.out,在那里我发现了这个异常:

23.03.2011 15:02:43 org.apache.cxf.interceptor.AttachmentInInterceptor handleMessage
INFO: AttachmentInInterceptor skipped in HTTP GET method
23.03.2011 15:02:43 org.apache.cxf.interceptor.StaxInInterceptor handleMessage
INFO: StaxInInterceptor skipped.
23.03.2011 15:02:43 org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor handleMessage
INFO: ReadHeadersInterceptor skipped in HTTP GET method
23.03.2011 15:02:43 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Interceptor has thrown exception,unwinding now
org.apache.cxf.interceptor.Fault: No such operation:
        at org.apache.cxf.interceptor.URIMappingInterceptor.handleMessage(URIMappingInterceptor.java:77)
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220)
        at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78)
        at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:92)
        at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:285)
        at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:168)
        at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:175)
        at org.apache.cxf.transport.servlet.AbstractCXFServlet.doGet(AbstractCXFServlet.java:157)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:662)
java.lang.ClassNotFoundException: org.eclipse.birt.PHP.birtengine.BirtEngine
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at PHP.java.bridge.Util.classForName(Util.java:1518)
        at PHP.java.bridge.JavaBridge.CreateObject(JavaBridge.java:445)
        at PHP.java.bridge.Request.handleRequest(Request.java:444)
        at PHP.java.bridge.Request.handleRequests(Request.java:500)
        at PHP.java.bridge.http.ContextRunner.run(ContextRunner.java:145)
        at PHP.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60)

特别是这条线引起了我的注意:

java.lang.ClassNotFoundException: org.eclipse.birt.PHP.birtengine.BirtEngine

但每个尝试从谷歌和常见网站获得帮助失败.
所以我希望这个网站的人可以帮助我.

@H_404_21@ 我知道这是一个老问题,但我确实通过PHP java桥成功运行BIRT.您拥有的PHP代码是正确的.但是你使用WAR文件的方式不是.

基本上你有一个带有PHP / JavaBridge文件和BIRT的war文件,它是一个在JAVA桥中加载BIRT的特殊类.

如果你还没有解决这个问题,我或许可以制作我正在使用的WAR文件.

原文链接:https://www.f2er.com/php/136334.html

猜你在找的PHP相关文章