Compiler Exception

Exception:
org.apache.jasper.compiler.CompileException: /index.jsp(26,8) Unable to load class com.softwareag.xtools.xapplication.jsptaglib.ModuleTag
at org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:139)
at org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.init(JspParseEventListener.java:819)
at org.apache.jasper.compiler.JspParseEventListener.a
ddGenerator(JspParseEventListener.java:151)
at org.apache.jasper.compiler.JspParseEventListener.handleTagBegin(JspParseEventListener.java:1029)
at org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListener.java:217)
at org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListener.java:212)
at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:840)

Background:
I recently build the xapplication with a new tag “sortby” for directcommand (see the Xapplication contributions), the built went flaw less with no error messages and generated the xapplication.jar in the lib/debug. The build was carried on a windows 2000 platform.

When i try to use this new build (by replacing the xapplication.jar in the WEB-INF of the webapps in solaris 2.8) i get exception:

all insights welcome, kind of stuck here

X-Application Version: 3.1.2Tamino Version : 3.1.1
Platform : Solaris
WebContainer : Tomcat 3.3
JDK Version : 1.3.1
Exception:Background: :rolleyes:

Hi Amit,

is it possible that you carried the xapplication.jar file to a web application created with X-Application 3.1.1?

It seems that just copied the jar file and you have forgotten to copy the xapplication.tld file to your existing web application. This is what I assume in your error Message:

>org.apache.jasper.compiler.CompileException: /index.jsp(26,8) Unable to load class >com.softwareag.xtools.xapplication.jsptaglib.ModuleTag

So, copying the xapplication.tld file from /web-inf to /web-inf/jsp directory should solve your problem.

Tip:
Delete the content of your Tomcat work directory to prevent irritations concerning Tomcat.

Bye,
Thorsten

Hi Thorsten,
thanks for your reply, Yes i was using the 3.1.1 tld with 3.1.2 xapp, corrected that out but still could not make it work. Got a lot of exceptions mainly in error.jsp, i replied to Christain in the Contribution column detailing the exceptions

http://tamino.forums.softwareag.com/viewtopic.php?p=12746

I would paste them again here,

An error occured between lines: 62 and 63 in the jsp file: /Error.jsp

Generated servlet error:
/usr/local/jakarta-tomcat-4.0.1/work/localhost/irith/Error$jsp.java:72: Class org.apache.jsp.NavigationException not found.
if (exception instanceof NavigationException)
^


An error occurred at line: 74 in the jsp file: /Error.jsp

Generated servlet error:
/usr/local/jakarta-tomcat-4.0.1/work/localhost/irith/Error$jsp.java:142: Class org.apache.jsp.InvalidEmbeddedContentException not found.
if (exception instanceof InvalidEmbeddedContentException) {
^


An error occurred at line: 76 in the jsp file: /Error.jsp

Generated servlet error:
/usr/local/jakarta-tomcat-4.0.1/work/localhost/irith/Error$jsp.java:149: Class org.apache.jsp.InvalidEmbeddedContentException not found.
out.print(((InvalidEmbeddedContentException)exception).getEscapedEmbeddedContent());
^
3 errors

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:546)

I think its the migeration pain from 3.1.1 to 3.1.2. Am I right, is there some thing i should know about migeration from 3.1.1 to 3.1.2. Is 3.1.2 backward compatiable ?

All clues appreciated.

Thanks for your time
Regards
Amit

Hi Amit,

our exception handling changed from Version 3.1.1 to 3.1.2.
Therefore the Error.jsp and Back.jsp changed also.

You’ll find the new files in /template. After replacing the existing Error.jsp and Back.jsp generated with X-Application 3.1.1 with the new files, the error should not occur further.
The file changelog.txt in your X-Application folder starts with the chapter “Tips for migration”. This should give you a good view on it.

Hope that this will welp you,

bye
Thorsten
X-Application Version: 3.1.2, 3.1.1
Tamino Version : 3.1.1
Platform : NT, Win2k, Solaris, …
WebContainer : Tomcat 3.3
JDK Version : 1.3.1

