Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EmpConnector Error: org.xml.sax.SAXParseException #50

Open
mangrep opened this issue Dec 14, 2018 · 0 comments
Open

EmpConnector Error: org.xml.sax.SAXParseException #50

mangrep opened this issue Dec 14, 2018 · 0 comments

Comments

@mangrep
Copy link

mangrep commented Dec 14, 2018

Looks like there is some issue with LoginHelper.

Exception log:

2018-12-14 03:01:55.732  INFO 1 --- [@4e517165-11170] c.salesforce.emp.connector.EmpConnector  : EmpConnector connecting
org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 10; DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true.
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
        at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1472)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:914)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:327)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
        at com.salesforce.emp.connector.LoginHelper.login(LoginHelper.java:134)
        at com.salesforce.emp.connector.LoginHelper.login(LoginHelper.java:100)
        at com.abc.platformevent.subscriber.SalesforceBusSubscriber.lambda$generateTokenProvider$0(SalesforceBusSubscriber.java:73)
        at com.salesforce.emp.connector.example.BearerTokenProvider.apply(BearerTokenProvider.java:33)
        at com.salesforce.emp.connector.example.BearerTokenProvider.apply(BearerTokenProvider.java:14)
        at com.salesforce.emp.connector.EmpConnector.bearerToken(EmpConnector.java:305)
        at com.salesforce.emp.connector.EmpConnector.connect(EmpConnector.java:263)
        at com.salesforce.emp.connector.EmpConnector.reconnect(EmpConnector.java:316)
        at com.salesforce.emp.connector.EmpConnector.access$900(EmpConnector.java:31)
        at com.salesforce.emp.connector.EmpConnector$AuthFailureListener.onMessage(EmpConnector.java:336)
        at org.cometd.common.AbstractClientSession$AbstractSessionChannel.notifyOnMessage(AbstractClientSession.java:597)
        at org.cometd.common.AbstractClientSession$AbstractSessionChannel.notifyMessageListeners(AbstractClientSession.java:582)
        at org.cometd.common.AbstractClientSession.notifyListeners(AbstractClientSession.java:294)
        at org.cometd.common.AbstractClientSession.receive(AbstractClientSession.java:260)
        at org.cometd.client.BayeuxClient.failConnect(BayeuxClient.java:776)
        at org.cometd.client.BayeuxClient.processConnect(BayeuxClient.java:762)
        at org.cometd.client.BayeuxClient.processMessages(BayeuxClient.java:610)
        at org.cometd.client.BayeuxClient.access$3100(BayeuxClient.java:100)
        at org.cometd.client.BayeuxClient$MessageTransportListener.onMessages(BayeuxClient.java:1190)
        at org.cometd.client.transport.LongPollingTransport$2.onComplete(LongPollingTransport.java:236)
        at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:193)
        at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:185)
        at org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:464)
        at org.eclipse.jetty.client.HttpReceiver.responseSuccess(HttpReceiver.java:410)
        at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.messageComplete(HttpReceiverOverHTTP.java:301)
        at org.eclipse.jetty.http.HttpParser.handleContentMessage(HttpParser.java:628)
        at org.eclipse.jetty.http.HttpParser.parseContent(HttpParser.java:1594)
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1442)
        at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:173)
        at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:134)
        at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:72)
        at org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:133)
        at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:155)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
        at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:291)
        at org.eclipse.jetty.io.ssl.SslConnection$3.succeeded(SslConnection.java:151)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
2018-12-14 03:02:10.979  INFO 1 --- [@4e517165-11170] org.cometd.bayeux.client.ClientSession   : Exception while invoking listener com.salesforce.emp.connector.EmpConnector$AuthFailureListener@56b0be33

