Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
11 replies Latest Post - ‏2012-12-26T20:59:15Z by SystemAdmin
SystemAdmin
SystemAdmin
2327 Posts
ACCEPTED ANSWER

Pinned topic 5.0.0.3 WorklightStart_JQueryMobile org.apache.xerces.parsers.SAXParser

‏2012-09-02T04:11:03Z |
IBM® Worklight Studio

Version: 5.0.0.3
Build ID: IWSO5003-I20120820_1520


Steps to reproduce:
1) Import the WorklightStarter-JQueryMobile.zip (from the sample tutorial)
2) Run As > Build All and Deploy
3) Deploy Adapter
4) Right click on Android > Run As > Preview

Error in the Worklight console and I am unable to use the sample in 5.0.0.3. Please provide a fix. Thanks.

2012-09-02 00:08:13 An error occurred while invoking procedure WorklightStarterAdapter/HttpRequest parameters: {
"arr": [
{
"method": "get",
"path": "rss.xml",
"returnedContentType": "xml",
"transformation": {
"type": "xslFile",
"xslFile": "Items.xsl"
}
}
]
}
org.xml.sax.SAXException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found
java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
Caused by: org.xml.sax.SAXException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found
java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: 5.0.0.3 WorklightStart_JQueryMobile org.apache.xerces.parsers.SAXParser

    ‏2012-09-02T09:37:24Z  in response to SystemAdmin
    Hi.

    I cannot confirm this.

    1. I installed IBM Worklight v5.0.0.3 (5.0.2.407) onto my Eclipse Indigo 3.7.2
    2. I downloaded the Worklight Starter jQuery edition sample app (https://www.ibm.com/developerworks/mobile/worklight/getting-started/)
    3. I imported the project an built and deployed the adapter and app
    4. I chose Run As >> Preview and the MBS came up with the app working within it with no errors (tried both internal and external browsers setting in Eclipse)

    My setup was done on Windows 7.
    Can you provide any other details?

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    • SystemAdmin
      SystemAdmin
      2327 Posts
      ACCEPTED ANSWER

      Re: 5.0.0.3 WorklightStart_JQueryMobile org.apache.xerces.parsers.SAXParser

      ‏2012-09-03T02:17:21Z  in response to IdanAdar
      Windows 7 Professional SP1
      32-bit

      Fresh VMWare image

      What have I installed on the fresh Win 7 image?
      • Install Oracle jdk-7u2-windows-i586.exe
      • Install ENT_DEPLOY_1.5.2_WINDOWS.zip
      • After restart IM, point to unzipped imf-wce.zip. All defaults Liberty Profile and Derby
      • Install the unzipped imf_wce5003.update.zip
      • Install IM_Rep_Worklight_Studio_wce_5.0.0.zip
      • Open studio, click Help > Install New Software
      • point to iws_eclipse_wce_5.0.0.3.zip

      java version "1.7.0_02"
      Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
      Java HotSpot(TM) Client VM (build 22.0-b10, mixed mode, sharing)

      If you still can't reproduce it, I can send you my vmimage. Thanks.
      • qcduong
        qcduong
        30 Posts
        ACCEPTED ANSWER

        Re: 5.0.0.3 WorklightStart_JQueryMobile org.apache.xerces.parsers.SAXParser

        ‏2012-09-03T02:22:45Z  in response to SystemAdmin
        Hey Jane,

        I've got the sample working using the same software spec on MAC as well..

        will give the Windows XP PoT image a try when I have chance to see if I get the same thing. I don't have access to any Windows 7 systems..
        • SystemAdmin
          SystemAdmin
          2327 Posts
          ACCEPTED ANSWER

          Re: 5.0.0.3 WorklightStart_JQueryMobile org.apache.xerces.parsers.SAXParser

          ‏2012-09-04T14:14:43Z  in response to qcduong
          I actually can consistently reproduce the issue with two JDK 7 version - (I only tried two different version 7 JDK) It's JDK related issue.

          Starting with fresh Win 7 Professional VM image.

          Steps to consistently reproduce the problem are:
          1) Install IM 1.5.2
          2) Install Chrome
          3) Install Oracle JDK 7 update7
          4) Using IM to install WL Studio 5.0
          5) In the IM, click Update to bring it to WL Studio 5.0.0.3
          6) Open Studio and install the ADT plugin - https://dl-ssl.google.com/android/eclipse/
          7) In Studio workbench, change the Preference > General > Web Browser > External Web Browser
          8) Import WorklightStarter_JQueryMobile.zip
          9) Build All and Deploy
          10) Deploy Adapter
          11) Right click on Android > Run As > Preview
          12) Error in the chrome console and cannot connect to the adapter anymore.

          Procedure invocation error. Runtime: org.xml.sax.SAXException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found
          java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser

          However, I did the above installation procedure with the only differences of using the Oracle JDK 6u35 JDK instead. I can run the sample without any issue.

          So I can confidently conclude it's the JDK version that was giving me the issue. Again, I have three VMs
          WL Studio 5.0.0.3 with JDK 6u35 - WorklightStarter_JQueryMobile OK
          WL Studio 5.0.0.3 with JDK 7u2 - java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
          WL Studio 5.0.0.3 with JDK 7u7 - java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser

          Please provide a fix. If you cannot reproduce, email me at Jane Fung/Toronto/IBM I will send you the VM. Thanks.
          • bdodd
            bdodd
            19 Posts
            ACCEPTED ANSWER

            Re: 5.0.0.3 WorklightStart_JQueryMobile org.apache.xerces.parsers.SAXParser

            ‏2012-09-04T21:37:16Z  in response to SystemAdmin
            Hi Jane,

            I'll try to repro the issue with the Oracle 7u7 JDK.

            In the mean time, do you have a more complete call stack of the
            ClassNotFoundException? (from the Liberty or Worklight logs, etc.)

            Thanks,
            Bill
            • SystemAdmin
              SystemAdmin
              2327 Posts
              ACCEPTED ANSWER

              Re: 5.0.0.3 WorklightStart_JQueryMobile org.apache.xerces.parsers.SAXParser

              ‏2012-09-06T00:44:33Z  in response to bdodd
              Here is the server.log

              2012-09-04 10:06:37,460 INFO GadgetReportsServiceImpl (Framework Event Dispatcher:) Application raw reports are disabled.
              2012-09-04 10:06:37,523 INFO ProjectBundleManager (Framework Event Dispatcher:) ====== Started server for project WorklightStarter_jQueryMobile-project-customization; version=0.0.0; Worklight version=5.0.2.407
              2012-09-04 10:07:03,523 INFO WidgetServiceBean (3114459@qtp-14299039-0:es0v3q6cjl8c1klcfcn8w9uid) Deployed app 'WorklightStarter_jQueryMobile-android-1.0' successfully on Worklight Server
              2012-09-04 10:07:04,445 INFO WidgetServiceBean (3114459@qtp-14299039-0:es0v3q6cjl8c1klcfcn8w9uid) Deployed app 'WorklightStarter_jQueryMobile-common' successfully on Worklight Server
              2012-09-04 10:07:05,539 INFO WidgetServiceBean (3114459@qtp-14299039-0:es0v3q6cjl8c1klcfcn8w9uid) Deployed app 'WorklightStarter_jQueryMobile-iphone-1.0' successfully on Worklight Server
              2012-09-04 10:07:26,695 INFO DeployServiceImpl (3114459@qtp-14299039-0:1gokaidbvp67r12truzp4moxvd) Deployed adapter 'WorklightStarterAdapter' successfully.
              2012-09-04 10:08:22,000 ERROR InvocationContext (pool-3-thread-1:1cpa4i4zz43v71upgrib2g4hky) An error occurred while invoking procedure WorklightStarterAdapter/HttpRequest parameters: {
              "arr": [
              {
              "method": "get",
              "path": "rss.xml",
              "returnedContentType": "xml",
              "transformation": {
              "type": "xslFile",
              "xslFile": "Items.xsl"
              }
              }
              ]
              }
              org.xml.sax.SAXException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found
              java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
              Caused by: org.xml.sax.SAXException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found
              java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
              java.lang.RuntimeException: org.xml.sax.SAXException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found
              java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
              at com.worklight.adapters.http.HttpMessageExtractor.getXmlSource(HttpMessageExtractor.java:65)
              at com.worklight.integration.mapping.XMLDataProcessor.getXmlFromExtractor(XMLDataProcessor.java:126)
              at com.worklight.integration.mapping.XMLDataProcessor.getPayloadAsXml(XMLDataProcessor.java:122)
              at com.worklight.integration.mapping.XMLDataProcessor.receivePayload(XMLDataProcessor.java:63)
              at com.worklight.integration.model.ProcedureInvoker.processXMLData(ProcedureInvoker.java:62)
              at com.worklight.adapters.http.HTTP.parseResponseContent(HTTP.java:281)
              at com.worklight.adapters.http.HTTP.execRequest(HTTP.java:160)
              at com.worklight.adapters.http.HTTP.invoke(HTTP.java:119)
              at com.worklight.integration.model.ProcedureInvoker.invokeProcedure(ProcedureInvoker.java:51)
              at com.worklight.integration.model.Procedure.invoke(Procedure.java:173)
              at com.worklight.integration.model.InvocationContext.call(InvocationContext.java:145)
              at com.worklight.integration.model.InvocationContext.call(InvocationContext.java:29)
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
              at java.util.concurrent.FutureTask.run(FutureTask.java:166)
              at com.worklight.integration.model.InvocationContext$DirectExecutorService.execute(InvocationContext.java:214)
              at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:132)
              at com.worklight.integration.model.InvocationContext.submit(InvocationContext.java:124)
              at com.worklight.integration.model.InvocationContextManager.submitInvocation(InvocationContextManager.java:43)
              at com.worklight.integration.services.impl.DataAccessServiceImpl.callProcedure(DataAccessServiceImpl.java:363)
              at com.worklight.integration.services.impl.DataAccessServiceImpl.access$100(DataAccessServiceImpl.java:54)
              at com.worklight.integration.services.impl.DataAccessServiceImpl$4.execute(DataAccessServiceImpl.java:266)
              at com.worklight.core.auth.impl.AuthenticationServiceBean.accessResource(AuthenticationServiceBean.java:64)
              at com.worklight.integration.services.impl.DataAccessServiceImpl.invokeProcedureInternal(DataAccessServiceImpl.java:263)
              at com.worklight.integration.services.impl.DataAccessServiceImpl.invokeDynamicProcedure(DataAccessServiceImpl.java:322)
              at com.worklight.integration.services.impl.DataAccessServiceImpl.invokeDynamicProcedure(DataAccessServiceImpl.java:306)
              at com.worklight.integration.js.JavaScriptIntegrationLibraryImplementation.invokeDynamicProcedure(JavaScriptIntegrationLibraryImplementation.java:97)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:601)
              at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:161)
              at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:247)
              at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:86)
              at org.mozilla.javascript.gen.c1._c8(/integration.js:81)
              at org.mozilla.javascript.gen.c1.call(/integration.js)
              at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:66)
              at org.mozilla.javascript.gen.c3._c1(C%3A%5CLabs%5Cworkspace%5CWorklightStarter_jQueryMobile%5Cadapters%5CWorklightStarterAdapter/WorklightStarterAdapter-impl.js:10)
              at org.mozilla.javascript.gen.c3.call(C%3A%5CLabs%5Cworkspace%5CWorklightStarter_jQueryMobile%5Cadapters%5CWorklightStarterAdapter/WorklightStarterAdapter-impl.js)
              at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
              at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
              at org.mozilla.javascript.gen.c3.call(C%3A%5CLabs%5Cworkspace%5CWorklightStarter_jQueryMobile%5Cadapters%5CWorklightStarterAdapter/WorklightStarterAdapter-impl.js)
              at com.worklight.integration.js.JavaScriptManager.callFunction(JavaScriptManager.java:180)
              at com.worklight.integration.js.JavaScriptManager.invokeFunction(JavaScriptManager.java:156)
              at com.worklight.integration.services.impl.AdapterManagerImpl.invokeFunction(AdapterManagerImpl.java:101)
              at com.worklight.integration.js.JavaScriptProcedureInvoker.invoke(JavaScriptProcedureInvoker.java:42)
              at com.worklight.integration.model.ProcedureInvoker.invokeProcedure(ProcedureInvoker.java:51)
              at com.worklight.integration.model.Procedure.invoke(Procedure.java:173)
              at com.worklight.integration.model.InvocationContext.call(InvocationContext.java:145)
              at com.worklight.integration.model.InvocationContext.call(InvocationContext.java:29)
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
              at java.util.concurrent.FutureTask.run(FutureTask.java:166)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
              at java.lang.Thread.run(Thread.java:722)
              Caused by: org.xml.sax.SAXException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found
              java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
              at org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:229)
              at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:190)
              at com.worklight.server.integration.mapping.EscapeFilter.getDefaultReader(EscapeFilter.java:33)
              at com.worklight.server.integration.mapping.EscapeFilter.<init>(EscapeFilter.java:27)
              at com.worklight.server.integration.mapping.EscapeFilterBuilder.build(EscapeFilterBuilder.java:28)
              at com.worklight.adapters.http.HttpMessageExtractor.getSAXSource(HttpMessageExtractor.java:73)
              at com.worklight.adapters.http.HttpMessageExtractor.getXmlSource(HttpMessageExtractor.java:51)
              ... 53 more
              Caused by: java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
              at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
              at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
              at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
              at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
              at org.xml.sax.helpers.NewInstance.newInstance(NewInstance.java:73)
              at org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:227)
              ... 59 more
              2012-09-04 10:18:23,629 INFO ProjectBundleManager (Framework Event Dispatcher:) ====== Stopped server for project WorklightStarter_jQueryMobile-project-customization
              2012-09-05 20:40:51,958 INFO GadgetReportsServiceImpl (Framework Event Dispatcher:) Application raw reports are disabled.
              2012-09-05 20:40:52,036 INFO ProjectBundleManager (Framework Event Dispatcher:) ====== Started server for project WorklightStarter_jQueryMobile-project-customization; version=0.0.0; Worklight version=5.0.2.407
              2012-09-05 20:42:23,473 INFO DeployServiceImpl (12552733@qtp-1266499-0:1wxmfowjud9f21fun4a5ba6y5a) Deployed adapter 'WorklightStarterAdapter' successfully.
              2012-09-05 20:45:20,839 ERROR InvocationContext (pool-5-thread-1:1bdte247vcy8f6hogt098zcia) An error occurred while invoking procedure WorklightStarterAdapter/HttpRequest parameters: {
              "arr": [
              {
              "method": "get",
              "path": "rss.xml",
              "returnedContentType": "xml",
              "transformation": {
              "type": "xslFile",
              "xslFile": "Items.xsl"
              }
              }
              ]
              }
              org.xml.sax.SAXException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found
              java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
              Caused by: org.xml.sax.SAXException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found
              java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
              java.lang.RuntimeException: org.xml.sax.SAXException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found
              java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
              at com.worklight.adapters.http.HttpMessageExtractor.getXmlSource(HttpMessageExtractor.java:65)
              at com.worklight.integration.mapping.XMLDataProcessor.getXmlFromExtractor(XMLDataProcessor.java:126)
              at com.worklight.integration.mapping.XMLDataProcessor.getPayloadAsXml(XMLDataProcessor.java:122)
              at com.worklight.integration.mapping.XMLDataProcessor.receivePayload(XMLDataProcessor.java:63)
              at com.worklight.integration.model.ProcedureInvoker.processXMLData(ProcedureInvoker.java:62)
              at com.worklight.adapters.http.HTTP.parseResponseContent(HTTP.java:281)
              at com.worklight.adapters.http.HTTP.execRequest(HTTP.java:160)
              at com.worklight.adapters.http.HTTP.invoke(HTTP.java:119)
              at com.worklight.integration.model.ProcedureInvoker.invokeProcedure(ProcedureInvoker.java:51)
              at com.worklight.integration.model.Procedure.invoke(Procedure.java:173)
              at com.worklight.integration.model.InvocationContext.call(InvocationContext.java:145)
              at com.worklight.integration.model.InvocationContext.call(InvocationContext.java:29)
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
              at java.util.concurrent.FutureTask.run(FutureTask.java:166)
              at com.worklight.integration.model.InvocationContext$DirectExecutorService.execute(InvocationContext.java:214)
              at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:132)
              at com.worklight.integration.model.InvocationContext.submit(InvocationContext.java:124)
              at com.worklight.integration.model.InvocationContextManager.submitInvocation(InvocationContextManager.java:43)
              at com.worklight.integration.services.impl.DataAccessServiceImpl.callProcedure(DataAccessServiceImpl.java:363)
              at com.worklight.integration.services.impl.DataAccessServiceImpl.access$100(DataAccessServiceImpl.java:54)
              at com.worklight.integration.services.impl.DataAccessServiceImpl$4.execute(DataAccessServiceImpl.java:266)
              at com.worklight.core.auth.impl.AuthenticationServiceBean.accessResource(AuthenticationServiceBean.java:64)
              at com.worklight.integration.services.impl.DataAccessServiceImpl.invokeProcedureInternal(DataAccessServiceImpl.java:263)
              at com.worklight.integration.services.impl.DataAccessServiceImpl.invokeDynamicProcedure(DataAccessServiceImpl.java:322)
              at com.worklight.integration.services.impl.DataAccessServiceImpl.invokeDynamicProcedure(DataAccessServiceImpl.java:306)
              at com.worklight.integration.js.JavaScriptIntegrationLibraryImplementation.invokeDynamicProcedure(JavaScriptIntegrationLibraryImplementation.java:97)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:601)
              at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:161)
              at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:247)
              at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:86)
              at org.mozilla.javascript.gen.c1._c8(/integration.js:81)
              at org.mozilla.javascript.gen.c1.call(/integration.js)
              at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:66)
              at org.mozilla.javascript.gen.c4._c1(C%3A%5CLabs%5Cworkspace%5CWorklightStarter_jQueryMobile%5Cadapters%5CWorklightStarterAdapter/WorklightStarterAdapter-impl.js:10)
              at org.mozilla.javascript.gen.c4.call(C%3A%5CLabs%5Cworkspace%5CWorklightStarter_jQueryMobile%5Cadapters%5CWorklightStarterAdapter/WorklightStarterAdapter-impl.js)
              at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
              at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
              at org.mozilla.javascript.gen.c4.call(C%3A%5CLabs%5Cworkspace%5CWorklightStarter_jQueryMobile%5Cadapters%5CWorklightStarterAdapter/WorklightStarterAdapter-impl.js)
              at com.worklight.integration.js.JavaScriptManager.callFunction(JavaScriptManager.java:180)
              at com.worklight.integration.js.JavaScriptManager.invokeFunction(JavaScriptManager.java:156)
              at com.worklight.integration.services.impl.AdapterManagerImpl.invokeFunction(AdapterManagerImpl.java:101)
              at com.worklight.integration.js.JavaScriptProcedureInvoker.invoke(JavaScriptProcedureInvoker.java:42)
              at com.worklight.integration.model.ProcedureInvoker.invokeProcedure(ProcedureInvoker.java:51)
              at com.worklight.integration.model.Procedure.invoke(Procedure.java:173)
              at com.worklight.integration.model.InvocationContext.call(InvocationContext.java:145)
              at com.worklight.integration.model.InvocationContext.call(InvocationContext.java:29)
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
              at java.util.concurrent.FutureTask.run(FutureTask.java:166)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
              at java.lang.Thread.run(Thread.java:722)
              Caused by: org.xml.sax.SAXException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found
              java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
              at org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:229)
              at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:190)
              at com.worklight.server.integration.mapping.EscapeFilter.getDefaultReader(EscapeFilter.java:33)
              at com.worklight.server.integration.mapping.EscapeFilter.<init>(EscapeFilter.java:27)
              at com.worklight.server.integration.mapping.EscapeFilterBuilder.build(EscapeFilterBuilder.java:28)
              at com.worklight.adapters.http.HttpMessageExtractor.getSAXSource(HttpMessageExtractor.java:73)
              at com.worklight.adapters.http.HttpMessageExtractor.getXmlSource(HttpMessageExtractor.java:51)
              ... 53 more
              Caused by: java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
              at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
              at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
              at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
              at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
              at org.xml.sax.helpers.NewInstance.newInstance(NewInstance.java:73)
              at org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:227)
              ... 59 more
              • bdodd
                bdodd
                19 Posts
                ACCEPTED ANSWER

                Re: 5.0.0.3 WorklightStart_JQueryMobile org.apache.xerces.parsers.SAXParser

                ‏2012-09-06T02:08:34Z  in response to SystemAdmin
                Jane,
                Thanks for posting the server log. I was also able to reproduce this problem myself this evening using the v7 Oracle JDK on my Linux system. I haven't yet been able to find where or how the org.apache.xerces.parsers.SAXParser is being set or specified. I attached to the JVM using jconsole and did not see a 'org.xml.sax.driver' system property set. Nor have I found a META-INF/services/org.xml.sax.driver file in any of the jar files used by the studio.

                But I did find a work-around that worked for me. In the Worklight.sh (Linux) or Worklight.bat (Windows) script that you use to launch the studio, add a -Dorg.xml.sax.driver=com.sun.org.apache.xerces.internal.parsers.SAXParser parameter to the end of the eclipse command invocation to specify to use the default Oracle SAXParser. After editing, your script should look something like this:

                /opt/IBM/WLStudio/eclipse -vm /usr/local/jdk1.7.0_07/jre/bin/java $* -product com.ibm.iws.product.ide -vmargs -Xms40m -Xmx960m -XX:MaxPermSize=320M -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog -Dorg.xml.sax.driver=com.sun.org.apache.xerces.internal.parsers.SAXParser

                The above is based on my Linux Worklight.sh studio script. Adjust accordingly for Windows.

                Bill
                • SystemAdmin
                  SystemAdmin
                  2327 Posts
                  ACCEPTED ANSWER

                  Re: 5.0.0.3 WorklightStart_JQueryMobile org.apache.xerces.parsers.SAXParser

                  ‏2012-12-06T18:31:15Z  in response to bdodd
                  This "workaround" fixed my problem. I had a "Class not found exception" with Eclipse and IBM Worklight Studio 5.0.30 on Windows 7.
                  I had to insert a new line containing "-Dorg.xml.sax.driver=com.sun.org.apache.xerces.internal.parsers.SAXParser" into the org.eclipse.ui.ide.prefs in the "eclipse\configuration\.settings"-folder.
                  • SystemAdmin
                    SystemAdmin
                    2327 Posts
                    ACCEPTED ANSWER

                    Re: 5.0.0.3 WorklightStart_JQueryMobile org.apache.xerces.parsers.SAXParser

                    ‏2012-12-26T20:59:15Z  in response to SystemAdmin
                    Hi,

                    I am facing the same problem when creating an Adapter for a Webservice.

                    I followed these suggestions but did not work for me.

                    My code for adapter is


                    function getRewardPointsDetails() {
                    var request= "<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'"+
                    " xmlns:xsd='http://www.w3.org/2001/XMLSchema'"+
                    " xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>"+
                    "<soap:Body>"+
                    "<q0:MROnlineRequest><q0:AccountNumber>374488825602001</q0:AccountNumber>"+
                    "</q0:MROnlineRequest>"+
                    "</soap:Body></soap:Envelope>";

                    var options = {
                    method : 'post',
                    returnedContentType : 'xml',
                    path : 'http://abc:7080/MRONLINE/getMRStmtSummary' ,
                    body:{
                    content: request.toString(),
                    contentType:'text/xml; charset:utf-8'
                    }
                    };

                    return WL.Server.invokeHttp(options);
                    }


                    I also given xerces-1.4.3.jar file but did not work.

                    I cleaned work space , did not work.

                    My Environment:
                    Win XP
                    JDK 7
                    Eclipse WL (Free) v5.0.5

                    still have not tried on WL consumer Edition.

                    Thanks
                    Abdul Ahad
  • bdodd
    bdodd
    19 Posts
    ACCEPTED ANSWER

    Re: 5.0.0.3 WorklightStart_JQueryMobile org.apache.xerces.parsers.SAXParser

    ‏2012-09-06T18:30:32Z  in response to SystemAdmin
    Thanks for reporting this Jane. A problem report for this issue has been created and added to our queue and will be looked at as soon as possible.

    In the mean time, please use the work-around I described above.

    Thanks,
    Bill
  • SystemAdmin
    SystemAdmin
    2327 Posts
    ACCEPTED ANSWER

    Re: 5.0.0.3 WorklightStart_JQueryMobile org.apache.xerces.parsers.SAXParser

    ‏2012-09-07T00:25:54Z  in response to SystemAdmin
    hi Bill - thanks for opening the defect.