[Design of JBoss jBPM] - Get a list of taskinstances using jpdl- error-local class i
by AnuradhaS
I have written a code to get a list of taskinstances for a particular user using jpdl.
But i am getting an exception in it
Exception : java.lang.reflect.UndeclaredThrowableException
Cause : java.io.InvalidClassException: org.hibernate.collection.AbstractPersistentCollection; local class incompatible: stream classdesc serialVersionUID = 7602608801868099635, local class serialVersionUID = -5723701046347946317
StackTrace : [Ljava.lang.StackTraceElement;@18ee9d6
The code is-
package com.sample.action;
import javax.rmi.*;
import javax.naming.*;
import org.jbpm.ejb.*;
import org.jbpm.command.*;
import org.jbpm.taskmgmt.exe.TaskInstance;
import java.util.List;
public class Test1
{
public static void main (String[] args)
{
String[] actors = {"Anuradhaps"};
try
{
Context c = new InitialContext();
Object o = c.lookup ("ejb/CommandServiceBean");
RemoteCommandServiceHome home =(RemoteCommandServiceHome)PortableRemoteObject.narrow (o,RemoteCommandServiceHome.class);
RemoteCommandService RemoteCommandService = home.create();
GetTaskListCommand command = new GetTaskListCommand(actors);
List result = (List) RemoteCommandService.execute(command);
if ( result.isEmpty())
{
System.out.println("List empty");
}
else
{
TaskInstance TaskInstance=null;
while(result.iterator().hasNext())
{
TaskInstance =(TaskInstance)result.iterator().next();
System.out.println("name of task : " + TaskInstance.getName());
}
}
}
catch(Exception e)
{
System.out.println("Exception : " +e.toString());
System.out.println("Cause : " +e.getCause());
System.out.println("StackTrace : " +e.getStackTrace());
System.out.println("Message : " +e.getMessage());
}
}
}
Please help me solve this issue.
Regards,
Anuradha
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073858#4073858
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073858
18 years, 7 months
[Design of the JBoss EJB Container] - jndi lookup during restart
by ben.wang@jboss.com
It seems this is the best forum place to discuss the naming issue. Here is the original forum thread that leads to this:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=114200
and there are couple of user forums that reported this issue as well. E.g.,
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=96087
and
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=65304
Basically, in NamingContext, we use a WeakReferenceMap to cache the jndi server stub information.on the client side. So during a server restart, unless the reference has been gc-ed (e.g., if -Dsun.rmi.dgc.client.gcInterval is defaulted to 60 seconds and server restart takes longer than that time), another client request (e.g., ic.lookup(name)) will result in an exception: java.rmi.NoSuchObjectException: no such object in table
Here is a simple code snippet to reproduce it:
| while (isTrue)
| {
| try
| {
| Context naming = new InitialContext ();
| home = (TestSLSBHome)naming.lookup ("TestSLSB");
|
| gd = home.create ();
| boolean succeed = false;
| succeed = gd.isSuccessful();
| System.out.println("The call is successful: " + succeed);
|
| try
| {
| // Manual pause here
| System.out.println("Please hit enter to continue");
| System.in.read();
| }
| catch (Exception ignored) {
| }
|
| }
| catch(Exception e)
| {
| System.out.println("**** Exception happened ....");
| }
|
So this is obviously a flaw since we can't depend on the dgc to recycle the server stub.
A proper way that I propose is to specifically catch the NoSuchObjectException in the lookup() code. When we encounter such an exception, we would flush out the server from the cache and do a fresh lookup again. It should be a simple fix that won't impact the code base.
Please note that this fix won't cover the case when the home stub is cached by the application (that is, no jndi lookup every time). It'd still generate the error but in this case, we can use the RetryInterceptor to catch the error and retry.
This would already be the case for the clustering call (i.e., SingleRetryInterceptor).
Any suggestion?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073831#4073831
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073831
18 years, 7 months
[Design of JBoss ESB] - Failover MessageRedelivery
by kurt.stam@jboss.com
I checked in the redelivery code. So if your delivery fails it will store the message in the message store and schedule it for redelivery.
Check out the new jboss-esb.xml in the jbosses.esb archive, look at the new redelivery service
| <service category="JBossESB-Internal" name="RedeliverService" description="Scheduled Service to Redeliver Messages">
| <listeners>
| <scheduled-listener name="redeliver-scheduled-listener" scheduleidref="5-min-trigger" composer="org.jboss.soa.esb.schedule.RedeliverEventMessageComposer" />
| </listeners>
| <actions>
| <action name="RedeliverMessagesAction" class="org.jboss.soa.esb.actions.MessageRedeliverer" />
| </actions>
| </service>
|
This redelivery mechanism only kicks in for async delivery. For synchronous message delivery I simply let the delivery fail, so the client can deal with the delivery failure.
I hope this makes sense to everyone. I will be adding docs tomorrow, but please let me know if you have any feedback/suggestions.
thx!
--Kurt
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073818#4073818
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073818
18 years, 7 months
[Design of JBoss Portal] - Starting the detachment of portal common
by julien@jboss.com
I have started to detach the jboss portal common module and I have imported in the SVN under /repos/portal/modules/common/trunk. I have built the binary and put it in the library repository under jboss-portal/modules/common/1.0.0-SNAPSHOT.
Now I am going to include it in 2.6 branch and trunk (it was taken from 2.6 branch). It should be completed this week.
You can still update the jboss-portal-2.6 common module if you need to do it. I would synchronize it later with the new module.
What is left to do in the short term:
1/ update 2.6 and trunk to use the common binary
2/ add the common module to hudson or CC
3/ document the new structure
What is left to do on longer term:
1/ think about minimizing the build redundancies (in synch with the build system migration)
2/ agree on a solution for Java 1.4 versus Java 5
3/ decide what should be detached and what should not be
4/ detach as soon as possible what should be detached
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073767#4073767
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073767
18 years, 7 months