By: Janis Kulins user 11 Oct 2022 at 4:08 a.m. CDT

3 Responses
Janis Kulins gravatar
Expected: GUI allow to add custom oxtrust/oxauth lib. Lib is loaded to custom/lib directory, and added to oxauth.xml as extraclasspath item. Actual: in gluu 4.4.1 (not an issue on 3.*) after repeating same procedure, server start fails due to SAX xml parse issue: Logs (jetty logs): 2022-10-11 11:57:23.536:INFO :oejdp.ScanningAppProvider:main: Deployment monitor file:///opt/gluu/jetty/oxauth/webapps/ 2022-10-11 11:57:23.585:ERROR:oejx.XmlParser:main: SAX Parse Issue @null line:1 col:118 : org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 118; cvc-elt.1.a: Cannot find the declaration of element 'Configure'. 2022-10-11 11:57:23.588:WARN :oejd.DeploymentManager:main: Unable to reach node goal: started org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 118; cvc-elt.1.a: Cannot find the declaration of element 'Configure'. at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204) at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:135) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284) at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:2132) at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:829) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:613) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3063) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:836) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:534) at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888) at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824) at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216) at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:635) at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:324) at org.eclipse.jetty.xml.XmlParser.parse(XmlParser.java:202) ..... oxauth.xml after GUI added extraClasspath to it (type of added lib not matters): <Configure class="org.eclipse.jetty.webapp.WebAppContext"> <Set name="contextPath">/oxauth</Set> <Set name="war"><Property default="." name="jetty.webapps"/>/oxauth.war</Set> <Set name="extractWAR">true</Set> <Set name="extraClasspath">/opt/gluu/jetty/oxauth/custom/libs/google-auth-library-credentials-0.15.0.jar</Set></Configure> Any ideas how to solve that issue? Thank you.

By Mohib Zico Account Admin 11 Oct 2022 at 11:20 p.m. CDT

Mohib Zico gravatar
Hi Decta, Can you please share your custom pieces and target ( what you are expecting after this customization )? Will try it locally to check what's happening actually. Thanks!

By Janis Kulins user 12 Oct 2022 at 5:04 a.m. CDT

Janis Kulins gravatar
Hello, at the moment it look like its not related to lib content, but upload functionality itself: GLUU GUI -> Configuration - > Organization Configuration - > Extra libraries - > Add Lib to OxAuth. It add extraClasspath record in oxauth.xml, wich seems to cause those SAX Parse errors. At least this seem to be xml file that validation fail. Actual installation is upgrade gluu instance from (4.3.0->4.3.1->4.4.1). You can try to replicate it with lib from Twilio integration (http://search.maven.org/remotecontent?filepath=com/twilio/sdk/twilio/7.17.6/twilio-7.17.6.jar) I just run over 4.4.1 version, and tried to add that twilio lib. Result oxauth.xml: cat webapps/oxauth.xml: <Configure class="org.eclipse.jetty.webapp.WebAppContext"> <Set name="contextPath">/oxauth</Set> <Set name="war"> <Property default="." name="jetty.webapps"/>/oxauth.war </Set> <Set name="extractWAR">true</Set> <Set name="extraClasspath">/opt/gluu/jetty/oxauth/custom/libs/twilio-7.17.6.jar</Set></Configure> ... fresh jetty logs of oxauth: 2022-10-12 12:55:06.200:INFO :oejs.Server:main: jetty-10.0.9; built: 2022-03-30T16:46:32.527Z; git: a9eaf8d5d73369acf610ce88f850c0d56c4b1113; jvm 11.0.14.1+10-LTS 2022-10-12 12:55:06.249:INFO :oejdp.ScanningAppProvider:main: Deployment monitor file:///opt/gluu/jetty/oxauth/webapps/ 2022-10-12 12:55:06.282:ERROR:oejx.XmlParser:main: SAX Parse Issue @null line:1 col:118 : org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 118; cvc-elt.1.a: Cannot find the declaration of element 'Configure'. 2022-10-12 12:55:06.285:WARN :oejd.DeploymentManager:main: Unable to reach node goal: started org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 118; cvc-elt.1.a: Cannot find the declaration of element 'Configure'. at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204) at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:135) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284) at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:2132) at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:829) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:613) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3063) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:836) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:534)

By Janis Kulins user 14 Oct 2022 at 3:43 a.m. CDT

Janis Kulins gravatar
Hello, seem we have found workaround. After adding libs, oxauth.xml was edited according to jetty 10 syntax. v10 dtd added,a dded libs separated by comma not tags, changed property tag name to J10 style etc. Also strange observation, its important to do stop/start and not restart. Later leads to same xml parsing problems described above. No explanation for that. I guess we can close the ticket. Thank you