any reason a groovy file can't execute my java class?

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

any reason a groovy file can't execute my java class?

Patrick-4
I made a little java class but it won't execute for me in groovy, I
can execute other classes

orh = new OrderReadHelper(); //i can execute this

z = new NextPickupDateUpdater();  //this is my class, it doesn't
complain, but it doesn't execute, inspecting the value gives a memory
address,
numdays = z.update();  //here it breaks


org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen
[component://ecommerce/widget/CommonScreens.xml#main-decorator]:
groovy.lang.MissingMethodException: No signature of method:
NextPickupDateUpdater.update() is applicable for argument types: ()
values: {} (No signature of method: NextPickupDateUpdater.update() is
applicable for argument types: () values: {})
Reply | Threaded
Open this post in threaded view
|

Re: any reason a groovy file can't execute my java class?

Adrian Crum
Make sure the update method is public, and that it takes no arguments
and returns a number.

-Adrian

Patrick wrote:

> I made a little java class but it won't execute for me in groovy, I
> can execute other classes
>
> orh = new OrderReadHelper(); //i can execute this
>
> z = new NextPickupDateUpdater();  //this is my class, it doesn't
> complain, but it doesn't execute, inspecting the value gives a memory
> address,
> numdays = z.update();  //here it breaks
>
>
> org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen
> [component://ecommerce/widget/CommonScreens.xml#main-decorator]:
> groovy.lang.MissingMethodException: No signature of method:
> NextPickupDateUpdater.update() is applicable for argument types: ()
> values: {} (No signature of method: NextPickupDateUpdater.update() is
> applicable for argument types: () values: {})
>
Reply | Threaded
Open this post in threaded view
|

Re: any reason a groovy file can't execute my java class?

Patrick-4
I guess you can't have a groovy file with the same name as your java
class file  :(

On Mon, Apr 12, 2010 at 2:01 PM, Adrian Crum <[hidden email]> wrote:

> Make sure the update method is public, and that it takes no arguments and
> returns a number.
>
> -Adrian
>
> Patrick wrote:
>>
>> I made a little java class but it won't execute for me in groovy, I
>> can execute other classes
>>
>> orh = new OrderReadHelper(); //i can execute this
>>
>> z = new NextPickupDateUpdater();  //this is my class, it doesn't
>> complain, but it doesn't execute, inspecting the value gives a memory
>> address,
>> numdays = z.update();  //here it breaks
>>
>>
>> org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen
>> [component://ecommerce/widget/CommonScreens.xml#main-decorator]:
>> groovy.lang.MissingMethodException: No signature of method:
>> NextPickupDateUpdater.update() is applicable for argument types: ()
>> values: {} (No signature of method: NextPickupDateUpdater.update() is
>> applicable for argument types: () values: {})
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: any reason a groovy file can't execute my java class?

Jacques Le Roux
Administrator
Yes, that's a problem indeed

Jacques

From: "Patrick" <[hidden email]>

>I guess you can't have a groovy file with the same name as your java
> class file  :(
>
> On Mon, Apr 12, 2010 at 2:01 PM, Adrian Crum <[hidden email]> wrote:
>> Make sure the update method is public, and that it takes no arguments and
>> returns a number.
>>
>> -Adrian
>>
>> Patrick wrote:
>>>
>>> I made a little java class but it won't execute for me in groovy, I
>>> can execute other classes
>>>
>>> orh = new OrderReadHelper(); //i can execute this
>>>
>>> z = new NextPickupDateUpdater(); //this is my class, it doesn't
>>> complain, but it doesn't execute, inspecting the value gives a memory
>>> address,
>>> numdays = z.update(); //here it breaks
>>>
>>>
>>> org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen
>>> [component://ecommerce/widget/CommonScreens.xml#main-decorator]:
>>> groovy.lang.MissingMethodException: No signature of method:
>>> NextPickupDateUpdater.update() is applicable for argument types: ()
>>> values: {} (No signature of method: NextPickupDateUpdater.update() is
>>> applicable for argument types: () values: {})
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: any reason a groovy file can't execute my java class?

Anurag Walia
In reply to this post by Patrick-4
Hi,

Some times if the  java file exist inside hot-deploy then problem come like this.
can you specify the path of your java and groovy file.

Regards
Anurag Walia