1 Reply Latest reply: Jan 13, 2010 12:12 PM by 843807 RSS

    XMLDecoder ,<unbound>=Class.new(ArrayList, AttributeMap, ConnectionSet);

    800414
      hello all i am trying to load an old files of my application
      the files was written ,read using XMLDecoder ,XMLEncoder

      trying to support the old version ,but i am getting some errors
      i can only imagine , that some required classes are not suitable since the version change
      but how can i know exactly witch class and witch method ?
      this is the loading code
      ClassLoader cl = new JARClassLoader();
                ExceptionListener el = new ExceptionListener() {
                     public void exceptionThrown(Exception e) {
                          e.printStackTrace();
                          log.error("XMLDecoder error: " + mes + " -- " + e.getCause());
                     }
                };
                XMLDecoder dec = new XMLDecoder(read, null, el, cl);
                Object obj = dec.readObject();///THIS LINE I GET THE ERROR
      this is the error i am getting
      java.lang.NoSuchMethodException: <unbound>=Class.new(ArrayList, AttributeMap, ConnectionSet);
           at java.beans.Statement.invoke(Unknown Source)
           at java.beans.Expression.getValue(Unknown Source)
           at com.sun.beans.MutableExpression.getValue(Unknown Source)
           at com.sun.beans.ObjectHandler.getValue(Unknown Source)
           at com.sun.beans.ObjectHandler.endElement(Unknown Source)
           at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
           at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
           at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
           at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
           at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
           at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
           at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
           at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
           at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
           at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
           at javax.xml.parsers.SAXParser.parse(Unknown Source)
           at javax.xml.parsers.SAXParser.parse(Unknown Source)
           at java.beans.XMLDecoder.getHandler(Unknown Source)
           at java.beans.XMLDecoder.readObject(Unknown Source)
           at com.tenlevels.flowlevel.util.ver_1_2_0_load.LoadGraph.loadGraph1(LoadGraph.java:100)
           at com.tenlevels.flowlevel.util.ver_1_2_0_load.LoadGraph.loadGraph(LoadGraph.java:61)
           at com.tenlevels.flowlevel.action.OpenFlow.doAction(OpenFlow.java:86)
           at com.tenlevels.flowlevel.action.ActionRouter.performAction(ActionRouter.java:79)
           at com.tenlevels.flowlevel.action.ActionRouter.access$0(ActionRouter.java:70)
           at com.tenlevels.flowlevel.action.ActionRouter$1.run(ActionRouter.java:64)
           at java.awt.event.InvocationEvent.dispatch(Unknown Source)
           at java.awt.EventQueue.dispatchEvent(Unknown Source)
           at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
           at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
           at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
           at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
           at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
           at java.awt.EventDispatchThread.run(Unknown Source)
      java.lang.NullPointerException
           at org.jgraph.graph.AbstractCellView.getCellAttributes(Unknown Source)
           at org.jgraph.graph.AbstractCellView.refresh(Unknown Source)
           at org.jgraph.graph.GraphLayoutCache.refresh(Unknown Source)
           at org.jgraph.graph.GraphLayoutCache.refresh(Unknown Source)
           at org.jgraph.graph.GraphLayoutCache.insertViews(Unknown Source)
           at org.jgraph.graph.GraphLayoutCache.<init>(Unknown Source)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
           at java.lang.reflect.Constructor.newInstance(Unknown Source)
           at java.beans.Statement.invoke(Unknown Source)
           at java.beans.Expression.getValue(Unknown Source)
           at com.sun.beans.MutableExpression.getValue(Unknown Source)
           at com.sun.beans.ObjectHandler.getValue(Unknown Source)
           at com.sun.beans.ObjectHandler.eval(Unknown Source)
           at com.sun.beans.ObjectHandler.startElement(Unknown Source)
           at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
           at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
           at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
           at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
           at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
           at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
           at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
           at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
           at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
           at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
           at javax.xml.parsers.SAXParser.parse(Unknown Source)
           at javax.xml.parsers.SAXParser.parse(Unknown Source)
           at java.beans.XMLDecoder.getHandler(Unknown Source)
           at java.beans.XMLDecoder.readObject(Unknown Source)
           at com.tenlevels.flowlevel.util.ver_1_2_0_load.LoadGraph.loadGraph1(LoadGraph.java:100)
           at com.tenlevels.flowlevel.util.ver_1_2_0_load.LoadGraph.loadGraph(LoadGraph.java:61)
           at com.tenlevels.flowlevel.action.OpenFlow.doAction(OpenFlow.java:86)
           at com.tenlevels.flowlevel.action.ActionRouter.performAction(ActionRouter.java:79)
           at com.tenlevels.flowlevel.action.ActionRouter.access$0(ActionRouter.java:70)
           at com.tenlevels.flowlevel.action.ActionRouter$1.run(ActionRouter.java:64)
           at java.awt.event.InvocationEvent.dispatch(Unknown Source)
           at java.awt.EventQueue.dispatchEvent(Unknown Source)
           at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
           at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
           at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
           at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
           at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
           at java.awt.EventDispatchThread.run(Unknown Source)
      java.lang.NullPointerException: target should not be null
           at java.beans.Statement.invoke(Unknown Source)
           at java.beans.Expression.getValue(Unknown Source)
           at com.sun.beans.MutableExpression.getValue(Unknown Source)
           at com.sun.beans.ObjectHandler.getValue(Unknown Source)
           at com.sun.beans.ObjectHandler.eval(Unknown Source)
           at com.sun.beans.ObjectHandler.startElement(Unknown Source)
           at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
           at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
           at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
      ....
      .....
      ...
      ...
      thank you
        • 1. Re: XMLDecoder ,<unbound>=Class.new(ArrayList, AttributeMap, ConnectionSet);
          843807
          shay_te wrote:
          ClassLoader cl = new JARClassLoader();
                    ExceptionListener el = new ExceptionListener() {
                         public void exceptionThrown(Exception e) {
                              e.printStackTrace();
                              log.error("XMLDecoder error: " + mes + " -- " + e.getCause());
                         }
                    };
                    XMLDecoder dec = new XMLDecoder(read, null, el, cl);
                    Object obj = dec.readObject();///THIS LINE I GET THE ERROR
          I'd have to start out by saying: look in the API under object. readObject() is not an implemented method. Do you have an extension of Object that contains readObject()?