Thank you Wolf-Dieter Fink for your reply.
Wolf-Dieter Fink wrote:
As you return the SimpleClass in a remote call it must be Serializable, otherwise it fails as you see
But Even when i invoke a method of session bean through local look up, i got an exception states
"java.lang.RuntimeException: JBAS014154: Failed to marshal EJB parameters"
(Entire trace has been Attached in this reply). But the exact code works for me in Jboss 5.
marshalexception.log.zip 2.1 K
Wolf-Dieter Fink wrote:
Looks like that you have a 'org.json.JSONArray' somewhere in your call which can not serialized.
How do you call the EJB via Remote-interface?
I'm not sure whether it will work via local-interface, but I suppose that it is not a requirement if you use the locac-if
Thanks for you quick reply Wolf-Dieter Fink.
Yes 'JSONArray' cannot be serialized and that not need to be. I called the EJB via local-ifc. And there is no problem with lookup and specific method invokation. The problem is with returning NonSerialized 'JSONArray' object.
In Action.Class i've called the lookup as below:
final Context context = new InitialContext();
MapFacadeLocal map = (MapFacadeLocal)context.lookup("ejb:myApp/MapManager/
JSONArray mapDetailsJSON = map.getMapDetailsJSON(this.getGroupId());
And my interface is like:
public interface MapFacadeLocal
JSONArray getMapDetailsJSON(final long groupId) throws Exception;
And if you need any additional information Let me know.
Note: This works fine in my JBoss 5.
I suppose this will be a bug. Do you use the latest 7.1? Maybe do you get a nightly build or the git repo and re-test it.
If you see still the issue please file a JIRA for AS7 and link it to this thread.
From the spec, Enterprise JavaBeans 3.1, Final Release; chapter 3.2.2 :
Access to an enterprise bean through the local client view is only required to be supported for local cli-
ents packaged within the same application as the enterprise bean that provides the local client view.
Compliant implementations of this specification may optionally support access to the local client view
of an enterprise bean from a local client packaged in a different application. The configuration require-
ments for inter-application access to the local client view are vendor-specific and are outside the scope
of this specification. Applications relying on inter-application access to the local client view are
In EJB 3.x, a local client accesses a session bean through the bean’s local business interface or through
a no-interface client view representing all the public methods of the bean class. For a session bean or
entity bean client and component written to the EJB 2.1 and earlier APIs, the local client accesses the
enterprise bean through the bean’s local home and local component interfaces. The container object that
implements a local business interface or the no-interface local view is a local Java object.
The arguments and results of the methods of the local client view are passed “by reference”. Enter-
prise beans that provide a local client view should therefore be coded to assume that the state of any
Java object that is passed as an argument or result is potentially shared by caller and callee.
Currently i'm using latest nightly build downloaded from https://ci.jboss.org/jenkins/job/JBoss-AS-7.x-latest/ last week. I will do some little more R&D related to this issue to make sure that i'm not missing anything and then i'll raise an issue in jira for JBOSS 7.
Thank u very much,
Test project for reproducing the issue.
1.test.ear.zip : Contains my "test.ear" i.e my application.
2.Src_File.zip: Contains the source file(Project created in eclipse).
3.Serialization.log.zip : Contains Entire log trace.
Note: Uploaded the above files for reproducing the issue created in Jboss as 7 JIRA https://issues.jboss.org/browse/AS7-5103