0 Replies Latest reply on Feb 17, 2012 2:24 PM by 918284

    Could not instantiate bean

      Hi Guys,

      I am not much familiar with Java. I have developed my java program using jdk1.6 and am trying to register java bean using jdk. sun.beans.ole.packager utility and when i reach step 5 and click register i am getting below error message. Can someone help me understand what i am doing wrong. The class file is located in excel\test\Getfileinfo.class and it does have constructor definition in it. Thanks.

      c:\jdk1.3.1_08\jre>.\bin\java -cp .\lib\rt.jar;.\lib\jaws.jar sun.beans.ole.Packager
      The definition for excel.test.GetFileInfo in the JAR file
      has a format error.

      WARNING: Could not instantiate bean "excel.test.GetFileInfo" from JAR "C:\excel.jar"
      But were unable to load the class "excel.test.GetFileInfo" because of
      java.lang.ClassNotFoundException: excel.test.GetFileInfo
      Common reasons for this failure include:
      (1) The class is not defined in the correct package
      it should be in the package "excel.test"
      (2) The class has not been given the correct name
      it should be called "GetFileInfo"
      (3) The class file contains the wrong class or no class at all