You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Mark Ellul <ma...@catalystic.com> on 2008/04/01 16:49:29 UTC

Exception in Webtools

Hi,

I am getting the below exception when using the Service Reference in
WebTools for Ofbiz v4.0 running on Java 1.6 u 5

Any Idea on whats happening?

Thanks and Regards

Mark

org.ofbiz.base.util.GeneralException: Error rendering screen
[component://webtools/widget/AvailableServicesScreens.xml#AvailableServicesList]:
org.ofbiz.base.util.GeneralException: Error running BSH script at location
[component://webtools/webapp/webtools/WEB-INF/actions/service/availableservices.bsh]:
org.ofbiz.base.util.GeneralException: Error running BSH script at
[component://webtools/webapp/webtools/WEB-INF/actions/service/availableservices.bsh],
line [147]: Sourced file:
component://webtools/webapp/webtools/WEB-INF/actions/service/availableservices.bsh
: Method Invocation actionClass.getDeclaredField : at Line: 147 : in file:
component://webtools/webapp/webtools/WEB-INF/actions/service/availableservices.bsh
: actionClass .getDeclaredField ( "resultToResult" )

Target exception: java.lang.NoSuchFieldException: resultToResult
(Sourced file:
component://webtools/webapp/webtools/WEB-INF/actions/service/availableservices.bsh
: Method Invocation actionClass.getDeclaredField) (Error running BSH script
at
[component://webtools/webapp/webtools/WEB-INF/actions/service/availableservices.bsh],
line [147]: Sourced file:
component://webtools/webapp/webtools/WEB-INF/actions/service/availableservices.bsh
: Method Invocation actionClass.getDeclaredField : at Line: 147 : in file:
component://webtools/webapp/webtools/WEB-INF/actions/service/availableservices.bsh
: actionClass .getDeclaredField ( "resultToResult" )

Target exception: java.lang.NoSuchFieldException: resultToResult
(Sourced file:
component://webtools/webapp/webtools/WEB-INF/actions/service/availableservices.bsh
: Method Invocation actionClass.getDeclaredField)) (Error running BSH script
at location
[component://webtools/webapp/webtools/WEB-INF/actions/service/availableservices.bsh]:
org.ofbiz.base.util.GeneralException: Error running BSH script at
[component://webtools/webapp/webtools/WEB-INF/actions/service/availableservices.bsh],
line [147]: Sourced file:
component://webtools/webapp/webtools/WEB-INF/actions/service/availableservices.bsh
: Method Invocation actionClass.getDeclaredField : at Line: 147 : in file:
component://webtools/webapp/webtools/WEB-INF/actions/service/availableservices.bsh
: actionClass .getDeclaredField ( "resultToResult" )

Target exception: java.lang.NoSuchFieldException: resultToResult
(Sourced file:
component://webtools/webapp/webtools/WEB-INF/actions/service/availableservices.bsh
: Method Invocation actionClass.getDeclaredField) (Error running BSH script
at
[component://webtools/webapp/webtools/WEB-INF/actions/service/availableservices.bsh],
line [147]: Sourced file:
component://webtools/webapp/webtools/WEB-INF/actions/service/availableservices.bsh
: Method Invocation actionClass.getDeclaredField : at Line: 147 : in file:
component://webtools/webapp/webtools/WEB-INF/actions/service/availableservices.bsh
: actionClass .getDeclaredField ( "resultToResult" )

Target exception: java.lang.NoSuchFieldException: resultToResult
(Sourced file:
component://webtools/webapp/webtools/WEB-INF/actions/service/availableservices.bsh
: Method Invocation actionClass.getDeclaredField)))

Re: 答复: Creating a customer.

Posted by BJ Freeman <bj...@free-man.net>.
The second way is defined as an event in the
applications/party/webapp/partymgr/WEB-INF/controller.xml
   <request-map uri="createCustomer">
        <security https="true" auth="true"/>
        <event type="simple" path="org/ofbiz/party/user/UserEvents.xml"
invoke="createCustomer"/>
        <response name="success" type="view" value="viewprofile"/>
        <response name="error" type="view" value="NewCustomer"/>
    </request-map>

you can also create a service for it, as many services use the same
minilang methods.
and example:
    <service name="createVendor" engine="simple"
            location="org/ofbiz/party/party/PartyServices.xml"
invoke="createVendor" auth="true">
        <description>Create Vendor Information</description>
        <auto-attributes entity-name="Vendor" include="pk" mode="IN"
optional="false"/>
        <auto-attributes entity-name="Vendor" include="nonpk" mode="IN"
optional="true"/>
    </service>




Yitao_Zhao sent the following on 4/8/2008 8:54 PM:
> Thanks for your info, I can do that follow the first way
> 
> However , for the second way,
> I think you suggest me to use the createCustomer method, however it's not a
> service inside, I couldn't invoke that in the /servicedef/sevice.xml of my
> project
> 
> My problem is:
> Whether I could construct a service in the service.xml , and invoke the
> createCustomer method
> Or has other ways
> 
> Best regards
> 
> 
> -----邮件原件-----
> 发件人: BJ Freeman [mailto:bjfree@free-man.net] 
> 发送时间: 2008年4月8日 22:04
> 收件人: user@ofbiz.apache.org
> 主题: Re: Creating a customer.
> 
> there is already a create customer.
> I suggest you follow the create customer from the UI page thru the Services.
> https://demo.hotwaxmedia.com/partymgr/control/createnew
> if you want to create a customer from another source, you supply the
> information required by the createCustomer Service it will handle all this.
> 
> Yitao_Zhao sent the following on 4/8/2008 1:05 AM:
>> Hi, I am trying to create a customer via webservice. I am following these
>> steps
>>
>> 1) Call createPerson 
>> 2) Call createPartyRole
>> Here there are some things I don't understand:
>> Why does it create two roles: CUSTOMER and _NA_, is this correct?, I have
>> only set it to create role type CUSTOMER
>> When a role have been created, should I then get the role ID and use that
>> next time - I cannot find any service methods that have something like
>> getPartyRoleID
>> There are some service methods like ensureNaPartyRole, should I use them
> for
>> anything?
>> 3) call createPartyContactMech service, it generates a record for
>> POSTAL_ADDRESS ,but how can I set the parameters for 	POSTAL_ADDRESS
>>
>> 4) Call createPartyPostalAddress
>> This creates another record, where I can fill out address information
>>
>> My question for step 3 and 4 is, how do I create an address with one
> service
>> call? What is the right way?
>>
>> Best regards
>>
>> Tony.
>>
>>
>>
>>
> 
> 
> 
> 



答复: Creating a customer.

Posted by Yitao_Zhao <to...@gmail.com>.
Thanks for your info, I can do that follow the first way

However , for the second way,
I think you suggest me to use the createCustomer method, however it's not a
service inside, I couldn't invoke that in the /servicedef/sevice.xml of my
project

My problem is:
Whether I could construct a service in the service.xml , and invoke the
createCustomer method
Or has other ways

Best regards


-----邮件原件-----
发件人: BJ Freeman [mailto:bjfree@free-man.net] 
发送时间: 2008年4月8日 22:04
收件人: user@ofbiz.apache.org
主题: Re: Creating a customer.

there is already a create customer.
I suggest you follow the create customer from the UI page thru the Services.
https://demo.hotwaxmedia.com/partymgr/control/createnew
if you want to create a customer from another source, you supply the
information required by the createCustomer Service it will handle all this.

Yitao_Zhao sent the following on 4/8/2008 1:05 AM:
> Hi, I am trying to create a customer via webservice. I am following these
> steps
> 
> 1) Call createPerson 
> 2) Call createPartyRole
> Here there are some things I don't understand:
> Why does it create two roles: CUSTOMER and _NA_, is this correct?, I have
> only set it to create role type CUSTOMER
> When a role have been created, should I then get the role ID and use that
> next time - I cannot find any service methods that have something like
> getPartyRoleID
> There are some service methods like ensureNaPartyRole, should I use them
for
> anything?
> 3) call createPartyContactMech service, it generates a record for
> POSTAL_ADDRESS ,but how can I set the parameters for 	POSTAL_ADDRESS
> 
> 4) Call createPartyPostalAddress
> This creates another record, where I can fill out address information
> 
> My question for step 3 and 4 is, how do I create an address with one
service
> call? What is the right way?
> 
> Best regards
> 
> Tony.
> 
> 
> 
> 


Re: Creating a customer.

Posted by BJ Freeman <bj...@free-man.net>.
there is already a create customer.
I suggest you follow the create customer from the UI page thru the Services.
https://demo.hotwaxmedia.com/partymgr/control/createnew
if you want to create a customer from another source, you supply the
information required by the createCustomer Service it will handle all this.

Yitao_Zhao sent the following on 4/8/2008 1:05 AM:
> Hi, I am trying to create a customer via webservice. I am following these
> steps
> 
> 1) Call createPerson 
> 2) Call createPartyRole
> Here there are some things I don't understand:
> Why does it create two roles: CUSTOMER and _NA_, is this correct?, I have
> only set it to create role type CUSTOMER
> When a role have been created, should I then get the role ID and use that
> next time - I cannot find any service methods that have something like
> getPartyRoleID
> There are some service methods like ensureNaPartyRole, should I use them for
> anything?
> 3) call createPartyContactMech service, it generates a record for
> POSTAL_ADDRESS ,but how can I set the parameters for 	POSTAL_ADDRESS
> 
> 4) Call createPartyPostalAddress
> This creates another record, where I can fill out address information
> 
> My question for step 3 and 4 is, how do I create an address with one service
> call? What is the right way?
> 
> Best regards
> 
> Tony.
> 
> 
> 
> 


Re: Creating a customer.

