[jira] Created: (OFBIZ-2539) BsfEventHandler does not find nomore the resources from classpath

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

[jira] Created: (OFBIZ-2539) BsfEventHandler does not find nomore the resources from classpath

Nicolas Malin (Jira)
BsfEventHandler does not find nomore the resources from classpath
-----------------------------------------------------------------

                 Key: OFBIZ-2539
                 URL: https://issues.apache.org/jira/browse/OFBIZ-2539
             Project: OFBiz
          Issue Type: Bug
          Components: framework, specialpurpose/ecommerce
    Affects Versions: Release Branch 9.04, SVN trunk
            Reporter: Marco Risaliti
            Assignee: Marco Risaliti
            Priority: Minor
             Fix For: Release Branch 9.04, SVN trunk


BsfEventHandler does not find nomore the resources from classpath

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-2539) BsfEventHandler does not find nomore the resources from classpath

Nicolas Malin (Jira)

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

Marco Risaliti updated OFBIZ-2539:
----------------------------------

    Attachment: BSF_events.patch

This patch is now find the BSF resources, I have changed the references on ecommerce controller.xml.
To reproduce the bug it's enough to go on ecommerce and run this request:

http://localhost:8080/ecommerce/control/quickAnonAddCreditCardToCart.

Then the following error appears:

Request quickAnonAddCreditCardToCart caused an error with the following message: Errore esecuzione evento: org.ofbiz.webapp.event.EventHandlerException: Script not found at location [org/ofbiz/ecommerce/order/ProcessPaymentSettings.groovy]

It will be great if some framework committer could take a look at this.

Thanks
Marco

> BsfEventHandler does not find nomore the resources from classpath
> -----------------------------------------------------------------
>
>                 Key: OFBIZ-2539
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2539
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework, specialpurpose/ecommerce
>    Affects Versions: Release Branch 9.04, SVN trunk
>            Reporter: Marco Risaliti
>            Assignee: Marco Risaliti
>            Priority: Minor
>             Fix For: Release Branch 9.04, SVN trunk
>
>         Attachments: BSF_events.patch
>
>
> BsfEventHandler does not find nomore the resources from classpath

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-2539) BsfEventHandler does not find nomore the resources from classpath

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

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

David E. Jones commented on OFBIZ-2539:
---------------------------------------

Try changing the script location to use the "component://" syntax. The script directories have all been removed from the classpath. There was some discussion about this on the mailing lists a couple of weeks ago, and it's good to bring up things like this to keep it fresh in everyone's minds.

In other words instead of:

org/ofbiz/ecommerce/order/ProcessPaymentSettings.groovy

use:

component://ecommerce/script/org/ofbiz/ecommerce/order/ProcessPaymentSettings.groovy


> BsfEventHandler does not find nomore the resources from classpath
> -----------------------------------------------------------------
>
>                 Key: OFBIZ-2539
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2539
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework, specialpurpose/ecommerce
>    Affects Versions: Release Branch 9.04, SVN trunk
>            Reporter: Marco Risaliti
>            Assignee: Marco Risaliti
>            Priority: Minor
>             Fix For: Release Branch 9.04, SVN trunk
>
>         Attachments: BSF_events.patch
>
>
> BsfEventHandler does not find nomore the resources from classpath

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-2539) BsfEventHandler does not find nomore the resources from classpath

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

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

Scott Gray commented on OFBIZ-2539:
-----------------------------------

I ran into this a week or two ago but didn't have time to fix it but I can confirm that the BsfEventHandler can't handle "component://" syntax (unless of course I was doing it wrong at the time...)

> BsfEventHandler does not find nomore the resources from classpath
> -----------------------------------------------------------------
>
>                 Key: OFBIZ-2539
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2539
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework, specialpurpose/ecommerce
>    Affects Versions: Release Branch 9.04, SVN trunk
>            Reporter: Marco Risaliti
>            Assignee: Marco Risaliti
>            Priority: Minor
>             Fix For: Release Branch 9.04, SVN trunk
>
>         Attachments: BSF_events.patch
>
>
> BsfEventHandler does not find nomore the resources from classpath

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-2539) BsfEventHandler does not find nomore the resources from classpath

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

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

Marco Risaliti commented on OFBIZ-2539:
---------------------------------------

Hi David,

I have tried first to change the resource name in the form of component:// but it seems to me that the BsfEventHandler.java still looking at the script in the classpath.

scriptStream = cl.getResourceAsStream(event.invoke);

I have simply change all the bsf events to having the syntax of component:// and use FlexibleLocation.resolveLocation instead of use getResourceAsStream and it working fine to me.

Thanks
Marco

> BsfEventHandler does not find nomore the resources from classpath
> -----------------------------------------------------------------
>
>                 Key: OFBIZ-2539
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2539
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework, specialpurpose/ecommerce
>    Affects Versions: Release Branch 9.04, SVN trunk
>            Reporter: Marco Risaliti
>            Assignee: Marco Risaliti
>            Priority: Minor
>             Fix For: Release Branch 9.04, SVN trunk
>
>         Attachments: BSF_events.patch
>
>
> BsfEventHandler does not find nomore the resources from classpath

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-2539) BsfEventHandler does not find nomore the resources from classpath

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

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

Marco Risaliti updated OFBIZ-2539:
----------------------------------

    Attachment: BSF_events.png

This is a screenshoot after made only this change.

<request-map uri="quickAnonAddCreditCardToCart">
       <security https="true" auth="false"/>
       <event type="bsf" invoke="component://ecommerce/script/org/ofbiz/ecommerce/order/ProcessPaymentSettings.groovy"/>
       <response name="success" type="view" value="quickAnonCcInfo"/>
       <response name="error" type="view" value="quickAnonCcInfo"/>
</request-map>

And it continue to not working, so it's necessary to change BsfEventHandler.java.

Thanks
Marco

> BsfEventHandler does not find nomore the resources from classpath
> -----------------------------------------------------------------
>
>                 Key: OFBIZ-2539
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2539
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework, specialpurpose/ecommerce
>    Affects Versions: Release Branch 9.04, SVN trunk
>            Reporter: Marco Risaliti
>            Assignee: Marco Risaliti
>            Priority: Minor
>             Fix For: Release Branch 9.04, SVN trunk
>
>         Attachments: BSF_events.patch, BSF_events.png
>
>
> BsfEventHandler does not find nomore the resources from classpath

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (OFBIZ-2539) BsfEventHandler does not find nomore the resources from classpath

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

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

Adrian Crum reassigned OFBIZ-2539:
----------------------------------

    Assignee: Adrian Crum  (was: Marco Risaliti)

> BsfEventHandler does not find nomore the resources from classpath
> -----------------------------------------------------------------
>
>                 Key: OFBIZ-2539
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2539
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework, specialpurpose/ecommerce
>    Affects Versions: Release Branch 9.04, SVN trunk
>            Reporter: Marco Risaliti
>            Assignee: Adrian Crum
>            Priority: Minor
>             Fix For: Release Branch 9.04, SVN trunk
>
>         Attachments: BSF_events.patch, BSF_events.png
>
>
> BsfEventHandler does not find nomore the resources from classpath

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (OFBIZ-2539) BsfEventHandler does not find nomore the resources from classpath

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

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

Adrian Crum closed OFBIZ-2539.
------------------------------

    Resolution: Fixed

Fixed: trunk rev 779639, release rev 779643.

Thanks Marco.


> BsfEventHandler does not find nomore the resources from classpath
> -----------------------------------------------------------------
>
>                 Key: OFBIZ-2539
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2539
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework, specialpurpose/ecommerce
>    Affects Versions: Release Branch 9.04, SVN trunk
>            Reporter: Marco Risaliti
>            Assignee: Adrian Crum
>            Priority: Minor
>             Fix For: Release Branch 9.04, SVN trunk
>
>         Attachments: BSF_events.patch, BSF_events.png
>
>
> BsfEventHandler does not find nomore the resources from classpath

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.