Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Calling RunAndRenderTask from php by using Java Bridge
Calling RunAndRenderTask from php by using Java Bridge [message #661195] Wed, 23 March 2011 14:42 Go to next message
Timo Schmitz is currently offline Timo Schmitz
Messages: 1
Registered: March 2011
Junior Member
Hi,

i want to use Birt Reports in an php webproject.
I installed the Java Bridge and the Birt Runtime by moving the .war files to my local tomcat webaps directory. After that i wrote a short class calling the 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());
        }


As i recognize that $e->getMessage() returns "" i take a look at the catalina.out and there i found this exception:

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)


Does anyone know what the problem is?

Thanks's
Timo
Re: Calling RunAndRenderTask from php by using Java Bridge [message #661473 is a reply to message #661195] Thu, 24 March 2011 18:52 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Timo,

Do you have the birtEngine.jar in the web-inf/lib?

Jason

On 3/23/2011 10:42 AM, Timo Schmitz wrote:
> Hi,
>
> i want to use Birt Reports in an php webproject.
> I installed the Java Bridge and the Birt Runtime by moving the .war
> files to my local tomcat webaps directory. After that i wrote a short
> class calling the 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());
> }
>
> As i recognize that $e->getMessage() returns "" i take a look at the
> catalina.out and there i found this exception:
>
> 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.ReadHeadersIntercept or
> 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.handleMessa ge(URIMappingInterceptor.java:77)
>
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(Phase InterceptorChain.java:220)
>
> at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(C hainInitiationObserver.java:78)
>
> at
> org.apache.cxf.transport.servlet.ServletDestination.invoke(S ervletDestination.java:92)
>
> at
> org.apache.cxf.transport.servlet.ServletController.invokeDes tination(ServletController.java:285)
>
> at
> org.apache.cxf.transport.servlet.ServletController.invoke(Se rvletController.java:168)
>
> at
> org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(A bstractCXFServlet.java:175)
>
> at
> org.apache.cxf.transport.servlet.AbstractCXFServlet.doGet(Ab stractCXFServlet.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.internalDoFi lter(ApplicationFilterChain.java:290)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(App licationFilterChain.java:206)
>
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(Standar dWrapperValve.java:233)
>
> at
> org.apache.catalina.core.StandardContextValve.invoke(Standar dContextValve.java:191)
>
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHo stValve.java:127)
>
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorRepo rtValve.java:102)
>
> at
> org.apache.catalina.core.StandardEngineValve.invoke(Standard EngineValve.java:109)
>
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAd apter.java:298)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Proce ssor.java:857)
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHand ler.process(Http11Protocol.java:588)
>
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoin t.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(Webap pClassLoader.java:1645)
>
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(Webap pClassLoader.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:14 5)
> at php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60)
>
> Does anyone know what the problem is?
>
> Thanks's
> Timo
Previous Topic:Insert a fixed table
Next Topic:Braking two tables simultaneously on the same page
Goto Forum:
  


Current Time: Mon Oct 20 11:33:12 GMT 2014

Powered by FUDForum. Page generated in 0.01941 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software