[2010-05-14  10:56:14 ERROR] - RegistryService: Could not unmarshal: F:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nsportal\WEB-INF\conf\skinmodules.xreg
org.xml.sax.SAXException: unable to find FieldDescriptor for 'skinmodule-entry' in ClassDescriptor of registry
at org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:767)
at org.exolab.castor.xml.util.DOMEventProducer.process(DOMEventProducer.java:245)
at org.exolab.castor.xml.util.DOMEventProducer.process(DOMEventProducer.java:182)
at org.exolab.castor.xml.util.DOMEventProducer.processChildren(DOMEventProducer.java:333)
at org.exolab.castor.xml.util.DOMEventProducer.process(DOMEventProducer.java:247)
at org.exolab.castor.xml.util.DOMEventProducer.process(DOMEventProducer.java:182)
at org.exolab.castor.xml.util.DOMEventProducer.processChildren(DOMEventProducer.java:333)
at org.exolab.castor.xml.util.DOMEventProducer.process(DOMEventProducer.java:134)
at org.exolab.castor.xml.util.DOMEventProducer.process(DOMEventProducer.java:170)
at org.exolab.castor.xml.util.DOMEventProducer.start(DOMEventProducer.java:110)
at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:290)
at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:374)
at org.apache.jetspeed.services.registry.CastorRegistryService.loadFragment(CastorRegistryService.java:550)
at org.apache.jetspeed.services.registry.RegistryWatcher.findFiles(RegistryWatcher.java:249)
at org.apache.jetspeed.services.registry.RegistryWatcher.changeBase(RegistryWatcher.java:214)
at org.apache.jetspeed.services.registry.CastorRegistryService.init(CastorRegistryService.java:429)
at org.apache.turbine.services.TurbineBaseService.init(TurbineBaseService.java:108)
at org.apache.turbine.services.BaseInitableBroker.initClass(BaseInitableBroker.java:149)
at org.apache.turbine.services.BaseServiceBroker.doInitService(BaseServiceBroker.java:224)
at org.apache.turbine.services.BaseServiceBroker.initServices(BaseServiceBroker.java:193)
at org.apache.turbine.Turbine.init(Turbine.java:259)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3996)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4266)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

解决方案 »

  1.   

    java 代码:public void loadFragment(String file) {
        try {
          DocumentBuilderFactory dbfactory = DocumentBuilderFactory.newInstance();
          DocumentBuilder builder = dbfactory.newDocumentBuilder();      Document d = builder.parse(new File(file));      Unmarshaller unmarshaller = new Unmarshaller(this.mapping);
          RegistryFragment fragment = (RegistryFragment) unmarshaller.unmarshal( (
              Node) d);      // this fragment as changed
          fragment.setChanged(true);      // if we get here, we successfully loaded the new fragment
          updateFragment(file, fragment);    }
        catch (Throwable t) {
          Log.error("RegistryService: Could not unmarshal: " + file, t);
        }