Showing posts with label Exception. Show all posts
Showing posts with label Exception. Show all posts

Friday, February 14, 2014

Previously initiated loading for a different type with name "javax/management/MBeanServer"

When I was doing a migration / upgrade to Spring 3.1, I faced a really weird Error.

My App was using Jetty to run deploy my WAR file.


Short story / Long Story

Although I was not using MX4J library in my project, I remembered that:
"Jetty defaults to overriding the normal J2SE class loader delegation model  (which calls for delegating to the parent)."

Therefore, this could be fixed by using this System Property:


-Dorg.mortbay.jetty.webapp.parentLoaderPriority=true



This is how you should do it in your pom:


And that error will go away.


Sunday, February 5, 2012

StaleObjectStateException on JBPM4

When I was doing some testing to my recently implemented JBPM4 process, I faced a really ugly error, which ended abruptly my process :(

Could not synchronize database state with session
org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jbpm.pvm.internal.job.TimerImpl#17]

After researching on Jboss.org, I just found very few bread crumbs instead of the whole slice of bread:
StaleObjectException on Timer execution
My process was different, because mine was completely ASYNC, then I realize, what would happen if I make SYNC just the WAIT state (which was causing the problem) and keep ASYNC my other states. After my first test, I got what I was expecting :D