CreateProduct authorization with system login

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

CreateProduct authorization with system login

BJ Freeman
do a custom createproduct
getting this message
Service [createProduct] threw an unexpected exception/error
Exception: org.ofbiz.service.ServiceAuthException
Message: User authorization is required for this service: createProduct
I login via
                        userLogin = delegator.findByPrimaryKey("UserLogin", UtilMisc
                                        .toMap("userLoginId", "system"));
and passing that in for the login.

My question is, do I have to explicity add the system login to the
createproduct service or add the permissions in the createproduct
service to the system login?
I believe the latter is the correct way to go.
Reply | Threaded
Open this post in threaded view
|

Re: CreateProduct authorization with system login

BJ Freeman
Ok I have dug down into the serviceDipatcher.java and  Modelservice.java.
and I am lost.
I looked at the permissions for createprodcut and I have them on the
login that i am passing down.
secturity groups
CATALOG_ADMIN
CATALOGADMIN
CATALOG_ADMIN_LTD This is the one in createproducts service.
AND
FULLADMIN for good messure

since I don't see createproduct being used can some one look at it as
see if it is the way it is suppose to be.

save me some time tracking it down.

BJ Freeman sent the following on 10/7/2007 12:17 PM:

> do a custom createproduct
> getting this message
> Service [createProduct] threw an unexpected exception/error
> Exception: org.ofbiz.service.ServiceAuthException
> Message: User authorization is required for this service: createProduct
> I login via
> userLogin = delegator.findByPrimaryKey("UserLogin", UtilMisc
> .toMap("userLoginId", "system"));
> and passing that in for the login.
>
> My question is, do I have to explicity add the system login to the
> createproduct service or add the permissions in the createproduct
> service to the system login?
> I believe the latter is the correct way to go.
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: CreateProduct authorization with system login

BJ Freeman
Claification
https://localhost:8443/webtools/control/availableServices?sel_service_name=createProduct
so no security
yet
org/ofbiz/product/product/ProductServices.xml
shows
        <check-permission permission="CATALOG" action="_CREATE">
            <alt-permission permission="CATALOG_ROLE" action="_CREATE"/>
            <fail-message message="Security Error: to run createProduct
you must have the CATALOG_CREATE or CATALOG_ADMIN permission, or the
limited CATALOG_ROLE_CREATE permission"/>
        </check-permission>
so why does this not show up in the services page for createProduct
is there a bug in the process that read the simple services and not
catch the security?

could that bug also be causing my problem?

BJ Freeman sent the following on 10/8/2007 12:02 AM:

> Ok I have dug down into the serviceDipatcher.java and  Modelservice.java.
> and I am lost.
> I looked at the permissions for createprodcut and I have them on the
> login that i am passing down.
> secturity groups
> CATALOG_ADMIN
> CATALOGADMIN
> CATALOG_ADMIN_LTD This is the one in createproducts service.
> AND
> FULLADMIN for good messure
>
> since I don't see createproduct being used can some one look at it as
> see if it is the way it is suppose to be.
>
> save me some time tracking it down.
>
> BJ Freeman sent the following on 10/7/2007 12:17 PM:
>> do a custom createproduct
>> getting this message
>> Service [createProduct] threw an unexpected exception/error
>> Exception: org.ofbiz.service.ServiceAuthException
>> Message: User authorization is required for this service: createProduct
>> I login via
>> userLogin = delegator.findByPrimaryKey("UserLogin", UtilMisc
>> .toMap("userLoginId", "system"));
>> and passing that in for the login.
>>
>> My question is, do I have to explicity add the system login to the
>> createproduct service or add the permissions in the createproduct
>> service to the system login?
>> I believe the latter is the correct way to go.
>>
>>
>>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: CreateProduct authorization with system login

Scott Gray
Why do you want the system login to create a product?  Isn't that something
a user with the correct permissions would normally do?

Regards
Scott

On 09/10/2007, BJ Freeman <[hidden email]> wrote:

>
> Claification
>
> https://localhost:8443/webtools/control/availableServices?sel_service_name=createProduct
> so no security
> yet
> org/ofbiz/product/product/ProductServices.xml
> shows
>         <check-permission permission="CATALOG" action="_CREATE">
>             <alt-permission permission="CATALOG_ROLE" action="_CREATE"/>
>             <fail-message message="Security Error: to run createProduct
> you must have the CATALOG_CREATE or CATALOG_ADMIN permission, or the
> limited CATALOG_ROLE_CREATE permission"/>
>         </check-permission>
> so why does this not show up in the services page for createProduct
> is there a bug in the process that read the simple services and not
> catch the security?
>
> could that bug also be causing my problem?
>
> BJ Freeman sent the following on 10/8/2007 12:02 AM:
> > Ok I have dug down into the serviceDipatcher.java and  Modelservice.java
> .
> > and I am lost.
> > I looked at the permissions for createprodcut and I have them on the
> > login that i am passing down.
> > secturity groups
> > CATALOG_ADMIN
> > CATALOGADMIN
> > CATALOG_ADMIN_LTD This is the one in createproducts service.
> > AND
> > FULLADMIN for good messure
> >
> > since I don't see createproduct being used can some one look at it as
> > see if it is the way it is suppose to be.
> >
> > save me some time tracking it down.
> >
> > BJ Freeman sent the following on 10/7/2007 12:17 PM:
> >> do a custom createproduct
> >> getting this message
> >> Service [createProduct] threw an unexpected exception/error
> >> Exception: org.ofbiz.service.ServiceAuthException
> >> Message: User authorization is required for this service: createProduct
> >> I login via
> >>                      userLogin = delegator.findByPrimaryKey("UserLogin",
> UtilMisc
> >>                                      .toMap("userLoginId", "system"));
> >> and passing that in for the login.
> >>
> >> My question is, do I have to explicity add the system login to the
> >> createproduct service or add the permissions in the createproduct
> >> service to the system login?
> >> I believe the latter is the correct way to go.
> >>
> >>
> >>
> >
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: CreateProduct authorization

BJ Freeman
this is a automatic process
I am reading a remote xml of products from site
I am then updating the catalogs for that site in ofbiz.
since on user interaction is done thought system would be a good one to use
Since then I have created a party group and put a login that is a system
login.
still does not work.

Scott Gray sent the following on 10/8/2007 10:41 PM:

> Why do you want the system login to create a product?  Isn't that something
> a user with the correct permissions would normally do?
>
> Regards
> Scott
>
> On 09/10/2007, BJ Freeman <[hidden email]> wrote:
>> Claification
>>
>> https://localhost:8443/webtools/control/availableServices?sel_service_name=createProduct
>> so no security
>> yet
>> org/ofbiz/product/product/ProductServices.xml
>> shows
>>         <check-permission permission="CATALOG" action="_CREATE">
>>             <alt-permission permission="CATALOG_ROLE" action="_CREATE"/>
>>             <fail-message message="Security Error: to run createProduct
>> you must have the CATALOG_CREATE or CATALOG_ADMIN permission, or the
>> limited CATALOG_ROLE_CREATE permission"/>
>>         </check-permission>
>> so why does this not show up in the services page for createProduct
>> is there a bug in the process that read the simple services and not
>> catch the security?
>>
>> could that bug also be causing my problem?
>>
>> BJ Freeman sent the following on 10/8/2007 12:02 AM:
>>> Ok I have dug down into the serviceDipatcher.java and  Modelservice.java
>> .
>>> and I am lost.
>>> I looked at the permissions for createprodcut and I have them on the
>>> login that i am passing down.
>>> secturity groups
>>> CATALOG_ADMIN
>>> CATALOGADMIN
>>> CATALOG_ADMIN_LTD This is the one in createproducts service.
>>> AND
>>> FULLADMIN for good messure
>>>
>>> since I don't see createproduct being used can some one look at it as
>>> see if it is the way it is suppose to be.
>>>
>>> save me some time tracking it down.
>>>
>>> BJ Freeman sent the following on 10/7/2007 12:17 PM:
>>>> do a custom createproduct
>>>> getting this message
>>>> Service [createProduct] threw an unexpected exception/error
>>>> Exception: org.ofbiz.service.ServiceAuthException
>>>> Message: User authorization is required for this service: createProduct
>>>> I login via
>>>>                      userLogin = delegator.findByPrimaryKey("UserLogin",
>> UtilMisc
>>>>                                      .toMap("userLoginId", "system"));
>>>> and passing that in for the login.
>>>>
>>>> My question is, do I have to explicity add the system login to the
>>>> createproduct service or add the permissions in the createproduct
>>>> service to the system login?
>>>> I believe the latter is the correct way to go.
>>>>
>>>>
>>>>
>>>
>>>
>
Reply | Threaded
Open this post in threaded view
|

Re: CreateProduct authorization-updated

BJ Freeman
Ok digging down deeper.
svn583354
note: I am focusing on the userlogin
I have validated that the loginID is in the GenericValue userLogin
next
                productinfo.put("userLogin", userlogin);
plus all the rest of the stuff.
            dispatcher.runSyncIgnore("createProduct", productinfo);
I get down to servicedispatcher.java (line 758)
            // if a userLogin object is there, make sure the given
username/password exists in our local database
            GenericValue userLogin = (GenericValue)
//added to verify userlogin.
context.get("userLogin");
                        Debug.logInfo("userLogin="
                                        + userLogin.getString("userLoginId"), module);

error:
Service [createProduct] threw an unexpected exception/error
Exception: java.lang.NullPointerException
Message: null
---- stack trace
---------------------------------------------------------------
java.lang.NullPointerException
org.ofbiz.service.ServiceDispatcher.checkAuth(ServiceDispatcher.java:756)

so if I have it down right my userlogin is not getting passed down.
if there is another place I can put a debug to check were in the stream
it is losing it let me know.
it would cut my debug time.


BJ Freeman sent the following on 10/9/2007 5:27 AM:

> this is a automatic process
> I am reading a remote xml of products from site
> I am then updating the catalogs for that site in ofbiz.
> since on user interaction is done thought system would be a good one to use
> Since then I have created a party group and put a login that is a system
> login.
> still does not work.
>
> Scott Gray sent the following on 10/8/2007 10:41 PM:
>> Why do you want the system login to create a product?  Isn't that something
>> a user with the correct permissions would normally do?
>>
>> Regards
>> Scott
>>
>> On 09/10/2007, BJ Freeman <[hidden email]> wrote:
>>> Claification
>>>
>>> https://localhost:8443/webtools/control/availableServices?sel_service_name=createProduct
>>> so no security
>>> yet
>>> org/ofbiz/product/product/ProductServices.xml
>>> shows
>>>         <check-permission permission="CATALOG" action="_CREATE">
>>>             <alt-permission permission="CATALOG_ROLE" action="_CREATE"/>
>>>             <fail-message message="Security Error: to run createProduct
>>> you must have the CATALOG_CREATE or CATALOG_ADMIN permission, or the
>>> limited CATALOG_ROLE_CREATE permission"/>
>>>         </check-permission>
>>> so why does this not show up in the services page for createProduct
>>> is there a bug in the process that read the simple services and not
>>> catch the security?
>>>
>>> could that bug also be causing my problem?
>>>
>>> BJ Freeman sent the following on 10/8/2007 12:02 AM:
>>>> Ok I have dug down into the serviceDipatcher.java and  Modelservice.java
>>> .
>>>> and I am lost.
>>>> I looked at the permissions for createprodcut and I have them on the
>>>> login that i am passing down.
>>>> secturity groups
>>>> CATALOG_ADMIN
>>>> CATALOGADMIN
>>>> CATALOG_ADMIN_LTD This is the one in createproducts service.
>>>> AND
>>>> FULLADMIN for good messure
>>>>
>>>> since I don't see createproduct being used can some one look at it as
>>>> see if it is the way it is suppose to be.
>>>>
>>>> save me some time tracking it down.
>>>>
>>>> BJ Freeman sent the following on 10/7/2007 12:17 PM:
>>>>> do a custom createproduct
>>>>> getting this message
>>>>> Service [createProduct] threw an unexpected exception/error
>>>>> Exception: org.ofbiz.service.ServiceAuthException
>>>>> Message: User authorization is required for this service: createProduct
>>>>> I login via
>>>>>                      userLogin = delegator.findByPrimaryKey("UserLogin",
>>> UtilMisc
>>>>>                                      .toMap("userLoginId", "system"));
>>>>> and passing that in for the login.
>>>>>
>>>>> My question is, do I have to explicity add the system login to the
>>>>> createproduct service or add the permissions in the createproduct
>>>>> service to the system login?
>>>>> I believe the latter is the correct way to go.
>>>>>
>>>>>
>>>>>
>>>>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: CreateProduct authorization-updated

