Hi,

I've been trying to write a small test program that uses the Jonathan
multicast protocol framework for network communication (i.e., I'm
currently not using the "upper" layers of Jonathan, like the binding
framework, object level etc). My code looks like this:

{
  ...

  Kernel k = Kernel.init(null, DefaultProperties.properties);
  if (k == null) {
        System.out.println("error when creating Kernel");
  }

  cF = JChunkFactory.init(k);
  if (cF == null) {
        System.out.println("error when creating ChunkFactory");
  }
        
  mF = new MyStdMarshallerFactory(cF);
  if (mF == null) {
        System.out.println("error when creating MarshallerFactory");
  }
        
  mC = new MulticastIpProtocol(mF);
  if (mF == null) {
        System.out.println("error when creating MulticastIpProtocol");
  }
 
  ...
}

My problem is that when I try to create a new ChunkFactory (by calling
JChunkFactory.init(k)), an IllegalMonitorState exception is generated: 

java.lang.IllegalMonitorStateException
        at org.objectweb.jonathan.libs.resources.JS.unlock(Unknown
Source)
        at
org.objectweb.jonathan.libs.resources.JChunkFactory.init(JChunkFactory.java:175)
        at MyTest.main(MyTest.java:34)

I use Jonathan 2.0b3 and jdk 1.3 on a Win2000 machine. Does anyone know
what I'm doing wrong?

Olov Stahl
Swedish Institute of Computer Science

Reply via email to