Severe error in re-deploying servlet - silly error - servlets

I was trying to redeploy a servlet I had recently undeployed but kept getting a org.apache.catalina.LifecycleException. Tomcat wasn't able to load the context properly.
This is what triggered the search:
FAIL - Unable to delete [/var/lib/tomcat7/conf/Catalina/localhost/app.xml].
The continued presence of this file may cause problems.
Here are the errors from the log catalina.out, rearranged to fit the column:
WARNING: Calling stop() on failed component [{0}] to trigger clean-up
did not complete.
org.apache.catalina.LifecycleException:
An invalid Lifecycle transition was attempted ([after_stop]) for
component [org.apache.catalina.startup.FailedContext#13150fc] in state
[FAILED]
WARNING: Error while removing context [/app]
java.lang.ClassCastException:
org.apache.catalina.startup.FailedContext cannot be cast to
org.apache.catalina.core.StandardContext
Scrolling back up, I noticed a whole list of SEVERE errors, beginning with:
SEVERE: Parse error in context.xml for /app
org.xml.sax.SAXParseException;
systemId: file:/etc/tomcat7/Catalina/localhost/app.xml/;
lineNumber: 1;
columnNumber: 1;
Content is not allowed in prolog.
This is not related to Cannot Undeploy a web-app completely in Tomcat 7 or Installing JSTL results in org.xml.sax.SAXParseException: Content is not allowed in prolog, though I wasted quite some time looking through these. Everything seemed to be as it should be, so I was stumped. Eventually, I solved it myself. My answer is below.

It turns out that I had deployed
/path/to/servlet/web/
as the XML Configuration file instead of
/path/to/servlet/website.xml
as Tomcat had been expecting.
A quick check in the saved form content of my other browser revealed this kickself error, so I am posting a Q and A here in the hope that this could save someone some time.
Please be careful when deploying manually, people.

Related

Solidity Deployment Error - "ProviderError: HttpProviderError"

Been attempting to deploy a new instance of a contract I've deployed before, from an environment I haven't used in a while (though which has successfully deployed before). None of the details of the contracts or my configuration have changed, and it appears that the http error is unrelated. What can I do to debug and resolve?
ProviderError: HttpProviderError
at HttpProvider.request (/home/user/Solidity/env/node_modules/hardhat/src/internal/core/providers/http.ts:78:19)
at LocalAccountsProvider.request (/home/user/Solidity/env/node_modules/hardhat/src/internal/core/providers/accounts.ts:187:34)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at ChainIdValidatorProvider._getChainIdFromEthNetVersion (/home/user/Solidity/env/node_modules/hardhat/src/internal/core/providers/chainId.ts:33:17)
at ChainIdValidatorProvider._getChainId (/home/user/Solidity/env/node_modules/hardhat/src/internal/core/providers/chainId.ts:17:25)
at ChainIdValidatorProvider.request (/home/user/Solidity/env/node_modules/hardhat/src/internal/core/providers/chainId.ts:55:29)
at EthersProviderWrapper.send (/home/user/Solidity/env/node_modules/#nomiclabs/hardhat-ethers/src/internal/ethers-provider-wrapper.ts:13:20)
at getSigners (/home/user/Solidity/env/node_modules/#nomiclabs/hardhat-ethers/src/internal/helpers.ts:45:20)
at getContractFactoryByAbiAndBytecode (/home/user/Solidity/env/node_modules/#nomiclabs/hardhat-ethers/src/internal/helpers.ts:288:21)
at main (/home/user/Solidity/env/scripts/deployVerify.js:6:27)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Found some great advice here: https://stackoverflow.com/a/74842616/14111336
Turns out my Alchemy RPC app had ceased working. I reset to a new app, and worked immediately as intended.

Acknowledgement.acknowledge() Null point exception

I have closed auto commit, set MANUAL_IMMEDIATE, but it also produces null point exception
This is the exception:
(java.util.List<org.apache.kafka.clients.consumer.ConsumerRecord<java.lang.String, java.lang.String>>,org.springframework.kafka.support.Acknowledgment)' threw exception; nested exception is java.lang.NullPointerException; nested exception is java.lang.NullPointerException
at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.decorateException(KafkaMessageListenerContainer.java:1311) [spring-kafka-2.2.5.RELEASE.jar!/:2.2.5.RELEASE]
2.2.x is no longer supported, and 2.2.5 is 2 1/2 years old.
See the project page for supported versions.
That was a bug in 2.2.5 - it implies that some code threw a ListenerExecutionFailedException with no cause; I don't see that happening in framework code (but I haven't looked extensively), perhaps your code is throwing it?
When reporting problems like this, you must show code, configuration, logs and the full stack trace.
Try upgrading to a supported version - 2.3.14, 2.5.15, 2.6.10, or 2.7.6 - the newer the better.

Android Studio 4 Build ERROR : Execution failed for task ':app:mergeDebugResources'

Hello this is my first time make android program and found this error but the code not have an error point. the error message is below :
Execution failed for task ':app:mergeDebugResources'.
Could not resolve all files for configuration ':app:_internal_aapt2_binary'.
Failed to transform aapt2-4.1.1-6503028-windows.jar (com.android.tools.build:aapt2:4.1.1-6503028) to match attributes {artifactType=_internal-android-aapt2-binary, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for Aapt2Extractor: C:\Users\lenovo.gradle\caches\modules-2\files-2.1\com.android.tools.build\aapt2\4.1.1-6503028\cc838ebadee3649d47e07d029371bc1054e2200d\aapt2-4.1.1-6503028-windows.jar.
> java.io.IOException: Unable to delete directory 'C:\Users\lenovo.gradle\caches\transforms-2\files-2.1\aa8b5888abc00f78a9403248465821cc'
Failed to delete some children. This might happen because a process has files open or has its working directory set in the target directory.
- C:\Users\lenovo.gradle\caches\transforms-2\files-2.1\aa8b5888abc00f78a9403248465821cc\aapt2-4.1.1-6503028-windows
can someone tell me how to fix it ?
i had same problem in linux
tried many ways and asked some question.
finally found out there is file missing named aap2 in build-tools
i couldn't find that file to place it in destination so i deleted whole file and re Download it with sdk manager and if it doesn't work too i guess u should try reinstall android studio
yes its not a good answer but it was all experience i had with this error.

Application failed to start on shiny web server after a few days [duplicate]

This question already has an answer here:
Error: Discard position id too big
(1 answer)
Closed 4 years ago.
I have a running shiny app on a web server that worked fine until I would say last week. Now, on occasion (I guess every two days) the app stops working with the "Application failed to start" message. When I restart the shiny server, as I did just now, everything runs fine again.
https://butterlab.imb-mainz.de/flydev/
The funny thing is, I have other apps on this server as well, and they are not affected and run fine in parallel, even if this app failed.
I can not find any error message in the log files. And I am wondering: how I could debug this, since the app is now running fine?
Looking forward to any advice.
EDIT:
I checked the shiny-server.log file after the error occurred and I found the following message:
[2018-06-14 14:29:20.080] [WARN] shiny-server - RobustSockJS collision: MqU4rgur76RPgjJIPr
[2018-06-15 01:28:18.398] [WARN] shiny-server - Error handling message: Error: Discard position id too big
[2018-06-15 02:00:10.358] [INFO] shiny-server - Error getting worker: Error: The application took too long to respond.
[2018-06-15 02:00:10.364] [INFO] shiny-server - Error getting worker: Error: The application took too long to respond.
The last message gets repeated whenever someone accesses the server.
So in the end, it seems this page solved my problem Error: Discard position id too big
I set app_init_timeout and app_idle_timeout both to 1800and since then I have no further problems.
Also the comment with the restart.txt file might be interesting. I thought about testing with a shell script if the page is still working, otherwise touching the txt.
http://docs.rstudio.com/shiny-server/#restarting-an-application
But as I said, in the end it works by adjusting the app_init_timeout and app_idle_timeout.

Appcelerator - include jar in build at compile-time?

Since Appcelerator(/Hyperloop) doesn't use Gradle or Maven to manage dependencies, I need to include them all manually for my project by placing them in the app/platform/android folder. I have done this, however I also need to include google dagger (https://github.com/google/dagger) which requires including dagger-compiler-2.x.jar , which I believe is an annotation processor that generates some type of code during compile-time.
Simply placing this in the app/platform/android folder like any other jar results in this error when the dexer is running during the build:
[ERROR] : Failed to run dexer:
[ERROR] :
[ERROR] : PARSE ERROR:
[ERROR] : MethodHandle not supported
[ERROR] : ...while preparsing cst 016c at offset 00001ceb
[ERROR] : ...while parsing com/google/googlejavaformat/java/JavaInput.class
[ERROR] : 1 error; aborting
I think it has something to do with the part of the dagger instructions which state "you will need to include dagger-compiler-2.x.jar in your build at compile time." Is there somewhere else that I need to place this jar file to get it to be used properly? Or is the use of compile-time annotation processors not something that Appcelerator/Hyperloop supports at this time? Any thoughts or insight would be greatly appreciated.
A good amount has changed since this question was asked. This being said, I believe that currently Hyperloop for Android doesn't handle annotations. And this is how dependency injection systems work, so I believe it's still not currently possible to use that or similar JARs.

Resources