Oh,
Going over the xapplication 3.1.2 doc i found prerequisites to be tomcat 3.3 and i am using tomcat 4.01 is that the problem ?
:confused:
regards
amit

Okay the same exception even if i use Tomcat 3.3
any clues ?
amit
:frowning:

Does your JSP page throw an InvalidEmbeddedContentException?

If so, you have to import this exception from
com.softwareag.xtools.xapplication.jsp

I don’t think that Tomcat 4.0 causes this problem. There have been “setPagesize” problems with Tomcat 4.0 and JDK 1.4, but your problem
doesn’t look similar.


Michael

Software AG Germany, Darmstadt

Okay

I read the xapplication_312/changelog.txt, made changes in the imports but still there is one exception and it is
javax.servlet.ServletException: 100: Missing ModuleTag.
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:457)
at org.apache.jsp.index$jsp._jspService(index$jsp.java:156)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)

The source code is
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<%@ page language=“java” contentType=“text/html charset=utf-8”%>
<%@ taglib uri=“http://www.softwareag.com/xtools/xapplication” prefix=“bdm” %>
<%@page import=“java.util." %>
<%@page import="com.softwareag.xtools.xapplication.jsp.taglib.
, com.softwareag.xtools.xapplication.common.,com.softwareag.xtools.xapplication.jsp.,com.softwareag.xtools.xapplication.,com.softwareag.xtools.xapplication.businessdocument., com.softwareag.xtools.xapplication.jsp.*” %>


Sample Error Generating Page




<bdm:module id=“bdProp”/>
<bdm:form module=“bdProp”>



<input type=“text” name=“query(//entry,~=)“size=“15” value=”” style=“margin-left: 1em;”>


</bdm:form>



Would appreciate your comments

Amit

Hi Amit,

I had a short view on your source code,
it seems that you have forgotten to set the closing </bdm:module> tag.

Your code with closing module tag:

<BR><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"<BR>"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><BR><%@ page language="java" contentType="text/html charset=utf-8"%><BR><%@ taglib uri="http://www.softwareag.com/xtools/xapplication" prefix="bdm" %><BR><%@page import="java.util.*" %><BR><%@page import="com.softwareag.xtools.xapplication.jsp.taglib.*, com.softwareag.xtools.xapplication.common.*,com.softwareag.xtools.xapplication.jsp.*,com.softwareag.xtools.xapplication.*,com.softwareag.xtools.xapplication.businessdocument.*, com.softwareag.xtools.xapplication.jsp.*" %><BR><html><BR><HEAD><BR><TITLE>Sample Error Generating Page</TITLE><BR></HEAD><BR><BR><BR><FORM name="the_form" ACTION="list.jsp" METHOD="POST"><BR><bdm:module id="bdProp"><BR><bdm:form module="bdProp"><BR><td colspan=3 valign="top" align="centre"><BR><input type="hidden" name="querysort" value="(title)"/> <BR><input type="hidden" name="queryschema(entry)"/><BR><input type="text" name="query(//entry,~=)"size="15" value="" style="margin-left: 1em;"><BR><INPUT TYPE="image" src="./images/search.gif"><BR></FORM><BR></bdm:form><BR>        </bdm:module><BR></BODY><BR></HTML><BR>



Hope this will help you.

Bye

Thorsten
X-Application Version: 3.1.2, 3.1.1
Tamino Version : 3.1.1
Platform : NT, Win2k, Solaris, …
WebContainer : Tomcat 3.3
JDK Version : 1.3.1

[This message was edited by Thorsten Raab on 07 May 2002 at 07:33.]

thanks so much Thorsten,
well I had seen this (now an error),
<bdm:module id=“bdprop”/> (with a closing quote)
in 3.1.1 and it worked all the time, so did not bother to correct it in 3.1.2. I am sure i would not have been able to find it out myself.
Appreciate all your help Christian, yourself Thorsten, Harald and others.

Regards

ps: i will post the xapplication.jar and xapplication.tld in contributions shortly.