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.
23 replies Latest Post - ‏2012-02-16T04:49:45Z by mburati
SystemAdmin
SystemAdmin
557 Posts
ACCEPTED ANSWER

Pinned topic schemaLocation, fileNotFoundException

‏2007-11-13T06:03:40Z |
Hi, I am trying to call a webservices using Web Service Call Builder. Everything works well except that when i'm trying to deploy the application to the environment without Portlet Factory, it gave me this error:

Exception caught and rethrown in checkAddSchema method.
The associated exception is: java.io.FileNotFoundException: C:\workspace\PortletFactory\MyWeb\WebContent\WEB-INF\wsdl\com\myweb\..\..\bo\WorkflowBO.xsd (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:129)
at com.bowstreet.util.xml.DetectCharacterEncod

I'm using WSDL-based soap. When i check the WebApp Tree, i saw that the imported schema shown the above schema location. (see below) The weird part is i have 3 wsdl files, only one is giving me this problem. Please advise what i should do? Is that because there are 3 imports in this particular wsdl?

<xsd:import namespace="http://MyProcLibrary/com/myweb/wps/bo/workflowbo" schemaLocation="/C:/Workspace/MyWebProj/MyWeb/WebContent/WEB-INF/wsdl/com/myweb/../../bo/WorkflowBO.xsd" />
Updated on 2012-02-16T04:49:45Z at 2012-02-16T04:49:45Z by mburati
  • SystemAdmin
    SystemAdmin
    557 Posts
    ACCEPTED ANSWER

    Re: schemaLocation, fileNotFoundException

    ‏2007-11-13T14:53:30Z  in response to SystemAdmin
    We identified a bug that hard codes the xsd path when a wsdl includes another wsdl that includes xsd file. Until we get a fix pack out, a workaround would be to combine the wsdls into one.

    TB
    • SystemAdmin
      SystemAdmin
      557 Posts
      ACCEPTED ANSWER

      Re: schemaLocation, fileNotFoundException

      ‏2008-01-09T11:16:44Z  in response to SystemAdmin
      Hi Trish ,

      Is this bug fixed ? I am getting same error when I am trying to call a webservice inside my portal project

      But when I follow the same steps of invoking the webservice and simply displaying result on a page I face no such error

      I have a implemented this using service provider and consumer model

      Please let me know

      Thanks
      Neha
      • SystemAdmin
        SystemAdmin
        557 Posts
        ACCEPTED ANSWER

        Re: schemaLocation, fileNotFoundException

        ‏2008-01-09T15:44:26Z  in response to SystemAdmin
        The bug that you are refering to has been fixed in Portlet Factory fix pack 6.0.2.1. This version should be available towards the end of the month.

        TB
        • WpfLearner
          WpfLearner
          3 Posts
          ACCEPTED ANSWER

          Re: schemaLocation, fileNotFoundException

          ‏2009-08-13T12:18:52Z  in response to SystemAdmin
          I am using Webshpere Portlet FActory 6.1.2 still I am getting these error. Do I need to change any settings to overide this error.

          Exception caught and rethrown in checkAddSchema method.
          The associated exception is: java.io.FileNotFoundException: /usr/WebSphere60/PortalServer3/installedApps/PORTLETAPPLC_1lza4qyc.ear/1lza4qyc.war/WEB-INF\wsdl\userAgreement/../bo/UserListRequest.xsd (A file or directory in the path name does not exist.)
          at java.io.FileInputStream.open(Native Method)
          • mburati
            mburati
            352 Posts
            ACCEPTED ANSWER

            Re: schemaLocation, fileNotFoundException

            ‏2009-08-13T14:26:36Z  in response to WpfLearner
            I don't know if you have any control over the generation of that WSDL/schema, but if so, we've found that it's often a good practice to avoid a ".." in an import path (for instance, if you need to import over http, some http stacks disallow ../ in URLs for security reasons.

            Another thing I noticed about your file path is that it looks like it's a Unix/Linux path, yet a couple of the file path separators are backslashes (between WEB-INF and wsdl and between wsdl and userAgreement) which is Windows specific and may not work too well for you on *nix. I suggest changing those to forward slashes to see if that helps.

            ..mb1
            • WpfLearner
              WpfLearner
              3 Posts
              ACCEPTED ANSWER

              Re: schemaLocation, fileNotFoundException

              ‏2009-08-14T07:42:50Z  in response to mburati
              Thanks for reply.

              The wsdl which we are using is generated by Websphere Intergration Developer which is given by an external team. We have many these wsdls and xsds . Modifying all xsds to specific path will be very complex is there any tool available which we can make use of for doing that?

              Our development enviroment is on Windows while deploying to linux we don't modify the models to linux path(slash).

              Is there any way not to validate schemas in Portlet factory.

              Also sometimes we are facing problem on some wars while installing Portal due to xsd issue not able to install the war so what we do is we manually delete the wsdls and xsd from war and install the war.
          • DGawron
            DGawron
            50 Posts
            ACCEPTED ANSWER

            Re: schemaLocation, fileNotFoundException

            ‏2009-08-14T16:02:38Z  in response to WpfLearner
            Ignoring the forward or backward slash issue for a moment, does the named XSD file actually exist at the named path or is the path incorrect?
            • WpfLearner
              WpfLearner
              3 Posts
              ACCEPTED ANSWER

              Re: schemaLocation, fileNotFoundException

              ‏2009-08-17T09:13:48Z  in response to DGawron
              Yeah xsd files exists in the path still we are getting the error.
              • aaron.a
                aaron.a
                4 Posts
                ACCEPTED ANSWER

                Re: schemaLocation, fileNotFoundException

                ‏2009-08-20T07:25:30Z  in response to WpfLearner
                Hi,
                We're facing the same problem on our project, after we upgraded from 6.0.2.3 to 6.1.2.2. These WSDLs were working on the 6.0.2.3 build. Again, using WSDL/ XSD generated from WID.
                We did not expect that an upgrade would cause a backward-compatibility problem, but this is now delaying our project. So (obviously), any help would be much appreciated. :-)
                Regards
                • aaron.a
                  aaron.a
                  4 Posts
                  ACCEPTED ANSWER

                  Re: schemaLocation, fileNotFoundException

                  ‏2009-08-20T07:36:43Z  in response to aaron.a
                  Thought I'd add a few more specifics to my earlier post, in case these are different issues. The points we differ are:
                  • Our error is thrown on the WebS Service Call builder UI, not at point of deployment.
                  • The error text itself is: Error processing schema import: com.bowstreet.util.WrappedException: C:\MyWorkspace\MyProjectName\WebContent\WEB-INF\wsdl\<path>\..\..\pf\bo\MyXSDName.xsd (the system canot find the path specified.) http://Root exception is java.io.FileNotFoundException:
                  C:\MyWorkspace\MyProjectName\WebContent\WEB-INF\wsdl\<path>\..\..\pf\bo\MyXSDName.xsd (the system canot find the path specified.)]
                  • aaron.a
                    aaron.a
                    4 Posts
                    ACCEPTED ANSWER

                    Re: schemaLocation, fileNotFoundException

                    ‏2009-08-20T07:41:12Z  in response to aaron.a
                    <Fell fowl of markup syntax; posting again, apologies>

                    Thought I'd add a few more specifics to my earlier post, in case these are different issues. The points we differ are:
                    1. Our error is thrown on the WebS Service Call builder UI, not at point of deployment.
                    2. The error text itself is:
                    
                    Error processing schema 
                    
                    import: com.bowstreet.util.WrappedException: C:\MyWorkspace\MyProjectName\WebContent\WEB-INF\wsdl\<path>\..\..\pf\bo\MyXSDName.xsd (the system canot find the path specified.)[Root exception is java.io.FileNotFoundException: C:\MyWorkspace\MyProjectName\WebContent\WEB-INF\wsdl\<path>\..\..\pf\bo\MyXSDName.xsd (the system canot find the path specified.)]
                    
                    • mburati
                      mburati
                      352 Posts
                      ACCEPTED ANSWER

                      Re: schemaLocation, fileNotFoundException

                      ‏2009-08-20T15:27:23Z  in response to aaron.a
                      So it sounds like this is a different problem than this thread was reporting (which was runtime on Unix).
                      When you say the UI of the builder, do you mean a dialog popup when you click Fetch WSDL or do you mean an error in the problems view of Eclipse?

                      Have you checked that the path stated in the error is where the XSD file is actually located in your project?

                      I suggest contacting customer support to worth through what is causing this.
                      • aaron.a
                        aaron.a
                        4 Posts
                        ACCEPTED ANSWER

                        Re: schemaLocation, fileNotFoundException

                        ‏2009-08-21T08:11:37Z  in response to mburati
                        This shows up in the Web Service Call builder UI (next to the name of the builder), and errors list only when the model is opened. And yes, the XSD does exist in the path.
                        We have now opened this as a support issue.
              • DGawron
                DGawron
                50 Posts
                ACCEPTED ANSWER

                Re: schemaLocation, fileNotFoundException

                ‏2009-08-26T17:16:11Z  in response to WpfLearner
                Can you post the WSDL and any associated import / include files? It will be easier to diagnose if we have the files to look at. The other option is to open a support ticket if you cannot post your WSDL files.
                • SystemAdmin
                  SystemAdmin
                  557 Posts
                  ACCEPTED ANSWER

                  Re: schemaLocation, fileNotFoundException

                  ‏2012-02-07T21:13:44Z  in response to DGawron
                  Hi All
                  Have we got any solution for this issue. We are also facing the same issue after migrating from Portal 5.1 to 6.1.
                  We are getting exactly same issue in the WSDL call.
                  Can someone let me know what is the fix for this?
                  Thanks
                  • mburati
                    mburati
                    352 Posts
                    ACCEPTED ANSWER

                    Re: schemaLocation, fileNotFoundException

                    ‏2012-02-07T21:20:06Z  in response to SystemAdmin
                    Some of the above was fixed in earlier versions of WebSphere Portlet Factory/Web Experience Factory and some may have been errors in WSDL.

                    It's not clear how your isuse is related or not with just that amount of information. Can you provide more detail (or better yet start a new thread with the current issue?).

                    What version of IBM Web Experience Factory (formerly known as WebSphere Portlet Factory) are you using?
                    Is this with Web Service Call or Web Service MultiOperation builder? Can you share what the WSDL looks like? If not because the WSDl containes proprietary information, you may need to contact to support.

                    ..mb1
                    • SystemAdmin
                      SystemAdmin
                      557 Posts
                      ACCEPTED ANSWER

                      Re: schemaLocation, fileNotFoundException

                      ‏2012-02-07T21:29:34Z  in response to mburati
                      Hi
                      Thanks for the reply..
                      I am using Portlet factory Version: 7.0.1. Earlier we have user 6.0.1. It was working fine in the old version.
                      We have written custom builder to make the Webservice calls.
                      Getting following error

                      Exception caught and rethrown in checkAddSchema method.
                      The associated exception is: java.io.FileNotFoundException: /file:/opt/linux/bit/PortalServer61/wp_profile/installedApps/XXX/XXX/XXX/wsdl/CommonsWSDLs/interfaces/../bos/Test.xsd (No such file or directory)
                      at java.io.FileInputStream.open(Native Method)
                      at java.io.FileInputStream.<init>(FileInputStream.java:135)
                      at com.bowstreet.util.xml.DetectCharacterEncoding.getEncoding(DetectCharacterEncoding.java:202)
                      at com.bowstreet.xml.schema.Schema.getFileContent(Schema.java:385)
                      at com.bowstreet.xml.schema.Schema.<init>(Schema.java:261)
                      at com.bowstreet.xml.schema.SchemaCache.checkAddSchema(SchemaCache.java:272)
                      at com.bowstreet.xml.schema.SchemaCache.getSchema(SchemaCache.java:103)
                      at com.bowstreet.webapp.structures.SchemaImpl.getSchema(SchemaImpl.java:204)
                      at com.bowstreet.webapp.structures.SchemaImpl.<init>(SchemaImpl.java:160)
                      at com.bowstreet.webapp.structures.WebAppImpl.addSchema(WebAppImpl.java:544)
                      at com.bowstreet.builders.webapp.SchemaBuilder.doBuilderCall(SchemaBuilder.java:138)
                      at com.bowstreet.builders.webapp.foundation.WebAppGenHandler.doBuilderCall(WebAppGenHandler.java:477)
                      at com.bowstreet.generation.implementation.BaseGenContext.internalInvokeBuilder(BaseGenContext.java:201)
                      at com.bowstreet.generation.implementation.BaseGenContext.invokeBuilder(BaseGenContext.java:317)
                      at com.bowstreet.generation.implementation.BaseGenContext.invokeBuilderBC(BaseGenContext.java:151)
                      at com.bowstreet.builders.BaseBuilderAPI.invokeBuilderBC(BaseBuilderAPI.java:113)
                      at com.bowstreet.builders.BaseBuilderAPI.invokeBuilder(BaseBuilderAPI.java:94)
                      at com.sts.portlet.factory.builders.util.STSBuilderUtil.addSchemaBuilder(STSBuilderUtil.java:165)
                      at com.sts.portlet.factory.builders.STSWSBuilder.buildSchemas(STSWSBuilder.java:240)
                      at com.sts.portlet.factory.builders.STSWSBuilder.doBuilderCall(STSWSBuilder.java:65)
                      at com.bowstreet.builders.webapp.foundation.WebAppGenHandler.doBuilderCall(WebAppGenHandler.java:477)
                      at com.bowstreet.generation.implementation.BaseGenContext.internalInvokeBuilder(BaseGenContext.java:201)

                      I am sorry cant share the WSDL but when i used same WSDL in the RAD as normal WSDL project it worked fine.
                      Here I have following scenario.
                      The main WSDL is having reference to the other WSDL and that other WSDL have reference to the Schema as follows
                      schemaLocation="../../xsd-includes/XSD-Name.xsd"/>

                      All the XSD are in place but dont know why its not taking the relative path.

                      All the code is from exsting 6.0.1 version only so do I need to update something ?
                      Could you please help its migration project and we are delaying because of this issue.
                      Thanks a lot...
                      • mburati
                        mburati
                        352 Posts
                        ACCEPTED ANSWER

                        Re: schemaLocation, fileNotFoundException

                        ‏2012-02-07T22:00:27Z  in response to SystemAdmin
                        Sorry, I know there were fixes in the schema import area in 6.1.x.x fixpacks and possibly 7.0.0.x or 7.1.0.x, but I wasn't involved, so I don't know if you need a fixpack for that particular issue or if it's a new issue.

                        I recommend you contact customer support and have them work with the expert in that area to see if this is an issue already fixed or would need an additional fix.

                        ..mb1
                        • SystemAdmin
                          SystemAdmin
                          557 Posts
                          ACCEPTED ANSWER

                          Re: schemaLocation, fileNotFoundException

                          ‏2012-02-07T22:04:20Z  in response to mburati
                          Hi
                          Thanks again for the quick response. If I will user Portlet factory 6.1.5 can this issue will be resolved ?
                          We are using Portlet 6.1.5 Portal server. Could you please let me know if I can use the Portlet factory 6.1.5 or lower version to build the war. I dont have much time to work with IBM on PMR.
                          Thanks again...
                          • mburati
                            mburati
                            352 Posts
                            ACCEPTED ANSWER

                            Re: schemaLocation, fileNotFoundException

                            ‏2012-02-07T22:29:28Z  in response to SystemAdmin
                            I'm sorry, without knowing exactly what's causing that issue, I can't say whether it was an issue in both 6.1.5 or 7.0.1 or not.
                            Both of those versions should be able to build portlets for WP6.1.5. It's better to use more recent versions including fixpacks in most cases, but if WPF 6.1.5 works better for your particular WSDL than 7.0.1 for some reason, that could be a good reason to stick with 6.1.5 until you can get a resolution for the issue on 7.0.1.x.

                            ..mb1
                            • SystemAdmin
                              SystemAdmin
                              557 Posts
                              ACCEPTED ANSWER

                              Re: schemaLocation, fileNotFoundException

                              ‏2012-02-15T20:41:29Z  in response to mburati
                              Hi mb1...
                              I have tried the following approach. I have used Portlet factory 6.1.5.
                              Moved the the xsd to the same directory where I have the WSDL so as this reference error should be removed.
                              But still after that also I am getting same error following is the logs.
                              Priority: ERROR
                              Thread: Event Thread
                              Msg: Component: null
                              Exception caught and rethrown in checkAddSchema method.
                              The associated exception is: java.io.FileNotFoundException: /file:/opt/linux/WEbspher_Path/UserProfileList.xsd (No such file or directory)
                              at java.io.FileInputStream.open(Native Method)
                              at java.io.FileInputStream.<init>(FileInputStream.java:135)
                              at com.bowstreet.util.xml.DetectCharacterEncoding.getEncoding(DetectCharacterEncoding.java:202)
                              at com.bowstreet.xml.schema.Schema.getFileContent(Schema.java:378)
                              at com.bowstreet.xml.schema.Schema.<init>(Schema.java:254)
                              at com.bowstreet.xml.schema.SchemaCache.checkAddSchema(SchemaCache.java:272)
                              at com.bowstreet.xml.schema.SchemaCache.getSchema(SchemaCache.java:103)
                              at com.bowstreet.webapp.structures.SchemaImpl.getSchema(SchemaImpl.java:204)
                              at com.bowstreet.webapp.structures.SchemaImpl.<init>(SchemaImpl.java:160)
                              at com.bowstreet.webapp.structures.WebAppImpl.addSchema(WebAppImpl.java:523)
                              at com.bowstreet.builders.webapp.SchemaBuilder.doBuilderCall(SchemaBuilder.java:138)
                              at com.bowstreet.builders.webapp.foundation.WebAppGenHandler.doBuilderCall(WebAppGenHandler.java:441)
                              at com.bowstreet.generation.implementation.BaseGenContext.internalInvokeBuilder(BaseGenContext.java:195)
                              at com.bowstreet.generation.implementation.BaseGenContext.invokeBuilder(BaseGenContext.java:305)
                              at com.bowstreet.generation.implementation.BaseGenContext.invokeBuilder(BaseGenContext.java:146)
                              at com.bowstreet.builders.BaseBuilderAPI.invokeBuilder(BaseBuilderAPI.java:99)
                              at com.sts.portlet.factory.builders.util.STSBuilderUtil.addSchemaBuilder(STSBuilderUtil.java:165)
                              at com.sts.portlet.factory.builders.STSWSBuilder.buildSchemas(STSWSBuilder.java:240)
                              at com.sts.portlet.factory.builders.STSWSBuilder.doBuilderCall(STSWSBuilder.java:65)
                              at com.bowstreet.builders.webapp.foundation.WebAppGenHandler.doBuilderCall(WebAppGenHandler.java:441)
                              Here the problem with me is I migrated the project from Portal 5.1 to 6.1 and I am not having the details of custom builder they have written for Portal 5.1. So I cannot replace that builder with the new builder and WS calls.
                              Could you please suggest me how to debug and fix the issue for sure it is having some issues with how WSDL are parsed in the project.
                              Thanks
                              • SystemAdmin
                                SystemAdmin
                                557 Posts
                                ACCEPTED ANSWER

                                Re: schemaLocation, fileNotFoundException

                                ‏2012-02-15T20:46:47Z  in response to SystemAdmin
                                One more thing If I am using the earlier Factory.jar then I am getting the following error
                                2/15/12 22:56:43:121 GST 0000003a ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the service methods of the servlet: CRMLginRedirect. Exception thrown : java.lang.NoClassDefFoundError: com.bowstreet.webapp.RuntimePlatformType
                                at com.bowstreet.portlet.adapter.WebAppRunnerPortlet.setRequestAttributes(WebAppRunnerPortlet.java:1562)
                                at com.bowstreet.portlet.adapter.WebAppRunnerPortlet.runModel(WebAppRunnerPortlet.java:1469)
                                at com.bowstreet.portlet.adapter.WebAppRunnerPortlet.runModel(WebAppRunnerPortlet.java:1432)
                                at com.bowstreet.portlet.adapter.WebAppRunnerPortlet.doView(WebAppRunnerPortlet.java:710)
                                at com.bowstreet.portlet.adapter.WebAppRunnerPortlet.doDispatch(WebAppRunnerPortlet.java:659)
                                at com.bowstreet.portlet.adapter.WebAppRunnerPortlet.render(WebAppRunnerPortlet.java:529)
                                at com.ibm.ws.portletcontainer.invoker.impl.PortletFilterChainImpl.doFilter(PortletFilterChainImpl.java:128)
                                at com.ibm.wps.propertybroker.standard.filter.C2APortletFilter.doFilter(C2APortletFilter.java:183)
                                at com.ibm.ws.portletcontainer.invoker.impl.PortletFilterChainImpl.doFilter(PortletFilterChainImpl.java:120)
                                at com.ibm.ws.portletcontainer.invoker.impl.PortletServlet.doDispatch(PortletServlet.java:573)
                                at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:114)
                                at com.ibm.isclite.container.collaborator.PortletServletCollaborator.doRender(PortletServletCollaborator.java:69)
                                at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:105)
                                at com.ibm.ws.portletcontainer.rrd.RRDServerPortletServletCollaborator.doRender(RRDServerPortletServletCollaborator.java:123)
                                at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:105)
                                at com.ibm.ws.portletcontainer.cache.CacheCollaborator.doRender(CacheCollaborator.java:92)
                                at
                                Thats reason I replaced that Factory.jar with the updated one and it is not throwing the above error but it is causing the issues at the run time when trying to get the XSD.

                                I think there is some issues with the jar mismatch could you help me out with something
                                Let me know if you want more details.
                                Many Thanks....
                              • mburati
                                mburati
                                352 Posts
                                ACCEPTED ANSWER

                                Re: schemaLocation, fileNotFoundException

                                ‏2012-02-16T04:49:45Z  in response to SystemAdmin
                                I'm sorry, there's not enough information in that stack trace alone to determine the exact cause of the issue you're seeing (eg, I don't know the actual file path to where this is running from, so it's hard to tell if "WEbspher_Path" (note the uppercase E, missing e in sphere etc) is a typo or the actual path with correct case where the app is running etc.

                                I suggest contacting customer support so that they can help diagnose what's actually going on with your configuration.
                                ..mb1