paresh modi wrote:
I have set BaseClassLoader explicitly but it doesn't work. Is there any way I can set BaseClassLoader for all.
You shouldn't. Please post the entire exception stacktrace (without setting any classloader in your code). Also please read these wiki articles:
Thanks for the reply. Please find attached .txt file contains full stack trace of ClassCastException, please note that here IFCLINE class extends IFCCURVE so it should be cast to upper level and for few object it's successful as well, you can see this in log file as well in which I have logged class loader for both the class for each turn. I have not set any class loader explicitly. Below is my deployment artifacts.
All the classes are in TMS-1.0.war\WEB-INF\classes\com location only.
Waiting for your expert advice.
ClassLoader_Exception.txt.zip 824 bytes
My guess is you're bundling something that you shouldn't; e.g. some Java(EE) classes -- check jtds jar?
.war CL - as child-first lookup - tries to load them, where something else loads those classes from boot classpath.
Thanks for the reply. I have resolved mentioned issue but still have question and want some advice as well. As I have explained earlier below are my deployment artifacts of EAR.
= > tms-ear-1.0.ear
== > TMS-1.0.war
=== > jsp
=== > META-INF
==== > MANIFEST.MF
=== > WEB-INF
==== > Classes
===== > com
==== > lib
===== > jtds-1.2.2.jar
= > META-INF
== > MANIFEST.MF
== > application.xml
= > solr-1.war
= > tms-solr-1.0.jar
Here I have removed all the classes from TMS-1.0.war/tms-ear-1.0.ear/WEB-INF/classes/, create a jar file tms-com.jar and placed it to TMS-1.0.war/ location and that’s how my issue gets resolved.
Previously the issue was occurred due to some classes are loaded from the server/TMS/lib location from myappscommon.jar file and others are loaded from the TMS-1.0.war/tms-ear-1.0.ear/WEB-INF/classes location.
I have resolved this issue but the deployment structure has been changed as I have explained, So I want your suggestion to manage this artifact properly in a standard way.
TMS-1.0.war/tms-com.jar? --> this does nothing, it's not a classpath entry
Sorry I forgot to mention class path entry here, actually I have added class path entry in tms-ear-1.0.ear/META-INF/MANIFEST.MF file for tms-com.jar.
I want to know that is it ok if I place all the classes in .jar file at tms-ear-1.0.ear location ? Or any other suggestion you can provide... will be helpful a lot.