Not sure if this is supposed to be posted here........I have posted the same on xlsx4j sub forum......
I am currently facing a problem using docx4j version 3.2.1 on java 1.8_25 and glassfish4.1 server. Previously was using java 1.5 with tomcat, no issue at all, wonder what's wrong with the jabx implementation in Glassfish4.1
- Code: Select all
This is the error log that I encountered, totally clueless.......
14-May-2015 11:42:18, 525 DEBUG Base:114 -
Set contentType application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml on part /
14-May-2015 11:42:18, 569 INFO Part:150 - /xl/workbook.xml
14-May-2015 11:42:19, 052 ERROR NamespacePrefixMapperUtils:63 - name: com.sun.xml.internal.bind.namespacePrefixMapper value: org.docx4j.jaxb.NamespacePrefixMapperSunInternal@1a51cde0 .. trying RI.
14-May-2015 11:42:19, 089 INFO NamespacePrefixMapperUtils:75 - Using NamespacePrefixMapper, which is suitable for the JAXB RI
14-May-2015 11:42:19, 090 INFO Context:61 - Using JAXB Reference Implementation
14-May-2015 11:42:19, 090 INFO Context:76 - loading Context jc
14-May-2015 11:42:27, 500 INFO Context:84 - loaded com.sun.xml.bind.v2.runtime.JAXBContextImpl_$$_jvst2a2_1 .. loading others ..
14-May-2015 11:42:28, 426 INFO Context:99 - .. others loaded ..
14-May-2015 11:42:28, 431 INFO Context:56 - Using JAXB Reference Implementation
14-May-2015 11:42:28, 431 INFO Context:71 - loading Context jcSML
14-May-2015 11:42:31, 488 INFO Context:73 - .. loaded ..
14-May-2015 11:42:31, 489 DEBUG Base:114 -
Set contentType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml on part /xl/workbook.xml
14-May-2015 11:42:31, 502 INFO Part:150 - /_rels/.rels
14-May-2015 11:42:31, 503 DEBUG Base:114 -
Set contentType application/vnd.openxmlformats-package.relationships+xml on part /_rels/.rels
14-May-2015 11:42:31, 503 DEBUG Part:185 - setPackage called for org.docx4j.openpackaging.parts.relationships.RelationshipsPart
14-May-2015 11:42:31, 503 DEBUG Part:185 - setPackage called for org.docx4j.openpackaging.parts.relationships.RelationshipsPart
14-May-2015 11:42:31, 504 DEBUG ContentTypeManager:567 - Registered rels
14-May-2015 11:42:31, 504 INFO RelationshipsPart:429 - adding part with proposed name: /xl/workbook.xml
14-May-2015 11:42:31, 504 DEBUG RelationshipsPart:471 - Relativising target /xl/workbook.xml against source /
14-May-2015 11:42:31, 505 DEBUG RelationshipsPart:490 - Result xl/workbook.xml
14-May-2015 11:42:31, 505 DEBUG RelationshipsPart:376 - Loading part /xl/workbook.xml
14-May-2015 11:42:31, 505 DEBUG Part:185 - setPackage called for org.docx4j.openpackaging.parts.SpreadsheetML.WorkbookPart
14-May-2015 11:42:31, 506 INFO PresentationMLPackage:122 - Set shortcut for WorkbookPart
14-May-2015 11:42:31, 506 INFO Base:268 - shortcut was set
14-May-2015 11:42:31, 507 INFO Part:150 - /xl/styles.xml
14-May-2015 11:42:31, 507 DEBUG Base:114 -
Set contentType application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml on part /xl/styles.xml
14-May-2015 11:42:31, 515 DEBUG XWorkMethodAccessor:84 - Error calling method through OGNL: object: [xxx.xxxxxxxxx.view.ExportDataActionXLSX4J@20351b5b] method: [ExportDataXLSX4J] args: [[]]
java.lang.NoSuchMethodError: org.xlsx4j.sml.ObjectFactory.createCTFontFamily()Lorg/xlsx4j/sml/CTFontFamily;
This is with docx4j-MOXy-JAXBContext-3.0.0.jar plugin, which suppose to sue Moxy, still having the same issue......
- Code: Select all
14-May-2015 12:29:16, 868 DEBUG Base:114 -
Set contentType application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml on part /
14-May-2015 12:29:16, 902 INFO Part:150 - /xl/workbook.xml
14-May-2015 12:29:17, 924 INFO NamespacePrefixMapperUtils:55 - Using NamespacePrefixMapperSunInternal, which is suitable for Java 6
14-May-2015 12:29:17, 924 INFO Context:59 - Using Java 6/7 JAXB implementation
14-May-2015 12:29:17, 925 INFO Context:76 - loading Context jc
14-May-2015 12:29:23, 728 INFO Context:84 - loaded org.eclipse.persistence.jaxb.JAXBContext .. loading others ..
14-May-2015 12:29:24, 983 INFO Context:99 - .. others loaded ..
14-May-2015 12:29:24, 989 INFO Context:54 - Using Java 6/7 JAXB implementation
14-May-2015 12:29:24, 990 INFO Context:71 - loading Context jcSML
14-May-2015 12:29:26, 798 INFO Context:73 - .. loaded ..
14-May-2015 12:29:26, 798 DEBUG Base:114 -
Set contentType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml on part /xl/workbook.xml
14-May-2015 12:29:26, 815 INFO Part:150 - /_rels/.rels
14-May-2015 12:29:26, 816 DEBUG Base:114 -
Set contentType application/vnd.openxmlformats-package.relationships+xml on part /_rels/.rels
14-May-2015 12:29:26, 816 DEBUG Part:185 - setPackage called for org.docx4j.openpackaging.parts.relationships.RelationshipsPart
14-May-2015 12:29:26, 816 DEBUG Part:185 - setPackage called for org.docx4j.openpackaging.parts.relationships.RelationshipsPart
14-May-2015 12:29:26, 817 DEBUG ContentTypeManager:567 - Registered rels
14-May-2015 12:29:26, 817 INFO RelationshipsPart:429 - adding part with proposed name: /xl/workbook.xml
14-May-2015 12:29:26, 817 DEBUG RelationshipsPart:471 - Relativising target /xl/workbook.xml against source /
14-May-2015 12:29:26, 818 DEBUG RelationshipsPart:490 - Result xl/workbook.xml
14-May-2015 12:29:26, 818 DEBUG RelationshipsPart:376 - Loading part /xl/workbook.xml
14-May-2015 12:29:26, 818 DEBUG Part:185 - setPackage called for org.docx4j.openpackaging.parts.SpreadsheetML.WorkbookPart
14-May-2015 12:29:26, 818 INFO PresentationMLPackage:122 - Set shortcut for WorkbookPart
14-May-2015 12:29:26, 819 INFO Base:268 - shortcut was set
14-May-2015 12:29:26, 819 INFO Part:150 - /xl/styles.xml
14-May-2015 12:29:26, 819 DEBUG Base:114 -
Set contentType application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml on part /xl/styles.xml
14-May-2015 12:29:26, 829 DEBUG XWorkMethodAccessor:84 - Error calling method through OGNL: object: [xxx.xxxxxxxxx.view.ExportDataActionXLSX4J@40acf413] method: [ExportDataXLSX4J] args: [[]]
java.lang.NoSuchMethodError: org.xlsx4j.sml.ObjectFactory.createCTFontFamily()Lorg/xlsx4j/sml/CTFontFamily;
I have tried to run it locally with Java 1.8_25, no issue at all, this is the part where I hit the jackpot in Glassfish4
- Code: Select all
ctfontFamily = Context.getsmlObjectFactory().createCTFontFamily();
and
- Code: Select all
sheet = spreadsheetMLPackage.createWorksheetPart( new PartName( "/xl/worksheets/sheet1.xml" ), "Sheet1", 1 );
ws = ( Worksheet )sheet.getContents();