Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

Random java.lang.NoClassDefFoundError after uploading a .jar file (uccx 8.5.1)

Hi!

My team is getting some random behavior when uploading .jar files in UCCX (8.5.1). Bellow you’ll find more info.

We have developed a Java code (a WS Client based on Axis2 jars) that performs a call to a webservice. There are about 18 jars uploaded on UCCX repository, including our client jar which is called from a UCCX script. At this point, everything is ok, the script and the calls work fine.

print1.png

However, sometimes, when we try to upload new versions of our client jar, we get some java.lang.NoClassDefFoundError (in UCCX Editor) referring to classes that belong to the dependent .jar, which has not been touched at all.

We’ve tried everything:
- Click on "Update" of "Custom Classes Configuration" page
- Refresh on jar list in "Document Management" page
- restart of UCCX server.

The last time it happened, after half an hour and two server restarts, the UCCX Editor started to work OK again.

Do you have any hint on what might be happening?

Thanks in advance,

Rogelio.

Everyone's tags (4)
4 REPLIES
New Member

Re: Random java.lang.NoClassDefFoundError after uploading a .jar

I've seen the same exception(s) in the logs as well. Typically, ClassNotFoundException, StreamCorruptedException, or a class version exception (UCCX thinks that a java class is compiled for a version other than what's supported).

Typically, several restarts resolve the issue . In an HA environment make sure the pub is completely up (everything is in service) before restarting the sub.

Not sure, but my money is on a java classloader issue and how custom code is loaded from the repository (if that's how the UCCX class loader is working).

Sent from Cisco Technical Support iPhone App

New Member

We experienced a similar

We experienced a similar problem today. There was a UCCX system boot/restart due to some change in JTAPI user (don't have the exact information), but the result was my IVR application using custom classes were not working and MIVR logs showed:

Exception=com.cisco.expression.ExpressionTargetException: Could not initialize class org.apache.axis.client.AxisClient; nested exception is:

        java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis.client.AxisClient (line: 4, col: 16)

 A restart of Cisco Unified CCX Engine fixed the issue.

Re: Random java.lang.NoClassDefFoundError after uploading a .jar

Hi,

custom classes are persisted into a database tables, hence they should implement the Serializable interface.

Or, you can experiment with the serialVersionUID field http://frequal.com/java/PracticalSerialVersionIdGuidelines.html

By the way, if it's only about a SOAP request/response, you don't need Axis at all, I've been there, I did that, it wasn't good at all. There's a document about creating a SOAP client without any custom jars here https://supportforums.cisco.com/docs/DOC-23899

G.

New Member

Re: Random java.lang.NoClassDefFoundError after uploading a .jar

As far as the Serializable interface goes… you don’t need that to store your .class files or .jar files in a repository (file system, database, etc). The Serializable is a marker interface for instructing the compiler and runtime on how to handle serialization of the instances of the class (ie. Objects). It’s my believe that this has more to do, like I said, with class loading from the repository than anything else.

On the SOAP front… it’s really a user preference. I prefer to work in the object world and not have to deal with raw xml and parsing.

1695
Views
6
Helpful
4
Replies