BJ Freeman
Not sure why, so this is more a FYI
when I do a "put" on a map for the userlogin it does not work unless I
use the .putAll(UtilMisc.toMap("userLogin", userLogin))

BJ Freeman sent the following on 10/10/2007 9:52 PM:

> Ok digging down deeper.
> svn583354
> note: I am focusing on the userlogin
> I have validated that the loginID is in the GenericValue userLogin
> next
> productinfo.put("userLogin", userlogin);
> plus all the rest of the stuff.
>             dispatcher.runSyncIgnore("createProduct", productinfo);
> I get down to servicedispatcher.java (line 758)
>             // if a userLogin object is there, make sure the given
> username/password exists in our local database
>             GenericValue userLogin = (GenericValue)
> //added to verify userlogin.
> context.get("userLogin");
> Debug.logInfo("userLogin="
> + userLogin.getString("userLoginId"), module);
>
> error:
> Service [createProduct] threw an unexpected exception/error
> Exception: java.lang.NullPointerException
> Message: null
> ---- stack trace
> ---------------------------------------------------------------
> java.lang.NullPointerException
> org.ofbiz.service.ServiceDispatcher.checkAuth(ServiceDispatcher.java:756)
>
> so if I have it down right my userlogin is not getting passed down.
> if there is another place I can put a debug to check were in the stream
> it is losing it let me know.
> it would cut my debug time.
>
>
> BJ Freeman sent the following on 10/9/2007 5:27 AM:
>> this is a automatic process
>> I am reading a remote xml of products from site
>> I am then updating the catalogs for that site in ofbiz.
>> since on user interaction is done thought system would be a good one to use
>> Since then I have created a party group and put a login that is a system
>> login.
>> still does not work.
>>
>> Scott Gray sent the following on 10/8/2007 10:41 PM:
>>> Why do you want the system login to create a product?  Isn't that something
>>> a user with the correct permissions would normally do?
>>>
>>> Regards
>>> Scott
>>>
>>> On 09/10/2007, BJ Freeman <[hidden email]> wrote:
>>>> Claification
>>>>
>>>> https://localhost:8443/webtools/control/availableServices?sel_service_name=createProduct
>>>> so no security
>>>> yet
>>>> org/ofbiz/product/product/ProductServices.xml
>>>> shows
>>>>         <check-permission permission="CATALOG" action="_CREATE">
>>>>             <alt-permission permission="CATALOG_ROLE" action="_CREATE"/>
>>>>             <fail-message message="Security Error: to run createProduct
>>>> you must have the CATALOG_CREATE or CATALOG_ADMIN permission, or the
>>>> limited CATALOG_ROLE_CREATE permission"/>
>>>>         </check-permission>
>>>> so why does this not show up in the services page for createProduct
>>>> is there a bug in the process that read the simple services and not
>>>> catch the security?
>>>>
>>>> could that bug also be causing my problem?
>>>>
>>>> BJ Freeman sent the following on 10/8/2007 12:02 AM:
>>>>> Ok I have dug down into the serviceDipatcher.java and  Modelservice.java
>>>> .
>>>>> and I am lost.
>>>>> I looked at the permissions for createprodcut and I have them on the
>>>>> login that i am passing down.
>>>>> secturity groups
>>>>> CATALOG_ADMIN
>>>>> CATALOGADMIN
>>>>> CATALOG_ADMIN_LTD This is the one in createproducts service.
>>>>> AND
>>>>> FULLADMIN for good messure
>>>>>
>>>>> since I don't see createproduct being used can some one look at it as
>>>>> see if it is the way it is suppose to be.
>>>>>
>>>>> save me some time tracking it down.
>>>>>
>>>>> BJ Freeman sent the following on 10/7/2007 12:17 PM:
>>>>>> do a custom createproduct
>>>>>> getting this message
>>>>>> Service [createProduct] threw an unexpected exception/error
>>>>>> Exception: org.ofbiz.service.ServiceAuthException
>>>>>> Message: User authorization is required for this service: createProduct
>>>>>> I login via
>>>>>>                      userLogin = delegator.findByPrimaryKey("UserLogin",
>>>> UtilMisc
>>>>>>                                      .toMap("userLoginId", "system"));
>>>>>> and passing that in for the login.
>>>>>>
>>>>>> My question is, do I have to explicity add the system login to the
>>>>>> createproduct service or add the permissions in the createproduct
>>>>>> service to the system login?
>>>>>> I believe the latter is the correct way to go.
>>>>>>
>>>>>>
>>>>>>
>>
>>
>
>
>
Reply | Threaded
Open this post in threaded view
|

RE: CreateProduct authorization-updated

SkipDever
I am getting this error message:

[Fatal Error] :-1:-1: Premature end of file.
[Error] :2:12: cvc-elt.1: Cannot find the declaration of element
'ofbiz-ser'.

I have scanned my entire source base and can find only two commented out
services "ofbiz-ser" and no where is "Cannot find the declaration" used.

Anyone have any idea what this error message is?

Skip

Reply | Threaded
Open this post in threaded view
|

RE: CreateProduct authorization-updated

Gavin Bee
Skip,

Basically, an xml file somewhere has an <ofbiz-ser> element and that element
is not defined in the file's schema.  Perhaps those commented out sections
are not commented properly or fully?

See http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#cvc-elt reason 1.
The "Cannot find declaration" string looks like it is coming from the XML
parser and not ofbiz code.

That probably doesn't help you track it down as it sounds like you have
already searched in all files.  Thought it might be useful to provide some
more specifics ...

Gavin :(

-----Original Message-----
From: skip@theDevers [mailto:[hidden email]]
Sent: October 17, 2007 12:39 AM
To: [hidden email]
Subject: RE: CreateProduct authorization-updated

I am getting this error message:

[Fatal Error] :-1:-1: Premature end of file.
[Error] :2:12: cvc-elt.1: Cannot find the declaration of element
'ofbiz-ser'.

I have scanned my entire source base and can find only two commented out
services "ofbiz-ser" and no where is "Cannot find the declaration" used.

Anyone have any idea what this error message is?

Skip

Reply | Threaded
Open this post in threaded view
|

RE: CreateProduct authorization-updated

SkipDever
Gavin

Thanks a load.  You were right, I missed one occurance of this that wasn't
commented out in :
applications\manufacturing\data\ManufacturingScheduledServices.xml

Here is the entry.  Can anyone point me to some documentation so I can
understand this, and in particular, what does the ofbiz-ser tag do?  Also,
the CDATA looks like well formed XML to me, so I don't understand the parser
error unless there is an XSD file somewhere that that this is applied
against.  :


    <JobSandbox jobId="8400" jobName="Init BOM Low Level Codes"
runTime="2000-01-01 00:00:00.000" serviceName="initLowLevelCode"
poolId="pool" runAsUser="system" recurrenceInfoId="300"/>
    <!--
      The calculateAllProductsCosts service is used to run the standard cost
calc routine for all the products.
      Runtime data is set to pass the currency uom to the service (USD):
chenge this to run the routine in
      another currency.
      The results of this will be available in the catalog->product->cost
tab.
      NOTE: in order to function properly, this service needs that
            all the products' low level codes (Product.billOfMaterialsLevel
field)
            are inited correctly; this is done by the initLowLevelCode
service.
    -->
    <RuntimeData runtimeDataId="8401">
        <runtimeInfo><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<ofbiz-ser>
  <map-HashMap>
    <map-Entry>
      <map-Key>
        <std-String value="currencyUomId"/>
      </map-Key>
      <map-Value>
        <std-String value="USD"/>
      </map-Value>
    </map-Entry>
    <map-Entry>
      <map-Key>
        <std-String value="costComponentTypePrefix"/>
      </map-Key>
      <map-Value>
        <std-String value="EST_STD"/>
      </map-Value>
    </map-Entry>
  </map-HashMap>
</ofbiz-ser>
        ]]></runtimeInfo>
    </RuntimeData>

    <JobSandbox jobId="8401" jobName="Calculate product costs"
runTime="2000-01-01 00:00:00.000" serviceName="calculateAllProductsCosts"
runtimeDataId="8401" poolId="pool" runAsUser="system"
recurrenceInfoId="301"/>










-----Original Message-----
From: Gavin Bee [mailto:[hidden email]]
Sent: Tuesday, October 16, 2007 9:53 PM
To: [hidden email]
Subject: RE: CreateProduct authorization-updated


Skip,

Basically, an xml file somewhere has an <ofbiz-ser> element and that element
is not defined in the file's schema.  Perhaps those commented out sections
are not commented properly or fully?

See http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#cvc-elt reason 1.
The "Cannot find declaration" string looks like it is coming from the XML
parser and not ofbiz code.

That probably doesn't help you track it down as it sounds like you have
already searched in all files.  Thought it might be useful to provide some
more specifics ...

Gavin :(

-----Original Message-----
From: skip@theDevers [mailto:[hidden email]]
Sent: October 17, 2007 12:39 AM
To: [hidden email]
Subject: RE: CreateProduct authorization-updated

I am getting this error message:

[Fatal Error] :-1:-1: Premature end of file.
[Error] :2:12: cvc-elt.1: Cannot find the declaration of element
'ofbiz-ser'.

I have scanned my entire source base and can find only two commented out
services "ofbiz-ser" and no where is "Cannot find the declaration" used.

Anyone have any idea what this error message is?

Skip


Reply | Threaded
Open this post in threaded view
|

Re: CreateProduct authorization-updated

Scott Gray
I can't remember the details but there is a jira issue for this, anyway it
is a trivial thing and can safely be ignored.

Regards
Scott

On 17/10/2007, skip@theDevers <[hidden email]> wrote:

>
> Gavin
>
> Thanks a load.  You were right, I missed one occurance of this that wasn't
> commented out in :
> applications\manufacturing\data\ManufacturingScheduledServices.xml
>
> Here is the entry.  Can anyone point me to some documentation so I can
> understand this, and in particular, what does the ofbiz-ser tag do?  Also,
> the CDATA looks like well formed XML to me, so I don't understand the
> parser
> error unless there is an XSD file somewhere that that this is applied
> against.  :
>
>
>     <JobSandbox jobId="8400" jobName="Init BOM Low Level Codes"
> runTime="2000-01-01 00:00:00.000" serviceName="initLowLevelCode"
> poolId="pool" runAsUser="system" recurrenceInfoId="300"/>
>     <!--
>       The calculateAllProductsCosts service is used to run the standard
> cost
> calc routine for all the products.
>       Runtime data is set to pass the currency uom to the service (USD):
> chenge this to run the routine in
>       another currency.
>       The results of this will be available in the catalog->product->cost
> tab.
>       NOTE: in order to function properly, this service needs that
>             all the products' low level codes (
> Product.billOfMaterialsLevel
> field)
>             are inited correctly; this is done by the initLowLevelCode
> service.
>     -->
>     <RuntimeData runtimeDataId="8401">
>         <runtimeInfo><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
> <ofbiz-ser>
>   <map-HashMap>
>     <map-Entry>
>       <map-Key>
>         <std-String value="currencyUomId"/>
>       </map-Key>
>       <map-Value>
>         <std-String value="USD"/>
>       </map-Value>
>     </map-Entry>
>     <map-Entry>
>       <map-Key>
>         <std-String value="costComponentTypePrefix"/>
>       </map-Key>
>       <map-Value>
>         <std-String value="EST_STD"/>
>       </map-Value>
>     </map-Entry>
>   </map-HashMap>
> </ofbiz-ser>
>         ]]></runtimeInfo>
>     </RuntimeData>
>
>     <JobSandbox jobId="8401" jobName="Calculate product costs"
> runTime="2000-01-01 00:00:00.000" serviceName="calculateAllProductsCosts"
> runtimeDataId="8401" poolId="pool" runAsUser="system"
> recurrenceInfoId="301"/>
>
>
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: Gavin Bee [mailto:[hidden email]]
> Sent: Tuesday, October 16, 2007 9:53 PM
> To: [hidden email]
> Subject: RE: CreateProduct authorization-updated
>
>
> Skip,
>
> Basically, an xml file somewhere has an <ofbiz-ser> element and that
> element
> is not defined in the file's schema.  Perhaps those commented out sections
> are not commented properly or fully?
>
> See http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#cvc-elt reason 1.
> The "Cannot find declaration" string looks like it is coming from the XML
> parser and not ofbiz code.
>
> That probably doesn't help you track it down as it sounds like you have
> already searched in all files.  Thought it might be useful to provide some
> more specifics ...
>
> Gavin :(
>
> -----Original Message-----
> From: skip@theDevers [mailto:[hidden email]]
> Sent: October 17, 2007 12:39 AM
> To: [hidden email]
> Subject: RE: CreateProduct authorization-updated
>
> I am getting this error message:
>
> [Fatal Error] :-1:-1: Premature end of file.
> [Error] :2:12: cvc-elt.1: Cannot find the declaration of element
> 'ofbiz-ser'.
>
> I have scanned my entire source base and can find only two commented out
> services "ofbiz-ser" and no where is "Cannot find the declaration" used.
>
> Anyone have any idea what this error message is?
>
> Skip
>
>
>
Reply | Threaded
Open this post in threaded view
|

RE: CreateProduct authorization-updated

SkipDever
Scott

Thank you sir.  For the time being, I'll just comment out the service.

-----Original Message-----
From: Scott Gray [mailto:[hidden email]]
Sent: Wednesday, October 17, 2007 12:05 AM
To: [hidden email]
Subject: Re: CreateProduct authorization-updated


I can't remember the details but there is a jira issue for this, anyway it
is a trivial thing and can safely be ignored.

Regards
Scott

On 17/10/2007, skip@theDevers <[hidden email]> wrote:

>
> Gavin
>
> Thanks a load.  You were right, I missed one occurance of this that wasn't
> commented out in :
> applications\manufacturing\data\ManufacturingScheduledServices.xml
>
> Here is the entry.  Can anyone point me to some documentation so I can
> understand this, and in particular, what does the ofbiz-ser tag do?  Also,
> the CDATA looks like well formed XML to me, so I don't understand the
> parser
> error unless there is an XSD file somewhere that that this is applied
> against.  :
>
>
>     <JobSandbox jobId="8400" jobName="Init BOM Low Level Codes"
> runTime="2000-01-01 00:00:00.000" serviceName="initLowLevelCode"
> poolId="pool" runAsUser="system" recurrenceInfoId="300"/>
>     <!--
>       The calculateAllProductsCosts service is used to run the standard
> cost
> calc routine for all the products.
>       Runtime data is set to pass the currency uom to the service (USD):
> chenge this to run the routine in
>       another currency.
>       The results of this will be available in the catalog->product->cost
> tab.
>       NOTE: in order to function properly, this service needs that
>             all the products' low level codes (
> Product.billOfMaterialsLevel
> field)
>             are inited correctly; this is done by the initLowLevelCode
> service.
>     -->
>     <RuntimeData runtimeDataId="8401">
>         <runtimeInfo><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
> <ofbiz-ser>
>   <map-HashMap>
>     <map-Entry>
>       <map-Key>
>         <std-String value="currencyUomId"/>
>       </map-Key>
>       <map-Value>
>         <std-String value="USD"/>
>       </map-Value>
>     </map-Entry>
>     <map-Entry>
>       <map-Key>
>         <std-String value="costComponentTypePrefix"/>
>       </map-Key>
>       <map-Value>
>         <std-String value="EST_STD"/>
>       </map-Value>
>     </map-Entry>
>   </map-HashMap>
> </ofbiz-ser>
>         ]]></runtimeInfo>
>     </RuntimeData>
>
>     <JobSandbox jobId="8401" jobName="Calculate product costs"
> runTime="2000-01-01 00:00:00.000" serviceName="calculateAllProductsCosts"
> runtimeDataId="8401" poolId="pool" runAsUser="system"
> recurrenceInfoId="301"/>
>
>
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: Gavin Bee [mailto:[hidden email]]
> Sent: Tuesday, October 16, 2007 9:53 PM
> To: [hidden email]
> Subject: RE: CreateProduct authorization-updated
>
>
> Skip,
>
> Basically, an xml file somewhere has an <ofbiz-ser> element and that
> element
> is not defined in the file's schema.  Perhaps those commented out sections
> are not commented properly or fully?
>
> See http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#cvc-elt reason 1.
> The "Cannot find declaration" string looks like it is coming from the XML
> parser and not ofbiz code.
>
> That probably doesn't help you track it down as it sounds like you have
> already searched in all files.  Thought it might be useful to provide some
> more specifics ...
>
> Gavin :(
>
> -----Original Message-----
> From: skip@theDevers [mailto:[hidden email]]
> Sent: October 17, 2007 12:39 AM
> To: [hidden email]
> Subject: RE: CreateProduct authorization-updated
>
> I am getting this error message:
>
> [Fatal Error] :-1:-1: Premature end of file.
> [Error] :2:12: cvc-elt.1: Cannot find the declaration of element
> 'ofbiz-ser'.
>
> I have scanned my entire source base and can find only two commented out
> services "ofbiz-ser" and no where is "Cannot find the declaration" used.
>
> Anyone have any idea what this error message is?
>
> Skip
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: CreateProduct authorization-updated

Scott Gray
That probably won't help, I'm pretty sure the xml being complained about is
generated at runtime by the framework.

Scott

On 17/10/2007, skip@theDevers <[hidden email]> wrote:

>
> Scott
>
> Thank you sir.  For the time being, I'll just comment out the service.
>
> -----Original Message-----
> From: Scott Gray [mailto:[hidden email]]
> Sent: Wednesday, October 17, 2007 12:05 AM
> To: [hidden email]
> Subject: Re: CreateProduct authorization-updated
>
>
> I can't remember the details but there is a jira issue for this, anyway it
> is a trivial thing and can safely be ignored.
>
> Regards
> Scott
>
> On 17/10/2007, skip@theDevers <[hidden email]> wrote:
> >
> > Gavin
> >
> > Thanks a load.  You were right, I missed one occurance of this that
> wasn't
> > commented out in :
> > applications\manufacturing\data\ManufacturingScheduledServices.xml
> >
> > Here is the entry.  Can anyone point me to some documentation so I can
> > understand this, and in particular, what does the ofbiz-ser tag
> do?  Also,
> > the CDATA looks like well formed XML to me, so I don't understand the
> > parser
> > error unless there is an XSD file somewhere that that this is applied
> > against.  :
> >
> >
> >     <JobSandbox jobId="8400" jobName="Init BOM Low Level Codes"
> > runTime="2000-01-01 00:00:00.000" serviceName="initLowLevelCode"
> > poolId="pool" runAsUser="system" recurrenceInfoId="300"/>
> >     <!--
> >       The calculateAllProductsCosts service is used to run the standard
> > cost
> > calc routine for all the products.
> >       Runtime data is set to pass the currency uom to the service (USD):
> > chenge this to run the routine in
> >       another currency.
> >       The results of this will be available in the
> catalog->product->cost
> > tab.
> >       NOTE: in order to function properly, this service needs that
> >             all the products' low level codes (
> > Product.billOfMaterialsLevel
> > field)
> >             are inited correctly; this is done by the initLowLevelCode
> > service.
> >     -->
> >     <RuntimeData runtimeDataId="8401">
> >         <runtimeInfo><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
> > <ofbiz-ser>
> >   <map-HashMap>
> >     <map-Entry>
> >       <map-Key>
> >         <std-String value="currencyUomId"/>
> >       </map-Key>
> >       <map-Value>
> >         <std-String value="USD"/>
> >       </map-Value>
> >     </map-Entry>
> >     <map-Entry>
> >       <map-Key>
> >         <std-String value="costComponentTypePrefix"/>
> >       </map-Key>
> >       <map-Value>
> >         <std-String value="EST_STD"/>
> >       </map-Value>
> >     </map-Entry>
> >   </map-HashMap>
> > </ofbiz-ser>
> >         ]]></runtimeInfo>
> >     </RuntimeData>
> >
> >     <JobSandbox jobId="8401" jobName="Calculate product costs"
> > runTime="2000-01-01 00:00:00.000"
> serviceName="calculateAllProductsCosts"
> > runtimeDataId="8401" poolId="pool" runAsUser="system"
> > recurrenceInfoId="301"/>
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > -----Original Message-----
> > From: Gavin Bee [mailto:[hidden email]]
> > Sent: Tuesday, October 16, 2007 9:53 PM
> > To: [hidden email]
> > Subject: RE: CreateProduct authorization-updated
> >
> >
> > Skip,
> >
> > Basically, an xml file somewhere has an <ofbiz-ser> element and that
> > element
> > is not defined in the file's schema.  Perhaps those commented out
> sections
> > are not commented properly or fully?
> >
> > See http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#cvc-elt reason
> 1.
> > The "Cannot find declaration" string looks like it is coming from the
> XML
> > parser and not ofbiz code.
> >
> > That probably doesn't help you track it down as it sounds like you have
> > already searched in all files.  Thought it might be useful to provide
> some
> > more specifics ...
> >
> > Gavin :(
> >
> > -----Original Message-----
> > From: skip@theDevers [mailto:[hidden email]]
> > Sent: October 17, 2007 12:39 AM
> > To: [hidden email]
> > Subject: RE: CreateProduct authorization-updated
> >
> > I am getting this error message:
> >
> > [Fatal Error] :-1:-1: Premature end of file.
> > [Error] :2:12: cvc-elt.1: Cannot find the declaration of element
> > 'ofbiz-ser'.
> >
> > I have scanned my entire source base and can find only two commented out
> > services "ofbiz-ser" and no where is "Cannot find the declaration" used.
> >
> > Anyone have any idea what this error message is?
> >
> > Skip
> >
> >
> >
>
>
Reply | Threaded
Open this post in threaded view
|

Re: CreateProduct authorization-updated

Jacopo Cappellato
Am I wrong or this is true for all the xml seed/demo data files in OFBiz?
There is no xsd grammar file for them and so the parser can't validate them.

Jacopo

Scott Gray wrote:

> That probably won't help, I'm pretty sure the xml being complained about is
> generated at runtime by the framework.
>
> Scott
>
> On 17/10/2007, skip@theDevers <[hidden email]> wrote:
>> Scott
>>
>> Thank you sir.  For the time being, I'll just comment out the service.
>>
>> -----Original Message-----
>> From: Scott Gray [mailto:[hidden email]]
>> Sent: Wednesday, October 17, 2007 12:05 AM
>> To: [hidden email]
>> Subject: Re: CreateProduct authorization-updated
>>
>>
>> I can't remember the details but there is a jira issue for this, anyway it
>> is a trivial thing and can safely be ignored.
>>
>> Regards
>> Scott
>>
>> On 17/10/2007, skip@theDevers <[hidden email]> wrote:
>>> Gavin
>>>
>>> Thanks a load.  You were right, I missed one occurance of this that
>> wasn't
>>> commented out in :
>>> applications\manufacturing\data\ManufacturingScheduledServices.xml
>>>
>>> Here is the entry.  Can anyone point me to some documentation so I can
>>> understand this, and in particular, what does the ofbiz-ser tag
>> do?  Also,
>>> the CDATA looks like well formed XML to me, so I don't understand the
>>> parser
>>> error unless there is an XSD file somewhere that that this is applied
>>> against.  :
>>>
>>>
>>>     <JobSandbox jobId="8400" jobName="Init BOM Low Level Codes"
>>> runTime="2000-01-01 00:00:00.000" serviceName="initLowLevelCode"
>>> poolId="pool" runAsUser="system" recurrenceInfoId="300"/>
>>>     <!--
>>>       The calculateAllProductsCosts service is used to run the standard
>>> cost
>>> calc routine for all the products.
>>>       Runtime data is set to pass the currency uom to the service (USD):
>>> chenge this to run the routine in
>>>       another currency.
>>>       The results of this will be available in the
>> catalog->product->cost
>>> tab.
>>>       NOTE: in order to function properly, this service needs that
>>>             all the products' low level codes (
>>> Product.billOfMaterialsLevel
>>> field)
>>>             are inited correctly; this is done by the initLowLevelCode
>>> service.
>>>     -->
>>>     <RuntimeData runtimeDataId="8401">
>>>         <runtimeInfo><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
>>> <ofbiz-ser>
>>>   <map-HashMap>
>>>     <map-Entry>
>>>       <map-Key>
>>>         <std-String value="currencyUomId"/>
>>>       </map-Key>
>>>       <map-Value>
>>>         <std-String value="USD"/>
>>>       </map-Value>
>>>     </map-Entry>
>>>     <map-Entry>
>>>       <map-Key>
>>>         <std-String value="costComponentTypePrefix"/>
>>>       </map-Key>
>>>       <map-Value>
>>>         <std-String value="EST_STD"/>
>>>       </map-Value>
>>>     </map-Entry>
>>>   </map-HashMap>
>>> </ofbiz-ser>
>>>         ]]></runtimeInfo>
>>>     </RuntimeData>
>>>
>>>     <JobSandbox jobId="8401" jobName="Calculate product costs"
>>> runTime="2000-01-01 00:00:00.000"
>> serviceName="calculateAllProductsCosts"
>>> runtimeDataId="8401" poolId="pool" runAsUser="system"
>>> recurrenceInfoId="301"/>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: Gavin Bee [mailto:[hidden email]]
>>> Sent: Tuesday, October 16, 2007 9:53 PM
>>> To: [hidden email]
>>> Subject: RE: CreateProduct authorization-updated
>>>
>>>
>>> Skip,
>>>
>>> Basically, an xml file somewhere has an <ofbiz-ser> element and that
>>> element
>>> is not defined in the file's schema.  Perhaps those commented out
>> sections
>>> are not commented properly or fully?
>>>
>>> See http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#cvc-elt reason
>> 1.
>>> The "Cannot find declaration" string looks like it is coming from the
>> XML
>>> parser and not ofbiz code.
>>>
>>> That probably doesn't help you track it down as it sounds like you have
>>> already searched in all files.  Thought it might be useful to provide
>> some
>>> more specifics ...
>>>
>>> Gavin :(
>>>
>>> -----Original Message-----
>>> From: skip@theDevers [mailto:[hidden email]]
>>> Sent: October 17, 2007 12:39 AM
>>> To: [hidden email]
>>> Subject: RE: CreateProduct authorization-updated
>>>
>>> I am getting this error message:
>>>
>>> [Fatal Error] :-1:-1: Premature end of file.
>>> [Error] :2:12: cvc-elt.1: Cannot find the declaration of element
>>> 'ofbiz-ser'.
>>>
>>> I have scanned my entire source base and can find only two commented out
>>> services "ofbiz-ser" and no where is "Cannot find the declaration" used.
>>>
>>> Anyone have any idea what this error message is?
>>>
>>> Skip
>>>
>>>
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: CreateProduct authorization-updated

Jacques Le Roux
Administrator
I think you are right

Jacques

De : "Jacopo Cappellato" <[hidden email]>


> Am I wrong or this is true for all the xml seed/demo data files in OFBiz?
> There is no xsd grammar file for them and so the parser can't validate them.
>
> Jacopo
>
> Scott Gray wrote:
> > That probably won't help, I'm pretty sure the xml being complained about is
> > generated at runtime by the framework.
> >
> > Scott
> >
> > On 17/10/2007, skip@theDevers <[hidden email]> wrote:
> >> Scott
> >>
> >> Thank you sir.  For the time being, I'll just comment out the service.
> >>
> >> -----Original Message-----
> >> From: Scott Gray [mailto:[hidden email]]
> >> Sent: Wednesday, October 17, 2007 12:05 AM
> >> To: [hidden email]
> >> Subject: Re: CreateProduct authorization-updated
> >>
> >>
> >> I can't remember the details but there is a jira issue for this, anyway it
> >> is a trivial thing and can safely be ignored.
> >>
> >> Regards
> >> Scott
> >>
> >> On 17/10/2007, skip@theDevers <[hidden email]> wrote:
> >>> Gavin
> >>>
> >>> Thanks a load.  You were right, I missed one occurance of this that
> >> wasn't
> >>> commented out in :
> >>> applications\manufacturing\data\ManufacturingScheduledServices.xml
> >>>
> >>> Here is the entry.  Can anyone point me to some documentation so I can
> >>> understand this, and in particular, what does the ofbiz-ser tag
> >> do?  Also,
> >>> the CDATA looks like well formed XML to me, so I don't understand the
> >>> parser
> >>> error unless there is an XSD file somewhere that that this is applied
> >>> against.  :
> >>>
> >>>
> >>>     <JobSandbox jobId="8400" jobName="Init BOM Low Level Codes"
> >>> runTime="2000-01-01 00:00:00.000" serviceName="initLowLevelCode"
> >>> poolId="pool" runAsUser="system" recurrenceInfoId="300"/>
> >>>     <!--
> >>>       The calculateAllProductsCosts service is used to run the standard
> >>> cost
> >>> calc routine for all the products.
> >>>       Runtime data is set to pass the currency uom to the service (USD):
> >>> chenge this to run the routine in
> >>>       another currency.
> >>>       The results of this will be available in the
> >> catalog->product->cost
> >>> tab.
> >>>       NOTE: in order to function properly, this service needs that
> >>>             all the products' low level codes (
> >>> Product.billOfMaterialsLevel
> >>> field)
> >>>             are inited correctly; this is done by the initLowLevelCode
> >>> service.
> >>>     -->
> >>>     <RuntimeData runtimeDataId="8401">
> >>>         <runtimeInfo><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
> >>> <ofbiz-ser>
> >>>   <map-HashMap>
> >>>     <map-Entry>
> >>>       <map-Key>
> >>>         <std-String value="currencyUomId"/>
> >>>       </map-Key>
> >>>       <map-Value>
> >>>         <std-String value="USD"/>
> >>>       </map-Value>
> >>>     </map-Entry>
> >>>     <map-Entry>
> >>>       <map-Key>
> >>>         <std-String value="costComponentTypePrefix"/>
> >>>       </map-Key>
> >>>       <map-Value>
> >>>         <std-String value="EST_STD"/>
> >>>       </map-Value>
> >>>     </map-Entry>
> >>>   </map-HashMap>
> >>> </ofbiz-ser>
> >>>         ]]></runtimeInfo>
> >>>     </RuntimeData>
> >>>
> >>>     <JobSandbox jobId="8401" jobName="Calculate product costs"
> >>> runTime="2000-01-01 00:00:00.000"
> >> serviceName="calculateAllProductsCosts"
> >>> runtimeDataId="8401" poolId="pool" runAsUser="system"
> >>> recurrenceInfoId="301"/>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> -----Original Message-----
> >>> From: Gavin Bee [mailto:[hidden email]]
> >>> Sent: Tuesday, October 16, 2007 9:53 PM
> >>> To: [hidden email]
> >>> Subject: RE: CreateProduct authorization-updated
> >>>
> >>>
> >>> Skip,
> >>>
> >>> Basically, an xml file somewhere has an <ofbiz-ser> element and that
> >>> element
> >>> is not defined in the file's schema.  Perhaps those commented out
> >> sections
> >>> are not commented properly or fully?
> >>>
> >>> See http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#cvc-elt reason
> >> 1.
> >>> The "Cannot find declaration" string looks like it is coming from the
> >> XML
> >>> parser and not ofbiz code.
> >>>
> >>> That probably doesn't help you track it down as it sounds like you have
> >>> already searched in all files.  Thought it might be useful to provide
> >> some
> >>> more specifics ...
> >>>
> >>> Gavin :(
> >>>
> >>> -----Original Message-----
> >>> From: skip@theDevers [mailto:[hidden email]]
> >>> Sent: October 17, 2007 12:39 AM
> >>> To: [hidden email]
> >>> Subject: RE: CreateProduct authorization-updated
> >>>
> >>> I am getting this error message:
> >>>
> >>> [Fatal Error] :-1:-1: Premature end of file.
> >>> [Error] :2:12: cvc-elt.1: Cannot find the declaration of element
> >>> 'ofbiz-ser'.
> >>>
> >>> I have scanned my entire source base and can find only two commented out
> >>> services "ofbiz-ser" and no where is "Cannot find the declaration" used.
> >>>
> >>> Anyone have any idea what this error message is?
> >>>
> >>> Skip
> >>>
> >>>
> >>>
> >>
> >
>