korolevc Report post Posted November 2, 2009 When trying to precompile the FCExporter.jsp using weblogic 10.3, I get the following error: [jspc] Compiling /fusionCharts/FCExporter.jsp [jspc] Compiling /fusionCharts/FCExporterError.jsp [jspc] Compiling /fusionCharts/Resources/FCExporter_IMG.jsp [jspc] Compiling /fusionCharts/Resources/FCExporter_PDF.jsp There are 1 nested errors: weblogic.utils.compiler.ToolFailureException: jspc failed with errors :weblogic. servlet.jsp.CompilationException: FCExporter.jsp:183:46: This property is not wr itable. <jsp:setProperty name="exportBean" property="exportParameters" value="<% =localExportBean.getExportParameters()%>"/> ^----------------^ at weblogic.servlet.jsp.jspc20.runBodyInternal(jspc20.java:431) at weblogic.servlet.jsp.jspc20.runJspc(jspc20.java:202) at weblogic.servlet.jsp.JspcInvoker.compile(JspcInvoker.java:236) at weblogic.application.compiler.AppcUtils.compileWAR(AppcUtils.java:362 ) at weblogic.application.compiler.WARModule.compile(WARModule.java:236) at weblogic.application.compiler.flow.CompileModuleFlow.compileModules(C ompileModuleFlow.java:103) at weblogic.application.compiler.flow.CompileModuleFlow.compile(CompileM oduleFlow.java:58) at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDri ver.java:69) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD river.java:37) at weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:36 ) at weblogic.application.compiler.FlowDriver.run(FlowDriver.java:26) at weblogic.application.compiler.EARCompiler.compile(EARCompiler.java:49 ) at weblogic.application.compiler.flow.AppCompilerFlow.compileInput(AppCo mpilerFlow.java:118) at weblogic.application.compiler.flow.AppCompilerFlow.compile(AppCompile rFlow.java:43) at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDri ver.java:69) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD river.java:37) at weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:36 ) at weblogic.application.compiler.FlowDriver.run(FlowDriver.java:26) at weblogic.application.compiler.Appc.runBody(Appc.java:181) at weblogic.utils.compiler.Tool.run(Tool.java:158) at weblogic.utils.compiler.Tool.run(Tool.java:115) at weblogic.application.compiler.Appc.main(Appc.java:192) at weblogic.appc.main(appc.java:14) I was also getting errors when compiling the two jsp files in the Resources subdirectory on the following line: String pathToWebAppRoot = getServletContext().getRealPath("/"); I was able to get by those errors by changing the line to: String pathToWebAppRoot = session.getServletContext().getRealPath("/"); I just don't know how to get around the error compiling FCExporter.jsp. Any help would be appreciated. Thanks, Charles Share this post Link to post Share on other sites
srividya_sharma Report post Posted November 3, 2009 Hi Charles, Please check if fcexporter.jar is in the libraries used for compilation. hope this helps. Srividya Share this post Link to post Share on other sites
korolevc Report post Posted November 3, 2009 The jar is in the classpath because I am able to compile the other three jsp (FCExporterError.jsp, FCExporter_IMG.jsp and FCExporter_PDF.jsp) files without a problem and they are referencing java classes from that jar. Charles Share this post Link to post Share on other sites
srividya_sharma Report post Posted November 6, 2009 Hi Charles, Can you tell me the java compliance of your project in weblogic? With Java 5 compliance, I am able to build the project in weblogic 10.3. regards, Srividya Share this post Link to post Share on other sites
korolevc Report post Posted January 7, 2010 (edited) Stupid question, but how do you check the compliance level? And also, how do you set it? Actually, I was able to get around the compilation error by modifying the FCExporter.jsp file. Here's what I did: <jsp:useBean id="exportBean" scope="request" class="com.fusioncharts.exporter.beans.ExportBean"> <jsp:setProperty name="exportBean" property="metadata" value="<%=localExportBean.getMetadata()%>"/> <jsp:setProperty name="exportBean" property="stream" value="<%=localExportBean.getStream()%>"/> <%--<jsp:setProperty name="exportBean" property="exportParameters" value="<%=localExportBean.getExportParameters()%>"/>--%> </jsp:useBean> <% // TODO: commented out setProperty above and replaced with this statement. exportBean.setExportParameters(localExportBean.getExportParameters()); %> As you can see, I commented out the last setProperty jsp tag and manually called the setExportParameters in the exportBean. This worked, but I don't like having to modify your files. Edited January 7, 2010 by Guest Share this post Link to post Share on other sites
srividya_sharma Report post Posted January 8, 2010 Hi Good to hear that you could fix the problem. To set the java compliance level in IDE, you would have to check the menu in some path like: Project > Properties > Java Build Path / Java Compliance The compilation error, could be because of the version of servlet.jar or servlet-api.jar. Which version of the server have you configured to use with the IDE? It is strange how all the setproperty statements are working fine except for the last one. We would need to investigate this further. As for the jsp, it is alright to modify it and use, until we figure out the cause of this problem. Srividya Share this post Link to post Share on other sites
korolevc Report post Posted January 8, 2010 I'm not compiling the jsps from an IDE. I've tried compiling it from our Ant build, calling the weblogic appc task and also by just copying the jsp files into the war of a running server and trying to access the jsp and force a compilation. Both instances failed. As I mentioned, I did get around the compilation error, but I have encountered something else now. I don't want to put those jsp files in the root of my war. Let's say I want them in a subdirectory of my war called graph. So, the graph directory contains FCExporter.jsp, FCExporterError.jsp and the Resources directory. The export no longer works. It seems that somewhere in the export code, it is looking for the Resources directory in the root of the war. I figured this out because I was able to export after copying the Resource directory from my graph directory to the root of the war. And if I then remove the Resource directory from my graph directory, the export also fails because there is code elsewhere that tries to access the resource jsps relative to FCExporter.jsp. I don't want to have two Resources directories in my war. Can someone look into this? I can send in a support request if that is necessary. Thanks. Share this post Link to post Share on other sites
srividya_sharma Report post Posted January 8, 2010 Hi, You can place the Resources folder in any folder within webapp root - root or sub-folders. You just have to configure the path in WEB-INF/classes/fusioncharts_export.properties file. RESOURCEPATH is the property that you would need to modify in the above said file. Here, please specify the path relative to webapp root. Hope this helps! Srividya Share this post Link to post Share on other sites