XPages 500 / 404 error - xpages

[edited 7/25/18]
I'm running into an issue at work with XPages that's making me pull my hair out.
I keep getting a 500 error followed by a 404 error seemingly at random and can't reproduce the error but it happens quite often.
I'm sure most people are running their XPages on the web so nobody runs into this but my application only runs in the notes client since the server is not web accessible for security reasons.
I would very much like to use XPages in the notes client only but I can't have this behavior happening on production databases.
I've tried including as much detail as I can think of below but let me know if I can clarify anything to help solve this issue.
Notes client and server both running v9
Server is not web accessible
Application will only be ran in XPiNC
The application will work sometimes then stops working for no apparent reason.
The issue happens on any database, even with a blank XPage so it's not code related.
Clean build has no affect.
If I simply open the application in designer it runs perfectly. I don't need to do a page preview or anything, just simply having the
application open in designer makes it work.
The latest time this happened the sequence of events was: Open application, did some work, waited a period of time (maybe
30min-1hr), try to navigate to another page, gives error 500, closed
app, reopened app, gives 404, waited another period of time (maybe
30min), reopened app, works fine. See below trace results for more
detail.
There have been other instances where the app just starts off with 500/404.
I tried using a keep session alive code running but has no effect.
I have other XPage applications on a different server that is web accessible and works perfectly on a web browser.
Issue has been happening since v8.5.2
Trace:
10:59:48.547 229 SEVERE com.ibm.designer.runtime.domino.adapter.LCDEnvironment doService
CLFAD0211E: Exception thrown
javax.servlet.ServletException: java.util.concurrent.ExecutionException: java.lang.StackOverflowError
at com.ibm.domino.xsp.module.nsf.NSFService.doService(Unknown Source)
at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(Unknown Source)
at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(Unknown Source)
at com.ibm.domino.xsp.bridge.websrv.servlets.DispatcherServlet.service(Unknown Source)
at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(Unknown Source)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(Unknown Source)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(Unknown Source)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(Unknown Source)
at com.ibm.pvc.webhttpservice.BridgeServlet.service(Unknown Source)
at com.ibm.pvc.internal.webcontainer.VirtualHost.handleRequest(Unknown Source)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(Unknown Source)
at com.ibm.wsspi.webcontainer.WebContainer.handleRequest(Unknown Source)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Unknown Source)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(Unknown Source)
at com.ibm.ws.http.HttpConnection.run(Unknown Source)
at com.ibm.ws.util.ThreadPool$Worker.run(Unknown Source)
___________
10:59:48.720 229 SEVERE CLFAD0256E: Dispatcher Servlet Problem - java.util.concurrent.ExecutionException: java.lang.StackOverflowError
javax.servlet.ServletException: java.util.concurrent.ExecutionException: java.lang.StackOverflowError
at com.ibm.domino.xsp.module.nsf.NSFService.doService(Unknown Source)
at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(Unknown Source)
at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(Unknown Source)
at com.ibm.domino.xsp.bridge.websrv.servlets.DispatcherServlet.service(Unknown Source)
at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(Unknown Source)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(Unknown Source)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(Unknown Source)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(Unknown Source)
at com.ibm.pvc.webhttpservice.BridgeServlet.service(Unknown Source)
at com.ibm.pvc.internal.webcontainer.VirtualHost.handleRequest(Unknown Source)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(Unknown Source)
at com.ibm.wsspi.webcontainer.WebContainer.handleRequest(Unknown Source)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Unknown Source)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(Unknown Source)
at com.ibm.ws.http.HttpConnection.run(Unknown Source)
at com.ibm.ws.util.ThreadPool$Worker.run(Unknown Source)
___________
11:00:30.327 226 SEVERE com.ibm.domino.xsp.bridge.websrv.servlets.DispatcherServlet service CLFAD0256E: Dispatcher Servlet Problem - Error opening the database 'server!!database.nsf'
com.ibm.designer.runtime.domino.adapter.util.PageNotFoundException: Error opening the database 'server!!database.nsf'
at com.ibm.domino.xsp.module.nsf.NSFService.doService(Unknown Source)
at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(Unknown Source)
at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(Unknown Source)
at com.ibm.domino.xsp.bridge.websrv.servlets.DispatcherServlet.service(Unknown Source)
at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(Unknown Source)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(Unknown Source)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(Unknown Source)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(Unknown Source)
at com.ibm.pvc.webhttpservice.BridgeServlet.service(Unknown Source)
at com.ibm.pvc.internal.webcontainer.VirtualHost.handleRequest(Unknown Source)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(Unknown Source)
at com.ibm.wsspi.webcontainer.WebContainer.handleRequest(Unknown Source)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Unknown Source)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(Unknown Source)
at com.ibm.ws.http.HttpConnection.run(Unknown Source)
at com.ibm.ws.util.ThreadPool$Worker.run(Unknown Source)

if this is a timeout issue, in xsp properties window there are options about application and session timeout. default is 30 minutes (even if blank)
you can set it a bigger value (i am using 300 minutes)

Related

Caused by: javax.mail.AuthenticationFailedException: failed to connect, no password specified? Spring Integration Imap adapter with Oauth2

I have tried below code.
#Bean
public IntegrationFlow mailListener() {
return IntegrationFlows.from(Mail.imapInboundAdapter("imap://[emailId]:[accesstoken]#imap.gmail.com/INBOX")
.shouldMarkMessagesAsRead(true).javaMailProperties(p -> p
.put("mail.imaps.ssl.enable", "true")
.put("mail.imaps.sasl.enable", "true")
.put("mail.imaps.sasl.mechanisms", "XOAUTH2")
.put("mail.imaps.auth.login.disable", "true")
.put("mail.imaps.auth.plain.disable", "true")
.put("mail.debug.auth", "true")
).shouldDeleteMessages(false).get(),
e -> e.poller(Pollers.fixedRate(5000).maxMessagesPerPoll(1)))
.<Message>handle((payload, header) -> logMail(payload))
.get();
}
I have referred Is Spring Integration Mail IMAP support OAuth2?
I get below exception
15:46:31.870 ERROR [task-scheduler-1][org.springframework.integration.handler.LoggingHandler] org.springframework.messaging.MessagingException: failure occurred while polling for mail; nested exception is javax.mail.AuthenticationFailedException: failed to connect, no password specified?
at org.springframework.integration.mail.MailReceivingMessageSource.doReceive(MailReceivingMessageSource.java:74)
at org.springframework.integration.endpoint.AbstractMessageSource.receive(AbstractMessageSource.java:184)
at org.springframework.integration.endpoint.SourcePollingChannelAdapter.receiveMessage(SourcePollingChannelAdapter.java:212)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.doPoll(AbstractPollingEndpoint.java:407)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.pollForMessage(AbstractPollingEndpoint.java:376)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.lambda$null$3(AbstractPollingEndpoint.java:323)
at org.springframework.integration.util.ErrorHandlingTaskExecutor.lambda$execute$0(ErrorHandlingTaskExecutor.java:57)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
at org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:55)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.lambda$createPoller$4(AbstractPollingEndpoint.java:320)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:93)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
First of all you don't show the whole stack trace. I believe there is some cause by for that MailReceivingMessageSource.doReceive(). Secondly it is not clear what is your accesstoken for this configuration since we can get it only at runtime when we call an OAuth REST endpoint for such a token. And only after that you can configure an IntegraitonFlow dynamically for already retrieved token. And finally there should be some DEBUG logs for Java Mail according your "mail.debug.auth", "true" config. Plus the mentioned SO question is marked as solved. So, you indeed do something what doesn't fit to the required model or is fully not related to the subject.
Try to check gmail settings if you have enabled the allow of conection for less secure applications. You should put it off to connect to gmail from outside

Connection wth BigQuery on Google Cloud Platform using Spark with Scala

I am not able to connect to Big Query table from Spark on GCP.
https://cloud.google.com/hadoop/bigquery-connector
I already tried steps present in above by providing project Id dataset name and table name link still no success .When I am trying to print the data using below code I am getting below error:
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/cloud/hadoop/io/bigquery/BigQueryConfiguration
at Main.main(Main.scala:27)
at Main.main(Main.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52)
at org.apache.spark.deploy.SparkSubmit.orgapachesparkdeploySparkSubmitrunMain(SparkSubmit.scala:849)
at org.apache.spark.deploy.SparkSubmit.doRunMain1(SparkSubmit.scala:167)
at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:195)
at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:86)
at org.apache.spark.deploy.SparkSubmitanon2.doSubmit(SparkSubmit.scala:924)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala:933)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Caused by: java.lang.ClassNotFoundException: com.google.cloud.hadoop.io.bigquery.BigQueryConfiguration
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 14 more
You probably miss the spark-bigquery-connector in your classpath, you can add it by adding the following parameter:
gcloud dataproc jobs submit spark --cluster "$MY_CLUSTER" --jars gs://spark-lib/bigquery/spark-bigquery-latest.jar ...

How to define local connection to Spark Thrift in Power BI

I am trying to configure the local connection to the Spark Thrift in Power BI. I am able to connect using Spark ODBC (localhost:10000 with mechanism User Name and Thrift transport SASL). But I would like to use Spark connector as it supports Direct Query.
I couldn't find how to define the connection string. Tried several things like localhost:10000/default/;transportMode=http;ssl=true;user=... but always get the error
ERROR TThreadPoolServer:297 - Error occurred during processing of message.
java.lang.RuntimeException: org.apache.thrift.transport.TTransportException: Invalid status 80
at org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:219)
at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:269)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.thrift.transport.TTransportException: Invalid status 80
at org.apache.thrift.transport.TSaslTransport.sendAndThrowMessage(TSaslTransport.java:232)
at org.apache.thrift.transport.TSaslTransport.receiveSaslMessage(TSaslTransport.java:184)
at org.apache.thrift.transport.TSaslServerTransport.handleSaslStartMessage(TSaslServerTransport.java:125)
at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:271)
at org.apache.thrift.transport.TSaslServerTransport.open(TSaslServerTransport.java:41)
at org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:216)
... 4 more
Any hints would be appreciated!
Solved. As written here https://community.powerbi.com/t5/Desktop/Connect-Power-BI-to-Hadoop-Direct-query-HDFS-vs-Spark-vs-custom/td-p/374625
it just doesn't work in Power BI from Microsoft Store. It works in the app from the website.

OAuth2 Authentication to Gmail throws SunCertPathBuilderException/SSLHandshakeException

In my app i authenticate to Gmail using the OAuth2Authenticator from this Google example to receive Emails via Imap.
The code works perfect, but the last days some users reported an error that occurs when they try to connect to Gmail.
sun.security.provider.certpath.SunCertPathBuilderException: unable to
find valid certification path to requested target at
sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown
Source) at java.security.cert.CertPathBuilder.build(Unknown Source)
Caused: sun.security.validator.ValidatorException: PKIX path building
failed at sun.security.validator.PKIXValidator.doBuild(Unknown
Source) at
sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
at sun.security.validator.Validator.validate(Unknown Source) at
sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source) at
sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source) at
sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown
Source) Caused: javax.net.ssl.SSLHandshakeException at
sun.security.ssl.Alerts.getSSLException(Unknown Source) at
sun.security.ssl.SSLSocketImpl.fatal(Unknown Source) at
sun.security.ssl.Handshaker.fatalSE(Unknown Source) at
sun.security.ssl.Handshaker.fatalSE(Unknown Source) at
sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)
at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
at sun.security.ssl.Handshaker.processLoop(Unknown Source) at
sun.security.ssl.Handshaker.process_record(Unknown Source) at
sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
The ImapSSLStore conncets to "imap.gmail.com" on port 993.
This does not happen to all users and occurs not before last week.
Is anybody observing this behaviour too?
Hints appreciated!
Looks like your system's X.509 configuration for verifying the SSL certificates is not treating the Google's certificate as a trusted one. This might have various reasons.

Grails 2.0.1 Hibernate exception in foreign worker thread

I have a Grails 2.0.1 app and I spawn worker threads. My worker threads use GORM to read/write domain objects from MySql. Given that the code that is accessing the DB is not inside of an HTTP request, I create a Hibernate session for the save() like this:
MyClass.withTransaction { status ->
myClass.save()
}
I do that to resolve the "No Hibernate Session bound to thread" problem.
This worked fine on Grails 1.3.7. I am currently attempting to upgrade to Grails 2.0.1, and am seeing an exception I do not understand.
The following stack trace shows the exception.
Although I recognize the exception, and normally resolve it via the "withTransaction" technique shown above, the thing that baffles me about this one is that it is happening on a worker thread that I did not create.
Exception in thread "pool-12-thread-2" org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here
at org.springframework.orm.hibernate3.SpringSessionContext.currentSession(SpringSessionContext.java:63)
at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:687)
at org.codehaus.groovy.grails.orm.hibernate.SessionFactoryProxy.getCurrentSession(SessionFactoryProxy.java:145)
at org.codehaus.groovy.grails.orm.hibernate.validation.HibernateDomainClassValidator.validate(HibernateDomainClassValidator.java:51)
at org.codehaus.groovy.grails.validation.GrailsDomainClassValidator.validate(GrailsDomainClassValidator.java:121)
at org.codehaus.groovy.grails.orm.hibernate.metaclass.ValidatePersistentMethod.doInvokeInternal(ValidatePersistentMethod.java:119)
at org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractDynamicPersistentMethod.invoke(AbstractDynamicPersistentMethod.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSite.invoke(PojoMetaMethodSite.java:189)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
at org.codehaus.groovy.grails.orm.hibernate.HibernateGormValidationApi.validate(HibernateGormEnhancer.groovy:702)
at com......MyClass.validate(MyClass.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at org.codehaus.groovy.grails.orm.hibernate.support.ClosureEventListener$7.call(ClosureEventListener.java:282)
at org.codehaus.groovy.grails.orm.hibernate.support.ClosureEventListener$7.call(ClosureEventListener.java:267)
at org.codehaus.groovy.grails.orm.hibernate.support.ClosureEventListener.doWithManualSession(ClosureEventListener.java:302)
at org.codehaus.groovy.grails.orm.hibernate.support.ClosureEventListener.onPreUpdate(ClosureEventListener.java:267)
at org.codehaus.groovy.grails.orm.hibernate.EventTriggeringInterceptor.onPreUpdate(EventTriggeringInterceptor.java:164)
at org.codehaus.groovy.grails.orm.hibernate.EventTriggeringInterceptor.onPersistenceEvent(EventTriggeringInterceptor.java:89)
at org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener.onApplicationEvent(AbstractPersistenceEventListener.java:46)
at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:92)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
I am hoping someone can enlighten me regarding:
where this worker thread pool originates from?
why is is doing a preUpdate event (when I believe the save in my thread already did a successful validate and save
Can I somehow config my app such that these foreign worker threads are not there
If #3 can't be pulled off, how can I do the equivalent of a "withTransaction" over in the worker thread code that I do not "own"

Resources