java.lang.RuntimeException: java.lang.NullPointerException
        at com.salesforce.emp.connector.example.BearerTokenProvider.apply(BearerTokenProvider.java:35) ~[EMP-Connector-98bce92f001ede1a3df61047e1011dc4ae728a46.jar!/:na]
        at com.salesforce.emp.connector.example.BearerTokenProvider.apply(BearerTokenProvider.java:14) ~[EMP-Connector-98bce92f001ede1a3df61047e1011dc4ae728a46.jar!/:na]
        at com.salesforce.emp.connector.EmpConnector.bearerToken(EmpConnector.java:305) ~[EMP-Connector-98bce92f001ede1a3df61047e1011dc4ae728a46.jar!/:na]
        at com.salesforce.emp.connector.EmpConnector.connect(EmpConnector.java:263) ~[EMP-Connector-98bce92f001ede1a3df61047e1011dc4ae728a46.jar!/:na]
        at com.salesforce.emp.connector.EmpConnector.reconnect(EmpConnector.java:316) ~[EMP-Connector-98bce92f001ede1a3df61047e1011dc4ae728a46.jar!/:na]
        at com.salesforce.emp.connector.EmpConnector.access$900(EmpConnector.java:31) ~[EMP-Connector-98bce92f001ede1a3df61047e1011dc4ae728a46.jar!/:na]
        at com.salesforce.emp.connector.EmpConnector$AuthFailureListener.onMessage(EmpConnector.java:336) ~[EMP-Connector-98bce92f001ede1a3df61047e1011dc4ae728a46.jar!/:na]
        at org.cometd.common.AbstractClientSession$AbstractSessionChannel.notifyOnMessage(AbstractClientSession.java:597) [cometd-java-common-3.1.4.jar!/:na]
        at org.cometd.common.AbstractClientSession$AbstractSessionChannel.notifyMessageListeners(AbstractClientSession.java:582) [cometd-java-common-3.1.4.jar!/:na]
        at org.cometd.common.AbstractClientSession.notifyListeners(AbstractClientSession.java:294) [cometd-java-common-3.1.4.jar!/:na]
        at org.cometd.common.AbstractClientSession.receive(AbstractClientSession.java:260) [cometd-java-common-3.1.4.jar!/:na]
        at org.cometd.client.BayeuxClient.failConnect(BayeuxClient.java:776) [cometd-java-client-3.1.4.jar!/:na]
        at org.cometd.client.BayeuxClient.processConnect(BayeuxClient.java:762) [cometd-java-client-3.1.4.jar!/:na]
        at org.cometd.client.BayeuxClient.processMessages(BayeuxClient.java:610) [cometd-java-client-3.1.4.jar!/:na]
        at org.cometd.client.BayeuxClient.access$3100(BayeuxClient.java:100) [cometd-java-client-3.1.4.jar!/:na]
        at org.cometd.client.BayeuxClient$MessageTransportListener.onMessages(BayeuxClient.java:1190) [cometd-java-client-3.1.4.jar!/:na]
        at org.cometd.client.transport.LongPollingTransport$2.onComplete(LongPollingTransport.java:236) [cometd-java-client-3.1.4.jar!/:na]
        at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:193) [jetty-client-9.4.9.v20180320.jar!/:9.4.9.v20180320]
        at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:185) [jetty-client-9.4.9.v20180320.jar!/:9.4.9.v20180320]
        at org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:464) [jetty-client-9.4.9.v20180320.jar!/:9.4.9.v20180320]
        at org.eclipse.jetty.client.HttpReceiver.responseSuccess(HttpReceiver.java:410) [jetty-client-9.4.9.v20180320.jar!/:9.4.9.v20180320]
        at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.messageComplete(HttpReceiverOverHTTP.java:301) [jetty-client-9.4.9.v20180320.jar!/:9.4.9.v20180320]
        at org.eclipse.jetty.http.HttpParser.handleContentMessage(HttpParser.java:628) [jetty-http-9.4.9.v20180320.jar!/:9.4.9.v20180320]
        at org.eclipse.jetty.http.HttpParser.parseContent(HttpParser.java:1594) [jetty-http-9.4.9.v20180320.jar!/:9.4.9.v20180320]
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1442) [jetty-http-9.4.9.v20180320.jar!/:9.4.9.v20180320]
        at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:173) [jetty-client-9.4.9.v20180320.jar!/:9.4.9.v20180320]
        at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:134) [jetty-client-9.4.9.v20180320.jar!/:9.4.9.v20180320]
        at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:72) [jetty-client-9.4.9.v20180320.jar!/:9.4.9.v20180320]
        at org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:133) [jetty-client-9.4.9.v20180320.jar!/:9.4.9.v20180320]
        at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:155) [jetty-client-9.4.9.v20180320.jar!/:9.4.9.v20180320]
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281) [jetty-io-9.4.9.v20180320.jar!/:9.4.9.v20180320]
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) [jetty-io-9.4.9.v20180320.jar!/:9.4.9.v20180320]
        at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:291) [jetty-io-9.4.9.v20180320.jar!/:9.4.9.v20180320]
        at org.eclipse.jetty.io.ssl.SslConnection$3.succeeded(SslConnection.java:151) [jetty-io-9.4.9.v20180320.jar!/:9.4.9.v20180320]
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) [jetty-io-9.4.9.v20180320.jar!/:9.4.9.v20180320]
        at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) [jetty-io-9.4.9.v20180320.jar!/:9.4.9.v20180320]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:319) [jetty-util-9.4.9.v20180320.jar!/:9.4.9.v20180320]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:175) [jetty-util-9.4.9.v20180320.jar!/:9.4.9.v20180320]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:133) [jetty-util-9.4.9.v20180320.jar!/:9.4.9.v20180320]
        at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) [jetty-util-9.4.9.v20180320.jar!/:9.4.9.v20180320]
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:754) [jetty-util-9.4.9.v20180320.jar!/:9.4.9.v20180320]
        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:672) [jetty-util-9.4.9.v20180320.jar!/:9.4.9.v20180320]
        at java.lang.Thread.run(Thread.java:748) [na:1.8.0_181]
Caused by: java.lang.NullPointerException: null
        at com.salesforce.emp.connector.example.BearerTokenProvider.apply(BearerTokenProvider.java:33) ~[EMP-Connector-98bce92f001ede1a3df61047e1011dc4ae728a46.jar!/:na]
        ... 42 common frames omitted

        at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:319)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:175)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:133)
        at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:754)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:672)
        at java.lang.Thread.run(Thread.java:748)

Similar issue: https://stackoverflow.com/questions/10837706/solve-security-issue-parsing-xml-using-sax-parser

@mangrep mangrep changed the title EmpConnector Error: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 10; DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true. EmpConnector Error: org.xml.sax.SAXParseException Dec 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant