1 2 Previous Next 18 Replies Latest reply on Jun 13, 2005 11:16 AM by Niklas Nobel

    Broken XMBean persistence with 1.5 and org.jboss.mx.persiste

    Jörg Henne Newbie

      If I try to persist an XMBean using the org.jboss.mx.persistence.ObjectStreamPersistenceManager under Java 5.0 and JBoss 3.2.7, I get lots of exceptions of this kind:

      java.io.FileNotFoundException: file:\C:\workspace\jboss-3.2.7\server\ceptix\data\xmbean-attrs\NFSServer.xml (Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch)
      at java.io.FileOutputStream.open(Native Method)
      at java.io.FileOutputStream.(FileOutputStream.java:179)
      at java.io.FileOutputStream.(FileOutputStream.java:70)
      at org.apache.xalan.transformer.TransformerIdentityImpl.createResultContentHandler(TransformerIdentityImpl.java:235)
      at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:278)
      at org.jboss.system.pm.XMLAttributePersistenceManager.outputXmlFile(XMLAttributePersistenceManager.java:758)
      at org.jboss.system.pm.XMLAttributePersistenceManager.store(XMLAttributePersistenceManager.java:332)
      at org.jboss.mx.persistence.DelegatingPersistenceManager.store(DelegatingPersistenceManager.java:187)
      at org.jboss.mx.modelmbean.ModelMBeanInvoker.store(ModelMBeanInvoker.java:330)
      at org.jboss.mx.interceptor.PersistenceInterceptor.invoke(PersistenceInterceptor.java:89)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:84)
      at org.jboss.mx.server.AbstractMBeanInvoker.setAttribute(AbstractMBeanInvoker.java:416)
      at org.jboss.mx.server.MBeanServerImpl.setAttribute(MBeanServerImpl.java:455)
      at org.jboss.system.ServiceConfigurator.setAttribute(ServiceConfigurator.java:567)
      at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:275)
      at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:163)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:117)
      at org.jboss.system.ServiceController.install(ServiceController.java:199)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:198)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy4.install(Unknown Source)
      at org.jboss.deployment.SARDeployer.create(SARDeployer.java:204)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:783)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:604)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
      ...

      Please note the "file:/"-prefix of the path given in the exception message.
      The problem seems to be that for some strange reason, xalan behaves differently on 1.5. XMLAttributePersistenceManager.outputXmlFile(XMLAttributePersistenceManager.java:758) calls xformer.transform with a StreamResult into which it passed a perfectly Ok looking File-instance. The TransformerIdentityImpl.createResultContentHandler(TransformerIdentityImpl.java:235) lateron calls the FileOutputStream(String) constructor with the path mangled in a way such that it has the "file:/"-prefix causing the constructor to fail.

      Do you have any ideas? I did not trace into Xalan, but I suppose it does something with the File, which suffers from a semantic change in 1.5.

      Joerg Henne

        1 2 Previous Next