SEVERE: ContainerBase.addChild: start:org.apache.catalina.LifecycleException: Failed to start error

Got the solution for this problem…. Wooo Make sure that Appliction server (Tomcat etc.) uses the same java runtime version as per what your java application is using. Make sure that your using jre path not jdk path for the runtime enviroments Make sure when creating a project select the appropriate server runtime versions.

Fragment already added IllegalStateException

In the end my workaround was to execute remove() of the previous fragment and add() the new one. Although that’s what replace() method was meant to do. But I am still guessing why replace() method didn’t work properly in this case. It is really weird and I want to discard that it is because I … Read more

Fatal crash: Focus search returned a view that wasn’t able to take focus

This error occurs when the ImeOptions is set to EditorInfo.IME_ACTION_NEXT or EditorInfo.IME_ACTION_PREVIOUS. While the parent of that view is not focusable, or the next found focus object is not focusable. It calls to find the next focus item that should be quickly jumped to but this does not exist or isn’t focusable, it throws this … Read more

Spring/Java error: namespace element ‘annotation-config’ … on JDK 1.5 and higher

The class that’s throwing the exception is using this code to check for Java version: static { javaVersion = System.getProperty(“java.version”); // version String should look like “1.4.2_10” if (javaVersion.indexOf(“1.7.”) != -1) { majorJavaVersion = JAVA_17; } else if (javaVersion.indexOf(“1.6.”) != -1) { majorJavaVersion = JAVA_16; } else if (javaVersion.indexOf(“1.5.”) != -1) { majorJavaVersion = JAVA_15; … Read more

What’s the intended use of IllegalStateException?

Here is one particularly legitimate usage of this exception in JDK (see: URLConnection.setIfModifiedSince(long) among 300+ other usages of it: public void setIfModifiedSince(long ifmodifiedsince) { if (connected) throw new IllegalStateException(“Already connected”); ifModifiedSince = ifmodifiedsince; } I think the example is pretty clear. If the object is in particular state (“Already connected“), some operations should not be … Read more

java.lang.IllegalStateException: Cannot (forward | sendRedirect | create session) after response has been committed

A common misunderstanding among starters is that they think that the call of a forward(), sendRedirect(), or sendError() would magically exit and “jump” out of the method block, hereby ignoring the remnant of the code. For example: protected void doXxx() { if (someCondition) { sendRedirect(); } forward(); // This is STILL invoked when someCondition is … Read more

java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState

You should do the transaction in a Handler as follows: @Override protected void onPostExecute(String result) { Log.v(“MyFragmentActivity”, “onFriendAddedAsyncTask/onPostExecute”); new Handler().post(new Runnable() { public void run() { fm = getSupportFragmentManager(); ft = fm.beginTransaction(); ft.remove(dummyFragment); ft.commit(); } }); }

getting exception “IllegalStateException: Can not perform this action after onSaveInstanceState”

This is the most stupid bug I have encountered so far. I had a Fragment application working perfectly for API < 11, and Force Closing on API > 11. I really couldn’t figure out what they changed inside the Activity lifecycle in the call to saveInstance, but I here is how I solved this : … Read more

IllegalStateException: Can not perform this action after onSaveInstanceState with ViewPager

Please check my answer here. Basically I just had to : @Override protected void onSaveInstanceState(Bundle outState) { //No call for super(). Bug on API Level > 11. } Don’t make the call to super() on the saveInstanceState method. This was messing things up… This is a known bug in the support package. If you need … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)