|
From: <php...@li...> - 2008-07-17 13:19:06
|
Hi I wondered if somebody could help me out here. I have a java class that has a constructor that takes 2 strings as arguments when I use the class I get the below exception from within my php page. Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: CreateInstance failed: new PDFGenerator([o:PhpParserString], [o:PhpParserString]). Cause: java.lang.InstantiationException: No matching constructor found. Candidates: [public PDFGenerator()] VM: 1.6.0_06@http://java.sun.com/" at: #-5 php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:465) #-4 php.java.bridge.Request.handleRequest(Request.java:447) #-3 php.java.bridge.Request.handleRequests(Request.java:485) #0 /home/barry/workspace/Ditype/Java.inc(265): java_ThrowExceptionProxyFactory->getProxy(1, '@V', false) #1 /home/barry/workspace/Ditype/Java.inc(417): java_Arg->getResult(false) #2 /home/barry/workspace/Ditype/Java.inc(420): java_Client->getWrappedResult(false) #3 /home/barry/workspace/Ditype/Java.inc(602): java_Client->getInternalResult() #4 /home/barry/workspace/Ditype/Java.inc(1956): java_Client->createObject('PDFGenerator', Array) #5 /home/barry/workspace/Ditype/ditype.php(61): Java->Java('PDFGenerator', '/home/barry/wor...', '/home/barry/wor...') #6 in /home/barry/workspace/Ditype/Java.inc on line 228 The constructor is: public void PDFGenerator(String fileName, String pdfFileName){ this.fileName = fileName; this.pdfFileName = pdfFileName; generatePDF(); } And my php calling object is: $pdfGenerator = new Java("PDFGenerator", $foName, $pdfName); I know the class works as it I take the parameters out of the constructor and recompile with a string to print out everything works fine. Thanks for any help. Barry |