Recent Notes

Displaying keyword search results 1 - 4
Created by Dr. Xi on January 31, 2011 16:14:06    Last update: January 31, 2011 16:14:06
Sometimes ClassCastException happens when apprently a class is casted to the same class or a parent class. The exception looks like this: java.lang.ClassCastException: X cannot be cast to ... where Y may be the same as X , or a parent class of X . The cause of this error is that X and Y are loaded by different class loaders. You can use the FindClass utility to find all occurances of X and Y in the deployment tree. If there's no duplication of X and Y in the deployment tree, JNDI lookups may be the culprit. Suppose X is loaded by class loader LX and registered under name jndi/Resource . In the context of another loader LY , your code may be looking up...
Created by Fang on July 17, 2010 03:16:53    Last update: July 17, 2010 03:18:25
This error happens when the ordering of elements in web.xml is not correct. For example, in a <servlet> declaration, <servlet-name> should come before <servlet-class> . If you switch the order of <servlet-name> and <servlet-class> , you'll get this error. This was my stack trace in JBoss when I declared <load-on-startup> before <init-param> for a servlet: DEPLOYMENTS IN ERROR: Deployment "vfszip:/C:/...
Created by Dr. Xi on March 02, 2010 00:07:48    Last update: March 02, 2010 00:07:48
OC4J didn't offer much help in the console. This is all it displayed: 2010-03-01 15:48:21.372 ERROR J2EE EJB-03027 [Fab... However, in the em console, Logs -> Diagnostic Logs gives more details: Message Text [FabulousApp] An error occured deploying EJB mod... Supplemental Text com.evermind.server.ejb.exception.DeploymentExcept... The error was caused by a relationship annotation between two entities, the referenced attribute was removed from the owner side: @OneToMany(cascade=CascadeType.ALL, mapped...
Created by Dr. Xi on February 13, 2010 22:52:18    Last update: February 13, 2010 22:52:18
This runtime error happens when the Sun EL implementation is not available. Look for the class com.sun.el.ExpressionFactoryImpl in your deployment package, you probably won't find it, or you'll find a version that can't be loaded in your deployment environment. If you are using Maven to build, you can add the following repository and dependency in pom.xml : <!-- Project dependencies --> <dependencies...