Heads Up :
The post you are writing will appear in a public forum. Please ensure all content is appropriate for public consumption. Review the employee guidelines for the community here.
Created by: null on 20-05-2005 03:56:14 PM I am having a problem that seems to stem from the fact that some of my custom elements are being loaded with different classloaders even although all my custom classes are located in the java/application/classes directory of the application.
I put together a simple test application to demonstrate this that has 2 Action Elements and a 2 dynamic voice element configuration classes in its java/application/classes directory. These are set up to just print out their ClassLoader. It seems that the dynamic voice element configuration classes are loaded by one classloader and the action elements by another. This is casuing me some severe issues.
I have been testing with 3.3 although I think the same thing is happening with 3.4.
Subject: RE: Classloaders Replied by: Michael Bochynski on 24-05-2005 10:02:13 PM Hi Alan,
Note that Audium 3.3 has a known issue with class loading Please refer to the Audium 3.3 Known Issues
I would suggest checking whether there arethe same classes in both common and a local application folder. Note that classes in the common folder would be loaded, not the local ones. The solution would be to put the desired class in the desired location, but not both locations.
Have you been able to replicate this problem in Audium Call Services?
If you still experience this issue, we would have to look at your specific application.
Regards, Michael
Subject: RE: Classloaders Replied by: null on 25-05-2005 08:52:10 AM Hi Michael,
I have just replocated the issue on Call Services.
Attached is a (zipped up) application that demonstrates the issue. It just consists of 2 Custom Action elements and 2 voice elements that use a Custom Dynamic Configuration. All these classes do is print out their classloader to System.out. This app was saved from the 3.3 builder. I've also attached a zip file containing the src.
There is no replication of the custom classes in the common locations.
Regards, Alan
Subject: RE: Classloaders Replied by: Michael Bochynski on 26-05-2005 04:21:31 PM Hi Alan,
While Action Element and Dynamic Config classes use different classloaders, those classloaders are children of the same classloader.
My problem is that I put an object of type SomeClass in the session with an Action Element and when I retrieve it in a DynamicConfig and try to cast it to SomeClass I get a ClassCastException as the SomeClass in the Dynamic config is loaded with a diferent classloader. What do you suggest as a solution for this?
Regards, Alan
Subject: RE: Classloaders Replied by: Michael Bochynski on 26-05-2005 05:00:23 PM Hi Alan,
From Audium 3.3 Known Issues: [quote:eb33a3c3bb] ClassCastExceptions may be encountered when accessing developer-specified objects stored in Session Data. To resolve this issue, the class or JAR files of these developer classes must be placed in the common folder of Audium Home (in classes or lib), they cannot be stored in the java directory of a specific application. [/quote:eb33a3c3bb]
hope this helps, Michael
Subject: RE: Classloaders Replied by: null on 27-05-2005 08:09:52 AM Hi,
It appears to be an issue with 3.4 Call Services too. I suppose I'll just have to work around it, but it does raise some real issues in terms of packaging applications, dependencies and maintenance.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: