OSCommand Bat File Error
Hello
I have a question on OSCommand, I am trying to run the .bat file using OSCommand but it is giving error, I am using the following
OdiOSCommand "-COMMAND=E:\Hyperion\PlanningLoadFiles\LoadData\HRLoad.bat" "-OUT_FILE=E:\Hyperion\PlanningLoadFile\HRLOAD-OUT.txt" "-FILE_APPEND=YES" "-WORKING_DIR=E:\Hyperion\PlanningLoadFile"
When I run the above command it gives the following error:
java.io.IOException: CreateProcess: OdiOSCommand E:\Hyperion\PlanningLoadFile\HRLoad.bat error=2
Please let me know what am I doing wrong?
Thank you so much
on what machine is the DEV agent installed ? the .bat file needs to be local to the machine on which the dev agent is installed.
if you open a package, you will see a toolbar on which there are several ODI tools. 2 of them are OSCommand and OdiOSCommand.
You mentioned that you are getting error with odiOSCommand. Did you try OSCommand ?
Similar Messages
-
CFexecute, cfx_consolecommand dos/bat file error
Good day all. i have a really confussing problem... Let me
break it down
I have written an application that requires barcodes. My
Printer is a PPLB printer (not really important). So i create a
file on the server (This is about all that works fine).....
The printer is a network printer. so on the server i set up
the capture " net use LPT2
\\<machinename>\\<printersharename> /persistent:yes
(What the above does for those that do not know is set up a
vitual printer port so if you print to lpt2 it goes to the network
printer)
The command works perfectly..... Now the only thing i have to
do is send the file to the printer....
If im on the server and type "COPY /B c:\filetosend LPT2: "
note the Colon after LPT2 must be there it works perfectly.
But from anything else it doesnt..
What i have tried:
1) I tried running the command via cfexecute and
CFX_consolecommand which is available at
www.intrafoundation.com
that however does not work
2) Thinking i was smart i decided to write a bat file....
Easy. I wrote the file then used cfexecute and consolecommand to
run the file. With output enabled The error says "File Not Found"
This i have checked the file is there and LPT port is setup.
As i said if i type the command in command prompt it works
perfectly.
Now just to through another spanner in the works. if i run
the bat file from double clicking in windows or in command propt
type print.bat. (the name of the bat file i created) it works
perfectly..... Can someone explain this
So what i have determined is that:
1) When i type the command or run the bat file from command
prompt it works.
2) It does not work via cfexecute or commandconsole.
With some more testing If i leave the colon out after LPT2 it
says "0 Files Copied" so i think the colon is giving the problem...
Any help would be appreciated with this regard....
Another program maybe etc
RegardsShapeShift,
Are you running the batch file or the dos command while
logged in as the
same user ColdFusion service is configured to run under? If
ColdFusion
is running under the default "Local System" account, try
turning on the
"Allow service to interact with the desktop" checkbox on the
"Log On"
tab for the ColdFusion service, or set the service to log in
with an
account you know has permissions to the remote printer.
HTH,
Carl
ShapeShift wrote:
> Good day all. i have a really confussing problem... Let
me break it down
>
> I have written an application that requires barcodes. My
Printer is a PPLB
> printer (not really important). So i create a file on
the server (This is about
> all that works fine).....
>
> The printer is a network printer. so on the server i set
up the capture " net
> use LPT2 \\<machinename>\\<printersharename>
/persistent:yes
>
> (What the above does for those that do not know is set
up a vitual printer
> port so if you print to lpt2 it goes to the network
printer)
> The command works perfectly..... Now the only thing i
have to do is send the
> file to the printer....
>
> If im on the server and type "COPY /B c:\filetosend
LPT2: " note the Colon
> after LPT2 must be there it works perfectly.
> But from anything else it doesnt..
>
> What i have tried:
> 1) I tried running the command via cfexecute and
CFX_consolecommand which is
> available at
http://www.intrafoundation.com
that however does not work
>
> 2) Thinking i was smart i decided to write a bat
file.... Easy. I wrote the
> file then used cfexecute and consolecommand to run the
file. With output
> enabled The error says "File Not Found" This i have
checked the file is there
> and LPT port is setup.
>
> As i said if i type the command in command prompt it
works perfectly.
>
> Now just to through another spanner in the works. if i
run the bat file from
> double clicking in windows or in command propt type
print.bat. (the name of the
> bat file i created) it works perfectly..... Can someone
explain this
>
> So what i have determined is that:
> 1) When i type the command or run the bat file from
command prompt it works.
> 2) It does not work via cfexecute or commandconsole.
>
> With some more testing If i leave the colon out after
LPT2 it says "0 Files
> Copied" so i think the colon is giving the problem...
>
> Any help would be appreciated with this regard....
> Another program maybe etc
>
> Regards
>
>
> -
Planning load utility via bat file - error
I am using a bat file that uses the Planning load utility to make numerous updates to a single dimension on a test server. When I run the bat file i get an error that says the dimension is locked by another user. I am the only user with access to the test server. I've checked EAS and planning and nothing is locked. I've even shut down all hyperion services on the server and restarted them. It still says that the dimension is locked. How can I get this to unlock when I don't see where it is locked? This is a high priority situation! Any help is greatly appreciated!
Thanks John - I think your scenario is what happened. Initially, when I ran the bat file, I got an error 'Java out of memory - java heap'. So I had to fix that and then I got the locked error. So you're saying that since it locked the dimension then erred, the lock was never able to be removed. I got it! Thanks so much! :) Jeri
-
Hi,
I am using windows 7 professional(service pack 1) 64 bit operating system.
After installing the odi 12c (enterprise edition) by executing the odi_121200.jar file I am getting the following error while trying to run the ua.bat file.
[2013-10-24T16:49:07.861+05:30] [Framework] [INCIDENT_ERROR] [UPGAST-00056] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] error initializing upgrade plug-in for ODI.ODI1
[2013-10-24T16:49:07.861+05:30] [Framework] [INCIDENT_ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] Cause: An unexpected error occurred initializing an upgrade plug-in.
[2013-10-24T16:49:07.861+05:30] [Framework] [INCIDENT_ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] Action: Contact Oracle Support Services. See the secondary error message for additional details.
[2013-10-24T16:49:07.861+05:30] [Framework] [INCIDENT_ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] [[
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at oracle.ias.update.plugin.Plugin.instantiatePlugin(Plugin.java:248)
at oracle.ias.update.plugin.Plugin.<init>(Plugin.java:229)
at oracle.ias.update.plugin.Plugin.getPlugin(Plugin.java:180)
at oracle.ias.update.plan.PlanStep.getPlugin(PlanStep.java:335)
at oracle.ias.update.plan.PlanString.<init>(PlanString.java:66)
at oracle.ias.update.plan.PlanCustom.<init>(PlanCustom.java:74)
at oracle.ias.update.plan.PlanStep.<init>(PlanStep.java:189)
at oracle.ias.update.plan.PlanComponent.<init>(PlanComponent.java:203)
at oracle.ias.update.plan.Template.load(Template.java:161)
at oracle.ias.update.plan.Template.loadAllTemplates(Template.java:102)
at oracle.ias.update.UpgradeDriver.loadConfiguration(UpgradeDriver.java:838)
at oracle.ias.update.UpgradeDriver.main(UpgradeDriver.java:257)
at oracle.ias.update.UpgradeDriver.main(UpgradeDriver.java:175)
Caused by: java.util.MissingResourceException: Can't find oracle.ias.update.plugin.odi.bundle.ODIResourceBundle bundle
at java.util.logging.Logger.setupResourceInfo(Logger.java:1518)
at java.util.logging.Logger.<init>(Logger.java:265)
at java.util.logging.Logger.<init>(Logger.java:260)
at oracle.ias.update.UpgradeLogger.<init>(UpgradeLogger.java:60)
at oracle.ias.update.UpgradeLogger.getLogger(UpgradeLogger.java:93)
at oracle.ias.update.LoggingManager.create(LoggingManager.java:249)
at oracle.ias.update.plugin.UpgradePlugin.createPluginLogger(UpgradePlugin.java:195)
at oracle.ias.update.plugin.UpgradePlugin.<init>(UpgradePlugin.java:181)
at oracle.ias.update.plugin.odi.ODIPlugin.<init>(ODIPlugin.java:136)
... 17 more
[2013-10-24T16:49:07.869+05:30] [Framework] [ERROR] [UPGAST-00259] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] The getInitialValue method for plug-in ODI.ODI1 will not be called due to a previous error.
[2013-10-24T16:49:07.869+05:30] [Framework] [ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] Cause: An error occurred when loading or initializing the plug-in which prevents the getInitialValue method from executing.
[2013-10-24T16:49:07.869+05:30] [Framework] [ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] Action: Review the log file for additional details.
[2013-10-24T16:49:07.870+05:30] [Framework] [INCIDENT_ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] UPGAST-00251: An error occured reading Upgrade Descriptor file ODI\INSTALLATION\odi12cInstallation_1\odi\plugins\upgrade\odi.xml
[2013-10-24T16:49:07.870+05:30] [Framework] [INCIDENT_ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] The file does not conform to the expected syntax.
[2013-10-24T16:49:07.870+05:30] [Framework] [INCIDENT_ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] See the secondary message for additional information. Contact Oracle Support.
[2013-10-24T16:49:07.871+05:30] [Framework] [INCIDENT_ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] UPGAST-00259: The getInitialValue method for plug-in ODI.ODI1 will not be called due to a previous error.
[2013-10-24T16:49:07.871+05:30] [Framework] [INCIDENT_ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] [[
oracle.ias.update.exception.UpgradeException: UPGAST-00259: The getInitialValue method for plug-in ODI.ODI1 will not be called due to a previous error.
at oracle.ias.update.plugin.Plugin.getInitialValue(Plugin.java:317)
at oracle.ias.update.plan.PlanString.<init>(PlanString.java:67)
at oracle.ias.update.plan.PlanCustom.<init>(PlanCustom.java:74)
at oracle.ias.update.plan.PlanStep.<init>(PlanStep.java:189)
at oracle.ias.update.plan.PlanComponent.<init>(PlanComponent.java:203)
at oracle.ias.update.plan.Template.load(Template.java:161)
at oracle.ias.update.plan.Template.loadAllTemplates(Template.java:102)
at oracle.ias.update.UpgradeDriver.loadConfiguration(UpgradeDriver.java:838)
at oracle.ias.update.UpgradeDriver.main(UpgradeDriver.java:257)
at oracle.ias.update.UpgradeDriver.main(UpgradeDriver.java:175)
Thanks and Regards
Sunilok - I think I've got it figured. Appears to be a known issue. You need to apply patch p17073913_121200.
I downloaded that and applied to my Linux version - then re-ran the UA. This time the GUI started and so now I'm going through the upgrade steps.
The patch is generic, so should work for your windows environment too. Good luck. -
Can someone tell me what this error means; "ORA-12560: TNS:protocol adapter error"
I had Oracle XE on my Windows XP Pro SP3, but I also install the EE of Oracle which I haven't setup yet. Originally when I run this .bat file by double clicking on it, "setup_distran_database.bat", everything worked fine. But now, I am getting tghe above error. Not sure if it was because I installed Oracle EE.
This is the .bat file:
*@ECHO off*
*:: Ayo Ojikutu*
*:: Using Murach's Oracle SQL and PL/SQL*
*:: and Mike Murach & Associates, Inc. example*
*:: Nov 11, 2011*
*:: Uses SQL*Plus utility to run the SQL scripts that create*
*:: and populate the tables in the AP, OM, and EX schemas.*
*:: If necessary, edit the username/password*
sqlplus system/passwordhere @setup_distran_database*
*:: Display a message about the log file*
ECHO.
ECHO For details, check the setup_distran_database.log file in the current directory.
ECHO.
*:: Display 'press any key to continue' message*
PAUSE"ORA-12560: TNS:protocol adapter error"
Not sure if it was because I installed Oracle EE.Most probably yes, Windows has the last installed product environment. Try setting XE environment before running sqlplus, something likeset ORACLE_SID=XE
set ORACLE_HOME=<XE Oracle Home>
set PATH=<XE Oracle Home\bin>;%PATH%
sqlplus ..... -
Error while deployment BAT file
When deployment BAT file i have an error with description "1" and Message ID "10006". Therefore bat file has been successfully executed on client computer.
The customer asks reports of deployment so i can't show report with errors only))
Can anybody give an advise with this situation?
If answer is helpful, please mark as answer or hit the green arrow on the left.If you are using the application model, you can add return code 1 as a success in the
Return Codes tab of the deployement type. If not you can catch the exit code 1 in your batch file and return a 0 instead.
My Blog: http://www.petervanderwoude.nl/
Follow me on twitter: pvanderwoude -
We are on BO 11.5.0.0 and using the COM SDK with Visual Basic to run multiple reports (sometimes multiple flavors of the same report) through a bat file.
If we run the reports single-threaded through the bat file, the reports run fine. However, if multiple versions of the bat file start at approximately the same time, we get one of two errors:
91 Object variable or With block variable not set
102 Error during import document -
Here's the part of the code with the problem:
Dim BOapp As busobj.Application
Dim receiveDoc As busobj.Document
Set BOapp = New busobj.Application
BOapp.Interactive = False
BOapp.Logon strUser, strPass, strFromSystem, "Enterprise", False, False
BOapp.Visible = False
Set receiveDoc = BOapp.Documents.OpenFromEnterprise(strFromRep, strFromFolder, boFolder)
receiveDoc.SaveAs (strDocumentPath & strFromRep & ".REP")
Values for the following variables are passed in from the bat file:
strUser
strPass
strFromSystem
strFromRep
strFromFolder
strDocumentPath
If it fails on the OpenFromEnterprise statement, we get the 102 error.
If it fails on the SaveAs statement, we get the 91 error.
Running it through debug hasn't helped, since we are running only one report.
Any thoughts on what could be going wrong?
Thanks in advanceI have tried this running the VB code on my desktop (outside of the bat file) and nothing out of the ordinary occurs. The VB code runs fine with only one occurrence.
I had seen on other posts "ThisDocument" and didn't know if it would be applicable in this situation. I also wasn't sure how it should be used based on the rest of my code. Would "ThisDocument" make a difference?
Thanks again -
Error - executing oraclexmlsqlload.bat file
Hi,
I have downloaded XML SQL Utility.
I have set the path(JDK path and oracle xml sql utility path) in env.bat file. Now when I try to execute oraclexmlsqlload.bat file, it is getting executed to a point where it says "creating function" and then I get this error...
ORA-12203: TNS:unable to connect to destination.
can any one advice me on this error pls.
I have JDK setup right and JDBC is able to connect to the database.
Thanks in advance.
vik
nullIf you are using the application model, you can add return code 1 as a success in the
Return Codes tab of the deployement type. If not you can catch the exit code 1 in your batch file and return a 0 instead.
My Blog: http://www.petervanderwoude.nl/
Follow me on twitter: pvanderwoude -
Error when trying to run the rcu.bat file as part of OBIEE 11g installation
when trying to run the rcu.bat file as part of OBIEE 11g installation on windows 7 64 bit I am getting the following error
"windows cannot find C:\Users\manoj\Desktop\Oracle.Make sure you typed the name correctly, and then try again".
Please help me how to overcome this error, I am not able to understand why it is looking for C:\Users\manoj\Desktop\Oracle.
Thanks
Manojafter setting the ORACLE_HOME and Path environment variables also....I am still getting the same error...so is it like RCU can be run only on windows 7 32-bit machines and it does not work on 64-bit machines? and also it seems like the previous versions of OBIEE 10.1.3.X does not support windows 7 64-bit machines...
please help me finding a solution to this error....
and what are all the versions of OBIEE can be installed on windows 7 64-bit machines?
can't we install OBIEE 11g on windows 7 64-bit machines without including RCU?
thanks
Manoj
Edited by: mkumar on Jun 2, 2011 3:47 AM -
Batch Code to trigger bat file whenever there is an error in Eventvwr log error
Batch Code to trigger bat file whenever there is an error in Eventvwr log error
Hello,
You can create a windows service which can look into EventVwr and update you accordingly
Sample code:
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EventViewer
class Program
static void Main(string[] args)
//logType can be Application, Security, System or any other Custom Log.
string logType = "Application";
EventLog ev = new EventLog(logType, System.Environment.MachineName);
int LastLogToShow = ev.Entries.Count;
if (LastLogToShow <= 0)
Console.WriteLine("No Event Logs in the Log :" + logType);
// Read the last 2 records in the specified log.
int i;
for (i = ev.Entries.Count - 1; i >= LastLogToShow - 10; i--)
EventLogEntry CurrentEntry = ev.Entries[i];
Console.WriteLine("Event ID : " + CurrentEntry.EventID);
Console.WriteLine("Entry Type : " + CurrentEntry.EntryType.ToString());
Console.WriteLine("Message : " + CurrentEntry.Message + "\n");
Console.ReadKey();
ev.Close();
Alternative way is to use below link
http://blogs.technet.com/b/jhoward/archive/2010/06/16/getting-event-log-contents-by-email-on-an-event-log-trigger.aspx
Thanks
Abhishek -
Java virtual machine error: in running bat file!!!
Hi experts!
I have encounterd a problem . Could not figure out why I am having this. I hope at least I will get a clue /suggestion from any of you.
I am creating a bat file from my java Application. Then I double click on the newly created bat file to run that. It gives me Java virtual machine launcher error:" could not find the main class, Progam will exit". I have a VB script, that also create the same bat file. but I dont have problem running that file manually. Even if I create the bat file manually(by typing), it ran well. It shows the error mesage only when I create bat file from my java Application. Instead of running the bat file manually, I tried to run it through my java application too(by Runtime.exec() ). But it shows me the same error msg.
Why am I getting java virtual machine launcher error when I tried to run my bat file that is created from java Application? ANy clue? Please suggest me about how to resolve this.
RegardsProbably because (despite what you say) the contents of the bat file created by your Java application aren't the same as the contents of those other bat files.Yes contents are same. I create the bat file from my java Application. then I am trying to run that bat file manually. It gives me the specified error. But if I create the bat file manually (with the same content) and then run it manually. It works well.
Any clue/suggestion -
Running a Bat file from a stored procedure
This is part II of Re: Need to run bat file from application express
I thought I would open a new thread
I thought I had this fiqured out but it still doesn't work
1) I granted CREATE EXTERNAL JOB to my user
2) startup the OracleJobScheduler Service
3)
create or replace
PROCEDURE RUN_OS_COMMAND(p_cmd IN varchar2)
is
v_job_exists pls_integer:=0;
begin
select count(1)
into v_job_exists
from all_scheduler_jobs
where job_name='JAVA_EXE';
if v_job_exists>0 then
dbms_scheduler.drop_job(job_name =>'JAVA_EXE');
end if;
dbms_scheduler.create_job
( job_name =>'JAVA_EXE'
, job_action =>p_cmd
, job_type =>'executable'
, enabled =>false
, auto_drop =>false
, start_date =>systimestamp
dbms_scheduler.run_job(job_name =>'JAVA_EXE');
end;test.bat is del test.csv
I run this
begin
RUN_OS_COMMAND('C:\temp\test.bat');
end;
/ anonymous block completed
It runs with no errors but does not run the bat file... what am i missing, thanks DougLLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\wblincoe\Application Data
CLASSPATH=.;[ORACLE_HOME]\jdbc\lib\ojdbc6.jar;c:\myjar\xdocore.jar;c:\myjar\i18nAPI_v3.jar;c:\myjar\xdoparser.jar;c:\myjar\xmlparserv2.jar
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=WBLINCOELT
ComSpec=C:\WINDOWS\system32\cmd.exe
DEFLOGDIR=C:\Documents and Settings\All Users\Application Data\McAfee\DesktopProtection
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\wblincoe
LDMS_LOCAL_DIR=C:\Program Files\LANDesk\LDClient\Data
LOGONSERVER=\\03N-DAYT-DC01
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\OraHome_1\jre\1.4.2\bin\client;C:\OraHome_1\jre\1.4.2\bin;C:\app\wblincoe\product\11.1.0\db_1\bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PERL5LIB=C:\oracle\product\10.2.0\http_1\sysman\admin\scripts;C:\oracle\product\10.2.0\http_1\perl\site\5.6.1\lib;C:\oracle\product\10.2.0\http_1\perl\site\5.6.1;C:\oracle\product\10.2.0\http_1\perl\5.6.1\lib\MSWin32-x86;C:\oracle\product\10.2.0\http_1\perl\lib\5.6.1;C:\oracle\product\10.2.0\http_1\perl\lib\5.6.1\MSWin32-x86;
PHPRC=C:\Program Files\PHP\
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 2, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=0f02
ProgramFiles=C:\Program Files
PROMPT=$P$G
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\wblincoe\LOCALS~1\Temp
TMP=C:\DOCUME~1\wblincoe\LOCALS~1\Temp
USERDNSDOMAIN=CACI.COM
USERDOMAIN=CACI
USERNAME=wblincoe
USERPROFILE=C:\Documents and Settings\wblincoe
VSEDEFLOGDIR=C:\Documents and Settings\All Users\Application Data\McAfee\DesktopProtection
windir=C:\WINDOWS -
How to call a .bat file from java code?
How to call a .bat file from java code? and how can i pass parameters to that .bat file?
Thanks in advancethanks for ur reply
but still i am getting the same error.
I am trying to run a .bat file of together tool, my code looks like below
import java.lang.Runtime;
import java.lang.Process;
import java.io.File;
class SysCall{
public static void main(String args[]){
String cmd="D://Borland//Together6.2//bin//Together.bat -script:com.togethersoft.modules.qa.QA -metrics out:D://MySamples//Metrics// -fmt:html D://Borland//Together6.2//samples//java//CashSales//CashSales.tpr";
//String path="D://Borland//Together6.2//bin//Together.bat ";
Runtime r= Runtime.getRuntime(); //Declare the system call
try{
System.out.println("Before batch is called");
Process p=r.exec(cmd);
System.out.println(" Exit value =" + p.exitValue());
System.out.println("After batch is called");
/*can produce errors which must be caught*/
catch(Exception e) {
e.printStackTrace();
System.out.println (e.toString());
I am getting the below exception
Before batch is called
java.lang.IllegalThreadStateException: process has not exited
at java.lang.Win32Process.exitValue(Native Method)
at SysCall.main(SysCall.java:17)
java.lang.IllegalThreadStateException: process has not exited -
Trying to run a bat file from oracle
I have followed these steps, see bottom for results, everything is valid but the bat file does not run???? PLease need your help. Doug
CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "getbatx" AS
class getbatx //class pdfopen
public static void execmd(String c) //main function
try
System.out.println("Executing:" + c);
Runtime.getRuntime().exec("C:\\WINDOWS\\system32
cmd.exe /c "+c);
System.out.println("Executing:" + c + " ...done");
} catch (Exception e) //catch any exceptions here
System.out.println("Error" + e ); //print the error
CREATE OR REPLACE PROCEDURE host_command2 (p_command IN VARCHAR2)
AS LANGUAGE JAVA
NAME 'getbatx.execmd (java.lang.String)';
/Then as sysdba I put in in the following.
exec dbms_java.grant_permission( 'CAPRS', 'SYS:java.io.FilePermission', '<<ALL FILES>>', 'execute' );
EXEC Dbms_Java.Grant_Permission('CAPRS', 'SYS:java.lang.RuntimePermission', 'writeFileDescriptor', '');
EXEC Dbms_Java.Grant_Permission('CAPRS', 'SYS:java.lang.RuntimePermission', 'readFileDescriptor', '');Then I make the call.
SET SERVEROUTPUT ON SIZE 1000000
CALL DBMS_JAVA.SET_OUTPUT(1000000);
BEGIN
host_command2 (p_command => 'c:\mybook.bat');
END;
/***** I run this, it completes but does not run the bat file and there is no error message
SQL> BEGIN
2 host_command2 (p_command => 'mybook.bat');
3 END;
4 /
Executing:mybook.bat
Executing:mybook.bat ...done
PL/SQL procedure successfully completed.Yes it should open a dos box, but you forgot to add the .bat file witch you like to run: String[] command = {"cmd", "/c", "start", "c:/Batch files/Cardiobackup/cardiobackup_v1.4"}
-
Execute SSIS Package from JOB which contains Execute Process Task calling a .bat file
Hi All,
I have a EXCEL Macro needs to be called from SSIS. We could not use Script task because of some internal reason.
So we have taken an approach to call a .BAT file using Execute Process Task. This .BAT file will call a .VBS file which will execute the EXCEL Macro.
The SSIS Package is running good if I execute the package from BIDS.
But the real problem is with the scheduling this SSIS Package using SQL JOB.
If i execute this SSIS package from SQL Server Job, its executing the whole package successfully except the Execute Process Task.
So the overall issue is SQL Server Job is not executing properly if I call any .BAT file from the SSIS Package.
Please give me suggestion to get rid of the issue. Thanks in advance.Hi Sai.N,
If you run the SQL Server Agent job manually from SSMS, does the package execute properly? If the package executes properly when you run the job manually, the issue should occur due to permission issue. In this case, I suggest that you create a SQL Server
Agent proxy based on the current Windows account which you use to log onto the operating system, and run the job under the proxy account.
If it is not the issue, please enable logging in the package as Visakh mentioned and post the warning/error message for further analysis.
Regards,
Mike Yin
TechNet Community Support
Maybe you are looking for
-
Adobe After Effects CC, getting error message when trying to open
error -10810 Just bought a new computer and registered with Adobe for the CC and can't open After effects. What can I do?
-
Changing View Options for only 1 folder
I tried changing the View Options for Documents so that I can see which ones were modified recently, however it applies the Date Modified option to every single folder, including my home folder. Is there anyway to just change the View Option to a sin
-
I am thinking of purchasing an internal hard drive. My G4 is the model with the orange-lit power button, DVD player and internal ZIP drive. Although the zip drive is actually unmounted (physically) right now and I don't really care to put it back in.
-
Hi guys, I'm new to this forum, been with iPhone since October 2008, got no answer in other forums to this particular problem. I use 3G iPhone 8GB SF, OS 3.0.1. The problem started since I upgraded to 3.0 and enabled MMS. I sent a couple MMS, then de
-
I have installed oracle 9i (verison 1) on a win 2k system. When trying out the brief test demos in the sqlj folder I get the error "exception in thread "main" java.lang.noclassfounderror: TestInstallJDBC. TesInstallJDBC is the test demo which comes i