[jira] [Created] (OFBIZ-4279) Inevitable InvocationTarget exception in JmsQueueListener.init<>()

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (OFBIZ-4279) Inevitable InvocationTarget exception in JmsQueueListener.init<>()

Nicolas Malin (Jira)
Inevitable InvocationTarget exception in JmsQueueListener.init<>()
------------------------------------------------------------------

                 Key: OFBIZ-4279
                 URL: https://issues.apache.org/jira/browse/OFBIZ-4279
             Project: OFBiz
          Issue Type: Bug
          Components: framework
    Affects Versions: SVN trunk
            Reporter: Ilya A. Pimenov
            Priority: Critical


First call in the constructor refers to

super(dispatcher);

which is:

    protected AbstractJmsListener(ServiceDispatcher serviceDispatcher) {
        this.dispatcher = GenericDispatcher.getLocalDispatcher("JMSDispatcher", null, null, this.getClass().getClassLoader(), serviceDispatcher);
    }

And in GenericDispatcher you can see:

    public static LocalDispatcher getLocalDispatcher(String dispatcherName, Delegator delegator, Collection<URL> readerURLs, ClassLoader loader, ServiceDispatcher serviceDispatcher) {
        if (dispatcherName == null) {
            dispatcherName = "default";
            Debug.logWarning("Got a getGenericDispatcher call with a null dispatcherName, assuming default for the name.", module);
        }

//NB! This line will obviosly fail with "NullPointer" on delegator
        if (UtilValidate.isNotEmpty(delegator.getDelegatorTenantId())) {
            dispatcherName += "#" + delegator.getDelegatorTenantId();
        }

So, It will always result in InvocationTargetException.

Replacing AbstractJmsListener constructor with this:
--
    protected AbstractJmsListener(ServiceDispatcher serviceDispatcher) {
        this.dispatcher = GenericDispatcher.getLocalDispatcher("JMSDispatcher", serviceDispatcher.getDelegator(), null, this.getClass().getClassLoader(), serviceDispatcher);
    }

--
Will do the trick.

Since this bug blocks implementing JMS-service, I believe it is atleast critical; since there is a workaround, but it's not very nice one.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-4279) Inevitable InvocationTarget exception in JmsQueueListener.init<>()

Nicolas Malin (Jira)

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

Jacques Le Roux commented on OFBIZ-4279:
----------------------------------------

I guess you use an "old" revision. I fixed a bug there in r1090961. Please check at http://svn.apache.org/viewvc?rev=1090961&view=rev and close if it's ok with you

Thanks

> Inevitable InvocationTarget exception in JmsQueueListener.init<>()
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-4279
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4279
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Ilya A. Pimenov
>            Priority: Critical
>
> First call in the constructor refers to
> super(dispatcher);
> which is:
>     protected AbstractJmsListener(ServiceDispatcher serviceDispatcher) {
>         this.dispatcher = GenericDispatcher.getLocalDispatcher("JMSDispatcher", null, null, this.getClass().getClassLoader(), serviceDispatcher);
>     }
> And in GenericDispatcher you can see:
>     public static LocalDispatcher getLocalDispatcher(String dispatcherName, Delegator delegator, Collection<URL> readerURLs, ClassLoader loader, ServiceDispatcher serviceDispatcher) {
>         if (dispatcherName == null) {
>             dispatcherName = "default";
>             Debug.logWarning("Got a getGenericDispatcher call with a null dispatcherName, assuming default for the name.", module);
>         }
> //NB! This line will obviosly fail with "NullPointer" on delegator
>         if (UtilValidate.isNotEmpty(delegator.getDelegatorTenantId())) {
>             dispatcherName += "#" + delegator.getDelegatorTenantId();
>         }
> So, It will always result in InvocationTargetException.
> Replacing AbstractJmsListener constructor with this:
> --
>     protected AbstractJmsListener(ServiceDispatcher serviceDispatcher) {
>         this.dispatcher = GenericDispatcher.getLocalDispatcher("JMSDispatcher", serviceDispatcher.getDelegator(), null, this.getClass().getClassLoader(), serviceDispatcher);
>     }
> --
> Will do the trick.
> Since this bug blocks implementing JMS-service, I believe it is atleast critical; since there is a workaround, but it's not very nice one.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|

[jira] [Resolved] (OFBIZ-4279) Inevitable InvocationTarget exception in JmsQueueListener.init<>()

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-4279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ilya A. Pimenov resolved OFBIZ-4279.
------------------------------------

    Resolution: Fixed

Great Thanks, my bad.

> Inevitable InvocationTarget exception in JmsQueueListener.init<>()
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-4279
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4279
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Ilya A. Pimenov
>            Priority: Critical
>
> First call in the constructor refers to
> super(dispatcher);
> which is:
>     protected AbstractJmsListener(ServiceDispatcher serviceDispatcher) {
>         this.dispatcher = GenericDispatcher.getLocalDispatcher("JMSDispatcher", null, null, this.getClass().getClassLoader(), serviceDispatcher);
>     }
> And in GenericDispatcher you can see:
>     public static LocalDispatcher getLocalDispatcher(String dispatcherName, Delegator delegator, Collection<URL> readerURLs, ClassLoader loader, ServiceDispatcher serviceDispatcher) {
>         if (dispatcherName == null) {
>             dispatcherName = "default";
>             Debug.logWarning("Got a getGenericDispatcher call with a null dispatcherName, assuming default for the name.", module);
>         }
> //NB! This line will obviosly fail with "NullPointer" on delegator
>         if (UtilValidate.isNotEmpty(delegator.getDelegatorTenantId())) {
>             dispatcherName += "#" + delegator.getDelegatorTenantId();
>         }
> So, It will always result in InvocationTargetException.
> Replacing AbstractJmsListener constructor with this:
> --
>     protected AbstractJmsListener(ServiceDispatcher serviceDispatcher) {
>         this.dispatcher = GenericDispatcher.getLocalDispatcher("JMSDispatcher", serviceDispatcher.getDelegator(), null, this.getClass().getClassLoader(), serviceDispatcher);
>     }
> --
> Will do the trick.
> Since this bug blocks implementing JMS-service, I believe it is atleast critical; since there is a workaround, but it's not very nice one.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|

[jira] [Closed] (OFBIZ-4279) Inevitable InvocationTarget exception in JmsQueueListener.init<>()

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-4279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ilya A. Pimenov closed OFBIZ-4279.
----------------------------------


Resolved in trunk.

> Inevitable InvocationTarget exception in JmsQueueListener.init<>()
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-4279
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4279
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Ilya A. Pimenov
>            Priority: Critical
>
> First call in the constructor refers to
> super(dispatcher);
> which is:
>     protected AbstractJmsListener(ServiceDispatcher serviceDispatcher) {
>         this.dispatcher = GenericDispatcher.getLocalDispatcher("JMSDispatcher", null, null, this.getClass().getClassLoader(), serviceDispatcher);
>     }
> And in GenericDispatcher you can see:
>     public static LocalDispatcher getLocalDispatcher(String dispatcherName, Delegator delegator, Collection<URL> readerURLs, ClassLoader loader, ServiceDispatcher serviceDispatcher) {
>         if (dispatcherName == null) {
>             dispatcherName = "default";
>             Debug.logWarning("Got a getGenericDispatcher call with a null dispatcherName, assuming default for the name.", module);
>         }
> //NB! This line will obviosly fail with "NullPointer" on delegator
>         if (UtilValidate.isNotEmpty(delegator.getDelegatorTenantId())) {
>             dispatcherName += "#" + delegator.getDelegatorTenantId();
>         }
> So, It will always result in InvocationTargetException.
> Replacing AbstractJmsListener constructor with this:
> --
>     protected AbstractJmsListener(ServiceDispatcher serviceDispatcher) {
>         this.dispatcher = GenericDispatcher.getLocalDispatcher("JMSDispatcher", serviceDispatcher.getDelegator(), null, this.getClass().getClassLoader(), serviceDispatcher);
>     }
> --
> Will do the trick.
> Since this bug blocks implementing JMS-service, I believe it is atleast critical; since there is a workaround, but it's not very nice one.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira