You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by binout <gi...@git.apache.org> on 2017/02/28 16:48:46 UTC

[GitHub] activemq-artemis pull request #1055: Add default constructor for reflection

GitHub user binout opened a pull request:

    https://github.com/apache/activemq-artemis/pull/1055

    Add default constructor for reflection

    When you use `org.apache.activemq.artemis.core.protocol.hornetq.client.HornetQClientProtocolManagerFactory` as protocol-manager-factory, this class needs to be instantiated by reflection.
    
    Caused by: java.lang.RuntimeException: Your class must have a constructor without arguments. If it is an inner class, it must be static! org.apache.activemq.artemis.core.protocol.hornetq.HQPropertiesConversionInterceptor
    	at org.apache.activemq.artemis.utils.ClassloadingUtil.newInstanceFromClassLoader(ClassloadingUtil.java:50)
    	at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl$6.run(ServerLocatorImpl.java:1776)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.feedInterceptors(ServerLocatorImpl.java:1771)
    	at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.setIncomingInterceptorList(ServerLocatorImpl.java:816)
    	at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.setIncomingInterceptorList(ActiveMQConnectionFactory.java:642)
    	... 27 more
    Caused by: java.lang.InstantiationException: org.apache.activemq.artemis.core.protocol.hornetq.HQPropertiesConversionInterceptor
    	at java.lang.Class.newInstance(Class.java:427)
    	at org.apache.activemq.artemis.utils.ClassloadingUtil.newInstanceFromClassLoader(ClassloadingUtil.java:47)
    	... 32 more
    Caused by: java.lang.NoSuchMethodException: org.apache.activemq.artemis.core.protocol.hornetq.HQPropertiesConversionInterceptor.<init>()
    	at java.lang.Class.getConstructor0(Class.java:3082)
    	at java.lang.Class.newInstance(Class.java:412)
    	... 33 more

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/binout/activemq-artemis patch-1

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/1055.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1055
    
----
commit f87bd45a756e4ed4b9ac9f499d0f25d5b27a2106
Author: Beno�t Prioux <be...@gmail.com>
Date:   2017-02-28T16:48:24Z

    Add default constructor for reflection
    
    When you use `org.apache.activemq.artemis.core.protocol.hornetq.client.HornetQClientProtocolManagerFactory` as protocol-manager-factory, this class need to be instantiated by reflection.
    
    Caused by: java.lang.RuntimeException: Your class must have a constructor without arguments. If it is an inner class, it must be static! org.apache.activemq.artemis.core.protocol.hornetq.HQPropertiesConversionInterceptor
    	at org.apache.activemq.artemis.utils.ClassloadingUtil.newInstanceFromClassLoader(ClassloadingUtil.java:50)
    	at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl$6.run(ServerLocatorImpl.java:1776)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.feedInterceptors(ServerLocatorImpl.java:1771)
    	at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.setIncomingInterceptorList(ServerLocatorImpl.java:816)
    	at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.setIncomingInterceptorList(ActiveMQConnectionFactory.java:642)
    	... 27 more
    Caused by: java.lang.InstantiationException: org.apache.activemq.artemis.core.protocol.hornetq.HQPropertiesConversionInterceptor
    	at java.lang.Class.newInstance(Class.java:427)
    	at org.apache.activemq.artemis.utils.ClassloadingUtil.newInstanceFromClassLoader(ClassloadingUtil.java:47)
    	... 32 more
    Caused by: java.lang.NoSuchMethodException: org.apache.activemq.artemis.core.protocol.hornetq.HQPropertiesConversionInterceptor.<init>()
    	at java.lang.Class.getConstructor0(Class.java:3082)
    	at java.lang.Class.newInstance(Class.java:412)
    	... 33 more

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis issue #1055: Add default constructor for reflection

Posted by jbertram <gi...@git.apache.org>.
Github user jbertram commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1055
  
    I can't merge this as-is...
    * You didn't fix the commit message as noted previously.
    * There's no test as noted previously.
    * All commits need to be squashed so that there's only a single commit.
    
    Looking at the code on the master branch I don't see how this could actually because the `HQPropertiesConversionInterceptor` is never instantiated via reflection.  Perhaps you should start a thread on the user list so we can discuss your use-case in more detail.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis issue #1055: Add default constructor for reflection

Posted by binout <gi...@git.apache.org>.
Github user binout commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1055
  
    Ok, i close and i will start a discuss about my problem : activemq with hornetq compatibility inside a Wildfly 10.1.0.Final.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis issue #1055: Add default constructor for reflection

Posted by jbertram <gi...@git.apache.org>.
Github user jbertram commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1055
  
    No apologies necessary. PRs are welcome and appreciated. We just need to follow best practices to ensure the code-base stays in good shape.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request #1055: Add default constructor for reflection

Posted by binout <gi...@git.apache.org>.
Github user binout closed the pull request at:

    https://github.com/apache/activemq-artemis/pull/1055


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis issue #1055: Add default constructor for reflection

Posted by binout <gi...@git.apache.org>.
Github user binout commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1055
  
    Ok sorry for this "quick and dirty" PR ....
    I will rework the background and the form


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis issue #1055: Add default constructor for reflection

Posted by jbertram <gi...@git.apache.org>.
Github user jbertram commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1055
  
    Couple of things...
    
    - Your commit message should follow the 50/72 format as outlined in the [Hacking Guide](https://github.com/apache/activemq-artemis/blob/master/docs/hacking-guide/en/maintainers.md#commit-messages).
    - The commit message really isn't the place for a stack trace and explanation of the problem.  Please create a JIRA for that.
    - If at all possible every fix should include a test to validate the fix is correct (i.e. without the fix the test fails).
    - Your commit failed the PR check because:
    
    `[ERROR] src/main/java/org/apache/activemq/artemis/core/protocol/hornetq/HQPropertiesConversionInterceptor.java:[34] (regexp) RegexpSingleline: Line has trailing spaces.`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis issue #1055: Add default constructor for reflection

Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1055
  
    It makes sense to have this change.  It's just some cleanup needed on the committs


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---