XML mapping inheritance problem; missing class indicator field

Hi!
I am currently working on a project which involves mapping a large domain model on a XSD schema. For this we use Toplink 10.1.3.1 which is mostly great. But now I have a problem while wanting to use class inheritance.
In my XSD I have the following defined
<xs:complexType name="Traject">
     <xs:sequence>
          <xs:element name="SoortTraject" type="SoortTraject"/>
     </xs:sequence>
</xs:complexType>
<xs:complexType name="SpecialTraject">
     <xs:complexContent>
          <xs:extension base="Traject">
               <xs:sequence>
                             [some elements] 
               </xs:sequence>
          </xs:extension>
     </xs:complexContent>
</xs:complexType>My XML is an implementation of this XSD and looks like this
<Trajecten>
        <Traject xsi:type="SpecialTraject">
                 [implementation of the elements]
         </Traject>
</Trajecten>My domain model corresponts to the XSD, so there is a Traject object and an inherited SpecialTraject object.
In the mapping I used the Advanced properties->inheritance on both descriptors telling the Traject descriptor that it was the 'Root Parent Descriptor' ('Use class indicator field' -> 'use XML Schema Type attribute', 'Use class indicator dictionary') and the SpecialTraject what it Child Descriptor was ('Traject').
When I test my mapping it always results in the same error (no matter how I configure this inheritance mapping). It says :
[TOPLINK-44] missing class indicator field
Descriptor: XMLDescriptor(Traject --> [])What am I doing wrong? Does anybody know a sollution?
Best regards,
Jouke Stoel
Developer

This is the changed XML descriptor file. When I deploy the file it automaticly overrides the old file so it ain't possible that I was still using the wrong file
<toplink:class-indicator-mappings>
    <toplink:class-indicator-mapping>
        <toplink:class>Traject</toplink:class>
        <toplink:class-indicator xsi:type="xsd:string">Traject</toplink:class-indicator>
    </toplink:class-indicator-mapping>
    <toplink:class-indicator-mapping>
        <toplink:class>SpecialTraject</toplink:class>
        <toplink:class-indicator xsi:type="xsd:string">SpecialTraject</toplink:class-indicator>
    </toplink:class-indicator-mapping>
</toplink:class-indicator-mappings>I have posted the stacktrace but I had to translate a bit because my exception was in Dutch :)
Locale is a great invention
Exception [TOPLINK-44] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.DescriptorException
Exception description: Missing class indicator field of database row [UnmarshalRecord()].
Descriptor: XMLDescriptor(Traject --> [])
     at oracle.toplink.exceptions.DescriptorException.missingClassIndicatorField(DescriptorException.java:887)
     at oracle.toplink.internal.ox.QNameInheritancePolicy.classFromRow(QNameInheritancePolicy.java:84)
     at oracle.toplink.internal.ox.XMLRelationshipMappingNodeValue.processChild(XMLRelationshipMappingNodeValue.java:13)
     at oracle.toplink.internal.ox.XMLCompositeCollectionMappingNodeValue.startElement(XMLCompositeCollectionMappingNodeValue.java:62)
     at oracle.toplink.ox.record.UnmarshalRecord.startElement(UnmarshalRecord.java:352)
     at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1288)
     at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336)
     at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
     at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:205)
     at oracle.toplink.internal.ox.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:189)
     at oracle.toplink.internal.ox.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:147)
     at oracle.toplink.ox.XMLUnmarshaller.unmarshal(XMLUnmarshaller.java:228)
.

