Alfresco aborts startup after exception in webscript init

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-28-2008 03:03 AM
I'm a Catch 22, where an Exception thrown during the init of one of my web scripts causes Alfresco to abort after startup, and I can't edit the webscript because I can't run Alfresco now. How can I startup Alfresco without initializing the webscript so that I can edit the webscript? Or otherwise edit the webscript before starting Alfresco? I don't want to lose the data I have in this instance of Alfresco. Please help!
The problem started when I modified the 'Folders' example on the Alfresco Wiki page to use transaction specification "new" rather than "required". I either misspelled 'new' or the enum type for it doesn't exist, as when I start up Alfesco, I get the error:
In any case, the enum type for the string I entered is not recognized and the java class doesn't handle it gracefully.
The webscript description causing this is the following, named folder.folder.get.desc.xml:
Thanks in advance
The problem started when I modified the 'Folders' example on the Alfresco Wiki page to use transaction specification "new" rather than "required". I either misspelled 'new' or the enum type for it doesn't exist, as when I start up Alfesco, I get the error:
java.lang.IllegalArgumentException: No enum const class org.alfresco.web.scripts.WebscriptDescription$RequiredTransaction.newat java.lang.Enum.valueOf(Enum.java:192)at org.alfresco.web.scripts.WebscriptDescription$RequiredTransaction.valueOf(WebScriptDescription.java:52)‍‍‍
In any case, the enum type for the string I entered is not recognized and the java class doesn't handle it gracefully.
The webscript description causing this is the following, named folder.folder.get.desc.xml:
<webscript> <shortname>Folder Listing Sample</shortname> <description>Sample demonstrating the listing of folder contents</description> <url>/sample/folder/{path}</url> <format default="html">argument</format> <authentication>guest</authentication> <transaction>new</transaction></webscript>‍‍‍‍‍‍‍‍
Thanks in advance
Labels:
- Labels:
-
Archive
4 REPLIES 4

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-28-2008 03:16 AM
The webscript first exhibited the exception only after I edited it. This is Alfresco 2.1 on Windows XP.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-28-2008 08:53 AM
I thought that was fixed by 2.1 - in more recent builds, if there's an error/exception during web script initialisation, it will not stop the server from starting. Instead, you get warnings, and you can see those warnings in the web script home page.
To work around, comment out the beans…
in web-scripts-application-context.xml. Then restart, undo the change.
Then shutdown, uncomment the above beans and restart.
To work around, comment out the beans…
<bean parent="webscripts.repostore"> <property name="store"><value>workspace://SpacesStore</value></property> <property name="path"><value>/${spaces.company_home.childname}/${spaces.dictionary.childname}/cm:extensionwebscripts</value></property> </bean> <bean parent="webscripts.repostore"> <property name="mustExist"><value>true</value></property> <property name="store"><value>workspace://SpacesStore</value></property> <property name="path"><value>/${spaces.company_home.childname}/${spaces.dictionary.childname}/cm:webscripts</value></property> </bean>‍‍‍‍‍‍‍‍‍‍‍
in web-scripts-application-context.xml. Then restart, undo the change.
Then shutdown, uncomment the above beans and restart.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2008 05:02 AM
Hey thanks David, it worked.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2008 05:07 AM
no problem…
