freemarker exception - struts2

I'm using struts2.1.8 and freemarker2.3.15. After the program got online, it throws IOException. The stack trace only shows a lot of filter, I cannot tell what's wrong from the stack trace, hoping anybody has ever seen this kind of error and give a hand.
java.io.IOException: There was an error loading the template on an earlier attempt; it is attached as a cause
freemarker.cache.TemplateCache.throwLoadFailedException(TemplateCache.java:400)
freemarker.cache.TemplateCache.getTemplate(TemplateCache.java:278)
freemarker.cache.TemplateCache.getTemplate(TemplateCache.java:235)
freemarker.template.Configuration.getTemplate(Configuration.java:487)
freemarker.template.Configuration.getTemplate(Configuration.java:459)
org.apache.struts2.views.freemarker.FreemarkerResult.doExecute(FreemarkerResult.java:168)
org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:362)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:266)
org.apache.struts2.interceptor.MessageStoreInterceptor.intercept(MessageStoreInterceptor.java:204)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
java.lang.NullPointerException
com.creditease.core.exception.ExceptionInterceptor.intercept(ExceptionInterceptor.java:42)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
org.apache.struts2.interceptor.MessageStoreInterceptor.intercept(MessageStoreInterceptor.java:204)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.creditease.p2p.interceptor.AccessInterceptor.intercept(AccessInterceptor.java:75)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)

It maybe happening because your production application server was started from some path it cannot access. Try to start your server from the path it can access and with root credentials.

Related

java.lang.ArrayIndexOutOfBoundsException length=42; index=42 android.text.Layout$HorizontalMeasurementProvider.get(Layout.java:1416)

It feels like a bug in the system. How to solve this problem
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2600)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2600)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2600)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2600)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2600)
com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:448)
com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1829)
android.app.Activity.dispatchTouchEvent(Activity.java:3307)
androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(SourceFile:69)
com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:410)
android.view.View.dispatchPointerEvent(View.java:12016)
android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4809)
android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4623)
android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4161)
android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4214)
android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4180)
android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4307)
android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4188)
android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4364)
android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4161)
android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4214)
android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4180)
android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4188)
android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4161)
android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6682)
android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6656)
android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6617)
android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6785)
android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:187)
android.os.MessageQueue.nativePollOnce(Native Method)
android.os.MessageQueue.next(MessageQueue.java:325)
android.os.Looper.loop(Looper.java:142)
android.app.ActivityThread.main(ActivityThread.java:6501)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
It looks like a bug in the system. I don't know why. I can't find the corresponding solution. Some of them have encountered phase problems

Issue with registration of java twelvemonkeys registration for Deeplearning app

I am trying to register for a servlet the following and getting an exception. The code is:
static {
IIORegistry registry = IIORegistry.getDefaultInstance();
registry.registerServiceProvider(new com.twelvemonkeys.servlet.image.IIOProviderContextListener());
registry.registerServiceProvider(new com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReaderSpi());
registry.registerServiceProvider(new com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageWriterSpi());
}
I am getting the following exception thrown. Funny thing is I only am using the read not the write.
I am using the 3.6 version of twelvemonkeys.
Thanks for any hints!
Exception in thread "main" java.lang.NoSuchMethodError: com.twelvemonkeys.imageio.util.IIOUtil.lookupProviderByName(Ljavax/imageio/spi/ServiceRegistry;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;
at com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageWriterSpi.onRegistration(JPEGImageWriterSpi.java:82)
at javax.imageio.spi.SubRegistry.registerServiceProvider(Unknown Source)
at javax.imageio.spi.ServiceRegistry.registerServiceProvider(Unknown Source)
at javax.imageio.spi.IIORegistry$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at javax.imageio.spi.IIORegistry.registerInstalledProviders(Unknown Source)
at javax.imageio.spi.IIORegistry.registerStandardSpis(Unknown Source)
at javax.imageio.spi.IIORegistry.<init>(Unknown Source)
at javax.imageio.spi.IIORegistry.getDefaultInstance(Unknown Source)
at deeplearningtest.test.<clinit>(test.java:32)
Ok, I solved the problem. I went to https://github.com/haraldk/TwelveMonkeys#manual-dependency-example and I re-downloaded all the jars mentioned in the article making sure I paid close attention to the versions to make sure 3.6 was selected since 3.6 is not shown as part of the jar name (which I liked). Once I restarted eclipse I got past that problem.
Many thanks haraldK!

Getting timeout exception while connecting Jira to fetch issues

I am getting below error in logs while fetching Jira issues on particular JQL. I have set a schedular to run that JQL every 30 mins to sync the retrieved issues to another tool.
java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.util.concurrent.TimeoutException
at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:294)
at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:267)
at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:96)
at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:69)
at com.asurion.Autopilot.main(Autopilot.java:104)
Caused by: java.lang.RuntimeException: java.util.concurrent.TimeoutException
at com.google.common.base.Throwables.propagate(Throwables.java:160)
at com.atlassian.httpclient.apache.httpcomponents.DefaultHttpClient$3.apply(DefaultHttpClient.java:256)
at com.atlassian.httpclient.apache.httpcomponents.DefaultHttpClient$3.apply(DefaultHttpClient.java:249)
at com.atlassian.util.concurrent.Promises$Of$2.apply(Promises.java:276)
at com.atlassian.util.concurrent.Promises$Of$2.apply(Promises.java:272)
at com.atlassian.util.concurrent.Promises$2.onFailure(Promises.java:167)
at com.google.common.util.concurrent.Futures$6.run(Futures.java:801)
at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:262)
at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149)
at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:134)
at com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:193)
at com.google.common.util.concurrent.SettableFuture.setException(SettableFuture.java:68)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$1$3.run(SettableFuturePromiseHttpPromiseAsyncClient.java:73)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$ThreadLocalDelegateRunnable$1.run(SettableFuturePromiseHttpPromiseAsyncClient.java:197)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient.runInContext(SettableFuturePromiseHttpPromiseAsyncClient.java:90)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$ThreadLocalDelegateRunnable.run(SettableFuturePromiseHttpPromiseAsyncClient.java:192)
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: java.util.concurrent.TimeoutException
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$1.doCancelled(SettableFuturePromiseHttpPromiseAsyncClient.java:67)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$ThreadLocalContextAwareFutureCallback$3.run(SettableFuturePromiseHttpPromiseAsyncClient.java:152)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient.runInContext(SettableFuturePromiseHttpPromiseAsyncClient.java:90)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$ThreadLocalContextAwareFutureCallback.cancelled(SettableFuturePromiseHttpPromiseAsyncClient.java:147)
at org.apache.http.impl.client.cache.CachingHttpAsyncClient$2.cancelled(CachingHttpAsyncClient.java:636)
at org.apache.http.concurrent.BasicFuture.cancel(BasicFuture.java:150)
at org.apache.http.impl.nio.client.DefaultResultCallback.cancelled(DefaultResultCallback.java:57)
at org.apache.http.impl.nio.client.DefaultAsyncRequestDirector.cancel(DefaultAsyncRequestDirector.java:533)
at org.apache.http.impl.nio.client.DefaultAsyncRequestDirector$1.abortConnection(DefaultAsyncRequestDirector.java:222)
at org.apache.http.client.methods.HttpRequestBase.cleanup(HttpRequestBase.java:137)
at org.apache.http.client.methods.HttpRequestBase.abort(HttpRequestBase.java:151)
at com.atlassian.httpclient.base.RequestKiller$RequestEntry.abort(RequestKiller.java:98)
at com.atlassian.httpclient.base.RequestKiller.run(RequestKiller.java:56)
... 1 more
This error is occurring frequently but not continuous. Sometime it works, many times it won't.
Jira Version: 7.1.4#71008
Jira REST Java Client Version: 2.0.0-m2
JIRA REST java-client-core Version: 2.0.0-m25
Please let me know if you need more details.
Thanks in advance.
Regards,
Tushar
Looks like a timeout on your request, which comes and goes depending on server load. Can you streamline or break up the query, set a longer timeout, or put other activity on the server on hold during the sync?
There was some issue with Jira server. We don't have access to it, but after few days the issue seems to be gone. Not sure what has happened at Jira side.

I tried using AppiumDriver.tap() with parameters but when it execute it throws server side error

org.openqa.selenium.WebDriverException An unknown server-side error occurred while processing the command. (WARNING: The server did not provide any stacktrace information)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:605)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
at io.appium.java_client.AppiumDriver.performTouchAction(AppiumDriver.java:297)
at io.appium.java_client.MultiTouchAction.perform(MultiTouchAction.java:74)
at io.appium.java_client.AppiumDriver.tap(AppiumDriver.java:338)
at allpages.General.swipeLeft(General.java:44)
at test.testappandroid.eVerify(testappandroid.java:152)
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:497)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
at org.testng.TestNG.run(TestNG.java:1057)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Try typing adb devices into the console, is the device listed.
For anymore help please can you post your testng.xml, your test script and you grid configurations (if you are using selenium grid).
It seems like you are experiencing this issue
The developers recommend:
Make sure you are in a native view
Use mobile: tap which uses the click() method
If none of this helps it seems as if this is an open bug, keep and eye on the issue thread linked above and to get around this problem try to use the click method instead of tap.
Thanks,
Liam
I found the reason for my problem.
The error for me is because i missed to use "#Test" annotation in my code where i was using swipe function.
thanks

Jenkins error when saving job configurations

I finished just to configure some buildjobs. But when i clicked apply / save (doesn't matter, because the same error appears) the following error shows up. Changes are saved somehow and the configuration page for this jobs loads frustrating long afterwards. What could be the reason and how to fix it?
ERROR Message
HTTP Status 500 - An attempt was made to write more data to the response headers than there was room available in the buffer. Increase maxHttpHeaderSize on the connector or write less data into the response headers.
type Exception report
message An attempt was made to write more data to the response headers than there was room available in the buffer. Increase maxHttpHeaderSize on the connector or write less data into the response headers.
description The server encountered an internal error that prevented it from fulfilling this request.
exception
org.apache.coyote.http11.HeadersTooLargeException: An attempt was made to write more data to the response headers than there was room available in the buffer. Increase maxHttpHeaderSize on the connector or write less data into the response headers.
org.apache.coyote.http11.AbstractOutputBuffer.checkLengthBeforeWrite(AbstractOutputBuffer.java:546)
org.apache.coyote.http11.AbstractOutputBuffer.write(AbstractOutputBuffer.java:510)
org.apache.coyote.http11.AbstractOutputBuffer.write(AbstractOutputBuffer.java:427)
org.apache.coyote.http11.AbstractOutputBuffer.sendHeader(AbstractOutputBuffer.java:393)
org.apache.coyote.http11.AbstractHttp11Processor.prepareResponse(AbstractHttp11Processor.java:1495)
org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:767)
org.apache.coyote.Response.action(Response.java:174)
org.apache.coyote.Response.sendHeaders(Response.java:365)
org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:345)
org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:303)
org.apache.catalina.connector.CoyoteOutputStream.close(CoyoteOutputStream.java:108)
com.jcraft.jzlib.DeflaterOutputStream.close(DeflaterOutputStream.java:122)
org.kohsuke.stapler.compression.FilterServletOutputStream.close(FilterServletOutputStream.java:36)
net.bull.javamelody.FilterServletOutputStream.close(FilterServletOutputStream.java:45)
java.io.FilterOutputStream.close(Unknown Source)
sun.nio.cs.StreamEncoder.implClose(Unknown Source)
sun.nio.cs.StreamEncoder.close(Unknown Source)
java.io.OutputStreamWriter.close(Unknown Source)
java.io.BufferedWriter.close(Unknown Source)
org.dom4j.io.XMLWriter.close(XMLWriter.java:286)
org.kohsuke.stapler.jelly.HTMLWriterOutput.close(HTMLWriterOutput.java:70)
org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:56)
org.kohsuke.stapler.jelly.JellyFacet$1.dispatch(JellyFacet.java:95)
org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
org.kohsuke.stapler.Stapler.invoke(Stapler.java:631)
org.kohsuke.stapler.ResponseImpl.forward(ResponseImpl.java:121)
hudson.model.AbstractModelObject.sendError(AbstractModelObject.java:70)
hudson.model.Job.doConfigSubmit(Job.java:1167)
hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:786)
sun.reflect.GeneratedMethodAccessor1531.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:120)
org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248)
org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248)
org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248)
org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
org.kohsuke.stapler.S
please read the comments to my question above.
"Just updated all plugins -> it did not help. BUT I think i found the reason: i have uninstalled the Plugin „Publish over SSH“ and it helped for now. System update will be done soon too. Thank you for your help."
-> The deinstallation solved the problem not. The server went a little bit faster afterwards, but not as much as expected and hoped.
Now i have updated to the newest version of Jenkins and hope that it will fix my issues.

Resources