Posted by Mark Ellul <ma...@catalystic.com>.
HI Tony,

In your case I would create an ofbiz service in your hot-deploy folder
(follow the helloworld tutorials) and then export it... In your service you
would call 1, 2, and 4, I am pretty sure 4 calls number 3.

Regards

MArk

On Tue, Apr 8, 2008 at 10:05 AM, Yitao_Zhao <to...@gmail.com> wrote:

> Hi, I am trying to create a customer via webservice. I am following these
> steps
>
> 1) Call createPerson
> 2) Call createPartyRole
> Here there are some things I don't understand:
> Why does it create two roles: CUSTOMER and _NA_, is this correct?, I have
> only set it to create role type CUSTOMER
> When a role have been created, should I then get the role ID and use that
> next time - I cannot find any service methods that have something like
> getPartyRoleID
> There are some service methods like ensureNaPartyRole, should I use them
> for
> anything?
> 3) call createPartyContactMech service, it generates a record for
> POSTAL_ADDRESS ,but how can I set the parameters for    POSTAL_ADDRESS
>
> 4) Call createPartyPostalAddress
> This creates another record, where I can fill out address information
>
> My question for step 3 and 4 is, how do I create an address with one
> service
> call? What is the right way?
>
> Best regards
>
> Tony.
>
>

Creating a customer.

Posted by Yitao_Zhao <to...@gmail.com>.
Hi, I am trying to create a customer via webservice. I am following these
steps

1) Call createPerson 
2) Call createPartyRole
Here there are some things I don't understand:
Why does it create two roles: CUSTOMER and _NA_, is this correct?, I have
only set it to create role type CUSTOMER
When a role have been created, should I then get the role ID and use that
next time - I cannot find any service methods that have something like
getPartyRoleID
There are some service methods like ensureNaPartyRole, should I use them for
anything?
3) call createPartyContactMech service, it generates a record for
POSTAL_ADDRESS ,but how can I set the parameters for 	POSTAL_ADDRESS

4) Call createPartyPostalAddress
This creates another record, where I can fill out address information

My question for step 3 and 4 is, how do I create an address with one service
call? What is the right way?

Best regards

Tony.


Re: Exception in Webtools

Posted by Scott Gray <le...@gmail.com>.
you should just be able to run "svn update" from the root ofbiz directory
(assuming your initial download was a checkout). Then just run "ant clean"
and then "ant" to rebuild the source files.

Regards
Scott

On 07/04/2008, Mark Ellul <ma...@catalystic.com> wrote:
>
> Hi Bilgin,
>
> I took Ofbiz out of the release 4.0 branch... My CTO wanted a stable
> build,
> so we did not go to the developers trunk
>
> So what would be the best way to get this fix into my Ofbiz build without
> getting unstable release?
>
> Regards
>
>
> Mark
>
>
> On Tue, Apr 1, 2008 at 5:14 PM, Bilgin Ibryam <bi...@iguanait.com>
> wrote:
>
> > Hi Mark,
> >
> > I think it is fixed in r591941 but not sure. Is your revision newer that
> > this?
> >
> > Bilgin
> >
> >
>

Re: Exception in Webtools

Posted by Jacques Le Roux <ja...@les7arts.com>.
(just as quick side note)
Revision 591941 is a release4.0 revision http://svn.apache.org/viewvc?rev=591941&view=rev 
see also https://issues.apache.org/jira/browse/OFBIZ-1384
Not sure it's related to your issue 

Jacques

From: "Mark Ellul" <ma...@catalystic.com>
> Hi Bilgin,
> 
> I took Ofbiz out of the release 4.0 branch... My CTO wanted a stable build,
> so we did not go to the developers trunk
> 
> So what would be the best way to get this fix into my Ofbiz build without
> getting unstable release?
> 
> Regards
> 
> Mark
> 
> On Tue, Apr 1, 2008 at 5:14 PM, Bilgin Ibryam <bi...@iguanait.com> wrote:
> 
>> Hi Mark,
>>
>> I think it is fixed in r591941 but not sure. Is your revision newer that
>> this?
>>
>> Bilgin
>>
>>
>

Re: Exception in Webtools

Posted by Mark Ellul <ma...@catalystic.com>.
Hi Bilgin,

I took Ofbiz out of the release 4.0 branch... My CTO wanted a stable build,
so we did not go to the developers trunk

So what would be the best way to get this fix into my Ofbiz build without
getting unstable release?

Regards

Mark

On Tue, Apr 1, 2008 at 5:14 PM, Bilgin Ibryam <bi...@iguanait.com> wrote:

> Hi Mark,
>
> I think it is fixed in r591941 but not sure. Is your revision newer that
> this?
>
> Bilgin
>
>

Re: Exception in Webtools

Posted by Bilgin Ibryam <bi...@iguanait.com>.
Hi Mark, 

I think it is fixed in r591941 but not sure. Is your revision newer that
this?

Bilgin