Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Php Java Bridge(Fatal error: protocol error: ,Invalid document end at col 124)
Php Java Bridge [message #762639] Thu, 08 December 2011 12:35 Go to next message
karvesh ghunsam is currently offline karvesh ghunsamFriend
Messages: 95
Registered: July 2011
Member
Dear Jason

I am having an issue with the Php Java Bridge..
I have gone live and when the users are using the bridge intensively, with export to pdf everything, after some hours they get the following error message:


Fatal error: protocol error: ,Invalid document end at col 124. Check the back end log for OutOfMemoryErrors. in C:\wamp\www\Medisave\BIRT\JavaBridge3\java\Java.inc on line 869Call Stack#TimeMemoryFunctionLocation10.0015417544{main}( )..\visitBill.php:021.76532705880java_InternalJava->run( )..\visitBill.php:8331.76532706080Java->__call( )..\Java.inc:041.76532706680java_AbstractJava->__call( )..\Java.inc:199951.76532706680java_JavaProxy->__call( )..\Java.inc:185161.76532706680java_Client->invokeMethod( )..\Java.inc:175271.76542706896java_Protocol->invokeEnd( )..\Java.inc:55981.76542706952java_Protocol->finish( )..\Java.inc:133891.76542706200java_Protocol->handle( )..\Java.inc:1286101.76542706200java_Client->handleRequests( )..\Java.inc:1279111.76552706368java_Parser->parse( )..\Java.inc:347121.76552706368java_NativeParser->parse( )..\Java.inc:722133.51432706680java_SocketHandler->shutdownBrokenConnection( )..\Java.inc:701143.51442706608java_SocketHandler->dieWithBrokenConnection( )..\Java.inc:873153.51442706816trigger_error ( )..\Java.inc:869

Restarting Tomcat server resets everything to normal..

I made sure that i had the parameter -XX:MaxPermSize=256M
on the tomcat server

Could you please hint me here? I need to get it solved pretty soon.. I am still doing some research about it on my part..

Thanks in advance..
Karvesh
Re: Php Java Bridge [message #762645 is a reply to message #762639] Thu, 08 December 2011 12:47 Go to previous messageGo to next message
karvesh ghunsam is currently offline karvesh ghunsamFriend
Messages: 95
Registered: July 2011
Member
Dear Jason

I noticed that the export to HTML works fine for around 100 reports..
Its when i call the export to pdf intensively that the out of memory error seems to occur...

Karvesh
Re: Php Java Bridge [message #762872 is a reply to message #762645] Thu, 08 December 2011 18:40 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Karvesh,

Can you post the code (php) that you are using to export to pdf?

Jason


On 12/8/2011 7:47 AM, karvesh wrote:
> Dear Jason
>
> I noticed that the export to HTML works fine for around 100 reports..
> Its when i call the export to pdf intensively that the out of memory
> error seems to occur...
>
> Karvesh
Re: Php Java Bridge [message #763037 is a reply to message #762872] Fri, 09 December 2011 02:52 Go to previous messageGo to next message
karvesh ghunsam is currently offline karvesh ghunsamFriend
Messages: 95
Registered: July 2011
Member
Dear Jason

I noted that this could happen also in the HTML render file..

Please find the html and pdf render files enclosed

clientReceipt.php for the html rendering
clientReceiptPDF.php for the pdf rendering

I was wondering if i increased the -XX:MaxPermSize=256M to -XX:MaxPermSize=512M..
It may buy me some time...

Thanks a lot Smile

Karvesh
Re: Php Java Bridge [message #763313 is a reply to message #763037] Fri, 09 December 2011 14:50 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Karvesh,

I did no see anything wrong with the code. If you change the pdf php to
first do a run task and then a render task do you get the error?

Jason

On 12/8/2011 9:52 PM, karvesh wrote:
> Dear Jason
>
> I noted that this could happen also in the HTML render file..
>
> Please find the html and pdf render files enclosed
>
> clientReceipt.php for the html rendering
> clientReceiptPDF.php for the pdf rendering
>
> I was wondering if i increased the -XX:MaxPermSize=256M to -XX:MaxPermSize=512M..
> It may buy me some time...
>
> Thanks a lot :)
>
> Karvesh
Re: Php Java Bridge [message #763595 is a reply to message #763313] Sat, 10 December 2011 03:54 Go to previous messageGo to next message
karvesh ghunsam is currently offline karvesh ghunsamFriend
Messages: 95
Registered: July 2011
Member
Dear Jason,

you mean i add the red code within the pdf export one:

$report = $birtReportEngine->openReportDesign("${here}/ReportDesigns/GRN.rptdesign");

$task = $birtReportEngine->createRunTask($report);
$task->run($here . "/reportDocuments/" . session_id() . "/GRN.rptdocument");
$task->close();


$task = $birtReportEngine->createRunAndRenderTask($report);

$taskOptions = new java("org.eclipse.birt.report.engine.api.PDFRenderOption");
$outputStream = new java("java.io.ByteArrayOutputStream");
$taskOptions->setOutputStream($outputStream);
$taskOptions->setOption("pdfRenderOption.pageOverflow", "pdfRenderOption.fitToPage");
$taskOptions->setOutputFormat("pdf");

$task->setRenderOption( $taskOptions );
$task->run();
$task->close();



Karvesh
Re: Php Java Bridge [message #764654 is a reply to message #763595] Mon, 12 December 2011 15:40 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Close, but the second task should be a render task.

try{

$document = $birtReportEngine->openReportDocument($here .
"/reportDocuments/" . session_id() . "/GRN.rptdocument");
$task = $birtReportEngine->createRenderTask($document);
..
..

..
$task->render();
$document->close();
$task->close();

Jason

On 12/9/2011 10:54 PM, karvesh wrote:
> Dear Jason,
>
> you mean i add the red code within the pdf export one:
>
> $report =
> $birtReportEngine->openReportDesign("${here}/ReportDesigns/GRN.rptdesign");
>
> $task = $birtReportEngine->createRunTask($report);
> $task->run($here . "/reportDocuments/" . session_id() .
> "/GRN.rptdocument");
> $task->close();
>
> $task = $birtReportEngine->createRunAndRenderTask($report);
>
> $taskOptions = new
> java("org.eclipse.birt.report.engine.api.PDFRenderOption");
> $outputStream = new java("java.io.ByteArrayOutputStream");
> $taskOptions->setOutputStream($outputStream);
> $taskOptions->setOption("pdfRenderOption.pageOverflow",
> "pdfRenderOption.fitToPage");
> $taskOptions->setOutputFormat("pdf");
>
> $task->setRenderOption( $taskOptions );
> $task->run();
> $task->close();
>
>
> Karvesh
Previous Topic:All in one | Eclipse for Birt
Next Topic:Missing required plug-ins for RCP application with BIRT
Goto Forum:
  


Current Time: Fri Mar 29 13:06:38 GMT 2024

Powered by FUDForum. Page generated in 0.03415 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top