Hi Erando,

It could be that the class is not compiled correctly, but I doubt it.

It seems the class cannot be loaded - this could be for a number of reasons: 
java version mismatch, tomcat configuration, unix permissions etc...

Anyway, there is no point in messing with the command configuration until the 
groovy:
command = new commands.TestCommand();
is working. The fact that you get an error here means the class can't be found 
or loaded, and this is the problem you need to solve.

Regards from Vienna,

Richard


-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] 
Im Auftrag von Erando (via Magnolia Forums)
Gesendet: Dienstag, 15. Oktober 2013 10:16
An: Magnolia User List
Betreff: [magnolia-user] Re: Running custom command

Thank you Richard.

I tried the things you told me, there were the results..


[code]mgnl> command = new commands.TestCommand();
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script1.groovy: 1: unable to resolve class commands.TestCommand @ line 1, 
column 11.
command = new commands.TestCommand();
^

1 error[/code]

Unable to resolve...
I copied the command into the Admin Interface module: 
/modules/adminInterface/commands/myCommand
(without catalogue) and ran it again:

[code]mgnl> cm = info.magnolia.commands.CommandsManager.getInstance()
===>
info.magnolia.commands.CommandsManager@391f7c16
mgnl> command = cm.getCommand('myCommand')
===>
null
mgnl> command = new commands.TestCommand();
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script1.groovy: 1: unable to resolve class commands.TestCommand @ line 1, 
column 11.
command = new commands.TestCommand();
^

1 error

[/code]

So maybe something wrong with my Eclipse compiling...? But to be honest...I 
doubt it...

Thank you anyway!

--
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=487971f2-483f-4373-a929-b5f1f50edc05


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------





----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to