[JBoss Messaging] - Jboss-messaging-1.0.5SP1 and Seam 2.0.2SP1 on jboss4.0.5
by evdelst
I am trying to use a (remote) jboss-messaging 1.0.5SP1 from within a Seam application (2.0.2SP1). I cannot upgrade JBoss or JBoss Messaging at this moment (there are many applications talking to that messaging server, upgrading would mean a lot of work).
The problems I encounter are with classloading. I tried a 'scoped deployment', but run into errors concerning the javassist:
java.lang.ClassCastException: nl.mypackage.User_$$_javassist_9 cannot be cast to javassist.util.proxy.ProxyObject
This is after putting the same javassist.jar in the (scoped) jboss-messasing.sar. With the default javassists, I get method not found errors in the ProxyFactory class.
I also tried putting all the jboss-messaging client jars in the ear file, but this gives other problems with the initialization of the 'aop on the client side'.
Is it even possible what I am trying to do, or should I give up at this point (and wait for an upgrade of all the other applications)?
All tips are welcome!
Edwin
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4194263#4194263
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4194263
17 years, 7 months
[JBoss jBPM] - Re: how to implement co-sign a task by several person?
by aspider
Based on codes mentioned above, i have been confused by this problem for several days, who can tell me how to write 'task-end' action.
Test the process, i always get this error:
| org.jbpm.JbpmException: this token is locked by token[0]
| at org.jbpm.graph.exe.Token.signal(Token.java:182)
| at org.jbpm.graph.exe.Token.signal(Token.java:140)
| at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:479)
| at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:393)
| at com.sample.action.CosignTaskEndHandler.execute(CosignTaskEndHandler.java:37)
| at org.jbpm.graph.def.Action.execute(Action.java:122)
| at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:259)
| at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:215)
| at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:185)
| at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:198)
| at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:169)
| at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:452)
| at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:393)
| at com.sample.action.CosignTaskEndHandler.execute(CosignTaskEndHandler.java:37)
| at org.jbpm.graph.def.Action.execute(Action.java:122)
| at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:259)
| at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:215)
| at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:185)
| at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:198)
| at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:169)
| at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:452)
| at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:393)
| at com.sample.SimpleProcessTest.testSimpleProcess(SimpleProcessTest.java:59)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at junit.framework.TestCase.runTest(TestCase.java:154)
| at junit.framework.TestCase.runBare(TestCase.java:127)
| at junit.framework.TestResult$1.protect(TestResult.java:106)
| at junit.framework.TestResult.runProtected(TestResult.java:124)
| at junit.framework.TestResult.run(TestResult.java:109)
| at junit.framework.TestCase.run(TestCase.java:118)
| at junit.framework.TestSuite.runTest(TestSuite.java:208)
| at junit.framework.TestSuite.run(TestSuite.java:203)
| at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
| at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4194261#4194261
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4194261
17 years, 7 months
[JBoss Messaging] - JBM Stuck messages
by mbrasier
We are seeing an issue where JBM messages are getting 'lost' until the server is restarted. This is in a cluster of two JBM servers running on JBEAP 4.3 GA. The messages appear in the database, but both partial queues report 0 messages. When the servers are restarted, they find the messages and process them successfully.
The messages in the database are not associated with any transaction or consumer.
The root cause of this may be due to problems connecting to the database, as we see some ORA-17008 errors for a few minutes at the same time as these messages were processed. (JBM seems to assume that its a deadlock, and retry 25 times). Once the ORA errors go away, JBoss messaging continues as normal for any new messages, although the ones that were being processed get forgotten about.
How does JBM cope with the database becoming unavailable during a transaction? Especially between PREPARE and COMMIT on an XA transaction.
Could this cause messages to get stuck in the database?
It is worth adding that the database is Oracle RAC, but that the logs indicate that the database was fine, and that no failover occurred, so it was likely a networking issue, but its not good that the messages got lost until we restarted the servers.
Matt
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4194256#4194256
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4194256
17 years, 7 months
[Javassist user questions] - serialVersionUID issue
by spampete
Hi all,
I have released a small memory leak detector on http://www.qarks.com web site, which is using javassist. Despite using the serialVersionUID helper, recent tests showed a remaining issue with some serializable classes during unmarshalling, with InvalidClassException due to inconsistent serialVersionUID.
I've had a look to Sun's ObjectStreamClass implementation (JDK 1.6) and found indeed some differences explaining the situation. Actually, I do not know if the issue is on Sun's side, not respecting its own spec, or not, but the fix I brough does work on my test bench.
I'd be interested in having your feedback, all of you guys !!
Meanwhile, here is the method I changed within javassist serialVersionUID helper, which I will also send to Shigeru Chiba by email:
|
| static long calculateDefault(CtClass clazz) throws CannotCompileException {
| ByteArrayOutputStream bout;
| try {
| bout = new ByteArrayOutputStream();
| DataOutputStream out = new DataOutputStream(bout);
| ClassFile classFile = clazz.getClassFile();
|
| String javaName = javaName(clazz);
| out.writeUTF(javaName);
|
| CtMethod[] methods = clazz.getDeclaredMethods();
|
| int classMods = clazz.getModifiers();
| if ((classMods & Modifier.INTERFACE) != 0) {
| classMods = (methods.length > 0) ?
| (classMods | Modifier.ABSTRACT) :
| (classMods & ~Modifier.ABSTRACT);
| }
| out.writeInt(classMods);
|
| if (!clazz.isArray()){
| String[] interfaces = classFile.getInterfaces();
| for (int i = 0; i < interfaces.length; ++i)
| interfaces = javaName(interfaces);
|
| Arrays.sort(interfaces);
| for (int i = 0; i < interfaces.length; ++i) {
| out.writeUTF(interfaces);
| }
| }
|
| CtField[] fields = clazz.getDeclaredFields();
| Arrays.sort(fields, new Comparator() {
| public int compare(Object o1, Object o2) {
| CtField field1 = (CtField) o1;
| CtField field2 = (CtField) o2;
| return field1.getName().compareTo(field2.getName());
| }
|
| });
| for (int i = 0; i < fields.length; ++i) {
| CtField field = fields;
| int mods = field.getModifiers();
| if (((mods & 0x2) == 0) || ((mods & 0x88) == 0)) {
| out.writeUTF(field.getName());
| out.writeInt(mods);
| out.writeUTF(field.getFieldInfo2().getDescriptor());
| }
|
| }
|
| if (classFile.getStaticInitializer() != null) {
| out.writeUTF("<clinit>");
| out.writeInt(8);
| out.writeUTF("()V");
| }
|
| CtConstructor[] constructors = clazz.getDeclaredConstructors();
| Arrays.sort(constructors, new Comparator() {
| public int compare(Object o1, Object o2) {
| CtConstructor c1 = (CtConstructor) o1;
| CtConstructor c2 = (CtConstructor) o2;
| return c1.getMethodInfo2().getDescriptor().compareTo(
| c2.getMethodInfo2().getDescriptor());
| }
|
| });
| for (int i = 0; i < constructors.length; ++i) {
| CtConstructor constructor = constructors;
| int mods = constructor.getModifiers();
| if ((mods & 0x2) == 0) {
| out.writeUTF("<init>");
| out.writeInt(mods);
| out.writeUTF(constructor.getMethodInfo2().getDescriptor()
| .replace('/', '.'));
| }
|
| }
|
| //CtMethod[] methods = clazz.getDeclaredMethods();
| Arrays.sort(methods, new Comparator() {
| public int compare(Object o1, Object o2) {
| CtMethod m1 = (CtMethod) o1;
| CtMethod m2 = (CtMethod) o2;
| int value = m1.getName().compareTo(m2.getName());
| if (value == 0) {
| value = m1.getMethodInfo2().getDescriptor().compareTo(
| m2.getMethodInfo2().getDescriptor());
| }
|
| return value;
| }
|
| });
| for (int i = 0; i < methods.length; ++i) {
| CtMethod method = methods;
| int mods = method.getModifiers() &
| (Modifier.PUBLIC | Modifier.PRIVATE | Modifier.PROTECTED |
| Modifier.STATIC | Modifier.FINAL |
| Modifier.SYNCHRONIZED | Modifier.NATIVE |
| Modifier.ABSTRACT | Modifier.STRICT);
|
| if ((mods & Modifier.PRIVATE) == 0) {
| out.writeUTF(method.getName());
| out.writeInt(mods);
| out.writeUTF(method.getMethodInfo2().getDescriptor()
| .replace('/', '.'));
| }
|
| }
|
| out.flush();
|
| MessageDigest digest = MessageDigest.getInstance("SHA");
| byte[] digested = digest.digest(bout.toByteArray());
| long hash = 0L;
| for (int i = Math.min(digested.length, 8) - 1; i >= 0; --i)
| hash = hash << 8 | digested & 0xFF;
|
| return hash;
| } catch (IOException e) {
| throw new CannotCompileException(e);
| } catch (NoSuchAlgorithmException e) {
| throw new CannotCompileException(e);
| }
| }
|
|
kind regards,
Pierre
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4194254#4194254
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4194254
17 years, 7 months