This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 191804 - Unable to deploy to WL
Summary: Unable to deploy to WL
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: WebLogic (show other bugs)
Version: 7.0
Hardware: PC Windows XP
: P2 normal (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-10 15:35 UTC by Denis Anisimov
Modified: 2010-11-16 06:12 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
stacktrace (1.50 KB, text/plain)
2010-11-10 15:35 UTC, Denis Anisimov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Anisimov 2010-11-10 15:35:23 UTC
This is very annoying issue because one cannot determine the reason of failure.

- Create a web project.
- Try to deploy it on WL server ( I have checked 10.3.3 and 10.3.4 ).

As result : deployment task fails .
There is just one "informative" line in the output :
Deployment failed. Message was: {0}

There is no any information for error detection. 
It is not possible to understand why deployment fails.

Only stdout contains some information  of the failure .
Probably this issue related to space in path to Java.

Please note that WL server is installed with bundled Java which is used 
for its start and path has no spaces.
I don't know why the process below use system Java ( probably from JAVA_HOME
env variable or java which is used for NB start ).

It could be a big problem to resolve spaces issue. But there 
should be good error description definitely .
Also I would suggest to use WL bundled Java if default has spaces in path.

java.io.IOException: CreateProcess error=193, %1 is not a valid Win32 application
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
        at java.lang.ProcessImpl.start(ProcessImpl.java:30)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
Caused: java.io.IOException: Cannot run program ""F:\Program Files\Java\jdk1.6.0_10\bin\java"": CreateProcess error=193,
 %1 is not a valid Win32 application
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
        at org.netbeans.api.extexecution.ExternalProcessBuilder.call(ExternalProcessBuilder.java:296)
        at org.netbeans.api.extexecution.ExternalProcessBuilder.call(ExternalProcessBuilder.java:75)
[catch] at org.netbeans.api.extexecution.ExecutionService$3.call(ExecutionService.java:257)
        at org.netbeans.api.extexecution.ExecutionService$3.call(ExecutionService.java:233)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
INFO [org.netbeans.modules.j2ee.deployment.impl.TargetServer]: Cannot incrementally deploy to more than one target
Comment 1 Denis Anisimov 2010-11-10 15:35:54 UTC
Created attachment 102888 [details]
stacktrace
Comment 2 Petr Hejl 2010-11-15 09:31:28 UTC
Please run with -J-Dorg.netbeans.api.extexecution.ExternalProcessBuilder.level=0 and provide the output.

Also describe the exact location of middleware dir, server dir, domain dir. Also check the configuration in the properties dialog of the server.

Which build of netbeans do you use?
Comment 3 Denis Anisimov 2010-11-15 10:18:03 UTC
Middlware dir : F:\Oracle\Middleware
Server dir :F:\Oracle\Middleware\wlserver_10.3
Domain dir : F:\Oracle\Middleware\user_projects\domains\base_domainReal

Product Version: NetBeans IDE Dev (Build 101109-c591b92810a1)

Here is the requested output :

FINE [org.netbeans.api.extexecution.ExternalProcessBuilder]: Running: ""F:\Program Files\Java\jdk1.6.0_10\bin\java" -cp
F:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic.jar weblogic.Deployer -adminurl t3://localhost:7001 -username web
logic -password l23cauchy -deploy -nostage -name WebApp5 -source "F:\Documents and Settings\den\My Documents\NetBeansProjects\WebApp5\build\web""
FINE [org.netbeans.api.extexecution.ExternalProcessBuilder]: Environment: {USERPROFILE=F:\Documents and Settings\den, =R
:=, =V:=, SystemDrive=F:, Path=F:\Program Files\Far;F:\Program Files\PC Connectivity Solution\;F:\WINDOWS\system32;F:\WI
NDOWS;F:\WINDOWS\System32\Wbem;F:\Program Files\Intel\Wireless\Bin\;C:\Program Files\ant;C:\Program Files\ant\bin;F:\Pro
gram Files\Common Files\Symbian\tools;F:\Program Files\VoiceAge\Common;F:\Program Files\TortoiseSVN\bin;C:\Program Files
\Mercurial\;F:\Program Files\jprofiler6\bin\windows;F:\Program Files\jprofiler6\bin\windows;F:\AppServer8.2\bin, =N:=, P
ROCESSOR_REVISION=0f0a, =A:=, CLIENTNAME=Console, USERDOMAIN=DEN-LAPTOP, ALLUSERSPROFILE=F:\Documents and Settings\All U
sers, =J:=, =E:=, SESSIONNAME=Console, TMP=F:\DOCUME~1\den\LOCALS~1\Temp, =Q:=, LOGONSERVER=\\DEN-LAPTOP, CommonProgramF
iles=F:\Program Files\Common Files, =::=::\, PROMPT=$P$G, =U:=, PROCESSOR_LEVEL=6, =M:=, =B:=, COMPUTERNAME=DEN-LAPTOP,
SystemRoot=F:\WINDOWS, USERNAME=den, =I:=, APPDATA=F:\Documents and Settings\den\Application Data, =F:=F:\, PATHEXT=.COM
;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH, FARHOME=F:\Program Files\Far, =T:=, TEMP=F:\DOCUME~1\den\LOCALS~1\Temp, Pr
ogramFiles=F:\Program Files, HOMEDRIVE=F:, =Y:=, FARLANG=English, =C:=C:\dev\web-main\nbbuild\netbeans\bin, =G:=, =P:=,
PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 10, GenuineIntel, =L:=, =S:=, =H:=, PROCESSOR_ARCHITECTURE=x86, OS=W
indows_NT, FP_NO_HOST_CHECK=NO, HOMEPATH=\Documents and Settings\den, =W:=, NB_EXEC_EXTEXECUTION_PROCESS_UUID=661f04ff-8
ebc-4c9e-8a3a-a0c2ec722c38, =D:=D:\, =Z:=, =X:=, =O:=, windir=F:\WINDOWS, NUMBER_OF_PROCESSORS=2, =K:=, ComSpec=F:\WINDO
WS\system32\cmd.exe}
INFO [org.netbeans.api.extexecution.ExecutionService]
java.io.IOException: CreateProcess error=193, %1 is not a valid Win32 application
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
        at java.lang.ProcessImpl.start(ProcessImpl.java:30)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
