You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
(6) |
Nov
(8) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(19) |
Feb
(15) |
Mar
(10) |
Apr
(8) |
May
(7) |
Jun
(9) |
Jul
(13) |
Aug
(31) |
Sep
(111) |
Oct
(52) |
Nov
(72) |
Dec
(42) |
2006 |
Jan
(21) |
Feb
(32) |
Mar
(33) |
Apr
(24) |
May
(15) |
Jun
(40) |
Jul
(32) |
Aug
(19) |
Sep
(38) |
Oct
(37) |
Nov
(63) |
Dec
(37) |
2007 |
Jan
(18) |
Feb
(39) |
Mar
(69) |
Apr
(49) |
May
(71) |
Jun
(59) |
Jul
(71) |
Aug
(85) |
Sep
(46) |
Oct
(14) |
Nov
(25) |
Dec
(56) |
2008 |
Jan
(24) |
Feb
(77) |
Mar
(104) |
Apr
(44) |
May
(41) |
Jun
(11) |
Jul
(31) |
Aug
(59) |
Sep
(44) |
Oct
(86) |
Nov
(66) |
Dec
(93) |
2009 |
Jan
(88) |
Feb
(41) |
Mar
(49) |
Apr
(135) |
May
(22) |
Jun
(31) |
Jul
(60) |
Aug
(71) |
Sep
(76) |
Oct
(18) |
Nov
(52) |
Dec
(20) |
2010 |
Jan
(8) |
Feb
(50) |
Mar
(35) |
Apr
(48) |
May
(46) |
Jun
(84) |
Jul
(38) |
Aug
(61) |
Sep
(51) |
Oct
(31) |
Nov
(17) |
Dec
(18) |
2011 |
Jan
(51) |
Feb
(14) |
Mar
(17) |
Apr
(23) |
May
(15) |
Jun
(11) |
Jul
(5) |
Aug
(5) |
Sep
(15) |
Oct
(8) |
Nov
(5) |
Dec
(25) |
2012 |
Jan
(2) |
Feb
(4) |
Mar
(6) |
Apr
(9) |
May
(27) |
Jun
(32) |
Jul
(36) |
Aug
(10) |
Sep
(16) |
Oct
(3) |
Nov
(13) |
Dec
(7) |
2013 |
Jan
(1) |
Feb
(4) |
Mar
|
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(4) |
Oct
(2) |
Nov
(1) |
Dec
|
2014 |
Jan
|
Feb
|
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
(9) |
Jul
(5) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
|
Dec
|
2015 |
Jan
(3) |
Feb
(2) |
Mar
(4) |
Apr
(3) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(2) |
Sep
(5) |
Oct
(1) |
Nov
|
Dec
|
2016 |
Jan
|
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
2017 |
Jan
(6) |
Feb
|
Mar
|
Apr
(10) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
2018 |
Jan
(2) |
Feb
(5) |
Mar
|
Apr
|
May
(1) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2021 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <php...@li...> - 2011-01-18 18:31:43
|
Hi, It can be considered a bug. But it will stay that way. new JavaException returns a non-null value if you have passed the message in the constructor. For Exceptions generated by Java, the php message is always null, as we cannot override the php getmessage method. The bridge uses exception chaining, so you can get the information from the parent, as usual. Regards, Jost Bökemeier |
From: <php...@li...> - 2011-01-18 18:23:26
|
Hi, in PHP "this" is written as $this. If you want to extend Java classes (rather than implementing interfaces) please see our FAQ entry "How do I extend Java classes" for more information. Regarding your other question; the interface is missing. Please carefully read our "java_closure" API documentation. Regards, Jost Bökemeier |
From: <php...@li...> - 2011-01-18 16:03:48
|
Exception::getMessage() is final and cannot be overwritten. Use getCause()->getMessage() to access the Java getMessage() method. Am 18.01.2011 09:56 schrieb <php...@li...>: > Hello, > > I used an old version of the PHP Java Bridge (v5.4.3) and I was used to get > the exception messages by using the getMessage() method. > As I update my PHP Java Bridge version to 6.2.1, the getMessage() method > always returns an empty string. > > Is there any reason to that ? > > Regards, > Fanny Puaud > > > > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2011-01-18 13:19:43
|
Hi again, I've looked at the java_closure example and others on the web and I'm still having problems - I would be grateful if in addition to the outstanding "this" keyword problem, could you quickly tell me what I am doing wrong with the below simple code: // Simple test method class IEValuator { public function Evaluate(){return 2;} } $tmpIEValuator = new IEValuator; $javaObject = java_closure(new $tmpIEValuator()); The script runs fine with no errors but the third-party Java object "Problem" which looks for a public user defined interface called "IEvaluator" never finds or runs the call-back "Evaluate" method I'm trying to define above - what have I got incorrect? I appreciate you cannot go into coding specifics with third-party classes etc but I think I am not setting up the user defined interface correctly via the JavaBridge/PHP. Thanks again for your help, Marc On 18 Jan 2011, at 09:27, php...@li... wrote: > Hi, > > Thanks for that, I'll read through the java_closure documentation. I'm still at a loss with regards to the equivalent "this" Java keyword - what should I be using as I have tried everything and still cannot find the correct reference to pass into the method. > > Thanks, > > Marc > > On 17 Jan 2011, at 20:42, php...@li... wrote: > >> Hi, >> >> please see our API documentation at: >> >> http://php-java-bridge.sourceforge.net/pjb/docs/php-api/java/_JavaProxy.inc.html#functionjava_closure >> >> Regards, >> Jost Bökemeier >> ------------------------------------------------------------------------------ >> Protect Your Site and Customers from Malware Attacks >> Learn about various malware tactics and how to avoid them. Understand >> malware threats, the impact they can have on your business, and how you >> can protect your company and customers by using code signing. >> http://p.sf.net/sfu/oracle-sfdevnl >> _______________________________________________ >> php-java-bridge-users mailing list >> php...@li... >> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > Mob: +44 797 329 5617 > > The information contained in this E-mail is confidential. It is intended only for the stated addressee(s) and access to it by any other person is unauthorised. If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this E-mail. Such unauthorised use may be unlawful. If you have received this E-mail in error, please inform us immediately and delete it and all copies from your system. > > > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users Mob: +44 797 329 5617 The information contained in this E-mail is confidential. It is intended only for the stated addressee(s) and access to it by any other person is unauthorised. If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this E-mail. Such unauthorised use may be unlawful. If you have received this E-mail in error, please inform us immediately and delete it and all copies from your system. |
From: <php...@li...> - 2011-01-18 09:27:29
|
Hi, Thanks for that, I'll read through the java_closure documentation. I'm still at a loss with regards to the equivalent "this" Java keyword - what should I be using as I have tried everything and still cannot find the correct reference to pass into the method. Thanks, Marc On 17 Jan 2011, at 20:42, php...@li... wrote: > Hi, > > please see our API documentation at: > > http://php-java-bridge.sourceforge.net/pjb/docs/php-api/java/_JavaProxy.inc.html#functionjava_closure > > Regards, > Jost Bökemeier > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users Mob: +44 797 329 5617 The information contained in this E-mail is confidential. It is intended only for the stated addressee(s) and access to it by any other person is unauthorised. If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this E-mail. Such unauthorised use may be unlawful. If you have received this E-mail in error, please inform us immediately and delete it and all copies from your system. |
From: <php...@li...> - 2011-01-18 08:56:30
|
Hello, I used an old version of the PHP Java Bridge (v5.4.3) and I was used to get the exception messages by using the getMessage() method. As I update my PHP Java Bridge version to 6.2.1, the getMessage() method always returns an empty string. Is there any reason to that ? Regards, Fanny Puaud |
From: <php...@li...> - 2011-01-17 20:42:43
|
Hi, please see our API documentation at: http://php-java-bridge.sourceforge.net/pjb/docs/php-api/java/_JavaProxy.inc.html#functionjava_closure Regards, Jost Bökemeier |
From: <php...@li...> - 2011-01-17 18:09:05
|
Hi there, A couple of quick questions with regards to coding techniques using PHP, the JavaBridge and third-party classes...I have tried to keep my examples brief, generic and concise! 1) When using Java, an example line of code could be "ExampleClass.TestSomething().Item(this);" which when translated into PHP would be the same as "ExampleClass->TestSomething()->Item(???);" but what should I be using for the Java keyword "this" in PHP script? Obviously the PHP equivalent "$this" is not right for this requirement when needing to refer to the current Java object's context. 2) Is it possible to create user defined callback interfaces to Java in PHP script when using the JavaBridge? Using third-party classes, I'm successfully instantiating a class called "Problem" which has a method called "Optimise". This all runs fine, in effect in a black box, and comes back with a successful result. However, as part of the processing this class does when Optimise is invoked is to call a public Java interface called "IEvaluator" after each iteration of calculations being done under the covers. In Java, IEvaluator has one method called "Evaluate" and is referred to as a user defined callback interface. Now if I wanted to hook into this interface to get results after each iteration and was coding this in Java, I would simply ensure my own class implements IEvaluator and create a public class implementing "Evaluate", which would then get called after each round of calculations. E.g.: public class Example1 implements IEvaluator { public int Evaluate(Evaluator evaluator) { Do something here like print iteration number to the screen; return something like a carry on processing flag; } ...more Java code where Problem.Optimise() is invoked etc; } But how would I in PHP provide the same user defined interface for the same Java class to use? I have looked at loads of examples but they do not seem to point me in the right direction. Is this possible? Thanks in advance for any help. Cheers, Marc The information contained in this E-mail is confidential. It is intended only for the stated addressee(s) and access to it by any other person is unauthorised. If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this E-mail. Such unauthorised use may be unlawful. If you have received this E-mail in error, please inform us immediately and delete it and all copies from your system. |
From: <php...@li...> - 2011-01-14 18:40:55
|
Hello Marc, i have another idea. Look at your error message: Fatal error: Uncaught [[o:Exception]:"java.lang. Exception: CreateInstance failed: new SolverPlatform.Problem. Cause: java.lang.UnsatisfiedLinkError: no SolverSDK in java.library.path Maybe the solversdk depends on a native library which you have to put on the library path. No, when i follow down the stacktrace it is obvious that your php code triggered the java runtime to load a native dynamic library (*.dll or *.so). (Use the *.dll files on windows and the *.so files on Linux.) Ok, so your php-java-bridge setup is actually fine and also your php script works correct. Now you must find out which library the solversdk depends on and put it in a folder which is on your library path. I have never used a native library from a web application (war-file). But this should give you some hints where to put the files: http://wiki.apache.org/tomcat/HowTo#I.27m_encountering_classloader_problems_when_using_JNI_under_Tomcat Then restart tomcat. David On Fri, Jan 14, 2011 at 5:38 PM, < php...@li...> wrote: > Hi David, > > Yes, sorry, my original email was not 100% clear on the layout of the jar > file - SolverSDK.jar file unpacks to a directory "SolverPlatform" and then > all the classes underneath including Problem.class, hence the call of just > "SolverPlatform.Problem". I can create a simple java file and instantiate > the class at the command line in the same WEB-INF/Lib directory so it must > be something with trying the same via the JavaBridge. > > Thanks, > > Marc > > On 14 Jan 2011, at 16:30, php...@li...wrote: > > > Hello, > > > > i dont know solversdk, so my infos may not be 100% correct. > > > > I think, if you want to instantiate a java class in php you will have to > use > > the fully qualified class name like this: > > > > <?php > > require_once("http://localhost:8080/JavaBridge/java/Java.inc"); > > $problem = new Java("com.solver.Problem"); > > ?> > > > > This would instantiate the class Problem from the package com.solver. > > But of course i dont know if this is the correct package name, because i > > dont know solversdk. > > > > Maybe a stupid question: Do you know how to find out the package name of > a > > java class? > > If you unpack the solversdk look for the file Problem.class. The package > > name would be the > > directories from the root of the jar contents to this file. In the above > > example it would look > > like this: > > <jar-root>/com/solver/Problem.class > > > > David > > > > > > On Fri, Jan 14, 2011 at 4:28 PM, < > > php...@li...> wrote: > > > >> Hi, > >> > >> Quick bit of support with running what I'm pretty sure is a correctly > >> installed Tomcat 7.0.5 and PHP-JavaBridge installation environment. I am > >> running on Mac OS X 10.6.6, using MAMP (PHP 5.3, Apache 2.0 on port 80 > etc) > >> and have Tomcat 7.0.5 (port 8080) installed. I can run any php code > >> successfully, the Tomcat examples all run successfully and if I deploy > >> JavaBridge.war, copy the JavaBridge directory over to my local htdocs > root > >> (as per installation instructions if you get the FASTCGI error) then I > can > >> also run all the JavaBridge examples successfully. So a vanilla install > is > >> looking good. I can run the following code php script from my htdocs > local > >> root and it works fine as an example: > >> > >> <?php > >> require_once("http://localhost:8080/JavaBridge/java/Java.inc"); > >> $i1 = new Java("java.math.BigInteger", "1"); > >> $i2 = new Java("java.math.BigInteger", "2"); > >> $i3 = $i1->add($i2); > >> echo $i3->toString() . "\n"; > >> ?> > >> > >> So I now move onto wanting to instantiate classes from my own jar file > >> called SolverSDK.jar. As per the installation instructions, I grabbed a > copy > >> of JavaBridge.war, exploded it, add in my jar file to the WEB-INF/lib > >> directory, re-create the war file using "jar -cvf JavaBridge.war *", > >> un-deploy the existing JavaBridge app in Tomcat, copy in my new one and > >> re-start Tomcat. The updated war file deploys fine and I can run the > above > >> sample script again all ok. However, when I try to run the below simple > >> script: > >> > >> <?php > >> require_once("http://localhost:8080/JavaBridge/java/Java.inc"); > >> $problem = new Java("SolverPlatform.Problem"); > >> ?> > >> > >> I get the following error: > >> > >> Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: > CreateInstance > >> failed: new SolverPlatform.Problem. Cause: > java.lang.UnsatisfiedLinkError: > >> no SolverSDK in java.library.path VM: 1.6.0_22@http://www.apple.com/" > at: > >> #-36 java.lang.ClassLoader.loadLibrary(ClassLoader.java:1754) #-35 > >> java.lang.Runtime.loadLibrary0(Runtime.java:823) #-34 > >> java.lang.System.loadLibrary(System.java:1045) #-33 > >> SolverPlatform.Problem.(Unknown Source) #-32 > java.lang.Class.forName0(Native > >> Method) #-31 java.lang.Class.forName(Class.java:247) #-30 > >> php.java.bridge.Util.classForName(Util.java:1518) #-29 > >> php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:445) #-28 > >> php.java.bridge.Request.handleRequest(Request.java:458) #-27 > >> php.java.bridge.Request.handleOneRequest(Request.java:510) #-26 > >> > php.java.servlet.PhpJavaServlet.handleLocalConnection(PhpJavaServlet.java:202) > >> #-25 php.java.servlet.PhpJavaServlet.handlePut(PhpJavaServlet.java:250) > #-24 > >> php.java.servlet.PhpJavaServlet.doPut(PhpJavaServlet.java:261) #-23 > >> javax.servlet.http.HttpServl in > >> http://localhost:8080/JavaBridge/java/Java.inc on line 195 > >> > >> A browser refresh then results in the good old ClassNotFound error due > >> since I would assume to the need for only one class-loader. > >> > >> The SolverSDK.jar file has the correct layout when exploded, i.e. > >> SolverPlatform directory and then all the classes etc. It relies on a > file > >> called "libSolverSDK.dylib" which is also included within the updated > war > >> file in the same directory. I have tried everything I can think of, > >> including forcing the classpath in the Tomcat config file, setenv.sh > etc. I > >> have even ensured that DYLD_LIBRARY_PATH is set in a desperate attempt > >> though I know this should have no effect within Tomcat. I am pretty > familiar > >> with Java and PHP but for the life of me, I can see no reason why I am > >> getting this simple error. I have, as per the video demo on the site, > even > >> tried using the classes rather than the jar itself, in a newly created > >> directory WEB-INF/classes but again after redeploying, I get the same > error. > >> > >> I have trawled through the mailing list archive and the web but not got > >> anywhere. Any help would be greatly appreciated. > >> > >> Regards, > >> > >> Marc > >> > >> The information contained in this E-mail is confidential. It is intended > >> only for the stated addressee(s) and access to it by any other person is > >> unauthorised. If you are not an addressee, you must not disclose, copy, > >> circulate or in any other way use or rely on the information contained > in > >> this E-mail. Such unauthorised use may be unlawful. If you have received > >> this E-mail in error, please inform us immediately and delete it and all > >> copies from your system. > >> > >> > >> > ------------------------------------------------------------------------------ > >> Protect Your Site and Customers from Malware Attacks > >> Learn about various malware tactics and how to avoid them. Understand > >> malware threats, the impact they can have on your business, and how you > >> can protect your company and customers by using code signing. > >> http://p.sf.net/sfu/oracle-sfdevnl > >> _______________________________________________ > >> php-java-bridge-users mailing list > >> php...@li... > >> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > >> > > > ------------------------------------------------------------------------------ > > Protect Your Site and Customers from Malware Attacks > > Learn about various malware tactics and how to avoid them. Understand > > malware threats, the impact they can have on your business, and how you > > can protect your company and customers by using code signing. > > http://p.sf.net/sfu/oracle-sfdevnl > > _______________________________________________ > > php-java-bridge-users mailing list > > php...@li... > > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > Mob: +44 797 329 5617 > > The information contained in this E-mail is confidential. It is intended > only for the stated addressee(s) and access to it by any other person is > unauthorised. If you are not an addressee, you must not disclose, copy, > circulate or in any other way use or rely on the information contained in > this E-mail. Such unauthorised use may be unlawful. If you have received > this E-mail in error, please inform us immediately and delete it and all > copies from your system. > > > > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: <php...@li...> - 2011-01-14 18:18:02
|
Hi, Don't worry, I've solved it now. Running the JavaBridge example called Test Installation once again and scrolling down to the Java vars at the very bottom, I noticed the Java Library Path was different and by placing a copy of my dylib file in there, it all now works wonderfully. Thanks again, Marc On 14 Jan 2011, at 16:38, php...@li... wrote: > Hi David, > > Yes, sorry, my original email was not 100% clear on the layout of the jar file - SolverSDK.jar file unpacks to a directory "SolverPlatform" and then all the classes underneath including Problem.class, hence the call of just "SolverPlatform.Problem". I can create a simple java file and instantiate the class at the command line in the same WEB-INF/Lib directory so it must be something with trying the same via the JavaBridge. > > Thanks, > > Marc > > On 14 Jan 2011, at 16:30, php...@li... wrote: > >> Hello, >> >> i dont know solversdk, so my infos may not be 100% correct. >> >> I think, if you want to instantiate a java class in php you will have to use >> the fully qualified class name like this: >> >> <?php >> require_once("http://localhost:8080/JavaBridge/java/Java.inc"); >> $problem = new Java("com.solver.Problem"); >> ?> >> >> This would instantiate the class Problem from the package com.solver. >> But of course i dont know if this is the correct package name, because i >> dont know solversdk. >> >> Maybe a stupid question: Do you know how to find out the package name of a >> java class? >> If you unpack the solversdk look for the file Problem.class. The package >> name would be the >> directories from the root of the jar contents to this file. In the above >> example it would look >> like this: >> <jar-root>/com/solver/Problem.class >> >> David >> >> >> On Fri, Jan 14, 2011 at 4:28 PM, < >> php...@li...> wrote: >> >>> Hi, >>> >>> Quick bit of support with running what I'm pretty sure is a correctly >>> installed Tomcat 7.0.5 and PHP-JavaBridge installation environment. I am >>> running on Mac OS X 10.6.6, using MAMP (PHP 5.3, Apache 2.0 on port 80 etc) >>> and have Tomcat 7.0.5 (port 8080) installed. I can run any php code >>> successfully, the Tomcat examples all run successfully and if I deploy >>> JavaBridge.war, copy the JavaBridge directory over to my local htdocs root >>> (as per installation instructions if you get the FASTCGI error) then I can >>> also run all the JavaBridge examples successfully. So a vanilla install is >>> looking good. I can run the following code php script from my htdocs local >>> root and it works fine as an example: >>> >>> <?php >>> require_once("http://localhost:8080/JavaBridge/java/Java.inc"); >>> $i1 = new Java("java.math.BigInteger", "1"); >>> $i2 = new Java("java.math.BigInteger", "2"); >>> $i3 = $i1->add($i2); >>> echo $i3->toString() . "\n"; >>> ?> >>> >>> So I now move onto wanting to instantiate classes from my own jar file >>> called SolverSDK.jar. As per the installation instructions, I grabbed a copy >>> of JavaBridge.war, exploded it, add in my jar file to the WEB-INF/lib >>> directory, re-create the war file using "jar -cvf JavaBridge.war *", >>> un-deploy the existing JavaBridge app in Tomcat, copy in my new one and >>> re-start Tomcat. The updated war file deploys fine and I can run the above >>> sample script again all ok. However, when I try to run the below simple >>> script: >>> >>> <?php >>> require_once("http://localhost:8080/JavaBridge/java/Java.inc"); >>> $problem = new Java("SolverPlatform.Problem"); >>> ?> >>> >>> I get the following error: >>> >>> Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: CreateInstance >>> failed: new SolverPlatform.Problem. Cause: java.lang.UnsatisfiedLinkError: >>> no SolverSDK in java.library.path VM: 1.6.0_22@http://www.apple.com/" at: >>> #-36 java.lang.ClassLoader.loadLibrary(ClassLoader.java:1754) #-35 >>> java.lang.Runtime.loadLibrary0(Runtime.java:823) #-34 >>> java.lang.System.loadLibrary(System.java:1045) #-33 >>> SolverPlatform.Problem.(Unknown Source) #-32 java.lang.Class.forName0(Native >>> Method) #-31 java.lang.Class.forName(Class.java:247) #-30 >>> php.java.bridge.Util.classForName(Util.java:1518) #-29 >>> php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:445) #-28 >>> php.java.bridge.Request.handleRequest(Request.java:458) #-27 >>> php.java.bridge.Request.handleOneRequest(Request.java:510) #-26 >>> php.java.servlet.PhpJavaServlet.handleLocalConnection(PhpJavaServlet.java:202) >>> #-25 php.java.servlet.PhpJavaServlet.handlePut(PhpJavaServlet.java:250) #-24 >>> php.java.servlet.PhpJavaServlet.doPut(PhpJavaServlet.java:261) #-23 >>> javax.servlet.http.HttpServl in >>> http://localhost:8080/JavaBridge/java/Java.inc on line 195 >>> >>> A browser refresh then results in the good old ClassNotFound error due >>> since I would assume to the need for only one class-loader. >>> >>> The SolverSDK.jar file has the correct layout when exploded, i.e. >>> SolverPlatform directory and then all the classes etc. It relies on a file >>> called "libSolverSDK.dylib" which is also included within the updated war >>> file in the same directory. I have tried everything I can think of, >>> including forcing the classpath in the Tomcat config file, setenv.sh etc. I >>> have even ensured that DYLD_LIBRARY_PATH is set in a desperate attempt >>> though I know this should have no effect within Tomcat. I am pretty familiar >>> with Java and PHP but for the life of me, I can see no reason why I am >>> getting this simple error. I have, as per the video demo on the site, even >>> tried using the classes rather than the jar itself, in a newly created >>> directory WEB-INF/classes but again after redeploying, I get the same error. >>> >>> I have trawled through the mailing list archive and the web but not got >>> anywhere. Any help would be greatly appreciated. >>> >>> Regards, >>> >>> Marc >>> >>> The information contained in this E-mail is confidential. It is intended >>> only for the stated addressee(s) and access to it by any other person is >>> unauthorised. If you are not an addressee, you must not disclose, copy, >>> circulate or in any other way use or rely on the information contained in >>> this E-mail. Such unauthorised use may be unlawful. If you have received >>> this E-mail in error, please inform us immediately and delete it and all >>> copies from your system. >>> >>> >>> ------------------------------------------------------------------------------ >>> Protect Your Site and Customers from Malware Attacks >>> Learn about various malware tactics and how to avoid them. Understand >>> malware threats, the impact they can have on your business, and how you >>> can protect your company and customers by using code signing. >>> http://p.sf.net/sfu/oracle-sfdevnl >>> _______________________________________________ >>> php-java-bridge-users mailing list >>> php...@li... >>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >>> >> ------------------------------------------------------------------------------ >> Protect Your Site and Customers from Malware Attacks >> Learn about various malware tactics and how to avoid them. Understand >> malware threats, the impact they can have on your business, and how you >> can protect your company and customers by using code signing. >> http://p.sf.net/sfu/oracle-sfdevnl >> _______________________________________________ >> php-java-bridge-users mailing list >> php...@li... >> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > Mob: +44 797 329 5617 > > The information contained in this E-mail is confidential. It is intended only for the stated addressee(s) and access to it by any other person is unauthorised. If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this E-mail. Such unauthorised use may be unlawful. If you have received this E-mail in error, please inform us immediately and delete it and all copies from your system. > > > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users Mob: +44 797 329 5617 The information contained in this E-mail is confidential. It is intended only for the stated addressee(s) and access to it by any other person is unauthorised. If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this E-mail. Such unauthorised use may be unlawful. If you have received this E-mail in error, please inform us immediately and delete it and all copies from your system. |
From: <php...@li...> - 2011-01-14 16:38:26
|
Hi David, Yes, sorry, my original email was not 100% clear on the layout of the jar file - SolverSDK.jar file unpacks to a directory "SolverPlatform" and then all the classes underneath including Problem.class, hence the call of just "SolverPlatform.Problem". I can create a simple java file and instantiate the class at the command line in the same WEB-INF/Lib directory so it must be something with trying the same via the JavaBridge. Thanks, Marc On 14 Jan 2011, at 16:30, php...@li... wrote: > Hello, > > i dont know solversdk, so my infos may not be 100% correct. > > I think, if you want to instantiate a java class in php you will have to use > the fully qualified class name like this: > > <?php > require_once("http://localhost:8080/JavaBridge/java/Java.inc"); > $problem = new Java("com.solver.Problem"); > ?> > > This would instantiate the class Problem from the package com.solver. > But of course i dont know if this is the correct package name, because i > dont know solversdk. > > Maybe a stupid question: Do you know how to find out the package name of a > java class? > If you unpack the solversdk look for the file Problem.class. The package > name would be the > directories from the root of the jar contents to this file. In the above > example it would look > like this: > <jar-root>/com/solver/Problem.class > > David > > > On Fri, Jan 14, 2011 at 4:28 PM, < > php...@li...> wrote: > >> Hi, >> >> Quick bit of support with running what I'm pretty sure is a correctly >> installed Tomcat 7.0.5 and PHP-JavaBridge installation environment. I am >> running on Mac OS X 10.6.6, using MAMP (PHP 5.3, Apache 2.0 on port 80 etc) >> and have Tomcat 7.0.5 (port 8080) installed. I can run any php code >> successfully, the Tomcat examples all run successfully and if I deploy >> JavaBridge.war, copy the JavaBridge directory over to my local htdocs root >> (as per installation instructions if you get the FASTCGI error) then I can >> also run all the JavaBridge examples successfully. So a vanilla install is >> looking good. I can run the following code php script from my htdocs local >> root and it works fine as an example: >> >> <?php >> require_once("http://localhost:8080/JavaBridge/java/Java.inc"); >> $i1 = new Java("java.math.BigInteger", "1"); >> $i2 = new Java("java.math.BigInteger", "2"); >> $i3 = $i1->add($i2); >> echo $i3->toString() . "\n"; >> ?> >> >> So I now move onto wanting to instantiate classes from my own jar file >> called SolverSDK.jar. As per the installation instructions, I grabbed a copy >> of JavaBridge.war, exploded it, add in my jar file to the WEB-INF/lib >> directory, re-create the war file using "jar -cvf JavaBridge.war *", >> un-deploy the existing JavaBridge app in Tomcat, copy in my new one and >> re-start Tomcat. The updated war file deploys fine and I can run the above >> sample script again all ok. However, when I try to run the below simple >> script: >> >> <?php >> require_once("http://localhost:8080/JavaBridge/java/Java.inc"); >> $problem = new Java("SolverPlatform.Problem"); >> ?> >> >> I get the following error: >> >> Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: CreateInstance >> failed: new SolverPlatform.Problem. Cause: java.lang.UnsatisfiedLinkError: >> no SolverSDK in java.library.path VM: 1.6.0_22@http://www.apple.com/" at: >> #-36 java.lang.ClassLoader.loadLibrary(ClassLoader.java:1754) #-35 >> java.lang.Runtime.loadLibrary0(Runtime.java:823) #-34 >> java.lang.System.loadLibrary(System.java:1045) #-33 >> SolverPlatform.Problem.(Unknown Source) #-32 java.lang.Class.forName0(Native >> Method) #-31 java.lang.Class.forName(Class.java:247) #-30 >> php.java.bridge.Util.classForName(Util.java:1518) #-29 >> php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:445) #-28 >> php.java.bridge.Request.handleRequest(Request.java:458) #-27 >> php.java.bridge.Request.handleOneRequest(Request.java:510) #-26 >> php.java.servlet.PhpJavaServlet.handleLocalConnection(PhpJavaServlet.java:202) >> #-25 php.java.servlet.PhpJavaServlet.handlePut(PhpJavaServlet.java:250) #-24 >> php.java.servlet.PhpJavaServlet.doPut(PhpJavaServlet.java:261) #-23 >> javax.servlet.http.HttpServl in >> http://localhost:8080/JavaBridge/java/Java.inc on line 195 >> >> A browser refresh then results in the good old ClassNotFound error due >> since I would assume to the need for only one class-loader. >> >> The SolverSDK.jar file has the correct layout when exploded, i.e. >> SolverPlatform directory and then all the classes etc. It relies on a file >> called "libSolverSDK.dylib" which is also included within the updated war >> file in the same directory. I have tried everything I can think of, >> including forcing the classpath in the Tomcat config file, setenv.sh etc. I >> have even ensured that DYLD_LIBRARY_PATH is set in a desperate attempt >> though I know this should have no effect within Tomcat. I am pretty familiar >> with Java and PHP but for the life of me, I can see no reason why I am >> getting this simple error. I have, as per the video demo on the site, even >> tried using the classes rather than the jar itself, in a newly created >> directory WEB-INF/classes but again after redeploying, I get the same error. >> >> I have trawled through the mailing list archive and the web but not got >> anywhere. Any help would be greatly appreciated. >> >> Regards, >> >> Marc >> >> The information contained in this E-mail is confidential. It is intended >> only for the stated addressee(s) and access to it by any other person is >> unauthorised. If you are not an addressee, you must not disclose, copy, >> circulate or in any other way use or rely on the information contained in >> this E-mail. Such unauthorised use may be unlawful. If you have received >> this E-mail in error, please inform us immediately and delete it and all >> copies from your system. >> >> >> ------------------------------------------------------------------------------ >> Protect Your Site and Customers from Malware Attacks >> Learn about various malware tactics and how to avoid them. Understand >> malware threats, the impact they can have on your business, and how you >> can protect your company and customers by using code signing. >> http://p.sf.net/sfu/oracle-sfdevnl >> _______________________________________________ >> php-java-bridge-users mailing list >> php...@li... >> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >> > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users Mob: +44 797 329 5617 The information contained in this E-mail is confidential. It is intended only for the stated addressee(s) and access to it by any other person is unauthorised. If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this E-mail. Such unauthorised use may be unlawful. If you have received this E-mail in error, please inform us immediately and delete it and all copies from your system. |
From: <php...@li...> - 2011-01-14 16:30:23
|
Hello, i dont know solversdk, so my infos may not be 100% correct. I think, if you want to instantiate a java class in php you will have to use the fully qualified class name like this: <?php require_once("http://localhost:8080/JavaBridge/java/Java.inc"); $problem = new Java("com.solver.Problem"); ?> This would instantiate the class Problem from the package com.solver. But of course i dont know if this is the correct package name, because i dont know solversdk. Maybe a stupid question: Do you know how to find out the package name of a java class? If you unpack the solversdk look for the file Problem.class. The package name would be the directories from the root of the jar contents to this file. In the above example it would look like this: <jar-root>/com/solver/Problem.class David On Fri, Jan 14, 2011 at 4:28 PM, < php...@li...> wrote: > Hi, > > Quick bit of support with running what I'm pretty sure is a correctly > installed Tomcat 7.0.5 and PHP-JavaBridge installation environment. I am > running on Mac OS X 10.6.6, using MAMP (PHP 5.3, Apache 2.0 on port 80 etc) > and have Tomcat 7.0.5 (port 8080) installed. I can run any php code > successfully, the Tomcat examples all run successfully and if I deploy > JavaBridge.war, copy the JavaBridge directory over to my local htdocs root > (as per installation instructions if you get the FASTCGI error) then I can > also run all the JavaBridge examples successfully. So a vanilla install is > looking good. I can run the following code php script from my htdocs local > root and it works fine as an example: > > <?php > require_once("http://localhost:8080/JavaBridge/java/Java.inc"); > $i1 = new Java("java.math.BigInteger", "1"); > $i2 = new Java("java.math.BigInteger", "2"); > $i3 = $i1->add($i2); > echo $i3->toString() . "\n"; > ?> > > So I now move onto wanting to instantiate classes from my own jar file > called SolverSDK.jar. As per the installation instructions, I grabbed a copy > of JavaBridge.war, exploded it, add in my jar file to the WEB-INF/lib > directory, re-create the war file using "jar -cvf JavaBridge.war *", > un-deploy the existing JavaBridge app in Tomcat, copy in my new one and > re-start Tomcat. The updated war file deploys fine and I can run the above > sample script again all ok. However, when I try to run the below simple > script: > > <?php > require_once("http://localhost:8080/JavaBridge/java/Java.inc"); > $problem = new Java("SolverPlatform.Problem"); > ?> > > I get the following error: > > Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: CreateInstance > failed: new SolverPlatform.Problem. Cause: java.lang.UnsatisfiedLinkError: > no SolverSDK in java.library.path VM: 1.6.0_22@http://www.apple.com/" at: > #-36 java.lang.ClassLoader.loadLibrary(ClassLoader.java:1754) #-35 > java.lang.Runtime.loadLibrary0(Runtime.java:823) #-34 > java.lang.System.loadLibrary(System.java:1045) #-33 > SolverPlatform.Problem.(Unknown Source) #-32 java.lang.Class.forName0(Native > Method) #-31 java.lang.Class.forName(Class.java:247) #-30 > php.java.bridge.Util.classForName(Util.java:1518) #-29 > php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:445) #-28 > php.java.bridge.Request.handleRequest(Request.java:458) #-27 > php.java.bridge.Request.handleOneRequest(Request.java:510) #-26 > php.java.servlet.PhpJavaServlet.handleLocalConnection(PhpJavaServlet.java:202) > #-25 php.java.servlet.PhpJavaServlet.handlePut(PhpJavaServlet.java:250) #-24 > php.java.servlet.PhpJavaServlet.doPut(PhpJavaServlet.java:261) #-23 > javax.servlet.http.HttpServl in > http://localhost:8080/JavaBridge/java/Java.inc on line 195 > > A browser refresh then results in the good old ClassNotFound error due > since I would assume to the need for only one class-loader. > > The SolverSDK.jar file has the correct layout when exploded, i.e. > SolverPlatform directory and then all the classes etc. It relies on a file > called "libSolverSDK.dylib" which is also included within the updated war > file in the same directory. I have tried everything I can think of, > including forcing the classpath in the Tomcat config file, setenv.sh etc. I > have even ensured that DYLD_LIBRARY_PATH is set in a desperate attempt > though I know this should have no effect within Tomcat. I am pretty familiar > with Java and PHP but for the life of me, I can see no reason why I am > getting this simple error. I have, as per the video demo on the site, even > tried using the classes rather than the jar itself, in a newly created > directory WEB-INF/classes but again after redeploying, I get the same error. > > I have trawled through the mailing list archive and the web but not got > anywhere. Any help would be greatly appreciated. > > Regards, > > Marc > > The information contained in this E-mail is confidential. It is intended > only for the stated addressee(s) and access to it by any other person is > unauthorised. If you are not an addressee, you must not disclose, copy, > circulate or in any other way use or rely on the information contained in > this E-mail. Such unauthorised use may be unlawful. If you have received > this E-mail in error, please inform us immediately and delete it and all > copies from your system. > > > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: <php...@li...> - 2011-01-14 15:28:45
|
Hi, Quick bit of support with running what I'm pretty sure is a correctly installed Tomcat 7.0.5 and PHP-JavaBridge installation environment. I am running on Mac OS X 10.6.6, using MAMP (PHP 5.3, Apache 2.0 on port 80 etc) and have Tomcat 7.0.5 (port 8080) installed. I can run any php code successfully, the Tomcat examples all run successfully and if I deploy JavaBridge.war, copy the JavaBridge directory over to my local htdocs root (as per installation instructions if you get the FASTCGI error) then I can also run all the JavaBridge examples successfully. So a vanilla install is looking good. I can run the following code php script from my htdocs local root and it works fine as an example: <?php require_once("http://localhost:8080/JavaBridge/java/Java.inc"); $i1 = new Java("java.math.BigInteger", "1"); $i2 = new Java("java.math.BigInteger", "2"); $i3 = $i1->add($i2); echo $i3->toString() . "\n"; ?> So I now move onto wanting to instantiate classes from my own jar file called SolverSDK.jar. As per the installation instructions, I grabbed a copy of JavaBridge.war, exploded it, add in my jar file to the WEB-INF/lib directory, re-create the war file using "jar -cvf JavaBridge.war *", un-deploy the existing JavaBridge app in Tomcat, copy in my new one and re-start Tomcat. The updated war file deploys fine and I can run the above sample script again all ok. However, when I try to run the below simple script: <?php require_once("http://localhost:8080/JavaBridge/java/Java.inc"); $problem = new Java("SolverPlatform.Problem"); ?> I get the following error: Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: CreateInstance failed: new SolverPlatform.Problem. Cause: java.lang.UnsatisfiedLinkError: no SolverSDK in java.library.path VM: 1.6.0_22@http://www.apple.com/" at: #-36 java.lang.ClassLoader.loadLibrary(ClassLoader.java:1754) #-35 java.lang.Runtime.loadLibrary0(Runtime.java:823) #-34 java.lang.System.loadLibrary(System.java:1045) #-33 SolverPlatform.Problem.(Unknown Source) #-32 java.lang.Class.forName0(Native Method) #-31 java.lang.Class.forName(Class.java:247) #-30 php.java.bridge.Util.classForName(Util.java:1518) #-29 php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:445) #-28 php.java.bridge.Request.handleRequest(Request.java:458) #-27 php.java.bridge.Request.handleOneRequest(Request.java:510) #-26 php.java.servlet.PhpJavaServlet.handleLocalConnection(PhpJavaServlet.java:202) #-25 php.java.servlet.PhpJavaServlet.handlePut(PhpJavaServlet.java:250) #-24 php.java.servlet.PhpJavaServlet.doPut(PhpJavaServlet.java:261) #-23 javax.servlet.http.HttpServl in http://localhost:8080/JavaBridge/java/Java.inc on line 195 A browser refresh then results in the good old ClassNotFound error due since I would assume to the need for only one class-loader. The SolverSDK.jar file has the correct layout when exploded, i.e. SolverPlatform directory and then all the classes etc. It relies on a file called "libSolverSDK.dylib" which is also included within the updated war file in the same directory. I have tried everything I can think of, including forcing the classpath in the Tomcat config file, setenv.sh etc. I have even ensured that DYLD_LIBRARY_PATH is set in a desperate attempt though I know this should have no effect within Tomcat. I am pretty familiar with Java and PHP but for the life of me, I can see no reason why I am getting this simple error. I have, as per the video demo on the site, even tried using the classes rather than the jar itself, in a newly created directory WEB-INF/classes but again after redeploying, I get the same error. I have trawled through the mailing list archive and the web but not got anywhere. Any help would be greatly appreciated. Regards, Marc The information contained in this E-mail is confidential. It is intended only for the stated addressee(s) and access to it by any other person is unauthorised. If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this E-mail. Such unauthorised use may be unlawful. If you have received this E-mail in error, please inform us immediately and delete it and all copies from your system. |
From: <php...@li...> - 2011-01-14 14:36:16
|
Sorry, i forgot something in the commandline. Anyway, the test installation does not have to be deployed in tomcat. Just go to the war-file and do: java -Xms128m -Xmx128m -cp EchoServer.war TestInstallation Tomcat is not needed for this test program. On Fri, Jan 14, 2011 at 3:30 PM, < php...@li...> wrote: > Hi, > > it tried that already when i fire: > > java -Xms128m -Xmx128m -cp EchoServer.war > > (I renamed the .war to EchoServer before autodeploying). I get only the > java > help context shown like: > > java -Xms128m -Xmx128m -cp EchoServer.war > Usage: java [-options] class [args...] > (to execute a class) > or java [-options] -jar jarfile [args...] > (to execute a jar file) > > where options include: > -d32 use a 32-bit data model if available > > -d64 use a 64-bit data model if available > -server to select the "server" VM > The default VM is server. > > -cp <class search path of directories and zip/jar files> > -classpath <class search path of directories and zip/jar files> > A : separated list of directories, JAR archives, > and ZIP archives to search for class files. > -D<name>=<value> > set a system property > -verbose[:class|gc|jni] > enable verbose output > -version print product version and exit > -version:<value> > require the specified version to run > -showversion print product version and continue > -jre-restrict-search | -jre-no-restrict-search > include/exclude user private JREs in the version search > -? -help print this help message > -X print help on non-standard options > -ea[:<packagename>...|:<classname>] > -enableassertions[:<packagename>...|:<classname>] > enable assertions > -da[:<packagename>...|:<classname>] > -disableassertions[:<packagename>...|:<classname>] > disable assertions > -esa | -enablesystemassertions > enable system assertions > -dsa | -disablesystemassertions > disable system assertions > -agentlib:<libname>[=<options>] > load native agent library <libname>, e.g. -agentlib:hprof > see also, -agentlib:jdwp=help and -agentlib:hprof=help > -agentpath:<pathname>[=<options>] > load native agent library by full pathname > -javaagent:<jarpath>[=<options>] > load Java programming language agent, see > java.lang.instrument > -splash:<imagepath> > show splash screen with specified image > > so something must be different in your ubuntu linux then I the debian lenny > I use. > > -----Original Message----- > From: php...@li... > [mailto:php...@li...] > Sent: Freitag, 14. Januar 2011 13:22 > To: php...@li... > Subject: Re: [Php-java-bridge-users] Installation of JavaBridge causes > problems - what am i missing > > Hello > > you should not type this into the shell: > java "-Xms128m -Xmx256m" > > you should type: > java -Xms128m -Xmx128m -cp JavaBridge.war > > There are no "" in it. Also this memory settings only apply for this java > launch. > You cannot run > java -Xms128m -Xmx128m > and expect that memory settings are applied later when you run a java > program. > > Please try this: > Make sure all java processes are terminated like described before and then > type > java -Xms128m -Xmx128m -cp JavaBridge.war > > David > > > On Fri, Jan 14, 2011 at 12:57 PM, < > php...@li...> wrote: > > > Thx for your help. So I installed php5-cgi which is now in > > /usr/bin/php5-cgi. Also I get more ram into the machine. The setting of > the > > memory limits does not work at all in the command line whatever I put it > > does not work. At least I got something when putting: > > > > java "-Xms128m -Xmx256m" > > Invalid initial heap size: -Xms128m -Xmx256m > > Could not create the Java virtual machine. > > > > But I only get the same message whatever I put there so I hardcoded the > > memory directly into the tomcat and catalina startup script. Something > like > > this: > > > > export CATALINA_OPTS="-Xms16m -Xmx256m" > > export JAVA_OPTS="-Xms16m -Xmx256m" > > > > when running testinstallation these error are thrown: > > > > Starting a simple servlet engine: > > [/usr/lib/jvm/java-6-openjdk/jre/bin/java, > > -jar, /opt/tomcat/webapps/ext/JavaBridge.jar, SERVLET_LOCAL:8080] > > Jan 14 12:34:50 JavaBridge INFO : VM : > > 1.6.0_0@http://java.sun.com/ > > Jan 14 12:34:50 JavaBridge INFO : JavaBridge version : 6.2.1 > > Jan 14 12:34:50 JavaBridge INFO : logFile : > > Jan 14 12:34:50 JavaBridge INFO : default logLevel : 3 > > Jan 14 12:34:50 JavaBridge INFO : socket : > SERVLET_LOCAL:8080 > > Jan 14 12:34:50 JavaBridge INFO : java.ext.dirs : > > /usr/lib/jvm/java-6-openjdk/jre/lib/ext:/usr/java/packages/lib/ext > > Jan 14 12:34:50 JavaBridge INFO : php.java.bridge.base: /root > > Jan 14 12:34:50 JavaBridge INFO : thread pool size : 20 > > Jan 14 12:34:50 JavaBridge INFO : JavaBridgeRunner started on port > > INET_LOCAL:8080 > > Invoking php: [/usr/bin/php-cgi, -n, -d, allow_url_include=On, > > /opt/tomcat/webapps/test.php] > > java.lang.RuntimeException: Could not run PHP ([/usr/bin/php-cgi, -n, -d, > > allow_url_include=On, /opt/tomcat/webapps/test.php]), please check if > > php-cgi is in the path. > > at TestInstallation.start(TestInstallation.java:332) > > at TestInstallation.main(TestInstallation.java:252) > > Caused by: java.io.IOException: Cannot run program "/usr/bin/php-cgi": > > java.io.IOException: error=12, Cannot allocate memory > > at java.lang.ProcessBuilder.start(ProcessBuilder.java:474) > > at java.lang.Runtime.exec(Runtime.java:610) > > at java.lang.Runtime.exec(Runtime.java:526) > > at TestInstallation.start(TestInstallation.java:330) > > ... 1 more > > Caused by: java.io.IOException: java.io.IOException: error=12, Cannot > > allocate memory > > at java.lang.UNIXProcess.<init>(UNIXProcess.java:164) > > at java.lang.ProcessImpl.start(ProcessImpl.java:81) > > at java.lang.ProcessBuilder.start(ProcessBuilder.java:467) > > ... 4 more > > > > So now I think the memory settings are excepted its just a matter of > > finding > > the right settings and I have to also wait for the new ram coming. But > the > > message that php-cgi is not in the path really freaks my out. > > /usr/bin/php-cgi does exist so does /usr/bin/php5-cgi which I tried to > > change directly in the web.xml. but right now am stuck with this error > > message because I don't know where to change anything on top?! I think I > > may > > have to alter the servlet containter for correct php routing but how? > > > > Btw that gives: Php -v > > > > PHP 5.2.6-1+lenny9 with Suhosin-Patch 0.9.6.2 (cli) (built: Aug 4 2010 > > 06:06:53) > > Copyright (c) 1997-2008 The PHP Group > > Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies > > > > Thx for all your help - I think we are getting close > > > > Fra* > > > > > > -----Original Message----- > > From: php...@li... > > [mailto:php...@li...] > > Sent: Freitag, 14. Januar 2011 08:16 > > To: php...@li... > > Subject: Re: [Php-java-bridge-users] Installation of JavaBridge causes > > problems - what am i missing > > > > What does php -v display? > > Am 13.01.2011 15:40 schrieb <php...@li... > >: > > > sorry, of course that command does not use 256 but only 128 MB. > > > I use the same values for Xms and Xmx because it should be faster > > > then continuously allocating more memory. > > > > > > On Thu, Jan 13, 2011 at 3:33 PM, Zagoti Bagon <za...@gm...> > wrote: > > > > > >> Ok, i did some testing for you in a 1 GB virtual machine (virtual box > - > > >> ubuntu). > > >> > > >> The php-java-bridge starts a local servlet container. > > >> But it doesnt stop it. So you should first check that > > >> all java processes have terminated. > > >> > > >> ps -ef | grep java > > >> > > >> if there still is a java process, kill it. > > >> > > >> kill <pid> > > >> (The pid is in the second column of ps -ef) > > >> if this does not help: > > >> kill -9 <pid> > > >> > > >> After that try this: > > >> > > >> java -Xms128m -Xmx128m -cp JavaBridge.war > > >> > > >> If it still complains about php-cgi, then as root: > > >> > > >> apt-get install php5-cgi > > >> > > >> Before you retry check again if the all java processes have > terminated. > > >> > > >> I dont know if 256 M will be enough for your production environment. > > >> > > >> Regards > > >> David > > >> > > >> > > >> On Thu, Jan 13, 2011 at 1:23 PM, < > > >> php...@li...> wrote: > > >> > > >>> Hi, > > >>> > > >>> thx for the help. It's a VPS with 1 GB real memory. I see the problem > > java > > >>> does not let me change its max memory with > > >>> > > >>> java -Xmx512m (unknown identifier) > > >>> > > >>> instead I tried > > >>> > > >>> export JAVA_OPTS="-Xms256m -Xmx512m" > > >>> export CATALINA_OPTS="-Xms256m -Xmx512m" > > >>> > > >>> running the testinstallation produced: > > >>> > > >>> > > >>> Starting a simple servlet engine: > > >>> [/usr/lib/jvm/java-6-openjdk/jre/bin/java, > > >>> -jar, /opt/tomcat/webapps/ext/JavaBridge.jar, SERVLET_LOCAL:8080] > > >>> Jan 13 13:15:45 JavaBridge INFO : VM : > > >>> 1.6.0_0@http://java.sun.com/ > > >>> Jan 13 13:15:45 JavaBridge INFO : JavaBridge version : 6.2.1 > > >>> Jan 13 13:15:45 JavaBridge INFO : logFile : > > >>> Jan 13 13:15:45 JavaBridge INFO : default logLevel : 3 > > >>> Jan 13 13:15:45 JavaBridge INFO : socket : SERVLET_LOCAL:8080 > > >>> Jan 13 13:15:45 JavaBridge INFO : java.ext.dirs : > > >>> /usr/lib/jvm/java-6-openjdk/jre/lib/ext:/usr/java/packages/lib/ext > > >>> Jan 13 13:15:45 JavaBridge INFO : php.java.bridge.base: /root > > >>> Jan 13 13:15:45 JavaBridge INFO : thread pool size : 20 > > >>> Jan 13 13:15:45 JavaBridge INFO : JavaBridgeRunner started on port > > >>> INET_LOCAL:8080 > > >>> Invoking php: [php-cgi, -n, -d, allow_url_include=On, > > >>> /opt/tomcat/webapps/test.php] > > >>> java.lang.RuntimeException: Could not run PHP ([php-cgi, -n, -d, > > >>> allow_url_include=On, /opt/tomcat/webapps/test.php]), please check if > > >>> php-cgi is in the path. > > >>> at TestInstallation.start(TestInstallation.java:332) > > >>> at TestInstallation.main(TestInstallation.java:252) > > >>> Caused by: java.io.IOException: Cannot run program "php-cgi": > > >>> java.io.IOException: error=12, Cannot allocate memory > > >>> at java.lang.ProcessBuilder.start(ProcessBuilder.java:474) > > >>> at java.lang.Runtime.exec(Runtime.java:610) > > >>> at java.lang.Runtime.exec(Runtime.java:526) > > >>> at TestInstallation.start(TestInstallation.java:330) > > >>> ... 1 more > > >>> Caused by: java.io.IOException: java.io.IOException: error=12, Cannot > > >>> allocate memory > > >>> at java.lang.UNIXProcess.<init>(UNIXProcess.java:164) > > >>> at java.lang.ProcessImpl.start(ProcessImpl.java:81) > > >>> at java.lang.ProcessBuilder.start(ProcessBuilder.java:467) > > >>> ... 4 more > > >>> > > >>> And then > > >>> > > >>> Free -m (821 m free, prior it was already up to 1024m full an > leaking) > > >>> > > >>> The question is how much real ram should I install to be safe. Whats > > with > > >>> the message "please check if php-cgi is in the path" > > >>> > > >>> Thx for your help - appreciated > > >>> > > >>> -----Original Message----- > > >>> From: php...@li... > > >>> [mailto:php...@li...] > > >>> Sent: Donnerstag, 13. Januar 2011 09:14 > > >>> To: php...@li... > > >>> Subject: Re: [Php-java-bridge-users] Installation of JavaBridge > causes > > >>> problems - what am i missing > > >>> > > >>> Hello, > > >>> > > >>> i had a similar problem in a different context. I guess your problem > is > > >>> not > > >>> the php-java-bridge. > > >>> On a virtual host you often have very limited memory available. How > > much > > >>> memory did you order for your virtual server? > > >>> > > >>> You can use linux commands like > > >>> free -m > > >>> to find out how your current memory usage is. > > >>> > > >>> Look at your error message. Quite at the start it says: > > >>> > > >>> Caused by: java.io.IOException: Cannot run program > > >>> "/usr/lib/jvm/java-6-openjdk/ > > >>> jre/bin/java": java.io.IOException: error=12, > > >>> Cannot allocate memory > > >>> > > >>> So find out how much memory you have available and then adjust the > > start > > >>> scripts of the php test program and of your tomcat. > > >>> Look for the java options -Xms and -Xmx > > >>> Documentation: > > >>> > > > http://download.oracle.com/javase/6/docs/technotes/tools/solaris/java.html > > >>> > > >>> Also dont run too many jvm instances at the same time. I believe the > > >>> php-java-bridge test programm starts its own jvm, so dont start the > > test > > >>> while tomcat is runing. I think your virtual machine might not have > > enough > > >>> memory for both instances. > > >>> > > >>> Regards, David > > >>> > > >>> > > >>> On Wed, Jan 12, 2011 at 1:55 PM, < > > >>> php...@li...> wrote: > > >>> > > >>> > Please see > > http://php-java-bridge.sourceforge.net/pjb/installation.php > > >>> > > > >>> > With "original software" I mean Java from Oracle and Tomcat from > > Apache. > > >>> > The > > >>> > crap shipped with Debian OS doesn't work. > > >>> > > > >>> > > > >>> > > >>> > > > > > > ---------------------------------------------------------------------------- > > >>> -- > > >>> > Protect Your Site and Customers from Malware Attacks > > >>> > Learn about various malware tactics and how to avoid them. > Understand > > >>> > malware threats, the impact they can have on your business, and how > > you > > >>> > can protect your company and customers by using code signing. > > >>> > http://p.sf.net/sfu/oracle-sfdevnl > > >>> > _______________________________________________ > > >>> > php-java-bridge-users mailing list > > >>> > php...@li... > > >>> > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > >>> > > > >>> > > >>> > > > > > > ---------------------------------------------------------------------------- > > >>> -- > > >>> Protect Your Site and Customers from Malware Attacks > > >>> Learn about various malware tactics and how to avoid them. Understand > > >>> malware threats, the impact they can have on your business, and how > you > > >>> can protect your company and customers by using code signing. > > >>> http://p.sf.net/sfu/oracle-sfdevnl > > >>> _______________________________________________ > > >>> php-java-bridge-users mailing list > > >>> php...@li... > > >>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > >>> > > >>> > > >>> > > >>> > > > > > > ---------------------------------------------------------------------------- > > -- > > >>> Protect Your Site and Customers from Malware Attacks > > >>> Learn about various malware tactics and how to avoid them. Understand > > >>> malware threats, the impact they can have on your business, and how > you > > >>> can protect your company and customers by using code signing. > > >>> http://p.sf.net/sfu/oracle-sfdevnl > > >>> _______________________________________________ > > >>> php-java-bridge-users mailing list > > >>> php...@li... > > >>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > >>> > > >> > > >> > > > > > > > > > ---------------------------------------------------------------------------- > > -- > > > Protect Your Site and Customers from Malware Attacks > > > Learn about various malware tactics and how to avoid them. Understand > > > malware threats, the impact they can have on your business, and how you > > > can protect your company and customers by using code signing. > > > http://p.sf.net/sfu/oracle-sfdevnl > > > _______________________________________________ > > > php-java-bridge-users mailing list > > > php...@li... > > > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > > > > ---------------------------------------------------------------------------- > > -- > > Protect Your Site and Customers from Malware Attacks > > Learn about various malware tactics and how to avoid them. Understand > > malware threats, the impact they can have on your business, and how you > > can protect your company and customers by using code signing. > > http://p.sf.net/sfu/oracle-sfdevnl > > _______________________________________________ > > php-java-bridge-users mailing list > > php...@li... > > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > > > > > > > > ---------------------------------------------------------------------------- > -- > > Protect Your Site and Customers from Malware Attacks > > Learn about various malware tactics and how to avoid them. Understand > > malware threats, the impact they can have on your business, and how you > > can protect your company and customers by using code signing. > > http://p.sf.net/sfu/oracle-sfdevnl > > _______________________________________________ > > php-java-bridge-users mailing list > > php...@li... > > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > > ---------------------------------------------------------------------------- > -- > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: <php...@li...> - 2011-01-14 12:21:37
|
Hello you should not type this into the shell: java "-Xms128m -Xmx256m" you should type: java -Xms128m -Xmx128m -cp JavaBridge.war There are no "" in it. Also this memory settings only apply for this java launch. You cannot run java -Xms128m -Xmx128m and expect that memory settings are applied later when you run a java program. Please try this: Make sure all java processes are terminated like described before and then type java -Xms128m -Xmx128m -cp JavaBridge.war David On Fri, Jan 14, 2011 at 12:57 PM, < php...@li...> wrote: > Thx for your help. So I installed php5-cgi which is now in > /usr/bin/php5-cgi. Also I get more ram into the machine. The setting of the > memory limits does not work at all in the command line whatever I put it > does not work. At least I got something when putting: > > java "-Xms128m -Xmx256m" > Invalid initial heap size: -Xms128m -Xmx256m > Could not create the Java virtual machine. > > But I only get the same message whatever I put there so I hardcoded the > memory directly into the tomcat and catalina startup script. Something like > this: > > export CATALINA_OPTS="-Xms16m -Xmx256m" > export JAVA_OPTS="-Xms16m -Xmx256m" > > when running testinstallation these error are thrown: > > Starting a simple servlet engine: > [/usr/lib/jvm/java-6-openjdk/jre/bin/java, > -jar, /opt/tomcat/webapps/ext/JavaBridge.jar, SERVLET_LOCAL:8080] > Jan 14 12:34:50 JavaBridge INFO : VM : > 1.6.0_0@http://java.sun.com/ > Jan 14 12:34:50 JavaBridge INFO : JavaBridge version : 6.2.1 > Jan 14 12:34:50 JavaBridge INFO : logFile : > Jan 14 12:34:50 JavaBridge INFO : default logLevel : 3 > Jan 14 12:34:50 JavaBridge INFO : socket : SERVLET_LOCAL:8080 > Jan 14 12:34:50 JavaBridge INFO : java.ext.dirs : > /usr/lib/jvm/java-6-openjdk/jre/lib/ext:/usr/java/packages/lib/ext > Jan 14 12:34:50 JavaBridge INFO : php.java.bridge.base: /root > Jan 14 12:34:50 JavaBridge INFO : thread pool size : 20 > Jan 14 12:34:50 JavaBridge INFO : JavaBridgeRunner started on port > INET_LOCAL:8080 > Invoking php: [/usr/bin/php-cgi, -n, -d, allow_url_include=On, > /opt/tomcat/webapps/test.php] > java.lang.RuntimeException: Could not run PHP ([/usr/bin/php-cgi, -n, -d, > allow_url_include=On, /opt/tomcat/webapps/test.php]), please check if > php-cgi is in the path. > at TestInstallation.start(TestInstallation.java:332) > at TestInstallation.main(TestInstallation.java:252) > Caused by: java.io.IOException: Cannot run program "/usr/bin/php-cgi": > java.io.IOException: error=12, Cannot allocate memory > at java.lang.ProcessBuilder.start(ProcessBuilder.java:474) > at java.lang.Runtime.exec(Runtime.java:610) > at java.lang.Runtime.exec(Runtime.java:526) > at TestInstallation.start(TestInstallation.java:330) > ... 1 more > Caused by: java.io.IOException: java.io.IOException: error=12, Cannot > allocate memory > at java.lang.UNIXProcess.<init>(UNIXProcess.java:164) > at java.lang.ProcessImpl.start(ProcessImpl.java:81) > at java.lang.ProcessBuilder.start(ProcessBuilder.java:467) > ... 4 more > > So now I think the memory settings are excepted its just a matter of > finding > the right settings and I have to also wait for the new ram coming. But the > message that php-cgi is not in the path really freaks my out. > /usr/bin/php-cgi does exist so does /usr/bin/php5-cgi which I tried to > change directly in the web.xml. but right now am stuck with this error > message because I don't know where to change anything on top?! I think I > may > have to alter the servlet containter for correct php routing but how? > > Btw that gives: Php -v > > PHP 5.2.6-1+lenny9 with Suhosin-Patch 0.9.6.2 (cli) (built: Aug 4 2010 > 06:06:53) > Copyright (c) 1997-2008 The PHP Group > Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies > > Thx for all your help - I think we are getting close > > Fra* > > > -----Original Message----- > From: php...@li... > [mailto:php...@li...] > Sent: Freitag, 14. Januar 2011 08:16 > To: php...@li... > Subject: Re: [Php-java-bridge-users] Installation of JavaBridge causes > problems - what am i missing > > What does php -v display? > Am 13.01.2011 15:40 schrieb <php...@li...>: > > sorry, of course that command does not use 256 but only 128 MB. > > I use the same values for Xms and Xmx because it should be faster > > then continuously allocating more memory. > > > > On Thu, Jan 13, 2011 at 3:33 PM, Zagoti Bagon <za...@gm...> wrote: > > > >> Ok, i did some testing for you in a 1 GB virtual machine (virtual box - > >> ubuntu). > >> > >> The php-java-bridge starts a local servlet container. > >> But it doesnt stop it. So you should first check that > >> all java processes have terminated. > >> > >> ps -ef | grep java > >> > >> if there still is a java process, kill it. > >> > >> kill <pid> > >> (The pid is in the second column of ps -ef) > >> if this does not help: > >> kill -9 <pid> > >> > >> After that try this: > >> > >> java -Xms128m -Xmx128m -cp JavaBridge.war > >> > >> If it still complains about php-cgi, then as root: > >> > >> apt-get install php5-cgi > >> > >> Before you retry check again if the all java processes have terminated. > >> > >> I dont know if 256 M will be enough for your production environment. > >> > >> Regards > >> David > >> > >> > >> On Thu, Jan 13, 2011 at 1:23 PM, < > >> php...@li...> wrote: > >> > >>> Hi, > >>> > >>> thx for the help. It's a VPS with 1 GB real memory. I see the problem > java > >>> does not let me change its max memory with > >>> > >>> java -Xmx512m (unknown identifier) > >>> > >>> instead I tried > >>> > >>> export JAVA_OPTS="-Xms256m -Xmx512m" > >>> export CATALINA_OPTS="-Xms256m -Xmx512m" > >>> > >>> running the testinstallation produced: > >>> > >>> > >>> Starting a simple servlet engine: > >>> [/usr/lib/jvm/java-6-openjdk/jre/bin/java, > >>> -jar, /opt/tomcat/webapps/ext/JavaBridge.jar, SERVLET_LOCAL:8080] > >>> Jan 13 13:15:45 JavaBridge INFO : VM : > >>> 1.6.0_0@http://java.sun.com/ > >>> Jan 13 13:15:45 JavaBridge INFO : JavaBridge version : 6.2.1 > >>> Jan 13 13:15:45 JavaBridge INFO : logFile : > >>> Jan 13 13:15:45 JavaBridge INFO : default logLevel : 3 > >>> Jan 13 13:15:45 JavaBridge INFO : socket : SERVLET_LOCAL:8080 > >>> Jan 13 13:15:45 JavaBridge INFO : java.ext.dirs : > >>> /usr/lib/jvm/java-6-openjdk/jre/lib/ext:/usr/java/packages/lib/ext > >>> Jan 13 13:15:45 JavaBridge INFO : php.java.bridge.base: /root > >>> Jan 13 13:15:45 JavaBridge INFO : thread pool size : 20 > >>> Jan 13 13:15:45 JavaBridge INFO : JavaBridgeRunner started on port > >>> INET_LOCAL:8080 > >>> Invoking php: [php-cgi, -n, -d, allow_url_include=On, > >>> /opt/tomcat/webapps/test.php] > >>> java.lang.RuntimeException: Could not run PHP ([php-cgi, -n, -d, > >>> allow_url_include=On, /opt/tomcat/webapps/test.php]), please check if > >>> php-cgi is in the path. > >>> at TestInstallation.start(TestInstallation.java:332) > >>> at TestInstallation.main(TestInstallation.java:252) > >>> Caused by: java.io.IOException: Cannot run program "php-cgi": > >>> java.io.IOException: error=12, Cannot allocate memory > >>> at java.lang.ProcessBuilder.start(ProcessBuilder.java:474) > >>> at java.lang.Runtime.exec(Runtime.java:610) > >>> at java.lang.Runtime.exec(Runtime.java:526) > >>> at TestInstallation.start(TestInstallation.java:330) > >>> ... 1 more > >>> Caused by: java.io.IOException: java.io.IOException: error=12, Cannot > >>> allocate memory > >>> at java.lang.UNIXProcess.<init>(UNIXProcess.java:164) > >>> at java.lang.ProcessImpl.start(ProcessImpl.java:81) > >>> at java.lang.ProcessBuilder.start(ProcessBuilder.java:467) > >>> ... 4 more > >>> > >>> And then > >>> > >>> Free -m (821 m free, prior it was already up to 1024m full an leaking) > >>> > >>> The question is how much real ram should I install to be safe. Whats > with > >>> the message "please check if php-cgi is in the path" > >>> > >>> Thx for your help - appreciated > >>> > >>> -----Original Message----- > >>> From: php...@li... > >>> [mailto:php...@li...] > >>> Sent: Donnerstag, 13. Januar 2011 09:14 > >>> To: php...@li... > >>> Subject: Re: [Php-java-bridge-users] Installation of JavaBridge causes > >>> problems - what am i missing > >>> > >>> Hello, > >>> > >>> i had a similar problem in a different context. I guess your problem is > >>> not > >>> the php-java-bridge. > >>> On a virtual host you often have very limited memory available. How > much > >>> memory did you order for your virtual server? > >>> > >>> You can use linux commands like > >>> free -m > >>> to find out how your current memory usage is. > >>> > >>> Look at your error message. Quite at the start it says: > >>> > >>> Caused by: java.io.IOException: Cannot run program > >>> "/usr/lib/jvm/java-6-openjdk/ > >>> jre/bin/java": java.io.IOException: error=12, > >>> Cannot allocate memory > >>> > >>> So find out how much memory you have available and then adjust the > start > >>> scripts of the php test program and of your tomcat. > >>> Look for the java options -Xms and -Xmx > >>> Documentation: > >>> > http://download.oracle.com/javase/6/docs/technotes/tools/solaris/java.html > >>> > >>> Also dont run too many jvm instances at the same time. I believe the > >>> php-java-bridge test programm starts its own jvm, so dont start the > test > >>> while tomcat is runing. I think your virtual machine might not have > enough > >>> memory for both instances. > >>> > >>> Regards, David > >>> > >>> > >>> On Wed, Jan 12, 2011 at 1:55 PM, < > >>> php...@li...> wrote: > >>> > >>> > Please see > http://php-java-bridge.sourceforge.net/pjb/installation.php > >>> > > >>> > With "original software" I mean Java from Oracle and Tomcat from > Apache. > >>> > The > >>> > crap shipped with Debian OS doesn't work. > >>> > > >>> > > >>> > >>> > > ---------------------------------------------------------------------------- > >>> -- > >>> > Protect Your Site and Customers from Malware Attacks > >>> > Learn about various malware tactics and how to avoid them. Understand > >>> > malware threats, the impact they can have on your business, and how > you > >>> > can protect your company and customers by using code signing. > >>> > http://p.sf.net/sfu/oracle-sfdevnl > >>> > _______________________________________________ > >>> > php-java-bridge-users mailing list > >>> > php...@li... > >>> > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > >>> > > >>> > >>> > > ---------------------------------------------------------------------------- > >>> -- > >>> Protect Your Site and Customers from Malware Attacks > >>> Learn about various malware tactics and how to avoid them. Understand > >>> malware threats, the impact they can have on your business, and how you > >>> can protect your company and customers by using code signing. > >>> http://p.sf.net/sfu/oracle-sfdevnl > >>> _______________________________________________ > >>> php-java-bridge-users mailing list > >>> php...@li... > >>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > >>> > >>> > >>> > >>> > > ---------------------------------------------------------------------------- > -- > >>> Protect Your Site and Customers from Malware Attacks > >>> Learn about various malware tactics and how to avoid them. Understand > >>> malware threats, the impact they can have on your business, and how you > >>> can protect your company and customers by using code signing. > >>> http://p.sf.net/sfu/oracle-sfdevnl > >>> _______________________________________________ > >>> php-java-bridge-users mailing list > >>> php...@li... > >>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > >>> > >> > >> > > > > ---------------------------------------------------------------------------- > -- > > Protect Your Site and Customers from Malware Attacks > > Learn about various malware tactics and how to avoid them. Understand > > malware threats, the impact they can have on your business, and how you > > can protect your company and customers by using code signing. > > http://p.sf.net/sfu/oracle-sfdevnl > > _______________________________________________ > > php-java-bridge-users mailing list > > php...@li... > > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > ---------------------------------------------------------------------------- > -- > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: <php...@li...> - 2011-01-14 07:15:51
|
What does php -v display? Am 13.01.2011 15:40 schrieb <php...@li...>: > sorry, of course that command does not use 256 but only 128 MB. > I use the same values for Xms and Xmx because it should be faster > then continuously allocating more memory. > > On Thu, Jan 13, 2011 at 3:33 PM, Zagoti Bagon <za...@gm...> wrote: > >> Ok, i did some testing for you in a 1 GB virtual machine (virtual box - >> ubuntu). >> >> The php-java-bridge starts a local servlet container. >> But it doesnt stop it. So you should first check that >> all java processes have terminated. >> >> ps -ef | grep java >> >> if there still is a java process, kill it. >> >> kill <pid> >> (The pid is in the second column of ps -ef) >> if this does not help: >> kill -9 <pid> >> >> After that try this: >> >> java -Xms128m -Xmx128m -cp JavaBridge.war >> >> If it still complains about php-cgi, then as root: >> >> apt-get install php5-cgi >> >> Before you retry check again if the all java processes have terminated. >> >> I dont know if 256 M will be enough for your production environment. >> >> Regards >> David >> >> >> On Thu, Jan 13, 2011 at 1:23 PM, < >> php...@li...> wrote: >> >>> Hi, >>> >>> thx for the help. It's a VPS with 1 GB real memory. I see the problem java >>> does not let me change its max memory with >>> >>> java -Xmx512m (unknown identifier) >>> >>> instead I tried >>> >>> export JAVA_OPTS="-Xms256m -Xmx512m" >>> export CATALINA_OPTS="-Xms256m -Xmx512m" >>> >>> running the testinstallation produced: >>> >>> >>> Starting a simple servlet engine: >>> [/usr/lib/jvm/java-6-openjdk/jre/bin/java, >>> -jar, /opt/tomcat/webapps/ext/JavaBridge.jar, SERVLET_LOCAL:8080] >>> Jan 13 13:15:45 JavaBridge INFO : VM : >>> 1.6.0_0@http://java.sun.com/ >>> Jan 13 13:15:45 JavaBridge INFO : JavaBridge version : 6.2.1 >>> Jan 13 13:15:45 JavaBridge INFO : logFile : >>> Jan 13 13:15:45 JavaBridge INFO : default logLevel : 3 >>> Jan 13 13:15:45 JavaBridge INFO : socket : SERVLET_LOCAL:8080 >>> Jan 13 13:15:45 JavaBridge INFO : java.ext.dirs : >>> /usr/lib/jvm/java-6-openjdk/jre/lib/ext:/usr/java/packages/lib/ext >>> Jan 13 13:15:45 JavaBridge INFO : php.java.bridge.base: /root >>> Jan 13 13:15:45 JavaBridge INFO : thread pool size : 20 >>> Jan 13 13:15:45 JavaBridge INFO : JavaBridgeRunner started on port >>> INET_LOCAL:8080 >>> Invoking php: [php-cgi, -n, -d, allow_url_include=On, >>> /opt/tomcat/webapps/test.php] >>> java.lang.RuntimeException: Could not run PHP ([php-cgi, -n, -d, >>> allow_url_include=On, /opt/tomcat/webapps/test.php]), please check if >>> php-cgi is in the path. >>> at TestInstallation.start(TestInstallation.java:332) >>> at TestInstallation.main(TestInstallation.java:252) >>> Caused by: java.io.IOException: Cannot run program "php-cgi": >>> java.io.IOException: error=12, Cannot allocate memory >>> at java.lang.ProcessBuilder.start(ProcessBuilder.java:474) >>> at java.lang.Runtime.exec(Runtime.java:610) >>> at java.lang.Runtime.exec(Runtime.java:526) >>> at TestInstallation.start(TestInstallation.java:330) >>> ... 1 more >>> Caused by: java.io.IOException: java.io.IOException: error=12, Cannot >>> allocate memory >>> at java.lang.UNIXProcess.<init>(UNIXProcess.java:164) >>> at java.lang.ProcessImpl.start(ProcessImpl.java:81) >>> at java.lang.ProcessBuilder.start(ProcessBuilder.java:467) >>> ... 4 more >>> >>> And then >>> >>> Free -m (821 m free, prior it was already up to 1024m full an leaking) >>> >>> The question is how much real ram should I install to be safe. Whats with >>> the message "please check if php-cgi is in the path" >>> >>> Thx for your help - appreciated >>> >>> -----Original Message----- >>> From: php...@li... >>> [mailto:php...@li...] >>> Sent: Donnerstag, 13. Januar 2011 09:14 >>> To: php...@li... >>> Subject: Re: [Php-java-bridge-users] Installation of JavaBridge causes >>> problems - what am i missing >>> >>> Hello, >>> >>> i had a similar problem in a different context. I guess your problem is >>> not >>> the php-java-bridge. >>> On a virtual host you often have very limited memory available. How much >>> memory did you order for your virtual server? >>> >>> You can use linux commands like >>> free -m >>> to find out how your current memory usage is. >>> >>> Look at your error message. Quite at the start it says: >>> >>> Caused by: java.io.IOException: Cannot run program >>> "/usr/lib/jvm/java-6-openjdk/ >>> jre/bin/java": java.io.IOException: error=12, >>> Cannot allocate memory >>> >>> So find out how much memory you have available and then adjust the start >>> scripts of the php test program and of your tomcat. >>> Look for the java options -Xms and -Xmx >>> Documentation: >>> http://download.oracle.com/javase/6/docs/technotes/tools/solaris/java.html >>> >>> Also dont run too many jvm instances at the same time. I believe the >>> php-java-bridge test programm starts its own jvm, so dont start the test >>> while tomcat is runing. I think your virtual machine might not have enough >>> memory for both instances. >>> >>> Regards, David >>> >>> >>> On Wed, Jan 12, 2011 at 1:55 PM, < >>> php...@li...> wrote: >>> >>> > Please see http://php-java-bridge.sourceforge.net/pjb/installation.php >>> > >>> > With "original software" I mean Java from Oracle and Tomcat from Apache. >>> > The >>> > crap shipped with Debian OS doesn't work. >>> > >>> > >>> >>> ---------------------------------------------------------------------------- >>> -- >>> > Protect Your Site and Customers from Malware Attacks >>> > Learn about various malware tactics and how to avoid them. Understand >>> > malware threats, the impact they can have on your business, and how you >>> > can protect your company and customers by using code signing. >>> > http://p.sf.net/sfu/oracle-sfdevnl >>> > _______________________________________________ >>> > php-java-bridge-users mailing list >>> > php...@li... >>> > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >>> > >>> >>> ---------------------------------------------------------------------------- >>> -- >>> Protect Your Site and Customers from Malware Attacks >>> Learn about various malware tactics and how to avoid them. Understand >>> malware threats, the impact they can have on your business, and how you >>> can protect your company and customers by using code signing. >>> http://p.sf.net/sfu/oracle-sfdevnl >>> _______________________________________________ >>> php-java-bridge-users mailing list >>> php...@li... >>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Protect Your Site and Customers from Malware Attacks >>> Learn about various malware tactics and how to avoid them. Understand >>> malware threats, the impact they can have on your business, and how you >>> can protect your company and customers by using code signing. >>> http://p.sf.net/sfu/oracle-sfdevnl >>> _______________________________________________ >>> php-java-bridge-users mailing list >>> php...@li... >>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >>> >> >> > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2011-01-13 14:40:42
|
sorry, of course that command does not use 256 but only 128 MB. I use the same values for Xms and Xmx because it should be faster then continuously allocating more memory. On Thu, Jan 13, 2011 at 3:33 PM, Zagoti Bagon <za...@gm...> wrote: > Ok, i did some testing for you in a 1 GB virtual machine (virtual box - > ubuntu). > > The php-java-bridge starts a local servlet container. > But it doesnt stop it. So you should first check that > all java processes have terminated. > > ps -ef | grep java > > if there still is a java process, kill it. > > kill <pid> > (The pid is in the second column of ps -ef) > if this does not help: > kill -9 <pid> > > After that try this: > > java -Xms128m -Xmx128m -cp JavaBridge.war > > If it still complains about php-cgi, then as root: > > apt-get install php5-cgi > > Before you retry check again if the all java processes have terminated. > > I dont know if 256 M will be enough for your production environment. > > Regards > David > > > On Thu, Jan 13, 2011 at 1:23 PM, < > php...@li...> wrote: > >> Hi, >> >> thx for the help. It's a VPS with 1 GB real memory. I see the problem java >> does not let me change its max memory with >> >> java -Xmx512m (unknown identifier) >> >> instead I tried >> >> export JAVA_OPTS="-Xms256m -Xmx512m" >> export CATALINA_OPTS="-Xms256m -Xmx512m" >> >> running the testinstallation produced: >> >> >> Starting a simple servlet engine: >> [/usr/lib/jvm/java-6-openjdk/jre/bin/java, >> -jar, /opt/tomcat/webapps/ext/JavaBridge.jar, SERVLET_LOCAL:8080] >> Jan 13 13:15:45 JavaBridge INFO : VM : >> 1.6.0_0@http://java.sun.com/ >> Jan 13 13:15:45 JavaBridge INFO : JavaBridge version : 6.2.1 >> Jan 13 13:15:45 JavaBridge INFO : logFile : >> Jan 13 13:15:45 JavaBridge INFO : default logLevel : 3 >> Jan 13 13:15:45 JavaBridge INFO : socket : SERVLET_LOCAL:8080 >> Jan 13 13:15:45 JavaBridge INFO : java.ext.dirs : >> /usr/lib/jvm/java-6-openjdk/jre/lib/ext:/usr/java/packages/lib/ext >> Jan 13 13:15:45 JavaBridge INFO : php.java.bridge.base: /root >> Jan 13 13:15:45 JavaBridge INFO : thread pool size : 20 >> Jan 13 13:15:45 JavaBridge INFO : JavaBridgeRunner started on port >> INET_LOCAL:8080 >> Invoking php: [php-cgi, -n, -d, allow_url_include=On, >> /opt/tomcat/webapps/test.php] >> java.lang.RuntimeException: Could not run PHP ([php-cgi, -n, -d, >> allow_url_include=On, /opt/tomcat/webapps/test.php]), please check if >> php-cgi is in the path. >> at TestInstallation.start(TestInstallation.java:332) >> at TestInstallation.main(TestInstallation.java:252) >> Caused by: java.io.IOException: Cannot run program "php-cgi": >> java.io.IOException: error=12, Cannot allocate memory >> at java.lang.ProcessBuilder.start(ProcessBuilder.java:474) >> at java.lang.Runtime.exec(Runtime.java:610) >> at java.lang.Runtime.exec(Runtime.java:526) >> at TestInstallation.start(TestInstallation.java:330) >> ... 1 more >> Caused by: java.io.IOException: java.io.IOException: error=12, Cannot >> allocate memory >> at java.lang.UNIXProcess.<init>(UNIXProcess.java:164) >> at java.lang.ProcessImpl.start(ProcessImpl.java:81) >> at java.lang.ProcessBuilder.start(ProcessBuilder.java:467) >> ... 4 more >> >> And then >> >> Free -m (821 m free, prior it was already up to 1024m full an leaking) >> >> The question is how much real ram should I install to be safe. Whats with >> the message "please check if php-cgi is in the path" >> >> Thx for your help - appreciated >> >> -----Original Message----- >> From: php...@li... >> [mailto:php...@li...] >> Sent: Donnerstag, 13. Januar 2011 09:14 >> To: php...@li... >> Subject: Re: [Php-java-bridge-users] Installation of JavaBridge causes >> problems - what am i missing >> >> Hello, >> >> i had a similar problem in a different context. I guess your problem is >> not >> the php-java-bridge. >> On a virtual host you often have very limited memory available. How much >> memory did you order for your virtual server? >> >> You can use linux commands like >> free -m >> to find out how your current memory usage is. >> >> Look at your error message. Quite at the start it says: >> >> Caused by: java.io.IOException: Cannot run program >> "/usr/lib/jvm/java-6-openjdk/ >> jre/bin/java": java.io.IOException: error=12, >> Cannot allocate memory >> >> So find out how much memory you have available and then adjust the start >> scripts of the php test program and of your tomcat. >> Look for the java options -Xms and -Xmx >> Documentation: >> http://download.oracle.com/javase/6/docs/technotes/tools/solaris/java.html >> >> Also dont run too many jvm instances at the same time. I believe the >> php-java-bridge test programm starts its own jvm, so dont start the test >> while tomcat is runing. I think your virtual machine might not have enough >> memory for both instances. >> >> Regards, David >> >> >> On Wed, Jan 12, 2011 at 1:55 PM, < >> php...@li...> wrote: >> >> > Please see http://php-java-bridge.sourceforge.net/pjb/installation.php >> > >> > With "original software" I mean Java from Oracle and Tomcat from Apache. >> > The >> > crap shipped with Debian OS doesn't work. >> > >> > >> >> ---------------------------------------------------------------------------- >> -- >> > Protect Your Site and Customers from Malware Attacks >> > Learn about various malware tactics and how to avoid them. Understand >> > malware threats, the impact they can have on your business, and how you >> > can protect your company and customers by using code signing. >> > http://p.sf.net/sfu/oracle-sfdevnl >> > _______________________________________________ >> > php-java-bridge-users mailing list >> > php...@li... >> > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >> > >> >> ---------------------------------------------------------------------------- >> -- >> Protect Your Site and Customers from Malware Attacks >> Learn about various malware tactics and how to avoid them. Understand >> malware threats, the impact they can have on your business, and how you >> can protect your company and customers by using code signing. >> http://p.sf.net/sfu/oracle-sfdevnl >> _______________________________________________ >> php-java-bridge-users mailing list >> php...@li... >> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >> >> >> >> ------------------------------------------------------------------------------ >> Protect Your Site and Customers from Malware Attacks >> Learn about various malware tactics and how to avoid them. Understand >> malware threats, the impact they can have on your business, and how you >> can protect your company and customers by using code signing. >> http://p.sf.net/sfu/oracle-sfdevnl >> _______________________________________________ >> php-java-bridge-users mailing list >> php...@li... >> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >> > > |
From: <php...@li...> - 2011-01-13 14:33:55
|
Ok, i did some testing for you in a 1 GB virtual machine (virtual box - ubuntu). The php-java-bridge starts a local servlet container. But it doesnt stop it. So you should first check that all java processes have terminated. ps -ef | grep java if there still is a java process, kill it. kill <pid> (The pid is in the second column of ps -ef) if this does not help: kill -9 <pid> After that try this: java -Xms128m -Xmx128m -cp JavaBridge.war If it still complains about php-cgi, then as root: apt-get install php5-cgi Before you retry check again if the all java processes have terminated. I dont know if 256 M will be enough for your production environment. Regards David On Thu, Jan 13, 2011 at 1:23 PM, < php...@li...> wrote: > Hi, > > thx for the help. It's a VPS with 1 GB real memory. I see the problem java > does not let me change its max memory with > > java -Xmx512m (unknown identifier) > > instead I tried > > export JAVA_OPTS="-Xms256m -Xmx512m" > export CATALINA_OPTS="-Xms256m -Xmx512m" > > running the testinstallation produced: > > > Starting a simple servlet engine: > [/usr/lib/jvm/java-6-openjdk/jre/bin/java, > -jar, /opt/tomcat/webapps/ext/JavaBridge.jar, SERVLET_LOCAL:8080] > Jan 13 13:15:45 JavaBridge INFO : VM : > 1.6.0_0@http://java.sun.com/ > Jan 13 13:15:45 JavaBridge INFO : JavaBridge version : 6.2.1 > Jan 13 13:15:45 JavaBridge INFO : logFile : > Jan 13 13:15:45 JavaBridge INFO : default logLevel : 3 > Jan 13 13:15:45 JavaBridge INFO : socket : SERVLET_LOCAL:8080 > Jan 13 13:15:45 JavaBridge INFO : java.ext.dirs : > /usr/lib/jvm/java-6-openjdk/jre/lib/ext:/usr/java/packages/lib/ext > Jan 13 13:15:45 JavaBridge INFO : php.java.bridge.base: /root > Jan 13 13:15:45 JavaBridge INFO : thread pool size : 20 > Jan 13 13:15:45 JavaBridge INFO : JavaBridgeRunner started on port > INET_LOCAL:8080 > Invoking php: [php-cgi, -n, -d, allow_url_include=On, > /opt/tomcat/webapps/test.php] > java.lang.RuntimeException: Could not run PHP ([php-cgi, -n, -d, > allow_url_include=On, /opt/tomcat/webapps/test.php]), please check if > php-cgi is in the path. > at TestInstallation.start(TestInstallation.java:332) > at TestInstallation.main(TestInstallation.java:252) > Caused by: java.io.IOException: Cannot run program "php-cgi": > java.io.IOException: error=12, Cannot allocate memory > at java.lang.ProcessBuilder.start(ProcessBuilder.java:474) > at java.lang.Runtime.exec(Runtime.java:610) > at java.lang.Runtime.exec(Runtime.java:526) > at TestInstallation.start(TestInstallation.java:330) > ... 1 more > Caused by: java.io.IOException: java.io.IOException: error=12, Cannot > allocate memory > at java.lang.UNIXProcess.<init>(UNIXProcess.java:164) > at java.lang.ProcessImpl.start(ProcessImpl.java:81) > at java.lang.ProcessBuilder.start(ProcessBuilder.java:467) > ... 4 more > > And then > > Free -m (821 m free, prior it was already up to 1024m full an leaking) > > The question is how much real ram should I install to be safe. Whats with > the message "please check if php-cgi is in the path" > > Thx for your help - appreciated > > -----Original Message----- > From: php...@li... > [mailto:php...@li...] > Sent: Donnerstag, 13. Januar 2011 09:14 > To: php...@li... > Subject: Re: [Php-java-bridge-users] Installation of JavaBridge causes > problems - what am i missing > > Hello, > > i had a similar problem in a different context. I guess your problem is not > the php-java-bridge. > On a virtual host you often have very limited memory available. How much > memory did you order for your virtual server? > > You can use linux commands like > free -m > to find out how your current memory usage is. > > Look at your error message. Quite at the start it says: > > Caused by: java.io.IOException: Cannot run program > "/usr/lib/jvm/java-6-openjdk/ > jre/bin/java": java.io.IOException: error=12, > Cannot allocate memory > > So find out how much memory you have available and then adjust the start > scripts of the php test program and of your tomcat. > Look for the java options -Xms and -Xmx > Documentation: > http://download.oracle.com/javase/6/docs/technotes/tools/solaris/java.html > > Also dont run too many jvm instances at the same time. I believe the > php-java-bridge test programm starts its own jvm, so dont start the test > while tomcat is runing. I think your virtual machine might not have enough > memory for both instances. > > Regards, David > > > On Wed, Jan 12, 2011 at 1:55 PM, < > php...@li...> wrote: > > > Please see http://php-java-bridge.sourceforge.net/pjb/installation.php > > > > With "original software" I mean Java from Oracle and Tomcat from Apache. > > The > > crap shipped with Debian OS doesn't work. > > > > > > ---------------------------------------------------------------------------- > -- > > Protect Your Site and Customers from Malware Attacks > > Learn about various malware tactics and how to avoid them. Understand > > malware threats, the impact they can have on your business, and how you > > can protect your company and customers by using code signing. > > http://p.sf.net/sfu/oracle-sfdevnl > > _______________________________________________ > > php-java-bridge-users mailing list > > php...@li... > > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > > ---------------------------------------------------------------------------- > -- > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: <php...@li...> - 2011-01-13 08:14:36
|
Hello, i had a similar problem in a different context. I guess your problem is not the php-java-bridge. On a virtual host you often have very limited memory available. How much memory did you order for your virtual server? You can use linux commands like free -m to find out how your current memory usage is. Look at your error message. Quite at the start it says: Caused by: java.io.IOException: Cannot run program "/usr/lib/jvm/java-6-openjdk/ jre/bin/java": java.io.IOException: error=12, Cannot allocate memory So find out how much memory you have available and then adjust the start scripts of the php test program and of your tomcat. Look for the java options -Xms and -Xmx Documentation: http://download.oracle.com/javase/6/docs/technotes/tools/solaris/java.html Also dont run too many jvm instances at the same time. I believe the php-java-bridge test programm starts its own jvm, so dont start the test while tomcat is runing. I think your virtual machine might not have enough memory for both instances. Regards, David On Wed, Jan 12, 2011 at 1:55 PM, < php...@li...> wrote: > Please see http://php-java-bridge.sourceforge.net/pjb/installation.php > > With "original software" I mean Java from Oracle and Tomcat from Apache. > The > crap shipped with Debian OS doesn't work. > > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: <php...@li...> - 2011-01-12 12:56:00
|
Please see http://php-java-bridge.sourceforge.net/pjb/installation.php With "original software" I mean Java from Oracle and Tomcat from Apache. The crap shipped with Debian OS doesn't work. |
From: <php...@li...> - 2011-01-12 06:13:14
|
Your server cannot run java and your tomcat cannot run java web apps. Please download and install the ORIGINAL versions of these programs. |
From: <php...@li...> - 2011-01-01 09:36:18
|
Hi, each application server has its own deployment procedure. More or less a copy operation. Regards, Jost Bökemeier |
From: <php...@li...> - 2011-01-01 09:32:28
|
Hi, please have a look at the jsr223 examples in JavaBridge.war (documentation download). EngineFactory is gone. You can decorate a standard script engine context. Regards, Jost Bökemeier |
From: <php...@li...> - 2010-12-31 22:21:18
|
Hello, Checking out this product for getting started with some PHP development. The installation for Web applications talk specifically about installation/configuration procedures on Tomcat 6. Can a similar install be performed on a Glassfish (2.1) server as well? If so, are there different instructions for doing this or is it left up to me to transpose the configuration instructions? thanks, and Happy New Year! K2 |
From: <php...@li...> - 2010-12-31 20:02:13
|
Hello, i would like to know how to call php functions from java. I found a paragraph in the faq to this question. It says i should use the class: php.java.script.servlet.EngineFactory But i cannot find this class. Maybe the faq is outdated? However, can anybody give me a hint, please? Thanks alot! |