2 Replies Latest reply on Feb 7, 2007 5:32 PM by Scott Nieman

    How to specify Application specific XML Parser factories?

    Amit Sri Newbie

      Hi All,

      I am trying to deploy and run an application on JBoss 4.0.2 which uses Oracle XML parsers. I wish to specify and set the XML factories for that application i.e. javax.xml.parsers.SAXParserFactory.
      javax.xml.parsers.DocumentBuilderFactory
      javax.xml.transform.TransformerFactory
      to point to my application only as the application using classes generated by Oracle JAXB tool. So, the default xml factories (xerces) is causing problem while Marshalling.

      Setting these properties at sever level is causing problems with other applications. Is there any way to tune the application level XML factories?

      Any suggestions in this regard will be helpful..

      Thanks in advance,
      Amit Srivastava..

        • 1. Re: How to specify Application specific XML Parser factories
          Amit Sri Newbie

          Hi All,

          I tried changing the default XML factories settings to use Oracle specific parsers for application in JBoss server but I am getting issues while server startup stating-

          12:50:20,842 WARN [XMLLoginConfigImpl] End loadConfig, failed to load config: f
          ile:/E:/jboss-4.0.2/server/default/conf/login-config.xml
          org.jboss.security.auth.login.ParseException: Encountered "<?xml" at line 1, col
          umn 1.
          Was expecting one of:

          ...

          at org.jboss.security.auth.login.SunConfigParser.generateParseException(
          SunConfigParser.java:389)
          at org.jboss.security.auth.login.SunConfigParser.jj_consume_token(SunCon
          figParser.java:327)
          at org.jboss.security.auth.login.SunConfigParser.config(SunConfigParser.
          java:98)
          at org.jboss.security.auth.login.SunConfigParser.parse(SunConfigParser.j
          ava:57)
          at org.jboss.security.auth.login.SunConfigParser.doParse(SunConfigParser
          .java:79)
          at org.jboss.security.auth.login.XMLLoginConfigImpl.loadSunConfig(XMLLog
          inConfigImpl.java:295)
          at org.jboss.security.auth.login.XMLLoginConfigImpl.loadConfig(XMLLoginC
          onfigImpl.java:279)
          at org.jboss.security.auth.login.XMLLoginConfigImpl.loadConfig(XMLLoginC
          onfigImpl.java:253)
          at org.jboss.security.auth.login.XMLLoginConfig.startService(XMLLoginCon
          fig.java:162)
          at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
          upport.java:272)
          at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
          eanSupport.java:222)
          at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
          sorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:324)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
          er.java:141)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)

          I have referred to the following link to change facory settings- http://www.huihoo.com/jboss/online_manual/3.0/ch13s135.html

          Please, help me in getting this issue resolved.,

          Thanks,
          Amit Srivastava..

          • 2. Re: How to specify Application specific XML Parser factories
            Scott Nieman Newbie

            Did you ever get a response to this? I am getting the same error message trying to get JBoss 4.0.3SP1 to run under the Java Service Wrapper.
            Scott Nieman