weblogic - Java ClassLoader Issue or Concurrency Error? -


After a weblog app, I'm suddenly getting an exception for some weeks:

  & lt; October 25, 2014 9:31:11 PM EDT & gt; & Lt; Error & gt; & Lt; HTTP & gt; & Lt; BEA-101,020 & gt; & Lt; [ServletContext @ 60724164 [AP: J 3000 Module: J 3000] Road: Speak-Edition: 2.5]] Servlet failed with java.lang.ExceptionInInitializerError  

After which application Completely ends up with NoClassDefFoundError until the app server is restarted.

The full stack trace shows that the problem arises from a concurrent correction in a stable initial.

Particularly the equivalent / least code is as follows:

  package a; Import b; Whatever the public class (cancel) () {password p = new password (); }} Package b; Applying Public Final Category Password Serializable {Personal Static Final Integer PARAM1 = CommonStuff.someStaticMethod (); ...} Import java.util.Properties; Public class commonstaff {personal static properties PRP = new properties (); Stable {normalstoff.load ()); } Public static zero load () {PRP.language (system.getpropertase ()); & Lt; --- FAIL  

This is the origin of exception:

  java.util.ConcurrentModificationException at java.util.Hashtable $ enumerator.exe (Hashtable.java .1017) at java.util.Hashtable.putAll (Hashtable.java:469) at b.CommonStuff.load (CommonStuff.java.55) at b.CommonStuff. & Lt; Clinit & gt; (CommonStuff.java:77) on BPsword & lt; Clinit & gt; (Password: Java: 44) a.do (whatever .Java: 99)  

Then it appears during the runtime, the application, weblog package B , we decided to reload the classes, but when the static block runs, it shows that the properties object has been modified.

T know that it is being called concurrently or if it is being said many times it may be that the property is the original instance when the app is refreshed for the first time Goes and trying to reload the CommonStuff class putAll () again

Does it help if I do:

  Private static properties property = null; Stable {CommonStuff.prp = new property (); CommonStuff.load (); }  

I can not try things blindly because it is in the production app in a big company.

Any ideas?

Do I understand where I am going wrong and how to start these variables is to start these variables.

Is this a weblogic class loader problem?

classes / due to this, any newly created PRP Can not be used on static {} block inside PRP is no longer running "old" and "new" PRP "old" PRP is not connected in any way (because "old" and "new" normal stuff separate classes for JVM Are). The possibility of concurrent amendments of all this PRP looks very strange.

I believe the reason is at some other place. Consider the first line of the stack trace: Exception is thrown by animator by Hashtable . Here is the code of the putAll method (as in JDK 8, probably does not change for several years):

 for  (map.indree < ?,? V> e: t.entrySet ()) increases (E. gocket (), e.gast value ());  

Here is the enumerator which throws an exception - and it is not PRP , this is the argument anamorater .

The exception is not related to PRP , but the map by the system is returned by getProperties () . The reason for this is that the floating map on system properties is not safe. It seems that another thread is modifying it at the same time.

You need to start separately PRP I think clone () is the simplest way.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -