Users - Problem calling static method in minilang

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

Users - Problem calling static method in minilang

byersa
Can anyone see why I should get the message below when running the op
listed below that? I can work around it, but I would like to know what
is going on. I traced it as far as I could. It finds the class, all
right, but not the method in the class? I know that it is a long shot,
but I am hoping someone can see an obvious error or has run into the
same thing.

Error running serviceName, 'persistContentRevisionAndItem'. ERROR: Could
not complete the Update ContentRevision and ContentRevisionItem
[file:/usr/local/ofbiz-esp/applications/content/script/org/ofbiz/content/compdoc/CompDocServices.xml#persistContentRevisionAndItem]
process [Could not find method to execute named formatPaddedNumber:
java.lang.NoSuchMethodException:
org.ofbiz.base.util.UtilFormatOut.formatPaddedNumber(java.lang.Long,
java.lang.Integer)]

        <call-class-method method-name="formatPaddedNumber"
class-name="org.ofbiz.base.util.UtilFormatOut"
                    ret-field-name="paddedSeqId">
            <field field-name="incrementedSeq" type="Long"/>
            <field field-name="numericPadding" type="Integer"/>
        </call-class-method>

-Al
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Problem calling static method in minilang

byersa
Of course, I was calling with Long and Integer because minilang doesn't
accept "long" and "int" which formatPaddedNumber requires. I wrote a
wrapper to convert. Is there a better way?

-Al

Al Byers wrote:

>Can anyone see why I should get the message below when running the op
>listed below that? I can work around it, but I would like to know what
>is going on. I traced it as far as I could. It finds the class, all
>right, but not the method in the class? I know that it is a long shot,
>but I am hoping someone can see an obvious error or has run into the
>same thing.
>
>Error running serviceName, 'persistContentRevisionAndItem'. ERROR: Could
>not complete the Update ContentRevision and ContentRevisionItem
>[file:/usr/local/ofbiz-esp/applications/content/script/org/ofbiz/content/compdoc/CompDocServices.xml#persistContentRevisionAndItem]
>process [Could not find method to execute named formatPaddedNumber:
>java.lang.NoSuchMethodException:
>org.ofbiz.base.util.UtilFormatOut.formatPaddedNumber(java.lang.Long,
>java.lang.Integer)]
>
>        <call-class-method method-name="formatPaddedNumber"
>class-name="org.ofbiz.base.util.UtilFormatOut"
>                    ret-field-name="paddedSeqId">
>            <field field-name="incrementedSeq" type="Long"/>
>            <field field-name="numericPadding" type="Integer"/>
>        </call-class-method>
>
>-Al
>
>_______________________________________________
>Users mailing list
>[hidden email]
>http://lists.ofbiz.org/mailman/listinfo/users
>
>  
>

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Problem calling static method in minilang

Alexandre Gomes-8
Al,

   I may be wrong but I think I saw a minilang example using
java.lang.Number for the long type.

Alexandre Gomes

On Wed, 2006-01-25 at 16:45 -0700, Al Byers wrote:

> Of course, I was calling with Long and Integer because minilang doesn't
> accept "long" and "int" which formatPaddedNumber requires. I wrote a
> wrapper to convert. Is there a better way?
>
> -Al
>
> Al Byers wrote:
>
> >Can anyone see why I should get the message below when running the op
> >listed below that? I can work around it, but I would like to know what
> >is going on. I traced it as far as I could. It finds the class, all
> >right, but not the method in the class? I know that it is a long shot,
> >but I am hoping someone can see an obvious error or has run into the
> >same thing.
> >
> >Error running serviceName, 'persistContentRevisionAndItem'. ERROR: Could
> >not complete the Update ContentRevision and ContentRevisionItem
> >[file:/usr/local/ofbiz-esp/applications/content/script/org/ofbiz/content/compdoc/CompDocServices.xml#persistContentRevisionAndItem]
> >process [Could not find method to execute named formatPaddedNumber:
> >java.lang.NoSuchMethodException:
> >org.ofbiz.base.util.UtilFormatOut.formatPaddedNumber(java.lang.Long,
> >java.lang.Integer)]
> >
> >        <call-class-method method-name="formatPaddedNumber"
> >class-name="org.ofbiz.base.util.UtilFormatOut"
> >                    ret-field-name="paddedSeqId">
> >            <field field-name="incrementedSeq" type="Long"/>
> >            <field field-name="numericPadding" type="Integer"/>
> >        </call-class-method>
> >
> >-Al
> >
> >_______________________________________________
> >Users mailing list
> >[hidden email]
> >http://lists.ofbiz.org/mailman/listinfo/users
> >
> >  
> >
>
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Problem calling static method in minilang

David E. Jones

I couldn't find a good way to do calls to methods that have arguments  
that are the basic data types (like int, long, etc), so I have  
changed some methods or added wrappers that accept number objects...  
I don't know of any good way around that right now.

-David


On Jan 25, 2006, at 5:44 PM, Alexandre Gomes wrote:

> Al,
>
>    I may be wrong but I think I saw a minilang example using
> java.lang.Number for the long type.
>
> Alexandre Gomes
>
> On Wed, 2006-01-25 at 16:45 -0700, Al Byers wrote:
>> Of course, I was calling with Long and Integer because minilang  
>> doesn't
>> accept "long" and "int" which formatPaddedNumber requires. I wrote a
>> wrapper to convert. Is there a better way?
>>
>> -Al
>>
>> Al Byers wrote:
>>
>>> Can anyone see why I should get the message below when running  
>>> the op
>>> listed below that? I can work around it, but I would like to know  
>>> what
>>> is going on. I traced it as far as I could. It finds the class, all
>>> right, but not the method in the class? I know that it is a long  
>>> shot,
>>> but I am hoping someone can see an obvious error or has run into the
>>> same thing.
>>>
>>> Error running serviceName, 'persistContentRevisionAndItem'.  
>>> ERROR: Could
>>> not complete the Update ContentRevision and ContentRevisionItem
>>> [file:/usr/local/ofbiz-esp/applications/content/script/org/ofbiz/
>>> content/compdoc/CompDocServices.xml#persistContentRevisionAndItem]
>>> process [Could not find method to execute named formatPaddedNumber:
>>> java.lang.NoSuchMethodException:
>>> org.ofbiz.base.util.UtilFormatOut.formatPaddedNumber(java.lang.Long,
>>> java.lang.Integer)]
>>>
>>>        <call-class-method method-name="formatPaddedNumber"
>>> class-name="org.ofbiz.base.util.UtilFormatOut"
>>>                    ret-field-name="paddedSeqId">
>>>            <field field-name="incrementedSeq" type="Long"/>
>>>            <field field-name="numericPadding" type="Integer"/>
>>>        </call-class-method>
>>>
>>> -Al
>>>
>>> _______________________________________________
>>> Users mailing list
>>> [hidden email]
>>> http://lists.ofbiz.org/mailman/listinfo/users
>>>
>>>
>>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.ofbiz.org/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Problem calling static method in minilang

Charles Johnson-2
Autoboxing? But of course we'd need >= 1.5. Is that being worked on?

CJ

David E. Jones wrote:

>I couldn't find a good way to do calls to methods that have arguments  
>that are the basic data types (like int, long, etc), so I have  
>changed some methods or added wrappers that accept number objects...  
>I don't know of any good way around that right now.
>
>-David
>
>
>On Jan 25, 2006, at 5:44 PM, Alexandre Gomes wrote:
>
>  
>
>>Al,
>>
>>   I may be wrong but I think I saw a minilang example using
>>java.lang.Number for the long type.
>>
>>Alexandre Gomes
>>
>>On Wed, 2006-01-25 at 16:45 -0700, Al Byers wrote:
>>    
>>
>>>Of course, I was calling with Long and Integer because minilang  
>>>doesn't
>>>accept "long" and "int" which formatPaddedNumber requires. I wrote a
>>>wrapper to convert. Is there a better way?
>>>
>>>-Al
>>>
>>>Al Byers wrote:
>>>
>>>      
>>>
>>>>Can anyone see why I should get the message below when running  
>>>>the op
>>>>listed below that? I can work around it, but I would like to know  
>>>>what
>>>>is going on. I traced it as far as I could. It finds the class, all
>>>>right, but not the method in the class? I know that it is a long  
>>>>shot,
>>>>but I am hoping someone can see an obvious error or has run into the
>>>>same thing.
>>>>
>>>>Error running serviceName, 'persistContentRevisionAndItem'.  
>>>>ERROR: Could
>>>>not complete the Update ContentRevision and ContentRevisionItem
>>>>[file:/usr/local/ofbiz-esp/applications/content/script/org/ofbiz/
>>>>content/compdoc/CompDocServices.xml#persistContentRevisionAndItem]
>>>>process [Could not find method to execute named formatPaddedNumber:
>>>>java.lang.NoSuchMethodException:
>>>>org.ofbiz.base.util.UtilFormatOut.formatPaddedNumber(java.lang.Long,
>>>>java.lang.Integer)]
>>>>
>>>>       <call-class-method method-name="formatPaddedNumber"
>>>>class-name="org.ofbiz.base.util.UtilFormatOut"
>>>>                   ret-field-name="paddedSeqId">
>>>>           <field field-name="incrementedSeq" type="Long"/>
>>>>           <field field-name="numericPadding" type="Integer"/>
>>>>       </call-class-method>
>>>>
>>>>-Al
>>>>
>>>>_______________________________________________
>>>>Users mailing list
>>>>[hidden email]
>>>>http://lists.ofbiz.org/mailman/listinfo/users
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>_______________________________________________
>>>Users mailing list
>>>[hidden email]
>>>http://lists.ofbiz.org/mailman/listinfo/users
>>>      
>>>
>>_______________________________________________
>>Users mailing list
>>[hidden email]
>>http://lists.ofbiz.org/mailman/listinfo/users
>>    
>>
>
>
>_______________________________________________
>Users mailing list
>[hidden email]
>http://lists.ofbiz.org/mailman/listinfo/users
>
>
>  
>
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Problem calling static method in minilang

Andrew Sykes
Yup, autoboxing seems like the answer.

Although I imagine it's going to lead to a few baffled moments!


On Thu, 2006-01-26 at 15:13 +0000, Charles Johnson wrote:

> Autoboxing? But of course we'd need >= 1.5. Is that being worked on?
>
> CJ
>
> David E. Jones wrote:
>
> >I couldn't find a good way to do calls to methods that have arguments  
> >that are the basic data types (like int, long, etc), so I have  
> >changed some methods or added wrappers that accept number objects...  
> >I don't know of any good way around that right now.
> >
> >-David
> >
> >
> >On Jan 25, 2006, at 5:44 PM, Alexandre Gomes wrote:
> >
> >  
> >
> >>Al,
> >>
> >>   I may be wrong but I think I saw a minilang example using
> >>java.lang.Number for the long type.
> >>
> >>Alexandre Gomes
> >>
> >>On Wed, 2006-01-25 at 16:45 -0700, Al Byers wrote:
> >>    
> >>
> >>>Of course, I was calling with Long and Integer because minilang  
> >>>doesn't
> >>>accept "long" and "int" which formatPaddedNumber requires. I wrote a
> >>>wrapper to convert. Is there a better way?
> >>>
> >>>-Al
> >>>
> >>>Al Byers wrote:
> >>>
> >>>      
> >>>
> >>>>Can anyone see why I should get the message below when running  
> >>>>the op
> >>>>listed below that? I can work around it, but I would like to know  
> >>>>what
> >>>>is going on. I traced it as far as I could. It finds the class, all
> >>>>right, but not the method in the class? I know that it is a long  
> >>>>shot,
> >>>>but I am hoping someone can see an obvious error or has run into the
> >>>>same thing.
> >>>>
> >>>>Error running serviceName, 'persistContentRevisionAndItem'.  
> >>>>ERROR: Could
> >>>>not complete the Update ContentRevision and ContentRevisionItem
> >>>>[file:/usr/local/ofbiz-esp/applications/content/script/org/ofbiz/
> >>>>content/compdoc/CompDocServices.xml#persistContentRevisionAndItem]
> >>>>process [Could not find method to execute named formatPaddedNumber:
> >>>>java.lang.NoSuchMethodException:
> >>>>org.ofbiz.base.util.UtilFormatOut.formatPaddedNumber(java.lang.Long,
> >>>>java.lang.Integer)]
> >>>>
> >>>>       <call-class-method method-name="formatPaddedNumber"
> >>>>class-name="org.ofbiz.base.util.UtilFormatOut"
> >>>>                   ret-field-name="paddedSeqId">
> >>>>           <field field-name="incrementedSeq" type="Long"/>
> >>>>           <field field-name="numericPadding" type="Integer"/>
> >>>>       </call-class-method>
> >>>>
> >>>>-Al
> >>>>
> >>>>_______________________________________________
> >>>>Users mailing list
> >>>>[hidden email]
> >>>>http://lists.ofbiz.org/mailman/listinfo/users
> >>>>
> >>>>
> >>>>
> >>>>        
> >>>>
> >>>_______________________________________________
> >>>Users mailing list
> >>>[hidden email]
> >>>http://lists.ofbiz.org/mailman/listinfo/users
> >>>      
> >>>
> >>_______________________________________________
> >>Users mailing list
> >>[hidden email]
> >>http://lists.ofbiz.org/mailman/listinfo/users
> >>    
> >>
> >
> >
> >_______________________________________________
> >Users mailing list
> >[hidden email]
> >http://lists.ofbiz.org/mailman/listinfo/users
> >
> >
> >  
> >
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
--
Kind Regards
Andrew Sykes <[hidden email]>
Sykes Development Ltd
http://www.sykesdevelopment.com

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users