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
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1
|
2
(5) |
3
|
4
|
5
(4) |
6
(2) |
7
|
8
|
9
|
10
(1) |
11
(7) |
12
(2) |
13
|
14
(1) |
15
(3) |
16
(6) |
17
(2) |
18
(2) |
19
|
20
|
21
|
22
|
23
(1) |
24
|
25
|
26
|
27
|
28
|
29
|
30
|
31
|
|
|
|
|
From: <php...@li...> - 2012-07-23 08:53:27
|
Moin, I do in a PHP a $hashtable = array(); $check = new Java('package.Clazz', $hashtable); $response = java_values($check->check()); For performance reasons, we decided for hash tables an not to use getter and setter. It seem to me that same request are queued: I put a breakpoint in the Clazz and stop the first request. If I run a second one in PHP it arrives only when I release the first. Is it possible to deactivate this behavior? kind regards Thomas |
From: <php...@li...> - 2012-07-18 08:23:32
|
AC, your java server (tomcat, etc.) is a permanent process, where as your php scripts are evaluated on every request. If you want to see changes to your java code, you'll have to restart (redeploy) the service that holds your java classes (tomcat, pjb-standalone) because these processes hold the bytecode contained in your .class files in memory and thus won't notice/care that the file went away. On Wed, Jul 18, 2012 at 10:11 AM, < php...@li...> wrote: > [PHP code] > $java = new java_class("my.project.Experiment"); > $myResult = $java->run(); > echo $myResult; > > [JAVA code] > package my.project; > > public class Experiment { > public static String run(String x){ > return "results: " +x; > } > } > > Until here everything works fine. > > Then I create another class, Experiment2, exactly as the first one but the > method is now called run2. > > I delete the Experiment class (NB: if I run "find -name Experiment.class" > nothing is found). > > I then change the PHP code to use Experiment2, and I get an "error 500". > This is already a problem since the class is there and is very basic. > But then, if I change the PHP code and try to use the Experiment class, it > works again! > > That sounds as impossible to me because Experiment2.class is for some > reason not found, and also because Experiment.class is nowhere to be found > in the system. > > The only solution I could find is that PHP is storing the information on > the java classes somewhere, but I couldn't find where. > I also tried to delete Firefox's history, but the results are the same. > > Any help would be highly appreciated. > Thanks in advance, > AC > > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > -- Dominik Dorn http://dominikdorn.com http://twitter.com/domdorn Skripten, Mitschriften, Lernunterlagen, etc. findest Du auf http://www.studyguru.eu ! |
From: <php...@li...> - 2012-07-18 08:11:55
|
[PHP code] $java = new java_class("my.project.Experiment"); $myResult = $java->run(); echo $myResult; [JAVA code] package my.project; public class Experiment { public static String run(String x){ return "results: " +x; } } Until here everything works fine. Then I create another class, Experiment2, exactly as the first one but the method is now called run2. I delete the Experiment class (NB: if I run "find -name Experiment.class" nothing is found). I then change the PHP code to use Experiment2, and I get an "error 500". This is already a problem since the class is there and is very basic. But then, if I change the PHP code and try to use the Experiment class, it works again! That sounds as impossible to me because Experiment2.class is for some reason not found, and also because Experiment.class is nowhere to be found in the system. The only solution I could find is that PHP is storing the information on the java classes somewhere, but I couldn't find where. I also tried to delete Firefox's history, but the results are the same. Any help would be highly appreciated. Thanks in advance, AC |
From: <php...@li...> - 2012-07-17 17:36:47
|
Hi, I'm using this in my PHP file: $javaClass = new java_class("my.project.MyClass"); Then I delete the MyClass.class file, and the program still runs. How is this possible? Are class files stored somewhere? Thanks AC |
From: <php...@li...> - 2012-07-17 09:25:32
|
which kind of permissions should I set to be able to use the class? or do you mean permission for browsing the folder with "ls"? thanks AC --- Lun 16/7/12, php...@li... <php...@li...> ha scritto: > Da: php...@li... <php...@li...> > Oggetto: Re: [Php-java-bridge-users] beginner's info > A: php...@li... > Data: Lunedì 16 luglio 2012, 19:58 > Declare the procedure to throw an > error and you'll see it, including the > stack trace. Please see FAQ for details. > > Most likely a permission denied. > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's > security and > threat landscape has changed and how IT managers can > respond. Discussions > will include endpoint security, mobile security and the > latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: <php...@li...> - 2012-07-16 20:09:38
|
Well, i allready did that and in the JSP page every JNDI works, no problems there. Only in the php side i could't get it to work without a custom JNDI. -----Original Message----- From: php...@li... [mailto:php...@li...] Sent: Monday, July 16, 2012 10:05 PM To: php...@li... Subject: Re: [Php-java-bridge-users] Glassfish JNDI Issue Can you create a simple JSP in the same app and call your external name from there? If that works, you've found a bug. If not, well, try the internal name... Code executed from the bridge runs in a different thread context. But this should be an implementation detail. ---------------------------------------------------------------------------- -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2012-07-16 20:04:41
|
Can you create a simple JSP in the same app and call your external name from there? If that works, you've found a bug. If not, well, try the internal name... Code executed from the bridge runs in a different thread context. But this should be an implementation detail. |
From: <php...@li...> - 2012-07-16 19:58:14
|
Declare the procedure to throw an error and you'll see it, including the stack trace. Please see FAQ for details. Most likely a permission denied. |
From: <php...@li...> - 2012-07-16 16:25:44
|
Hi all, For the below PHP case (was noted in jQuery test suite), the <php> was executed in other servers, but with JavaBridge, it is not executed and the source code is shown as-as to the web client. Yours, Ahmed /* <?php // if php is available, close the comment so PHP can echo the appropriate JS echo "*" . "/"; echo "PHP was executed"; ?> */ |
From: <php...@li...> - 2012-07-16 15:08:35
|
I am out of the office until 07/20/2012. Note: This is an automated response to your message "[Php-java-bridge-users] beginner's info" sent on 07/16/2012 8:20:42 AM. This is the only notification you will receive while this person is away. |
From: <php...@li...> - 2012-07-16 13:20:54
|
hello, I'd need some help in understanding why my simple code is not working. I have a java class that computes "ls -l -a > /home/ale/output" and I want to used it from PHP. This is it: <?php ... $java = new java_class('com.myProject.HelloWorld'); $inputParametersForJava=array("-l", "-a"); $java->run("ls",$inputParametersForJava,"/home/ale/output"); ... ?> The signature of the java method I'm calling is: public static String run(String jobCommand, String[] inputParameters, String outputFile) {...} If I add a "main" method in the class and call "run" from there (with the same parameters as above), everything works (i.e. I get the output of "ls -l -a" in the file "/home/ale/output"). But when I use php/java bridge, I get no error in PHP and no output file is created. I know that: - $java = new java_class('com.myProject.HelloWorld'); works because I do not have an "error 500". - $inputParametersForJava=array("-l", "-a"); works because it's a simple arry declaration. - The problem is in the calling of "run", but where? and why? Thanks all for your help AC |
From: <php...@li...> - 2012-07-15 12:39:39
|
> You forgot the new keyword. > > java(...) returns the class([c...[) new java(...) an instance of that class ([o....]). Exactly! Thanks a lot! Now it works as it should. Sincerely, Igor Kolesnik |
From: <php...@li...> - 2012-07-15 10:49:24
|
Hi again, Sorry for bothering, I re-install everything and it works. Ahmed ________________________________ From: Ahmed Ashour <asa...@ya...> To: "php...@li..." <php...@li...> Sent: Sunday, July 15, 2012 12:21 PM Subject: Have .php files in subfolders Hi all, I am new here. Putting php file in JavaBridge root folder will work, but if is put in a newly created sub-folder, it gives 404. How to allow subfolders to have .php files. Thanks, Ahmed |
From: <php...@li...> - 2012-07-15 09:21:17
|
Hi all, I am new here. Putting php file in JavaBridge root folder will work, but if is put in a newly created sub-folder, it gives 404. How to allow subfolders to have .php files. Thanks, Ahmed |
From: <php...@li...> - 2012-07-14 08:45:15
|
You forgot the new keyword. java(...) returns the class([c...[) new java(...) an instance of that class ([o....]). |
From: <php...@li...> - 2012-07-12 09:26:09
|
Hi It states that there is an mismatch between your input parameters and the expected parameters in the method. Why are you creating the parameters (by the way it's new java...) in PHP. Why not create a Java side wrapper where you instantiate the input/outputstream? Something like callProcessHtml(String filename) and then do the call to ProcessHtml from there? Hermod -----Opprinnelig melding----- Fra: php...@li... [mailto:php...@li...] Sendt: 12. juli 2012 10:27 Til: php...@li... Emne: [Php-java-bridge-users] IllegalArgumentException problem Hi; I set up Tomcat and JavaBridge.war as described in the documentation. I have JavaBridge application under webapps directory. All examples work fine. Then I copied my PHP scripts into JavaBridge and custom .jar files into JavaBridge/WEB-INF/lib. I get the following exceptions whenever I try to create an instance of a Java class. [[o:Exception]:"java.lang.Exception: CreateInstance failed: new net.windward.xmlreport.ProcessHtml((o:InputStream)[c:FileInputStream], (o:OutputStream)[c:ByteArrayOutputStream]). Cause: java.lang.IllegalArgumentException: argument type mismatch VM: 1.7.0_05@http://java.oracle.com/" at: #-9 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) #-8 sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) #-7 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) #-6 java.lang.reflect.Constructor.newInstance(Unknown Source) #-5 php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:487) #-4 php.java.bridge.Request.handleRequest(Request.java:458) #-3 php.java.bridge.Request.handleRequests(Request.java:500) #-2 php.java.bridge.http.ContextRunner.run(ContextRunner.java:145) #-1 php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) #0 C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\webapps\JavaBridge\java\Java.inc(232): java_ThrowExceptionProxyFactory->getProxy(3, 'java.io.ByteArr...', 'T', false) #1 C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\webapps\JavaBridge\java\Java.inc(360): java_Arg->getResult(false) #2 C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\webapps\JavaBridge\java\Java.inc(363): java_Client->getWrappedResult(false) #3 C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\webapps\JavaBridge\java\Java.inc(535): java_Client->getInternalResult() #4 C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\webapps\JavaBridge\java\Java.inc(1929): java_Client->createObject('net.windward.xm...', Array) #5 C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\webapps\JavaBridge\sample\classes\ProcessHtml.php(41): Java->Java('net.windward.xm...', Object(JavaClass), Object(JavaClass)) Java->#6 C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\webapps\JavaBridge\sample\runreport.php(34): ProcessHtml::CreateWithTemplateReport(Object(JavaClass), Object(JavaClass)) #7 {main}] Could someone help me to resolve this issue? I can't figure out why the exception is thrown. An instance of the ProcessHtml class created like this new Java("net.windward.xmlreport.ProcessHtml", $template, $report); the constructor of net.windward.xmlreport.ProcessHtml class accepts two parameters: java.io.InputStream and java.io.OutputStream. $template and $report are created like this $template = java("java.io.FileInputStream", "/path/to/a/file"); $report = java("java.io.ByteArrayOutputStream"); Sincerely, Igor Kolesnik ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This email with attachments is solely for the use of the individual or entity to whom it is addressed. Please also be aware that the DNB Group cannot accept any payment orders or other legally binding correspondence with customers as a part of an email. This email message has been virus checked by the anti virus programs used in the DNB Group. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
From: <php...@li...> - 2012-07-12 08:27:38
|
Hi; I set up Tomcat and JavaBridge.war as described in the documentation. I have JavaBridge application under webapps directory. All examples work fine. Then I copied my PHP scripts into JavaBridge and custom .jar files into JavaBridge/WEB-INF/lib. I get the following exceptions whenever I try to create an instance of a Java class. [[o:Exception]:"java.lang.Exception: CreateInstance failed: new net.windward.xmlreport.ProcessHtml((o:InputStream)[c:FileInputStream], (o:OutputStream)[c:ByteArrayOutputStream]). Cause: java.lang.IllegalArgumentException: argument type mismatch VM: 1.7.0_05@http://java.oracle.com/" at: #-9 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) #-8 sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) #-7 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) #-6 java.lang.reflect.Constructor.newInstance(Unknown Source) #-5 php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:487) #-4 php.java.bridge.Request.handleRequest(Request.java:458) #-3 php.java.bridge.Request.handleRequests(Request.java:500) #-2 php.java.bridge.http.ContextRunner.run(ContextRunner.java:145) #-1 php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) #0 C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\webapps\JavaBridge\java\Java.inc(232): java_ThrowExceptionProxyFactory->getProxy(3, 'java.io.ByteArr...', 'T', false) #1 C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\webapps\JavaBridge\java\Java.inc(360): java_Arg->getResult(false) #2 C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\webapps\JavaBridge\java\Java.inc(363): java_Client->getWrappedResult(false) #3 C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\webapps\JavaBridge\java\Java.inc(535): java_Client->getInternalResult() #4 C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\webapps\JavaBridge\java\Java.inc(1929): java_Client->createObject('net.windward.xm...', Array) #5 C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\webapps\JavaBridge\sample\classes\ProcessHtml.php(41): Java->Java('net.windward.xm...', Object(JavaClass), Object(JavaClass)) #6 C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\webapps\JavaBridge\sample\runreport.php(34): ProcessHtml::CreateWithTemplateReport(Object(JavaClass), Object(JavaClass)) #7 {main}] Could someone help me to resolve this issue? I can't figure out why the exception is thrown. An instance of the ProcessHtml class created like this new Java("net.windward.xmlreport.ProcessHtml", $template, $report); the constructor of net.windward.xmlreport.ProcessHtml class accepts two parameters: java.io.InputStream and java.io.OutputStream. $template and $report are created like this $template = java("java.io.FileInputStream", "/path/to/a/file"); $report = java("java.io.ByteArrayOutputStream"); Sincerely, Igor Kolesnik |
From: <php...@li...> - 2012-07-11 23:06:56
|
Hello again :), I finnaly solved the issue, what worked was a custom jndi name, like this: @Stateless(name="PHPBackend") @EJB(name="java:global/ImplementedPHPBackend", beanInterface=IPHPBackend.class) public class PHPBackend implements IPHPBackend { But i would really love if anyone has a clue on why it didn't worked on my standard approach, as it is not very nice to be forced to define a name for each class. Cheers, Adrian -----Original Message----- From: php...@li... [mailto:php...@li...] Sent: Thursday, July 12, 2012 12:53 AM To: php...@li... Subject: [Php-java-bridge-users] Glassfish JNDI Issue Hello, I am trying to use the bridge to connect to an EJB module, which exposes a standard bean interface, but i have difficulties using the context lookup in the php to get hold on my implemented service. I have an remote interface IPHPBackend, which is implemented by one service class (stateless bean) I can clearly see the enterprise bean in netbeans, and in the glassfish Modules and components list after deployement, as PHPBackend. When deploying glassfish tells me: NFO: EJB5181:Portable JNDI names for EJB PHPBackend: [java:global/FspBackendEE-ejb/PHPBackend, java:global/FspBackendEE-ejb/PHPBackend!fsp.service.IPHPBackend] INFO: EJB5182:Glassfish-specific (Non-portable) JNDI names for EJB PHPBackend: [fsp.service.IPHPBackend#fsp.service.IPHPBackend, fsp.service.IPHPBackend] I have also deployed the java bridge war, so now i have two applications deployed, my ejb module + the bridge. Now, i have written a short test application, as you can see i tried a lot of options, but i allways get something like: Array ( [javax.naming.Context.PROVIDER_URL] => iiop://localhost:3700 [javax.naming.Context.INITIAL_CONTEXT_FACTORY] => com.sun.enterprise.naming.SerialInitContextFactory ) Exception: [[o:NamingException]:"javax.naming.NamingException: Lookup failed for 'java:global/FspBackendEE-ejb/fsp.service.PHPBackend' in SerialContext[myEnv={javax.naming.Context.INITIAL_CONTEXT_FACTORY=com.sun.en terprise.naming.SerialInitContextFactory, java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContext Factory, javax.naming.Context.PROVIDER_URL=iiop://localhost:3700, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFa ctoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NameNotFoundException: fsp.service.PHPBackend not found]" at: #-13 com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:518) #-12 com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:455) #-11 javax.naming.InitialContext.lookup(InitialContext.java:392) #-10 javax.naming.InitialContext.lookup(InitialContext.java:392) #-9 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) #-8 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) #-7 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) #-6 java.lang.reflect.Method.invoke(Method.java:597) #-5 php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1044) #-4 php.java.bridge.Request.handleRequest(Request.java:417) #-3 php.java.bridge.Request.handleRequests(Request.java:500) #-2 php.java.bridge.http.ContextRunner.run(ContextRunner.java:145) #-1 php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) #0 http://localhost:8080/JavaBridge/java/Java.inc(232): java_ExceptionProxyFactory->getProxy(3, NULL, 'T', true) #1 http://localhost:8080/JavaBridge/java/Java.inc(360): java_Arg->getResult(true) #2 http://localhost:8080/JavaBridge/java/Java.inc(366): java_Client->getWrappedResult(true) #3 http://localhost:8080/JavaBridge/java/Java.inc(560): java_Client->getResult() #4 http://localhost:8080/JavaBridge/java/Java.inc(1752): java_Client->invokeMethod(2, 'getCause', Array) #5 http://localhost:8080/JavaBridge/java/Java.inc(2062): java_JavaProxy->__call('getCause', Array) #6 C:\work\projects\temp\test2.php(31): java_exception->__call('getCause', Array) #7 C:\work\projects\temp\test2.php(31): java_InternalException->getCause() #8 {main}] in file: http://localhost:8080/JavaBridge/java/Java.inc line:195 My test code would be: <?php define("JAVA_PREFER_VALUES", true); $HOST="localhost"; require_once("http://localhost:8080/JavaBridge/java/Java.inc"); try { $config = array("java.naming.factory.initial"=> "com.sun.jndi.cosnaming.CNCtxFactory", "java.naming.provider.url"=> "iiop://$HOST:3700"); $providerUrl = "iiop://$HOST:3700"; $namingFactory = "com.sun.enterprise.naming.SerialInitContextFactory"; $envt = array( "javax.naming.Context.PROVIDER_URL" => $providerUrl, "javax.naming.Context.INITIAL_CONTEXT_FACTORY" => $namingFactory,); $initial = new javax_naming_InitialContext($envt); $phpBackend = $initial->lookup('java:global/FspBackendEE-ejb/fsp.service.PHPBackend'); //$phpBackend = new java("fsp.service.LPHPBackend"); echo $phpBackend->getAvailableFunds(42); assert (is_null(java_last_exception_get())); } catch(JavaException $ex) { $cause = $ex->getCause(); echo "Exception: $cause <br>\nin file: {$ex->getFile()}<br>\nline:{$ex->getLine()}\n"; } >From JSP everything works, i can lookup my service easly. Thanks for looking anyway, it's a long first post, but i looked everywere on the net and i can't find a soluion. Thanks! Adrian ---------------------------------------------------------------------------- -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2012-07-11 22:53:04
|
Hello, I am trying to use the bridge to connect to an EJB module, which exposes a standard bean interface, but i have difficulties using the context lookup in the php to get hold on my implemented service. I have an remote interface IPHPBackend, which is implemented by one service class (stateless bean) I can clearly see the enterprise bean in netbeans, and in the glassfish Modules and components list after deployement, as PHPBackend. When deploying glassfish tells me: NFO: EJB5181:Portable JNDI names for EJB PHPBackend: [java:global/FspBackendEE-ejb/PHPBackend, java:global/FspBackendEE-ejb/PHPBackend!fsp.service.IPHPBackend] INFO: EJB5182:Glassfish-specific (Non-portable) JNDI names for EJB PHPBackend: [fsp.service.IPHPBackend#fsp.service.IPHPBackend, fsp.service.IPHPBackend] I have also deployed the java bridge war, so now i have two applications deployed, my ejb module + the bridge. Now, i have written a short test application, as you can see i tried a lot of options, but i allways get something like: Array ( [javax.naming.Context.PROVIDER_URL] => iiop://localhost:3700 [javax.naming.Context.INITIAL_CONTEXT_FACTORY] => com.sun.enterprise.naming.SerialInitContextFactory ) Exception: [[o:NamingException]:"javax.naming.NamingException: Lookup failed for 'java:global/FspBackendEE-ejb/fsp.service.PHPBackend' in SerialContext[myEnv={javax.naming.Context.INITIAL_CONTEXT_FACTORY=com.sun.en terprise.naming.SerialInitContextFactory, java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContext Factory, javax.naming.Context.PROVIDER_URL=iiop://localhost:3700, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFa ctoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NameNotFoundException: fsp.service.PHPBackend not found]" at: #-13 com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:518) #-12 com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:455) #-11 javax.naming.InitialContext.lookup(InitialContext.java:392) #-10 javax.naming.InitialContext.lookup(InitialContext.java:392) #-9 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) #-8 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) #-7 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) #-6 java.lang.reflect.Method.invoke(Method.java:597) #-5 php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1044) #-4 php.java.bridge.Request.handleRequest(Request.java:417) #-3 php.java.bridge.Request.handleRequests(Request.java:500) #-2 php.java.bridge.http.ContextRunner.run(ContextRunner.java:145) #-1 php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) #0 http://localhost:8080/JavaBridge/java/Java.inc(232): java_ExceptionProxyFactory->getProxy(3, NULL, 'T', true) #1 http://localhost:8080/JavaBridge/java/Java.inc(360): java_Arg->getResult(true) #2 http://localhost:8080/JavaBridge/java/Java.inc(366): java_Client->getWrappedResult(true) #3 http://localhost:8080/JavaBridge/java/Java.inc(560): java_Client->getResult() #4 http://localhost:8080/JavaBridge/java/Java.inc(1752): java_Client->invokeMethod(2, 'getCause', Array) #5 http://localhost:8080/JavaBridge/java/Java.inc(2062): java_JavaProxy->__call('getCause', Array) #6 C:\work\projects\temp\test2.php(31): java_exception->__call('getCause', Array) #7 C:\work\projects\temp\test2.php(31): java_InternalException->getCause() #8 {main}] in file: http://localhost:8080/JavaBridge/java/Java.inc line:195 My test code would be: <?php define("JAVA_PREFER_VALUES", true); $HOST="localhost"; require_once("http://localhost:8080/JavaBridge/java/Java.inc"); try { $config = array("java.naming.factory.initial"=> "com.sun.jndi.cosnaming.CNCtxFactory", "java.naming.provider.url"=> "iiop://$HOST:3700"); $providerUrl = "iiop://$HOST:3700"; $namingFactory = "com.sun.enterprise.naming.SerialInitContextFactory"; $envt = array( "javax.naming.Context.PROVIDER_URL" => $providerUrl, "javax.naming.Context.INITIAL_CONTEXT_FACTORY" => $namingFactory,); $initial = new javax_naming_InitialContext($envt); $phpBackend = $initial->lookup('java:global/FspBackendEE-ejb/fsp.service.PHPBackend'); //$phpBackend = new java("fsp.service.LPHPBackend"); echo $phpBackend->getAvailableFunds(42); assert (is_null(java_last_exception_get())); } catch(JavaException $ex) { $cause = $ex->getCause(); echo "Exception: $cause <br>\nin file: {$ex->getFile()}<br>\nline:{$ex->getLine()}\n"; } >From JSP everything works, i can lookup my service easly. Thanks for looking anyway, it's a long first post, but i looked everywere on the net and i can't find a soluion. Thanks! Adrian |
From: <php...@li...> - 2012-07-11 20:51:22
|
Hi, you can register a http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequestListener.htmland do your cleanup there. Or register your library with the web app and termiate it when the app shuts down., see this example http://php-java-bridge.sourceforge.net/pjb/examples/source.php?source=report.php But if the libary you use is prepared to run in a servlet environment, you don't need to track its resources. |
From: <php...@li...> - 2012-07-11 17:50:24
|
I don't want to terminate the Java process, just anything started as a result of my PHP script's connection to the JavaBridge. There are 100s of classes to look through to see how to close things down. With the command line version is was a simple Control-C to kill everything off. I was hoping there was a simple method with JavaBridge to shutdown everything started by a script, such as when a user hits Control-C on the PHP script. I guess I'll keep searching. Thanks. On Wed, 2012-07-11 at 12:44 -0400, php...@li... wrote: > You probably don't want to terminate the Java process every time your > script runs. I assume that would be very messy in a servlet environment. > > Instead, see what Java call(s) you need to make to disconnect from SonicMQ > and have your PHP invoke it when finished. > > Thanks, > Brandon > > On Wed, Jul 11, 2012 at 12:23 PM, < > php...@li...> wrote: > > > > > I'm using JavaBridge to run some java from within a command line PHP > > script. The java code connects to a sonicmq server and started to > > download data. When the PHP script exists the java code remains > > connected to the sonicmq server, which prevents and new connections. > > Sonicmq complains that a user is still logged in. > > > > My question is: From PHP how can I terminate the java code I initiated > > from PHP? > > > > Thanks. > > > > ------------------------------------------------------------------------------ > > Live Security Virtual Conference > > Exclusive live event will cover all the ways today's security and > > threat landscape has changed and how IT managers can respond. Discussions > > will include endpoint security, mobile security and the latest in malware > > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > _______________________________________________ > > php-java-bridge-users mailing list > > php...@li... > > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2012-07-11 17:26:55
|
Maybe you should close the connection before finishing your PHP script ? Sylvain Filteau Programmeur/Analyste sfi...@ad... ADA Consultants Inc 432 Boul. René-Lévesque Ouest Québec, QC Canada, G1S 1S3 Tel.: 1 (418) 907-5904 Fax: 1 (418) 907-9261 2012/7/11 <php...@li...> > > I'm using JavaBridge to run some java from within a command line PHP > script. The java code connects to a sonicmq server and started to > download data. When the PHP script exists the java code remains > connected to the sonicmq server, which prevents and new connections. > Sonicmq complains that a user is still logged in. > > My question is: From PHP how can I terminate the java code I initiated > from PHP? > > Thanks. > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: <php...@li...> - 2012-07-11 16:45:01
|
You probably don't want to terminate the Java process every time your script runs. I assume that would be very messy in a servlet environment. Instead, see what Java call(s) you need to make to disconnect from SonicMQ and have your PHP invoke it when finished. Thanks, Brandon On Wed, Jul 11, 2012 at 12:23 PM, < php...@li...> wrote: > > I'm using JavaBridge to run some java from within a command line PHP > script. The java code connects to a sonicmq server and started to > download data. When the PHP script exists the java code remains > connected to the sonicmq server, which prevents and new connections. > Sonicmq complains that a user is still logged in. > > My question is: From PHP how can I terminate the java code I initiated > from PHP? > > Thanks. > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: <php...@li...> - 2012-07-11 16:24:02
|
I'm using JavaBridge to run some java from within a command line PHP script. The java code connects to a sonicmq server and started to download data. When the PHP script exists the java code remains connected to the sonicmq server, which prevents and new connections. Sonicmq complains that a user is still logged in. My question is: From PHP how can I terminate the java code I initiated from PHP? Thanks. |
From: <php...@li...> - 2012-07-10 10:56:55
|
Hi, I have successfully installed PHP/Java Bridge on a Ubuntu 12.04 64 bit server with Tomcat and php-cgi; all examples are running OK. I would like though now to run PHP code on a separate Ubuntu 12.04 64 bit LAMP server, accessing Java classes on the Tomcat server. Can anyone help, thank you very much: - Is this possible? - Do I have to modify the Java.inc include file (and/or the JavaProxy.php file) ? - Does the Java.inc (and/or the JavaProxy.php file) file have to be on the LAMP or on the Tomcat server? - Do I have to open any port on the Tomcat server? - Do I still have to run PHP as a CGI service? Ruggero Domenichini (rujero) |