[JBoss JIRA] Created: (JASSIST-103) Errors appear when starting Weblogic 9.2 samples server with javaassist instrumentations when using jrockit JVM
by Tamir Lahav (JIRA)
Errors appear when starting Weblogic 9.2 samples server with javaassist instrumentations when using jrockit JVM
----------------------------------------------------------------------------------------------------------------
Key: JASSIST-103
URL: https://jira.jboss.org/jira/browse/JASSIST-103
Project: Javassist
Issue Type: Bug
Affects Versions: 3.11.0.GA
Environment: Windows XP, Red Hat Linux
Reporter: Tamir Lahav
Assignee: Shigeru Chiba
Fix For: 3.11.0.GA
I Instrumented Weblogic 9.2 samples server by adding this line to the startup script (<Weblogic-Home>\weblogic92\samples\domains\wl_server\bin\startWebLogic.cmd):
SET JAVA_TOOL_OPTIONS=-javaagent:C:\dev\workspaces\HEAD\SampleJavaAgent\lib\sample-java-agent.jar
sample-java-agent.jar contains 2 classes:
SampleJavaAgent with this method:
public static void premain(String agentArguments, Instrumentation instrumentation)
{
instrumentation.addTransformer(new SampleTransformer());
}
SampleTransformer with this method:
public byte[] transform(ClassLoader loader, String className, Class classBeingRedefined,
ProtectionDomain protectionDomain, byte[] classfileBuffer)
throws IllegalClassFormatException
{
final String formattedClassName = className.replace('/', '.');
final ClassPool classPool = ClassPool.getDefault();
final ClassPath classPath = new ByteArrayClassPath(formattedClassName, classfileBuffer);
classPool.insertClassPath(classPath);
try
{
CtClass ctClass = classPool.get(formattedClassName);
if (className.indexOf("wrapper/ResultSet") > 0 ||
className.indexOf("sql/ResultSet") > 0 ||
className.indexOf("net/netJDBCResultSet") > 0 ||
className.indexOf("ResultSet") > 0)
{
System.out.print("instrumenting " + className + "...");
CtMethod cm = ctClass.getDeclaredMethod("next");
cm.insertAfter("System.out.println(\"executing next for " + className + "\");");
System.out.println("instrumented");
return ctClass.toBytecode();
}
}
catch (Throwable e)
{
System.out.println("failed. " + e.getMessage());
}
return null;
}
When I"m starting Weblogic with the modified startup script I see this error:
<13:47:52 IST 01/03/2010> <Error> <Store> <BEA-280072> <JDBC store "exampleJDBCStore" failed to open table "examplesWLStore".
weblogic.store.io.jdbc.JDBCStoreException: [Store:280065][Store:280068]JDBC store failed to initialize. It did not find its database table and failed trying to create a new empty table using the commands in file "/weblogic/store/io/jdbc/ddl/pointbase.ddl". (server="examplesServer" store="exampleJDBCStore" table="examplesWLStore"):(Linked Cause, "java.sql.SQLException: The table "EXAMPLES.EXAMPLESWLSTORE" already exists.")
at weblogic.store.io.jdbc.JDBCStoreIO.createTable(JDBCStoreIO.java:594)
at weblogic.store.io.jdbc.JDBCStoreIO.open(JDBCStoreIO.java:342)
at weblogic.store.internal.PersistentStoreImpl.open(PersistentStoreImpl.java:350)
at weblogic.store.admin.AdminHandler.activate(AdminHandler.java:135)
at weblogic.store.admin.JDBCAdminHandler.activate(JDBCAdminHandler.java:64)
Truncated. see log file for complete stacktrace
When I changed the "if" statement in the transform method to this:
if (className.indexOf("wrapper/ResultSet") > 0 ||
className.indexOf("sql/ResultSet") > 0 ||
className.indexOf("net/netJDBCResultSet") > 0 ||
className.indexOf("ResultSetxxx") > 0)
the error disappeared, even according to the system out messages the number of instrumented classes is the same in both cases.
When I used Sun's JVM by changing JAVA_VENDOR variable in setDomainEnv.cmd script in the same directory the error also disappeared.
Weblogic 9.2 installation can be found here:
http://www.oracle.com/technology/software/products/ias/htdocs/wls_main.html
--
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, 10 months
[JBoss JIRA] Created: (JGRP-1162) TCPGOSSIP leaking RouterStubs causes GossipRouter failures
by vivek v (JIRA)
TCPGOSSIP leaking RouterStubs causes GossipRouter failures
----------------------------------------------------------
Key: JGRP-1162
URL: https://jira.jboss.org/jira/browse/JGRP-1162
Project: JGroups
Issue Type: Bug
Affects Versions: 2.9, 2.8
Environment: Linux, JGroups 2.9 GA
Reporter: vivek v
Assignee: Bela Ban
We are using JGroups 2.9 GA /w TCPGOSSIP and Gossip Router. In quite a few occasions we noticed node isolation, where one node becomes singleton and is never able to join back. While debugging that problem we found Gossip Router sometimes start publishing wrong list of nodes to the coordinator. Coordinator needs to call GR every few seconds to get the list of nodes (this is part of Merge2 protocol). TCPGossip is supposed to make only one RouterStub per GR, but what happens is any time there is an exception in the "getMembers" method of RouterStub it calls disconnect on TCPGossip, which basically starts the reconnector to create a new RouterStub. The bug is that the old RouterStub never gets cleaned up - neither on the TCPGossip side nor on the Gossip Router.
Now, problem we have seen is due to some IOException in the "readLoop()" of GossipRouter causes the old socket to be closed and removes the RouterStub address from GossipRouter's map (calling removeEntry()). So, now you still have the new RouterStub, but no entry for it in the GR's list. Anytime the coordinator asks for the list it may not get itself in the list.
The problem becomes even more critical if a node goes down comes up again and asks for the list from GR - the returned list wouldn't have the coordinator in it and thus it may not get it's logical address - it may get the view from other node in the list, but still may never be able to join without the right logical address. We have seen that happening, where the coordinator (or other node) keeps saying NAKACK - dropping message.
Proposed Solution
--------------------
1) When RouterStub calls state change to "Disconnect" from either "getMembers" or "checkConnection" (usually when there is any exception thrown), in TCPGossip's "connectionStatusChange()" if the state change is disconnect then call destroy on the routerstub - so we clean up the old router stub.
--
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, 10 months