upgrade log4j 1.2.17 to log4j2, NoClassDefFoundError: org/apache/log4j/helpers/FileWatchdog - log4j2

Actions about upgrade:
before this time log4j big bug. we arrange upgrade upgrade.
Jars i used:
log4j-1.2-api-2.8.2.jar
log4j-core-2.8.2.jar
log4j-api-2.8.2.jar
I use the bridge log4j-1.2-api-2.8.2.jar for little change. but when i call my app,
NoClassDefFoundError: org/apache/log4j/helpers/FileWatchdog hit this issue.
actually,there is no the class in the log4j-1.2-api.
I have tried to find the usage of FileWatchdog, but no any result.
pls help what can i do to fix or avoid this issue?

Finally, i got the answer. there is a Log4jInitializer in my web.xml. need to remove it , the log4j will auto find the log4j2.xml. so the program will not load FileWatchdog in log4j1.2.17.

Related

Web app reload issue in Groovy/Grails Tool Suite

I have ggts-bundle bundle 3.6.1 64 bit with JDK 7 (jdk1.7.0_67) on Win7 64bit.
I have grails home setup as GRAILS_HOME and grails version grails-2.4.3.
When i create a new action/method in the controller class in the tool suite and hit save and refresh the browser, it doesn't reload the changes in the application.
I even modified BuildConfig.groovy and added the following
grails.reload.enabled = true
I also tried with grails -reloading run-app
Nothing seem to reload the changes, I have to stop the server and restart it and then
it reflects the changes.
I am sure there's something i can do to have it reload the app.
I read online and tried other suggestion in questions on stackoverflow before i posted this.
Any suggestions.
Did you end up getting a solution to this?
I've just tried this out in GGTS and it looks like there is no problem.
Version: 3.6.3.RELEASE
Build Id: 201411281415
Platform: Eclipse Luna SR1 (4.4.1)
OS: Win7 64bit
I'm working on a plain vanilla (unmodified) install with default settings.
Using a simple Grails project, with a simple HelloController.groovy and a couple of GSPs... corresponding to two methods inside the controller. Launch the server...
Tried out two scenarios to see what happened, back in the IDE...
modify some simple output text in one of the GSPs, save, refresh the browser... yep, no problem, the change shows up
modify the HelloController.groovy to tell one of the methods to use a different GSP, save, refresh the browser... again, no problems, the change is reflected.
Note. I did have to wait a few seconds in scenario 2 for the IDE to notice the change and to recompile
Perhaps try updating your instance of GGTS to the latest release to see if that makes a difference?
Hope this helps.

Umbraco Site Publishing

I am using umbraco v 4.11.6 (Assembly version: 1.0.4834.19775) the issue is every time the server shuts down or restarts I need to republish the pages which are not loaded.
So please let me know the root cause for this issue if anyone knows or any other things that can be done to over come from this
Thanks in Advance
In version 4.6 there was an issue which had the same behavior when the SQL database was not available at boot time of the website. But with version 4.11 this should be fixed a long time.
I would investigate the logs (~/app_data/logs/). You might find some clue there. Append logs to your post if you can not find the issue.
This might be a problem with some ApplicationEventHandlers not running properly. Or with write permissions on the proper folders. Try adding more logs to the code, so you are sure what runs (and what doesn't).
If you can not find the answer, try the umbraco forums : http://our.umbraco.org/forum

Installing/Uninstalling spring-security-eventlog-0.3

I am having some trouble setting up spring security in my application so I tried to install spring-security-eventlog-0.3 in order to see the logs and understand what the hell is going on :))))
I added this line in BuildConfig.groovy
compile ":spring-security-eventlog:0.3"
When I hit run-app I get this very beautiful message
SpringSecurityEventlogGrailsPlugin.groovy: 3: unable to resolve class org.codehaus.groovy.grails.plugins.springsecurity.SpringSecurityUtils
# line 3, column 1.
import org.codehaus.groovy.grails.plugins.springsecurity.SpringSecurityUtils
^
SpringSecurityEventlogGrailsPlugin.groovy: 2: unable to resolve class org.codehaus.groovy.grails.plugins.springsecurity.SecurityEventListener
# line 2, column 1.
import org.codehaus.groovy.grails.plugins.springsecurity.SecurityEventListener
The run failed. I decided to remove it because I didn't feel like spending hours for that. The thing is that even though I removed the line from BuildConfig, it tries to install it every single time! I even went in my hard disk's path and removed the folder. Even though it installs it every time and fails of course.
Could you please suggest me a solution on this? I would prefer to keep the plugin and be able to have the spring security logs. If it is not possible for some reason, I would like to be able to remove it.
As mentioned in the comments, that plugin depends on version 1.2.x of the core plugin, so you either need to downgrade to 1.2.7.3, or wait until the eventlog plugin is updated to use the 2.0 plugin.
I updated the plugin and sent a pull request, and hopefully the author will release an updated version soon. Feel free to bug him about this if he doesn't :)

Grails and Accumulo, getting a bug in Accumulo's jar

I am trying to connect Grails to Accumulo but I am getting a bug in what appears to be Accumulo-core.jar.
I cam getting a java.lang.ClassNotFoundException on org.apache.accumulo.core.security.thrift.AuthInfo
After digging I found that:
1) Grails can't find that if I import it myself. It throws an import error.
and
2) This line of code at the bottom of ZooKeeperInstance.class is what is messing up the whole project:
public org.apache.accumulo.core.client.Connector getConnector(org.apache.accumulo.core.security.thrift.AuthInfo auth)
That path is in the jar, I am staring at it. I actually can't use anything in the security.thrift path. But I can use the rest of security. Very odd.
Does anyone have any clue what is going on?
To anyone finding this issue, use Maven instead of putting it in the lib directory. I am not really sure why this was the answer, but give it a try.

Spring Roo RooEntity and RooJpaActiveRecord

I am a novice with Spring.
I am looking to resolve conflicts between #RooEntity and #RooJpaActiveRecord. I have used the typicalsecurity addon to an existing project which used more recent versions of Roo (#RooJpaActiveRecord). I was wondering if there's a workaround or a specific way to address this issue. I am not able to run the project on the internal web browser. I receive the HTTP Status 404 error.
Any help or suggestions would be greatly appreciated!
#RooEntity is no longer the annotation that you have to use.
Replace it with #RooJpaActiveRecord and run the Roo shell again.
Regarding the web project, the annotations belongs to the spring-roo-annotations.jar (or something like that) that maven puts in your WEB-INF/lib folder when deploying the war application.
You need to have the appropriate jar dependency (I mean, the correct version) depending on the annotation that you have in your code.
In order to see more explanation, maybe you can provide your server stack trace.

Resources