I tested the pdf export with smartclient gwt 3.0 release and with a daily build (SC_SNAPSHOT-2011-12-27/PowerEdition Deployment). In both cases I got the following exception on the server side:
I tested the export with the following code:
Here is the full output of the application server logs:
Code:
java.lang.NullPointerException at com.isomorphic.contentexport.PdfExport.getPdfObject(PdfExport.java:33) ...
Code:
DSRequest req = new DSRequest(); Label label = new Label("Test"); RPCManager.exportContent(label, req);
Code:
[WARN] 404 - GET /testapp/sc/DataSourceLoader?dataSource=%20worldDSExport (127.0.0.1) 1414 bytes Request headers Accept: application/javascript, */*;q=0.8 Referer: http://127.0.0.1:8888/testapp.html?gwt.codesvr=127.0.0.1:9997 Accept-Language: de-DE User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0) Accept-Encoding: gzip, deflate Host: 127.0.0.1:8888 Connection: Keep-Alive Cookie: JSESSIONID=ow54g0lwhexs; GLog=%7B%0D%20%20%20%20left%3A1110%2C%20%0D%20%20%20%20top%3A344%2C%20%0D%20%20%20%20width%3A862%2C%20%0D%20%20%20%20height%3A844%2C%20%0D%20%20%20%20priorityDefaults%3A%7B%0D%20%20%20%20%20%20%20%20Log%3A4%0D%20%20%20%20%7D%2C%20%0D%20%20%20%20defaultPriority%3A3%2C%20%0D%20%20%20%20trackRPC%3Anull%0D%7D Response headers Content-Type: text/html; charset=iso-8859-1 Content-Length: 1414 === 2011-12-28 11:20:17,374 [l0-6] INFO RequestContext - URL: '/testapp/sc/IDACall', User-Agent: 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)': MSIE with Accept-Encoding header, ready for compressed JS === 2011-12-28 11:20:17,390 [l0-6] DEBUG XML - Parsed XML from (in memory stream): 0ms === 2011-12-28 11:20:17,391 [l0-6] DEBUG XML - Parsed XML from /home/dev/smartclient/target\webapp\testapp\sc\system\schema\builtinTypes.xml: 1ms === 2011-12-28 11:20:17,391 [l0-6] INFO PoolManager - SmartClient pooling disabled for 'simpleTypes' objects === 2011-12-28 11:20:17,469 [l0-6] DEBUG XML - Parsed XML from /home/dev/smartclient/target\webapp\testapp\sc\system\schema\List.ds.xml: 0ms === 2011-12-28 11:20:17,469 [l0-6] DEBUG XML - Parsed XML from /home/dev/smartclient/target\webapp\testapp\sc\system\schema\DataSource.ds.xml: 0ms === 2011-12-28 11:20:17,500 [l0-6] DEBUG RPCManager - Processing 1 requests. === 2011-12-28 11:20:17,502 [l0-6] DEBUG RPCManager - Request #1 (RPCRequest) data: { appID:"isc_builtin", className:"builtin", methodName:"getPdfObject", arguments:[ "<div ><table cellspacing='0' cellpadding='0' width='100%'><tbody><tr><td class='normal' align='left' valign='center'>Test</td></tr></tbody></table></div>", { dirDefaultSkin:"http://127.0.0.1:8888/testapp/sc/skins/Enterprise/" } ], is_ISC_RPC_DMI:true } === 2011-12-28 11:20:17,502 [l0-6] INFO IDACall - Performing 1 operation(s) === 2011-12-28 11:20:17,502 [l0-6] DEBUG XML - Parsed XML from jar:file://home/dev/smartclient/target/webapp/WEB-INF/lib/isomorphic-core-rpc-3.0.x-2011-12-27.jar!/isc_builtin.app.xml: 0ms === 2011-12-28 11:20:17,518 [l0-6] DEBUG XML - Parsed XML from /home/dev/smartclient/target\webapp\testapp\sc\system\schema\Application.ds.xml: 16ms === 2011-12-28 11:20:17,534 [l0-6] DEBUG XML - Parsed XML from /home/dev/smartclient/target\webapp\testapp\sc\system\schema\DataSourceField.ds.xml: 0ms === 2011-12-28 11:20:17,549 [l0-6] DEBUG XML - Parsed XML from /home/dev/smartclient/target\webapp\testapp\sc\system\schema\ServerObject.ds.xml: 0ms === 2011-12-28 11:20:17,549 [l0-6] DEBUG XML - Parsed XML from /home/dev/smartclient/target\webapp\testapp\sc\system\schema\Method.ds.xml: 0ms === 2011-12-28 11:20:17,565 [l0-6] DEBUG RPCDMI - appConfig: isc.Application.create({ rpcBindings:[ { ID:"builtin", className:"com.isomorphic.rpc.BuiltinRPC", visibleMethods:[ { name:"downloadWSDL" }, { name:"downloadClientContent" }, { name:"downloadClientExport" }, { name:"xmlToJS" }, { name:"uploadProgressCheck" }, { name:"saveFile" }, { name:"appendToFile" }, { name:"loadFile" }, { name:"deleteFile" }, { name:"loadSharedXML" }, { name:"saveSharedXML" }, { name:"getAvailableScriptEngines" }, { name:"devConsoleEvalServerScript" }, { name:"evalJava" }, { name:"getLogNames" }, { name:"getLogEntries" }, { name:"getLogThresholds" }, { name:"setLogThreshold" }, { name:"getPdfObject" } ] }, { ID:"builtin_tools", className:"com.isomorphic.tools.BuiltinRPC", visibleMethods:[ { name:"getDataSourceFromTable" }, { name:"getDataSourceJSONFromTable" }, { name:"getDataSourceFromHibernateMapping" }, { name:"getDataSourceJSONFromHibernateMapping" }, { name:"getTables" }, { name:"getFieldsFromTable" }, { name:"getBeanFields" }, { name:"getHibernateBeans" }, { name:"getDatabaseProductNameAndVersion" }, { name:"getDatabaseTableTypes" }, { name:"setAttributes" }, { name:"clearAttributes" }, { name:"getAttributes" }, { name:"getAttribute" }, { name:"getDataSourceConfigFromJavaClass" }, { args:"cName", language:"groovy", name:"getJavaSource", script:"\n if (!com.isomorphic.auth.DevModeAuthFilter.devModeAuthorized(request)) throw new Exception(\"Not Authorized\"); \n //import org.apache.bcel.Repository;\n\n try {\n return org.apache.bcel.Repository.lookupClass(cName).toString();\n } catch (Throwable e) {\n return \"Unable to reverse engineer class \"+cName+\": \"+e.getMessage();\n }\n " }, { name:"loadDataSource" }, { name:"dsFromXML" }, { name:"dsConfigFromXML" }, { name:"getDefinedDataSources" } ] }, { ID:"builtin_adminconsole", className:"com.isomorphic.tools.AdminConsole", visibleMethods:[ { name:"getDefinedDatabases" }, { name:"testDB" }, { name:"saveDBConfig" }, { name:"setDefaultDB" }, { name:"importDataSources" }, { name:"discoverJNDIDatabases" } ] } ] }) === 2011-12-28 11:20:17,580 [l0-6] DEBUG RPCDMI - Invocation threw exception java.lang.NullPointerException at com.isomorphic.contentexport.PdfExport.getPdfObject(PdfExport.java:33) at com.isomorphic.rpc.BuiltinRPC.getPdfObject(BuiltinRPC.java:820) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:950) at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:803) at com.isomorphic.rpc.RPCDMI.execute(RPCDMI.java:305) 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:245) 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:637) at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488) === 2011-12-28 11:20:17,580 [l0-6] WARN RequestContext - rpcRequest.execute() failed: java.lang.NullPointerException at com.isomorphic.contentexport.PdfExport.getPdfObject(PdfExport.java:33) at com.isomorphic.rpc.BuiltinRPC.getPdfObject(BuiltinRPC.java:820) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:950) at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:803) at com.isomorphic.rpc.RPCDMI.execute(RPCDMI.java:305) 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:245) 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:637) at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488) === 2011-12-28 11:20:17,580 [l0-6] DEBUG RPCManager - Content type for RPC transaction: text/html; charset=UTF-8
Comment