Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MBean operation return error?

Posted on 2014-03-07
3
Medium Priority
?
331 Views
Last Modified: 2014-03-17
Hi,

I am working with the MBean and deployed to the JMX server.
One of the operations (methods) return object data type.
One with string/integer/boolean works fine and return the result.
But when the return type is object type, it fails.

Why is it doing that?
What do I need to do to fix it?

The error says:
Problem invoking getxxxxx():java.rmi.unmarshalException: errror unmarshalling return;
the nested exception is: java.io.writeaborstedExceptin: writing aborted;java.io.notserizableexception


mbean.setxxxDao(svcxxxDao);
		ObjectName name = new ObjectName(
				"xx.xxx..mbean:type=ServiceCatalog");

		mbs.registerMBean(mbean, name);
		 System.out.println("Waiting forever..."); 
	     Thread.sleep(Long.MAX_VALUE

Open in new window

);
0
Comment
Question by:dkim18
  • 2
3 Comments
 
LVL 21

Accepted Solution

by:
Amitkumar Panchal earned 2000 total points
ID: 39915204
What kind of object does Mbean return?

In EJB world we used to get unmarshalException when we were expecting an object for a custom class (ie. Emplolyee, User, Subscriber) which didn't implement the Serializable interface.

Check at your end, bcaz the object that you are expecting is not implementing Serializable interface. It mentioned in the exception.
"java.io.writeaborstedExceptin: writing aborted;java.io.notserizableexception"
0
 

Author Comment

by:dkim18
ID: 39916120
Thank you for your answer.
My custom class did not use the Serializable.

 I will try that when I get back tomorrow.
0
 

Author Comment

by:dkim18
ID: 39917568
Still getting this error after making it Serializable and also now it is complaining  that object data type class not found error.

Problem invoking getxxxxx():java.rmi.unmarshalException: errror unmarshalling return
ClassNotFoundException.

Do I need to make these class as MBean also?
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
A solution for Fortify Path Manipulation.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question