X-Application Version: 3.1.3
Tamino Version : 3.1.1.1
Platform : NT
WebContainer : Tomcat 3.3
JDK Version : 1.3.1_04
Hi,
I have defined a Tamino Schema which had been attached in this message. I successfully ran the X-Application generator to generate the jsp application for the schema.
I could launch the search.jsp successfully in the browser. However, when launching the create.jsp, the following error message occurred in the browser.
=============================================
An error occurred in the application program. Please report the following problem to your webmaster.
Error message: internal error
Help message:
Exception id: 999
Exception Type: ApplicationException
Stacktrace:
XException: id = 999
com.softwareag.xtools.xapplication.common.PreconditionViolation
parent type node ‘element’ must be complex type
at com.softwareag.xtools.xapplication.businessdocument.Schema.lookupElement(Schema.java:503)
at com.softwareag.xtools.xapplication.businessdocument.PathFragment.isValidForOptionals(PathFragment.java:499)
at com.softwareag.xtools.xapplication.businessdocument.Path.isValidPathForOptionals(Path.java:316)
at com.softwareag.xtools.xapplication.businessdocument.Path.touchDescendant(Path.java:212)
at com.softwareag.xtools.xapplication.businessdocument.BusinessNodeImpl.touchDescendants(BusinessNodeImpl.java:507)
at com.softwareag.xtools.xapplication.jsp.taglib.ContextTag.getElementValue(ContextTag.java:193)
at com.softwareag.xtools.xapplication.jsp.taglib.FieldTag.doStartTagCore(FieldTag.java:100)
at com.softwareag.xtools.xapplication.jsp.JspTag.doStartTag(JspTag.java:142)
at create_3._jspService(create_3.java:1869)
at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
at org.apache.tomcat.core.Handler.invoke(Unknown Source)
at org.apache.tomcat.core.Handler.service(Unknown Source)
at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
at org.apache.tomcat.core.ContextManager.service(Unknown Source)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown Source)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)
at java.lang.Thread.run(Thread.java:479)
================================================
At the same time, there was an error message in the tomcat server console. Just like this:
================================================
2002-09-06 11:57:35 - Ctx(/SchoolOrInstitution) : Compiling: /create.jsp to crea
te_2
invalid xPath:id = 172 arg[0] = while processing path ‘xapp:child(2)/EndDate’:id
= 172 arg[0] = occurrence node '/SchoolOrInstitution/DatesOfAttendance/xapp:occ
(1)/xapp:seq(1)/xapp:occ(1) can not switch to element node ‘EndDate’ at position
0
InvalidXPathException: id = 172 arg[0] = while processing path ‘xapp:child(2)/En
dDate’:id = 172 arg[0] = occurrence node '/SchoolOrInstitution/DatesOfAttendance
/xapp:occ(1)/xapp:seq(1)/xapp:occ(1) can not switch to element node ‘EndDate’ at
position 0
id = 172 arg[0] = while processing path ‘xapp:child(2)/EndDate’:id = 172 arg[0]
= occurrence node '/SchoolOrInstitution/DatesOfAttendance/xapp:occ(1)/xapp:seq(1
)/xapp:occ(1) can not switch to element node ‘EndDate’ at position 0
at com.softwareag.xtools.xapplication.businessdocument.Path.walkStructur
e(Path.java:162)
at com.softwareag.xtools.xapplication.businessdocument.BusinessNodeImpl.
getDescendant(BusinessNodeImpl.java:410)
at com.softwareag.xtools.xapplication.jsp.taglib.ChoiceTag.processCondit
ion(ChoiceTag.java:91)
at com.softwareag.xtools.xapplication.jsp.taglib.ConditionTag.doStartTag
Core(ConditionTag.java:96)
at com.softwareag.xtools.xapplication.jsp.JspTag.doStartTag(JspTag.java:
142)
at create_3._jspService(create_3.java:1838)
at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
at org.apache.tomcat.core.Handler.invoke(Unknown Source)
at org.apache.tomcat.core.Handler.service(Unknown Source)
at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
at org.apache.tomcat.core.ContextManager.service(Unknown Source)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(
Unknown Source)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
Source)
at java.lang.Thread.run(Thread.java:479)
2002-09-06 11:57:40 - Ctx(/SchoolOrInstitution) : Compiling: /Error.jsp to Error
_0
================================================
Can anyone help me to solve the problem? Thanks very much!
Andy
[This message was edited by Christian Freytag on 21 Mar 2003 at 12:21.]
test_endDate.TSD (2.42 KB)
Hello,
I installed your application and could reproduce your error. The reason is a bug when generating optional fields for new document. The element
?EndDate? of the element ?DatesOfAttendance? was not created correctly. I could fix this error.
The attached zip file contains
a) the modified source code of the class Schema.
Therefore, the following file of your existing X-Application installation will be overwritten:
- xapplication_313/src/com/softwareag/xtools/xapplication/businessdocument/Schema.java
If you want to install this fix execute the following steps:
Installation:
1. Extract the zip into the same directory where you extracted the xapplication_3_1_3.zip (parent directory of your xapplication_313).
2. Open a console.
3. Change to your directory xapplication_313.
4. Invoke ‘build’.
5. If started, shutdown your Tomcat.
6. Copy the new jar file ‘…\xapplication_313\lib\opt\xapplicationjar’ into the WEB-INF\lib directory of your generated application.
7. Startup Tomcat
8. Open an Internet Brower and invoke your application
I hope it helps you.
Bye,
Christian.
SchemaFix.zip (14 KB)
Hi,
Thanks for your help! I will try it later.
Andy
Hello,
this bug is fixed for X-Application 4.1.1. Please be aware that the handling for optional nodes differs to the former version.
While X-Application 3.1.3 created ‘minimal’ new documents, X-Application 4.1.1 creates new documents with all of its optional nodes (maximal documents). To switch this behavior, the limitaions section and the readme file contain a topic how to do this.
Furthermore, applications generated by X-Application 4.1.1 have functionality to add / delete optional node on the create and modify page.
Bye,
Christian.