No_Such_Schema Error

X-Application Version: 3.1.3.2
Tamino Version : 3.1.1.4
Platform : Win2k
WebContainer : Tomcat 3.3a
JDK Version : 1.4.0

Hi Moderator,
I generated a web application based on schema “User”, I amended a few schema-based operation paths between the … tags in structure.xml, as I found them incorrect.

When I run the application, first I load the page “search.jsp”, and then click the link “Create”. This gives me the following error,

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.businessdocument.InvalidSchemaException
no such schema: User
at com.softwareag.xtools.xapplication.businessdocument.Schema.read(Schema.java:155)
at com.softwareag.xtools.xapplication.businessdocument.SchemaCache.lookup(SchemaCache.java:70)
at com.softwareag.xtools.xapplication.businessdocument.BusinessDocumentWorkspace.create(BusinessDocumentWorkspace.java:253)
at com.softwareag.xtools.xapplication.plugin.StandardWorkspacePlugin.createDocument(StandardWorkspacePlugin.java:292)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.softwareag.xtools.xapplication.plugin.Action.invoke(Action.java:180)
at com.softwareag.xtools.xapplication.plugin.Dispatcher.execute(Dispatcher.java:158)
at com.softwareag.xtools.xapplication.jsp.SessionContext.processWorkspaceAction(SessionContext.java:389)
at com.softwareag.xtools.xapplication.jsp.taglib.ModuleTag.processDocumentAction(ModuleTag.java:503)
at com.softwareag.xtools.xapplication.jsp.taglib.ModuleTag.doStartTagCore(ModuleTag.java:117)
at com.softwareag.xtools.xapplication.jsp.JspTag.doStartTag(JspTag.java:142)
at create_1._jspService(create_1.java:155)
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:536)

I cannot interpret this error. Can u explain to me which part goes wrong? I have attached “User.TSD” and “structure.xml” in the zip file.
This part is quite critical to our current project, I need to have a perfect understanding in virtually everything. So appreciate your help very much.

Thanks,
Wang Nan

[This message was edited by Christian Freytag on 21 Mar 2003 at 12:31.]
structureAndUser.zip (3.81 KB)

Hello,

I checked the source code of X-Application and found one place within the Schema class where I could add a check to fix a bug of ‘touchDescendant’. ‘touchDescendant’ is responsible to create optional fields if they appear in form of a select expression of an edit tag within a modify or create page.

Although there is still a bug a could not fix I hope this fix gives you the possibility to use X-Application with you schema.

The fix is a zip file
- xapplication_313_touchDescendant.zip
– Extract this zip file into the directory where you extracted xapplication_313.zip.
– Open a console and change to the xapplication_313 directory
– invoke the command ‘build’ to create a new xapplication_313.jar (look into the lib directory of the xapplication_313)
– replace the existing xapplication_313.jar of your application (WEB_INF/lib/xapplication_313.jar) by the new one.

Besides the zip file for fixing the bug the attached zip file includes a structure file and a create.jsp.
Within the structure file I changed the path expressions within

<XAppGenWeb>
  ...
  <create>
    ...
  </create>
  ...
</XAppGenWeb>



I used the regenerate option to build the create.jsp.

- replace the existing structure.xml of your application by copying this structure file into your application directory
- invoke the generator and use the ‘regenerate’ option to rebuild the jsp (!! before, save existing JSPs build by the generator that you changed manually).

The resulting create.jsp should be the same as I sent you.

To adapt the other JSPs (view, modify, …) look into the create section of the structure file and adapt the path of the select attribute in the same way for the sections … … … and regenrate the JSPs.

Bye,
Christian.
fix-and-solution-2003-01-20.zip (19.8 KB)

Hi Christian,

Thanks for the big trouble you took for fixing my problem. Regret to tell you that I still haven’t got time to trial run your codes because as the things progressed, old problems were either worked around or buried and new problems appear, simply no time for a pant, :frowning:

I will trial run your codes once I get time, and hope to master something low-level in terms of x-application’s JAVA API.

Thanks again, Christian!


Sincerely,
Wang Nan

Hello,

the bug mentioned before is solved by X-Application 4.1.1.

Please be aware, that the method touchdescendant is not longer available and the handling for optional nodes changed.

Application generated with X-Application 4.1.1 offer actions to add / remove optional nodes (attributes or elements).

Bye,
Christian.