I think the answer Jacques is looking for is: Yes, you did something wrong.
The correct component:// URL is: <event type="simple" path="component://accounting/script/org/ofbiz/accounting/payment/PaymentMethodEvents.xml" invoke="updateCreditCard"/> The correct classpath is: <event type="simple" path="org/ofbiz/accounting/payment/PaymentMethodEvents.xml" invoke="updateCreditCard"/> >From what I recall, the component:// version has a more efficient lookup >algorithm - and as David mentioned, it is generally better to use. -Adrian --- On Mon, 4/20/09, David E Jones <[email protected]> wrote: > From: David E Jones <[email protected]> > Subject: Re: svn commit: r755658 - > /ofbiz/trunk/applications/party/servicedef/services_view.xml > To: [email protected] > Date: Monday, April 20, 2009, 8:16 PM > Are you trying to use the classpath reference instead of the > component reference? If so, why? > > To use a classpath reference make there is no > "component://" on the front, ie: > > path="org/ofbiz/accounting/payment/PaymentMethodEvents.xml" > > Still, using the component reference is generally better, > and if not supported somewhere please let me know... > > -David > > > On Apr 20, 2009, at 11:02 AM, Jacques Le Roux wrote: > > > I tried to removed the ${component-dir}/script > directory from the classpath but it does not work. > > I tried with > > <event type="simple" > path="component://org/ofbiz/accounting/payment/PaymentMethodEvents.xml" > invoke="updateCreditCard"/> > > instead of > > <event type="simple" > path="component://accounting/script/org/ofbiz/accounting/payment/PaymentMethodEvents.xml" > invoke="updateCreditCard"/> > > ang got this message > > Could not find SimpleMethod XML document in resource: > component://org/ofbiz/accounting/payment/PaymentMethodEvents.xml; > error was: > > java.net.MalformedURLException: Could not get root > location for component with name [org], error was: > > org.ofbiz.base.component.ComponentException: No > component found named : org (Could not get root location for > component with name > > [org], error was: > org.ofbiz.base.component.ComponentException: No component > found named : org) > > > > I did not try further, nor looked at details in code. > Did I do something wrong ? > > > > Jacques > > > > From: "Jacques Le Roux" > <[email protected]> > >> I tested it works well. Changes done at revision: > 765798 > >> Not removed the ${component-dir}/ script > directory from the classpath yet.. > >> > >> Jacques > >> > >> From: "David E Jones" > <[email protected]> > >>> It should be supported now, but yeah it would > be a good idea to test it before doing a mass change. And > yes, a mass change there > >>> would be great too. > >>> > >>> Once those are done we could probably remove > the ${component-dir}/ script directory from the classpath. > >>> > >>> -David > >>> > >>> > >>> On Mar 19, 2009, at 8:07 AM, Jacques Le Roux > wrote: > >>> > >>>> Ashish, > >>>> > >>>> Looks like a good idea, but I'm not > sure FTTOMH > >>>> We would have to look at controller > code... > >>>> > >>>> Jacques > >>>> > >>>> From: "Ashish Vijaywargiya" > <[email protected]> > >>>>> Jacques, > >>>>> > >>>>> Do we need to change the same thing in > controller.xml ? > >>>>> For ex : > >>>>> <event type="simple" > path="org/ofbiz/ecommerce/customer/ > CustomerEvents.xml" > invoke="processCustomerSettings"/> > >>>>> > >>>>> WDYT ? > >>>>> > >>>>> -- > >>>>> Ashish > >>>>> > >>>>> > >>>>> Jacques Le Roux wrote: > >>>>>> Done at revision: 755977 > >>>>>> > >>>>>> Jacques > >>>>>> > >>>>>> From: "David E Jones" > <[email protected]> > >>>>>>> > >>>>>>> This would be great to have > done before the release. It would allow us to get a LOT of > stuff off the classpath, which can > >>>>>>> be a painful part of > deployment. > >>>>>>> > >>>>>>> -David > >>>>>>> > >>>>>>> > >>>>>>> On Mar 18, 2009, at 11:28 AM, > Jacques Le Roux wrote: > >>>>>>> > >>>>>>>> I had a closer look > >>>>>>>> <service > name=(.*)engine="simple"(.*)\R(.*)location="org.ofbiz > >>>>>>>> says there are 1305 other > cases... (I did not look into details, maybe this regexp > is too loosely written) > >>>>>>>> > >>>>>>>> I will do a serious > Eclipse regexp S/R, when I will get a chance... > >>>>>>>> > >>>>>>>> Jacques > >>>>>>>> > >>>>>>>> From: > <[email protected]> > >>>>>>>>> Author: jleroux > >>>>>>>>> Date: Wed Mar 18 > 17:21:14 2009 > >>>>>>>>> New Revision: 755658 > >>>>>>>>> > >>>>>>>>> URL: > http://svn.apache.org/viewvc?rev=755658&view=rev > >>>>>>>>> Log: > >>>>>>>>> Following Ashish's > commit at r755572: > >>>>>>>>> Followed best > practice. > >>>>>>>>> Changed > location="org/ofbiz/......... to > location="component:// party/script/org/ofbiz...... > >>>>>>>>> > >>>>>>>>> Modified: > >>>>>>>>> > ofbiz/trunk/applications/party/servicedef/services_view.xml > >>>>>>>>> > >>>>>>>>> Modified: > ofbiz/trunk/applications/party/servicedef/ services_view.xml > >>>>>>>>> URL: > >>>>>>>>> > http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/servicedef/services_view.xml?rev=755658&r1=755657&r2=755658&view=diff > >>>>>>>>> = = = = = = = = = = = > = = > ================================================================= > >>>>>>>>> --- > ofbiz/trunk/applications/party/servicedef/ services_view.xml > (original) > >>>>>>>>> +++ > ofbiz/trunk/applications/party/servicedef/services_view.xml > Wed Mar 18 17:21:14 2009 > >>>>>>>>> @@ -115,14 +115,14 @@ > >>>>>>>>> </service> > >>>>>>>>> > >>>>>>>>> <service > name="getPartiesByRelationship" > engine="simple" > >>>>>>>>> - > location="org/ofbiz/party/party/ > PartyServices.xml" > invoke="getPartiesByRelationship"> > >>>>>>>>> + > location="component://party/script/org/ofbiz/party/ > party/ PartyServices.xml" > invoke="getPartiesByRelationship"> > >>>>>>>>> > <description>Gets all parties related to partyIdFrom > through the PartyRelationship entity</description> > >>>>>>>>> > <auto-attributes mode="IN" > include="all" optional="true" > entity-name="PartyRelationship"/> > >>>>>>>>> <attribute > name="parties" > type="java.util.Collection" mode="OUT" > optional="true"/> > >>>>>>>>> <override > name="partyIdFrom" optional="false"/> > >>>>>>>>> </service> > >>>>>>>>> <service > name="getRelatedParties" engine="simple" > >>>>>>>>> - > location="org/ofbiz/party/party/ > PartyServices.xml" > invoke="getRelatedParties"> > >>>>>>>>> + > location="component://party/script/org/ofbiz/ party/ > party/PartyServices.xml" > invoke="getRelatedParties"> > >>>>>>>>> > <description> > >>>>>>>>> Get Parties > Related to a Party > >>>>>>>>> - The > relatedPartyIdList coming out will include the original > partyIdFrom > >>>>>>>>> @@ -142,7 +142,7 @@ > >>>>>>>>> </service> > >>>>>>>>> > >>>>>>>>> <service > name="getParentOrganizations" > engine="simple" > >>>>>>>>> - > location="org/ofbiz/party/party/ > PartyServices.xml" > invoke="getParentOrganizations"> > >>>>>>>>> + > location="component://party/script/org/ofbiz/ party/ > party/PartyServices.xml" > invoke="getParentOrganizations"> > >>>>>>>>> > <description> > >>>>>>>>> Gets Parent > Organizations for an Organization Party. > >>>>>>>>> This uses the > PartyRelationship table with > partyRelationshipTypeId="GROUP_ROLLUP". > >>>>>>>>> @@ -157,7 +157,7 @@ > >>>>>>>>> </service> > >>>>>>>>> > >>>>>>>>> <service > name="getChildRoleTypes" engine="simple" > >>>>>>>>> - > location="org/ofbiz/party/party/ > PartyServices.xml" > invoke="getChildRoleTypes"> > >>>>>>>>> + > location="component://party/script/org/ofbiz/ party/ > party/PartyServices.xml" > invoke="getChildRoleTypes"> > >>>>>>>>> > <description> > >>>>>>>>> Get Child > RoleTypes. > >>>>>>>>> The > childRoleTypeIdList coming out will contain the original > roleTypeId. > >>>>>>>>> @@ -168,7 +168,7 @@ > >>>>>>>>> > >>>>>>>>> <!-- > PostalAddressBoundary --> > >>>>>>>>> <service > name="getPostalAddressBoundary" > engine="simple" > >>>>>>>>> - > location="org/ofbiz/party/party/ > PartyServices.xml" > invoke="getPostalAddressBoundary"> > >>>>>>>>> + > location="component://party/script/org/ofbiz/ party/ > party/PartyServices.xml" > >>>>>>>>> > invoke="getPostalAddressBoundary"> > >>>>>>>>> > <description>Get all Postal Address Boundaries</ > description> > >>>>>>>>> > <permission-service service- > name="partyBasePermissionCheck" > main-action="VIEW"/> > >>>>>>>>> <attribute > name="contactMechId" type="String" > mode="IN" optional="false"/> > >>>>>>>>> @@ -177,12 +177,12 @@ > >>>>>>>>> > >>>>>>>>> <!-- Get a list of > country and associated states from Geo --> > >>>>>>>>> <service > name="getCountryList" engine="simple" > auth="false" > >>>>>>>>> - > location="org/ofbiz/party/party/ > PartyServices.xml" > invoke="getCountryList"> > >>>>>>>>> + > location="component://party/script/org/ofbiz/ party/ > party/PartyServices.xml" > invoke="getCountryList"> > >>>>>>>>> <attribute > name="countryList" mode="OUT" > type="java.util.List"/> > >>>>>>>>> </service> > >>>>>>>>> > >>>>>>>>> <service > name="getAssociatedStateList" > engine="simple" auth="false" > >>>>>>>>> - > location="org/ofbiz/party/party/ > PartyServices.xml" > invoke="getAssociatedStateList"> > >>>>>>>>> + > location="component://party/script/org/ofbiz/ party/ > party/PartyServices.xml" > invoke="getAssociatedStateList"> > >>>>>>>>> <attribute > name="countryGeoId" mode="IN" > type="String" optional="false"/> > >>>>>>>>> <attribute > name="stateList" mode="OUT" > type="java.util.List"/> > >>>>>>>>> </service> > >>>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>> > >>>>>> > >>>>>> > >>>> > >>>> > >>> > >> > >> > > > >
