Configuration manager shouldn't be null error - struts2

we have a WAR that has S2 code in it and the WAR is deployed on Glassfish. We are noticing the configuration manager shouldn't be null error when we deploy the code and try to bring use the application (in browser). The error does not happen when the Application server is restarted after the deployment.
Log:
[#|2009-12-04T12:55:47.215-0500|SEVERE|sun-appserver2.1|org.apache.catalina.core.ApplicationFilterConfig|_ThreadID=48;_ThreadName=RMI TCP Connection(5846)-127.0.0.1;_RequestID=d8d812b6-c1e1-4b56-a707-68e071ffb9e9;|ApplicationFilterConfig.doAsPrivilege
java.lang.IllegalStateException: The configuration manager shouldn't be null
at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:849)
at org.apache.struts2.dispatcher.Dispatcher.cleanup(Dispatcher.java:256)
at org.apache.struts2.dispatcher.FilterDispatcher.destroy(FilterDispatcher.java:221)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
I researched this issue a bit and found that this is an error with S2. Even though, bug is fixed (last comment) that fix does not work for us. Maybe because glassfish server is not mentioned in the ticket.
Has anyone faced similar issues?...or has a fix?

This is fixed if ActionContextCleanup Filter is added to web.xml. It worked for my on GlassFish V2. FilterDispatcher is suppose to clean up actions but this dispatcher seems to have some issues on GlassFish V2. So ActionContextCleanup Filter should be used with url pattern that matches your struts pages.

Related

Caused by: org.springframework.web.servlet.NoHandlerFoundException: No handler found for GET /null/swagger-resources/configuration/ui

Getting the below exception while starting the spring boot application.
Exception:
Caused by: org.springframework.web.servlet.NoHandlerFoundException: No handler found for GET /null/swagger-resources/configuration/ui
Swagger gradle dependencies versions are as below
compile('io.springfox:springfox-swagger2:2.7.0')
compile('io.springfox:springfox-swagger-ui:2.7.0')
you need close like this browser tab.
my spring boot application port is 8888, when i close this tab and restart my spring boot application, the error is gone.
Hopefully it is the issue with IntelliJ editor. I'm running multiple microservices on different ports and shutting them down once the work is done, but IJ editor might have cached the port(which it already shut down) and causing this confusion and error. I have restarted the service with a different port, and the error is gone.
Note: In general, we will get BIND ERROR : Address already in use, if any other service is running on the same port.

Neo4j Could not apply the transaction to the store after written to log and application restart

At my Neo4j 3.1.3/SDN 4 project from time to time I'm facing with a following Neo4j exception:
Caused by: java.lang.RuntimeException: org.neo4j.ogm.exception.TransactionException: Could not apply the transaction to the store after written to log
at org.neo4j.ogm.drivers.bolt.request.BoltRequest.executeRequest(BoltRequest.java:175)
at org.neo4j.ogm.drivers.bolt.request.BoltRequest.execute(BoltRequest.java:89)
at org.neo4j.ogm.autoindex.AutoIndexManager.assertIndexes(AutoIndexManager.java:187)
at org.neo4j.ogm.autoindex.AutoIndexManager.build(AutoIndexManager.java:92)
at org.neo4j.ogm.session.SessionFactory.<init>(SessionFactory.java:45)
at org.neo4j.ogm.session.SessionFactory.<init>(SessionFactory.java:93)
at com.example.domain.api.configuration.Neo4jConfig.sessionFactory(Neo4jConfig.java:38)
at com.example.domain.api.configuration.Neo4jConfig$$EnhancerBySpringCGLIB$$bcccfdf9.CGLIB$sessionFactory$2(<generated>)
at com.example.domain.api.configuration.Neo4jConfig$$EnhancerBySpringCGLIB$$bcccfdf9$$FastClassBySpringCGLIB$$e2dbf1bb.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358)
at com.example.domain.api.configuration.Neo4jConfig$$EnhancerBySpringCGLIB$$bcccfdf9.sessionFactory(<generated>)
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.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
I use Bolt driver in order to connect to Neo4j.
In order to solve this situation I have to restart my Neo4j server and also I have to restart my application(restart Tomcat server).
Is it possible to configure my Bolt driver/datasource.. etc in order to get my application up and running with no needs to restart the application itself.. only restart neo4j server ?
Not sure this is related to OGM, it rather looks a problem on the db side.
Maybe report this on the neo4j gitub with relevant db logs.
Disabling index checks at application startup might help.
This can be done by removing indexes.auto entry from ogm.properties file (or equivalent java config).
see http://neo4j.com/docs/ogm-manual/current/reference/#reference:indexing

