8 Replies Latest reply on Sep 17, 2007 4:52 AM by kukeltje

    The org.xml.sax.SAXNotRecognizedException:

    sujayc

      Hi HITSW did you find any of this error beofore
      I tried with different versions of the parser


      Any one faced this issue ?

      couldn't set xml parser property 'http://java.sun.com/xml/jaxp/properties/schemaLanguage' to 'http://www.w3.org/2001/XMLSchema'
      org.xml.sax.SAXNotRecognizedException: Property: http://java.sun.com/xml/jaxp/properties/schemaLanguage
      at org.apache.crimson.parser.XMLReaderImpl.setProperty(XMLReaderImpl.java:272)
      at org.apache.crimson.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:190)
      at org.jbpm.jpdl.xml.JpdlParser.createXmlReader(JpdlParser.java:77)
      at org.jbpm.jpdl.xml.JpdlParser.createSaxReader(JpdlParser.java:62)
      at org.jbpm.jpdl.xml.JpdlParser.parse(JpdlParser.java:56)
      at org.jbpm.jpdl.xml.JpdlXmlReader.readProcessDefinition(JpdlXmlReader.java:138)
      at org.jbpm.graph.def.ProcessDefinition.parseXmlString(ProcessDefinition.java:143)
      at org.jbpm.tutorial.helloworld.HelloWorldTest.testHelloWorldProcess(HelloWorldTest.java:40)
      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:324)
      at junit.framework.TestCase.runTest(TestCase.java:154)
      at junit.framework.TestCase.runBare(TestCase.java:127)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:118)
      at junit.framework.TestSuite.runTest(TestSuite.java:208)
      at junit.framework.TestSuite.run(TestSuite.java:203)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
      14:05:01,443 [main] WARN JpdlParser : couldn't set xml parser property 'http://apache.org/xml/properties/schema/external-schemaLocation'
      org.xml.sax.SAXNotRecognizedException: Property: http://apache.org/xml/properties/schema/external-schemaLocation
      at org.apache.crimson.parser.XMLReaderImpl.setProperty(XMLReaderImpl.java:272)
      at org.apache.crimson.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:190)
      at org.jbpm.jpdl.xml.JpdlParser.createXmlReader(JpdlParser.java:83)
      at org.jbpm.jpdl.xml.JpdlParser.createSaxReader(JpdlParser.java:62)
      at org.jbpm.jpdl.xml.JpdlParser.parse(JpdlParser.java:56)
      at org.jbpm.jpdl.xml.JpdlXmlReader.readProcessDefinition(JpdlXmlReader.java:138)
      at org.jbpm.graph.def.ProcessDefinition.parseXmlString(ProcessDefinition.java:143)
      at org.jbpm.tutorial.helloworld.HelloWorldTest.testHelloWorldProcess(HelloWorldTest.java:40)
      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:324)
      at junit.framework.TestCase.runTest(TestCase.java:154)
      at junit.framework.TestCase.runBare(TestCase.java:127)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:118)
      at junit.framework.TestSuite.runTest(TestSuite.java:208)
      at junit.framework.TestSuite.run(TestSuite.java:203)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
      14:05:01,443 [main] WARN JpdlParser : couldn't set xml parser feature 'http://apache.org/xml/features/validation/dynamic'
      org.xml.sax.SAXNotRecognizedException: Feature: http://apache.org/xml/features/validation/dynamic

        • 1. Re: The org.xml.sax.SAXNotRecognizedException:
          vanho

          Hi,

          I got the same problem. Just wonder whether you have solved it or not?

          Could anyone out there please help us know how to solve this?

          Many thanks,
          Van

          • 2. Re: The org.xml.sax.SAXNotRecognizedException:
            vanho

            Hi,

            Not sure if this is the solution for this problem. But when I changed to use
            jdk1.5.0 instead of j2sdk1.4.x, the exceptions disappeared.

            Cheers,
            Van

            • 3. Re: The org.xml.sax.SAXNotRecognizedException:
              kukeltje

              what appserver are you using and what version of jBPM?

              • 4. Re: The org.xml.sax.SAXNotRecognizedException:
                vanho

                Hi,

                I'm using the lastest JBoss and jBPM versions, i.e. JBoss 4.0.4 CR2
                and jBPM 3.1.

                Van

                • 5. Re: The org.xml.sax.SAXNotRecognizedException:
                  joelkoz

                  I had a similar problem, and was able to make it go away by putting the Xerces .jar files in my classpath. I think it has something to do with validating XML parsers, and the JDK 1.4.x doesn't support those features (or something like that).

                  • 6. Re: The org.xml.sax.SAXNotRecognizedException:
                    jtigger

                    The SAX2 parser that comes with the JDK 1.4.x (crimson) does not support XMLSchema (it uses DTDs for document structure). jBPM defines JPDL in XML Schemas, not DTDs, so you need a parser that supports .xsd.

                    The exception being thrown is saying, "you're trying to set a SAX parser property and the current XML reader doesn't grok that property". In this case, the property is "http://java.sun.com/xml/jaxp/properties/schemaLanguage"

                    Xerces's parser DOES support XMLSchema. When you toss in the Xerces JAR (I'm using 2.8.0), the JDK quietly defers to the included parser.

                    In JDK 1.5, Xerces is used as the parser in the JAXP default implementation. So, in JDK 1.5 XML Schemas are supported out-of-the-box.

                    • 7. Re: The org.xml.sax.SAXNotRecognizedException:
                      sidkennedy

                      Hello to all,
                      I have to re-open this thread again, because I got the exception even so I'm using jdk 1.6. I want to post my Exception:

                      [INFO] JbpmConfiguration - -using jbpm configuration resource 'jbpm.cfg.xml'
                      [WARN] JpdlParser - -couldn't set xml parser property 'http://java.sun.com/xml/jaxp/properties/schemaLanguage' to 'http://www.w3.org/2001/XMLSchema' <org.xml.sax.SAXNotRecognizedException: http://java.sun.com/xml/jaxp/properties/schemaLanguage>org.xml.sax.SAXNotRecognizedException: http://java.sun.com/xml/jaxp/properties/schemaLanguage
                      at org.apache.xerces.framework.XMLParser.setProperty(XMLParser.java:1626)
                      at org.apache.xerces.parsers.SAXParser.setProperty(SAXParser.java:770)
                      at org.apache.xerces.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:183)
                      at org.jbpm.jpdl.xml.JpdlParser.createXmlReader(JpdlParser.java:77)
                      at org.jbpm.jpdl.xml.JpdlParser.createSaxReader(JpdlParser.java:62)
                      at org.jbpm.jpdl.xml.JpdlParser.parse(JpdlParser.java:56)
                      at org.jbpm.jpdl.xml.JpdlXmlReader.readProcessDefinition(JpdlXmlReader.java:138)
                      at org.sureal_projekt.eclipse.workflowtools.popup.actions.AddProcessToViewAction.run(AddProcessToViewAction.java:53)
                      at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:256)
                      at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
                      at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
                      at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
                      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
                      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
                      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
                      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
                      at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
                      at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
                      at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
                      at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
                      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
                      at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
                      at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
                      at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
                      at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
                      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
                      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
                      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
                      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
                      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.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
                      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
                      at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
                      at org.eclipse.equinox.launcher.Main.main(Main.java:1144)

                      so now my question. Can I resolve the problem if I use a new xerces-j api(2.9.2)? And if so, how can I use this instead of the classes contained in the jdk1.6? I tried to add the xml-apis.jar(xerces-j 2.9.1) to my classpath but it didn't help. Or can I do something with that 'jbpm.cfg.xml' mentioned in the [info] above?
                      hope you can help me.

                      greetz
                      Sid

                      • 8. Re: The org.xml.sax.SAXNotRecognizedException:
                        kukeltje

                        overriding xml parses is a jdk issue (search for 'xml and parser and endorsed' on the internet