0

I have a non-Mavenized, Spring/JPA/Struts application that I have been the lead developer on for over 16 years. We are currently using RAD v9.5, with WebSphere Application Server v9.0.2. Compiler compliance level is 1.8. The Spring version is 4.2.6. Last week, I had the RAD IDE open on my Windows 10 workstation, and everything with the workspace and code was fine, no errors. at the end of the workday Wednesday, I closed the IDE, which closed normally with no errors. I did not make any changes to the code, nor did I change anything in the workspace prior to closing the RAD IDE on Wednesday. I did not open RAD all day on Thursday, as I had meetings and other work. When I opened RAD on Friday morning, there suddenly appeared 14 Spring XML file errors.

I tried several Clean/Build sequences, along with re-validating the XML files several times. I tried closing & opening RAD several times, I even tried rebooting the entire machine a few times, the errors will not go away. There were no Windows updates nor any other organizational software updates between when I closed RAD last Wednesday, and when I opened it on Friday morning.

Here are some of the error messages:

The errors below were detected when validating the file “spring-aop-4.2.xsd” via the file “spring-application-context.xml”. In most cases these errors can be detected by validating “spring-aop-4.2.xsd” directly. However, it is possible that errors will only occur when spring-aop-4.2.xsd is validated in the context of spring-application-context.xml.

schema_reference4: Failed to read schema document “https://www.springframework.org/schmea/beans/spring-beans-4.2.xsd, because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not xsd:schema.

schema_reference4: Failed to read schema document “https://www.springframework.org/schmea/beans/spring-tool-4.2.xsd, because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not xsd:schema.

The errors below were detected when validating the file “spring-context-4.2.xsd” via the file “spring-application-context.xml”. In most cases these errors can be detected by validating “spring-aop-4.2.xsd” directly. However, it is possible that errors will only occur when spring-aop-4.2.xsd is validated in the context of spring-application-context.xml.

schema_reference4: Failed to read schema document “https://www.springframework.org/schmea/beans/spring-beans-4.2.xsd, because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not xsd:schema.

schema_reference4: Failed to read schema document “https://www.springframework.org/schmea/beans/spring-beans-4.2.xsd, because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not xsd:schema.

There are 12 more errors similar to these. The XML files referenced in the errors are:

servlet-context.xml, spring-application-context.xml, spring-data.jpa.xml, spring-servlet.xml, secPersistenceConfig.xml, and secContextConfig.xml.

I'm not understanding why, on Wednesday, (and for many years), everything was fine, no errors. But when I opened the IDE on Friday morning, after making no changes to the workspace, these errors are appearing.

Thank you.

John M. Yount
  • 101
  • 1
  • 1
  • 8
  • Have you checked the workspace `.log` file? My hunch is https/SSL errors. Although also, did you copy/paste the errors or type them in? Because the schema URLs have "schmea" instead of "schema" in them, and the former doesn't resolve, while the latter does. – dbreaux Jul 17 '19 at 13:07
  • 1
    Ah, yes, those were typos, should have read "schema" and not "schemea". – John M. Yount Jul 19 '19 at 13:35
  • I believe you are to something with the https/SSL suggestion. I tried starting the server after seeing the Spring XML errors, and I got this error message when the server attempted to start: – John M. Yount Jul 19 '19 at 13:37
  • The publish encountered some problems and the application may not have been installed or it may have been successfully installed but was unable to start. The failure to perform a republish may be caused by a SSL issue. Follow the "Resolving the problem" section in http://www-01.ibm.com/support/docview.wss?uid=swg21634467. After completing the steps, restart the workbench. – John M. Yount Jul 19 '19 at 13:37

1 Answers1

0

If the issue is https/SSL, one possible solution is to force RAD to use its default JVM SSL implementation, rather than the WebSphere one, when parsing the XML. From https://www-01.ibm.com/support/docview.wss?uid=swg21584437 (which has other options as well), this simple approach has addressed some of our related problems:

Another workaround if using RAD or WDT versions 8.0.x or later is to close the Servers view, exit RAD, then launch RAD again. Once RAD is restarted, retry the action that was failing previously. This workaround prevents the WAS SSL connection from being initialized first which should prevent the WAS SSL socket factory from being set as the default. Other SSL connections will attempt to use the RAD JDK's default socket factory unless otherwise specified.

Note: After using this workaround the server state may not be detected correctly until RAD is exited and launched again with the Servers view open since the WAS SSL socket factory is currently required for secure server communication using RAD.

This is only temporary, of course, but for pulling cached resources, like I think the XML Schemas tend to be, it might allow you to proceed.

Community
  • 1
  • 1
dbreaux
  • 4,982
  • 1
  • 25
  • 64
  • 1
    OK, I closed the "Servers" view, closed & restarted RAD. The SSL errors went away, but I'm still having the 14 spring framework XML errors as before. – John M. Yount Jul 23 '19 at 12:20
  • Grrr... sorry, that was my one theory. And I was fairly confident that would do it. I've definitely seen such a thing caused by such SSL problems before :-( Oh, do make sure you close the XML files and then right-click "revalidate" on them as well. I've seen RAD (and maybe Eclipse too) fail to notice fixed XML (and JSP) issues without a manual revalidate, _while_ the file isn't open. – dbreaux Jul 23 '19 at 14:02
  • 1
    OK, I'll try that and we'll see what happens! Here's something weird... I have 2 identical PC's, one brand-new, one about 3 years old. On the old machine, everything works after trying the fix you suggested, the SSL problem went away, as well as the SSL issue. On the other, newer machine, the SSL issue and the XML issues are remaining, even after trying the fix. I checked the Environment Variables, everything is set up the same way on both machines (JAVA_HOME, MAVEN_HOME, etc). It literally was, one day, everything was fine, 2 days later, the errors appeared. – John M. Yount Jul 24 '19 at 11:36
  • 1
    OK, now it got worse! I closed all the XML files, closed the "Servers" view, re-started RAD, re-validated the XML files. Now I have 28 XML errors instead of the original14!! – John M. Yount Jul 24 '19 at 11:52
  • I'm sorry, I'm out of suggestions. Hopefully somebody who knows more than either of us will show up. – dbreaux Jul 24 '19 at 19:08