NoClassDefFoundError - sun.util.calendar.CustomInfoObjects.class

hi,

i have loaded ** Aspose.words.jdk14.jar ** and my own class ** JBWordEditor.class ** in Oracle database

i also created a procedure call_JBWordEditor to call the java class function to copy source file to destination file.

But it throws the following error.
-----------------------------------------------------------------------------------------------------

sql> select call_JBWordEditor('c: \temp1.docx', 'c: \temp1_cp.docx') from dual

Error at line 1:

ORA-29532: Java call terminated by uncaught java exception:
java.lang.NoClassDefFoundError
java.lang.NoClassDefFoundError
at sun.util.calendar.CustomInfoObjects.class$(ZoneInfoFile.java: 1149)
at sun.util.calendar.CustomInfoObjects.getCustomTimeZone(ZoneInfoFile.java:1149)
at sun.util.calendar.ZoneInfoFile.getCustomTimeZone(ZoneInfoFile.java:504)
at sun.util.calendar.TimeZone.parseCustomTimeZone(TimeZone.java:701)
at sun.util.calendar.TimeZone.getTimeZone(TimeZone.java:450)
at sun.util.calendar.TimeZone.getDefault(TimeZone.java:522)
at java.text.SimpleDateFormat.initialize(SimpleDateFormat.java:513)
at java.text.SimpleDateFormat.(SimpleDateFormat.java:472)
at asposewobfuscated.vq.toString(DateTime.java: 1353)
at asposewobfuscated.ot.d(PalFormatter.java: 36)
at asposewobfuscated.oa.a(OpcCorePropertiesWriter.java: 67)
at asposewobfuscated.oa.a(OpcCorePropertiesWriter.java: 54)
at com.aspose.words.ia.Hv(DocxWriter.java: 113)
at com.aspose.words.ia.a(DocxWriter.java: 40)
at com.aspose.words.Document.a(Document.java: 1353)
at com.aspose.words.Document.save(Document.java: 746)
at com.aspose.words.Document.save(Document.java: 706)
at WPPackage.JBWordEditor.copyFile(JBWordEditor.java:78)
caused by: java.lang.ClassNotFoundException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java: 165)
… 18 more

sql>
-----------------------------------------------------------------------------------------------------

My java class function in Class JBWordEditor is very simple,

    public static String copyFile(String s1, String s2)
    {
        try
        {
            Document doc = new Document(s1);

            if (doc != null)
                doc.save(s2);
            else
                return "1";
        }
        catch (Exception e)
        {}
        return "0";
    }

please help me.

Hi there,

Thanks for your inquiry.

Could you please attach the input document which causes the exception? We will test on our side and provide you with some further feedback.

Thanks,

hi,

You can create your own docx file. bcoz the input document (c:\temp1.docx) contains only text “TEST” other than that nothing i’ve written in that document.

Database function creates a file temp1_cp.docx in c: drive with 0 KB file size and throws the above mentioned error.

Thanks

Regards
Sathish

Hello
Thank you for additional information. But I cannot reproduce the problem on my side using the latest version of Aspose.Words for Java. I think the following article will be useful for you:
https://javarevisited.blogspot.com/2011/06/noclassdeffounderror-exception-in.html#axzz7viohuI1X
Best regards,

hi,

i’ve downloaded Aspose.Words for Java 10.6.0 version and using Aspose.Words.jdk14.jar

i have searched for the jar file for the class CustomInfoObjects… but i didnt find any jar esp fo this class.

At the same time, i have searched in my db and as follows,

select * from all objects where dbms_java.longname(object_name) like ‘%CustomInfo%’ and object_type like ‘%JAVA%’;

This query fetches 1 row :

Owner : SYS
object_name : /7554a698_CustomInfo_Objects
object_id : 31067
Status : VALID

select * from all objects where dbms_java.longname(object_name) like ‘%ZoneInfoFile%’ and object_type like ‘%JAVA%’;

This query fetches 2 rows,

Row 1 :
Owner : SYS
object_name : sun/util/calendar/ZoneInfoFile
object_id : 31069
Status : VALID

Row 2 :

Owner : SYS

object_name : /d48ddc26_ZoneInfoFile1

object_id : 31063

Status : VALID

i guess, the 1st query also should return 2 rows for class CustomInfoObjects.
sun/util/calendar/CustomInfoObjects

  • is missing ???

please tell me whether my understanding is right?

Regards
Sathish

Hello
Thanks you for additional information. Actually this problem is not related to Aspose.Words. I suppose this problem is related to Java on your platform.
Best regards,