Similar Messages

  • Missing class indicator field from database row

    Hi,
    I have following problem :
    There is a class inheritance with root interface and 4 subclasses, they are initialized with class indicator field. If I use ReadAllQuery with an interface or some of concrete class as search class - it is working perfect, but if I try to build query with custom selected fields (addPartialAttribute) I always get an error - Missing class indicator field from database row.
    AFAIK This field have not to be mapped in Workbench to real table column, how can I tell TopLink that I will read this indicator field too by reading some custom fields ? I thought TopLink reads such fields automatically, like it does it with primary keys.
    Thank you
    Maksim

    This sounds like an issue with our partial attribute queries and inheritance as the type indicator column must always be read. Can you map the type indicator to a read-only attribute (mark mapping as read-only) and include this in your list of attributes as a work-around?
    Doug

  • Composite invoking Spring Context errors with Missing class indicator field

    Hi. I’m working on a composite with a Spring Context component that is referenced in a BPMN process and have run into some issues and I was hoping you may have some insight.
    I’m able to deploy the composite successfully, however when I try testing it on the SOA Server, it fails with the exception below:
    <auditQueryPayload auditId="17008" ciKey="12">
    <dataState>
    <dataObject name="FaultMessage" isBusinessIndicator="false">
    <value> com.oracle.bpel.client.BPELFault: faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault} messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage} parts: {{ summary=<summary>Exception [EclipseLink-44] (Eclipse Persistence Services - 2.3.1.v20111018-r10243): org.eclipse.persistence.exceptions.DescriptorException Exception Description: Missing class indicator field from database row [UnmarshalRecord()]. Descriptor: XMLDescriptor(com.bea.infra.events.ExtendedData --> [DatabaseTable(ns2:ExtendedData)])</summary> ,detail=<detail> Exception Description: Missing class indicator field from database row [UnmarshalRecord()]. Descriptor: XMLDescriptor(com.bea.infra.events.ExtendedData --> [DatabaseTable(ns2:ExtendedData)])</detail>} </value>
    </dataObject>
    </dataState>
    </auditQueryPayload>
    The class referenced in the error, ExtendedData, is a very simple, abstract class. Here it is:
    @XmlSeeAlso( { AssetUnregistered.class, ExtractionReassign.class,
    RelatedAssetRegister.class, ExtractionSubsequentNotify.class,
    ExtractionIntialNotify.class, AssetSubmission.class,
    ExtractionStatusChanged.class, MultiUse.class,
    ALERExtendedData.class })
    public abstract class ExtendedData {
    Do you have any thoughts or would know someone who could help?
    Thanks,
    Mike

    I've tried adding the jar to the classpath, installing the jar on the weblogic server, adding all the dependencies, and adding the jar to the project sourcepath. None of these worked either. Any Help would be appreciated.

  • Inheritance, class indicator field and subclasses

    Hi
    Ok, I have an inheritance model with a base class (let's call it BaseClass), which is abstract. Every subclasse of BaseClass have a different implementation, but no additional attribute. I don't want to map all subclasses in Mapping Workbench, so I mapped BaseClass and configured inheritance to use a field as a class indicator (using the java class name).
    Now, to read all subclasses in one single query, I do this:
    Collection result = session.readAllObjects(BaseClass.class);
    Now the problem is that TopLink generates the following SQL:
    SELECT JAVA_CLASS_NAME, [...] FROM BASE_CLASS_TABLE WHERE JAVA_CLASS_NAME = 'com.[...].BaseClass'
    Well, obviously this is not what I expected, since this will not return anything! I tried to use the "Read Subclasses on Query' option, to no avail. Am I missing something here? I thought this would pretty staight forward... :-(
    TIA
    Regards
    Eric Morin

    You must always map all subclasses that you wish to persist/read. If TopLink does not have a descriptor for a class it will persist/instantiate it as its superclass descriptor class.
    If you explictly configured your descriptor to read subclasses on queries in code (descriptor.getInheritancePolicy().readSubclassesOnQueries()) it would generate the correct SQL that you want, however it would return you all instances of the root class, not the subclasses. The only way to read subclasses is to map them.
    If you don't want to have to map all of the classes in the Mapping Workbench, you could just add the descriptor's for the subclasses in code.
    i.e.
    List allSublcasses = getAllMySubclasses();
    for (Iterator iterator = allSublcasses.iterator(); iterator.hasNext(); ) {
    Descriptor descriptor = new Descriptor();
    Class subclass = (Class) iterator.next();
    descriptor.setJavaClass(subclass);
    descriptor.getInheritancePolicy().setParentClass(subclass.getSuperClass());

  • Inheritance problem: base class does not see stage instances

    I'm writing a series of Search windows for an application. I create the FLA files on the stage, each has 3 simple buttons: next_btn, prev_btn, and close_btn. Those all have event listeners which call findNext(), findPrev() and closeWin() respectively. Each search window looks for different things, some with a text box and some with a combo, etc.
    So I have a base class com.search that extends Sprite and adds the eventListeners at startup (actually, on addedToStage). Like this:
    function isAddedToStage(evt:Event){
       next_btn.addEventListener("click",findNext);
       prev_btn.addEventListener("click",findPrev);
       close_btn.addEventListener("click",closeWin);
    Then I write the appropriate find functions in each derived class.
    For example, I have
    package com {
         import com.search;
         class searchText extends search {
    In my FLA file, I set the class to com.searchText.
    But when I compile and run the window, I get runtime errors:
    ReferenceError: Error #1065: Variable next_btn is not defined.
    at com::search()
    at com::searchtext()
    If I add the event listeners in the derived class rather than the base, it works fine. But that seems to defeat the purpose of inheritance, plus it infers that I won't be able to derive new classes/swfs from those derived classes.
    So the question is, how does one reference objects created on the stage from a base class of that document's class?

    Found it. After messing around with trying dynamic classes and overriden functions that returned the desired button (that worked, but was ugly.)
    Simply and silly once you know how.
    You have to explicitly reference the stage objects (or any newly declared methods or properties) in the derived class as members of "this" in the base class - so:
    class Search {
    function isAddedToStage(evt:Event){
       this.next_btn.addEventListener("click",this.findNext);
       this.prev_btn.addEventListener("click",this.findPrev);
       this.close_btn.addEventListener("click",closeWin);
    function closeWin(e:Event){
    and then create the buttons on stage in the FLA using the derived class.
    You can also declare the event handling functions in the base class as empty functions and then override them in the derived classes. Or fill in the functions in the base class to throw a runtime error, and then override - that's as close to an abstract class as you can get, I think.

  • Primary Key Class Indicator mapping

    Hi
    We are using a Class Inidcator Field as described within Toplink documentation.
    We have encountered a problem, relating to the Class Indicator field not being populated within the Object within the cache,
    For example, the creation of one of our indictated objects successfully inserts the relevant class indicator value in the database, but the Object in the cache does not have the value set. This casues issues when attempting to identify the object in the cache.
    When re-reading the documentation at http://www.oracle.com/technology/products/ias/toplink/doc/1013/main/_html/descun007.htm#sthref2899 I noted the following line:
    "If the indicator field is part of the primary key, define a write-only transformation mapping for the indicator field (see Chapter 48, "Configuring a Relational Transformation Mapping"). "
    However following the documentaion trail, to http://www.oracle.com/technology/products/ias/toplink/doc/1013/main/_html/relmapun013.htm#CHDDBJJJ there is a statement:
    "Use transformation mappings only when mapping multiple fields into a single attribute. Because of the complexity of transformation mappings, it is often easier to perform the transformation with a converter or getter and setter methods of a direct-to-field mapping. See Chapter 38, "Configuring a Relational Direct-to-Field Mapping" for more information."
    Is there any definitive answer to correctly use a Class Indicator on a Primary Key field.
    Many Thanks
    Marc

    Hi,
    I'm still really struggling to find the correct way of implementing the mapping, as described within the documentation.
    As per the amended documentation quoted above, we are using a Primary Key field as the indentifier of a Class Indicator Mapping, and should therefore implement a "Read-Only Transformation Mapping for the indicator field".
    The explanation of how to implement Transformation Mappings in section 33-15,
    stipluates that both the "attribute transformer" - reading from the database,
    and the "field transformer" must be specified. By default, this would appear to
    be describing a read and write transformational mapping. Please correct me, if
    I am wrong.
    Therefore, we have currently found no method of implementing a "Read Only"
    transformational mapping for a Class Indicator Mapping.
    Any assistance in advising of the method of implementing this, would be greatly appreciated.
    Regards
    Marc

  • Using inheritance and class indicator

    Hi
    I need help doing the following :
    I have a table with 2 types of data. I want to map it to 2 subclasses of the same superclass using the class indicator on an existing column.
    The problem is that i want to map all rows with value = 1 to 1 subclass and the rest of the rows (value != 1) to the second subclass.
    Can this be done ?
    Thanks
    Inbal

    Inbal,
    You will need to create a static method that takes a DatabaseRow and returns a Class, then specify this method using the api InheritancePolicy.setClassExtractionMethodName(String). In this method you will need to get the class indicator field from the databaseRow and return the Class that you want. You can also specify the class extraction method through the Mapping Workbench.
    Karen

  • Inheritance - Changing Persisted Class

    Hello,
    I am using inheritance on the following class hierarchy. I am using a class indicator field.
    AbstractBase
    -->Concrete_1
    -->Concrete_2
    I have an existing Concrete_1 and need to change it to Concrete_2, but without deleting Concrete_1 and creating a new Concrete_2. Is there a way to do this?
    If I instantiate a new Concrete_2 Toplink will consider it a new object and insert a DB row. How can I force Toplink to use the same DB row and just update the class indicator field?
    Any suggestions are appreciated.

    In my experience when you run into this scenario you most likely do not want to use inheritance. This type of 'become' operation is not support by TopLink and to the best of my knowledge any of the other leading ORM solutions. It definitely is not supported in the new EJB 3.0 persistence specification.
    I would recommend using a single class with a separate relationship to the dynamic part of the model that needs to change.
    If your example became:
    AbstractEmployee
    --&gt;FullTimeEmployee
    --&gt;PartTimeEmployee
    And you had a use-case that required employees to change between these types then I would change the model to be:
    Employee - EmploymentType
    The EmploymentType could be a custom type (enumeration) that is coded off of a single indicator field (as you would have used in the inheritance indicator). Then you could change the employment type and only this field in the same row would be updated. This also allows you to code and custom behavior into the EmploymentType class.
    Note: If this class requires multiple columns you could use an aggregate object mapping.
    I hope this helps,
    Doug

  • TopLink to EclipseLink migration - Missing class for indicator field value

    I am migrating Toplink 11g to EclipseLink 12.1.3.  I have EclipseLink.jar to the classpath. I have few mapping xml files. When executing the application, i am getting following error.
    Exception [EclipseLink-9005] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.SessionLoaderException
    Exception Description: An exception was thrown while loading the project-xml file [META-INF/Business.xml].
    Internal Exception: Exception [EclipseLink-43] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DescriptorException
    Exception Description: Missing class for indicator field value [toplink:object-type-mapping] of type [class java.lang.String].
    Descriptor: XMLDescriptor(org.eclipse.persistence.mappings.DatabaseMapping --> [DatabaseTable(attribute-mapping)]).
    How to resolve this.

    Ooooops, sorry, guys!
    I was using TopLink 10.1.3.0 JARs to run a project created via TopLink 10.1.3.1 Workbench. That was the reason for the exception.
    I ran across the REAL problem, however. The one that was occurring when I created the TopLink project via JDeveloper 10.1.3.1 and ran it via JDeveloper 10.1.3.1. That's why I decided to try with TopLink 10.1.3.1 Workbench instead of JDeveloper 10.1.3.1.
    I will report the problem in a clean separate post.

  • Missing class for indicator field value [changed-fields-locking-policy]

    -------<br>
    Edit:<br>
    Please, ignore the post below. I found the problem here. The real problem is reported in my other post.<br>
    -------<br>
    <br>
    Hello,<br>
    <br>
    In order to test the optimistic locking by fields, I created a very simple TopLink project via the TopLink Workbench. It only consists of one table that was mapped via TopLink's own "Add or Update Existing Tables from Database". I made no modifications to the automatically generated mappings.<br>
    <br>
    After I set up the rest of the project, I ran it and it ran okay.<br>
    <br>
    Then I went to the table descriptor, then to the "Locking" tab, and then I selected "Optimistic Locking" -> "By Fields" -> "Changed Fields".<br>
    <br>
    That was ALL I changed.<br>
    <br>
    And when I tried to run the project this time, I got the following exception:
    <blockquote>
    Exception [TOPLINK-43] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DescriptorException
    Exception Description: Missing class for indicator field value [toplink:changed-fields-locking-policy] of type [class java.lang.String].<br>
    Descriptor: XMLDescriptor(oracle.toplink.descriptors.VersionLockingPolicy --> [DatabaseTable(locking-policy)])<br>
         at oracle.toplink.exceptions.DescriptorException.missingClassForIndicatorFieldValue(DescriptorException.java:878)<br>
         at oracle.toplink.internal.ox.QNameInheritancePolicy.classFromRow(QNameInheritancePolicy.java:109)<br>
         at oracle.toplink.mappings.foundation.AbstractCompositeObjectMapping.valueFromRow(AbstractCompositeObjectMapping.java:150)<br>
         at oracle.toplink.mappings.DatabaseMapping.readFromRowIntoObject(DatabaseMapping.java:1012)<br>
         at oracle.toplink.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.java:241)<br>
         at oracle.toplink.internal.ox.XMLObjectBuilder.buildObject(XMLObjectBuilder.java:128)<br>
         at oracle.toplink.ox.mappings.XMLCompositeCollectionMapping.buildCompositeObject(XMLCompositeCollectionMapping.java:157)<br>
         at oracle.toplink.mappings.foundation.AbstractCompositeCollectionMapping.valueFromRow(AbstractCompositeCollectionMapping.java:735)<br>
         at oracle.toplink.mappings.DatabaseMapping.readFromRowIntoObject(DatabaseMapping.java:1012)<br>
         at oracle.toplink.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.java:241)<br>
         at oracle.toplink.internal.ox.XMLObjectBuilder.buildObject(XMLObjectBuilder.java:128)<br>
         at oracle.toplink.internal.ox.record.DOMUnmarshaller.xmlToObject(DOMUnmarshaller.java:284)<br>
         at oracle.toplink.internal.ox.record.DOMUnmarshaller.xmlToObject(DOMUnmarshaller.java:265)<br>
         at oracle.toplink.internal.ox.record.DOMUnmarshaller.unmarshal(DOMUnmarshaller.java:152)<br>
         at oracle.toplink.ox.XMLUnmarshaller.unmarshal(XMLUnmarshaller.java:339)<br>
         at oracle.toplink.tools.workbench.XMLProjectReader.read(XMLProjectReader.java:162)<br>
         at oracle.toplink.tools.workbench.XMLProjectReader.read(XMLProjectReader.java:209)<br>
         at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.loadProjectConfig(TopLinkSessionsFactory.java:307)<br>
         at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.createSession(TopLinkSessionsFactory.java:241)<br>
         at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.buildServerSessionConfig(TopLinkSessionsFactory.java:215)<br>
         at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.buildSession(TopLinkSessionsFactory.java:168)<br>
         at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.buildTopLinkSessions(TopLinkSessionsFactory.java:124)<br>
         at oracle.toplink.tools.sessionconfiguration.XMLSessionConfigLoader.load(XMLSessionConfigLoader.java:103)
    </blockquote>
    Can anybody tell me what that means? And why do I see "VersionLockingPolicy" in the stack trace? I explicitly specified locking "By Fields".<br>
    <br>
    Here's a fragment from the project XML file:
    <blockquote>
    <toplink:locking xsi:type="toplink:changed-fields-locking-policy"/>
    </blockquote>
    Is this a TopLink bug or am I doing something wrong? (By the way, if I choose optimistic locking by "All fields", it works. But locking by "Changed fields" doesn't.)<br>
    <br>
    Best regards,<br>
    Bisser
    Message was edited by:
    bisser

    Ooooops, sorry, guys!
    I was using TopLink 10.1.3.0 JARs to run a project created via TopLink 10.1.3.1 Workbench. That was the reason for the exception.
    I ran across the REAL problem, however. The one that was occurring when I created the TopLink project via JDeveloper 10.1.3.1 and ran it via JDeveloper 10.1.3.1. That's why I decided to try with TopLink 10.1.3.1 Workbench instead of JDeveloper 10.1.3.1.
    I will report the problem in a clean separate post.

  • Problem with castor xml mapping

    Hi,
    we have following problem with castor xml mapping.
    How to use references in the collections(Hashmap or vector)?
    WE have a method called getAttribute map which will return a hashmap consist different type of objects. We want to keep only the
    references of objects if that object occurs more than once,instead of keeping the whole object
    Following is the the xml mapping file.
    <mapping>
    <class name="com.opvista.ndtool.core.mos.ManagedObject" identity="Id" auto-complete="false" verify-constructable="false">
    <map-to xml="ManagedObject"/>
    <field name="Id" get-method="getId" set-method="setId" type="string">
    <bind-xml name="Id" node="attribute"/>
    </field>
    <field name="AttributeMap" type="org.exolab.castor.mapping.MapItem" collection="map" get-method="getAttributeMap">
    <bind-xml name="AttributeMap" node="element">
         <class name="org.exolab.castor.mapping.MapItem">
    <field name="key" type="java.lang.Object">
         <bind-xml name="key" node="attribute"/>
    </field>
    <field name="value" type="java.lang.Object">
         <bind-xml name="value" node="element" reference="true"/>
         </field>
    </class>
         </bind-xml>
    </field>
    </class>
    </mapping>
    we are using reference=true for the values. But it will throw below exception.
    Unable to resolve ID for instance of class 'java.lang.String' due to the following error: Unable to resolve ClassDescriptor.
         at org.exolab.castor.xml.Marshaller.getObjectID(Marshaller.java:1988)
         at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1628)
         at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1831)
         at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1814)
         at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1825)
         at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:821)
    Please help us to overcome from this problem?
    Thanks,
    Dileep

    for your ref here is what i think the basic mapping file would look like
    <class name="Person">
    <map-to xml="person"/>
    <field name="name" type="string">
    <bind-xml name="name" node="attribute" />
    </field>
    <field name="age" type="string">
    <bind-xml name="age" node="attribute" />
    </field>
    </class>
    <class name="MetaPerson">
    <map-to xml="person"/>
    <field name="dependents" type="string">
    <bind-xml name="dependents" node="attribute" />
    </field>
    <field name="presentAdd" type="string">
    <bind-xml name="present_add " node="attribute" />
    </field>
    <field name="permanentAdd" type="string">
    <bind-xml name="permanent_add " node="attribute" />
    </field>
    </class>
    however i am still not clear as to how i can use the metaperson object in the person class as well as in the mapping file.
    hope this gives a better idea abt my problem statement.
    Please help me out

  • ExcelXML mapping---problem with XML maps in Excel sheet

    Hi Friends,
    I have one issue with ExcelXML mapping in Xcelsius.
    The problem is I have designed one dashboard using ExcelXML mapping and everything is working fine but I was afraid that  I could not able to find the mappings which were embedded in Excel.It happened many times.What I was doing is everytime Im re-mapping.I could be a big problem for me to do this procedire for everytime.How to recover my XML maps into excel sheet.Can anyone please provide the solution to achieve this.

    Shouldnt it be equivalent ? I mean, as far as I know the ns0: shouldnt be a problem
    when you have a namespace in the message then you need to associate it with some prefix....since ns0 (or any other prefix) is not present you are getting the error....having the namespace but not ns0 is the problem.
    XMLAnonymizer bean may help you to add the namespace prefix...

  • Problems running servlet due to missing classes?

    Hi everyone,
    I am doing a project which requires me to convert a java coding into a servlet. This java coding I am working on is some kind of location based service which tracks people (receiving an argument of a string as IP). It imports an external SDK called Ekahau SDK (some off the shelve product). Now I wish to convert it into a servlet so that the function that the java coding performs can be run from a webpage i created.
    I have previously posted a thread on this forum called "Converting java coding into servlets?" when I had trouble compiling the servlet. Now that I could compile the servlet already, I still have problems running the servlet from my browser.
    The webserver I am using is Apache Tomcat. Previously I was trying Apache HTTP server but since now I need to use servlet, I have shifted to Tomcat instead. I have been getting these "java.lang.NoClassDefFoundError:" when running the servlet from the browser. From the previous thread, I got suggestions from the replies saying that I need to put the jar files I need into my "C:\Tomcat\webapps\try\WEB-INF\lib" directory. I have been looking for the missing jar files from the internet and putting them into my "C:\Tomcat\webapps\try\WEB-INF\lib", but each time after adding a new jar file, I get another new "java.lang.NoClassDefFoundError:". Are the missing jar files really the problems? Cause it seems a bit weird to me that I need some many jar files which I dont even know why I need them for.
    The HTTP status 500 error look like this:
    description
    The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Servlet execution threw an exception
    root cause
    java.lang.NoClassDefFoundError: org/apache/excalibur/configuration/CascadingConfiguration
    com.ekahau.G.N.A(Unknown Source)
    com.ekahau.G.N.<init>(Unknown Source)
    com.ekahau.sdk.imp.yax.D.<init>(Unknown Source)
    com.ekahau.sdk.imp.yax.E.connect(Unknown Source)
    com.ekahau.sdk.PositioningEngine.connect(Unknown Source)
    coreservlets.testing.find(testing.java:75)
    coreservlets.testing.doGet(testing.java:36)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    Here are the series of jar files I have been looking from the internet to add them into my "C:\Tomcat\webapps\try\WEB-INF\lib" directory:
    1) org/apache/commons/collections/Closure
    2) org/apache/log4j/Logger
    3) org/apache/commons/lang/Validate
    4) org/apache/excalibur/configuration/CascadingConfiguration
    Please help~~ Thanks a lot.
    My servlet coding is like this:
    package coreservlets;
    import java.io.*;
    import java.util.*;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import com.ekahau.sdk.*;
    public class testing extends HttpServlet
         String ipAddress;
         int result;
           public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
                  ipAddress = request.getParameter("deviceIP");
              try
                   result = find();     
              catch (IOException e)
                   System.out.println("Error..." + e.toString());
              catch (EngineException e)
                   System.out.println("Error..." + e.toString());
              response.setContentType("text/html");
                  PrintWriter write = response.getWriter();
              write.println("<HTML>\n" +
    "<HEAD><TITLE>Tryget</TITLE></HEAD>\n" +
    "<BODY BGCOLOR=\"#FDF5E6\">\n" +
    result +
    "</BODY></HTML>");
           public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
                  doGet(request, response);
         public int find() throws EngineException, IOException
              PositioningEngine.connect();
                  // Find the given device:
                  Device[] devices = PositioningEngine.findDevice("NETWORK.IP-ADDRESS", ipAddress);
                  if (devices.length == 0)
                         System.err.println("Device with IP address " + ipAddress + " not found.");
                   PositioningEngine.disconnect();
                   return 0;
              else
                         TrackedDevice device = new TrackedDevice(devices[0]);
                         // Create a simple handler for locations for one-time usage:
                         LocationEstimateListener estimateListener = new LocationEstimateListener()
                           public void handleLocationEstimate(LocationEstimate locationEstimate, TrackedDevice device)
                                  // Change getLatestLocation to getAccurateLocation if you want
                                  // a bit more accurate but a few seconds delayed location.
                                  Location loc = locationEstimate.getLatestLocation();
                             final double coX = loc.getX();
                             final double coY = loc.getY();
                             try{
                             FileWriter file = new FileWriter ("C:\\Documents and Settings\\xamule\\Desktop\\Testing\\output\\output.txt");
                             String x = Double.toString(coX);
                             String y = Double.toString(coY);
                             String coor = x + "\t" + y;
                             file.write(coor);
                             file.close();
                             catch (IOException e){
                             System.out.println("Error..." + e.toString());
                   StatusListener statusListener = new StatusListener()
                           public void handleStatus(Status status, TrackedDevice device)
                                  System.err.println(new Date()+"\tStatus for device: " + status);
                         // Add listeners and start tracking
                         device.addLocationEstimateListener(estimateListener);
                         device.addStatusListener(statusListener);
                         device.setTrackingParameter("EPE.LOCATION_UPDATE_INTERVAL","6000");
                         device.setTracking(true);
                         // Wait until user inputs something. When he/she does, stop tracking and quit application
                         //BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
                         //in.readLine();
                         // Stop tracking and disconnect from the positioning engine:
                         device.setTracking(false);
                         PositioningEngine.disconnect();
                   return 1;
    }

    Well, it's kind of logical that as you put more jar files (classes) in Tomcat, it changes the error to ask for the classes (inside a jar) it cannot find.
    There was a good class->jar finder on the internet some years ago, but i don't remember the address. Try looking for that and search all the missing classes (NotDefined) and their correspondig jar files.
    Good Luck!

  • XSQL Error. Missing class: oracle.xdb.XMLType XML

    I am using OC4J and XSQL to publish information and most of the normal stuff runs fine. When I try to run the following query, I get errors. I copied the following example from XML developer's kit manual and work fine in SQL*Plus.
    =============================
    <?xml version="1.0"?>
    <xsql:query connection="demo" xmlns:xsql="urn:oracle-xsql">
    select XmlElement("DepartmentList",
    XmlAgg(
    XmlElement("Department",
    XmlAttributes(deptno as "Id"),
    XmlForest(dname as "Name"),
    (select XmlElement("Employees",
    XmlAgg(
    XmlElement("Employee",
    XmlAttributes(empno as "Id"),
    XmlForest(ename as "Name",
    sal as "Salary",
    job as "Job")
    from emp e
    where e.deptno = d.deptno
    ) as result
    from dept d
    order by dname
    </xsql:query>
    ====================
    Following is the header portion of the errors shown.
    XML-25017: Unexpected Error Occurred
    oracle.classloader.util.AnnotatedNoClassDefFoundError:
    Missing class: oracle.xdb.XMLType
    Dependent class: oracle.xml.sql.core.OracleXMLConvert
    Loader: oracle.xml:10.1.0_2
    Code-Source: /C:/oracle/oc4j_1013/lib/xsu12.jar
    Configuration: <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in C:\oracle\oc4j_1013\j2ee\home\oc4j.jar
    The missing class is available from the following locations:
    1. Code-Source: /C:/oracle/oc4j_1013/j2ee/home/applications/xsql/xsql/WEB-INF/lib/xdb.jar (from WEB-INF/lib/ directory in C:\oracle\oc4j_1013\j2ee\home\applications\xsql\xsql\WEB-INF\lib)
    This code-source is available in loader xsql.web.xsql:0.0.0.
    I tried to search several forums but was unable to find any solution to resolve this issue. Any help is appreciated.
    Thanks,

    I am using OC4J and XSQL to publish information and most of the normal stuff runs fine. When I try to run the following query, I get errors. I copied the following example from XML developer's kit manual and work fine in SQL*Plus.
    =============================
    <?xml version="1.0"?>
    <xsql:query connection="demo" xmlns:xsql="urn:oracle-xsql">
    select XmlElement("DepartmentList",
    XmlAgg(
    XmlElement("Department",
    XmlAttributes(deptno as "Id"),
    XmlForest(dname as "Name"),
    (select XmlElement("Employees",
    XmlAgg(
    XmlElement("Employee",
    XmlAttributes(empno as "Id"),
    XmlForest(ename as "Name",
    sal as "Salary",
    job as "Job")
    from emp e
    where e.deptno = d.deptno
    ) as result
    from dept d
    order by dname
    </xsql:query>
    ====================
    Following is the header portion of the errors shown.
    XML-25017: Unexpected Error Occurred
    oracle.classloader.util.AnnotatedNoClassDefFoundError:
    Missing class: oracle.xdb.XMLType
    Dependent class: oracle.xml.sql.core.OracleXMLConvert
    Loader: oracle.xml:10.1.0_2
    Code-Source: /C:/oracle/oc4j_1013/lib/xsu12.jar
    Configuration: <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in C:\oracle\oc4j_1013\j2ee\home\oc4j.jar
    The missing class is available from the following locations:
    1. Code-Source: /C:/oracle/oc4j_1013/j2ee/home/applications/xsql/xsql/WEB-INF/lib/xdb.jar (from WEB-INF/lib/ directory in C:\oracle\oc4j_1013\j2ee\home\applications\xsql\xsql\WEB-INF\lib)
    This code-source is available in loader xsql.web.xsql:0.0.0.
    I tried to search several forums but was unable to find any solution to resolve this issue. Any help is appreciated.
    Thanks,

  • Excel XML map problem with Greek characters.

    Hi,
    I created a dashboard with XML map connetion. My embeded spreadsheet is linked to an xml file which contains my TOP 50 Customers.
    Customers names are in Greek so my xml Header is like:
    <?xml version="1.0" encoding="ISO-8859-7"?>
    ISO-8859-7 is the Greek encoding for xml.
    After embeding the spreadsheet into the dashboard i add a list component to present my TOP 50 Customers.
    So far so good.
    Then i add a refresh conection button to update my TOP 50 list. In preview mode everythinng works fine. But when i try to update my data by clicking the refresh button my list is updated but the customers names is turned to unidentified characters.
    Is there any encoding problem or this is Xcelsius issue?
    I use Xcelsius 2008 sp3 fp 3.2

    You are right.
    I opened the XML file with notepad and saved it with utf-8 encode, also changed the xml tag to <?xml version="1.0" encoding="UTF-8"?> and it worked fine.
    I map it in Excel Spreadsheet without problems and after refreshing in Xcelsius the characters are diplayed normaly.
    So, correct me if i am wrong, the problem is the file encoding, no the xml encoding.
    Both, file and xml encoding should be UTF-8.
    As i mentioned before my xml files are Crystal Report 2008 reports which are exported as text files with .xml extension, so i have to look for answers in other forum.
    thank you

Maybe you are looking for

  • Unable to Modify Resource Notes and Roles Responsibility in 8.2

    hi there I am unable Unable to Mopendify Resource Notes and Roles Responsibility in 8.2. Whenever i click modify it just open new window with some option of font and other on top ribbon but in the main pane i am not able to write down any thing any s

  • Windows 8 and need a fix to use my hp photosmart 7150

    I have windows 8 xp 64 bit, is there a fix to be able to install my HP photosmart 7150 printer.

  • Using iMovie for VHS Tape copy

    I am trying to transfer some media from a VHS tape to burn to DVD. I have copied the VHS tape into iMovie successfully but find that the files are much too large to burn to a dvd. I used a DAC 100 to convert and did them in 16 bit. Is there a way to

  • REM Backflush

    HI GURUS, I have craeted production version (MOD1)and done product cost collecter ,also complete mfbf (rem -backflush). My new requirement is, i have changes bom item and in rate routing i have changes some opeartios and activity types which assigned

  • Viewiew MPEG-4 streaming with other players

    I have hinted MPEG-4 files for streaming from Darwin Streaming Server. Can the users view them with other ISO-compliant players, or only with QuickTime player ?   Windows XP Pro