Remote-control plugin with Grails 2.4

Is anyone using the remote-control plugin with Grails 2.4.x? I'm working on upgrading an app from 2.2.4 to to 2.4.3. I've got it all working except for a few integration tests, and a bunch of functional tests. In our functional tests, I'm getting the following error:
groovyx.remote.RemoteControlException: Error sending command chain to 'http://localhost:8080/<appname>/grails-remote-control'
at groovyx.remote.transport.http.HttpTransport.send(HttpTransport.groovy:65)
at groovyx.remote.client.RemoteControl.sendCommandChain(RemoteControl.groovy:114)
at groovyx.remote.client.RemoteControl.exec(RemoteControl.groovy:73)
at groovyx.remote.client.RemoteControl.exec(RemoteControl.groovy:67)
at groovyx.remote.client.RemoteControl.call(RemoteControl.groovy:81)
at PatientTests.oneTimeSetUp(PatientTests.groovy:17)
Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8080/<appname>/grails-remote-control
at groovyx.remote.transport.http.HttpTransport$_send_closure1.doCall(HttpTransport.groovy:62)
at groovyx.remote.transport.http.HttpTransport.send(HttpTransport.groovy:53)
I am using the 1.5 version of the remote-control plugin. Any ideas or insights would be much appreciated.
Thanks,
Dave
I faced this problem today with Grails 2.4.3 and remote control 1.5
I initially thought the issue was related to https://jira.grails.org/browse/GRAILS-10661
In my case, it was simply that I had a disconnected grails instance already running on port 8080 that I wasn't aware of.
Killing the errant process solved the issue for me.
Hope that helps.
Regards,
Peter

Issue Launching Grails project to cloudfoundry

I am having a problem launching my (grails) project to cloud foundry. I have already launched with cf-push, but I keep getting this error
I/O error: Connection reset; nested exception is java.net.SocketException: Connection reset
when I run cf-update.
I also cannot see my log files with cf-crashlogs. I get this in the terminal window:
grails> cf-crashlogs
| Checking for available resources:.....
And if I try to access the page I get a 404 Not Found page.
Did I completely miss something? has anyone else seen this or know how fix this issue?
please check which version of the cf grails plugin were you using. try listing the plugin updates with this command:
grails list-plugin-updates
after that try to get cloud foundry connection info by:
grails cf-info
i suppose you know how to configure the login info, all the configure properties are listed here: http://grails-plugins.github.com/grails-cloud-foundry/docs/manual/guide/3%20Configuration.html
to access your app log, the most commonly used command is
grails cf-logs [destination] [--appname] [--instance] [--stderr] [--stdout] [--startup]
hope that helps.
I was trying to test Cloud Foundry long time ago. Don't remember but also had some issues which I couldn't overcome using default tool.
However then I used the Cloud Foundry Integration.
As I mentioned it was some time ago, so I won't help with the details, but the plugin worked as expected and I was able to deploy. Maybe you will success with it too :)

Sun Application Server Error : Error commiting response java.io.IOException: Broken pipe at sun.nio.ch.FileDispatcher.write0(Native Method)

Sometime i will encounter this error after multiple access of my web application
I am using Sun Application Server Platform Edition 8.2
What is the reason for encountering this error and how to resolve it.
File system permissions issue perhaps. Need more information for a better answer.

Resources