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...> - 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) |
From: <php...@li...> - 2012-07-06 05:12:33
|
Hi. Not sure what this is about. I am too lazy to read this thread. .. But if there are still questions after watching our intro video or reading our FAQ, the problem is somwhere else...:) Regards, Jost Bökemeier |
From: <php...@li...> - 2012-07-06 05:00:20
|
You can't. See FAQ. You have successfully added JavaBridge classes to Java. Now do the same with your own classes. Regards, Jost Boekemeier Am 05.07.2012 20:17 schrieb <php...@li...>: > Please, I am in desperate need of help. I am new to PHP/Java Bridge and I > am getting the following error: > > [[o:Exception]:"java.lang.Exception: CreateInstance failed: new HelloWorld. > Cause: java.lang.ClassNotFoundException: HelloWorld VM: 1.7.0_04@ > http://java.oracle.com/" at: #-10 > > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711) > #-9 > > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556) > #-8 java.lang.Class.forName0(Native Method) #-7 > java.lang.Class.forName(Class.java:264) #-6 > php.java.bridge.Util.classForName(Util.java:1518) #-5 > > > When I try to execute this command: > > $world = new java("HelloWorld"); > echo $world->hello(array("from PHP")); > > I am able to run the program from the command prompt but I am unable to > incorporate it as a stand alone in my application. > > Also, how can I change the PHP/Java Bridge VM CLASSPATH? > > 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-05 18:32:55
|
Me: How do I set up java-bridge? Reply: First set up Tomcat. Me: Okay, done. What next? I'm not sure I'm seeing the same "how to set up Tomcat" thing as you. If the user list is not for users helping other users to get started with this product, with an archive other users can refer to, then I'm really not sure what this group is for. If the official line is for new users to go somewhere else, then fine, I will do that. On 05/07/2012 19:04, php...@li... wrote: > Can we take the "how to setup Tomcat" discussion offline? > > This probably isn't the most useful purpose for the PHP Java Bridge > discussion list. > > Thanks, > Brandon > > On Wed, Jul 4, 2012 at 9:25 PM, <php...@li... >> wrote: >> Okay, I've got Java and Tomcat installed now. >> >> Java is jdk1.7.0_05 >> Tomcat is 7.0.28 >> >> I can access the Tomcat manager access page on port 8080, but have not set >> up >> any users. I've done steps 1 to 3 on this list: >> >> http://www.davidghedini.com/pg/entry/install_tomcat_7_on_centos >> >> -- Jason >> >> On 02/07/2012 11:38, php...@li... wrote: >>> Jar file is enough for you until it is running. Now tell me what java do >> u >>> have in your linux and do you have tomcat install. if both are not there >>> than install first java sdk more than 1.5 version and then install tomcat >>> 6. Once install than let me know I help you to make Java php bridge and >>> tika to install >>> >>> On Mon, Jul 2, 2012 at 1:24 PM, < >> php...@li... >>>> wrote: >>>> Hi, >>>> >>>> I'm using a RHEL derivative of Linux. The tika project does have a jar >>>> file with >>>> everything in it. The source is available for the jar file, but I don't >>>> personally have the environment set up to rebuild it. >>>> >>>> -- Jason >>>> >>>> >>>> On 02/07/2012 11:11, php...@li... wrote: >>>>> Hi >>>>> >>>>> Kindly can you tell are you working on which OS (i.e. Windows or Linux) >>>> If >>>>> Linux than which Linux. Also tell me did tika is having jar file of its >>>>> own. On this information I can help you regards. >>>>> >>>>> On Mon, Jul 2, 2012 at 12:01 PM, < >>>>> php...@li...> wrote: >>>>> >>>>>> Is there a quick-start guide anywhere for a non-java developer? >>>>>> >>>>>> I have a java product (tika) that needs to be accessed from PHP, and >>>> would >>>>>> like >>>>>> to get something together as a test-case to show that this would be a >>>> way >>>>>> forward. At the moment all the documentation assumes you are a java >>>> coder >>>>>> and >>>>>> know what all the lingo means. Is there something that would take a >>>>>> non-java guy >>>>>> through the steps of setting up the java project/application and >> talking >>>>>> to it >>>>>> from PHP? >>>>>> >>>>>> Thanks, >>>>>> >>>>>> -- Jason >>>>>> <http://academe.co.uk/> >>>>>> >>>>>> >> ------------------------------------------------------------------------------ >>>>>> 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 >>>> -- >>>> Jason Judge, Director >>>> *Academe Computing Ltd* >>>> >>>> Office: 0191 251 0135 (with voice mail) >>>> Mobile: 07771 656 448 >>>> 14 Collingwood Terrace, Whitley Bay, NE26 2NP, UK >>>> Registered in England No. 3205068; VAT Reg. No. 647 6432 17 >>>> >>>> jas...@ac... <mailto:jas...@ac...> >>>> academe.co.uk <http://academe.co.uk/> >>>> >>>> >>>> >>>> >> ------------------------------------------------------------------------------ >>>> 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 >> -- >> Jason Judge, Director >> *Academe Computing Ltd* >> >> Office: 0191 251 0135 (with voice mail) >> Mobile: 07771 656 448 >> 14 Collingwood Terrace, Whitley Bay, NE26 2NP, UK >> Registered in England No. 3205068; VAT Reg. No. 647 6432 17 >> >> jas...@ac... <mailto:jas...@ac...> >> academe.co.uk <http://academe.co.uk/> >> >> >> >> ------------------------------------------------------------------------------ >> 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 -- Jason Judge, Director *Academe Computing Ltd* Office: 0191 251 0135 (with voice mail) Mobile: 07771 656 448 14 Collingwood Terrace, Whitley Bay, NE26 2NP, UK Registered in England No. 3205068; VAT Reg. No. 647 6432 17 jas...@ac... <mailto:jas...@ac...> academe.co.uk <http://academe.co.uk/> |
From: <php...@li...> - 2012-07-05 18:17:16
|
Please, I am in desperate need of help. I am new to PHP/Java Bridge and I am getting the following error: [[o:Exception]:"java.lang.Exception: CreateInstance failed: new HelloWorld. Cause: java.lang.ClassNotFoundException: HelloWorld VM: 1.7.0_04@ http://java.oracle.com/" at: #-10 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711) #-9 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556) #-8 java.lang.Class.forName0(Native Method) #-7 java.lang.Class.forName(Class.java:264) #-6 php.java.bridge.Util.classForName(Util.java:1518) #-5 When I try to execute this command: $world = new java("HelloWorld"); echo $world->hello(array("from PHP")); I am able to run the program from the command prompt but I am unable to incorporate it as a stand alone in my application. Also, how can I change the PHP/Java Bridge VM CLASSPATH? Thanks |