From a button.click, I am trying to invoke a server report program and return a PDF file. Here is the DMI call.
The call is going after MeetingAgenda10.class.
And, the program is present. (See server report classes.JPG, attached.)
The program must be getting called. See the log entry, below. And, RPCRequest#14.jpg, attached.
I was looking for a download dialog. But, it never gets that far. I get a Java exception.
The program must be getting called because a reference to com.lowagie.text.pdf.PdfPageEvent is seen in the trace that shows up in Firefox, not the server log.
This is unexpected because the program runs fine under Eclipse with the same library. And, that library is present under WEB-INF/lib. (See attached server report lib.jpg). And, this is in my Environment variable CLASSPATH .;C:\Program Files\Java\jre7\lib\ext;D:\My Websites\Planet Project\WEB-INF\embeddedTomcat\lib\servlet-api.jar;D:\My Websites\Planet Project\WEB-INF\lib;
My research for this error indicated it could also be caused by a dupilcate class. But, it can be seen that there is no other iText library. And, the 'missing' class is fully qualified and unlikely to have a Doppelgänger in some other JAR file. I ran JarBrowser and it found only one PdfPageEvent class anywhere in the SmartClient directory structure. And, that was in the one and only one iText JAR file found. It is the iText-2.0.8.jar that came with SmartClient.
The program calls for the correct supporting classes, but 'com/lowagie/text/pdf/PdfPageEvent' is not 'found'. (The full text of the program is in MeetingAgenda10.java, attached.)
The Developer Console Results tab goes missing when the IDA call blows away the old dialog and takes over the window.
I am sure that there are errors in the Java report program. It does not accept any parameters yet. It should be a Java Servlet, I think. But, my incremental approach requires that I get something more rudimentary working first.
So, I am needing some help to fix this problem. I hope that someone, who knows lots more about this than I ever will, spots some knuckleheaded error in my logic and what I have constructed. This particular issue is important because it connects my front-end client to my back-end report server.
I have attached a truncated Server Log. It does not have the call trace stack. That showed up and took over the Firefox window.
If any more data is required I might have saved it already. Or, I am willing to generate and collect it.
Thanks,
Rick
P.S. I am running SmartClient Version: v8.2p_2012-06-08/EVAL Development Only on Mozilla Firefox 3.6.18 with Firebug using Windows XP Pro 32 bit.
Code:
DMI.call({ appID: "PlanetProject", className: "com.planetproject.server.reports.MeetingAgenda10", methodName: "main", // arguments: [form.getValue("MEETINGDATE"), // form.getValue("MEETINGTIME"), // Application.currentMeetingTypeID, // form.getValue("AGENDAPRINTOPTIONS") // ], requestParams: { downloadResult: true, downloadToNewWindow:false } });
Code:
<Application> <rpcBindings> <ServerObject ID="MeetingAgenda01" className="com.planetproject.server.reports.MeetingAgenda01"> <visibleMethods> <method name="main"/> </visibleMethods> </ServerObject> <ServerObject ID="MeetingAgenda10" className="com.planetproject.server.reports.MeetingAgenda10"> <visibleMethods> <method name="main"/> </visibleMethods> </ServerObject> <ServerObject ID="MeetingAgenda11" className="com.planetproject.server.reports.MeetingAgenda11"> <visibleMethods> <method name="main"/> </visibleMethods> </ServerObject> </rpcBindings> </Application>
The program must be getting called. See the log entry, below. And, RPCRequest#14.jpg, attached.
Code:
=== 2012-07-05 10:38:26,234 [sor2] DEBUG RPCManager - Processing 1 requests. === 2012-07-05 10:38:26,234 [sor2] DEBUG RPCManager - Request #1 (RPCRequest) data: { appID:"PlanetProject", className:"com.planetproject.server.reports.MeetingAgenda10", methodName:"main", arguments:[ ], is_ISC_RPC_DMI:true }
The program must be getting called because a reference to com.lowagie.text.pdf.PdfPageEvent is seen in the trace that shows up in Firefox, not the server log.
Code:
com.isomorphic.servlet.IDACall top-level exception java.lang.NoClassDefFoundError: com/lowagie/text/pdf/PdfPageEvent at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at com.isomorphic.base.Reflection.classForName(Reflection.java:137) at com.isomorphic.rpc.ServerObject.(ServerObject.java:157) at com.isomorphic.rpc.RPCDMI.execute(RPCDMI.java:276) at com.isomorphic.rpc.RPCDMI.execute(RPCDMI.java:66) at com.isomorphic.rpc.RPCRequest.execute(RPCRequest.java:231) at com.isomorphic.servlet.IDACall.handleRPCRequest(IDACall.java:263) at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:152) at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:121) at com.isomorphic.servlet.IDACall.doPost(IDACall.java:73) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.isomorphic.js.JSSyntaxScannerFilter.doFilter(JSSyntaxScannerFilter.java:241) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:722) Caused by: java.lang.ClassNotFoundException: com.lowagie.text.pdf.PdfPageEvent at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) ... 34 more
My research for this error indicated it could also be caused by a dupilcate class. But, it can be seen that there is no other iText library. And, the 'missing' class is fully qualified and unlikely to have a Doppelgänger in some other JAR file. I ran JarBrowser and it found only one PdfPageEvent class anywhere in the SmartClient directory structure. And, that was in the one and only one iText JAR file found. It is the iText-2.0.8.jar that came with SmartClient.
The program calls for the correct supporting classes, but 'com/lowagie/text/pdf/PdfPageEvent' is not 'found'. (The full text of the program is in MeetingAgenda10.java, attached.)
Code:
package com.planetproject.server.reports; import java.util.*; import java.io.FileOutputStream; //import java.io.InputStream; // needed for CLOB //import java.io.InputStreamReader; import java.io.IOException; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import com.lowagie.text.Chunk; import com.lowagie.text.Document; import com.lowagie.text.DocumentException; import com.lowagie.text.Element; import com.lowagie.text.Font; import com.lowagie.text.FontFactory; import com.lowagie.text.Paragraph; import com.lowagie.text.Phrase; import com.lowagie.text.Rectangle; import com.lowagie.text.pdf.ColumnText; import com.lowagie.text.pdf.PdfPCell; import com.lowagie.text.pdf.PdfPTable; import com.lowagie.text.pdf.PdfPageEvent; // <====== import com.lowagie.text.pdf.PdfPageEventHelper; import com.lowagie.text.pdf.PdfWriter; import com.lowagie.text.PageSize; /** * We'll test our hsqldb database with this example */ public class MeetingAgenda10 { // FUTURE PARAMETERS public static final boolean includeIssues = true; public static final boolean includeTasks = true; public static final String currentMeetingTypeID = "101"; public static final String MeetingDate = "04/15/2012"; public static final String MeetingTime = "12:00:00 PM";
Code:
-------------------------------------------------- The browser window that opened this log window has navigated to a new page or been closed - reopen the log window by calling 'isc.showLog()' from an Isomorphic SmartClient page. --------------------------------------------------
So, I am needing some help to fix this problem. I hope that someone, who knows lots more about this than I ever will, spots some knuckleheaded error in my logic and what I have constructed. This particular issue is important because it connects my front-end client to my back-end report server.
I have attached a truncated Server Log. It does not have the call trace stack. That showed up and took over the Firefox window.
If any more data is required I might have saved it already. Or, I am willing to generate and collect it.
Thanks,
Rick
P.S. I am running SmartClient Version: v8.2p_2012-06-08/EVAL Development Only on Mozilla Firefox 3.6.18 with Firebug using Windows XP Pro 32 bit.
Comment