nelsonmp19 / alfresco-form-model-management

Automatically exported from code.google.com/p/alfresco-form-model-management
0 stars 0 forks source link

500 error when creating a new aspect #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a new model
2. Add a new aspect to that model
3.

What is the expected output? What do you see instead?
Installed a fresh copy of alfresco 4.0.e and install form management 1.3.4 and 
fm-share_1_2_4.amp.  Created a new model and added an aspect to that model and 
there is a popup with a 500 error.  Cannot add new aspect to any model new or 
existing.

What version of the product are you using? On what operating system?
alf_forms_management_1_3_4.amp, fm-share_1_2_4.amp, Windows, 
alfresco-community-4.0.e

Please provide any additional information below.

"NetworkError: 500 Internal Server Error - 
http://localhost:8080/alfresco/wcs/form-builder/model-update"

Attached a firebug Console 500 error response display.

Original issue reported on code.google.com by anhthan...@gmail.com on 1 Sep 2012 at 12:21

Attachments:

GoogleCodeExporter commented 9 years ago
The error is with the model itself. It looks like an aspect has been deleted 
from the JSON model that is being used.

See : Failed to validate model update - found deleted ASPECT 
'{nm.model}AspectOne'

There was once an aspect in your model called AspectOne with the nm namespace 
prefix. To fix this you could either 

Option 1:
1) Delete the JSON model (in Data Dictionary/JsonModels) 
2) Open the model manager 
3) Click on the model you need to re-build
4) FM will rebuild your JSON Model

Option 2 (If you dont care about the model)
1) Delete the model and start again

In older versions of FM there was a bug (fixed in 1.3.3) where you could delete 
aspects from the model via the model manager. It would then fail when the XML 
model was validated, but the JSON Model deleted the aspect. This would fail 
when converting back because it was missing the aspect. 

This error would only occur when trying to save aspects in the form builder 
that were part of a broken model.

Mike 

Original comment by mike.pri...@abstractive.ca on 1 Sep 2012 at 1:42

GoogleCodeExporter commented 9 years ago
I do think there is a bug with the latest release when creating a new aspect.  
The error with the "AspectOne" above happened when I created a test aspect 
"AspectOne" on a new model "nm.model" after installing 
alf_forms_management_1_3_4.amp.  The dialog "Creating Aspect..." kept spinning 
and a javascript alert popped up a "500" error.  This aspect was never created 
and I did not try to manually delete this aspect at any time because it never 
got created.

Next I tried completely uninstalling my Alfresco desktop version and install a 
fresh Alfresco 4.0.e and then re-installing the alf_forms_management_1.3.4.amp 
fm-share_1_2_4.amp again and created a new model and a new aspect "TestAspect". 
 Again I would get a javascript alert with "500" error and the firebug message 
would say "Found deleted ASPECT '{abc.model}TestAspect'".  

I tried deleting the Json file in the JsonModels as you suggested and in the FM 
manager my previous "TestAspect" that I tried to create before finally showed 
up. However, when I try to create another aspect I would get a message "There 
was an error trying to save the model. JavaException: 
java.lang.NullPointerException: null".  And again If I delete the Json file and 
go back to FM module the aspect that failed before would show up.  I also tried 
to delete the model and creating a new model with a new aspect, I would still 
get the same error.

I previously had used version 1.3.1 and everything worked perfectly so I think 
there might be a bug with this new 1.3.4 version (even though the file name is 
version 1.3.4 the installation screen shows the version of FM is 1.3.3). I 
don't think there was any model or content conflicts because I tried this on a 
completely clean Alfresco install with no custom content or modifications.  Any 
other suggestion here would be helpful.  

Thank you
Anh

Original comment by anhthan...@gmail.com on 2 Sep 2012 at 7:30

GoogleCodeExporter commented 9 years ago
I got the same error.

Original comment by lucas.ta...@gmail.com on 6 Sep 2012 at 5:44

GoogleCodeExporter commented 9 years ago
Im looking into this with a fresh install.

Original comment by mike.pri...@abstractive.ca on 12 Sep 2012 at 5:08

GoogleCodeExporter commented 9 years ago
Fixed. There was an issue with the new validation script. It was trying to 
validate against and aspect that wasn't there yet.

Thanks anhthan748 and lucas.tardioli for spotting this. I shall add you to the 
contributors list.

In release 1.3.4.1 (Properties file updated too)

Original comment by mike.pri...@abstractive.ca on 12 Sep 2012 at 5:19