datanucleus enhancer & javaw: "the parameter is incorrect"
Asked Answered
R

1

4

I'm on windows XP using eclipse and the datanucleus enhancer for a gwt + gae app. When I run the enhancer, I get an error:

Error
Thu Oct 21 16:33:57 CDT 2010
Cannot run program "C:\Program Files\Java\jdk1.6.0_18\bin\javaw.exe" (in directory "C:\ag\dev"): CreateProcess error=87, The parameter is incorrect

java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.6.0_18\bin\javaw.exe" (in directory "C:\ag\dev"): CreateProcess error=87, The parameter is incorrect
at java.lang.ProcessBuilder.start(Unknown Source)
at com.google.gdt.eclipse.core.ProcessUtilities.launchProcessAndActivateOnError(ProcessUtilities.java:213)
at com.google.appengine.eclipse.core.orm.enhancement.EnhancerJob.runInWorkspace(EnhancerJob.java:154)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.io.IOException: CreateProcess error=87, The parameter is incorrect
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 5 more

I've had this problem before, and it was due to a long classpath. I just spent an hour and a half shortening my classpath by moving libraries around and even moving my eclipse install, but with no luck.

Any ideas about where I should start to look for an answer? The error message doesn't include any information about what directory it's in or anything. It's kind of infuriating! Is it possible to make the output of javaw more verbose? Is it possible to get around this class-path size bug?

Remediosremedy answered 21/10, 2010 at 21:31 Comment(1)
My answer on the Google group should help: code.google.com/p/google-web-toolkit/issues/detail?id=4395#c15Peatroy
R
7

Aha!

Under Project properties > Google > App Engine > ORM I found that all of my classes were being enhanced, which was leading to a command line that was too long - nothing to do with the classpath, apparently. I just configured that property page to only enhance a subset of my classes (only like 5% need enhancing), and now, not only does it work again, but the build process is WAY FASTER!

Remediosremedy answered 21/10, 2010 at 23:8 Comment(2)
i was trying to update the ORM settings but i think datanucleus is still enhancing all the classesCamus
Hi, Riley. I have to thank you so much for that your idea help me resolve a similar problem. I never know that external jars could cause a so strange problem. Thank you again.Adne

© 2022 - 2024 — McMap. All rights reserved.