Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#21995 closed defect (fixed)

Plugin build error - exception in javac

Reported by: stoecker Owned by: team
Priority: normal Milestone:
Component: Plugin Version:
Keywords: Cc: Don-vip, taylor.smock

Description

Build plugins fails for at least 2 plugins with following error:

    [javac] An exception has occurred in the compiler ((version info not available)). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you.
    [javac] java.lang.ArrayIndexOutOfBoundsException: 9
    [javac] 	at com.sun.nio.zipfs.ZipConstants.SH(ZipConstants.java:192)
    [javac] 	at com.sun.nio.zipfs.ZipConstants.LG(ZipConstants.java:196)
    [javac] 	at com.sun.nio.zipfs.ZipFileSystem$Entry.readExtra(ZipFileSystem.java:2358)
    [javac] 	at com.sun.nio.zipfs.ZipFileSystem$Entry.cen(ZipFileSystem.java:1959)
    [javac] 	at com.sun.nio.zipfs.ZipFileSystem$Entry.readCEN(ZipFileSystem.java:1927)
    [javac] 	at com.sun.nio.zipfs.ZipFileSystem.getEntry0(ZipFileSystem.java:1375)
    [javac] 	at com.sun.nio.zipfs.ZipFileSystem.getFileAttributes(ZipFileSystem.java:325)
    [javac] 	at com.sun.nio.zipfs.ZipPath.getAttributes(ZipPath.java:723)
    [javac] 	at com.sun.nio.zipfs.ZipFileSystemProvider.readAttributes(ZipFileSystemProvider.java:294)
    [javac] 	at java.nio.file.Files.readAttributes(Files.java:1737)
    [javac] 	at java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:219)
    [javac] 	at java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:276)
    [javac] 	at java.nio.file.FileTreeWalker.next(FileTreeWalker.java:372)
    [javac] 	at java.nio.file.Files.walkFileTree(Files.java:2706)

Any idea how to fix this? Doesn't happen on my system with newer java, only with 1.8.

Attachments (1)

duplicate_class_check.py (3.0 KB ) - added by taylor.smock 3 years ago.
Quick script to find duplicate files in jar files

Download all attachments as: .zip

Change History (16)

comment:1 by GerdP, 3 years ago

Please name the failed plugins.

in reply to:  1 comment:2 by taylor.smock, 3 years ago

Replying to GerdP:

Please name the failed plugins.

ImportImagePlugin appears to be one. I don't know about the other. Microsoft Streetside failed in JDK11, but that appears to be an ivy configuration issue, so I don't think stoecker was referring to that one.

I saw this late Thursday and started a build in a Java 8 docker image just to see if it was environment specific. I'll be able to check it once I get in to work on Monday.

EDIT: Fun thing is that it looks like we haven't really touched that plugin in years (last non-i18n update was 2019). I just reproduced with ImportImagePlugin in Adoptium 8u312 and 8u322. We did touch build-common.xml in r35923/osm, but that shouldn't be the problem.

Last edited 3 years ago by taylor.smock (previous) (diff)

comment:3 by GerdP, 3 years ago

OK, I can also reproduce it, but I've no idea where to fix that.

comment:4 by stoecker, 3 years ago

At least OsmInspectorPlugin as well. See Jenkins plugins build for JDK8, there ImportImagePlugin fails.

I found one comment in the net where somebody said he fixed the issue (or a similar one) by removing double files in the build/jar.

I tested by reverting the dist files of the referenced plugins which I updated, but that did not help.

I also tested with jdk 1.8.0_222 on openSUSE: same error.

comment:5 by taylor.smock, 3 years ago

First bad commit: r35900/osm

Best guess: Something to do with the geotools update is breaking the Java 8 build. I'll see if I can figure it out.

Note: OsmInspector also depends upon geotools.

EDIT: geotools doesn't appear to have duplicate entries (unzip -l ../../dist/geotools.jar | awk '{print $4}' | sort | uniq -c | grep -v '1'). I checked all the other jar files, and they didn't have duplicate file entries (except for lwjgl).

Last edited 3 years ago by taylor.smock (previous) (diff)

comment:6 by taylor.smock, 3 years ago

From a quickie script to see if there are duplicate classes, here is the current state:

MicrosoftStreetside.jar log4j.jar {'org/apache/log4j/rewrite/RewritePolicy.class', 'org/apache/log4j/WriterAppender.class', 'org/apache/log4j/ConsoleAppender.class', 'org/apache/log4j/PropertyConfigurator.class', 'org/apache/log4j/xml/DOMConfigurator.class', 'org/apache/log4j/xml/Log4jEntityResolver.class', 'org/apache/log4j/spi/LoggerFactory.class', 'org/apache/log4j/PatternLayout.class', 'org/apache/log4j/MDC.class', 'org/apache/log4j/rewrite/PropertyRewritePolicy.class', 'org/apache/log4j/config/PropertySetterException.class', 'org/apache/log4j/LogManager.class', 'org/apache/log4j/spi/LoggerRepository.class', 'org/apache/log4j/or/ObjectRenderer.class', 'org/apache/log4j/helpers/AppenderAttachableImpl.class', 'org/apache/log4j/BasicConfigurator.class', 'org/apache/log4j/config/PropertySetter.class', 'org/apache/log4j/Layout.class', 'org/apache/log4j/NDC.class', 'org/apache/log4j/spi/RepositorySelector.class', 'org/apache/log4j/spi/Filter.class', 'org/apache/log4j/Level.class', 'org/apache/log4j/Priority.class', 'org/apache/log4j/SimpleLayout.class', 'org/apache/log4j/xml/log4j.dtd', 'org/apache/log4j/helpers/QuietWriter.class', 'org/apache/log4j/Category.class', 'org/apache/log4j/Logger.class', 'org/apache/log4j/spi/OptionHandler.class', 'org/apache/log4j/or/jms/MessageRenderer.class', 'org/apache/log4j/spi/AppenderAttachable.class', 'org/apache/log4j/Appender.class', 'org/apache/log4j/spi/HierarchyEventListener.class', 'org/apache/log4j/spi/ErrorHandler.class', 'org/apache/log4j/spi/ThrowableInformation.class', 'org/apache/log4j/spi/LocationInfo.class', 'org/apache/log4j/helpers/NullEnumeration.class', 'org/apache/log4j/spi/ErrorCode.class', 'org/apache/log4j/helpers/OptionConverter.class', 'org/apache/log4j/spi/LoggingEvent.class', 'org/apache/log4j/rewrite/MapRewritePolicy.class', 'org/apache/log4j/or/ThreadGroupRenderer.class', 'org/apache/log4j/AppenderSkeleton.class', 'org/apache/log4j/xml/UnrecognizedElementHandler.class', 'org/apache/log4j/spi/Configurator.class'}
MicrosoftStreetside.jar geotools.jar {'com/fasterxml/jackson/core/JsonGenerator$1.class', 'com/fasterxml/jackson/core/util/JsonParserSequence.class', 'com/fasterxml/jackson/core/type/TypeReference.class', 'com/fasterxml/jackson/core/util/RequestPayload.class', 'com/fasterxml/jackson/core/util/InternCache.class', 'com/fasterxml/jackson/core/json/JsonReadContext.class', 'com/fasterxml/jackson/core/format/InputAccessor$Std.class', 'com/fasterxml/jackson/core/TSFBuilder.class', 'com/fasterxml/jackson/core/JsonParser.class', 'com/fasterxml/jackson/core/async/ByteArrayFeeder.class', 'com/fasterxml/jackson/core/io/CharTypes$AltEscapes.class', 'com/fasterxml/jackson/core/json/UTF8JsonGenerator.class', 'com/fasterxml/jackson/core/util/Instantiatable.class', 'com/fasterxml/jackson/core/util/DefaultPrettyPrinter.class', 'com/fasterxml/jackson/core/sym/ByteQuadsCanonicalizer$TableInfo.class', 'com/fasterxml/jackson/core/io/JsonEOFException.class', 'com/fasterxml/jackson/core/JsonLocation.class', 'com/fasterxml/jackson/core/io/CharacterEscapes.class', 'com/fasterxml/jackson/core/sym/Name2.class', 'com/fasterxml/jackson/core/io/DataOutputAsStream.class', 'com/fasterxml/jackson/core/io/NumberOutput.class', 'com/fasterxml/jackson/core/async/NonBlockingInputFeeder.class', 'com/fasterxml/jackson/core/JsonGenerator.class', 'com/fasterxml/jackson/core/json/JsonReadFeature.class', 'com/fasterxml/jackson/core/filter/FilteringParserDelegate.class', 'com/fasterxml/jackson/core/util/ThreadLocalBufferManager$ThreadLocalBufferManagerHolder.class', 'com/fasterxml/jackson/core/util/DefaultIndenter.class', 'com/fasterxml/jackson/core/sym/ByteQuadsCanonicalizer.class', 'com/fasterxml/jackson/core/Version.class', 'com/fasterxml/jackson/core/filter/TokenFilterContext.class', 'com/fasterxml/jackson/core/json/JsonGeneratorImpl.class', 'com/fasterxml/jackson/core/sym/Name1.class', 'com/fasterxml/jackson/core/json/PackageVersion.class', 'com/fasterxml/jackson/core/type/WritableTypeId.class', 'com/fasterxml/jackson/core/format/InputAccessor.class', 'com/fasterxml/jackson/core/JsonFactory$Feature.class', 'com/fasterxml/jackson/core/io/UTF32Reader.class', 'com/fasterxml/jackson/core/util/MinimalPrettyPrinter.class', 'com/fasterxml/jackson/core/json/JsonWriteContext.class', 'com/fasterxml/jackson/core/json/JsonWriteFeature.class', 'com/fasterxml/jackson/core/base/ParserMinimalBase.class', 'com/fasterxml/jackson/core/JsonParser$NumberType.class', 'com/fasterxml/jackson/core/io/CharTypes.class', 'com/fasterxml/jackson/core/json/ReaderBasedJsonParser.class', 'com/fasterxml/jackson/core/TreeCodec.class', 'com/fasterxml/jackson/core/io/InputDecorator.class', 'com/fasterxml/jackson/core/util/Separators.class', 'com/fasterxml/jackson/core/exc/StreamReadException.class', 'com/fasterxml/jackson/core/TreeNode.class', 'com/fasterxml/jackson/core/util/TextBuffer.class', 'com/fasterxml/jackson/core/io/SerializedString.class', 'com/fasterxml/jackson/core/json/UTF8DataInputJsonParser.class', 'com/fasterxml/jackson/core/sym/Name3.class', 'com/fasterxml/jackson/core/JsonParser$Feature.class', 'com/fasterxml/jackson/core/sym/Name.class', 'com/fasterxml/jackson/core/exc/InputCoercionException.class', 'com/fasterxml/jackson/core/filter/FilteringGeneratorDelegate.class', 'com/fasterxml/jackson/core/json/UTF8StreamJsonParser.class', 'com/fasterxml/jackson/core/sym/CharsToNameCanonicalizer.class', 'com/fasterxml/jackson/core/util/VersionUtil.class', 'com/fasterxml/jackson/core/io/MergedStream.class', 'com/fasterxml/jackson/core/json/DupDetector.class', 'com/fasterxml/jackson/core/JsonPointer.class', 'com/fasterxml/jackson/core/JsonGenerationException.class', 'com/fasterxml/jackson/core/sym/CharsToNameCanonicalizer$TableInfo.class', 'com/fasterxml/jackson/core/JsonFactory.class', 'com/fasterxml/jackson/core/format/DataFormatMatcher.class', 'com/fasterxml/jackson/core/type/WritableTypeId$Inclusion.class', 'com/fasterxml/jackson/core/util/DefaultPrettyPrinter$FixedSpaceIndenter.class', 'com/fasterxml/jackson/core/JsonToken.class', 'com/fasterxml/jackson/core/JsonParseException.class', 'com/fasterxml/jackson/core/io/IOContext.class', 'com/fasterxml/jackson/core/JsonProcessingException.class', 'com/fasterxml/jackson/core/format/DataFormatDetector.class', 'com/fasterxml/jackson/core/io/UTF8Writer.class', 'com/fasterxml/jackson/core/io/OutputDecorator.class', 'com/fasterxml/jackson/core/json/ByteSourceJsonBootstrapper.class', 'com/fasterxml/jackson/core/PrettyPrinter.class', 'META-INF/services/com.fasterxml.jackson.core.JsonFactory', 'com/fasterxml/jackson/core/TokenStreamFactory.class', 'com/fasterxml/jackson/core/util/ThreadLocalBufferManager.class', 'com/fasterxml/jackson/core/filter/JsonPointerBasedFilter.class', 'com/fasterxml/jackson/core/FormatFeature.class', 'com/fasterxml/jackson/core/JsonFactoryBuilder.class', 'com/fasterxml/jackson/core/util/ByteArrayBuilder.class', 'com/fasterxml/jackson/core/Base64Variant.class', 'com/fasterxml/jackson/core/sym/NameN.class', 'com/fasterxml/jackson/core/type/ResolvedType.class', 'com/fasterxml/jackson/core/JsonGenerator$Feature.class', 'com/fasterxml/jackson/core/JsonEncoding.class', 'com/fasterxml/jackson/core/FormatSchema.class', 'com/fasterxml/jackson/core/util/DefaultPrettyPrinter$Indenter.class', 'com/fasterxml/jackson/core/io/NumberInput.class', 'com/fasterxml/jackson/core/json/async/NonBlockingJsonParser.class', 'com/fasterxml/jackson/core/base/GeneratorBase.class', 'com/fasterxml/jackson/core/async/ByteBufferFeeder.class', 'com/fasterxml/jackson/core/StreamWriteFeature.class', 'com/fasterxml/jackson/core/json/WriterBasedJsonGenerator.class', 'com/fasterxml/jackson/core/Versioned.class', 'com/fasterxml/jackson/core/util/BufferRecycler.class', 'com/fasterxml/jackson/core/sym/CharsToNameCanonicalizer$Bucket.class', 'com/fasterxml/jackson/core/base/ParserBase.class', 'com/fasterxml/jackson/core/format/MatchStrength.class', 'com/fasterxml/jackson/core/util/JsonGeneratorDelegate.class', 'com/fasterxml/jackson/core/io/JsonStringEncoder.class', 'com/fasterxml/jackson/core/JsonStreamContext.class', 'com/fasterxml/jackson/core/io/SegmentedStringWriter.class', 'com/fasterxml/jackson/core/Base64Variants.class', 'com/fasterxml/jackson/core/StreamReadFeature.class', 'com/fasterxml/jackson/core/util/DefaultPrettyPrinter$NopIndenter.class', 'com/fasterxml/jackson/core/util/BufferRecyclers.class', 'com/fasterxml/jackson/core/filter/TokenFilter.class', 'com/fasterxml/jackson/core/json/async/NonBlockingJsonParserBase.class', 'com/fasterxml/jackson/core/SerializableString.class', 'com/fasterxml/jackson/core/JsonTokenId.class', 'com/fasterxml/jackson/core/JsonpCharacterEscapes.class', 'com/fasterxml/jackson/core/util/JsonParserDelegate.class', 'com/fasterxml/jackson/core/ObjectCodec.class'}
apache-commons.jar pdfimport.jar {'org/apache/commons/logging/LogConfigurationException.class', 'org/apache/commons/logging/impl/LogKitLogger.class', 'org/apache/commons/logging/Log.class', 'org/apache/commons/logging/impl/SimpleLog$1.class', 'org/apache/commons/logging/LogFactory$2.class', 'org/apache/commons/logging/LogFactory$1.class', 'org/apache/commons/logging/impl/WeakHashtable$Referenced.class', 'org/apache/commons/logging/LogFactory$5.class', 'org/apache/commons/logging/LogSource.class', 'org/apache/commons/logging/LogFactory.class', 'org/apache/commons/logging/impl/WeakHashtable$1.class', 'org/apache/commons/logging/impl/SimpleLog.class', 'org/apache/commons/logging/impl/WeakHashtable$WeakKey.class', 'org/apache/commons/logging/impl/LogFactoryImpl$2.class', 'org/apache/commons/logging/LogFactory$6.class', 'org/apache/commons/logging/impl/WeakHashtable.class', 'org/apache/commons/logging/impl/LogFactoryImpl$3.class', 'org/apache/commons/logging/impl/WeakHashtable$Entry.class', 'org/apache/commons/logging/LogFactory$3.class', 'org/apache/commons/logging/impl/LogFactoryImpl.class', 'org/apache/commons/logging/impl/NoOpLog.class', 'org/apache/commons/logging/LogFactory$4.class', 'org/apache/commons/logging/impl/AvalonLogger.class', 'org/apache/commons/logging/impl/Jdk13LumberjackLogger.class', 'org/apache/commons/logging/impl/LogFactoryImpl$1.class', 'org/apache/commons/logging/impl/ServletContextCleaner.class', 'org/apache/commons/logging/impl/Log4JLogger.class', 'org/apache/commons/logging/impl/Jdk14Logger.class'}
apache-http.jar pdfimport.jar {'org/apache/commons/logging/LogConfigurationException.class', 'org/apache/commons/logging/impl/LogKitLogger.class', 'org/apache/commons/logging/Log.class', 'org/apache/commons/logging/impl/SimpleLog$1.class', 'org/apache/commons/logging/LogFactory$2.class', 'org/apache/commons/logging/LogFactory$1.class', 'org/apache/commons/logging/impl/WeakHashtable$Referenced.class', 'org/apache/commons/logging/LogFactory$5.class', 'org/apache/commons/logging/LogSource.class', 'org/apache/commons/logging/LogFactory.class', 'org/apache/commons/logging/impl/WeakHashtable$1.class', 'org/apache/commons/logging/impl/SimpleLog.class', 'org/apache/commons/logging/impl/WeakHashtable$WeakKey.class', 'org/apache/commons/logging/impl/LogFactoryImpl$2.class', 'org/apache/commons/logging/LogFactory$6.class', 'org/apache/commons/logging/impl/WeakHashtable.class', 'org/apache/commons/logging/impl/LogFactoryImpl$3.class', 'org/apache/commons/logging/impl/WeakHashtable$Entry.class', 'org/apache/commons/logging/LogFactory$3.class', 'org/apache/commons/logging/impl/LogFactoryImpl.class', 'org/apache/commons/logging/impl/NoOpLog.class', 'org/apache/commons/logging/LogFactory$4.class', 'org/apache/commons/logging/impl/AvalonLogger.class', 'org/apache/commons/logging/impl/Jdk13LumberjackLogger.class', 'org/apache/commons/logging/impl/LogFactoryImpl$1.class', 'org/apache/commons/logging/impl/ServletContextCleaner.class', 'org/apache/commons/logging/impl/Log4JLogger.class', 'org/apache/commons/logging/impl/Jdk14Logger.class'}
apache-commons.jar apache-http.jar {'org/apache/commons/logging/LogConfigurationException.class', 'org/apache/commons/logging/Log.class', 'org/apache/commons/logging/impl/LogKitLogger.class', 'META-INF/NOTICE.txt', 'org/apache/commons/logging/impl/SimpleLog$1.class', 'org/apache/commons/logging/LogFactory$2.class', 'org/apache/commons/logging/LogFactory$1.class', 'org/apache/commons/logging/impl/WeakHashtable$Referenced.class', 'org/apache/commons/logging/LogSource.class', 'org/apache/commons/logging/LogFactory$5.class', 'org/apache/commons/logging/LogFactory.class', 'org/apache/commons/logging/impl/WeakHashtable$1.class', 'org/apache/commons/logging/impl/SimpleLog.class', 'org/apache/commons/logging/impl/WeakHashtable$WeakKey.class', 'org/apache/commons/logging/impl/LogFactoryImpl$2.class', 'org/apache/commons/logging/LogFactory$6.class', 'org/apache/commons/logging/impl/WeakHashtable.class', 'org/apache/commons/logging/impl/LogFactoryImpl$3.class', 'org/apache/commons/logging/impl/WeakHashtable$Entry.class', 'org/apache/commons/logging/LogFactory$3.class', 'org/apache/commons/logging/impl/LogFactoryImpl.class', 'org/apache/commons/logging/impl/NoOpLog.class', 'org/apache/commons/logging/LogFactory$4.class', 'org/apache/commons/logging/impl/AvalonLogger.class', 'org/apache/commons/logging/impl/Jdk13LumberjackLogger.class', 'org/apache/commons/logging/impl/LogFactoryImpl$1.class', 'org/apache/commons/logging/impl/ServletContextCleaner.class', 'org/apache/commons/logging/impl/Log4JLogger.class', 'org/apache/commons/logging/impl/Jdk14Logger.class'}
geotools.jar jaxb.jar {'javax/activation/MimetypesFileTypeMap$1.class', 'javax/activation/DataContentHandlerFactory.class', 'javax/activation/MailcapCommandMap$1.class', 'javax/activation/DataSource.class', 'javax/activation/URLDataSource.class', 'javax/activation/MimeType.class', 'javax/activation/SecuritySupport$2.class', 'javax/activation/DataSourceDataContentHandler.class', 'javax/activation/FileTypeMap.class', 'javax/activation/CommandInfo$Beans$1.class', 'javax/activation/DataHandler$1.class', 'javax/activation/FileDataSource.class', 'javax/activation/ActivationDataFlavor.class', 'javax/activation/MimetypesFileTypeMap.class', 'javax/activation/MimeTypeParameterList.class', 'javax/activation/ObjectDataContentHandler.class', 'javax/activation/MimeTypeParseException.class', 'javax/activation/UnsupportedDataTypeException.class', 'javax/activation/DataHandler.class', 'javax/activation/MailcapCommandMap.class', 'javax/activation/SecuritySupport$3.class', 'javax/activation/SecuritySupport$1.class', 'javax/activation/DataHandlerDataSource.class', 'javax/activation/CommandObject.class', 'javax/activation/CommandInfo.class', 'javax/activation/CommandMap.class', 'javax/activation/CommandInfo$Beans.class', 'javax/activation/SecuritySupport.class', 'javax/activation/SecuritySupport$5.class', 'javax/activation/SecuritySupport$4.class', 'javax/activation/DataContentHandler.class'}
apache-http.jar geotools.jar {'org/slf4j/ILoggerFactory.class', 'org/slf4j/helpers/FormattingTuple.class', 'org/slf4j/Marker.class', 'org/slf4j/helpers/SubstituteLoggerFactory.class', 'org/slf4j/helpers/Util.class', 'org/slf4j/helpers/NOPLoggerFactory.class', 'org/slf4j/spi/MDCAdapter.class', 'org/slf4j/spi/LocationAwareLogger.class', 'org/slf4j/spi/MarkerFactoryBinder.class', 'org/slf4j/helpers/BasicMDCAdapter.class', 'org/slf4j/helpers/NamedLoggerBase.class', 'org/slf4j/MarkerFactory.class', 'org/slf4j/helpers/BasicMarkerFactory.class', 'org/slf4j/helpers/NOPMDCAdapter.class', 'org/slf4j/Logger.class', 'org/slf4j/helpers/MessageFormatter.class', 'org/slf4j/IMarkerFactory.class', 'org/slf4j/helpers/SubstituteLogger.class', 'org/slf4j/helpers/BasicMarker.class', 'org/slf4j/helpers/NOPLogger.class', 'org/slf4j/spi/LoggerFactoryBinder.class', 'org/slf4j/helpers/MarkerIgnoringBase.class', 'org/slf4j/MDC.class', 'org/slf4j/LoggerFactory.class'}

And the working state (r35899/osm)

apache-commons.jar apache-http.jar {'org/apache/commons/logging/impl/ServletContextCleaner.class', 'org/apache/commons/logging/LogFactory$1.class', 'org/apache/commons/logging/impl/LogFactoryImpl.class', 'org/apache/commons/logging/impl/LogFactoryImpl$2.class', 'org/apache/commons/logging/impl/AvalonLogger.class', 'org/apache/commons/logging/impl/SimpleLog$1.class', 'org/apache/commons/logging/Log.class', 'org/apache/commons/logging/LogFactory$6.class', 'org/apache/commons/logging/impl/WeakHashtable.class', 'org/apache/commons/logging/impl/LogFactoryImpl$1.class', 'org/apache/commons/logging/impl/LogFactoryImpl$3.class', 'org/apache/commons/logging/impl/WeakHashtable$WeakKey.class', 'org/apache/commons/logging/LogFactory$2.class', 'org/apache/commons/logging/impl/SimpleLog.class', 'org/apache/commons/logging/impl/WeakHashtable$Referenced.class', 'org/apache/commons/logging/LogSource.class', 'org/apache/commons/logging/LogFactory$3.class', 'org/apache/commons/logging/LogFactory$4.class', 'org/apache/commons/logging/impl/NoOpLog.class', 'org/apache/commons/logging/LogFactory.class', 'org/apache/commons/logging/LogFactory$5.class', 'org/apache/commons/logging/impl/LogKitLogger.class', 'org/apache/commons/logging/impl/WeakHashtable$1.class', 'org/apache/commons/logging/LogConfigurationException.class', 'org/apache/commons/logging/impl/Log4JLogger.class', 'org/apache/commons/logging/impl/Jdk13LumberjackLogger.class', 'META-INF/NOTICE.txt', 'org/apache/commons/logging/impl/WeakHashtable$Entry.class', 'org/apache/commons/logging/impl/Jdk14Logger.class'}
apache-commons.jar pdfimport.jar {'org/apache/commons/logging/impl/ServletContextCleaner.class', 'org/apache/commons/logging/impl/LogFactoryImpl.class', 'org/apache/commons/logging/LogFactory$1.class', 'org/apache/commons/logging/impl/LogFactoryImpl$2.class', 'org/apache/commons/logging/impl/AvalonLogger.class', 'org/apache/commons/logging/Log.class', 'org/apache/commons/logging/impl/SimpleLog$1.class', 'org/apache/commons/logging/LogFactory$6.class', 'org/apache/commons/logging/impl/WeakHashtable.class', 'org/apache/commons/logging/impl/LogFactoryImpl$1.class', 'org/apache/commons/logging/impl/LogFactoryImpl$3.class', 'org/apache/commons/logging/impl/WeakHashtable$WeakKey.class', 'org/apache/commons/logging/LogFactory$2.class', 'org/apache/commons/logging/impl/SimpleLog.class', 'org/apache/commons/logging/impl/WeakHashtable$Referenced.class', 'org/apache/commons/logging/LogSource.class', 'org/apache/commons/logging/LogFactory$3.class', 'org/apache/commons/logging/LogFactory$4.class', 'org/apache/commons/logging/impl/NoOpLog.class', 'org/apache/commons/logging/LogFactory.class', 'org/apache/commons/logging/LogFactory$5.class', 'org/apache/commons/logging/impl/LogKitLogger.class', 'org/apache/commons/logging/impl/WeakHashtable$1.class', 'org/apache/commons/logging/LogConfigurationException.class', 'org/apache/commons/logging/impl/Log4JLogger.class', 'org/apache/commons/logging/impl/Jdk13LumberjackLogger.class', 'org/apache/commons/logging/impl/WeakHashtable$Entry.class', 'org/apache/commons/logging/impl/Jdk14Logger.class'}
apache-http.jar pdfimport.jar {'org/apache/commons/logging/impl/ServletContextCleaner.class', 'org/apache/commons/logging/impl/LogFactoryImpl.class', 'org/apache/commons/logging/LogFactory$1.class', 'org/apache/commons/logging/impl/LogFactoryImpl$2.class', 'org/apache/commons/logging/impl/AvalonLogger.class', 'org/apache/commons/logging/Log.class', 'org/apache/commons/logging/impl/SimpleLog$1.class', 'org/apache/commons/logging/LogFactory$6.class', 'org/apache/commons/logging/impl/WeakHashtable.class', 'org/apache/commons/logging/impl/LogFactoryImpl$1.class', 'org/apache/commons/logging/impl/LogFactoryImpl$3.class', 'org/apache/commons/logging/impl/WeakHashtable$WeakKey.class', 'org/apache/commons/logging/LogFactory$2.class', 'org/apache/commons/logging/impl/SimpleLog.class', 'org/apache/commons/logging/impl/WeakHashtable$Referenced.class', 'org/apache/commons/logging/LogSource.class', 'org/apache/commons/logging/LogFactory$3.class', 'org/apache/commons/logging/LogFactory$4.class', 'org/apache/commons/logging/impl/NoOpLog.class', 'org/apache/commons/logging/LogFactory.class', 'org/apache/commons/logging/LogFactory$5.class', 'org/apache/commons/logging/impl/LogKitLogger.class', 'org/apache/commons/logging/impl/WeakHashtable$1.class', 'org/apache/commons/logging/LogConfigurationException.class', 'org/apache/commons/logging/impl/Log4JLogger.class', 'org/apache/commons/logging/impl/Jdk13LumberjackLogger.class', 'org/apache/commons/logging/impl/WeakHashtable$Entry.class', 'org/apache/commons/logging/impl/Jdk14Logger.class'}
MicrosoftStreetside.jar log4j.jar {'org/apache/log4j/spi/ThrowableInformation.class', 'org/apache/log4j/AppenderSkeleton.class', 'org/apache/log4j/SimpleLayout.class', 'org/apache/log4j/xml/Log4jEntityResolver.class', 'org/apache/log4j/helpers/QuietWriter.class', 'org/apache/log4j/Level.class', 'org/apache/log4j/spi/ErrorHandler.class', 'org/apache/log4j/rewrite/RewritePolicy.class', 'org/apache/log4j/or/jms/MessageRenderer.class', 'org/apache/log4j/xml/UnrecognizedElementHandler.class', 'org/apache/log4j/Logger.class', 'org/apache/log4j/ConsoleAppender.class', 'org/apache/log4j/spi/OptionHandler.class', 'org/apache/log4j/helpers/OptionConverter.class', 'org/apache/log4j/or/ThreadGroupRenderer.class', 'org/apache/log4j/config/PropertySetter.class', 'org/apache/log4j/BasicConfigurator.class', 'org/apache/log4j/Priority.class', 'org/apache/log4j/spi/LocationInfo.class', 'org/apache/log4j/helpers/AppenderAttachableImpl.class', 'org/apache/log4j/spi/ErrorCode.class', 'org/apache/log4j/Category.class', 'org/apache/log4j/PropertyConfigurator.class', 'org/apache/log4j/config/PropertySetterException.class', 'org/apache/log4j/spi/LoggingEvent.class', 'org/apache/log4j/WriterAppender.class', 'org/apache/log4j/rewrite/PropertyRewritePolicy.class', 'org/apache/log4j/NDC.class', 'org/apache/log4j/LogManager.class', 'org/apache/log4j/helpers/NullEnumeration.class', 'org/apache/log4j/spi/AppenderAttachable.class', 'org/apache/log4j/spi/Filter.class', 'org/apache/log4j/spi/LoggerFactory.class', 'org/apache/log4j/MDC.class', 'org/apache/log4j/Layout.class', 'org/apache/log4j/spi/LoggerRepository.class', 'org/apache/log4j/PatternLayout.class', 'org/apache/log4j/Appender.class', 'org/apache/log4j/spi/HierarchyEventListener.class', 'org/apache/log4j/rewrite/MapRewritePolicy.class', 'org/apache/log4j/xml/log4j.dtd', 'org/apache/log4j/xml/DOMConfigurator.class', 'org/apache/log4j/or/ObjectRenderer.class', 'org/apache/log4j/spi/RepositorySelector.class', 'org/apache/log4j/spi/Configurator.class'}

I'm seeing if removing javax-activation from geotools.jar fixes the problem.

EDIT: Yep, it fixes the problem.

Last edited 3 years ago by taylor.smock (previous) (diff)

by taylor.smock, 3 years ago

Attachment: duplicate_class_check.py added

Quick script to find duplicate files in jar files

comment:7 by taylor.smock, 3 years ago

Resolution: fixed
Status: newclosed

In 35956/osm:

geotools: Remove duplicate classes with jaxb plugin

This fixes #21995.

comment:8 by taylor.smock, 3 years ago

Resolution: fixed
Status: closedreopened

I was running the ant clean dist test under Java 11. Not Java 8.

comment:9 by taylor.smock, 3 years ago

In 35957/osm:

geotools (dist): Remove duplicate jaxb class files

see #21995

comment:10 by taylor.smock, 3 years ago

I've got something that "works" for compilation. I don't know what effects it will have on runtime yet. I'm checking to see if slf4j was a problem, but jackson definitely was.

Questions for other people:

  • Does anyone have an objection to splitting jackson out into its own plugin? (Microsoft StreetSide, geotools)
  • What about slf4j (I'd be more inclined to add it to the log4j plugin)? (apache-http, geotools)
    • plugins/geotools/ivy.xml

      diff --git a/plugins/geotools/ivy.xml b/plugins/geotools/ivy.xml
      index af96d064b..1a9f3ebbb 100644
      a b  
      4444        <exclude org="org.tukaani" module="xz"/>
      4545       <!-- from jaxb plugin -->
      4646       <exclude org="javax.activation" module="javax.activation-api"/>
       47       <!-- jackson causes other plugins to fail during compilation on Java 8 -->
       48       <exclude org="com.fasterxml.jackson.core" module="jackson-core"/>
      4749    </dependencies>
      4850</ivy-module>

EDIT: slf4j was not the problem.

Last edited 3 years ago by taylor.smock (previous) (diff)

comment:11 by GerdP, 3 years ago

I wonder if any specific class can be blamed for the problem. My understanding of the stacktrace was that the *.jar itself is compressed with a (deflate64?) method that is not known by java 8. All geotools.jar before 35900/osm were below 16M, so my guess would be that a size > 16M triggers this.

Version 0, edited 3 years ago by GerdP (next)

in reply to:  11 comment:12 by taylor.smock, 3 years ago

Replying to GerdP:

I wonder if any specific class can be blamed for the problem. My understanding of the stacktrace was that the *.jar itself is compressed with a (deflate64?) method that is not known by java 8. All geotools.jar before 35900/osm were below 16M, so my guess would be that a size > 16M triggers this.

It is probably a specific class. I removed the slf4j exclusion, and it worked. So it is something in jackson.
EDIT 2: I'm testing in a Java 8 container, so all compressions used should be known (as in, I'm compiling geotools there as well as ImportImage).

Edit: I hope it is not that simple, josm.jar is already very close to 16M

Doesn't look like it. The working geotools jar is 19M. It is probably a specific class.

EDIT: For the record, here are the additional classes from Jackson that were not in the geotools 22.0 plugin.

  • .txt

    old new  
     0com/fasterxml/jackson/core/JsonFactoryBuilder.class
     1com/fasterxml/jackson/core/StreamReadFeature.class
     2com/fasterxml/jackson/core/StreamWriteFeature.class
     3com/fasterxml/jackson/core/TSFBuilder.class
     4com/fasterxml/jackson/core/TokenStreamFactory.class
     5com/fasterxml/jackson/core/exc/InputCoercionException.class
     6com/fasterxml/jackson/core/exc/StreamReadException.class
     7com/fasterxml/jackson/core/io/CharTypes$AltEscapes.class
     8com/fasterxml/jackson/core/json/JsonReadFeature.class
     9com/fasterxml/jackson/core/json/JsonWriteFeature.class

EDIT3: I tried removing ehcache to see if that made a difference (jar size -> 18M), and the build failed. So it is probably something to do with jackson.

Last edited 3 years ago by taylor.smock (previous) (diff)

comment:13 by taylor.smock, 3 years ago

Resolution: fixed
Status: reopenedclosed

In 35958/osm:

geotools: Fix #21995 by removing Jackson and putting Jackson in its own plugin

comment:14 by taylor.smock, 3 years ago

In 35959/osm:

geotools: Remove jackson.jar from compile path

This is needed since having jackson in the compile path has issues. See #21995.

This is in its own commit to make it easier to revert in the future, when
Jackson doesn't break jar creation.

comment:15 by taylor.smock, 3 years ago

In 35960/osm:

geotools (dist): Fix #21995 by removing Jackson and putting Jackson in its own plugin

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.