1 Reply Latest reply on Mar 21, 2002 5:53 PM by dominic

    java.lang.ExceptionInInitializerError

    dominic Newbie

      I am using JBoss3Beta2 and I got the following error

      BUILD FAILED

      /home/dsisnero/programming/xdoclettest/build.xml:514: java.lang.ExceptionInInitializerError
      at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:132)
      at org.apache.tools.ant.taskdefs.Java.run(Java.java:305)
      at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:127)
      at org.apache.tools.ant.taskdefs.Java.execute(Java.java:88)
      at org.apache.tools.ant.Task.perform(Task.java:217)
      at org.apache.tools.ant.Target.execute(Target.java:164)
      at org.apache.tools.ant.Target.performTasks(Target.java:182)
      at org.apache.tools.ant.Project.executeTarget(Project.java:601)
      at org.apache.tools.ant.Project.executeTargets(Project.java:560)
      at org.apache.tools.ant.Main.runBuild(Main.java:454)
      at org.apache.tools.ant.Main.start(Main.java:153)
      at org.apache.tools.ant.Main.main(Main.java:176)
      --- Nested Exception ---
      java.lang.ExceptionInInitializerError: org.omg.CORBA.INITIALIZE: cannot instantiate com.sun.corba.se.internal.javax.rmi.CORBA.Util minor code: 0 completed: No
      at javax.rmi.CORBA.Util.createDelegateIfSpecified(Util.java:308)
      at javax.rmi.CORBA.Util.(Util.java:53)
      at javax.rmi.PortableRemoteObject.createDelegateIfSpecified(PortableRemoteObject.java:182)
      at javax.rmi.PortableRemoteObject.(PortableRemoteObject.java:61)
      at client.HelloClient2.main(Unknown Source)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:124)
      at org.apache.tools.ant.taskdefs.Java.run(Java.java:305)
      at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:127)
      at org.apache.tools.ant.taskdefs.Java.execute(Java.java:88)
      at org.apache.tools.ant.Task.perform(Task.java:217)
      at org.apache.tools.ant.Target.execute(Target.java:164)
      at org.apache.tools.ant.Target.performTasks(Target.java:182)
      at org.apache.tools.ant.Project.executeTarget(Project.java:601)
      at org.apache.tools.ant.Project.executeTargets(Project.java:560)
      at org.apache.tools.ant.Main.runBuild(Main.java:454)
      at org.apache.tools.ant.Main.start(Main.java:153)
      at org.apache.tools.ant.Main.main(Main.java:176)
      t.taskdefs.XSLTProcess
      +User task: fixcrlf org.apache.tools.ant.taskdefs.FixCRLF
      +User task: sequential org.apache.tools.ant.taskdefs.Sequential
      +User task: genkey org.apache.tools.ant.taskdefs.GenerateKey
      +User task: zip org.apache.tools.ant.taskdefs.Zip
      +User task: condition org.apache.tools.ant.taskdefs.ConditionTask
      +User task: antstructure org.apache.tools.ant.taskdefs.AntStructure
      +User task: javac org.apache.tools.ant.taskdefs.Javac
      +User task: typedef org.apache.tools.ant.taskdefs.Typedef
      +User task: available org.apache.tools.ant.taskdefs.Available
      +User task: cvspass org.apache.tools.ant.taskdefs.CVSPass
      +User task: move org.apache.tools.ant.taskdefs.Move
      +User task: signjar org.apache.tools.ant.taskdefs.SignJar
      +User task: property org.apache.tools.ant.taskdefs.Property
      +User task: unwar org.apache.tools.ant.taskdefs.Expand
      +User task: touch org.apache.tools.ant.taskdefs.Touch
      +User task: get org.apache.tools.ant.taskdefs.Get
      +User task: javadoc org.apache.tools.ant.taskdefs.Javadoc
      +User task: record org.apache.tools.ant.taskdefs.Recorder
      +User task: untar org.apache.tools.ant.taskdefs.Untar
      +User task: delete org.apache.tools.ant.taskdefs.Delete
      +User task: copydir org.apache.tools.ant.taskdefs.Copydir
      +User task: war org.apache.tools.ant.taskdefs.War
      +User task: parallel org.apache.tools.ant.taskdefs.Parallel
      +User task: exec org.apache.tools.ant.taskdefs.ExecTask
      +User task: apply org.apache.tools.ant.taskdefs.Transform
      +User task: sleep org.apache.tools.ant.taskdefs.Sleep
      +User task: rmic org.apache.tools.ant.taskdefs.Rmic
      +User datatype: fileset org.apache.tools.ant.types.FileSet
      +User datatype: patternset org.apache.tools.ant.types.PatternSet
      +User datatype: filterset org.apache.tools.ant.types.FilterSet
      +User datatype: filelist org.apache.tools.ant.types.FileList
      +User datatype: description org.apache.tools.ant.types.Description
      +User datatype: path org.apache.tools.ant.types.Path
      +User datatype: mapper org.apache.tools.ant.types.Mapper
      Setting project property: java.runtime.name -> Java(TM) 2 Runtime Environment, Standard Edition
      Setting project property: sun.boot.library.path -> /usr/java/jdk1.3.1_01/jre/lib/i386
      Setting project property: java.vm.version -> 1.3.1_01
      Setting project property: java.vm.vendor -> Sun Microsystems Inc.
      Setting project property: java.vendor.url -> http://java.sun.com/
      Setting project property: path.separator -> :
      Setting project property: java.vm.name -> Java HotSpot(TM) Client VM
      Setting project property: file.encoding.pkg -> sun.io
      Setting project property: java.vm.specification.name -> Java Virtual Machine Specification
      Setting project property: user.dir -> /home/dsisnero/programming/xdoclettest
      Setting project property: java.runtime.version -> 1.3.1_01
      Setting project property: java.awt.graphicsenv -> sun.awt.X11GraphicsEnvironment
      Setting project property: os.arch -> i386
      Setting project property: java.io.tmpdir -> /tmp
      Setting project property: line.separator ->

      Setting project property: java.vm.specification.vendor -> Sun Microsystems Inc.
      Setting project property: java.awt.fonts ->
      Setting project property: os.name -> Linux
      Setting project property: ant.home -> /usr/local/jakarta/jakarta-ant-1.4.1
      Setting project property: java.library.path -> /usr/java/jdk1.3.1_01/jre/lib/i386:/usr/java/jdk1.3.1_01/jre/lib/i386/native_threads/:/usr/java/jdk1.3.1_01/jre/lib/i386/client:/usr/java/jdk1.3.1_01/jre/../lib/i386
      Setting project property: java.specification.name -> Java Platform API Specification
      Setting project property: java.class.version -> 47.0
      Setting project property: os.version -> 2.4.7-10
      Setting project property: user.home -> /home/dsisnero
      Setting project property: user.timezone ->
      Setting project property: java.awt.printerjob -> sun.awt.motif.PSPrinterJob
      Setting project property: file.encoding -> ISO-8859-1
      Setting project property: java.specification.version -> 1.3
      Setting project property: java.class.path -> /usr/local/jakarta/jakarta-ant-1.4.1/lib/xdoclet.jar:/usr/local/jakarta/jakarta-ant-1.4.1/lib/mm.mysql-2.0.9-bin.jar:/usr/local/jakarta/jakarta-ant-1.4.1/lib/middlegen.jar:/usr/local/jakarta/jakarta-ant-1.4.1/lib/log4j.jar:/usr/local/jakarta/jakarta-ant-1.4.1/lib/jaxp.jar:/usr/local/jakarta/jakarta-ant-1.4.1/lib/jakarta-ant-1.4.jar:/usr/local/jakarta/jakarta-ant-1.4.1/lib/ejb.jar:/usr/local/jakarta/jakarta-ant-1.4.1/lib/crimson.jar:/usr/local/jakarta/jakarta-ant-1.4.1/lib/ant.jar::/usr/share/java/junit.jar:/usr/share/java/mm.mysql.jar:/usr/java/jdk1.3.1_01/lib/tools.jar
      Setting project property: user.name -> dsisnero
      Setting project property: java.vm.specification.version -> 1.0
      Setting project property: java.home -> /usr/java/jdk1.3.1_01/jre
      Setting project property: user.language -> en
      Setting project property: java.specification.vendor -> Sun Microsystems Inc.
      Setting project property: java.vm.info -> mixed mode
      Setting project property: java.version -> 1.3.1_01
      Setting project property: java.ext.dirs -> /usr/java/jdk1.3.1_01/jre/lib/ext
      Setting project property: sun.boot.class.path -> /usr/java/jdk1.3.1_01/jre/lib/rt.jar:/usr/java/jdk1.3.1_01/jre/lib/i18n.jar:/usr/java/jdk1.3.1_01/jre/lib/sunrsasign.jar:/usr/java/jdk1.3.1_01/jre/classes
      Setting project property: java.vendor -> Sun Microsystems Inc.
      Setting project property: file.separator -> /
      Setting project property: java.vendor.url.bug -> http://java.sun.com/cgi-bin/bugreport.cgi
      Setting project property: sun.io.unicode.encoding -> UnicodeLittle
      Setting project property: sun.cpu.endian -> little
      Setting project property: user.region -> US
      Setting project property: sun.cpu.isalist ->
      Setting ro project property: ant.version -> Ant version 1.4 compiled on September 3 2001
      Setting ro project property: ant.file -> /home/dsisnero/programming/xdoclettest/build.xml
      parsing buildfile /home/dsisnero/programming/xdoclettest/build.xml with URI = file:/home/dsisnero/programming/xdoclettest/build.xml
      Setting ro project property: ant.project.name -> Test
      Adding reference: Test -> org.apache.tools.ant.Project@6f8cf3
      Setting project property: basedir -> /home/dsisnero/programming/xdoclettest
      Project base dir set to: /home/dsisnero/programming/xdoclettest
      +DataType: path
      Adding reference: j2ee-classpath ->
      +DataType: path
      Adding reference: ant-opt-classpath ->
      +DataType: path
      Adding reference: xdoclet-classpath ->
      +DataType: path
      Adding reference: web-classpath ->
      +DataType: path
      Adding reference: project.class.path ->
      +Target: init
      +Task: property
      +Task: property
      +Task: property
      +Task: property
      +Task: property
      +Task: property
      +Task: property
      +Task: property
      +Task: property
      +Task: property
      +Task: property
      +Task: property
      +Task: property
      +Task: property
      +Task: property
      +Task: property
      +Task: property
      +Task: property
      +Task: property
      +Task: property
      +Task: property
      +Task: property
      +Task: property
      +Task: property
      +Task: property
      +DataType: fileset
      +Target: copylibs
      +Task: mkdir
      +Task: mkdir
      +Task: mkdir
      +Task: copy
      +Target: prepare
      +Task: mkdir
      +Task: mkdir
      +Task: mkdir
      +Task: mkdir
      +Task: mkdir
      +Task: mkdir
      +Task: mkdir
      +Task: mkdir
      +Task: mkdir
      +Task: mkdir
      +Task: mkdir
      +Task: mkdir
      +Task: mkdir
      +Task: mkdir
      +Task: mkdir
      +Task: mkdir
      +Task: mkdir
      +Target: ejbdoclet
      +Task: taskdef
      +Target: webdoclet
      +Task: taskdef
      +Target: jmxdoclet
      +Task: taskdef
      +Target: compile-all
      +Target: compile-web
      +Task: javac
      +Target: compile-jmx
      +Task: javac
      +Target: compile-ejbs
      +Task: javac
      +Target: compile-client
      +Task: javac
      +Task: copy
      +Target: ejb-jar
      +Task: jar
      +Target: weblogic-ejb-jar
      +Task: java
      +Target: web-war
      +Task: copy
      +Task: jar
      +Target: j2ee-ear
      +Task: jar
      +Target: deploy
      +Target: clean
      +Task: delete
      +Task: delete
      +Task: delete
      +Target: clean-build
      +Target: main
      +Target: verify
      +Task: java
      +Target: todo
      +Task: taskdef
      +Target: appxml
      +Task: property
      +Task: property
      +Task: property
      +Task: property
      +Task: property
      +Task: taskdef
      +Target: run-hello
      +Task: java
      +Target: run-hello2
      +Task: java
      Build sequence for target `run-hello2' is [init, compile-client, run-hello2]
      Complete build sequence is [init, compile-client, run-hello2, prepare, webdoclet, compile-web, web-war, ejbdoclet, compile-ejbs, ejb-jar, appxml, j2ee-ear, verify, deploy, run-hello, copylibs, main, todo, jmxdoclet, compile-jmx, compile-all, clean, clean-build, weblogic-ejb-jar]

      init:
      Setting project property: lib.dir -> /home/dsisnero/programming/xdoclettest/lib
      Setting project property: Name -> ConverterBean
      Setting project property: name -> converterbean
      Setting project property: src.dir -> /home/dsisnero/programming/xdoclettest/src
      Setting project property: generated.src.dir -> /home/dsisnero/programming/xdoclettest/gen-src
      Setting project property: src.ejb -> /home/dsisnero/programming/xdoclettest/src/ejb
      Setting project property: src.web -> /home/dsisnero/programming/xdoclettest/src/web
      Setting project property: src.client -> /home/dsisnero/programming/xdoclettest/src/client
      Setting project property: config.dir -> /home/dsisnero/programming/xdoclettest/config
      Setting project property: build.dir -> /home/dsisnero/programming/xdoclettest/build
      Setting project property: dist.dir -> /home/dsisnero/programming/xdoclettest/dist
      Setting project property: build.client.dir -> /home/dsisnero/programming/xdoclettest/build/client
      Setting project property: ejb.dir -> /home/dsisnero/programming/xdoclettest/build/ejb
      Setting project property: ejb.classes.dir -> /home/dsisnero/programming/xdoclettest/build/ejb/classes
      Setting project property: ejb.dd.dir -> /home/dsisnero/programming/xdoclettest/build/ejb/META-INF
      Setting project property: ejb.generic.dir -> /home/dsisnero/programming/xdoclettest/build/ejb/generic-ejb
      Setting project property: ejb.generic.file -> /home/dsisnero/programming/xdoclettest/build/ejb/generic-ejb/converterbean-ejb.jar
      Setting project property: ejb.weblogic.dir -> /home/dsisnero/programming/xdoclettest/build/ejb/weblogic-ejb
      Setting project property: ejb.weblogic.file -> /home/dsisnero/programming/xdoclettest/build/ejb/weblogic-ejb/converterbean-ejb.jar
      Setting project property: build.compiler -> modern
      Setting project property: classpath ->
      Setting project property: jboss.create.table -> true
      Setting project property: jboss.remove.table -> true
      Setting project property: jboss.tuned.updates -> true
      Setting project property: jboss.read.only -> false
      Adding reference: ejb-files -> org.apache.tools.ant.types.FileSet@7bd6a1

      compile-client:
      FileSet: Setup file scanner in dir /home/dsisnero/programming/xdoclettest/src with patternSet{ includes: [**/client/**/Hel*.java] excludes: [] }
      [javac] client/HelloClient.java omitted as /home/dsisnero/programming/xdoclettest/build/client/client/HelloClient.class is up to date.
      [javac] client/HelloClient2.java omitted as /home/dsisnero/programming/xdoclettest/build/client/client/HelloClient2.class is up to date.
      FileSet: Setup file scanner in dir /home/dsisnero/programming/xdoclettest/gen-src with patternSet{ includes: [**/client/**/Hel*.java] excludes: [] }
      FileSet: Setup file scanner in dir /home/dsisnero/programming/xdoclettest/src/client with patternSet{ includes: [**/*.properties] excludes: [**/*.java] }
      [copy] jndi.properties omitted as /home/dsisnero/programming/xdoclettest/build/client/jndi.properties is up to date.

      run-hello2:
      [java] Running in same VM client.HelloClient2
      FileSet: Setup file scanner in dir /usr/java/javalibs/jbossclient with patternSet{ includes: [*.jar] excludes: [] }
      FileSet: Setup file scanner in dir /usr/java/javalibs/web with patternSet{ includes: [*.jar] excludes: [] }
      force loading client.HelloClient2
      Finding class client.HelloClient2
      Class java.lang.Object loaded from parent loader
      Class java.lang.Throwable loaded from parent loader
      Class java.lang.ClassNotFoundException loaded from parent loader
      Class java.lang.NoClassDefFoundError loaded from parent loader
      Class javax.naming.NamingException loaded from parent loader
      Class javax.ejb.EJBObject loaded from parent loader
      Class javax.naming.InitialContext loaded from parent loader
      Class java.lang.String loaded from parent loader
      Class java.lang.Exception loaded from parent loader
      Finding class org.jnp.interfaces.NamingContextFactory
      Class javax.naming.spi.InitialContextFactory loaded from parent loader
      Class javax.naming.spi.ObjectFactory loaded from parent loader
      Class org.jnp.interfaces.NamingContextFactory loaded from ant loader
      Class javax.naming.Name loaded from parent loader
      Class javax.naming.Context loaded from parent loader
      Class java.util.Hashtable loaded from parent loader
      Class javax.naming.CompoundName loaded from parent loader
      Finding class org.jnp.interfaces.NamingParser
      Class javax.naming.NameParser loaded from parent loader
      Class java.io.Serializable loaded from parent loader
      Class org.jnp.interfaces.NamingParser loaded from ant loader
      Class java.util.Properties loaded from parent loader
      Finding class org.jnp.interfaces.NamingContext
      Class org.jnp.interfaces.NamingContext loaded from ant loader
      Class javax.naming.CommunicationException loaded from parent loader
      Class javax.naming.ConfigurationException loaded from parent loader
      Class java.io.IOException loaded from parent loader
      Class javax.naming.ServiceUnavailableException loaded from parent loader
      Class java.io.InputStream loaded from parent loader
      Class java.io.BufferedInputStream loaded from parent loader
      Class javax.naming.CannotProceedException loaded from parent loader
      Class javax.naming.InvalidNameException loaded from parent loader
      Class javax.naming.OperationNotSupportedException loaded from parent loader
      Class java.util.Collection loaded from parent loader
      Class javax.naming.NamingEnumeration loaded from parent loader
      Class java.rmi.MarshalledObject loaded from parent loader
      Class java.lang.ClassCastException loaded from parent loader
      Class javax.naming.NotContextException loaded from parent loader
      Class java.util.HashMap loaded from parent loader
      Class java.lang.System loaded from parent loader
      Class java.io.PrintStream loaded from parent loader
      [java] Got context
      Class java.util.StringTokenizer loaded from parent loader
      Class java.lang.Integer loaded from parent loader
      Class java.lang.StringBuffer loaded from parent loader
      Class java.net.Socket loaded from parent loader
      Class java.io.ObjectInputStream loaded from parent loader
      Finding class org.jnp.server.NamingServer_Stub
      Class java.rmi.server.RemoteStub loaded from parent loader
      Finding class org.jnp.interfaces.Naming
      Class java.rmi.Remote loaded from parent loader
      Class org.jnp.interfaces.Naming loaded from ant loader
      Class org.jnp.server.NamingServer_Stub loaded from ant loader
      Class java.rmi.RemoteException loaded from parent loader
      Class java.lang.RuntimeException loaded from parent loader
      Class java.rmi.UnexpectedException loaded from parent loader
      Class java.lang.NoSuchMethodException loaded from parent loader
      Class java.lang.NoSuchMethodError loaded from parent loader
      Class java.lang.Class loaded from parent loader
      Class java.lang.reflect.Method loaded from parent loader
      Class java.rmi.server.RemoteObject loaded from parent loader
      Class java.rmi.dgc.Lease loaded from parent loader
      Class java.rmi.dgc.VMID loaded from parent loader
      Class java.rmi.server.UID loaded from parent loader
      Class java.lang.ref.WeakReference loaded from parent loader
      Class java.rmi.server.RemoteRef loaded from parent loader
      Finding class ejb.hello.HelloHome
      Class javax.ejb.EJBHome loaded from parent loader
      Class ejb.hello.HelloHome loaded from ant loader
      Class javax.ejb.Handle loaded from parent loader
      Finding class ejb.hello.Hello
      Class ejb.hello.Hello loaded from ant loader
      Class javax.ejb.CreateException loaded from parent loader
      Class java.lang.reflect.Proxy loaded from parent loader
      Class java.lang.Error loaded from parent loader
      Class java.lang.reflect.UndeclaredThrowableException loaded from parent loader
      Class javax.ejb.RemoveException loaded from parent loader
      Finding class org.jboss.proxy.ejb.HomeProxy
      Finding class org.jboss.proxy.ejb.GenericProxy
      Class java.io.Externalizable loaded from parent loader
      Class java.lang.reflect.InvocationHandler loaded from parent loader
      Class org.jboss.proxy.ejb.GenericProxy loaded from ant loader
      Class org.jboss.proxy.ejb.HomeProxy loaded from ant loader
      Class java.lang.ExceptionInInitializerError loaded from parent loader
      Class java.security.Principal loaded from parent loader
      Finding class javax.transaction.TransactionManager
      Class javax.transaction.TransactionManager loaded from ant loader
      Finding class javax.transaction.Transaction
      Class javax.transaction.Transaction loaded from ant loader
      Finding class javax.transaction.SystemException
      Class javax.transaction.SystemException loaded from ant loader
      Class java.io.ObjectOutput loaded from parent loader
      Class java.io.ObjectInput loaded from parent loader
      Class java.lang.Boolean loaded from parent loader
      Finding class org.jboss.invocation.Invocation
      Class org.jboss.invocation.Invocation loaded from ant loader
      Finding class org.jboss.invocation.Invoker
      Class org.jboss.invocation.Invoker loaded from ant loader
      Class java.util.Map loaded from parent loader
      Class javax.ejb.EJBMetaData loaded from parent loader
      Finding class org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy
      Class org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy loaded from ant loader
      Class java.rmi.ServerException loaded from parent loader
      Finding class org.jboss.invocation.MarshalledInvocation
      Class org.jboss.invocation.MarshalledInvocation loaded from ant loader
      Class java.rmi.NoSuchObjectException loaded from parent loader
      Finding class org.jboss.tm.TransactionPropagationContextFactory
      Class org.jboss.tm.TransactionPropagationContextFactory loaded from ant loader
      Finding class org.jboss.invocation.jrmp.server.JRMPInvoker_Stub
      Class org.jboss.invocation.jrmp.server.JRMPInvoker_Stub loaded from ant loader
      Finding class org.jboss.proxy.ejb.EJBMetaDataImpl
      Class org.jboss.proxy.ejb.EJBMetaDataImpl loaded from ant loader
      Class javax.ejb.EJBException loaded from parent loader
      Class javax.ejb.HomeHandle loaded from parent loader
      Finding class org.jboss.proxy.ejb.handle.HomeHandleImpl
      Class org.jboss.proxy.ejb.handle.HomeHandleImpl loaded from ant loader
      [java] Got reference to Hello Bean
      Class javax.rmi.PortableRemoteObject loaded from parent loader
      Finding class com.sun.corba.se.internal.javax.rmi.CORBA.Util
      Finding class com.sun.corba.se.internal.javax.rmi.CORBA.Util

      Total time: 5 seconds

        • 1. Re: java.lang.ExceptionInInitializerError
          dominic Newbie

          Sorry, I was kind of vague. I just created a simple hello stateless session bean and am invoking the client from ant. If you look at the trace, you can see that I am able to get an initial context and also I am able to lookup the Home Interface. When I try to get the Home interface, I get that error