[JBoss JIRA] (JASSIST-165) VerifyError with addLocalVariable() and insertAfter() when the method body is in a try catch statement
by Hua Zhang (JIRA)
Hua Zhang created JASSIST-165:
---------------------------------
Summary: VerifyError with addLocalVariable() and insertAfter() when the method body is in a try catch statement
Key: JASSIST-165
URL: https://issues.jboss.org/browse/JASSIST-165
Project: Javassist
Issue Type: Bug
Affects Versions: 3.16.1-GA
Environment: JDK 1.6, javassist3.16.1_GA
Reporter: Hua Zhang
Assignee: Shigeru Chiba
Priority: Blocker
CtClass cc = pool.get(className);
CtMethod theMethod = ...;
cc.defrost();
theMethod.addLocalVariable("__t", pool.get("long"));
theMethod.insertBefore("{long __t = System.nanoTime();}");
theMethod.insertAfter("{System.out.println(System.nanoTime() - __t);}");
cc.freeze();
byte[] classFile = cc.toBytecode();
swapper.reload(className, classFile); // swapper is javassist.util.HotSwapper
This code snippet can work for the method which doesn't contain try catch statement. However, if the method likes this:
public void method(...) {
try {
......
} catch (Exception e) {
}
}
Error thrown:
Exception in thread "HotSwap" java.lang.VerifyError: verifier detected internal
inconsistency or security problem
It is because __t is not visible in insertAfter() in this case. If modify the statement "theMethod.insertAfter("{System.out.println(System.nanoTime() - __t);}");" to be "theMethod.insertAfter("{System.out.println(System.nanoTime());}");" ( it removes the reference to variable __t), the code can work properly.
Note I use insertAfter(String), not insertAfter(String, true).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] (AS7-4423) Error when clustering queues in domain mode
by Kairi Henry (JIRA)
Kairi Henry created AS7-4423:
--------------------------------
Summary: Error when clustering queues in domain mode
Key: AS7-4423
URL: https://issues.jboss.org/browse/AS7-4423
Project: Application Server 7
Issue Type: Bug
Components: Clustering
Affects Versions: 7.1.1.Final
Environment: x86_64 GNU/Linux, java version "1.6.0_29", jboss 7.1.1
Reporter: Kairi Henry
Assignee: Paul Ferraro
When I configure the jms connections like below within the domain.xml. I am trying to have my queue recognize each other from to separate machines.
<connector name="connector">
<factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="host" value="192.168.1.2"/>
<param key="port" value="5445"/>
</connector>
--------------------------------
I get the following error.
--------------------------------
[Server:blah-manager-server] 19:05:50,030 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 10) Operation ("add") failed - address: ([
[Server:blah-manager-server] ("subsystem" => "messaging"),
[Server:blah-manager-server] ("hornetq-server" => "default"),
[Server:blah-manager-server] ("connector" => "this_server_connector")
[Server:blah-manager-server] ]) - failure description: "JBAS014746: factory-class may not be null"
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months