|
From: <php...@li...> - 2008-12-29 22:29:27
|
Im trying to get that in php:
/*JAVA CODE*/
JRRtfExporter exporter = new JRRtfExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, masterPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, sPathRTF);
exporter.exportReport();
/*MY PHP JAVA BRIDGE IMPLEMENTATION*/
$exportManager = new
JavaClass("net.sf.jasperreports.engine.export.JRRtfExporter");
$exportManagerParam = new
JavaClass("net.sf.jasperreports.engine.JRExporterParameter");
$outputPath = realpath(".")."/"."informe.rtf";
$exportManager->setParameter($exportManagerParam->JASPER_PRINT,$jasperPrint);
$exportManager->setParameter($exportManagerParam->OUPUT_FILE_NAME,$outputPath);
$exportManager->exportReport();
/*output*/
*Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: Invoke failed:
[[c:JRRtfExporter]]->setParameter([o:JRExporterParameter], [o:JasperPrint]).
Cause: java.lang.NoSuchMethodException:
setParameter([o:JRExporterParameter], [o:JasperPrint]). Candidates: [] VM:
1.6.0_07@http://java.sun.com/" at: #-5
php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1059) #-4
php.java.bridge.Request.handleRequest(Request.java:405) #-3
php.java.bridge.Request.handleRequests(Request.java:481) #0
C:\wamp\www\pruebas\jasper\java\Java.inc(337):
java_ThrowExceptionProxyFactory->getProxy(24, 'net.sf.jasperre...',
'setParameter([o...', true) #1
C:\wamp\www\pruebas\jasper\java\Java.inc(494): java_Arg->getResult(true) #2
C:\wamp\www\pruebas\jasper\java\Java.inc(500):
java_Client->getWrappedResult(true) #3
C:\wamp\www\pruebas\jasper\java\Java.inc(704): java_Client->getResult() #4
C:\wamp\www\pruebas\jasper\java\Java.inc(1889):
java_Client->invokeMethod(21, 'setParameter', Array) #5
C:\wamp\www\pruebas\jasper\java\Java.inc(2007): java_JavaProxy->_ in
C:\wamp\www\pruebas\jasper\java\Java.inc on line 300*
*¿¿HOW TO IMPLEMENT JRExporterParameter.JASPER_PRINT STATIC ATTRIBUTE IN PHP
JAVA BRIDGE???*
Thanks for your guide and help
|
|
From: <php...@li...> - 2008-12-29 22:38:16
|
> [[c:JRRtfExporter]]->setParameter([o:JRExporterParameter], [o:JasperPrint]).
> Cause: java.lang.NoSuchMethodException:
The class JRRtfExporter (note the "c:...") doesn't contain a procedure with the name "setParameter". You probably want to invoke a setParameter method on a JRRtfExporter instance.
|
|
From: <php...@li...> - 2008-12-29 22:46:29
|
> *¿¿HOW TO IMPLEMENT JRExporterParameter.JASPER_PRINT
> STATIC ATTRIBUTE IN PHP
> JAVA BRIDGE???*
With:
java("your.class.com")->ATTRIBUTE
Please see the PHP/Java Bridge documentation for details.
|
|
From: <php...@li...> - 2008-12-30 01:53:54
|
Sorry but Class has method. See in http://jasperreports.sourceforge.net/api/net/sf/jasperreports/engine/export/JRRtfExporter.html The method is inherited from another class I try with to java("your.class.com")->ATTRIBUTE And it still error persist and it's the same :( I found some people with this error in Google and with no success in solution. 2008/12/29 <php...@li...> > > > *¿¿HOW TO IMPLEMENT JRExporterParameter.JASPER_PRINT > > STATIC ATTRIBUTE IN PHP > > JAVA BRIDGE???* > > With: > > java("your.class.com")->ATTRIBUTE > > > Please see the PHP/Java Bridge documentation for details. > > > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > -- Saludos afectuosos, Israel González S --------------- Gerente General Better Choice Ltda - Software Estratégico a Medida Ingenieria Civil Industrial en Tecnologias de Información UC. ------------------------ Office: (56-2) 551 59 04 Cel: (56- 099) 381 40 58 skype: igonzals http://www.betterchoice.cl |
|
From: <php...@li...> - 2008-12-30 02:03:43
|
Try with new JavaClass and not new Java -Ajit Sent via BlackBerry by AT&T -----Original Message----- From: php...@li... Date: Mon, 29 Dec 2008 22:41:52 To: <php...@li...> Subject: Re: [Php-java-bridge-users] Urgent: Jasper report problem Sorry but Class has method. See in http://jasperreports.sourceforge.net/api/net/sf/jasperreports/engine/export/JRRtfExporter.html The method is inherited from another class I try with to java("your.class.com")->ATTRIBUTE And it still error persist and it's the same :( I found some people with this error in Google and with no success in solution. 2008/12/29 <php...@li...> > > > *¿¿HOW TO IMPLEMENT JRExporterParameter.JASPER_PRINT > > STATIC ATTRIBUTE IN PHP > > JAVA BRIDGE???* > > With: > > java("your.class.com")->ATTRIBUTE > > > Please see the PHP/Java Bridge documentation for details. > > > > > > > ------------------------------------------------------------------------------ >_______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > -- Saludos afectuosos, Israel González S --------------- Gerente General Better Choice Ltda - Software Estratégico a Medida Ingenieria Civil Industrial en Tecnologias de Información UC. ------------------------ Office: (56-2) 551 59 04 Cel: (56- 099) 381 40 58 skype: igonzals http://www.betterchoice.cl ------------------------------------------------------------------------------ _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
|
From: <php...@li...> - 2008-12-30 16:09:52
|
Hi,
> Sorry but Class has method.
I am sorry, but I don't understand this sentence. According to the link you have posted there is no such procedure, it's a method, not a procedure. So you must call it as accordingly.
> The method is inherited from another class
Methods can be inherited, procedures can't.
> I found some people with this error in Google and with no
> success in solution.
Too bad. They should have looked at the PHP/Java Bridge documentation first.
Please use the official API, the constructors you've used are helper routines and are not even documented, so I wonder how you figured out they exist.
Regards,
Jost Boekemeier
|
|
From: <php...@li...> - 2008-12-30 04:13:00
|
Try this
$exportManager = new
Java ("net.sf.jasperreports.engine.export.JRRtfExporter");
// note that it is not JavaClass but Java
The following code that you have in PHP
$exportManager = new
JavaClass("net.sf.jasperreports.engine.export.JRRtfExporter");
is equivalent to the following Java Code
exportManager = JRRtfExporter.class;
Use new JavaClass("classname) to access static methods and variables and new
Java("classname") to use instance method and variables.
-Ajit
-----Original Message-----
From: php...@li...
[mailto:php...@li...]
Sent: Monday, December 29, 2008 5:29 PM
To: php...@li...
Subject: [Php-java-bridge-users] Urgent: Jasper report problem
Im trying to get that in php:
/*JAVA CODE*/
JRRtfExporter exporter = new JRRtfExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, masterPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, sPathRTF);
exporter.exportReport();
/*MY PHP JAVA BRIDGE IMPLEMENTATION*/
$exportManager = new
JavaClass("net.sf.jasperreports.engine.export.JRRtfExporter");
$exportManagerParam = new
JavaClass("net.sf.jasperreports.engine.JRExporterParameter");
$outputPath = realpath(".")."/"."informe.rtf";
$exportManager->setParameter($exportManagerParam->JASPER_PRINT,$jasperPrint)
;
$exportManager->setParameter($exportManagerParam->OUPUT_FILE_NAME,$outputPat
h);
$exportManager->exportReport();
/*output*/
*Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: Invoke failed:
[[c:JRRtfExporter]]->setParameter([o:JRExporterParameter], [o:JasperPrint]).
Cause: java.lang.NoSuchMethodException:
setParameter([o:JRExporterParameter], [o:JasperPrint]). Candidates: [] VM:
1.6.0_07@http://java.sun.com/" at: #-5
php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1059) #-4
php.java.bridge.Request.handleRequest(Request.java:405) #-3
php.java.bridge.Request.handleRequests(Request.java:481) #0
C:\wamp\www\pruebas\jasper\java\Java.inc(337):
java_ThrowExceptionProxyFactory->getProxy(24, 'net.sf.jasperre...',
'setParameter([o...', true) #1
C:\wamp\www\pruebas\jasper\java\Java.inc(494): java_Arg->getResult(true) #2
C:\wamp\www\pruebas\jasper\java\Java.inc(500):
java_Client->getWrappedResult(true) #3
C:\wamp\www\pruebas\jasper\java\Java.inc(704): java_Client->getResult() #4
C:\wamp\www\pruebas\jasper\java\Java.inc(1889):
java_Client->invokeMethod(21, 'setParameter', Array) #5
C:\wamp\www\pruebas\jasper\java\Java.inc(2007): java_JavaProxy->_ in
C:\wamp\www\pruebas\jasper\java\Java.inc on line 300*
*¿¿HOW TO IMPLEMENT JRExporterParameter.JASPER_PRINT STATIC ATTRIBUTE IN PHP
JAVA BRIDGE???*
Thanks for your guide and help
----------------------------------------------------------------------------
--
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
|
|
From: <php...@li...> - 2008-12-30 16:13:25
|
Thnks a lot. It Works!
/*CORRECT CODE*/
$exportManager = new
Java("net.sf.jasperreports.engine.export.JRRtfExporter");
$file = new Java("java.io.File",realpath(".")."/"."informe.rtf");
$pr = new
JavaClass("net.sf.jasperreports.engine.JRExporterParameter");
$exportManager->setParameter($pr->JASPER_PRINT,$jasperPrint);
$exportManager->setParameter($pr->OUTPUT_FILE,$file);
$exportManager->exportReport();
2008/12/30 <php...@li...>
> Try this
>
> $exportManager = new
> Java ("net.sf.jasperreports.engine.export.JRRtfExporter");
>
> // note that it is not JavaClass but Java
>
> The following code that you have in PHP
> $exportManager = new
> JavaClass("net.sf.jasperreports.engine.export.JRRtfExporter");
>
> is equivalent to the following Java Code
> exportManager = JRRtfExporter.class;
>
> Use new JavaClass("classname) to access static methods and variables and
> new
> Java("classname") to use instance method and variables.
>
> -Ajit
>
> -----Original Message-----
> From: php...@li...
> [mailto:php...@li...]
> Sent: Monday, December 29, 2008 5:29 PM
> To: php...@li...
> Subject: [Php-java-bridge-users] Urgent: Jasper report problem
>
> Im trying to get that in php:
>
> /*JAVA CODE*/
>
> JRRtfExporter exporter = new JRRtfExporter();
> exporter.setParameter(JRExporterParameter.JASPER_PRINT, masterPrint);
> exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, sPathRTF);
> exporter.exportReport();
>
> /*MY PHP JAVA BRIDGE IMPLEMENTATION*/
>
> $exportManager = new
> JavaClass("net.sf.jasperreports.engine.export.JRRtfExporter");
> $exportManagerParam = new
> JavaClass("net.sf.jasperreports.engine.JRExporterParameter");
> $outputPath = realpath(".")."/"."informe.rtf";
>
> $exportManager->setParameter($exportManagerParam->JASPER_PRINT,$jasperPrint)
> ;
>
> $exportManager->setParameter($exportManagerParam->OUPUT_FILE_NAME,$outputPat
> h);
> $exportManager->exportReport();
>
> /*output*/
> *Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: Invoke failed:
> [[c:JRRtfExporter]]->setParameter([o:JRExporterParameter],
> [o:JasperPrint]).
> Cause: java.lang.NoSuchMethodException:
> setParameter([o:JRExporterParameter], [o:JasperPrint]). Candidates: [] VM:
> 1.6.0_07@http://java.sun.com/" at: #-5
> php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1059) #-4
> php.java.bridge.Request.handleRequest(Request.java:405) #-3
> php.java.bridge.Request.handleRequests(Request.java:481) #0
> C:\wamp\www\pruebas\jasper\java\Java.inc(337):
> java_ThrowExceptionProxyFactory->getProxy(24, 'net.sf.jasperre...',
> 'setParameter([o...', true) #1
> C:\wamp\www\pruebas\jasper\java\Java.inc(494): java_Arg->getResult(true) #2
> C:\wamp\www\pruebas\jasper\java\Java.inc(500):
> java_Client->getWrappedResult(true) #3
> C:\wamp\www\pruebas\jasper\java\Java.inc(704): java_Client->getResult() #4
> C:\wamp\www\pruebas\jasper\java\Java.inc(1889):
> java_Client->invokeMethod(21, 'setParameter', Array) #5
> C:\wamp\www\pruebas\jasper\java\Java.inc(2007): java_JavaProxy->_ in
> C:\wamp\www\pruebas\jasper\java\Java.inc on line 300*
>
> *¿¿HOW TO IMPLEMENT JRExporterParameter.JASPER_PRINT STATIC ATTRIBUTE IN
> PHP
> JAVA BRIDGE???*
>
> Thanks for your guide and help
>
> ----------------------------------------------------------------------------
> --
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>
--
Saludos afectuosos,
Israel González S
---------------
Gerente General Better Choice Ltda - Software Estratégico a Medida
Ingenieria Civil Industrial en Tecnologias de Información UC.
------------------------
Office: (56-2) 551 59 04
Cel: (56- 099) 381 40 58
skype: igonzals
http://www.betterchoice.cl
|