[JBoss JIRA] Created: (JBAS-7878) Unhelpful exception from HornetQ RAR
by Carlo de Wolf (JIRA)
Unhelpful exception from HornetQ RAR
------------------------------------
Key: JBAS-7878
URL: https://jira.jboss.org/jira/browse/JBAS-7878
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: JMS (HornetQ)
Reporter: Carlo de Wolf
Assignee: Clebert Suconic
Fix For: JBossAS-6.0.0.M3
When I create a connection in myself I get an exception pointing to the my own code.
But when the connection is created via the RAR, I'm left clueless as to where the failure lies.
10:18:49,461 WARN [org.hornetq.core.client.impl.DelegatingSession] I'm closing a core ClientSession you left open. Please make sure you close all ClientSessions explicitly before letting them go out of scope! 2033952918
10:18:49,462 WARN [org.hornetq.core.client.impl.DelegatingSession] The ClientSession you didn't close was created here:: java.lang.Exception
at org.hornetq.core.client.impl.DelegatingSession.<init>(DelegatingSession.java:93)
at org.hornetq.core.client.impl.FailoverManagerImpl.createSession(FailoverManagerImpl.java:439)
at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(ClientSessionFactoryImpl.java:1063)
at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSession(ClientSessionFactoryImpl.java:790)
at org.hornetq.ra.HornetQResourceAdapter.createSession(HornetQResourceAdapter.java:1306)
at org.hornetq.ra.inflow.HornetQActivation.setupSession(HornetQActivation.java:336)
at org.hornetq.ra.inflow.HornetQActivation.setup(HornetQActivation.java:283)
at org.hornetq.ra.inflow.HornetQActivation$SetupActivation.run(HornetQActivation.java:496)
at org.jboss.resource.work.WorkWrapper.run(WorkWrapper.java:172)
at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)
at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:780)
at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)
at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:800)
at java.lang.Thread.run(Thread.java:619)
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 9 months
[JBoss JIRA] Created: (JBAS-7877) HornetQ stalls for a couple of minutes during journal recovery
by Carlo de Wolf (JIRA)
HornetQ stalls for a couple of minutes during journal recovery
--------------------------------------------------------------
Key: JBAS-7877
URL: https://jira.jboss.org/jira/browse/JBAS-7877
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: JMS (HornetQ)
Reporter: Carlo de Wolf
Assignee: Clebert Suconic
Fix For: JBossAS-6.0.0.M3
Attachments: threaddump-20100324.txt
During a non-clean startup of AS trunk HornetQ sporadically stalls during the journal recovery. (Not reproducible.)
"Thread-2" prio=10 tid=0x00007f89b4045000 nid=0x948 waiting on condition [0x00007f89c3b44000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00007f89eb3f1240> (a java.util.concurrent.Semaphore$NonfairSync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:747)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:905)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1217)
at java.util.concurrent.Semaphore.acquire(Semaphore.java:286)
at org.hornetq.core.journal.impl.TimedBuffer.start(TimedBuffer.java:147)
...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 9 months
[JBoss JIRA] Created: (JBAS-4591) Create a generic way to createDestinations on MDB Container
by Clebert Suconic (JIRA)
Create a generic way to createDestinations on MDB Container
-----------------------------------------------------------
Key: JBAS-4591
URL: http://jira.jboss.com/jira/browse/JBAS-4591
Project: JBoss Application Server
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: JB5-Messaging
Reporter: Clebert Suconic
Assigned To: Clebert Suconic
Fix For: JBossAS-5.0.0.Beta3, JBossAS-4.4.0.CR1
We should provide a generic way to configure the MDB container to create destinations in other providers besidess JBossMQ.
The Implementation I'm going to do will use a Property Name for the MBean responsible to create destinations and method names for the create methods.
Also... we will support two signatures... one (createTopic(String Topicname) or createQueue(String queueName))
or
createTopic(String TopicName, String jndti) or createQueue(String queueName, String jndi)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 9 months
[JBoss JIRA] Created: (JBRULES-2312) java.lang.ClassCastException: org.drools.reteoo.BetaMemory cannot be cast to org.drools.reteoo.RuleTerminalNode$TerminalNodeMemory
by nicholas hemley (JIRA)
java.lang.ClassCastException: org.drools.reteoo.BetaMemory cannot be cast to org.drools.reteoo.RuleTerminalNode$TerminalNodeMemory
----------------------------------------------------------------------------------------------------------------------------------
Key: JBRULES-2312
URL: https://jira.jboss.org/jira/browse/JBRULES-2312
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core
Affects Versions: 5.0.1.FINAL
Environment: Linux 64-bit
Reporter: nicholas hemley
Assignee: Mark Proctor
When removing packages from a knowledge base, the following intermittent error is encountered:
java.lang.ClassCastException: org.drools.reteoo.BetaMemory cannot be cast to org.drools.reteoo.RuleTerminalNode$TerminalNodeMemory
at org.drools.reteoo.RuleTerminalNode.doRemove(RuleTerminalNode.java:357)
at org.drools.common.BaseNode.remove(BaseNode.java:95)
at org.drools.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:237)
at org.drools.reteoo.ReteooRuleBase.removeRule(ReteooRuleBase.java:366)
at org.drools.common.AbstractRuleBase.removeRule(AbstractRuleBase.java:712)
at org.drools.common.AbstractRuleBase.removePackage(AbstractRuleBase.java:640)
at org.drools.impl.KnowledgeBaseImpl.removeKnowledgePackage(KnowledgeBaseImpl.java:166)
The following JUnit code, which reads a dril file, adds packages to a knowledge base and then serialises/deserialises the knowledge packages before removing them, whilst not reproducing the issue, could be a useful starting point.
It is currently considered that it is some combination of serialise and then add/remove package from a knowledge base that is causing the issue.
import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Logger;
import org.drools.KnowledgeBase;
import org.drools.KnowledgeBaseConfiguration;
import org.drools.KnowledgeBaseFactory;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderConfiguration;
import org.drools.builder.KnowledgeBuilderError;
import org.drools.builder.KnowledgeBuilderErrors;
import org.drools.builder.KnowledgeBuilderFactory;
import org.drools.builder.ResourceType;
import org.drools.compiler.PackageBuilderConfiguration;
import org.drools.definition.KnowledgePackage;
import org.drools.io.Resource;
import org.drools.io.ResourceFactory;
import org.drools.rule.builder.dialect.java.JavaDialectConfiguration;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
/**
* test for a classcastexception issue when removing a knowledge package
*
*/
public class DroolsJiraIssues {
private static String filename = "ENTER DRL FILENAME HERE";
private static Logger log = Logger.getLogger(DroolsJiraIssues.class);
private KnowledgeBaseConfiguration knowledgeBaseConfiguration = KnowledgeBaseFactory
.newKnowledgeBaseConfiguration();
private KnowledgeBuilderConfiguration knowledgeBuilderConfiguration;
@BeforeClass
public static void beforeClass() {
BasicConfigurator.configure();
}
@Before
public void setUp() {
knowledgeBuilderConfiguration = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
JavaDialectConfiguration conf = (JavaDialectConfiguration) ((PackageBuilderConfiguration)knowledgeBuilderConfiguration).getDialectConfiguration("java");
conf.setCompiler(JavaDialectConfiguration.JANINO);
}
/**
* remove knowledge packages sometimes throws the following error:
*
* java.lang.ClassCastException: org.drools.reteoo.BetaMemory cannot be cast to org.drools.reteoo.RuleTerminalNode$TerminalNodeMemory
* at org.drools.reteoo.RuleTerminalNode.doRemove(RuleTerminalNode.java:357)
* at org.drools.common.BaseNode.remove(BaseNode.java:95)
* at org.drools.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:237)
* at org.drools.reteoo.ReteooRuleBase.removeRule(ReteooRuleBase.java:366)
* at org.drools.common.AbstractRuleBase.removeRule(AbstractRuleBase.java:712)
* at org.drools.common.AbstractRuleBase.removePackage(AbstractRuleBase.java:640)
* at org.drools.impl.KnowledgeBaseImpl.removeKnowledgePackage(KnowledgeBaseImpl.java:166)
*
*/
@Test
public void testRemoveKnowledgePackages() throws IOException {
// create a knowledge base
KnowledgeBase knowledgeBase = createKnowlegeBase();
// create knowledge packages from a .drl file
Collection<KnowledgePackage> packages = readKnowledgePackagesFromFile(filename);
log.info("packages.size() = " + packages.size());
// add all knowledge packages
knowledgeBase.addKnowledgePackages(packages);
log.info("added knowledge packages");
// remove all knowledge packages
try {
removePackagesForKnowledgeBase(knowledgeBase);
} catch (ClassCastException e) {
Assert.assertTrue(false);
}
log.info("removed knowledge packages");
// serialise and deserialise the knowledge packages
Collection<KnowledgePackage> packages2 = null;
try {
packages2 = serialiseDeserialiseKnowledgePackages(packages);
} catch (ClassNotFoundException e) {
Assert.assertTrue(false);
}
Assert.assertTrue(packages2.size() == packages.size());
knowledgeBase.addKnowledgePackages(packages2);
log.info("added serialised/deserialised knowledge packages");
// remove all knowledge packages
try {
removePackagesForKnowledgeBase(knowledgeBase);
} catch (ClassCastException e) {
Assert.assertTrue(false);
}
}
private Collection<KnowledgePackage> serialiseDeserialiseKnowledgePackages(Collection<KnowledgePackage> packages) throws ClassNotFoundException, IOException {
Collection<KnowledgePackage> packages2 = new ArrayList<KnowledgePackage>();
List<byte[]> serialisedPackageList = new ArrayList<byte[]>();
// serialize and deserialise knowledge packages by using a bytearrayoutputstream
for (Iterator<KnowledgePackage> iter = packages.iterator(); iter.hasNext();) {
KnowledgePackage kbPackage = iter.next();
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(bos);
oos.writeObject(kbPackage);
log.info("wrote package name " + kbPackage.getName());
serialisedPackageList.add(bos.toByteArray());
}
for (byte[] byteArray : serialisedPackageList) {
ByteArrayInputStream bis = new ByteArrayInputStream(byteArray);
ObjectInputStream ois = new ObjectInputStream(bis);
KnowledgePackage kbPackage = (KnowledgePackage) ois.readObject();
log.info("read package name " + kbPackage.getName());
packages2.add(kbPackage);
}
return packages2;
}
/**
* create a new knowledge base
*
* @return KnowledgeBase
*/
private KnowledgeBase createKnowlegeBase() {
KnowledgeBase knowledgeBase = KnowledgeBaseFactory
.newKnowledgeBase(knowledgeBaseConfiguration);
return knowledgeBase;
}
/**
* remove existing packages from a given knowledge base
*
* @param knowledgeBase
*/
private void removePackagesForKnowledgeBase(KnowledgeBase knowledgeBase) {
Collection<KnowledgePackage> packages = knowledgeBase
.getKnowledgePackages();
for (Iterator<KnowledgePackage> iter = packages.iterator(); iter
.hasNext();) {
KnowledgePackage kbPackage = iter.next();
String packageName = kbPackage.getName();
knowledgeBase.removeKnowledgePackage(packageName);
log.info("removed packageName = " + packageName);
}
}
private Collection<KnowledgePackage> readKnowledgePackagesFromFile(
String filename) {
Collection<KnowledgePackage> knowledgePackageList = new ArrayList<KnowledgePackage>();
URL fileUrl = TestTopologyServerImpl.class.getResource(filename);
try {
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory
.newKnowledgeBuilder();
Resource resource = ResourceFactory.newUrlResource(fileUrl);
kbuilder.add(resource, ResourceType.DRL);
if (kbuilder.hasErrors()) {
KnowledgeBuilderErrors errors = kbuilder.getErrors();
Iterator<KnowledgeBuilderError> it = errors.iterator();
while (it.hasNext()) {
KnowledgeBuilderError error = it.next();
log.error(error.getMessage());
}
}
Assert.assertTrue(!kbuilder.hasErrors());
knowledgePackageList = kbuilder.getKnowledgePackages();
} catch (Exception e) {
log.error("error: " + e.getMessage());
}
return knowledgePackageList;
}
/**
* load a file
*
* @param file
* @return
* @throws IOException
*/
protected final String loadFileAsString(final File file) throws IOException {
return new String(getFileAsBytes(file));
}
/**
* get the bytes of a file
*
* @param file
* @return
* @throws IOException
*/
private final byte[] getFileAsBytes(final File file) throws IOException {
final BufferedInputStream bis = new BufferedInputStream(
new FileInputStream(file));
final byte[] bytes = new byte[(int) file.length()];
bis.read(bytes);
bis.close();
return bytes;
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 9 months
[JBoss JIRA] Created: (JASSIST-79) Editing MethodCall produces incorrect byte code | java.lang.VerifyError: Illegal target of jump or branch | goto points to invalid instruction
by Martin Burger (JIRA)
Editing MethodCall produces incorrect byte code | java.lang.VerifyError: Illegal target of jump or branch | goto points to invalid instruction
----------------------------------------------------------------------------------------------------------------------------------------------
Key: JASSIST-79
URL: https://jira.jboss.org/jira/browse/JASSIST-79
Project: Javassist
Issue Type: Bug
Affects Versions: 3.10.0.GA
Environment: $ java -version
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode)
Reporter: Martin Burger
Assignee: Shigeru Chiba
I instrument method calls in a class called org.mozilla.javascript.Parser.
If I run (or, load) this class, a java.lang.VerifyError will be thrown:
Exception in thread "main" java.lang.VerifyError: (class: org/mozilla/javascript/Parser, method: statementHelper signature: (Lorg/mozilla/javascript/TokenStream;)Ljava/lang/Object;) Illegal target of jump or branch
It seems Javassist introduces a defective goto statement at position 3200 in method statementHelper:
3200: goto -29495
Obviously, offset -29495 is an invalid opcode address.
The corresponding Java code (excerpt):
switch(tt) {
case TokenStream.IF: {
skipsemi = true;
sourceAdd((char)ts.IF);
int lineno = ts.getLineno();
Object cond = condition(ts);
sourceAdd((char)ts.LC);
sourceAdd((char)ts.EOL);
Object ifTrue = statement(ts);
Object ifFalse = null;
if (ts.matchToken(ts.ELSE)) {
sourceAdd((char)ts.RC);
sourceAdd((char)ts.ELSE);
sourceAdd((char)ts.LC);
sourceAdd((char)ts.EOL);
ifFalse = statement(ts);
}
sourceAdd((char)ts.RC);
sourceAdd((char)ts.EOL);
pn = nf.createIf(cond, ifTrue, ifFalse, lineno);
break;
}
case TokenStream.SWITCH: {
I think the break statement is related to this defect.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 9 months
[JBoss JIRA] Created: (JASSIST-67) Strange Exception: Register x contains wrong type
by kobe valiant (JIRA)
Strange Exception: Register x contains wrong type
-------------------------------------------------
Key: JASSIST-67
URL: https://jira.jboss.org/jira/browse/JASSIST-67
Project: Javassist
Issue Type: Bug
Affects Versions: 3.8.1.GA
Environment: windowsXP
Reporter: kobe valiant
Assignee: Shigeru Chiba
Priority: Blocker
ClassPool pool = new ClassPool(true);
CtClass ctc = pool.makeClass("my.Clazz");
StringBuilder sb = new StringBuilder("public void test() {");
for (int i = 0; i < 1000; i++) {
sb.append("for(int i=0; i<10; i++) {}"); // line 1
// sb.append("for(int i=0; i<10; i++) {int j=i;}"); // line 2
}
sb.append("}");
ctc.addMethod(CtNewMethod.make(sb.toString(), ctc));
ctc.toClass().newInstance();
the code above will throw an exception:
Exception in thread "main" java.lang.VerifyError: (class: my/Clazz, method: test signature: ()V) Register 0 contains wrong type
But if you comment the line 1 and uncomment the line 2, there will no exception at all.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 9 months
[JBoss JIRA] Created: (JASSIST-70) instrumenting a constructor with insertAfter() and asFinally=true
by Shigeru Chiba (JIRA)
instrumenting a constructor with insertAfter() and asFinally=true
-----------------------------------------------------------------
Key: JASSIST-70
URL: https://jira.jboss.org/jira/browse/JASSIST-70
Project: Javassist
Issue Type: Bug
Reporter: Shigeru Chiba
Assignee: Shigeru Chiba
(reported by Patrice Bouillet)
Instrumenting a Constructor with the insertAfter method and
'asFinally' set to true leads to a corrupt constructor. This is due to
surrounding the this() and super() calls which cannot be done.
Solution: I think you already know the solution, because the correct
behaviour is already done for the addCatch method, so for the
insertAfter method in CtBehaviour I just modified the line according to
the addCatch:
if (asFinally) {
ca.getExceptionTable().add(getStartPosOfBody(ca), gapPos, gapPos, 0);
}
With this modification, the instrumentation works as expected.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 9 months