activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeffrey Starker (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMQ-4131) Duplicated classes in activemq-core and activemq-protobuf artifacts
Date Tue, 23 Oct 2012 22:30:12 GMT
Jeffrey Starker created AMQ-4131:
------------------------------------

             Summary: Duplicated classes in activemq-core and activemq-protobuf artifacts
                 Key: AMQ-4131
                 URL: https://issues.apache.org/jira/browse/AMQ-4131
             Project: ActiveMQ
          Issue Type: Bug
    Affects Versions: 5.7.0
         Environment: Maven
            Reporter: Jeffrey Starker
            Priority: Minor


When adding activemq-core as a dependency in a java maven project, the activemq-core pulls
in a dependency for activemq-protobuf. However, the activemq-core artifact duplicates all
of the classes located in the activemq-protobuf.

Doing a diff between the two jars for activemq-spring-5.7.0.jar and activemq-protobuf-1.1.jar,
the following classes are duplicated:

{noformat}
[WARNING] Found duplicate classes in [org.apache.activemq:activemq-core:5.7.0,org.apache.activemq.protobuf:activemq-protobuf:1.1]
:
[WARNING]   org.apache.activemq.protobuf.AsciiBuffer
[WARNING]   org.apache.activemq.protobuf.BaseMessage
[WARNING]   org.apache.activemq.protobuf.Buffer
[WARNING]   org.apache.activemq.protobuf.BufferInputStream
[WARNING]   org.apache.activemq.protobuf.BufferOutputStream
[WARNING]   org.apache.activemq.protobuf.CodedInputStream
[WARNING]   org.apache.activemq.protobuf.CodedOutputStream
[WARNING]   org.apache.activemq.protobuf.DeferredDecodeMessage
[WARNING]   org.apache.activemq.protobuf.InvalidProtocolBufferException
[WARNING]   org.apache.activemq.protobuf.Message
[WARNING]   org.apache.activemq.protobuf.MessageBuffer
[WARNING]   org.apache.activemq.protobuf.MessageBufferSupport
[WARNING]   org.apache.activemq.protobuf.PBMessage
[WARNING]   org.apache.activemq.protobuf.UTF8Buffer
[WARNING]   org.apache.activemq.protobuf.UninitializedMessageException
[WARNING]   org.apache.activemq.protobuf.WireFormat
[WARNING]   org.apache.activemq.protobuf.compiler.AltJavaGenerator
[WARNING]   org.apache.activemq.protobuf.compiler.CommandLineSupport
[WARNING]   org.apache.activemq.protobuf.compiler.CompilerException
[WARNING]   org.apache.activemq.protobuf.compiler.EnumDescriptor
[WARNING]   org.apache.activemq.protobuf.compiler.EnumFieldDescriptor
[WARNING]   org.apache.activemq.protobuf.compiler.ExtensionsDescriptor
[WARNING]   org.apache.activemq.protobuf.compiler.FieldDescriptor
[WARNING]   org.apache.activemq.protobuf.compiler.IntrospectionSupport
[WARNING]   org.apache.activemq.protobuf.compiler.JavaGenerator
[WARNING]   org.apache.activemq.protobuf.compiler.MessageDescriptor
[WARNING]   org.apache.activemq.protobuf.compiler.MethodDescriptor
[WARNING]   org.apache.activemq.protobuf.compiler.OptionDescriptor
[WARNING]   org.apache.activemq.protobuf.compiler.ParserSupport
[WARNING]   org.apache.activemq.protobuf.compiler.ProtoDescriptor
[WARNING]   org.apache.activemq.protobuf.compiler.ProtoMojo
[WARNING]   org.apache.activemq.protobuf.compiler.ServiceDescriptor
[WARNING]   org.apache.activemq.protobuf.compiler.TextFormat
[WARNING]   org.apache.activemq.protobuf.compiler.TypeDescriptor
[WARNING]   org.apache.activemq.protobuf.compiler.parser.ParseException
[WARNING]   org.apache.activemq.protobuf.compiler.parser.ProtoParser
[WARNING]   org.apache.activemq.protobuf.compiler.parser.ProtoParserConstants
[WARNING]   org.apache.activemq.protobuf.compiler.parser.ProtoParserTokenManager
[WARNING]   org.apache.activemq.protobuf.compiler.parser.SimpleCharStream
[WARNING]   org.apache.activemq.protobuf.compiler.parser.Token
[WARNING]   org.apache.activemq.protobuf.compiler.parser.TokenMgrError
{noformat}

activemq-core is currently packaged incorrectly because of this. This will cause classloader
issues as these classes are duplicated. However, luckily the classes are identical, but if
something changes down the road it could cause unexpected behavior.

Current workaround:

{code:xml}
<dependency>
	<groupId>org.apache.activemq</groupId>
	<artifactId>activemq-core</artifactId>
	<version>5.7.0</version>
	<exclusions>
		<exclusion>
			<artifactId>activemq-protobuf</artifactId>
		 	<groupId>org.apache.activemq.protobuf</groupId>
		</exclusion>
	</exclusions>
</dependency>
{code}

Suggested fix is to remove the duplicated classes from activemq-core and instead bring them
in through the activemq-protobuf dependency.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message