{"id":1841,"date":"2022-08-30T15:19:53","date_gmt":"2022-08-30T15:19:53","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/12\/02\/how-to-add-org-eclipse-birt-php-birtengine-birtengine-class-to-javabridge-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:19:53","modified_gmt":"2022-08-30T15:19:53","slug":"how-to-add-org-eclipse-birt-php-birtengine-birtengine-class-to-javabridge-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/how-to-add-org-eclipse-birt-php-birtengine-birtengine-class-to-javabridge-collection-of-common-programming-errors\/","title":{"rendered":"How to add org.eclipse.birt.php.birtengine.BirtEngine class to JavaBridge?-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m running a test using Apache+PHP, Tomcat and JavaBridge to try to load BIRT and render a document. This is the PHP file:<\/p>\n<pre><code>\n<\/code><\/pre>\n<p>Once I access it through Apache+PHP i receive the following error:<\/p>\n<pre><code><br \/>\n<b>Fatal error<\/b>:  Uncaught [[o:Exception]:\"java.lang.Exception:\n ReferenceClass failed: new org.eclipse.birt.php.birtengine.BirtEngine. Cause: \njava.lang.ClassNotFoundException: org.eclipse.birt.php.birtengine.BirtEngine VM: \n1.7.0_04@http:\/\/java.oracle.com\/\" at:\n#-10 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1438)\n#-9 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284)\n#-8 java.lang.Class.forName0(Native Method)\n#-7 java.lang.Class.forName(Unknown Source)\n#-6 php.java.bridge.Util.classForName(Util.java:1518)\n#-5 php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:445)\n#-4 php.java.bridge.Request.handleRequest(Request.java:444)\n#-3 php.java.bridge.Request.handleRequests(Request.java:500)\n#-2 php.java.bridge.http.ContextRunner.run(ContextRunner.java:145)\n#-1 php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60)\n#0 http:\/\/127.0.0.1:8081\/Bridge\/java\/Java.inc(232): java_ThrowExceptionProxyFactory-&gt;getProxy(3, 'org.apache.cata...', 'T', false)\n#1 http:\/\/127. in <b>http:\/\/127.0.0.1:8081\/Bridge\/java\/Java.inc<\/b> on line <b>195<\/b><br \/>\n<\/code><\/pre>\n<p>127.0.0.1:8081 is Tomcat server. It seems it isn&#8217;t able to find &#8220;org.eclipse.birt.php.birtengine.BirtEngine&#8221; class. I copied birt-runtime-3_7_2\/lib folder&#8217;s contents to JavaBridge&#8217;s WEB-INF\/lib but it doesn&#8217;t help. I&#8217;ve tried searching for the answer on various sites, but the only one, I think actualy the same problem with no answer is here: LINK. Does anyone know a solution to this problem or how to make that JavaBridge would see that class?<\/p>\n<ol>\n<li>\n<p>I&#8217;m not certain require_once takes URL as parameters. Have you tried an absolute path to the file instead? Mine looks like this: &#8220;C:\/Program Files\/Apache Software Foundation\/Tomcat 7.0\/webapps\/JavaBridge\/java\/Java.inc&#8221; and it works.<\/p>\n<p>Also, you might want to look at this article which details the proper configuration steps:<\/p>\n<p>http:\/\/www.birt-exchange.org\/org\/devshare\/deploying-birt-reports\/743-calling-birt-from-php\/<\/p>\n<p>Anyway, best of luck to you, I know I lost quite a few hair when I had to do this configuration.<\/p>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2013-12-02 20:57:28. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I&#8217;m running a test using Apache+PHP, Tomcat and JavaBridge to try to load BIRT and render a document. This is the PHP file: Once I access it through Apache+PHP i receive the following error: Fatal error: Uncaught [[o:Exception]:&#8221;java.lang.Exception: ReferenceClass failed: new org.eclipse.birt.php.birtengine.BirtEngine. Cause: java.lang.ClassNotFoundException: org.eclipse.birt.php.birtengine.BirtEngine VM: 1.7.0_04@http:\/\/java.oracle.com\/&#8221; at: #-10 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1438) #-9 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284) #-8 java.lang.Class.forName0(Native Method) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1841","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1841","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1841"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1841\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1841"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1841"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1841"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}