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] [Comment Edited] (AMQ-4131) Duplicated classes in activemq-core and activemq-protobuf artifacts
Date Fri, 30 Nov 2012 17:47:58 GMT

    [ https://issues.apache.org/jira/browse/AMQ-4131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507491#comment-13507491
] 

Jeffrey Starker edited comment on AMQ-4131 at 11/30/12 5:46 PM:
----------------------------------------------------------------

Hello, not to be a pain, but I think there is a duplication. Here are more steps to show you
what I am talking about. Sorry for being unclear before.
Steps:
# Download the activemq-core-5.7.0.jar and activemq-protobuf-1.1.jar via Maven. Using the
central maven repository. You can also find them via the web at: http://search.maven.org/remotecontent?filepath=org/apache/activemq/activemq-core/5.7.0/activemq-core-5.7.0.jar
and http://search.maven.org/remotecontent?filepath=org/apache/activemq/protobuf/activemq-protobuf/1.1/activemq-protobuf-1.1.jar
respectively.
# Expand the jar files in to a directory:
{noformat}
jar -xvf activemq-core-5.7.0.jar
jar -xvf activemq-protobuf-1.1.jar
{noformat}
You will notice that the org.apache.activemq.protobuf package is also included in activemq-core-5.7.0.jar
file when expanded.
# After extracting the two jar files, you can do a diff on any file I listed above in the
previous comment to show they are identical:
{code}
diff ${directory_of_core_jar_extract}/org/apache/activemq/protobuf/PBMessage.class ${directory_of_protobuf_jar_extract}/org/apache/activemq/protobuf/PBMessage.class
{code}
                
      was (Author: jstarker):
    Hello, not to be a pain, but I think there is a duplication. Here are more steps to show
you what I am talking about. Sorry for being unclear before.
Steps:
Download the activemq-core-5.7.0.jar and activemq-protobuf-1.1.jar via Maven. Using the central
maven repository. You can also find them via the web at: http://search.maven.org/remotecontent?filepath=org/apache/activemq/activemq-core/5.7.0/activemq-core-5.7.0.jar
and http://search.maven.org/remotecontent?filepath=org/apache/activemq/protobuf/activemq-protobuf/1.1/activemq-protobuf-1.1.jar
respectively.
Expand the jar files in to a directory:
jar -xvf activemq-core-5.7.0.jar
jar -xvf activemq-protobuf-1.1.jar
You will notice that the org.apache.activemq.protobuf package is also included in activemq-core-5.7.0.jar
file when expanded.
After extracting the two jar files, you can do a diff on any file I listed above in the previous
comment to show they are identical:
diff ${directory_of_core_jar_extract}/org/apache/activemq/protobuf/PBMessage.class ${directory_of_protobuf_jar_extract}/org/apache/activemq/protobuf/PBMessage.class
                  
> 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