ClassCircularityError
sheeho Dec 23, 2004 5:01 AMHello,
We are experiencing an intermittent ClassCircularityError. I am pretty new to JBoss and would appreciate any help in diagnosing or resolving the problem.
The error occurs at the point of connecting to a JMS queue. The class creating the queue connection is invoked from a Scheduled Task which is started/run at JBoss startup. The error occurs at a frequency of approximately 1 in 8 starts.
We are running with the following versions of software:
JBoss 3.2.5
Java 1.4.2_06
Red Hat Linux release 7.3 / Red Hat Enterprise Linux ES release 3
Included are:
a) Example output of the error
b) scheduler-service.xml
c) Source code of class being invoked.
2004-12-23 08:29:12,837 55946 DEBUG [schedclient.SchedulerClient] (ThreadPoolWorker[1]:) Executed Availability Killer At: Thu Dec 23 08:29:11 GMT 2004
2004-12-23 08:29:13,166 56275 DEBUG [schedclient.SchedulerClient] (ThreadPoolWorker[1]:) Creating Queue Connection
2004-12-23 08:29:13,276 56385 ERROR [STDERR] (UILServerILService Accept Thread:) java.lang.ClassCircularityError: org/jboss/mq/il/uil2/SocketManager$ReadTask
2004-12-23 08:29:13,278 56387 ERROR [STDERR] (UILServerILService Accept Thread:) at org.jboss.mq.il.uil2.SocketManager.start(SocketManager.java:115)
2004-12-23 08:29:13,278 56387 ERROR [STDERR] (UILServerILService Accept Thread:) at org.jboss.mq.il.uil2.UILServerILService.run(UILServerILService.java:127)
2004-12-23 08:29:13,279 56388 ERROR [STDERR] (UILServerILService Accept Thread:) at java.lang.Thread.run(Thread.java:534)
2004-12-23 08:29:13,824 56933 INFO [org.jboss.ejb.EJBDeployer] (main:) Deployed: file:/opt/jboss-3.2.5/server/default/tmp/deploy/tmp18048BookingEngine.ear-contents/BookingEngine.jar
2004-12-23 08:29:14,632 57741 INFO [org.jboss.deployment.EARDeployer] (main:) Started J2EE application: file:/opt/jboss-3.2.5/server/default/deploy/BookingEngine.ear
2004-12-23 08:29:14,855 57964 INFO [org.jboss.system.server.Server] (main:) JBoss (MX MicroKernel) [3.2.5 (build: CVSTag=JBoss_3_2_5 date=200406251954)] Started in 57s:942ms
2004-12-23 08:30:13,784 116893 ERROR [schedclient.SchedulerClient] (ThreadPoolWorker[1]:) Availability Killer Failed At: Thu Dec 23 08:29:11 GMT 2004
org.jboss.mq.SpyJMSException: Cannot authenticate user; - nested throwable: (java.net.SocketException: Connection reset)
at org.jboss.mq.Connection.authenticate(Connection.java:1161)
at org.jboss.mq.Connection.(Connection.java:248)
at org.jboss.mq.Connection.(Connection.java:325)
at org.jboss.mq.SpyConnection.(SpyConnection.java:66)
at org.jboss.mq.SpyConnectionFactory.createConnection(SpyConnectionFactory.java:87)
at org.jboss.mq.SpyConnectionFactory.createQueueConnection(SpyConnectionFactory.java:124)
at schedclient.SchedulerClient.perform(SchedulerClient.java:30)
at org.jboss.varia.scheduler.Scheduler$Listener.handleNotification(Scheduler.java:1263)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:138)
at $Proxy8.handleNotification(Unknown Source)
at javax.management.NotificationBroadcasterSupport.handleNotification(NotificationBroadcasterSupport.java:98)
at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:83)
at javax.management.timer.Timer.sendNotifications(Timer.java:441)
at javax.management.timer.Timer.access$000(Timer.java:31)
at javax.management.timer.Timer$RegisteredNotification.doRun(Timer.java:612)
at org.jboss.mx.util.SchedulableRunnable.run(SchedulableRunnable.java:164)
at org.jboss.mx.util.ThreadPool$Worker.run(ThreadPool.java:240)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:222)
at java.io.BufferedInputStream.read(BufferedInputStream.java:277)
at org.jboss.util.stream.NotifyingBufferedInputStream.read(NotifyingBufferedInputStream.java:77)
at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2150)
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2163)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2631)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:734)
at java.io.ObjectInputStream.(ObjectInputStream.java:253)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:266)
at java.lang.Thread.run(Thread.java:534)
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: scheduler-service.xml,v 1.4.2.2 2003/10/13 12:31:03 starksm Exp $ -->
<!-- ==================================================================== -->
<!-- Scheduler Service -->
<!-- ==================================================================== -->
true
schedclient.SchedulerClient
NOW
3600000
-1
jboss.j2ee:jndiName=comp/env/ejb/availabilityEngine,service=EJB
<!--
| This example shows how to use a pluggable Schedulable impl
true
org.jboss.varia.scheduler.example.SchedulableExample
Schedulabe Test,12345
java.lang.String,int
0
10000
-1
-->
<!--
| This example shows how to use a target MBean
true
:name=SchedulableMBeanExample
hit( NOTIFICATION, DATE, REPETITIONS, SCHEDULER_NAME, java.lang.String )
NOW
10000
10
-->
package schedclient;
import java.util.Date;
import org.jboss.varia.scheduler.Schedulable;
import org.jboss.logging.Logger;
import javax.naming.*;
import javax.rmi.PortableRemoteObject;
import availability.*;
import javax.jms.QueueConnectionFactory;
import javax.jms.QueueConnection;
import javax.jms.QueueSession;
import javax.jms.Queue;
import javax.jms.QueueSender;
import javax.jms.MapMessage;
public class SchedulerClient implements Schedulable {
/** Class logger. */
private Logger log = Logger.getLogger(this.getClass());
public SchedulerClient() {
}
public void perform(Date pTimeOfCall, long pRemainingRepetitions) {
log.debug("Executed Availability Killer At: " + pTimeOfCall);
try {
Context ctx = getJBossInitialContext();
QueueConnectionFactory qFactory = (QueueConnectionFactory) ctx.lookup("ConnectionFactory");
log.debug("Creating Queue Connection");
QueueConnection qConnection = qFactory.createQueueConnection();
log.debug("Creating Queue Session");
QueueSession qSession = qConnection.createQueueSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE) ;
log.debug("Staring Queue Connection");
qConnection.start();
log.debug("Looking up Queue");
Queue theQueue = (Queue) ctx.lookup("queue/C");
log.debug("Creating Sender");
QueueSender qSender = qSession.createSender(theQueue);
log.debug("Creating Message");
MapMessage mapMessage = qSession.createMapMessage();
log.debug("Setting Message Properties");
mapMessage.setStringProperty("SchedCall", "Kill Availability");
//call the killer method
log.debug("Sending Message");
qSender.send(mapMessage);
qConnection.close();
ctx.close();
} catch (Exception e) {
log.error("Availability Killer Failed At: "+pTimeOfCall, e);
e.printStackTrace();
}
}
private javax.naming.Context getJBossInitialContext() throws NamingException {
java.util.Hashtable JNDIParm = new java.util.Hashtable();
JNDIParm.put(Context.PROVIDER_URL, "jnp://localhost:1099");
JNDIParm.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
return new InitialContext(JNDIParm);
}
}