IOException--CreateProcess HELP!!!
Hi every body.
Does someone know the meaning of this error?
java.io.IOException: CreateProcess: prueba error=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Win32Process.java:63)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:566)
at java.lang.Runtime.exec(Runtime.java:428)
at java.lang.Runtime.exec(Runtime.java:364)
at java.lang.Runtime.exec(Runtime.java:326)
at org.apache.jsp.ChangeDirBajaRCXX_jsp._jspService(ChangeDirBaja
p.java:185)....................................
It's the result of this code:
cmd="prueba.bat";
exec(cmd);
and the prueba.bat is really simple:
@echo off
lejos HelloWorld
'lejos' is an exe file.
If i try 'lejos HelloWorld' from the MS-DOS it runs ok.
Thanks!!
Hi,
I'm facing the same problem. The only diference is that I need to execute only 1 command but because I have to execute it in a Network folder (that comes from a database, so it is configurable). I tried to enable the UNC support from the Command Shell of Windows XP but without success.
Now I'm trying to use the pushd popd commands so that I can execute my command remotely.
Here is the commands I'm trying to execute (that works with the command):
pushd \\brserver\transaction && try.bat && popd
When I execute that in the CMD, it works but with the Runtime.exec, it gives me the IOException error.
Here is my code:
String command = "pushd \\brserver\transaction && try.bat && popd";
Process process - Runtime.getRuntime().exec(command);
I've also tried that:
String[] commands = new String[]{"pushd \\brserver\transaction", "try.bat", "popd"};
Process process - Runtime.getRuntime().exec(commands);
But without success. If I could only make the UNC works, it would probably resolve my problem.
Is somebody can help me please?
Thanks,
M. Jalbert
Similar Messages
-
I use stand alone "XMLBeans survival kit" ( which I downloaded on 11/1/03 from
BEA site ). I use its xmlbean.jar and it works fine. I did not use its "scomp"
utility until today ( I used BEA's on-line compiler and it worked just great ).
When I tried to use the stand alone "scomp" , I've got into trouble. Here is the
trace of the error I receive for all schemas including the example schema ( I
have followed the instructions described in the attached README file for the environment
configuration) :
C:\WSAD_Workspaces\dc_xml_beans\xml_to_java\test>scomp -out myeasypo.jar C:\XMLBeanToolkit\xkit\schemas\easypo
Loading schema file C:\XMLBeanToolkit\xkit\schemas\easypo\easypo.xsd
Loading config file C:\XMLBeanToolkit\xkit\schemas\easypo\easypo.xsdconfig
Time to build schema type system: 1.297 seconds
java.io.IOException: CreateProcess: "C:\Program Files\Java\j2re1.4.1_05\..\bin\javac.exe"
-J-Xmx256M @C:\DOCUME~1\a337335\LOCALS~1\Temp\javac31952 error=3
null
java.io.IOException: CreateProcess: "C:\Program Files\Java\j2re1.4.1_05\..\bin\javac.exe"
-J-Xmx256M @C:\DOCUME~1\a337335\LOCALS~1\Temp\javac31952 error=3
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Win32Process.java:67)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:566)
at java.lang.Runtime.exec(Runtime.java:491)
at java.lang.Runtime.exec(Runtime.java:457)
at com.bea.xbean.tool.CodeGenUtil.externalCompile(CodeGenUtil.java:167)
at com.bea.xbean.tool.SchemaCodeGenerator.compileTypeSystem(SchemaCodeGenerator.java:178)
at com.bea.xbean.tool.SchemaCompiler.compileImpl(SchemaCompiler.java:547)
at com.bea.xbean.tool.SchemaCompiler.main(SchemaCompiler.java:141)
BUILD FAILED
Please, help me to find what is wrong here !!!
Thank you,
- Michael P.
[README.txt]Sorry, folks, the answer was quite simple: the default scomp script has pointed
to "wrong" location for java.exe. In particular, the scrip has specified compilation
command like this:
java -classpath %cp% com.bea.xbean.tool.SchemaCompiler %*
while it had to specify path to the java.exe based on JAVA_HOME env. variable
( I am saying "had" because README instructions state that the JAVA_HOME has to
be properly configured ). So, the solution looks like:
%JAVA_HOME%\bin\java -classpath %cp% com.bea.xbean.tool.SchemaCompiler %*
- Michael P.
"Michael P." <[email protected]> wrote:
>
>
>
I use stand alone "XMLBeans survival kit" ( which I downloaded on 11/1/03
from
BEA site ). I use its xmlbean.jar and it works fine. I did not use its
"scomp"
utility until today ( I used BEA's on-line compiler and it worked just
great ).
When I tried to use the stand alone "scomp" , I've got into trouble.
Here is the
trace of the error I receive for all schemas including the example schema
( I
have followed the instructions described in the attached README file
for the environment
configuration) :
C:\WSAD_Workspaces\dc_xml_beans\xml_to_java\test>scomp -out myeasypo.jar
C:\XMLBeanToolkit\xkit\schemas\easypo
Loading schema file C:\XMLBeanToolkit\xkit\schemas\easypo\easypo.xsd
Loading config file C:\XMLBeanToolkit\xkit\schemas\easypo\easypo.xsdconfig
Time to build schema type system: 1.297 seconds
java.io.IOException: CreateProcess: "C:\Program Files\Java\j2re1.4.1_05\..\bin\javac.exe"
-J-Xmx256M @C:\DOCUME~1\a337335\LOCALS~1\Temp\javac31952 error=3
null
java.io.IOException: CreateProcess: "C:\Program Files\Java\j2re1.4.1_05\..\bin\javac.exe"
-J-Xmx256M @C:\DOCUME~1\a337335\LOCALS~1\Temp\javac31952 error=3
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Win32Process.java:67)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:566)
at java.lang.Runtime.exec(Runtime.java:491)
at java.lang.Runtime.exec(Runtime.java:457)
at com.bea.xbean.tool.CodeGenUtil.externalCompile(CodeGenUtil.java:167)
at com.bea.xbean.tool.SchemaCodeGenerator.compileTypeSystem(SchemaCodeGenerator.java:178)
at com.bea.xbean.tool.SchemaCompiler.compileImpl(SchemaCompiler.java:547)
at com.bea.xbean.tool.SchemaCompiler.main(SchemaCompiler.java:141)
BUILD FAILED
Please, help me to find what is wrong here !!!
Thank you,
- Michael P. -
Build Failed: java.io.IOException: CreateProcess
Hi,
Would someone help me on my problem. I had encountered a "java.io.IOException: CreateProcess" when the ant script was about to execute the lines below:
<java classname="AllTests" fork="true" failonerror="yes">
<classpath>
<path refid="all.classpath" />
<path refid="emma.coverage.classes" />
<pathelement location="${emma.instr}" />
<pathelement location="${classes.temp}" />
</classpath>
<jvmarg
value="-Demma.coverage.out.file=${emma.coverage}/coverage.emma" />
<jvmarg value="-Demma.coverage.out.merge=true" />
</java>
The result and the message was stated below.
BUILD FAILED
C:\RAD901\build\emma-build.xml:89: java.io.IOException: CreateProcess: "C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6\java\
jre\bin\java.exe" -Demma.coverage.out.file=C:\RAD901\build/temp/emma/coverage/coverage.emma -Demma.coverage.out.merge=true -classpat
h "C:\RAD901\build\libs\XmlWriter.jar;C:\RAD901\build\libs\cactus1-6\aspectjrt-1.1.1.jar;C:\RAD901\build\libs\cactus1-6\cactus-1.6.1
.jar;C:\RAD901\build\libs\cactus1-6\cactus-ant-1.6.1.modified.jar;C:\RAD901\build\libs\cactus1-6\commons-codec-1.3.jar;C:\RAD901\bui
ld\libs\cactus1-6\commons-httpclient-3.0.1.jar;C:\RAD901\build\libs\cactus1-6\commons-logging-1.0.3.jar;C:\RAD901\build\libs\cactus1
-6\httpunit-1.5.4.jar;C:\RAD901\build\libs\cactus1-6\nekohtml-0.7.4.jar;C:\RAD901\build\libs\catalina.jar;C:\RAD901\build\libs\com-d
arwinsys-util.jar;C:\RAD901\build\libs\commons-pool-1.4.jar;C:\RAD901\build\libs\db2jcc.jar;C:\RAD901\build\libs\db2jcc_license_cu.j
ar;C:\RAD901\build\libs\emma.jar;C:\RAD901\build\libs\hapi-0.5.1.jar;C:\RAD901\build\libs\jboss-common.jar;C:\RAD901\build\libs\jstl
-1.0.jar;C:\RAD901\buil
The result was incomplete. I don't know why, but I would like to know the cause of my exception. I hope somebody could help me.
Thank you so much in advance.Hello all,
I'm having almost the same issue related to error message when I hit a button on my manufacturing software.
*"ScriptException: Error in exec: java.io.IOException: CreateProcess*
*exec(C:\\progra~1\\intern~1\\iexplore.exe http://cbweb4:81/barcode/CMbombyorder.asp\u003FR2=P&T2=12875424-P")*
This is when I hit a button that works for us to show this webpage I wrote previously. Last week we didnt have this issue, this just started this morning and I dont know what do to, it shows something about JAVA, that's why I'm asking to you guys, I dont know if you could please enlight me a little bit.
Thanks in advance. -
Hello,
I got this exception when I ran my build file on Eclipse. If I ran it outside
Eclipse,
everything works fine.
java.io.IOException: CreateProcess: "C:\Program Files\Java\j2re1.4.2\..\bin\javac.exe"
-J-Xmx256M @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\javac53402 error=3
The error comes from the following place:
[xmlbean] at com.bea.xbean.tool.CodeGenUtil.externalCompile(CodeGenUtil.java:167)
It seems the above method is not getting the correct "java.home", it should get
jdk/bin/javac.
Can anyone give a pointer on this?
thanks,Hello,
I got this exception when I ran my build file on Eclipse. If I ran it outside
Eclipse,
everything works fine.
java.io.IOException: CreateProcess: "C:\Program Files\Java\j2re1.4.2\..\bin\javac.exe"
-J-Xmx256M @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\javac53402 error=3
The error comes from the following place:
[xmlbean] at com.bea.xbean.tool.CodeGenUtil.externalCompile(CodeGenUtil.java:167)
It seems the above method is not getting the correct "java.home", it should get
jdk/bin/javac.
Can anyone give a pointer on this?
thanks, -
IOException: CreateProcess: dir error=2
Hi
I want to run a simple shell command "dir" on cygwin thru java class. My code is as follows :-
public class CygJava {
public static void main (String args[]){
File workDir = new File("c:/cygwin/bin");
try {
Runtime systemShell = Runtime.getRuntime();
Process shellOutput = systemShell.exec("dir", null, workDir);
InputStreamReader isr = new InputStreamReader(shellOutput.getInputStream());
BufferedReader br = new BufferedReader (isr);
String line = null;
System.out.println("<OUTPUT>");
while((line = br.readLine()) != null ) {
System.out.println(line);
System.out.println("</OUTPUT>");
int exitVal = shellOutput.waitFor();
System.out.println("Process Exit Value : "+exitVal);
}catch (IOException ioe) {
System.err.println(ioe);
} catch (Throwable t) {
t.printStackTrace();
On running this program , i get the error as :-
java.io.IOException: CreateProcess: dir error=2
Could anyone tell me as to why is this error occuring ?
ThanksI think this might be useful:
http://forum.java.sun.com/thread.jspa?threadID=416069&tstart=120
If not I would suggest searching the forum for others -
IOException--CreateProcess!!!!
Hi every body.
Does someone know the meaning of this error?
java.io.IOException: CreateProcess: prueba error=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Win32Process.java:63)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:566)
at java.lang.Runtime.exec(Runtime.java:428)
at java.lang.Runtime.exec(Runtime.java:364)
at java.lang.Runtime.exec(Runtime.java:326)
at org.apache.jsp.ChangeDirBajaRCXX_jsp._jspService(ChangeDirBaja
p.java:185)....................................
It's the result of this code:
cmd="prueba.bat";
exec(cmd);
and the prueba.bat is really simple:
@echo off
lejos HelloWorld
'lejos' is an exe file.
If i try 'lejos HelloWorld' from the MS-DOS it runs ok.
Thanks!!Hi!
Hi Stevejluke.
The file 'prueba.bat' is in the current working directory and in the PATH environmental variable and 'prueba.bat' runs from the command line.
I'm afraid is something wrong with the Runtime.exec method. In fact in this link:
http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Process.html
i've found this:
"The Runtime.exec methods may not work well for special processes on certain native platforms, such as native windowing processes, daemon processes, Win16/DOS processes on Win32, or shell scripts."
But i'm using j2sdk1.4.1_01, not 1.2. i don't understand very well this information so i don't know how to resolve the problem.
Thanks very much!! -
IOException--CreateProcess--Win32Process!!!!
Hi every body.
Does someone know the meaning of this error?
java.io.IOException: CreateProcess: prueba error=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Win32Process.java:63)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:566)
at java.lang.Runtime.exec(Runtime.java:428)
at java.lang.Runtime.exec(Runtime.java:364)
at java.lang.Runtime.exec(Runtime.java:326)
at org.apache.jsp.ChangeDirBajaRCXX_jsp._jspService(ChangeDirBaja
p.java:185)....................................
It's the result of this code:
cmd="prueba.bat";
exec(cmd);
and the prueba.bat is really simple:
@echo off
lejos HelloWorld
'lejos' is an exe file.
If i try 'lejos HelloWorld' from the MS-DOS it runs ok.
Thanks!!I'm getting a simular problem... did you get it resolved. My coworkers are not having this problem, we are using the same JDK, Weblogic Server version, and same code base. Only difference is I just got a laptop which has windows 2000 Pro Service Pack 3 they are on service pack 2...
Here is the message.
[java] java.io.IOException: CreateProcess: javac -g -nowarn -classpath C:\f
mac\dev\res\modeling\shl\ejbcgen;C:\jdk1.3.1_02\jre\lib\rt.jar;C:\jdk1.3.1_02\jr
e\lib\i18n.jar;C:\jdk1.3.1_02\jre\lib\sunrsasign.jar;C:\jdk1.3.1_02\jre\classes;
C:\fmac\dev\res\modeling\shl;C:\fmac\dev\res\common\lib\dom.jar;C:\fmac\dev\res\
common\lib\F1J7Swing.jar;C:\fmac\dev\res\common\lib\jakarta-poi-1.5.1-final-2002
0615.jar;C:\fmac\dev\res\common\lib\jax-qname.jar;C:\fmac\dev\res\common\lib\jax
b-api.jar;C:\fmac\dev\res\common\lib\jaxb-libs.jar;C:\fmac\dev\res\common\lib\ja
xb-ri.jar;C:\fmac\dev\res\common\lib\jaxb-xjc.jar;C:\fmac\dev\res\common\lib\jax
p-api.jar;C:\fmac\dev\res\common\lib\jconn2.jar;C:\fmac\dev\res\common\lib\junit
.jar;C:\fmac\dev\res\common\lib\log4j-1.2.3.jar;C:\fmac\dev\res\common\lib\log4j
-1.2rc1.jar;C:\fmac\dev\res\common\lib\logkit.jar;C:\fmac\dev\res\common\lib\nam
espace.jar;C:\fmac\dev\res\common\lib\sax.jar;C:\fmac\dev\res\common\lib\struts.
jar;C:\fmac\dev\res\common\lib\xalan.jar;C:\fmac\dev\res\common\lib\xercesImpl.j
ar;C:\fmac\dev\reD
[java] at java.lang.Win32Process.create(Native Method)
[java] at java.lang.Win32Process.<init>(Win32Process.java:66)
[java] at java.lang.Runtime.execInternal(Native Method)
[java] at java.lang.Runtime.exec(Runtime.java:551)
[java] at java.lang.Runtime.exec(Runtime.java:477)
[java] at java.lang.Runtime.exec(Runtime.java:443)
[java] at weblogic.utils.Executable.exec(Executable.java:200)
[java] at weblogic.utils.Executable.exec(Executable.java:125)
[java] at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(Comp
ilerInvoker.java:545)
[java] at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvok
er.java:372)
[java] at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvok
er.java:363)
[java] at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:2
45)
[java] at weblogic.ejbc20.runBody(ejbc20.java:360)
[java] at weblogic.utils.compiler.Tool.run(Tool.java:79)
[java] at weblogic.ejbc.main(ejbc.java:21)
[java] Exec failed .. exiting -
Catch(java.io.IOException ioe) help
Hi. I have used
static BufferedReader keyboardInput = new BufferedReader(new InputStreamReader(System.in)); and tried to read what the user will enter from an input box, im expecting interger, character, integer to be entered.
try{
int newOp1 = Integer.parseInt(keyboardInput.readLine());
char newOp = (char) keyboardInput.readLine().charAt(0);
int newOp2 = Integer.parseInt(keyboardInput.readLine());
}I can catch the error with
catch(java.io.IOException ioe){but i dont know how to go about hangling th errors, any ideas? thanks a lot :-)but i dont know how to go about hangling th errors,
any ideas? thanks a lot :-)Well, you might print out the stack trace (ioe.printStackTrace()), then retry. Or print the stack trace and then just use default values, or wrap the exception in one more appropriate for that layer and throw the new exception, or just not catch IOE in the first place and declrae your method to throw it and let your method's caller decide how to handle it.
(The last two--wrap and rethrow, or just let it bubble up--are the most common.)
As for "fixing" it, that really depends on the nature of the exception and the semantics of your program. If you get an exception reading from the keyboard, there's probably not much you can do about it.
If you get an exception creating a file in GUI program, you might put up a dialog box telling the user the file couldn't be created, asking them if they want to try a different location or retry or cancel. -
Help...java.io.IOException Problem
Hello,
I am having problems running Weblogic 4.5.1 as Windows NT Service but no
problems when running from command window.
The configuration is such:
Hardware:
Dual Processor PIII, 1GB memory, 2 NICs, mirrored internal RAID SCSI drive
on Compaq 1850R
OS:
Windows NT 4.0 SP5
Configuration:
JVM: JDK 1.2.2 (heap size 384M) from Sun
Weblogic 4.5.1 (Server version value=4.5.1 - 128 bit domestic version)
weblogic.system.executeThreadCount=40
weblogic.system.nativeIO.enable=true
weblogic.system.enableConsole=true
If I start the weblogic server from the command window and start throwing
https requests to it, the server works fine for as many number of messages
as I want and for as long as I want.
But when I start the server from the services window in the control panel,
after 98th message it starts giving error (found ofcourse in the log file
only). The snippet of the log file is shown below:
Error found in log file:
Thu Apr 27 05:57:34 PDT 2000:<I> <ListenThread> Listening on port: 80
Thu Apr 27 05:57:35 PDT 2000:<I> <SSLListenThread> Listening on port: 443
Thu Apr 27 05:57:35 PDT 2000:<I> <WebLogicServer> WebLogic Server started
Thu Apr 27 05:58:01 PDT 2000:<I> <ServletContext-Servlets>
com.mycompany.servlet.frontline.frontlineServlet: init
Thu Apr 27 05:59:01 PDT 2000:<E> <CliCon-#|myserver|11.956840209531>
FrontlineSessionBean.processMessage: error parsing message:
java.io.IOException: The handle is invalid
Thu Apr 27 05:59:01 PDT 2000:<E> <CliCon-#|myserver|11.956840209531>
FrontlineSessionBean.processMessage: error parsing message:
java.io.IOException: The handle is invalid
Your insights will be highly helpful.
thanks.
Alay DesaiHello all,
I'm having almost the same issue related to error message when I hit a button on my manufacturing software.
*"ScriptException: Error in exec: java.io.IOException: CreateProcess*
*exec(C:\\progra~1\\intern~1\\iexplore.exe http://cbweb4:81/barcode/CMbombyorder.asp\u003FR2=P&T2=12875424-P")*
This is when I hit a button that works for us to show this webpage I wrote previously. Last week we didnt have this issue, this just started this morning and I dont know what do to, it shows something about JAVA, that's why I'm asking to you guys, I dont know if you could please enlight me a little bit.
Thanks in advance. -
Help: java.io.IOException
I am running WL 6.1 SP1 with JDK 1.3.1. I get an IOException
each time I try to run a basic login jsp. The jsp worked fine,
then stopped working. Not sure if something was changed in the
weblogic or environmental conditions to cause this. Other jsp's
work fine. I've stopped, started, rebooted a number of times,
with no luck.
Anyone provide some insight? I am thinking something is screwed upwith my CLASSPATH
somewhere.
(I am new to this stuff, so take it easy on me if the problem is obvious!)
I have checked:
JAVA_HOME =C:\weblogic\jdk131
WL_HOME =C:\weblogic
PATH =%WL_HOME%\bin;%JAVA_HOME%\bin;%PATH%
CLASSPATH =%JAVA_HOME%\lib\tools.jar;%WL_HOME%\lib\weblogic_sp.jar;%WL_HOME%\lib\weblogic.jar;%CLASSPATH%
Compilation f 'C:\weblogic\config\mydomain\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp\jsp_servlet\_myjsps\__login.java'
failed:
C:\weblogic\config\mydomain\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp\jsp_servlet\_myjsps\__login.java
error=2
Full compiler error(s):
java.io.IOException: CreateProcess: javac -classpath
C:\weblogic\config\mydomain\applications\DefaultWebApp;C:\weblogic\config\mydomain\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp;C:\weblogic\jdk131\jre\lib\rt.jar;C:\weblogic\jdk131\jre\lib\i18n.jar;C:\weblogic\jdk131\jre\lib\sunrsasign.jar;C:\weblogic\jdk131\jre\classes;.;C:\weblogic\lib\weblogic_sp.jar;C:\weblogic\lib\weblogic.jar
-d C:\weblogic\config\mydomain\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp
C:\weblogic\config\mydomain\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp\jsp_servlet\_myjsps\__login.java
error=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Win32Process.java:66)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:551)
at java.lang.Runtime.exec(Runtime.java:477)
at java.lang.Runtime.exec(Runtime.java:443)
at weblogic.utils.Executable.exec(Executable.java:200)
at weblogic.utils.Executable.exec(Executable.java:125)
at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.java:545)
at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:354)
at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:382)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:189)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:154)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:368)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:242)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2456)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2039)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
It's not a problem with your classpath.
I would guess that it can't find javac in your %PATH% - your PATH looks ok.
Mike
"Aubrey" <[email protected]> wrote:
>
>I am running WL 6.1 SP1 with JDK 1.3.1. I get an IOException
> each time I try to run a basic login jsp. The jsp worked fine,
>then stopped working. Not sure if something was changed in the
>weblogic or environmental conditions to cause this. Other jsp's
>work fine. I've stopped, started, rebooted a number of times,
>with no luck.
>Anyone provide some insight? I am thinking something is screwed upwith
>my CLASSPATH
>somewhere.
>(I am new to this stuff, so take it easy on me if the problem is obvious!)
>
>I have checked:
>
>JAVA_HOME =C:\weblogic\jdk131
>WL_HOME =C:\weblogic
>PATH =%WL_HOME%\bin;%JAVA_HOME%\bin;%PATH%
>CLASSPATH =%JAVA_HOME%\lib\tools.jar;%WL_HOME%\lib\weblogic_sp.jar;%WL_HOME%\lib\weblogic.jar;%CLASSPATH%
>
>
>Compilation f 'C:\weblogic\config\mydomain\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp\jsp_servlet\_myjsps\__login.java'
>failed:
>--------------------------------------------------------------------------------
> C:\weblogic\config\mydomain\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp\jsp_servlet\_myjsps\__login.java
>error=2
>--------------------------------------------------------------------------------
>Full compiler error(s):
>java.io.IOException: CreateProcess: javac -classpath
>C:\weblogic\config\mydomain\applications\DefaultWebApp;C:\weblogic\config\mydomain\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp;C:\weblogic\jdk131\jre\lib\rt.jar;C:\weblogic\jdk131\jre\lib\i18n.jar;C:\weblogic\jdk131\jre\lib\sunrsasign.jar;C:\weblogic\jdk131\jre\classes;.;C:\weblogic\lib\weblogic_sp.jar;C:\weblogic\lib\weblogic.jar
>-d C:\weblogic\config\mydomain\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp
>C:\weblogic\config\mydomain\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp\jsp_servlet\_myjsps\__login.java
>error=2
> at java.lang.Win32Process.create(Native Method)
> at java.lang.Win32Process.<init>(Win32Process.java:66)
> at java.lang.Runtime.execInternal(Native Method)
> at java.lang.Runtime.exec(Runtime.java:551)
> at java.lang.Runtime.exec(Runtime.java:477)
> at java.lang.Runtime.exec(Runtime.java:443)
> at weblogic.utils.Executable.exec(Executable.java:200)
> at weblogic.utils.Executable.exec(Executable.java:125)
> at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.java:545)
> at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:354)
> at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:382)
> at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:189)
> at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:154)
> at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:368)
> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:242)
> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
> at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2456)
> at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2039)
> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
-
" Hi i am having a peculiar problem in running jsp file. here it is I'm developing a test application involving servlets,jsp's and ejb's so amusing the standalone weblogic server to test.Application is deployed as a.war in a webApp named 'merlin', located atc:\weblogic\myserver.Jsp pages are at c:\weblogic\myserver\merlin.I'm getting a CreateProcess exception, when the jsppage is called(generates the .java source okay, fails to compileit).weblogic.log:java.io.IOException: CreateProcess: javac -classpathC:\weblogic\lib\weblogic510sp7boot.jar;C:\weblogic\myserver\serverclasses;C:\weblogic\jre1_2\jre\lib\rt.jar;C:\weblogic\jre1_2\jre\lib\i18n.jar;C:\weblogic\classes\boot;C:\weblogic\eval\cloudscape\lib\cloudscape.jar;C:\weblogiclib\weblogic510sp7.jar;C:\weblogic\license;C:\weblogic\classes;C:\weblogic\myserver\serverclasses;C:\weblogic\lib\weblogicaux.jar;;C:\weblogic\myservertmp_deployments\ejbjar-22165.jar;c:\weblogic\myserver\merlin\WEB-INF\classes;c:\weblogic\myserver\merlin\WEB-INF\lib\TestServlet.jar;c:\weblogic\myserver\merlin\WEB-INF\_tmp_war_merlin -dc:\weblogic\myserver\merlin\WEB-INF\_tmp_war_merlinc:\weblogic\myserver\merlin\WEB-INF\_tmp_war_merlin\jsp_servlet\_lprnews.java error=2From the bea site,http://www.weblogic.com/docs51/classdocs/API_jsp.html
Looks like web apps are using javac to compile your jsps. Be sure to include your
jdk/bin/ in your path.
Sam He
sajid <[email protected]> wrote:
>" Hi i am having a peculiar problem in running jsp file. here it is I'm
>developing a test application involving servlets,jsp's and ejb's so
>amusing the standalone weblogic server to test.Application is deployed
>as a.war in a webApp named 'merlin', located atc:\weblogic\myserver.Jsp
>pages are at c:\weblogic\myserver\merlin.I'm getting a CreateProcess
>exception, when the jsppage is called(generates the .java source okay,
>fails to compileit).weblogic.log:java.io.IOException: CreateProcess:
>javac -c
>lasspathC:\weblogic\lib\weblogic510sp7boot.jar;C:\weblogic\myserver\serverclasses;C:\weblogic\jre1_2\jre\lib\rt.jar;C:\weblogic\jre1_2\jre\lib\i18n.jar;C:\weblogic\classes\boot;C:\weblogic\eval\cloudscape\lib\cloudscape.jar;C:\weblogiclib\weblogic510sp7.jar;C:\weblogic\license;C:\weblogic\classes;C:\weblogic\myserver\serverclasses;C:\weblogic\lib\weblogicaux.jar;;C:\weblogic\myservertmp_deployments\ejbjar-22165.jar;c:\weblogic\myserver\merlin\WEB-INF\classes;c:\weblogic\myserver\merlin\WEB-INF\lib\TestServlet.jar;c:\weblogic\myserver\merlin\WEB-INF\_tmp_war_merlin
>-dc:\weblogic\myserver\merlin\WEB-INF\_tmp_war_merlinc:\weblogic\myserver\merlin\WEB-INF\_tmp_war_merlin\jsp_servlet\_lprnews.java
>error=2From the bea site,http://www.weblogic.com/docs51/classdocs/API_jsp.html
-
Error in creating a process using runtime class - please help
Hi,
I am experimenting with the following piece of code. I tried to run it in one windows machine and it works fine. But i tried to run it in a different windows machine i get error in creating a process. The error is attached below the code. I don't understand why i couldn't create a process with the 'exec' command in the second machine. Can anyone please help?
CODE:
import java.io.*;
class test{
public static void main(String[] args){
try{
Runtime r = Runtime.getRuntime();
Process p = null;
p= r.exec("dir");
BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
System.out.println(br.readLine());
catch(Exception e){e.printStackTrace();}
ERROR (when run in the dos prompt):
java.io.IOException: CreateProcess: dir error=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Win32Process.java:63)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:550)
at java.lang.Runtime.exec(Runtime.java:416)
at java.lang.Runtime.exec(Runtime.java:358)
at java.lang.Runtime.exec(Runtime.java:322)
at test.main(test.java:16)
thanks,
DivyaAs much as I understand from the readings in the forums, Runtime.exec can only run commands that are in files, not native commands.
Hmm how do I explain that again?
Here:
Assuming a command is an executable program
Under the Windows operating system, many new programmers stumble upon Runtime.exec() when trying to use it for nonexecutable commands like dir and copy. Subsequently, they run into Runtime.exec()'s third pitfall. Listing 4.4 demonstrates exactly that:
Listing 4.4 BadExecWinDir.java
import java.util.*;
import java.io.*;
public class BadExecWinDir
public static void main(String args[])
try
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec("dir");
InputStream stdin = proc.getInputStream();
InputStreamReader isr = new InputStreamReader(stdin);
BufferedReader br = new BufferedReader(isr);
String line = null;
System.out.println("<OUTPUT>");
while ( (line = br.readLine()) != null)
System.out.println(line);
System.out.println("</OUTPUT>");
int exitVal = proc.waitFor();
System.out.println("Process exitValue: " + exitVal);
} catch (Throwable t)
t.printStackTrace();
A run of BadExecWinDir produces:
E:\classes\com\javaworld\jpitfalls\article2>java BadExecWinDir
java.io.IOException: CreateProcess: dir error=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Unknown Source)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at BadExecWinDir.main(BadExecWinDir.java:12)
As stated earlier, the error value of 2 means "file not found," which, in this case, means that the executable named dir.exe could not be found. That's because the directory command is part of the Windows command interpreter and not a separate executable. To run the Windows command interpreter, execute either command.com or cmd.exe, depending on the Windows operating system you use. Listing 4.5 runs a copy of the Windows command interpreter and then executes the user-supplied command (e.g., dir).
Taken from:
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html -
Help!!! Error while trying to Deploy on JRun 3.1
Hello
I'm trying to deploy my Ejbs for JRun 3.1. I have my deploy
script as below:
rem The base directory in which JRun is installed
set JRUN_HOME=c:\JRun\3.1
rem The Oracle JDBC Drivers
set JDBC_DRIVER=%JRUN_HOME%\servers\lib\ojdbc14.jar
set ECLIPSE_HOME=H:\eclipse\workspace
rem The filename and location of the JAR file to build
set JAR_FILE=%ECLIPSE_HOME%\lib\mtrack.jar
rem The Classpath for EJB components
set
EJB_CP=%ECLIPSE_HOME%\lib\j2ee.jar;%JRUN_HOME%\lib\ejipt.jar;%ECLIPSE_HOME%\lib\jdom.jar; %ECLIPSE_HOME%\lib\xerces.jar;%ECLIPSE_HOME%\lib\ext\commons-fileupload-1.1.jar
set
JRUN_CP=%JRUN_HOME%\lib\install.jar;%JRUN_HOME%\lib\xt.jar;%JRUN_HOME%\lib\jrun.jar;%JRUN _HOME%\lib\jsp.jar;%JRUN_HOME%\lib\jsprt.jar;%JRUN_HOME%\lib\rhino.jar;%JRUN_HOME%\lib\ssi .jar;%JRUN_HOME%\lib\default_exports.jar;%JRUN_HOME%\lib\default_objects.jar;%JRUN_HOME%\l ib\ejipt.jar;%JRUN_HOME%\lib\ejipt_ejbeans.jar;%JRUN_HOME%\lib\ejipt_jms.jar;%JRUN_HOME%\l ib\ejipt_tools.jar;%JRUN_HOME%\lib\ejipt_client.jar
set CP=.;%EJB_CP%;%JDBC_DRIVER%;%JAR_FILE%;%JRUN_CP%
C:\java\jres\1.3.1\bin\java
-Djava.security.policy=%JRUN_HOME%/lib/jrun.policy
-Dejipt.home=%JRUN_HOME% -cp %CP% allaire.ejipt.tools.Deploy
This script uses Jre 1.3.1 to deploy as I know that one works
on another machine. Anyway, i get the following error, i starts
doing the compilation and generating the stub then it fails:
Generating EscalationManagerObject...
Generating StatisticsManagerHomeObject...
Generating StatisticsManagerObject...
Compiling files...
Exception: [15:24:29] java.io.IOException: CreateProcess:
javac -classpath c:/JR
un/3.1/servers/default/deploy/lib;c:/JRun/3.1/servers/default/deploy/mtrack.jar;
lib/ejipt.jar;.;H:/eclipse/workspace/lib/j2ee.jar;c:/JRun/3.1/lib/ejipt.jar;H:/e
clipse/workspace/lib/jdom.jar;H:/eclipse/workspace/lib/xerces.jar;H:/eclipse/wor
kspace/lib/ext/commons-fileupload-1.1.jar;c:/JRun/3.1/servers/lib/ojdbc14.jar;H:
/eclipse/workspace/lib/mtrack.jar;c:/JRun/3.1/lib/install.jar;c:/JRun/3.1/lib/xt
.jar;c:/JRun/3.1/lib/jrun.jar;c:/JRun/3.1/lib/jsp.jar;c:/JRun/3.1/lib/jsprt.jar;
c:/JRun/3.1/lib/rhino.jar;c:/JRun/3.1/lib/ssi.jar;c:/JRun/3.1/lib/default_export
s.jar;c:/JRun/3.1/lib/default_objects.jar;c:/JRun/3.1/lib/ejipt.jar;c:/JRun/3.1/
lib/ejipt_ejbeans.jar;c:/JRun/3.1/lib/ejipt_jms.jar;c:/JRun/3.1/lib/ejipt_tools.
jar;c:/JRun/3.1/lib/ejipt_client.jar -d
c:/JRun/3.1/servers/default/deploy/lib @
c:/JRun/3.1/servers/default/deploy/src/list error=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Unknown Source)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at
allaire.ejipt.tools.Deploy._compileFiles(allaire/ejipt/tools/Deploy.java:700)
at
allaire.ejipt.tools.Deploy.redeployJars(allaire/ejipt/tools/Deploy.java:236)
at
allaire.ejipt.tools.Deploy.deployJars(allaire/ejipt/tools/Deploy.java:184)
at
allaire.ejipt.tools.Deploy.main(allaire/ejipt/tools/Deploy.java:163)
I'm completely stuck. Any help will be much appreciated.
Thanks
PratimHi dominikg,
At first, You can try to restart the device-manager from system tray.
If it doesn't help, then try the following:
- stop the device manager
- Remove c:\Docement and Settings\<your User>\javame-sdk folder.
- Ran the device manager from <SDK>/bin directory
- try to debug again.
Did you tried to change port 51307 to another.
Early access build had some problems with device manager, I hope that final release will be better :)
BR,
Igor -
Using menu help button to open word document
I want to use the Help button on my menu to open a microsoft word document that has the user manual in it. Is there an easy way to call it from the public void jMenuHelpAbout_actionPerformed(ActionEvent e) method? Thanks.
AllysonI put that code into my code like this:
try {
Runtime runner = Runtime.getRuntime();
Process process = runner.exec("S:\\Project Folders\\rades\\Task2\\FDC UM - Draft2.doc");
catch(Exception p) {
p.printStackTrace();
It compiled, but then give me these errors at runtime:
java.io.IOException: CreateProcess: S:\Project Folders\rades\Task2\FDC UM - Draft2.doc error=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Win32Process.java:66)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:551)
at java.lang.Runtime.exec(Runtime.java:418)
at java.lang.Runtime.exec(Runtime.java:361)
at java.lang.Runtime.exec(Runtime.java:325)
at helloworld.HelloWorldFrame.jMenuHelpAbout_actionPerformed(HelloWorldFrame.java:123)
at helloworld.HelloWorldFrame$2.actionPerformed(HelloWorldFrame.java:73)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1450)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1504)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:378)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)
at javax.swing.AbstractButton.doClick(AbstractButton.java:279)
at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(BasicMenuItemUI.java:886)
at java.awt.Component.processMouseEvent(Component.java:3715)
at java.awt.Component.processEvent(Component.java:3544)
at java.awt.Container.processEvent(Container.java:1164)
at java.awt.Component.dispatchEventImpl(Component.java:2593)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2497)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
at java.awt.Container.dispatchEventImpl(Container.java:1200)
at java.awt.Window.dispatchEventImpl(Window.java:914)
at java.awt.Component.dispatchEvent(Component.java:2497)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:131)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
Any idea on what they mean? Thanks.
Allyson -
Help with executing windows command in java
hi, i am trying to execute dos command in java. currently i am trying simply to create a folder in the current directory.
here is the code snippet:
try {
Process p = Runtime.getRuntime().exec("md myFolder");
} catch (IOException io) {
io.printStackTrace();
i have also tried using "mkdir" instead of "md". but my code just throws an exception that says:
java.io.IOException: CreateProcess: md myFolder error=2
what have I done wrong? thanks in advancetry {
Process p = Runtime.getRuntime().exec("cmd /c
mkdir myFolder");
catch (IOException io) {
io.printStackTrace();hey! that code worked out perfectly. so "cmd" is needed to run dos commands? i searched through the net, but most of the examples that i were able to find did not include "cmd".
if it wouldn't be too much trouble, what is the option "/c" for?
i would also like to add that "mkdir" also works. The problem was the missing "cmd /c". Thanks guys for your help! I really appreciate it.
Maybe you are looking for
-
Hi, File Upload Page now keeps hanging up every time I want to do an attachment in Gmail. This problem only started yesterday. Was fine before that. I have done a Virus scan with ClamX and removed x3 Phising files and also a Malware scan and removed
-
Processing forms in oracle 10g
hey i m a beginner in oracle, got stucked up at a place. I need guidence as to how to pass the value entered dynamically in a text box in a SQL querry as a searching criterion.
-
So many loops decreasing the performance
So many loops are in loop, Is there any other statement to improve the performance LOOP AT p0000 WHERE begda LE pn-endda AND endda GE pn-begda. wa_datatab-pernr = p0000-pernr. LOOP AT p0001 WHERE begda LE p0000-endda
-
N8 calendar times change when in new time zone
How do you stop the calendar times changing when you enter a new time zone? This is very frustrating, particularly when the calendar contains flight times etc which you have entered in the local time zone of place of departure. Then when you move int
-
Request with approver decided at runtime
Hi All, is it possible to create a request where the approver is not known until the requested role or resource is selected? for example a lookup table would contain roles or resources with the userid of the appover. it does not matter if its the req