I run XWiki in a Docker setup (latest 13 image) with
- JAVA_OPTS="-Djava.awt.headless=true -XX:+UseParallelGC -XX:MaxGCPauseMillis=100"
The Wiki runs well now but I get some errors now:
2021-01-29 08:54:07,360 [XWiki Solr index thread] ERROR o.x.s.s.i.DefaultSolrIndexer - Failed to process entry [INDEX winkelswiki:IoT and Make.Sensors.BME280.WebHome]
java.lang.NoClassDefFoundError: Could not initialize class org.apache.pdfbox.pdmodel.PDDocument
at org.apache.tika.parser.pdf.PDFParser.getPDDocument(PDFParser.java:189)
at org.apache.tika.parser.pdf.PDFParser.parse(PDFParser.java:148)
at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:143)
at org.apache.tika.Tika.parseToString(Tika.java:527)
at org.xwiki.tika.internal.TikaUtils.parseToString(TikaUtils.java:153)
at org.xwiki.search.solr.internal.metadata.AbstractSolrMetadataExtractor.getContentAsText(AbstractSolrMetadataExtractor.java:509)
at org.xwiki.search.solr.internal.metadata.DocumentSolrMetadataExtractor.setAttachment(DocumentSolrMetadataExtractor.java:281)
at org.xwiki.search.solr.internal.metadata.DocumentSolrMetadataExtractor.setAttachments(DocumentSolrMetadataExtractor.java:261)
at org.xwiki.search.solr.internal.metadata.DocumentSolrMetadataExtractor.setExtras(DocumentSolrMetadataExtractor.java:187)
at org.xwiki.search.solr.internal.metadata.DocumentSolrMetadataExtractor.setFieldsInternal(DocumentSolrMetadataExtractor.java:135)
at org.xwiki.search.solr.internal.metadata.AbstractSolrMetadataExtractor.getSolrDocument(AbstractSolrMetadataExtractor.java:133)
at org.xwiki.search.solr.internal.DefaultSolrIndexer.getSolrDocument(DefaultSolrIndexer.java:499)
at org.xwiki.search.solr.internal.DefaultSolrIndexer.processBatch(DefaultSolrIndexer.java:408)
at org.xwiki.search.solr.internal.DefaultSolrIndexer.run(DefaultSolrIndexer.java:376)
at java.base/java.lang.Thread.run(Thread.java:834)
I don’t know from where the problem comes from but it isn’t for PDF attachments only:
2021-01-28 22:33:07,481 [XWiki Solr index thread] ERROR o.x.s.s.i.DefaultSolrIndexer - Failed to process entry [INDEX xwiki:XWiki.XWikiUserSheet]
java.lang.NoClassDefFoundError: Could not initialize class javax.imageio.ImageIO
at org.apache.tika.parser.image.ImageParser.parse(ImageParser.java:177)
at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:143)
at org.apache.tika.Tika.parseToString(Tika.java:527)
at org.xwiki.tika.internal.TikaUtils.parseToString(TikaUtils.java:153)
at org.xwiki.search.solr.internal.metadata.AbstractSolrMetadataExtractor.getContentAsText(AbstractSolrMetadataExtractor.java:509)
at org.xwiki.search.solr.internal.metadata.DocumentSolrMetadataExtractor.setAttachment(DocumentSolrMetadataExtractor.java:281)
at org.xwiki.search.solr.internal.metadata.DocumentSolrMetadataExtractor.setAttachments(DocumentSolrMetadataExtractor.java:261)
at org.xwiki.search.solr.internal.metadata.DocumentSolrMetadataExtractor.setExtras(DocumentSolrMetadataExtractor.java:187)
at org.xwiki.search.solr.internal.metadata.DocumentSolrMetadataExtractor.setFieldsInternal(DocumentSolrMetadataExtractor.java:135)
at org.xwiki.search.solr.internal.metadata.AbstractSolrMetadataExtractor.getSolrDocument(AbstractSolrMetadataExtractor.java:133)
at org.xwiki.search.solr.internal.DefaultSolrIndexer.getSolrDocument(DefaultSolrIndexer.java:499)
at org.xwiki.search.solr.internal.DefaultSolrIndexer.processBatch(DefaultSolrIndexer.java:408)
at org.xwiki.search.solr.internal.DefaultSolrIndexer.run(DefaultSolrIndexer.java:376)
at java.base/java.lang.Thread.run(Thread.java:834)
Is a bit strange. One attachment worked, the second one not.
Is there any hint to help here?
It’s strange since this kind of error usually means that java is not running in headless mode but according to your first message it seems to be the case.
For this one a possibility is java.lang.NoClassDefFoundError: Could not initialize class org.apache.pdfbox.pdmodel.font.PDFont - Stack Overflow since I see that indeed on XWiki 12.10.3 while pdfbox and fontbox are in sync (2.0.21) it’s not the case of jempbox (1.8.16). But we have plenty of tests with pdf files, so it does not seem to be an all or nothing bug if that’s the cause. In any case would be great if you could create an issue on https://jira.xwiki.org with a maximum of details to reproduce it (I guess you cannot share the pdf file with which you reproduce ?)
Hi,
It’s the newest XWiki 13 Docker image for Linux
I had changed the command line later on to work in a headless mode, means I didn’t had that from beginning. Could be that something was used before the change that
Nevertheless I build the docker container new but face these errors popping up.
I’ve just started my container new and these are some errors:
2021-01-29 10:35:43,213 [XWiki Solr index thread] ERROR o.x.s.s.i.DefaultSolrIndexer - Failed to process entry [INDEX heikeswiki:AppWithinMinutes.ClassEditSheet]
java.lang.UnsatisfiedLinkError: /opt/java/openjdk/lib/libawt_xawt.so: libXtst.so.6: cannot open shared object file: No such file or directory
at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2442)
at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2498)
at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2627)
at java.base/java.lang.Runtime.load0(Runtime.java:768)
at java.base/java.lang.System.load(System.java:1837)
at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2442)
at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2498)
at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2648)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
at java.base/java.lang.System.loadLibrary(System.java:1873)
at java.desktop/java.awt.Toolkit$3.run(Toolkit.java:1395)
at java.desktop/java.awt.Toolkit$3.run(Toolkit.java:1393)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.desktop/java.awt.Toolkit.loadLibraries(Toolkit.java:1392)
at java.desktop/java.awt.Toolkit.(Toolkit.java:1425)
at java.desktop/sun.awt.AppContext$2.run(AppContext.java:282)
at java.desktop/sun.awt.AppContext$2.run(AppContext.java:271)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.desktop/sun.awt.AppContext.initMainAppContext(AppContext.java:271)
at java.desktop/sun.awt.AppContext$3.run(AppContext.java:326)
at java.desktop/sun.awt.AppContext$3.run(AppContext.java:309)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.desktop/sun.awt.AppContext.getAppContext(AppContext.java:308)
at java.desktop/javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:129)
at java.desktop/javax.imageio.ImageIO.(ImageIO.java:66)
at org.apache.tika.parser.image.ImageParser.parse(ImageParser.java:177)
at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:143)
at org.apache.tika.Tika.parseToString(Tika.java:527)
at org.xwiki.tika.internal.TikaUtils.parseToString(TikaUtils.java:153)
at org.xwiki.search.solr.internal.metadata.AbstractSolrMetadataExtractor.getContentAsText(AbstractSolrMetadataExtractor.java:509)
at org.xwiki.search.solr.internal.metadata.DocumentSolrMetadataExtractor.setAttachment(DocumentSolrMetadataExtractor.java:281)
at org.xwiki.search.solr.internal.metadata.DocumentSolrMetadataExtractor.setAttachments(DocumentSolrMetadataExtractor.java:261)
at org.xwiki.search.solr.internal.metadata.DocumentSolrMetadataExtractor.setExtras(DocumentSolrMetadataExtractor.java:187)
at org.xwiki.search.solr.internal.metadata.DocumentSolrMetadataExtractor.setFieldsInternal(DocumentSolrMetadataExtractor.java:135)
at org.xwiki.search.solr.internal.metadata.AbstractSolrMetadataExtractor.getSolrDocument(AbstractSolrMetadataExtractor.java:133)
at org.xwiki.search.solr.internal.DefaultSolrIndexer.getSolrDocument(DefaultSolrIndexer.java:499)
at org.xwiki.search.solr.internal.DefaultSolrIndexer.processBatch(DefaultSolrIndexer.java:408)
at org.xwiki.search.solr.internal.DefaultSolrIndexer.run(DefaultSolrIndexer.java:376)
at java.base/java.lang.Thread.run(Thread.java:834)
2021-01-29 10:35:43,236 [XWiki Solr index thread] ERROR o.x.s.s.i.DefaultSolrIndexer - Failed to process entry [INDEX Attachment heikeswiki:AppWithinMinutes.ClassEditSheet@arrow-move.png]
java.lang.NoClassDefFoundError: Could not initialize class javax.imageio.ImageIO
at org.apache.tika.parser.image.ImageParser.parse(ImageParser.java:177)
at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:143)
at org.apache.tika.Tika.parseToString(Tika.java:527)
at org.xwiki.tika.internal.TikaUtils.parseToString(TikaUtils.java:153)
at org.xwiki.search.solr.internal.metadata.AbstractSolrMetadataExtractor.getContentAsText(AbstractSolrMetadataExtractor.java:509)
at org.xwiki.search.solr.internal.metadata.AttachmentSolrMetadataExtractor.setLocaleAndContentFields(AttachmentSolrMetadataExtractor.java:111)
at org.xwiki.search.solr.internal.metadata.AttachmentSolrMetadataExtractor.setFieldsInternal(AttachmentSolrMetadataExtractor.java:93)
at org.xwiki.search.solr.internal.metadata.AbstractSolrMetadataExtractor.getSolrDocument(AbstractSolrMetadataExtractor.java:133)
at org.xwiki.search.solr.internal.DefaultSolrIndexer.getSolrDocument(DefaultSolrIndexer.java:499)
at org.xwiki.search.solr.internal.DefaultSolrIndexer.processBatch(DefaultSolrIndexer.java:408)
at org.xwiki.search.solr.internal.DefaultSolrIndexer.run(DefaultSolrIndexer.java:376)
at java.base/java.lang.Thread.run(Thread.java:834)
2021-01-29 10:35:43,255 [XWiki Solr index thread] ERROR o.x.s.s.i.DefaultSolrIndexer - Failed to process entry [INDEX Attachment heikeswiki:AppWithinMinutes.ClassEditSheet@bulletcross.png]
java.lang.NoClassDefFoundError: Could not initialize class javax.imageio.ImageIO
at org.apache.tika.parser.image.ImageParser.parse(ImageParser.java:177)
at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:143)
at org.apache.tika.Tika.parseToString(Tika.java:527)
at org.xwiki.tika.internal.TikaUtils.parseToString(TikaUtils.java:153)
at org.xwiki.search.solr.internal.metadata.AbstractSolrMetadataExtractor.getContentAsText(AbstractSolrMetadataExtractor.java:509)
at org.xwiki.search.solr.internal.metadata.AttachmentSolrMetadataExtractor.setLocaleAndContentFields(AttachmentSolrMetadataExtractor.java:111)
at org.xwiki.search.solr.internal.metadata.AttachmentSolrMetadataExtractor.setFieldsInternal(AttachmentSolrMetadataExtractor.java:93)
at org.xwiki.search.solr.internal.metadata.AbstractSolrMetadataExtractor.getSolrDocument(AbstractSolrMetadataExtractor.java:133)
at org.xwiki.search.solr.internal.DefaultSolrIndexer.getSolrDocument(DefaultSolrIndexer.java:499)
at org.xwiki.search.solr.internal.DefaultSolrIndexer.processBatch(DefaultSolrIndexer.java:408)
at org.xwiki.search.solr.internal.DefaultSolrIndexer.run(DefaultSolrIndexer.java:376)
at java.base/java.lang.Thread.run(Thread.java:834)
What could I do now? Go back from a headless state?
You should definitely use headless mode. For the rest I don’t know much about the docker image, so it’s possible there is some specific problem but not sure where to start.
On my side I will definitely fix the inconsistency between pdfbox and jempbox just in case (and because it makes a lot of sense for them to be in sync anyway) but that probably not going to have any impact on the “Could not initialize class javax.imageio.ImageIO” error.
As I have to be productive I had no chance to investigate further on what the problem really is or even how to fix.
But a return from headless mode starts the XWiki at least and I can see the attachments.
When I have a bit more time and a downtime than I will look if a new implementation helps (hopefully the backup strategy works).