X-Application Version: 3.1.3
Tamino Version : 3.1.1.1
Platform : Win2k server
WebContainer : Tomcat 3.3
JDK Version : 1.3.1_04
Hi,
I tried to use the X-Application Generator tool through X-Plorer to generate a jsp application from an existing schema which is quite COMPLICATED (I attached the .tsd file with this message). Unfortunately, InvalidSchemaException was thrown. I COULD generate jsp applications from some SIMPLE schemas. Can anyone help me to solve the problem? Thanks a lot.
Here is the error message:
==========================================================
Processing status
Application directory created--------------------------------------------------------------------------------Error: 500
Location: /xappgen/GuiServletInternal Servlet Error:
InvalidSchemaException: duplicate element decl: Id
com.softwareag.xtools.xapplication.businessdocument.InvalidSchemaException
duplicate element decl: Id
at com.softwareag.xtools.xapplication.businessdocument.Schema.addElementDecls(Schema.java:373)
at com.softwareag.xtools.xapplication.businessdocument.Schema.addElementDecls(Schema.java:379)
at com.softwareag.xtools.xapplication.businessdocument.Schema.addElementDecls(Schema.java:379)
at com.softwareag.xtools.xapplication.businessdocument.Schema.addElementDecls(Schema.java:379)
at com.softwareag.xtools.xapplication.businessdocument.Schema.addElementDecls(Schema.java:379)
at com.softwareag.xtools.xapplication.businessdocument.Schema.(Schema.java:358)
at com.softwareag.xtools.xapplication.businessdocument.Schema.read(Schema.java:157)
at com.softwareag.xtools.xapplication.generator.Generator.readSchema(Generator.java:683)
at com.softwareag.xtools.xapplication.generator.Generator.(Generator.java:290)
at com.softwareag.xtools.xapplication.generator.Generator.(Generator.java:257)
at com.softwareag.xtools.xapplication.generator.GuiServlet.generateApplication(GuiServlet.java:594)
at com.softwareag.xtools.xapplication.generator.GuiServlet.callGenerator(GuiServlet.java:520)
at com.softwareag.xtools.xapplication.generator.GuiServlet.fillLayout(GuiServlet.java:415)
at com.softwareag.xtools.xapplication.generator.GuiServlet.processRequest(GuiServlet.java:325)
at com.softwareag.xtools.xapplication.generator.GuiServlet.doPost(GuiServlet.java:148)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
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)
==========================================================
Andy
convertFromSchema_subsetOnly_new.TSD (75.1 KB)
Hello,
I checked your schema. The problem is the local element declarations which are identical. I changed the schema by extracting identical element declarations and used a reference when the element was used within another element declaration.
Example: Instead of multiple inner declarations for ?Description?
<BR><element ...><BR> ...<BR> <element name = ?Description? type = ?xs:string? /><BR> ...<BR></element><BR>...<BR><element ...><BR> ...<BR> <element name = ?Description? type = ?xs:string? /><BR> ...<BR></element><BR> </pre><BR><BR>the reference to a single declaration on top level is used<BR><BR><pre class="ip-ubbcode-code-pre"><BR><element ...><BR> ...<BR> <element ref = ?Description? /><BR> ...<BR></element><BR>...<BR><element ...><BR> ...<BR> <element ref = ?Description? /><BR> ...<BR></element><BR><BR><element name = ?Description? type = ?xs:string? /><BR>
I posted the modified schema. I was able to create the application, but the schema is very large so the generated JSP pages are too large for the compiler. I could not invoke the search page. Therefore, my tip:
(1) edit the struture.xml file created by the generator, by deleting the fields which are not relevant for search / display / modify …
(2) and regenerate the application.
Remark: the element ?RevisionDate? didn?t have a type attribute. I added ?xs:string?.
Bye,
Christian.
convertFromSchema_subsetOnly_modified.TSD.xml (41.3 KB)
Hi,
Thanks for your kind help. I will try to modify the structure.xml file later.
Andy
Hi,
After I tried to eliminate some input fields in the structure.xml file and successfully regenerated the jsp application using X-Application generator tool, unfortunately, there is an error thrown when runing the search.jsp file. Could anyone help to solve the problem please? I attached the original and the modified structure.xml files, as well as the regenerated search.jsp file in this message for reference. I only edited the “search” part of the structure.xml file.
Thanks for your kind help.
Here is the error message:
===========================================================
Error: 500
Location: /Resume/search.jsp
Internal Servlet Error:
java.lang.VerifyError: (class: search_17, method: _jspService signature: (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V) Illegal target of jump or branch
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:232)
at org.apache.tomcat.facade.ServletHandler.getServlet(Unknown Source)
at org.apache.tomcat.facade.ServletHandler.preInit(Unknown Source)
at org.apache.tomcat.facade.ServletHandler.init(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)
===========================================================
Andy
referenceFiles.zip (61.4 KB)
Hello,
I looked into your attached zip file, I guess that the JSP for search is too large. The error messages indicates that the generated Java code contains a jump over the 65k limit.
Could you reduce the content of the search page within the structure.xm file and try it again?
My propose, start with maximal 20 fields for the search page.
If your final application requires more that the 20 input, you can increase the number of input tags manually. You can also integrate sub-pages.
Bye,
Christian.
Hi,
Thanks for your suggested solutions. I will try them.
Andy