Strange object inheritance problem

Hi everyone,
I'm getting the error "clone has protected access in java.lang.Object" in the following code:
try {
return constructor.newInstance(new Object[] {
(Animation)left.clone(), //here
(Animation)right.clone(), //here
(Animation)deadLeft.clone(), //here
(Animation)deadRight.clone() // and here
This doesn't make sense to me, because I thought everything was a subclass of object, and would thus be able to use protected methods. Am I missing something? Thanks in advance.

class Parent {
  protected void foo() {}
class Child extends Parent {
  void bar() {
    Parent p = new Parent();
    p.foo(); // illegal
    super.foo(); // ok
    this.foo(); // ok
    foo(); // ok, same as this.foo();
}It's a common misunderstanding. The gory details are laid out in JLS 6.6.2 -- Details on protected access
http://java.sun.com/docs/books/jls/third_edition/html/names.html#6.6.2

Similar Messages

  • Object Inheritance problem between projects

    Hi,
    I have two projects lets say project1 and project2. From project1 I instanciate processes of project2 as subflows. In addition I have one bpm object in project1 (lets say object1) that inherits from a bpm object in proyect2 (lets say object2). So project1 depends on project2 to make this inheritance happen. When I call the subflow I pass the object1 and as inherits from object2 there is no problem (input argument). For the output argument I have to cast from object2 to object1. And here is where I have a classcastexception. If all the processes are in the same project it works fine and there is no exception. But when splitting in two projects it fails. Seems that it is something related to the folder structure in the catalog that should be the same for both projects and that is the reason why it does not work, but as one project depends to the other I can not put the same folder structure in both catalogs because in the dependant project it is duplicated.
    Has anybody can give me an idea on how to solve this?
    Thank you very much in advance
    Kind regards

    Nobody can help me with this issue?,any help is much appreciated, the excpetion I get is:
    An operation exception occurred while running an automatic item. Details: An instance in Process '/Prueba#Default-1.0' could not be notified. Caused by: Process execution engine execution error. Caused by: The method 'CIL_otherProjectOtherProjectIn' from class 'Novartis.Prueba.Default_1_0.Instance' could not be successfully executed. Caused by: Cannot convert an object with type xobject.BaseModule.BaseObject to class xobject.DependantModule.DependantObject fuego.papi.exception.CannotStoreNotificationException: An instance in Process '/Prueba#Default-1.0' could not be notified. at fuego.server.AbstractProcessBean.receiveNotification(AbstractProcessBean.java:2791) at fuego.server.iec.LocalIPCHandler.sendNotification(LocalIPCHandler.java:79) at fuego.server.execution.microactivity.DefaultSendNotificationExecutionHandler.sendNotification(DefaultSendNotificationExecutionHandler.java:103) at fuego.server.execution.microactivity.EndMicroActivity.execute(EndMicroActivity.java:69) at fuego.server.execution.microactivity.MicroActivityEngineExecutionHandler.executeActivity(MicroActivityEngineExecutionHandler.java:57) at fuego.server.execution.ImmediateActivity.execute(ImmediateActivity.java:42) at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:304) at fuego.transaction.TransactionAction.startBaseTransaction(TransactionAction.java:470) at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:551) at fuego.transaction.TransactionAction.start(TransactionAction.java:212) at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:123) at fuego.server.execution.DefaultEngineExecution.executeAutomaticWork(DefaultEngineExecution.java:62) at fuego.server.execution.EngineExecution.executeAutomaticWork(EngineExecution.java:42) at fuego.server.execution.ToDoItem.executeAutomaticWork(ToDoItem.java:251) at fuego.server.execution.ToDoItem.run(ToDoItem.java:536) at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:775) at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:755) at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:142) at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:134) at fuego.fengine.ToDoQueueThread$PrincipalWrapper.processBatch(ToDoQueueThread.java:450) at fuego.component.ExecutionThread.work(ExecutionThread.java:839) at fuego.component.ExecutionThread.run(ExecutionThread.java:408) Caused by: fuego.papi.impl.EngineExecutionException: Process execution engine execution error. at fuego.server.execution.DefaultEngineExecution.executeWithoutComponentImmediate(DefaultEngineExecution.java:202) at fuego.server.execution.EngineExecution.executeWithoutComponentImmediate(EngineExecution.java:95) at fuego.server.AbstractProcessBean.receiveNotification(AbstractProcessBean.java:2757) ... 21 more Caused by: fuego.lang.ComponentExecutionException: The method 'CIL_otherProjectOtherProjectIn' from class 'Novartis.Prueba.Default_1_0.Instance' could not be successfully executed. at fuego.component.ExecutionThreadContext.invokeMethod(ExecutionThreadContext.java:519) at fuego.component.ExecutionThreadContext.invokeMethod(ExecutionThreadContext.java:273) at fuego.fengine.FEEngineExecutionContext.invokeMethodAsCil(FEEngineExecutionContext.java:219) at fuego.server.execution.EngineExecutionContext.runCil(EngineExecutionContext.java:1277) at fuego.server.execution.microactivity.ComponentExecutionMicroActivity.runCil(ComponentExecutionMicroActivity.java:126) at fuego.server.execution.microactivity.ComponentExecutionMicroActivity.execute(ComponentExecutionMicroActivity.java:84) at fuego.server.execution.microactivity.MicroActivityEngineExecutionHandler.executeActivity(MicroActivityEngineExecutionHandler.java:57) at fuego.server.execution.ImmediateActivity.execute(ImmediateActivity.java:42) at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:304) at fuego.transaction.TransactionAction.startNestedTransaction(TransactionAction.java:527) at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:548) at fuego.transaction.TransactionAction.start(TransactionAction.java:212) at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:123) at fuego.server.execution.DefaultEngineExecution.executeWithoutComponentImmediate(DefaultEngineExecution.java:199) ... 23 more Caused by: java.lang.ClassCastException: Cannot convert an object with type xobject.BaseModule.BaseObject to class xobject.DependantModule.DependantObject at fuego.util.Conversion.cast(Conversion.java:99) at Novartis.Prueba.Default_1_0.Instance.CIL_otherProjectOtherProjectIn(Instance.xcdl:1) at Novartis.Prueba.Default_1_0.Instance.CIL_otherProjectOtherProjectIn(Instance.xcdl) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at fuego.component.ExecutionThreadContext.invokeMethod(ExecutionThreadContext.java:512) ... 36 more
    The strange thing is that if all the processes are in the same project everything works fine but once I split in two projects it raises the exception.
    Thank you very much

  • Help with multi-table mapping for one-to-many object inheritance

    Hi,
    I have posted on here before regarding this (Toplink mapping for one-to-many object inheritance but I am still having problems mapping my object model to my schema.
    Object model
    The Person and Organisation objects contain base information and have the primary keys person_id and organisation_id. It is important that there is no duplication of person and organisation records, no matter how many times they are saved in different roles.
    There are two types of licenceholder in the problem domain, and the ILicenceHolder interface defines information and methods that are common to both. The PersonalLicenceHolder object represents one of these types of licenceholder, and is always a person, so this class extends Person and implements ILicenceHolder.
    The additional information and methods that are required by the second type of licenceholder are defined in the interface IPremisesLicenceHolder, which extends ILicenceHolder. Premises licence holders can either be people or organisations, so I have two objects to represent these - PremisesLicenceHolderPerson which implements IPremisesLicenceHolder and extends Person, and PremisesLicenceHolderOrganisation which implements IPremisesLicenceHolder and extends Organisation.
    The model is further complicated by the fact that any single Person may be both a PersonalLicenceHolder and a PremisesLicenceHolderPerson, and may be so several times over. In this case, the same basic Person information needs to be linked to several different sets of licenceholder information. In the same way, any single Organisation may be a PremisesLicenceHolderOrganisation several times over.
    Sorry this is complicated!
    Schema
    I have Person and Organisation tables containing the basic information with the primary keys person_id and organisation_id.
    I have tried to follow Donald Smith's advice and have created a Role table to record the specialised information for the different types of licence holder. I want the foreign keys in this table to be licenceholder_id and licence_id. Licenceholder_id will reference either organisation_id or person_id, and licence_id will reference the primary key of the Licence table to link the licenceholder to the licence. Because I am struggling with the mapping, I have changed licenceholder_id to person_id in an attempt to get it working with the Person object before I try the Organisation.
    Then, when a new licenceholder is added, if the person/organisation is already in the database, a new record is created in the Role table linking the existing person/organisation to the existing licence rather than duplicating the person/organisation information.
    Mapping
    I am trying to use the toplink mapping workbench to map my PremisesLicenceHolderPerson object to my schema. I have mapped all inherited attributes to superclass (Person). The primary table that the attributes are mapped to is Person, and I have used the multi-table info tab to add Roles as an additional table and map the remaining attributes to that.
    I have created the references PERSON_ROLES which maps person.person_id to roles.person_id, ROLES_PERSON which maps roles.person_id to person.person_id and ROLES_LICENCE which maps roles.licence_id to licence.licence_id.
    I think I have put in all the relationships, but I cannot get rid of the error message "The following primary key fields are unmapped: PERSON_ID".
    Please can somebody tell me how to map this properly?
    Thank you.

    I'm not positive about your mappings, but it looks like the Person object should really have a 1:M or M:M mapping to the Licenceholder table. This then means that your object model should be similar, in that Person object could have many Licenses, instead of being LicenceHolders. From the looks of it, you have it set up from the LicenceHolder perspective. What could be done instead if a LicenceHolder could have a 1:1 reference to a person data object, rather than actually be a Person. This would allow the person data to be easily shared among licences.
    LicenceHolder1 has an entry in the LicenceHolder table and Person table. LicenceHolder2 also has entries in these tables, but uses the same entry in the Person table- essentially it is the same person/person_ID. If both are new objects, TopLink would try to insert the same person object into the Person table twice. I'm not sure how you have gotten around or are planning to get around this problem.
    Since you are using inheritance, it means that LicenceHolder needs a writable mapping to the person.person_id field- most commonly done through a direct to field mapping. From the description, it looks like roles.person_id is a foreign key in the multiple table mapping, meaning it would be set based on the value in the person.person_id field, but the person.person_id isn't actually mapped in the object. Check to make sure that the ID attribute LicenceHolder is inheriting from person hasn't been remapped in the LicenceHolder descriptor to a different field.
    Best Regards,
    Chris

  • JNDI NIS object access problem

    JNDI NIS object access problem:
    Hi all,
    After long fight, i'm now able to connect to my NIS server on my network. the initial context factory is 'com.sun.jndi.nis.NISCtxFactory' and provider url are given and i obtain namingennumeration of items in the NIS directory.
    purpose of my project:
    using ypcat command we can view the services,passwd,host... objects in unix.
    my project requirement is that i shd open this 'services' object in java (using JNDI probably) and shd access its content.
    i'm able to obtain the object and the type of this object is 'NISCtxServices' defined in 'com.sun.jndi.nis.NISCtxFactory' package, but all the classes and methods except some are not public and so im not able to use almost all the methods in this class 'NISCtxServices' .
    Can any one help me in accessing the information inside this object.
    Thanks in advance! and i'm waiting!

    It's because JFrame does not have a public progessbar variable, only your subclass has that.
    //change this
    JFrame frame = new ProgressBarDemo();
    //to this
    ProgressBarDemo frame = new ProgressBarDemo();

  • Multiple Inheritance problem persists in Interfaces

    Hi,
    I tentatively made a program and found that multiple inheritance problem of C++ persists even with interfaces. Although this is definetely a special case but I want to know what is this problem known as( i know that this is perhaps known as diamond problem in C++). And is there a way out of this thing.
    interface one
         int i=10;
    interface two
         int i=20;
    interface z extends one,two
    public class xyz implements z
         public static void main(String [] a)
         System.out.println(i);
    }O/P
    D:\Education\Java\JavaStudyRoom\Applets>javac xyz.java
    xyz.java:16: reference to i is ambiguous, both variable i in one and variable i
    in two match
    System.out.println(i);
    *^*
    *1 error*
    Thanks for replying

    suvojit168 wrote:
    I tentatively made a program and found that multiple inheritance problem of C++ persists even with interfaces. Although this is definetely a special case but I want to know what is this problem known as( i know that this is perhaps known as diamond problem in C++). And is there a way out of this thing. This is not the so called diamond inheritance problem. What you have here is an ordinary name clash. And as has been noted you can resolve it by qualifying which constant you're referring to, like
    System.out.println(one.i);
    For the diamond inheritance problem to apply both the one and the two interfaces would need to inherit a common ancestor (that's how the diamond is formed). Furthermore the common anscestor would need to carry implementation which would then be inherited two ways, once via one and once via two. This is the diamond inheritance problem Java is avoiding by allowing single inheritance of implementation only.
    P.S. My previous post was posted my mistake.

  • I have a strange 3g data problem.

    I have a strange 3g data problem.  At home I have zero 3G connectivity even though all bars are showing and says "3G" and wifi is "Off" ... unless I am on the phone and then magically the 3G data connection works perfectly!!  Does anyone have any idea what is happening?  Also when I bring my phone to my dad's or my friends house the problem disappears!! Is this a hardware or a AT&T network problem? os is 4.3.3
    Also called ATT and they said there was no problem with the network and that it was a hardware issue.  Also restored the phone several times but the problem did not go away.

    OK, no trouble shooting. The first thing I'd attempt is restarting in Safe Mode. If you still don't have luck try doing both a SMC and PRAM reset, it wouldn't hurt to do the SMC reset a couple of times. If still no luck let us know.
    SMC RESET
    Shut down the computer.
    Unplug the computer's power cord and all peripherals.
    Press and hold the power button for 5 seconds.
    Release the power button.
    Attach the computers power cable.
    Press the power button to turn on the computer.
    PRAM RESET
    Shut down the computer.
    Locate the following keys on the keyboard: Command, Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.

  • Inheritance problem first part compiles, but can't get the rest to compile.

    Here is the assignment :Lab #8, Objects, Inheritance and Polymorphism
    Purpose of Lab: Be able to:
    Write a Java program that defines, loads, and uses an array of objects.
    Create objects of classes.
    Understand the notion of polymorphism.
    Write superclasses and subclasses.
    Create objects of superclasses and subclasses.
    Instructions:
    1. Write an Abstract Data Type called Animal. Include two instance variables in this class: a String for name and an integer for age. Write a constructor method that takes two arguments and a second constructor that takes no arguments. Write get and set methods for each of the two instance variables. Write a toString method which displays the values of the instance variables for any object of type Animal. Write a speak method that takes no arguments, returns nothing and displays ?Arg! Arg!? on the monitor.
    2. Write a second class called Duck, a subclass of class Animal. Add an additional instance variable to those inherited from Animal: an integer called feathers (this variable is used to store the number of feathers that a particular Duck object has). Write a constructor that takes three arguments and another constructor that takes no arguments. Provide set and get methods for the feathers instance variable. Override the toString method to display the values of all instance variables belonging to a Duck type of object. Override the speak method to display a value of ?Quack! Quack!?.
    3. Write a third class called Cow, also a subclass of class Animal. Add an additional instance variable to those inherited from Animal: an integer called spots (this variable is used to store the number of spots feathers that a particular Cow object has). Write a constructor that takes three arguments and another constructor that takes no arguments. Override the toString method to display the values of all instance variables belonging to a Cow type of object. Override the speak method to display a value of ?Mooo! Mooo!?.
    4. Finally, enter, compile and execute the Farm class shown below. Make sure that all of your classes (Animal, Duck, Cow and Farm) are in the same folder. Compile all of the classes. Run the Farm program. Answer the questions below. Here is my code so far: public class Animals{
        private String name;
        private int age;
        public Animals()
        public Animals( String nVal, int ageVal)
            name =nVal;
            age = ageVal;
        public void setN(String nVal)
            name = nVal;
        public String getN()
    return name;
    public void setA( int ageVal)
    age = ageVal;
    public int getA()
        return age;
    public String toString()
        return "\nThe name is" + name +", and the age is" + age + ".";
    public class Duck extends Animals
    private int feathers;
    public Duck()
        super();
        public Duck(String nVal, int ageVal)
        super(nVal,ageVal);
        feathers = feathersVal;
        public void setFeathers(int feathersVal)
        feathers= feathersVal;
        public int getFeathers()
            return feathers;
        public String toString()
        return  "\nThe name is" + super.getN() + ", and the age is" + super.getA()
        + "\n The Duck's feathers are" +feathers+ ".";
    public class Cow extends Animals
        private int spots;
        public Cow(int spots)
            super();
            public Cow(String nVal, int spotsVal)
            super(spots);
                spotsColor = spots;
                public void setSpots(int spots)
            spots= spotsColor;
                public int getSpots();
        public String toString()
            return  "\nThe name is" +super.getN()+ ", and the age is" + super.getA()
            + "\n The Duck's feathers are" +feathers+ "\nThe Cow's spots are" +spots+".";
    import javax.swing.JOptionPane.JOption;
    import javax.swing.*;
    public class Farm
        public static void main( String[] args );
        Animals[]farmAnimals = new Animals[4];
                farmAnimals[0] = new Animals("Animals", 3);
                farmAnimals[1] = new Duck("Duck","green,grey feathers");
                farmAnimals[2] = new Cow("Cow", 3, "brown white spots");any help greatly appreciated last assignment of the semester!

    Here is the assignment :Lab #8, Objects, Inheritance and Polymorphism
    Purpose of Lab: Be able to:
    Write a Java program that defines, loads, and uses an array of objects.
    Create objects of classes.
    Understand the notion of polymorphism.
    Write superclasses and subclasses.
    Create objects of superclasses and subclasses.
    Instructions:
    1. Write an Abstract Data Type called Animal. Include two instance variables in this class: a String for name and an integer for age. Write a constructor method that takes two arguments and a second constructor that takes no arguments. Write get and set methods for each of the two instance variables. Write a toString method which displays the values of the instance variables for any object of type Animal. Write a speak method that takes no arguments, returns nothing and displays ?Arg! Arg!? on the monitor.
    2. Write a second class called Duck, a subclass of class Animal. Add an additional instance variable to those inherited from Animal: an integer called feathers (this variable is used to store the number of feathers that a particular Duck object has). Write a constructor that takes three arguments and another constructor that takes no arguments. Provide set and get methods for the feathers instance variable. Override the toString method to display the values of all instance variables belonging to a Duck type of object. Override the speak method to display a value of ?Quack! Quack!?.
    3. Write a third class called Cow, also a subclass of class Animal. Add an additional instance variable to those inherited from Animal: an integer called spots (this variable is used to store the number of spots feathers that a particular Cow object has). Write a constructor that takes three arguments and another constructor that takes no arguments. Override the toString method to display the values of all instance variables belonging to a Cow type of object. Override the speak method to display a value of ?Mooo! Mooo!?.
    4. Finally, enter, compile and execute the Farm class shown below. Make sure that all of your classes (Animal, Duck, Cow and Farm) are in the same folder. Compile all of the classes. Run the Farm program. Answer the questions below. Here is my code so far:
    public class Animals{
    private String name;
    private int age;
    public Animals()
    public Animals( String nVal, int ageVal) }
    name =nVal;
    age = ageVal;
    public void setN(String nVal)
    name = nVal;
    public String getN()
    return name;
    public void setA( int ageVal)
    age = ageVal;
    public int getA()
    return age;
    public String toString()
    return "\nThe name is"+name+ , and the age is" + age + ".";
    {code}{code}
    {code}{code}
    public class Duck extends Animals
    private int feathers;
    public Duck()
    super();
    public Duck(String nVal, int ageVal)
    super(nVal,ageVal);
    feathers = feathersVal;
    public void setFeathers(int feathersVal)
    feathers= feathersVal;
    public int getFeathers()
    return feathers;
    public String toString()
    return "\nThe name is" + super.getN() + ", and the age is" + super.getA()
    + "\n The Duck's feathers are" +feathers+ ".";
    {code}{code}
    {code}{code}
    public class Cow extends Animals
    private int spots;
    public Cow(int spots)
    super();
    public Cow(String nVal, int spotsVal)
    super(spots);
    spotsColor = spots;
    public void setSpots(int spots)
    spots= spotsColor;
    public int getSpots();
    public String toString()
    return "string1" + variable1 + "string2" + variable2;
    {code}{code}
    {code}{code}
    import javax.swing.JOptionPane.JOption;
    import javax.swing.*;
    public class Farm
    public static void main( String[] args ){
    Animals[]farmAnimals = new Animals[4];
    farmAnimals[0] = new Animals("Animals", 3);
    farmAnimals[1] = new Duck("Duck","green,grey feathers");
    farmAnimals[2] = new Cow("Cow", 3, "brown white spots");
    {code}{code}
    In Duck The compile errors are as follows:java1: cannot find symbol symbol class Duck extends Animals with the caret under A in Animals
    java 13 same as above but for feathers = feathersVal; with the caret under f in feathersVal
    java 25 same error caret under s in both supers
    Cow has 1 error in java 20 class,interface,or enum expected caret under S in String
    Farm a parsing error at last brace but when I add another ending brace i get
    java1 cannot find symbol class JOption caret under period between JOptionPane.JOption
    java 9 cannot find symbol caret under A in Animals[]farm etc also under A in new Animals
    java 10 cannot find symbol caret under D in Duck
    java 12 cannot find symbol caret under C in new Cow

  • Issue :  Child view object refresh problem,

    Hi ,
    Child view object refresh problem,
    Detail expaination of problem with DEPT and Emp table:
    I have two pages first.jspx and secound.jspx
    In the First page we are showing one department and All Employee blongs to that department. Employees are shown in table format.
    and i have duplicate button in table--> this will create a duplication record of selected employee by calling application module
    and the control moves to sencound page to show the newly created Employee details.
    From secound form am returning back with some action button to previous page to the same dept , The newly created records are not showing in the table [but the database has newly crated].
    How do i refresh the child view object ?
    Regards,
    Bogi.

    Hi Frank,
    We are creating new record from the AM with help of ADFBC.
    Would like know how to refresh UI Datacollection and AM view objects.. ? i have added vo.executeQuery in AM . But the changes not reflecting in UI,
    Thanks for the reply... am ready to give any other info required,,,

  • 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)
    .

  • Bussiness object serialization problem

    Hi, I have a little problem with serialization, when I want to create xml from Business object. Example:
    MyBoObject obj = new MyBoObject ();
    obj.atr1 = "aaa";
    obj.atr2 = "bbb";
    String xml = DynamicXml.createXmlTextFor(object : obj, topLevelTag : "something");
    display(xml);
    And displayed result is:
    <something>
    <atr2>bbb</atr2>
    </something>
    atr1 is attribute, which is inherited from db table.
    atr2 is atribute, which I created (it is not inherited from db table)
    Whole problem is, that it only serialize atr2 - from some reason it completely ignores atr1 and his value.
    Like I can't serialize attributes, which are inherited from db table.
    But when I created new attribute atr2 in my Business Object (which is not inherited from db table), everything work ok. Where's the problem? I read docs, but found nothing...
    Edited by: user12189610 on Nov 9, 2009 2:42 AM
    Edited by: user12189610 on Nov 9, 2009 2:46 AM

    If you need a simple project that duplicates this problem for customer support, here's where I put one: http://www.4shared.com/file/181611971/d21e9444/_2__DynamicXMLBug.html.
    Have them import the project, start Studio's Engine, login as "test" and start the Workspace. Create a work item instance and then run the work item when it reaches the "Test" activity. When you run the logic, you'll see this displayed:
    <?xml version="1.0" encoding="UTF-8"?>
    <poHeir xmlns="http://bea.com/albpm/DynamicXml/version/2.0">
        <nameForPO>Dan</nameForPO>
    </poHeir>They should note that only the "nameForPO" tag is created by the DynamicXml.createXmlTextFor() method. "nameForPO" is an attribute I manually added to the XML Heir BPM Object. The attributes of the inherited heir (e.g. "poHeir.orderDate" and "poHeir.billTo") are not included as tags in the generated XML even though these attributes have been set in the logic.

  • Applet-servlet communication, object serialization, problem

    hi,
    I encountered a problem with tomcat 5.5. Grazing the whole web i didn't find any solution (some guys are having the same problem but they also got no useful hint up to now). The problem is as follows:
    I try to build an applet-servlet communication using serialized objects. In my test scenario i write a serialized standard java object (e.g. a String object) onto the ObjectOutputStream of the applet/test-application (it doesn't matters wheter to use the first or the latter one for test cases) and the doPost method of the servlet reads the object from the ObjectInputStream. That works fine. But if i use customized objects (which should also work fine) the same code produces an classnotfound exception. When i try to read and cast the object:
    TestMessage e = (TestMessage)objin.readObject();
    java.lang.ClassNotFoundException: TestMessage
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1205)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    ...That seems strange to me, because if i instantiate an object of the same customized class (TestMessage) in the servlet code, the webappclassloader doesn't have any problems loading and handling the class and the code works fine!
    The class is located in the web-inf/classes directory of the application. I've already tried to put the class (with and without the package structure) into the common/classes and server/classes directory, but the exception stays the same (I've also tried to build a jar and put it in the appropriate lib directories).
    I've also tried to catch a Throwable object in order to get information on the cause. But i get a "null" value (the docu says, that this will may be caused by an unknown error).
    I've also inspected the log files intensively. But they gave me no hint. Until now I've spend a lot of time on searching and messing around but i always get this classnotfound exception.
    I hope this is the right place to post this problem and i hope that there is anyone out there who can give me some hint on solving this problem.
    Kindly regards,
    Daniel

    hi, thanks for the reply,
    all my classes are in the web-inf/classes of the web-app and have an appropriate package structure. thus the TestMessage class is inside a package.
    i tried some names for the testclass but it didn't matter. the exception stays the same. I also tried to put the jar in the common/lib but the problem stays.
    Well the problem with loaded classes: As i mentioned in the post above i can instantiate an object of TestMessage in the code without any problems (so the classloader of my webapp should know the class!!)
    only when reading from the objectinputstream the classloader doesn't seem to know the class?? maybe theres a parent classloader resposible for that and doesn't know the class?
    strange behaviour...
    p.s. sending the same object from the servlet to the client works well
    regards
    daniel
    Message was edited by:
    theazazel

  • Strange JTable update problems

    I am having some strange issues with a JTable.
    I have a custom AbstractTableModel that displays various properties of a list of Objects. I am using a java.util.Vector to store this list.
    The user is given several JComboBox objects which contain filters for my table, when any of these filters are changed, a class that manages my Database is asked to return a Vector full of objects that match these filters.
    I then set my table data Vector equal to this returned list and invoke fireTableStructureChanged() from my table model. This part works fine, the strange thing is, if the user has a table element selected and then they change the filters, the table will not update, it actually goes blank, but oddly enough the scroll bar on the scroll pane stays the same length as the old table.
    When I invoke the exact same update method again (which just sets the Vector containing my data to a new value, and fires the event) the table will update this time.
    I have tried calling MyJTable.getSelectionModel().clearSelection() in the hope that it will fix my problem, but it does not seem to do anything.
    So is my problem some strange event or threading glitch, or an issue with JScrollPane mabye?
    Thanks in advance for any help

    Try using the DefaultTableModel to see if you have the same problem. If not then you know the problem is with your custom TableModel.
    If you need further help then you need to create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)",
    see http://homepage1.nifty.com/algafield/sscce.html,
    that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    Don't forget to use the "Code Formatting Tags",
    see http://forum.java.sun.com/help.jspa?sec=formatting,
    so the posted code retains its original formatting.

  • Jaxb strange (de)serialization problem

    Hi!
    I have strange a problem in which deserialization of xml to an object generated by jaxb in some cases results in a classcastexception.
    Please bare with me...
    The problem occurs when I generate code for two schema's which both have an imported common schema which contain common data types and elements. Now I use 2 ant xjc task to generate the sources (to the same target folder). Whichever schema is created LAST works. That is, the sample xml for that schema can be deserialized. Now if I swap the order of generation the service for which the deserialization worked now fails and the other one works.
    If I add both schema's into a single call to xjc then it works but then I have a problem that I can't add any custom serialization because the additional of multiple binding files result in "not part of the compilation.." errors.
    This problem has been bugging me for days now and I wonder if anyone had the same problem? Or better, has a solution....
    Cheers,
    Robin

    sorry for the question already asked here. Actually I found the answer here
    http://forum.java.sun.com/thread.jspa?forumID=62&threadID=793180
    the problem was in the header, each time appended to the file. Anyhow, thanks to arnaud63 and ejp.

  • Inheritance problem with parent class calling child class

    I have a problem with inheritance with a parent class calling a child class method. Below is the example pseudocode code and my problem:
    public abstract class A {
        protected void function1 ( ) { }
        protected void function2 () {
             //calls function1();
             function1();
    public abstract class B extends A {
        protected void function1 ()  {
             // do stuff
    public class C extends B {
        protected void function1 ()  {
            // do stuff
            super.function1 ();
    }I have an object instance of class C created and its function2() is invoked.
    My problem is, while in function2(), which belongs to abstract class A and the method call to function 1() is called, the call invokes the function1() of class B. Shouldn't the call invoke function 1() of class C instead? And then function1() of class B will be called after due to the super.function1(). It's not behaving like I thought it would.
    Edited by: crono77 on Jan 10, 2008 8:13 PM

    Nevermind, i found my error :)

  • I have a strange object on a webpage that doesn't exist in the design

    I don't know exactly how to describe the problem.
    .. but here it goes:
    First, I'm just an enthusiastic novice. I've done fairly well figuring Studio 8 on my own using a couple of "how-to" 's ... so please excuse the inexact language.
    I have a webpage that consists of a flashpaper document and 3 informational text objects to its right. When I look at the page in dreamweavr that's what i see .. when I upload to the web and then look at my webpage .. there is a large white box occupying the position where the flashpaper doc should be and the doc is instead crammed under the text oblects to the right ...
    I've redone this page numerous times and the problem isn't fixed. I tried to look at the html to see if there was something obvious I could pull out but nothing stood out and the tinkering I did was useless. so, i left it alone and untouched.
    When I look at it in Contribute .. the object is there until I hit "Eit Page"  then the doc moves to the proper position and just to the left of it ot the bttom corner is a mysterious tiny yellow icon that looks like a printer ... its too tiny to be sure and I can't figure out how to zoom into the page for a better look. Is this the culprit? ( Its not selectable or I would just delete it and see what happens.)
    Does anyone have any ideas???
    if it would help to check out the page :  http://www.tejanaworks.com/J%20Zapata%20resume.html
    Thanks a bunch!!!
    ana

    A blessing in disguise. Adobe removed Flash Paper and Flash buttons from DW several versions back because they aren't web friendly.  
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

Maybe you are looking for

  • Hp cp1025nw won't print

    I recently changed my router.  I got all the other devices to work but not my printer.  Sometimes it works and other times not.  Any ideas?  At the moment, it says it is not connected but yet it printed just a few days ago.

  • I don't want my child to be able to defeat VPN.  Can I hide this setting? or can I PW protect it?

    iPhones are not easy to use effective content filters.  OpenDNS and other similar solutions can control content coming in from wi-fi.   However, the cellular phone companies don't provide the predicatable contol or access to their DNS function.     O

  • Rlogin, who error

    Hi everybody, I have a problem with rlogin and telnet a Ultra10 system. I get the message error message " No utmpx entry. You must exec login from the lowest level shell. Connection closed." I checked the /var directory. It has about 30%. After clear

  • Problem when printing from the browser

    The report is displayed in the browser properly. We are using rwcgi to view the reports in the browser. But when printed using the print option of the browser, the page setup is taken from the browser's page setup. How do we set the browser's page se

  • Can i use unlocked iphone6 in india buying from uae with warranty?

    is that possible to use iphone 6 in india buying from uae with warranty?