Error in precompiling JSPs using OJSPC
Hi,
I am precompiling JSPs in war file using ojspc as specified below.
ojspc -output myapp.war app.war
However I am getting following error:
Detected archive, now processing contents of app.war...
Setting up temp area...
Expanding archive in temp area...
WARNING: IGNORED file: /WEB-INF/lib/jsf-impl.jar
WARNING: IGNORED file: /WEB-INF/lib/jsf-ri.jar
Parse error in AddNewAttachment.jsp:
oracle.jsp.parse.JspParseException: /AddNewAttachment.jsp: Line # 48,
actionListener="#{addAttachmentBackingBean.cancel}"/>
Error: A String literal value, "#{addAttachmentBackingBean.cancel}", has been pr
ovided for attribute actionListener which has an associated deferred method with
void signature
Removing temp area...
Can anbody help me to solve this problem?
Thanks.
Regards,
Umesh
Hi,
If I create a method via the binding editor in JDev it creates a managed bean method with a void return type as default.
eg.
public void cmdlink_actionListener(ActionEvent actionEvent) {
// Add event code here...
}could it have anything to do with the two OJSPC warnings? jsf-impl.jar should be included in your war file. I haven't seen this warning when OJSPC is compiling.
Brenden
Similar Messages
-
Hi
Does anyone know a documented way to precompile a JSP using an ant script. I've tried a lot, but didn't find a satisfying solution. The best solution I've found was calling OJSPC from commandline via ants "java" task, but even this solution does not work in JDeveloper 9.0.4 anymore.
If anyone can give me a hint, I'd be really happy.
ThanksAnybody ?
-
Precompiling JSPs using weblogic.jspc
Hello,
My question has more to do with getting the Weblogic precompiler to understand <%@ include file="myFilejsp" %> directives.
Test scenario:
In our application, we have used a common JSP page say 'commonJSP' as a header and have included 'commonJSP' in all our other JSP pages.
Suppose my commonJSP is like this:
<%
String hello= "Hello";
%>
and suppose my index.jsp is like this
<%@ include file="commonJSP" %>
<%
System.out.println(hello);
%>
Now when I serve index.jsp to clients it compiles correctly because the commonJSP is included in the source before compiling.
HOWEVER, when precompiling the JSPs in my web application using the <java weblogic.jspc ..> tag in my ant build file, I am getting errors on compiling index.jsp that 'hello' cannot be resolved.
When using the WebLogic JSP compiler, is there any way to tell the compiler to not treat JSP pages as individual 'servlet' classes but look at the 'big picture'?Anybody ?
-
Weblogic.jspc outofmemory error while compiling jsps using ant in eclipse
Hi all,
I am trying to execute this target in my ant build:
<target name="jspc">
<java classname="weblogic.jspc" fork="yes">
<arg line="-verbose -verboseJavac -compileAll -webapp ${project.jsp.dir} -d ${project.jsp.class.dir}" />
<classpath>
<pathelement path="${classpath}" />
</classpath>
</java>
</target>
I am getting the following error:
[java] Error: [jspc]: 0 file(s) failed:
[java] [Compilation errors : ]
[java] The system is out of resources.
[java] Consult the following stack trace for details.
[java] java.lang.OutOfMemoryError
[java] at weblogic.jspc.doCompile(jspc.java:861)
[java] at weblogic.jspc.runJspc(jspc.java:654)
[java] at weblogic.jspc.runBodyInternal(jspc.java:412)
[java] at weblogic.jspc.runBody(jspc.java:319)
[java] at weblogic.utils.compiler.Tool.run(Tool.java:192)
I am using weblogic 8.1, eclipse3.1, java1.4.1.
Can some one please help me with this issue?
thanks in advance.--> some error on posting please refer to the next post...
From the error logs we can trace it out to the web project's Build.xml file ....I was getting a similar error and by commenting out the following lines in the web project's Build.xml I am able to run the build script correctly and get a EAR file. The lines are
<!--
<assemble
moduleDir="${generated.module.root}"
moduleName="${project.name}"
srcOutputDir="${assembly.src}"
appRootDir="${ear.root}">
<assemblyContext factory="org.apache.beehive.controls.runtime.assembly.WebAppAssemblyContext$Factory" />
<assemblyContext factory="org.apache.beehive.controls.runtime.assembly.AppAssemblyContext$Factory" />
<classpath refid="assembly.classpath" />
<fileset dir="${project.dir}">
<include name="**/*.controls.properties" />
</fileset>
</assemble>
-->
Please check it now, also if any one can let us know the function or role played by the above lines it would be great. Also if there would be any future or unseen problems by commenting out these lines please do let us know...
Thanks
-MiM
Edited by prodigymonish83 at 10/22/2007 5:56 AM -
Error when precompile jsp files
I tried to precompile my jsp files by adding precompile functionality in my xml
file and I received this error during startup. Can anyone help?
java.lang.NullPointerException
at weblogic.servlet.jsp.Jsp2Java.makeReader(Jsp2Java.java:232)
at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:112)
at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:253
at weblogic.servlet.jsp.Precompiler.compileOne(Precompiler.java:124)
at weblogic.servlet.jsp.Precompiler.compile(Precompiler.java:44)
at weblogic.servlet.internal.WebAppServletContext.precompileJSPs(WebAppS
ervletContext.java:2003)
at weblogic.servlet.internal.dd.DescriptorLoader.initFromWebApp(Descript
orLoader.java:742)
at weblogic.servlet.internal.dd.DescriptorLoader.createServletContext(De
scriptorLoader.java:359)
at weblogic.servlet.internal.HttpServer.loadWARContext(HttpServer.java:4
67)
at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:404)
at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
at weblogic.j2ee.Application.addComponent(Application.java:133)
at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:115)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:327)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:143)
at weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServe
r.java:76)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:562)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:548)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:285)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:439)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:180)
at $Proxy29.addWebDeployment(Unknown Source)
at weblogic.management.configuration.WebServerMBean_CachingStub.addWebDe
ployment(WebServerMBean_CachingStub.java:1012)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:313)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:143)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:562)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:548)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:285)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBean
s(ConfigurationMBeanImpl.java:409)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:287)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.DynamicMBeanImpl.addDeployment(DynamicMB
eanImpl.java:866)
at weblogic.management.internal.DynamicMBeanImpl.addDeployment(DynamicMB
eanImpl.java:853)
at weblogic.management.internal.DynamicMBeanImpl.add(DynamicMBeanImpl.ja
va:838)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:566)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:548)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:285)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:439)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:180)
at $Proxy14.addTarget(Unknown Source)
at weblogic.management.mbeans.custom.ApplicationManager.autoDeploy(Appli
cationManager.java:486)
at weblogic.management.mbeans.custom.ApplicationManager.addApplication(A
pplicationManager.java:557)
at weblogic.management.mbeans.custom.ApplicationManager.addApplication(A
pplicationManager.java:504)
at weblogic.management.mbeans.custom.ApplicationManager.poll(Application
Manager.java:428)
at weblogic.management.mbeans.custom.ApplicationManager.poll(Application
Manager.java:380)
at weblogic.management.mbeans.custom.ApplicationManager.update(Applicati
onManager.java:152)
at weblogic.management.mbeans.custom.ApplicationManager.startAdminManage
r(ApplicationManager.java:205)
at weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
nManager.java:120)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:562)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:548)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:285)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:439)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:180)
at $Proxy3.start(Unknown Source)
at weblogic.management.Admin.startApplicationManager(Admin.java:1037)
at weblogic.management.Admin.finish(Admin.java:493)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:429)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:170)
at weblogic.Server.main(Server.java:35)is your webapp deployed as .war or as exploded format?
If it's war, there's a patch available that you can get it by contacting support
Kumar
buatapa wrote:
I tried to precompile my jsp files by adding precompile functionality in my xml
file and I received this error during startup. Can anyone help?
java.lang.NullPointerException
at weblogic.servlet.jsp.Jsp2Java.makeReader(Jsp2Java.java:232)
at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:112)
at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:253
at weblogic.servlet.jsp.Precompiler.compileOne(Precompiler.java:124)
at weblogic.servlet.jsp.Precompiler.compile(Precompiler.java:44)
at weblogic.servlet.internal.WebAppServletContext.precompileJSPs(WebAppS
ervletContext.java:2003)
at weblogic.servlet.internal.dd.DescriptorLoader.initFromWebApp(Descript
orLoader.java:742)
at weblogic.servlet.internal.dd.DescriptorLoader.createServletContext(De
scriptorLoader.java:359)
at weblogic.servlet.internal.HttpServer.loadWARContext(HttpServer.java:4
67)
at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:404)
at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
at weblogic.j2ee.Application.addComponent(Application.java:133)
at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:115)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:327)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:143)
at weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServe
r.java:76)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:562)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
java:548)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:285)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:439)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:180)
at $Proxy29.addWebDeployment(Unknown Source)
at weblogic.management.configuration.WebServerMBean_CachingStub.addWebDe
ployment(WebServerMBean_CachingStub.java:1012)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:313)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:143)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:562)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
java:548)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:285)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBean
s(ConfigurationMBeanImpl.java:409)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:287)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.DynamicMBeanImpl.addDeployment(DynamicMB
eanImpl.java:866)
at weblogic.management.internal.DynamicMBeanImpl.addDeployment(DynamicMB
eanImpl.java:853)
at weblogic.management.internal.DynamicMBeanImpl.add(DynamicMBeanImpl.ja
va:838)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:566)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
java:548)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:285)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:439)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:180)
at $Proxy14.addTarget(Unknown Source)
at weblogic.management.mbeans.custom.ApplicationManager.autoDeploy(Appli
cationManager.java:486)
at weblogic.management.mbeans.custom.ApplicationManager.addApplication(A
pplicationManager.java:557)
at weblogic.management.mbeans.custom.ApplicationManager.addApplication(A
pplicationManager.java:504)
at weblogic.management.mbeans.custom.ApplicationManager.poll(Application
Manager.java:428)
at weblogic.management.mbeans.custom.ApplicationManager.poll(Application
Manager.java:380)
at weblogic.management.mbeans.custom.ApplicationManager.update(Applicati
onManager.java:152)
at weblogic.management.mbeans.custom.ApplicationManager.startAdminManage
r(ApplicationManager.java:205)
at weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
nManager.java:120)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:562)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
java:548)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:285)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:439)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:180)
at $Proxy3.start(Unknown Source)
at weblogic.management.Admin.startApplicationManager(Admin.java:1037)
at weblogic.management.Admin.finish(Admin.java:493)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:429)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:170)
at weblogic.Server.main(Server.java:35) -
Error in displaying JSP using Tomcat and xml
Anybody out there can help me solve this problem??? I cant display the table...
The error came out like dis :
org.apache.jasper.JasperException: This absolute uri (http://jakarta.apache.org/taglibs/xtags-1.0) cannot be resolved in either web.xml or the jar files deployed with this application
This is my code :
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<%@ taglib uri="http://jakarta.apache.org/taglibs/xtags-1.0" prefix="xtags" %>
<xtags:parse uri="ViewProj_list.xml" id = "projectList"/>
<xtags:style xml="ViewProj_list.xml" xsl="ViewProj_list.xsl"/>
Please help me asap...
Thank You So Much....Please help me anybody out there...... Please I beg u all help me....
-
Error while precompiling the JSP using weblogic 7.0
Hi
I am trying to precompile jsp file which is there in a war.Main jsp file code includes one more jsp which is there in other folder under defaultweb directory.
While deploying the war i am getting the following error.Can any bosy help me in this regard
<Nov 23, 2002 5:01:28 PM IST> <Error> <HTTP> <101045> <[ServletContext(id=464413
3,name=ArkinTestWeb,context-path=/ArkinTestWeb-3)] translation of /Admin/account
_access.jsp failed: weblogic.utils.ParsingException: nested TokenStreamException
: antlr.TokenStreamException: Could not include ./../includes/sessionStatusPage.
jsp>
<Nov 23, 2002 5:01:28 PM IST> <Error> <Deployer> <149201> <The Slave Deployer fa
iled to complete the deployment task with id 1 for the application ArkinTestWeb.
weblogic.management.ApplicationException: Prepare failed. Task Id = 5
Module Name: ArkinTestWeb, Error: Could not load ArkinTestWeb: weblogic.utils.Ne
stedException: ArkinTestWeb:ArkinTestWeb Failure while Precompiling JSPs: weblog
ic.utils.ParsingException: nested TokenStreamException: antlr.TokenStreamExcepti
on: Could not include ./../includes/sessionStatusPage.jsp - with nested exceptio
n:
[weblogic.utils.ParsingException: nested TokenStreamException: antlr.TokenStream
Exception: Could not include ./../includes/sessionStatusPage.jsp]
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
er.java:657)
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
er.java:548)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(Sla
veDeployer.java:1026)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDep
loyer.java:700)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHan
dler.java:24)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
>
Regards
Anand MohanHi
All jsp pages are under one web application only.Can you help more on this.
Regards
Anand -
Parse error when using ojspc SAMPLE.WAR
Hi,
I am facing oracle.jsp.parse.JspParseException while using ojspc SAMPLE.WAR
Parse error in index.jsp:
oracle.jsp.parse.JspParseException: /index.jsp: Line # 20, <%@ taglib uri="/tags/struts-logic" prefix="logic" %>
Error: org.apache.struts.taglib.logic.IterateTei while reading TLD /WEB-INF/struts-logic.tld
index.jsp contains
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
and web.xml
<taglib>
<taglib-uri>/tags/struts-logic</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
--Kailasone solution: assume the toplink library to be so full of bugs as to be unusable and switch to the hibernate persistance manager where it works fine.
Edited by: pointer2null on Feb 17, 2009 11:02 AM -
Using precompiled JSPs on Sun ONE 6.1 SP5
I"m using precompiled JSPs on Sun ONE 6.1 SP5. I have created a virtual server which has one web application deployed as the default web application located at <server-instance>/webapps/myapp. So in the server.xml it appears as :
<webapp uri="/" path="<server-instnce/webapps/myapp"
I have precompiled the JSPs using the jspc tool and created the directory containing the class files and have put them under WEB-INF/classes directory. I also generated the web.xml file with mappings for all jsps.
My problem is that in my web.xml I have specified the <welcome-file> as index.jsp which used to reside under the <server-instance>/webapps/myapp directory. but now since i'm using precompiled versions i have physically removed that file. And now when i point my browser to the app's URL in the browser, i get the app's directory structure and only when i explicitly point my browser to https://<ip>:port/index.jsp then only the index.jsp page is invoked. I'm confused with this behavior. Do I need to change my docsroot directory to point to where the jsp class files are stored? I dont know what else can be going wrong...
Any help appreciated :D
ThanksOkkay i'll make my question easier.. if i'm using precompiled JSPs i.e. all compiled JSP files (.class files) including index.jsp is in the WEB-INF/classes directory then what is our docroot property supposed to be. Since if I give the document root as <server-instance>/webapps/myapp then it doesnt show the index.jsp that its supposed to when i point my browser to https://<host>:port. Only when I do https://<host>:port/index.jsp the index.jsp servlet is called and the index.jsp page is rendered.... I removed all the jsps physically from my apps folder but when I put only index.jsp there then it does work properly.... so any thoughts on this anyone...
-
What is the best way to display errors to users when using JSPs?
Hello,
Could someone suggest me the best way to display errors to users when using JSPs?
Many thanks in advance.
Rino
Thanks for the code snippet!
Rino
"Deepak Vohra" <[email protected]> wrote:
>
>
>The 'errorPage' attribute of the 'page' directive forwards uncaught run-time
>exceptions
>to an error processing page. For example:
>
><%@ page errorPage="error.jsp" %>
>
>redirects the browser to the JSP page error.jsp if an uncaught exception
>is encountered.
>
>
>Within error.jsp, indicate that it is an error-processing page, via the
>directive:
>
>
>
><%@ page isErrorPage="true" %>
>
>The Throwable object describing the exception may be accessed within
>the error
>page via the 'exception' implicit object.
>
>
><% if (exception != null) { %>
><p> An exception was thrown: <b> <%= exception %>
>
><p> With the following stack trace:
><pre>
>
><%
> ByteArrayOutputStream ostr = new ByteArrayOutputStream();
> exception.printStackTrace(new PrintStream(ostr));
> out.print(ostr);
>%>
></pre>
>
>
>
>"Rino Srivastava" <[email protected]> wrote:
>>
>>Hello,
>>
>>Could someone suggest me the best way to display errors to users when
>>using JSPs?
>>
>>Many thanks in advance.
>>
>>Rino
>
-
Precompiled JSP Compatibility Problem
I am a developer in the Cross Applications Unlimited group. We are experiencing a problem with precompiled jsps in a ADF web application that we have developed. Any help that you can provide with this problem would be much appreciated. Neither Oracle forums nor the internet have yielded any leads to us so far. Here are the specifics of our problem.
In our application, we precompile our JSPs when the EAR is built. The application was initially developed in JDeveloper 10.1.3.2 and worked without problems when deployed to OAS 10.1.3.2. However, our application server MTR recently shifted to OAS 10.1.3.3. We migrated our workspace and projects to JDeveloper 10.1.3.3 and rebuilt our EAR file in JDeveloper 10.1.3.3. We are getting "500 Internal Server Errors" when this new ear file is deployed to OAS 10.1.3.3. The error does not always manifest when running the application. We can login and navigate to JSPs linked directly from our navigation menu (our first level pages). However, in these first level pages are buttons that navigate to second level pages. The error is being seen whenever we try to access one of these second level pages. Everything else about the application works fine. When we don't precompile our JSPs and deploy, the application works fine.
This is the error we find reported in our application logs...
EWCoreViewController: Servlet error
javax.faces.el.PropertyNotFoundException: Error testing property 'inputValue' in bean of type null
at com.sun.faces.el.PropertyResolverImpl.isReadOnly(PropertyResolverImpl.java:274)
at oracle.adfinternal.view.faces.model.FacesPropertyResolver.isReadOnly(FacesPropertyResolver.java:124)
at com.sun.faces.el.impl.ArraySuffix.isReadOnly(ArraySuffix.java:236)
at com.sun.faces.el.impl.ComplexValue.isReadOnly(ComplexValue.java:209)
at com.sun.faces.el.ValueBindingImpl.isReadOnly(ValueBindingImpl.java:266)
Enabling enhanced java logging yields these logs...
<record>
<date>2008-04-09T11:27:25</date>
<millis>1207762045495</millis>
<sequence>258943</sequence>
<logger>com.sun.faces.application.ViewHandlerImpl</logger>
<level>FINE</level>
<class>com.sun.faces.application.ViewHandlerImpl</class>
<method>renderView</method>
<thread>14</thread>
<message>Found no URL patterns mapping to FacesServlet </message>
</record>
<record>
<date>2008-04-09T11:27:25</date>
<millis>1207762045495</millis>
<sequence>258944</sequence>
<logger>com.sun.faces.taglib.jsf_core.ViewTag</logger>
<level>FINE</level>
<class>com.sun.faces.taglib.jsf_core.ViewTag</class>
<method>doStartTag</method>
<thread>14</thread>
<message>Can't leverage base class</message>
<exception>
<message>java.lang.IllegalStateException</message>
<frame>
<class>com.sun.faces.taglib.jsf_core.ViewTag</class>
<method>getComponentType</method>
<line>253</line>
</frame>
Any information anyone can provide would be greatly appreciated.
ThanksHi Ian,
Add this jar file to classpath...use either web interface or directly edit jvm12.conf to modify classpath..
Raj -
Precompiling JSPs Outside Weblogic Home Directory
Using Weblogic Server 9.2. Was able to precompile JSPs in a war file with weblogic.appc at the command line with only the weblogic.jar inside the Weblogic installation directory in my classpath. I then translated this into an Ant task, and because the script may need to run on a box that does not have Weblogic installed, copied weblogic.jar to my build area and included that one in my classpath. It immediately began throwing NoClassDefFound exceptions. Discovered the "Class-Path" list of additional jars in the MANIFEST inside weblogic.jar, searched these jars and found all of the missing classes--except for the last one. The missing class is org/apache/bcelx/classfile/ClassParser, and the error I'm getting is "WARNING: unable to get an input stream for jar:file:D:\APPS\Java\jdk1.5.0_13\jre\lib\rt.jar!" followed by java.lang.NoClassDefFoundError. The error occurs in javelin.java.JavaClassFile.getParseTree() at line 178. There is a BCEL Apache project, but they have no mention of BCELX on their website. Anyone know where I can find this class, or source code for javelin.java.JavaClassFile?
Edited by willhandley at 06/06/2008 10:25 AMI tried the wlappc target:
<target name="_precompile-jsp">
<taskdef name="wlappc" classname="weblogic.ant.taskdefs.j2ee.Appc" classpathref="class.path" />
<echo message="Precompiling JSPs in ${appfile}"/>
<wlappc source="${appfile}" debug="true" verbosejavac="true" verbose="true" runtimeflags="-J-ms1024m -J-mx2048m"/>
</target>
But I keep getting:
[java] [wlappc] java.lang.OutOfMemoryError: Java heap space
We've got quite a lot of jsps in our application. It seems the memory options are being ignored and it seems other people have experienced the same problem with the memory options being ignored when using wlappc and have switched to weblogic.appc.
When I switch to weblogic.appc I don't get the out of memory issue, though of course I'm still getting the initial stack trace reported. Any other ideas? -
Precompile JSP for Application?
Hi,
i had been done the Examples in the NWDS(Help) and have some problems with them.
It isnt possible for me to deploy the war package to my mi without precompiled JSPs.
If i deploy them without precompiled JSPs i will get an exception like this:
Error: 500
Location: /TEST/initial.jsp
Internal Servlet Error:
javax.servlet.ServletException: sun/tools/javac/Main
I use MI 25 SP16 and NWDS Version 2.0.16.
Has anybody some ideas?
Thanx
Message was edited by: Tony HennersdorfHi,
Doublecheck whether the environment variable JAVA_HOME is set, if not set it. Also check if path to jdk bin directory is added to the PATH variable of the user with which the j2ee engine is running.
Also check for javac.exe in winnt\System32 or any winnt subdirectories (if engine is running on Windows) if it is present remove it.
If all of above does not help, try changing the property of servlet_jsp service ExternalCompiler to the exact location of the javac executable on the system where the j2ee engine is running.
I hope this helps.
Myriana -
I have a development project that has been setup to use JDeveloper 10.1.3.5.0 to create and EAR for deployment. The EAR is comprised of three sub applications - appData, appEjb, appWeb. Each subapplication has its own resource to deploy in JDeveloper. The appWeb has an additional resource defined in JDeveloper to deploy the EAR.
I am attempting to move the build process out of JDeveloper and into ant in order to integrate the application with an automated build management framework.
I have been successful in creating an ant build.xml to pull the code from source control, compile the three subapplications, jar the appData, and jar the appEjb. The issue I am having is precompiling the jsp files in the appWeb.
The JDeveloper resource for appWeb.deploy precompiles all the jsps and packages the jsp class files along with all the other appWeb content as part of the appWeb.war.
I thought JDeveloper was utilizing an internal J2EE standalone OC4J. I created a classpath and taskdef as follows
<path id="ojspc.classpath">
<fileset dir="jdevstudio">
<include name="**/*.jar"/>
</fileset>
<pathelement location="${env.JAVA_HOME}/lib/tools.jar" />
<pathelement location="${outDir}/appData"/>
<pathelement location="${outDir}/appWeb"/>
<pathelement location="${outDir}/appEjb"/>
</path>
<taskdef name="ojspc" classpathref="ojspc.classpath" classname="org.apache.tools.ant.taskdefs.optional.jsp.OjspC" />
My original attempts had a much more constrained classpath definition (using the classpath found in the manifest file within j2ee\home\ojspc.jar); however, ant is unable to find the OjspC class and thus I expanded the classpath to include all jar files.
After reading through blogs, forums, and documentation, I am unable to figure out how to define a task within ant to precompile the jsps in my project which mirrors the work being done via the JDeveloper deploy resource. Does anyone know the actual class to use for precompiling the jsps?
Any help is greatly apprciated,
/dclinkGR wrote:
> Is there any ant task for precompiling jsp provided by weblogic 8.1.2?
> (Ant's wljspc doesnt work with 8.1.2).
Have you tired a regular java task that calls the class weblogic.jspc?
A little more direct but I imagine it would work
~Ryan
-
Hi,
I have precompiled my JSPs using the pre-compile option in the browser.(For
eg http://localhost:8080/Myapp/addCustomer.jsp?pre-compile)
I get the java and class files for each of the JSPs. These files are placed
in the work folder of Tomcat(ie
\jakarta-tomcat-5.0.16\work\Catalina\localhost\Myapp\org\apache\jsp).
If I want to deploy the web application as a WAR file (without the JSPs),
where should I place the .class files of the JSPs?
I have made entries in web.xml as shown below for each of the JSP files .
But , I get a 404 error when I try to access the
JSP(http://localhost:8080/Myapp/addCustomer.jsp).
<servlet>
<servlet-name>addCustomer_jsp</servlet-name>
<servlet-class>/Myapp/addCustomer_jsp</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>addCustomer_jsp</servlet-name>
<url-pattern>/Myapp/addCustomer.jsp</url-pattern>
</servlet-mapping>
It is not a must that I deploy it as a WAR file. But, where should I place
the precompiled JSPs so that I can access them from a browser? I am working
on Tomcat 5.
Thanks in advance.Copy Jsps to install_dir/webapps/ROOT and access them with http://localhost/filename
Maybe you are looking for
-
Wired app gives me only grey screen
I purchased the first 2 issues of the Wired magazine. I had a problem with last iPad OS update (3.2.1) and after a full restore, my Wired app is just a big grey screen. I have not the option to download the latest issue as the system thinks I've it a
-
Some question, please, help
Hi all.(sorry for my bad inglish) I try install Sol8 to computer where i have Win2000 instaled. I'm free some disk size(i'm use PartitionMagick) and try install Sol8 to this free disk.(i have IBM Deskstar 30Gb hard drive = 57000 cylinders) Instalatio
-
How to create a new paper size preset in photoshop CS6
Hi, Im trying to create a new paper size preset in PS CS6. I was told if I went to my PS folder, I will find a folder named presets. Inside that folder there should be a text document called "New Doc Sizes.txt" but it's not there. Has anyone any idea
-
HST50: Unix - How Headstart calls forms and reports uppercase/lowercase from a Menu
We are migrating a 'in production' Headstart generated application from Windows to Unix. We had to a little time in setting the lowercase implementation names, setting the prefs to generate lowercase file..... So good so far. When testing the applica
-
Controlling pins on the parallel port
Hey I'm writing a program in labview to controll a matrix card with labview. For that I'll use the parallel port. On the datasheet it says that only one off the pins shall send data serial into the card, and others are pins for update. clk etc. So