Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MBean operation return error?

Posted on 2014-03-07
3
Medium Priority
?
329 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Suggested Courses

704 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