3 Replies Latest reply on May 19, 2004 7:45 AM by karmona

    Hotspot Server VM crashes with JBoss 3.2.3

    rudifr

      Hi,

      When I start JBoss 3.2.3 with the -server option the JVM crashes at the deployment of a specific MBean. This didn't happen with JBoss 3.2.1. I already sent a bug report to Sun, but they told me to ask JBoss to investigate this further.
      Here follows the Sun Bug Report:

      --- Note: you can send us updates about your Incident ---
      --- by replying to this mail. Place new information ---
      --- above these lines. Do not include attachments. ---
      --- Our system ignores attachments and anything below ---
      --- these lines. ---

      Hi,

      Thank you for reporting this issue.

      Please ask JBoss to investigate this issue further. Since JBoss appears to trigger this failure, the developers of JBoss will be able to examine their product, isolate the cause of the behavior, and, if necessary, provide us with a detailed report.

      Regards,
      Jonathan

      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      NOTICE: This message including any attachments is confidential
      information of Sun Microsystems, Inc. Disclosure, copying or
      distribution is prohibited without permission of Sun. If you are not
      the intended recipient, please reply to the sender and then delete this
      message.
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



      ----------------- Report -------------------

      category : hotspot
      release : 1.4.2
      subcategory : compiler2
      type : bug
      synopsis : Hotspot Server VM crashes with JBoss 3.2.3
      description : FULL PRODUCT VERSION :
      java version "1.4.2_04"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
      Java HotSpot(TM) Server VM (build 1.4.2_04-b05, mixed mode)

      FULL OS VERSION :
      Microsoft Windows XP [Version 5.1.2600]
      and Windows 2000 Server

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      It happens on various PC's.

      JBoss 3.2.3
      Oracle 9.2.0.1 with JDBC thin driver and p6spy

      ===============================================================================
      .
      JBoss Bootstrap Environment
      .
      JBOSS_HOME: D:\pro\LeoniRastatt\leoni_rastatt\module\jboss-3.2.3_crash\bin\\..
      .
      JAVA: D:\java\j2sdk1.4.2_04\bin\java
      .
      JAVA_OPTS: -Dprogram.name=run.bat -server -Xms128m -Xmx512m -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=10250
      .
      CLASSPATH: ;D:\java\j2sdk1.4.2_04\lib\tools.jar;D:\pro\LeoniRastatt\leoni_rastatt\module\jboss-3.2.3_crash\bin\\run.jar;D:\pro\LeoniRastatt\leoni_rastatt\module\jboss-3.2.3_crash\bin\\..\conf\.
      .
      ===============================================================================
      .
      14:51:09,673 INFO [Server] Starting JBoss (MX MicroKernel)...
      14:51:09,673 INFO [Server] Release ID: JBoss [WonderLand] 3.2.3 (build: CVSTag=JBoss_3_2_3 date=200311301445)
      14:51:09,673 INFO [Server] Home Dir: D:\pro\LeoniRastatt\leoni_rastatt\module\jboss-3.2.3_crash
      14:51:09,673 INFO [Server] Home URL: file:/D:/pro/LeoniRastatt/leoni_rastatt/module/jboss-3.2.3_crash/
      14:51:09,673 INFO [Server] Library URL: file:/D:/pro/LeoniRastatt/leoni_rastatt/module/jboss-3.2.3_crash/lib/
      14:51:09,683 INFO [Server] Patch URL: null
      14:51:09,683 INFO [Server] Server Name: default
      14:51:09,683 INFO [Server] Server Home Dir: D:\pro\LeoniRastatt\leoni_rastatt\module\jboss-3.2.3_crash\server\default
      14:51:09,683 INFO [Server] Server Home URL: file:/D:/pro/LeoniRastatt/leoni_rastatt/module/jboss-3.2.3_crash/server/default/
      14:51:09,683 INFO [Server] Server Data Dir: D:\pro\LeoniRastatt\leoni_rastatt\module\jboss-3.2.3_crash\server\default\data
      14:51:09,683 INFO [Server] Server Temp Dir: D:\pro\LeoniRastatt\leoni_rastatt\module\jboss-3.2.3_crash\server\default\tmp
      14:51:09,683 INFO [Server] Server Config URL: file:/D:/pro/LeoniRastatt/leoni_rastatt/module/jboss-3.2.3_crash/server/default/conf/
      14:51:09,683 INFO [Server] Server Library URL: file:/D:/pro/LeoniRastatt/leoni_rastatt/module/jboss-3.2.3_crash/server/default/lib/
      14:51:09,683 INFO [Server] Root Deployment Filename: jboss-service.xml
      14:51:09,693 INFO [Server] Starting General Purpose Architecture (GPA)...
      14:51:10,024 INFO [ServerInfo] Java version: 1.4.2_04,Sun Microsystems Inc.
      14:51:10,024 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.4.2_04-b05,Sun Microsystems Inc.
      14:51:10,024 INFO [ServerInfo] OS-System: Windows XP 5.1,x86

      A DESCRIPTION OF THE PROBLEM :
      JBoss crashes at the deployment of a specific MBean which is located in an EAR file.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      start JBoss with run.bat.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      JBoss should start and deploy all modules.
      ACTUAL -
      JBoss crashes during startup at the deployment of a specific MBean

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      14:51:51,963 INFO [MainDeployer] Starting deployment of package: file:/D:/pro/LeoniRastatt/leoni_rastatt/module/jboss-3.2.3_crash/server/default/deploy/Log4J_JDBC.ear
      14:51:52,063 INFO [EARDeployer] Init J2EE application: file:/D:/pro/LeoniRastatt/leoni_rastatt/module/jboss-3.2.3_crash/server/default/deploy/Log4J_JDBC.ear

      Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x81175C6
      facedFunction=JVM_GetClassAccessFlags+0x36
      Library=D:\java\j2sdk1.4.2_04\jre\bin\server\jvm.dll

      Current Java thread:
      at sun.reflect.Reflection.getClassAccessFlags(Native Method)
      at sun.reflect.Reflection.quickCheckMemberAccess(Reflection.java:43)
      at java.lang.reflect.Method.invoke(Method.java:310)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
      at org.jboss.mx.util.JMXInvocationHandler.invoke(JMXInvocationHandler.java:177)
      at $Proxy17.getState(Unknown Source)
      at org.jboss.management.j2ee.MBean.postCreation(MBean.java:156)
      at org.jboss.management.j2ee.J2EEManagedObject.postRegister(J2EEManagedObject.java:250)
      at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:278)
      at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.interceptor.ObjectReferenceInterceptor.invoke(ObjectReferenceInterceptor.java:59)
      at org.jboss.mx.interceptor.MBeanAttributeInterceptor.invoke(MBeanAttributeInterceptor.java:43)
      at org.jboss.mx.interceptor.PersistenceInterceptor2.invoke(PersistenceInterceptor2.java:93)
      at org.jboss.mx.server.MBeanInvoker.invoke(MBeanInvoker.java:76)
      at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:144)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
      at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:997)
      at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:327)
      at org.jboss.management.j2ee.MBean.create(MBean.java:65)
      at org.jboss.management.j2ee.factory.ServiceModuleFactory.create(ServiceModuleFactory.java:53)
      at org.jboss.management.j2ee.LocalJBossServerDomain.handleNotification(LocalJBossServerDomain.java:383)
      at org.jboss.mx.server.NotificationListenerProxy.handleNotification(NotificationListenerProxy.java:69)
      at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:93)
      at org.jboss.deployment.SubDeployerSupport.start(SubDeployerSupport.java:178)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:229)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
      at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy6.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
      - locked <0x139fd248> (a org.jboss.deployment.scanner.URLDeploymentScanner)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:274)
      - locked <0x139fc8a8> (a org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:394)
      - locked <0x138f02e8> (a org.jboss.system.ServiceController)
      at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy4.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:589)
      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:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy5.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:384)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:291)
      at org.jboss.Main.boot(Main.java:150)
      at org.jboss.Main$1.run(Main.java:395)
      at java.lang.Thread.run(Thread.java:534)

      Dynamic libraries:
      0x00400000 - 0x00406000 D:\java\j2sdk1.4.2_04\bin\java.exe
      0x77F50000 - 0x77FF7000 C:\WINNT\System32\ntdll.dll
      0x77E60000 - 0x77F46000 C:\WINNT\system32\kernel32.dll
      0x77DD0000 - 0x77E5D000 C:\WINNT\system32\ADVAPI32.dll
      0x78000000 - 0x78086000 C:\WINNT\system32\RPCRT4.dll
      0x77C10000 - 0x77C63000 C:\WINNT\system32\MSVCRT.dll
      0x08000000 - 0x082AD000 D:\java\j2sdk1.4.2_04\jre\bin\server\jvm.dll
      0x77D40000 - 0x77DCC000 C:\WINNT\system32\USER32.dll
      0x77C70000 - 0x77CB0000 C:\WINNT\system32\GDI32.dll
      0x76B40000 - 0x76B6C000 C:\WINNT\System32\WINMM.dll
      0x10000000 - 0x10007000 D:\java\j2sdk1.4.2_04\jre\bin\hpi.dll
      0x00390000 - 0x0039E000 D:\java\j2sdk1.4.2_04\jre\bin\verify.dll
      0x003A0000 - 0x003B9000 D:\java\j2sdk1.4.2_04\jre\bin\java.dll
      0x003C0000 - 0x003CD000 D:\java\j2sdk1.4.2_04\jre\bin\zip.dll
      0x02D10000 - 0x02D2C000 D:\java\j2sdk1.4.2_04\jre\bin\jdwp.dll
      0x6D1D0000 - 0x6D1D5000 C:\Program Files\Oracle\jre\1.3.1\bin\dt_socket.dll
      0x71AB0000 - 0x71AC5000 C:\WINNT\System32\ws2_32.dll
      0x71AA0000 - 0x71AA8000 C:\WINNT\System32\WS2HELP.dll
      0x71A50000 - 0x71A8B000 C:\WINNT\system32\mswsock.dll
      0x71A90000 - 0x71A98000 C:\WINNT\System32\wshtcpip.dll
      0x07570000 - 0x0757F000 D:\java\j2sdk1.4.2_04\jre\bin\net.dll
      0x76F20000 - 0x76F45000 C:\WINNT\System32\DNSAPI.dll
      0x76FB0000 - 0x76FB7000 C:\WINNT\System32\winrnr.dll
      0x76F60000 - 0x76F8C000 C:\WINNT\system32\WLDAP32.dll
      0x76FC0000 - 0x76FC5000 C:\WINNT\System32\rasadhlp.dll
      0x07F70000 - 0x07F76000 C:\WINNT\system32\NTEventLogAppender.dll
      0x07F20000 - 0x07F25000 D:\java\j2sdk1.4.2_04\jre\bin\rmi.dll
      0x76C90000 - 0x76CB2000 C:\WINNT\system32\imagehlp.dll
      0x6D510000 - 0x6D58D000 C:\WINNT\system32\DBGHELP.dll
      0x77C00000 - 0x77C07000 C:\WINNT\system32\VERSION.dll
      0x76BF0000 - 0x76BFB000 C:\WINNT\System32\PSAPI.DLL

      Heap at VM Abort:
      Heap
      def new generation total 13184K, used 6509K [0x10010000, 0x10e50000, 0x138f0000)
      eden space 11776K, 47% used [0x10010000, 0x10594c60, 0x10b90000)
      from space 1408K, 60% used [0x10cf0000, 0x10dc6968, 0x10e50000)
      to space 1408K, 0% used [0x10b90000, 0x10b90000, 0x10cf0000)
      tenured generation total 116544K, used 11733K [0x138f0000, 0x1aac0000, 0x30010000)
      the space 116544K, 10% used [0x138f0000, 0x14465750, 0x14465800, 0x1aac0000)
      compacting perm gen total 16384K, used 15968K [0x30010000, 0x31010000, 0x34010000)
      the space 16384K, 97% used [0x30010000, 0x30fa8320, 0x30fa8400, 0x31010000)

      Local Time = Tue Mar 16 14:51:52 2004
      Elapsed Time = 43
      #
      # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION
      # Error ID : 4F530E43505002EF
      # Please report this error at
      # http://java.sun.com/cgi-bin/bugreport.cgi
      #
      # Java VM: Java HotSpot(TM) Server VM (1.4.2_04-b05 mixed mode)
      #
      # An error report file has been saved as hs_err_pid1628.log.
      # Please refer to the file for further information.
      #


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      application.xml:
      ----------------------
      <?xml version="1.0"?>
      <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN" "http://java.sun.com/j2ee/dtds/application_1_2.dtd">


      <display-name>Log4J_JDBC</display-name>

      Log4J_JDBC



      Log4J_JDBC.sar




      jboss_service.xml:
      -------------------------

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE server>







      LeoniJdbcAppender.java:
      ----------------------------------
      package utility.log4j;
      import java.sql.Connection;
      import java.sql.SQLException;
      import java.sql.Statement;
      import java.sql.Timestamp;
      import java.text.SimpleDateFormat;
      import javax.naming.InitialContext;
      import javax.naming.NamingException;
      import javax.sql.DataSource;
      import org.apache.log4j.Logger;
      import org.apache.log4j.jdbc.JDBCAppender;
      import org.apache.log4j.spi.LoggingEvent;
      //
      import java.sql.Connection;
      import java.sql.SQLException;

      import org.apache.log4j.helpers.LogLog;
      import org.apache.log4j.jdbc.JDBCAppender;

      import org.apache.log4j.spi.LoggingEvent;
      import org.apache.log4j.Level;
      import java.text.SimpleDateFormat;
      import java.util.Date;
      import org.apache.log4j.AppenderSkeleton;
      import java.sql.Statement;
      import java.util.StringTokenizer;
      import java.sql.PreparedStatement;
      import java.sql.Timestamp;

      public class LeoniJdbcAppender extends JDBCAppender
      {
      private Connection con;
      private Logger logger = Logger.getLogger(getClass());
      /**
      *
      */
      public LeoniJdbcAppender()
      {
      super();
      }
      public void append(LoggingEvent event)
      {
      int treffer = 0;
      Connection aCon = null;
      PreparedStatement theStatement = null;
      String theMessage = null;
      String theLine = null;
      String theClass = null;
      String theLevel = null;
      int begrenzer1 = 0;
      theLine = event.getLoggerName();
      begrenzer1 = theLine.lastIndexOf('.');
      theClass = theLine.substring(begrenzer1 + 1).trim();
      theLevel = event.getLevel().toString().trim();
      // Meldung bearbeiten
      theLine = event.getRenderedMessage();
      if (theLine.length() > 150)
      {
      theMessage = theLine.substring(0, 150).trim();
      }
      else
      {
      theMessage = theLine;
      }
      SimpleDateFormat theSimpleDateFormat =
      new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S");
      Timestamp theTimestamp = new Timestamp(event.timeStamp);
      final String theInsert =
      "insert into meldungen "
      + "("
      + "MLD_TIMESTAMP ,"
      + "MLD_CATEGORY ,"
      + "MLD_LEVEL,"
      + "MLD_MESSAGE)"
      + "values "
      + "("
      + "?,"
      + "?,"
      + "?,"
      + "?"
      + ")";
      try
      {
      aCon = this.getConnection();
      theStatement = aCon.prepareStatement(theInsert);
      theStatement.setTimestamp(1, theTimestamp);
      theStatement.setString(2, theClass);
      theStatement.setString(3, theLevel);
      theStatement.setString(4, theMessage);
      // SQL Anweisung ausf&#65533;hren
      treffer = theStatement.executeUpdate();

      aCon.commit();
      }
      catch (SQLException sqlex)
      {
      LogLog.error("Fehler: " + sqlex.getMessage());
      }
      catch (Exception ex)
      {
      LogLog.error("Fehler: " + ex.getMessage());
      }
      e.printStackTrace();
      theStatement.executeUpdate(theInsert);
      theStatement.close();
      this.closeConnection();
      finally
      {
      this.closeConnection(aCon,theStatement);
      }

      }
      public Connection getConnection()
      {
      InitialContext ctx = null;
      try
      {
      ctx = new InitialContext();
      }
      catch (NamingException e)
      {
      e.printStackTrace();
      }
      DataSource ds = null;
      try
      {
      ds = (DataSource)ctx.lookup("java:OracleDS");
      }
      catch (NamingException e1)
      {
      e1.printStackTrace();
      }
      try
      {
      con = ds.getConnection();
      }
      catch (SQLException e2)
      {
      e2.printStackTrace();
      }
      return con;
      }
      public void closeConnection(Connection con, PreparedStatement theStatement)
      {
      try
      {
      theStatement.close();
      con.close();
      }
      catch (SQLException sqlex)
      {
      logger.error("Fehler: " + sqlex.getMessage());
      }
      catch (Exception ex)
      {
      logger.error("Fehler: " + ex.getMessage());
      }
      }
      }

      LeoniJMSAppender:
      ---------------------------
      package utility.log4j;

      import java.sql.Connection;
      import java.sql.SQLException;
      import java.sql.Statement;
      import java.sql.Timestamp;
      import java.text.SimpleDateFormat;
      import javax.jms.Message;
      import javax.jms.ObjectMessage;
      import javax.jms.Session;
      import javax.jms.Topic;
      import javax.jms.TopicConnection;
      import javax.jms.TopicConnectionFactory;
      import javax.jms.TopicPublisher;
      import javax.jms.TopicSession;
      import javax.naming.InitialContext;
      import javax.naming.NamingException;
      import javax.sql.DataSource;
      import org.apache.log4j.Logger;
      import org.apache.log4j.jdbc.JDBCAppender;
      import org.apache.log4j.spi.LoggingEvent;

      //
      import java.sql.Connection;
      import java.sql.SQLException;
      import org.apache.log4j.helpers.LogLog;
      import org.apache.log4j.jdbc.JDBCAppender;
      import org.apache.log4j.spi.LoggingEvent;
      import org.apache.log4j.Level;
      import java.text.SimpleDateFormat;
      import java.util.Date;
      import org.apache.log4j.AppenderSkeleton;
      import java.sql.Statement;
      import java.util.StringTokenizer;
      import java.sql.PreparedStatement;
      import java.sql.Timestamp;


      public class LeoniJMSAppender extends JDBCAppender {
      private Logger logger = Logger.getLogger(getClass());
      private String factoryName = "UIL2ConnectionFactory";
      String topicName = "topic/BetriebsmeldungenTopic";
      TopicSession session = null;
      TopicPublisher publisher = null;

      //Look up administered objects
      InitialContext initContext = null;
      Topic topic = null;

      /**
      *
      */
      public LeoniJMSAppender() {
      super();
      try
      {
      initContext = new InitialContext();

      TopicConnectionFactory factory = (TopicConnectionFactory)initContext.lookup(factoryName);
      topic = (Topic)initContext.lookup(topicName);
      initContext.close();

      //Create JMS objects
      TopicConnection connection = factory.createTopicConnection();
      session = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
      publisher = session.createPublisher(topic);
      }
      catch (Exception e)
      {
      logger.error("Couldn't initialize context ...",e);
      }
      }

      public void append(LoggingEvent event) {
      try {
      //Send messages
      ObjectMessage msg = session.createObjectMessage(event);
      publisher.publish(msg);
      } catch (Exception e) {
      e.printStackTrace();
      System.exit(1);
      }
      }
      }

      package utility.log4j;
      import java.sql.Connection;

      import org.apache.log4j.Level;
      import org.apache.log4j.Logger;
      import org.apache.log4j.spi.LoggingEvent;

      public class Log4J_Jdbc implements Log4J_JdbcMBean
      {
      private LoggingEvent theLoggingEvent;
      private LeoniJdbcAppender theLeoniJdbcAppender = new LeoniJdbcAppender();
      private LeoniJMSAppender theLeoniJMSAppender = new LeoniJMSAppender();

      private Logger logger1 = Logger.getLogger("sequenzlager");

      public void create()
      {
      theLeoniJdbcAppender.setThreshold(Level.INFO);
      theLeoniJMSAppender.setThreshold(Level.INFO);
      logger1.addAppender(theLeoniJdbcAppender);

      logger1.addAppender(theLeoniJMSAppender);

      }
      /* (non-Javadoc)
      * @see utility.log4j.Log4J_JdbcMBean#start()
      */
      public void start()
      {
      }
      public void stop()
      {
      }
      public void destroy()
      {
      }

      }


      Log4J_JdbcMBean.java:
      ---------------------------------

      package utility.log4j;

      import java.sql.Connection;

      public interface Log4J_JdbcMBean
      {
      public void create();
      public void start();
      public void stop();
      public void destroy();
      }

      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      With the Hotspot Client VM there is no problem.
      workaround :
      suggested_val :
      cust_name :
      cust_email :
      jdcid :
      language : English
      keyword : webbug
      company :
      hardware : x86
      OSversion : win_xp
      bugtraqID : 0
      dateCreated : 2004-03-16 07:19:48.5
      dateEvaluated : 2004-04-21 16:25:04.53

        • 1. Re: Hotspot Server VM crashes with JBoss 3.2.3

          It is clearly a bug in their reflection package. No amount of investigation on our part is going to make that any more clear.

          Tell them to fix their JVM.

          • 2. Re: Hotspot Server VM crashes with JBoss 3.2.3

            The stacktrace shows an access to a simple getState() method using
            reflection.

            Your memory dump shows the permenant generation at 97% , so I'd guess
            it is a gc problem. Especially since reflection objects are held in the permenant generation.

            Do Sun want us to debug their reflection implementation or garbage collection? :-)

            • 3. Re: Hotspot Server VM crashes with JBoss 3.2.3
              karmona

              2 * WORKAROUNDS

              I had the same problem and I have noticed that the permanent generation size was reaching 99% usage although the MaxPermSize (default=64m) was higher (see below part of the dump) so I have increased the minimum permanent generation allocation and it works!!!!

              Try to add -XX:PermSize=64m to your JVM parameters.

              Anyway this is only a workaround and we still need to wait for sun to fix this.

              Note: this only happen on 'server' mode and not on 'client' jvm mode so this could be another workaround you may want to use (second workaround ;-).

              Heap at VM Abort:
              Heap
              def new generation total 35328K, used 15797K [0x10010000, 0x12660000, 0x138f0000)
              eden space 31424K, 48% used [0x10010000, 0x10ee3270, 0x11ec0000)
              from space 3904K, 15% used [0x11ec0000, 0x11f5a458, 0x12290000)
              to space 3904K, 0% used [0x12290000, 0x12290000, 0x12660000)
              tenured generation total 310412K, used 92575K [0x138f0000, 0x26813000, 0x30010000)
              the space 310412K, 29% used [0x138f0000, 0x19357e38, 0x19358000, 0x26813000)
              compacting perm gen total 40960K, used 40834K [0x30010000, 0x32810000, 0x34010000)
              the space 40960K, 99% used [0x30010000, 0x327f0a68, 0x327f0c00, 0x32810000)


              Have fun,

              Moti