Caused: java.io.IOException: Cannot run program ""F:\Program Files\Java\jdk1.6.0_10\bin\java"": CreateProcess error=193,
 %1 is not a valid Win32 application
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
        at org.netbeans.api.extexecution.ExternalProcessBuilder.call(ExternalProcessBuilder.java:296)
        at org.netbeans.api.extexecution.ExternalProcessBuilder.call(ExternalProcessBuilder.java:75)
[catch] at org.netbeans.api.extexecution.ExecutionService$3.call(ExecutionService.java:257)
        at org.netbeans.api.extexecution.ExecutionService$3.call(ExecutionService.java:233)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
INFO [org.netbeans.modules.j2ee.deployment.impl.TargetServer]: Cannot incrementally deploy to more than one target
Comment 4 Denis Anisimov 2010-11-15 10:25:17 UTC
Please also note that deployment works well after changing netbeans_jdkhome
to path without spaces ( bundled WL jdk ).
Comment 5 Petr Hejl 2010-11-15 11:57:14 UTC
Can you check whether there is any difference in invocation of
"F:\Program Files\Java\jdk1.6.0_10\bin\java"
and
"F:\Program Files\Java\jdk1.6.0_10\bin\java.exe" from command line on your system (include quotation marks)?

I can't reproduce so far on Vista.
Comment 6 Denis Anisimov 2010-11-15 16:41:35 UTC
There is no any difference.
The output is the same.

I don't know exactly how command is built but problem could be in the string :
""F:\Program Files\Java\jdk1.6.0_10\bin\java" -cp .......

Note that there is double quote in the beginning of the line.
In case if the first quote is not just symbol which is added by logger this 
is definitely a problem : the execution command in this case is F:\Program.
Comment 7 Petr Hejl 2010-11-15 16:53:04 UTC
Unfortunately it is added by the logger. The exactly same configuration (just using C drive) works ok for me.
Comment 8 Petr Hejl 2010-11-15 16:58:40 UTC
Even the IOException message is ok as it is constructed like this: "Cannot run program \"" + prog + "\""...
Comment 9 Petr Hejl 2010-11-15 17:05:24 UTC
Ok, enough speculations ;)
I'll try to put full path including the .exe while executing the program. I really think it caused by this (and cmd can deal with that, while Runtime not).

BTW Can you list files placed in F:\Program Files\Java\jdk1.6.0_10\bin?
Comment 10 Petr Hejl 2010-11-15 17:10:13 UTC
Please check whether web-main 3ec15d303947 fixed this problem.
Thanks.
Comment 11 Denis Anisimov 2010-11-15 17:12:33 UTC
May be you are right but I don't see how the absence of the space in the path 
helps to avoid problem with .exe extension.

Here are the files in the F:\Program Files\Java\jdk1.6.0_10\bin:

appletviewer.exe
apt.exe
beanreg.dll
extcheck.exe
HtmlConverter.exe
idlj.exe
jar.exe
jarsigner.exe
java
java.exe
java-rmi.exe
javac.exe
javadoc.exe
javah.exe
javap.exe
javaw.exe
javaws.exe
jconsole.exe
jdb.exe
jhat.exe
jinfo.exe
jli.dll
jmap.exe
jps.exe
jrunscript.exe
jstack.exe
jstat.exe
jstatd.exe
jvisualvm.exe
keytool.exe
kinit.exe
klist.exe
ktab.exe
msvcr71.dll
native2ascii.exe
orbd.exe
pack200.exe
packager.exe
policytool.exe
rmic.exe
rmid.exe
rmiregistry.exe
schemagen.exe
serialver.exe
servertool.exe
tnameserv.exe
unpack200.exe
wsgen.exe
wsimport.exe
xjc.exe
Comment 12 Denis Anisimov 2010-11-15 17:24:28 UTC
The fix works.
Thanks.
Comment 13 Petr Hejl 2010-11-15 17:36:12 UTC
Ok the cause is clear now. The problem is that you had also "java" aside "java.exe". So the IDE was invoking this file - either it is not executable or in case it is script it would have to be invoked with "cmd.exe ...".

Your test change was not really test on space in path, but test for different folder where there was no "java" file. I guess.
Comment 14 Denis Anisimov 2010-11-15 17:41:53 UTC
That's right.
Comment 15 Quality Engineering 2010-11-16 06:12:57 UTC
Integrated into 'main-golden', will be available in build *201011160001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/3ec15d303947
User: Petr Hejl <phejl@netbeans.org>
Log: #191804 Unable to deploy to WL