我想在php webproject中使用Birt Reports.因此,我通过将JavaBridgeTemplate621.war和birt.war移动到我的Tomcat来安装推荐的Java Bridge和BIRT Runtime.
之后我写了一个叫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());
}
Run Code Online (Sandbox Code Playgroud)
当我认识到$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 …Run Code Online (Sandbox Code Playgroud)