ceylon / ceylon-module-resolver

DEPRECATED
Apache License 2.0
23 stars 9 forks source link

Node.js exited abnormally: java.lang.IllegalArgumentException - Null stream! #60

Closed gavinking closed 11 years ago

gavinking commented 11 years ago

On Mac, with node v0.10.13, and Ceylon IDE from git, I get the following attempting to Run As > Ceylon JavaScript Application:

!MESSAGE Node.js exited abnormally: java.lang.IllegalArgumentException - Null stream!
java.lang.IllegalArgumentException: Null stream!
    at com.redhat.ceylon.cmr.impl.FileContentStore.putContent(FileContentStore.java:109)
    at com.redhat.ceylon.cmr.impl.RootRepositoryManager.putContent(RootRepositoryManager.java:88)
    at com.redhat.ceylon.cmr.impl.RootRepositoryManager.getArtifactResult(RootRepositoryManager.java:70)
    at com.redhat.ceylon.cmr.api.AbstractRepositoryManager.getArtifact(AbstractRepositoryManager.java:77)
    at com.redhat.ceylon.compiler.js.CeylonRunJsTool.run(CeylonRunJsTool.java:331)
    at com.redhat.ceylon.eclipse.core.launch.JsLaunchDelegate.launch(JsLaunchDelegate.java:87)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:858)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:707)
    at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1018)
    at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1222)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

Note: the js files are correctly produced in the modules dir.

gavinking commented 11 years ago

I have reproduced this using the latest dev build of the IDE from the development update site.

gavinking commented 11 years ago

FTR I also get this error from the M5 IDE release.

chochos commented 11 years ago

This seems to be caused by problems with the js part of the IDE, however it would be useful to get a more informative message from the CMR when asking for nonexistent artifacts...

gavinking commented 11 years ago

So the IDE side of things now seems to be essentially fixed, but we need to make sure that CMR never behaves like this.

alesj commented 11 years ago

What exactly is the problem? Or what's causing this null stream?

Or are you just saying CMR should give better error msg?

gavinking commented 11 years ago

If I understand the stack correctly, CMR was trying to cache something that wasn't even in Herd. Had something to do with the list of repo's being in the wrong order.

gavinking commented 11 years ago

It might be something that happens when remote repos occur before local repos in the list.

alesj commented 11 years ago

Uh, again repo order ... @FroMage, @quintesse ... I thought we had this fixed.

Can we get a test that reproduces this?

gavinking commented 11 years ago

It looks like we've got the repo order approximately fixed in the IDE JS runner, but the point is that CMR simply shouldn't die in this manner, with what is essentially an npe.

alesj commented 11 years ago

Yes and no. Something is trying to push null stream, which is what CMR complains. It shouldn't get as far as to trying to push null stream. That's what we need to find, what's responsible for pushing this null stream.

gavinking commented 11 years ago

That's what we need to find, what's responsible for pushing this null stream.

I think it's the caching stuff.

alesj commented 11 years ago

I think it's the caching stuff.

Any chance to create a test which reproduces this?

FroMage commented 11 years ago

Added a more helpful error message and moving to 1.0

gavinking commented 11 years ago

I'm not sure if that's good enough. I need to recheck, but I believe that right now I can't run any JS app on Mac.

FroMage commented 11 years ago

OK, well try it and let me know. I still don't know what's causing this but the new error message should help.

DiegoCoronel commented 11 years ago
com.redhat.ceylon.cmr.api.RepositoryException: Node RemoteNode for RemoteContentStore: http://modules.ceylon-lang.org/test -> [\ceylon\json\0.6\ceylon.json-0.6.js] for repository RootRepositoryManager: FileContentStore: C:\Users\diego.coronel\.ceylon\cache returned a null stream
    at com.redhat.ceylon.cmr.impl.RootRepositoryManager.getArtifactResult(RootRepositoryManager.java:74)
    at com.redhat.ceylon.cmr.api.AbstractRepositoryManager.getArtifact(AbstractRepositoryManager.java:77)
    at com.redhat.ceylon.compiler.js.CeylonRunJsTool.loadDependencies(CeylonRunJsTool.java:288)
    at com.redhat.ceylon.compiler.js.CeylonRunJsTool.run(CeylonRunJsTool.java:338)
    at com.redhat.ceylon.eclipse.core.launch.JsLaunchDelegate.launch(JsLaunchDelegate.java:90)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:858)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:707)
    at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1018)
    at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1222)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

!ENTRY com.redhat.ceylon.eclipse.ui 4 0 2013-09-18 13:20:20.013
!MESSAGE Node.js exited abnormally: com.redhat.ceylon.cmr.api.RepositoryException - Node RemoteNode for RemoteContentStore: http://modules.ceylon-lang.org/test -> [\ceylon\json\0.6\ceylon.json-0.6.js] for repository RootRepositoryManager: FileContentStore: C:\Users\diego.coronel\.ceylon\cache returned a null stream

this is the error i get from windows environment

DiegoCoronel commented 11 years ago

Ok, just ignore my case above, it worked.. it was because json dependency.. its working fine for me in windows.

FroMage commented 11 years ago

This is now fixed!