Application Exception 999 running Phone Demo

X-Application Version: 4.1.1
Tamino Version : 4.1.4
Platform : Win2k
WebContainer : Tomcat 4.1.18
JDK Version : 1.3.1_07

Use the phone demo/test files from the Tamino directory “…/documentation/examples/phone”, create the Schema using “TelephoneSchema.tsd” and load the data “Telephone.xml” via the Tamino Schema Editor.

Now generate and run using X-Application. Notice the generated initial screen doesn’t show any input fields. When I click on the “create” hyperlink or “search” button I get the following message:

“Exception id: 999
Exception Type: ApplicationException

XException: id = 999
ambiguous element: Telephone
at com.softwareag.xtools.xapplication.schema.Schema.lookupElementEverywhere(
at com.softwareag.xtools.xapplication.businessdocument.SchemaSet.lookup(
at com.softwareag.xtools.xapplication.businessdocument.BusinessDocumentWorkspace.getSchema(
at com.softwareag.xtools.xapplication.businessdocument.BusinessDocumentWorkspace.getSchema(
at com.softwareag.xtools.xapplication.businessdocument.BusinessDocumentWorkspace.processQuery(
at com.softwareag.xtools.xapplication.businessdocument.BusinessDocumentWorkspace.xquery(
at com.softwareag.xtools.xapplication.plugin.StandardWorkspacePlugin.xqueryDocuments(
at java.lang.reflect.Method.invoke(Native Method)
at com.softwareag.xtools.xapplication.plugin.Action.invoke(
at com.softwareag.xtools.xapplication.plugin.Dispatcher.execute(
at com.softwareag.xtools.xapplication.jsp.SessionContext.processWorkspaceAction(
at com.softwareag.xtools.xapplication.jsp.taglib.ModuleTag.processDocumentAction(
at com.softwareag.xtools.xapplication.jsp.taglib.ModuleTag.doStartTagCore(
at com.softwareag.xtools.xapplication.jsp.JspTag.doStartTag(
at org.apache.jsp.browse_jsp._jspx_meth_xapp_module_0(
at org.apache.jsp.browse_jsp._jspService(
at org.apache.jasper.runtime.HttpJspBase.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.jasper.servlet.JspServletWrapper.service(
at org.apache.jasper.servlet.JspServlet.serviceJspFile(
at org.apache.jasper.servlet.JspServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(
at org.apache.catalina.core.StandardPipeline.invoke(
at org.apache.catalina.core.ContainerBase.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(
at org.apache.catalina.core.StandardPipeline.invoke(
at org.apache.catalina.core.ContainerBase.invoke(
at org.apache.catalina.core.StandardContext.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(
at org.apache.catalina.core.StandardPipeline.invoke(
at org.apache.catalina.core.ContainerBase.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(
at org.apache.catalina.core.StandardPipeline.invoke(
at org.apache.catalina.core.ContainerBase.invoke(
at org.apache.coyote.tomcat4.CoyoteAdapter.service(
at org.apache.coyote.http11.Http11Processor.process(
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(
at org.apache.tomcat.util.threads.ThreadPool$


I had a look at the telephone example and the telephone.tsd file. This schema is not supported by X-Application due to the element definition of ‘telephone’.

There are two definitions ‘telephone’: One to define the root element (doctype) of the documents, another one is nested within the element definition of ‘Address’.

If you edit the existing tsd file and rename the second definition of ‘telephone’ in ‘phone’. Then, this problem would be solved and the generator could produce a running application.

If you just want to try out X-Application and its generator, my propose is to use another example. That will be easier than handle the problem with duplicate element definitions.

However, if you want to use X-Application in context with schemas containing duplicate element definitions, we could give you support for manual adaptations of the generated JSPs. The workaround in this case would be to abandon the schema support of X-Application.

Hope, that responds your question and helps you to proceed with X-Application.


Hi Christian.

You were right about the embedded element “Telephone”. After removing it, the exception no longer occurs.

The other problem still exists; can you take a look at that? Its where the generated application when it first comes up should show all the elements/attributes of the Schema as input fields. What I get is no fields, just two “Search” buttons. Also, clicking on “Create” doesn’t show any fields either, just a long string of text.

I can send you the Schema and data if required.




please send me your schema and the test data. I will try to reproduce the problem on my PC.

Many thanks.



Thanks for the schema / data file you sent me directly via mail. I have recognized that you renamed the second definition of ‘Telephone’ into ‘Telephone_Number’. I used your modified schema to create an application with X-Application’s generator.

I had the same effect as you described within your post:

  • The search page does not contain any search field.
  • The create page contains add / remove for the content elements of the root element and contains also the links to switch between the alternatives of the entry, but there is no input field.

So, I could reproduce the problem.

The reason for this problem is the definition of the content fields. All element definition (EntryId, LoginName, …) look like this:
  <xs:complexType mixed = "true"></xs:complexType>

The option ‘mixed’ means, that the content of an element could be a mixture of normal text and child elements defined for this complex type. However, the complex type is empty and there are no children the text could be mixed with.

For the generator does not consider this situation. It does not generate an input field for an empty complex type with option mixed=‘true’.

I fixed this problem within the java class ‘’ that is attached to this post. Please, follow the instructions below to add the fix to your X-Application:

  • Extract the attached zip file into the directory where you extracted the X-Application zip file. In this way, the existing java source file will be replaced.
  • Open a console and change to the directory
  • Invoke the command ‘build quick’
  • Shut down Tomcat if necessary
  • Invoke the command ‘build1 generator’
  • Start Tomcat
  • Generate your application again:
    - Don’t define the schema just enter for
    Schema -> Name : ‘TelephoneSchema’
    Schema -> Doctype : 'Telephone’
    and click the ‘Generate’ Button.

Hope, it the fix will work also on your maschine.

Christian. (3.65 KB)

Hi Christian.

Thanks for the fix, it worked! The Search page now successfully generates and displays elements/attributes from the Schema.

I did notice a couple of cosmetic issues and it would be useful to understand these.

First, did you notice that the Search page shows ‘Choice n’ against each generated field. This might be appropriate for certain cases but is there an easy way to turn this off?

Secondly, if you click on the Search button I get the first 10 documents displayed but with no information other than the document number or ino:id. Clicking on one of these correctly retrieves the document contents but also a whole bunch of unnecessary tags. Again, can this be switch off? I’ve attached a picture of this.

Thanks again,



Yes, you can make individual adaptations for each application to change the default output of the generator. Have a look into the directory of your generated application. There you will find a file ‘structure.xml’. It contains the fields and headings to be displayed on each page. By changing its entries and regenerating the application, you can adapt the content of the JSPs.

There is a chapter within the documentation about the structure file.

Generator - Customization > Customizing the Structure File

For example:
To get rid of the choice output

choice 0:


choice 1:
</pre><BR><BR>just remove the choice tag of around the element tag within the section 'search'<BR><BR><pre class="ip-ubbcode-code-pre">
  <!-- remove the choice tags within this section -->
</pre><BR><BR>To modify the content of  the browse page adapt the elements of the section <BR><BR><pre class="ip-ubbcode-code-pre">
  <!-- add the fields to be displayed for each browse entry -->

Then, enter the directory / schema / doctype of the existing application and use the regenerate option of the generator.