maqetta / maqetta

Maqetta Designer
http://maqetta.org
Other
1.03k stars 338 forks source link

delete entire workspace in orion, launch maqetta -> exception #3953

Open peller opened 11 years ago

peller commented 11 years ago

this appears on screen:

Error starting Maqetta: Cannot read property '0' of undefined
GET http://maqetta-app-test.austin.ibm.com/maqetta/cmd/getUserLibs?base=newproj 500 (Server Error) 

java.lang.NullPointerException: null
        at org.davinci.server.user.LibrarySettings.<init>(LibrarySettings.java:22) ~[na:na]
        at maqetta.core.server.user.User.getLibSettings(User.java:246) ~[na:na]
        at maqetta.core.server.user.User.getLibSettings(User.java:241) ~[na:na]
        at maqetta.core.server.user.User.getLibs(User.java:580) ~[na:na]
        at maqetta.core.server.command.GetUserLibs.handleCommand(GetUserLibs.java:23) ~[na:na]
        at org.maqetta.server.DavinciCommandServlet.doGet(DavinciCommandServlet.java:74) ~[na:na]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:735) ~[javax.servlet_3.0.0.v201112011016.jar:na]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) ~[javax.servlet_3.0.0.v201112011016.jar:na]
        at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180) ~[na:na]
        at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61) ~[na:na]

this line in User.java is passing null as the dir parameter to getUserLibs. Perhaps newInstance should be throwing instead of returning null in this case?

    protected LibrarySettings getLibSettings(IStorage baseFile) {
        if(!isValid(baseFile.getAbsolutePath())) return null;
        return new LibrarySettings(this.userDirectory.newInstance(baseFile, IDavinciServerConstants.SETTINGS_DIRECTORY_NAME));
    }

the client side error is not as interesting. It is because getUserLibs in library.js uses old synch I/O and has no error handling.

dojo.js:4587
_3b2 dojo.js:4587
(anonymous function) dojo.js:4563
_184 dojo.js:1821
_182 dojo.js:1803
reject.errback dojo.js:1857
_184 dojo.js:1837
_182 dojo.js:1803
reject.errback dojo.js:1857
(anonymous function) dojo.js:4688
_3d5 dojo.js:4755
then._3e2.then dojo.js:4871
lang.extend.otherwise dojo.js:5156
dojo.xhr dojo.js:4681
dojo.xhrGet dojo.js:4693
_27a9.serverJSONRequest davinci.js:53489
_28.getUserLibs davinci.js:384
_2669.init davinci.js:51522
xhr.get.then.then._9e1 davinci.js:12615
_184 dojo.js:1821
_182 dojo.js:1803
resolve.callback dojo.js:1847
_184 dojo.js:1830
_182 dojo.js:1803
resolve.callback dojo.js:1847
_184 dojo.js:1830
_182 dojo.js:1803
resolve.callback dojo.js:1847
_184 dojo.js:1839
_182 dojo.js:1803
resolve.callback dojo.js:1847
_184 dojo.js:1830
_182 dojo.js:1803
resolve.callback dojo.js:1847
rDfd.then.otherwise._3c0.error dojo.js:4680
_3d5 dojo.js:4755
_3cf dojo.js:4747
resolve dojo.js:4837
_3db dojo.js:4793
_3d5 dojo.js:4766
_3cf dojo.js:4747
resolve dojo.js:4837
_3db dojo.js:4793
_3d5 dojo.js:4773
_3cf dojo.js:4747
resolve dojo.js:4837
_3db dojo.js:4793
_3d5 dojo.js:4766
_3cf dojo.js:4747
resolve dojo.js:4837
_30e dojo.js:3850
_31a
GreySpike commented 10 years ago

I had the same problem after I attempted to rename the default online project, Project1. I am now effectively locked out.

billreed63 commented 10 years ago

Try logging into your orion workspace (http://app.maqetta.org/) and changing the name back to project1, then relaunch maqetta. This should allow you to log in again.