Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9644AD4FD for ; Fri, 30 Nov 2012 17:47:58 +0000 (UTC) Received: (qmail 44426 invoked by uid 500); 30 Nov 2012 17:47:58 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 44343 invoked by uid 500); 30 Nov 2012 17:47:58 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 44334 invoked by uid 99); 30 Nov 2012 17:47:58 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Nov 2012 17:47:58 +0000 Date: Fri, 30 Nov 2012 17:47:58 +0000 (UTC) From: "Jeffrey Starker (JIRA)" To: dev@activemq.apache.org Message-ID: <1019722093.45944.1354297678321.JavaMail.jiratomcat@arcas> In-Reply-To: <885729571.18735.1351031412383.JavaMail.jiratomcat@arcas> Subject: [jira] [Comment Edited] (AMQ-4131) Duplicated classes in activemq-core and activemq-protobuf artifacts MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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} > > org.apache.activemq > activemq-core > 5.7.0 > > > activemq-protobuf > org.apache.activemq.protobuf > > > > {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