|
From: <php...@li...> - 2009-11-06 00:06:04
|
Thanks Jost.
Sorry for the spam. My message was getting moderated because I was "not a
member", and I thought it was because I wasn't a sourceforge member, so I
joined that, sent the message again, still got moderated, and that's when I
realized I had to be a member of the list. Sorry for the newbiness :)
Just to clarify, I'm not writing an application in Java that I'm going to
use in PHP, at least not explicitly. I suppose that that's essentially what
Drupal does. To use sheetnode, I suppose I need Java functionality and
that's why I need the php/java bridge and the php/java bridge drupal module.
I understand that I'd need the include: require_once("
http://localhost:8080/JavaBridge/java/Java.inc"); if I were writing a php
app that was using Java functionality, however, I'm not sure how Drupal is
supposed to use this include. I tried including it at the top of drupal's
index.php file and in the php_java_bridge.module file, but still see the
"PHP/Java Bridge extension is not loaded" error. So I'm not really sure
what to do... not sure if the include should go somewhere else, or if it's
needed at all.
Thanks
On Thu, Nov 5, 2009 at 3:08 PM, <php...@li...
> wrote:
> Hi,
>
> yes, I saw it.
>
> The PHP/Java Bridge development process took more than 6 years.
>
> During this time some things changed; the new PHP/Zend object system became
> stable, eliminating the need for a dedicated java.so/php_java.dll and
> global
> java.ini file (or a php.ini file with java declarations in it).
>
> The proposed PHP namespace separator has changed, too. Instead of
>
> new org_poi_something(...)
>
> PHP 5.3 wants you to use a backslash instead:
>
> java_autoload("poi.jar");
> new org\poi\something(...);
>
> The underscore syntax has been removed in bridge version 5.5.4. --
> Publishing poi and lucene examples using the underscore syntax and then
> silently removing it was certainly a mistake. I will revert this change.
> Your code with the underscore will work again in version 5.5.4.1.
>
> The third problem I see is that PHP developers don't understand Java's
> immature library handling. We have tried to solve this problem by
> introducing special java_require($libs) and java_autoload($libs)
> procedures.
> But these special procedures cannot fix Java's fundamental flaw, so we have
> removed them from the documentation and recommend Tomcat or some JEE
> container instead (so that the PermGenSpace and NoClassDefFound errors go
> to
> the JEE container developers, not to us).
>
> To avoid the mentioned issues, please deploy JavaBridge.war or
> JavaBridgeTemplate.war to a JEE server or servlet engine, remove all legacy
> java.so/php_java.dll and php.ini, and then require() Java.inc directly
> from
> the back end.
>
> > I do have JavaBridge running. However, somehow
> > Drupal doesn't seem to recognize that it exists.
>
> Well, the communication goes through the HTTP URL connection you have used
> to fetch the Java.inc. If your script uses
>
> <?php
> require("http://localhost:8080/JavaBridge/java/Java.inc");
> ...
>
> all further communication uses the back end at
>
> localhost:8080/JavaBridge.
>
> It's really that simple. Just get rid of the old php.ini cruft. :)
>
> Regards,
> Jost Boekemeier
>
> On 5 Nov 2009 19:45, <php...@li...> wrote:
>
> Hello,
>
> I've having some trouble with Drupal recognizing my php-java bridge. My
> goal is to install sheetnode w/ XLS import/export, and I've followed the
> instructions detailed here:
>
> http://drupal.org/project/sheetnode
>
> I'm using Java JRE6:
>
> $ java -version
> java version "1.6.0_16"
> Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
> Java HotSpot(TM) Server VM (build 14.2-b01, mixed mode)
>
> And using php version 5.2.6
>
>
> I've installed the php/java bridge using the instructions detailed here:
>
> http://php-java-bridge.sourceforge.net/pjb/installation.php
>
> I've installed Tomcat (version 5.5.27), and moved the war file into my
> webapps directory. I'm using virtualhosts, so I have a symlink from the
> virtual host's root to the JavaBridge webapp directory. I can run the
> examples on the page just fine, so it looks like the PHP/Java bridge works.
> It just seems that Drupal for some reason cannot recognize it.
>
> In Drupal, when I try to install the php/java bridge module I get this
> error
> message:
>
> (Currently using PHP/Java Bridge extension PHP/Java Bridge extension is NOT
> loaded in php.ini. Please install it.)
> This seems to indicate that I need to install some kind of php extension,
> like "java.so", but such a file is not included in the PHP/JavaBridge
> download. In fact the FAQs here
> http://php-java-bridge.sourceforge.net/pjb/FAQ.html say:
>
> > How do I enable the Java extension in my php.ini file?
> >
> > A Java extension does not exist, so you can't enable it.
> >
> > The VM Bridge is a network protocol, it requires a running Java VM, for
> > example the servlet container Apache/Tomcat. Or, if you want to call PHP
> > libraries from Java, a running PHP container, e.g. Apache or IIS.
> >
> So there's no extension, I just have to be running a Java Virtual Machine.
> As mentioned before, I am running Tomcat, and do have JavaBridge running.
> However, somehow Drupal doesn't seem to recognize that it exists.
>
> Wondering where to go from here. Please send me any recommendations.
>
> Thanks
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>
|