A problem in executing exp.exe through Java
while implementing oracle schema export I am facing problem in executing the exp.exe from JAVA. Please see sample code below.
Process p=null;
ProcessBuilder pb = new ProcessBuilder ("exp.exe","username/password@dbinstance", "owner=pr01",
"file=e:/temp/pr98.dmp","log=e:/temp/pr98.log","compress=y","grants=n","STATISTICS=COMPUTE");
try{
p = pb.start();
catch(Exception e){
System.out.println("Error="+e.getMessage());
where pr01 - name of schema to export.
With this code, the actual export of the project starts only after Java application is closed and not immediately on the click of a button.
I have used Runtime.exec() tooo...The same problem is there..
Any solution?
HI
Did you fix this problem with svrmgr. I have exactly the same problem and I am runing redhat 7.2 and oracle 8.1.6
Thanks, Jason
Similar Messages
-
Invoke exe through java code(using java.lang.Runtime)
Iam trying to invoke an exe from java code.If i give the complete path for that exe it is running fine .But if i set the environment variable and directly execute the exe through command prompt it iss running fine , but it fails to run when i do the same using java code i.e. java.lang.Runtime.exec function
Give "//" for directory seperator.
E.g. r.exec("c://test//test.exe",null);
Why? That doesn't look correct.It is correct. It will work fine. Try it out.But it doesn't add or solve anything. A forward slash
does not need to be escaped.'
It's not even escaping. It's just doubling up. If that works, I'd bet "C://///test///////test.exe" does also. -
Facing Problem while executing a command through WLST
Hi,
Iam using Weblogic 11g(10.3.2).Whenever I execute the below command in WLST on windows it is working fine.
reassociateSecurityStore(domain="base_domain",admin="cn=orcladmin",password="welcome1",ldapurl="ldap://<hostname>:389",servertype="OID",jpsroot="cn=jpsroot_idm_idmhost1")
But whenever i execute the same in Linux,it is throwing the error as below:
wls:/base_domain/serverConfig> reassociateSecurityStore(domain="base_domain",admin="cn=orcladmin",password="welcome1",ldapurl="ldap://<hoistname>:389",servertype="OID",jpsroot="cn=jpsroot_idm_idm1")
Traceback (innermost last):
File "<console>", line 1, in ?
NameError: reassociateSecurityStore
Please suggest....
Regards
PavanFacing Problem while executing a command through WLST
-
Execute dos commands through java
Hi,
Im trying to execute dos commands through java like
try {
java.lang.Runtime.getRuntime().exec("cmd /c cls");
}catch(IOException e){
System.out.println(e.getMessage());
}Not sure if its possible? however
open notepad would work
try {
java.lang.Runtime.getRuntime().exec("notepad");
}catch(IOException e){
System.out.println(e.getMessage());
}Im trying to execute a cls commands to clear screen but without luck.The question is, which shell do you want to clear?
I don't really know, but it could be that Runtime.exec executes its command in a new shell window... -
How to execute SAPgui.exe from java code
Hi All,
Can any one provide me the exe file name of SAP GUI related.
I need to call the SAP GUI related exe file from java.
i tried with a small java prog which executes the exe files.
it works fine with notepad.exe,javac.exe . But i am unable to execute the SAPgui.exe.
This is my java code
try{
Runtime rt=Runtime.getRuntime();
//String str= "C:
WINNT
system32
notepad.exe";
//Process pp=rt.exec("C:
j2sdk1.4.2_08
bin
javac");
Process pp=rt.exec("C:
Program Files
SAP
FrontEnd
SAPgui
SAPgui.exe");
BufferedReader br=new BufferedReader(new InputStreamReader(pp.getErrorStream()));
String line;
while ((line = br.readLine()) != null) {
System.out.println(line);
}catch(Exception e){
System.out.println(e);
and may i pass any additional parameters inorder to invoke this exe.
Please share your ideas abt this problem.
Its Urgent PLZ
Adv Thanks
Regds
Phani.hi Rajesh,
here my complete code:
try{
Runtime rt=Runtime.getRuntime();
// String str= "C:\Programmi\SAP\FrontEnd\SAPgui\saplogon.exe";
String str= "C:\Programmi\SAP\FrontEnd\SAPgui\Sapgui.exe 10.113.10.201 00";
// Process pp=rt.exec("C:\j2sdk1.4.2_08\bin\javac");
Process pp=rt.exec(str);
BufferedReader br=new BufferedReader(new InputStreamReader(pp.getErrorStream()));
String line;
while ((line = br.readLine()) != null) {
System.out.println(line);
}catch(Exception e){
System.out.println(e);
Please note that system number is only two digit and in your case is 00.
Another important think, i'm using the italian version of windows, so the program directory is c:\programmi, please change into c:\program files, or you can modify your code to be language indipendend using an system environment variable (if exist).
Hope this help
Francesco -
Problem in delivering Picture Messages through Java SMPP client
I m working on development of SMPP Client, using Java. In it�s development I didn�t used any API from eny vendor, and implemented purely in Java. I am facing one unusual problem in receiving of Picture Messages. Also, I have one C based client application.
I m sending picture message through both client application(s) to be delivered over different handset(s). I have tested many different cases, but could not conclude to any solution. The behavioral cases are as follows;
When I sent same picture message through Java SMPP client on Nokia 1100, it get received with prompt �Picture Message Received�. And on viewing it, �Message cannot be displayed�, is informed and no picture message get displayed. Till now it happens for every caseto this handst, but get properly displayed on Nokia 32xx / 53xx.
Whereas while sending through the C SMPP Client on Nokia 1100, sometime it get displayed and sometimes it doesn�t. Same prompts follows on not receiving right picture message while using Java SMPP Client
I m not understanding why;
It doesn�t get delivered correctly a picture message, every time I submits it to deliver on 1100 while sending through C based,
And why It doesn�t get delivered correctly at all while sending through Java SMPP client on 1100 whereas it get delivered correctly over other Nokia model handset.
Kindly, anyone make me solve out the prob���.Hi,
Even we have implemented the Java SMPP client, to sending the picture message as embeded SMS.
If you do not have issue to share the SMPPClient which is sending the picture message, I can look into the code and help you. Let me know, I can share my personal email id.
Edited by: sanmetalica on Apr 14, 2008 6:01 AM -
PLS-00201: Not able to execute Oracle Package through Java app
Hi,
My struts application is trying to execute an oracle procedure (in a package) and is getting following error.
I have granted execute priveledge to the user using "Grant execute on <package name> to <user>"
Also, I am able to execute the procedure through this user in sqlplus.
I am using Oracle thin driver for JDBC.
Please guide.
+06:36:17,500 ERROR [STDERR] java.sql.SQLException: ORA-06550: line 1, column 7:+
PLS-00201: identifier 'uhbvn_public.GENSYSLOGIN' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
+06:36:17,500 ERROR [STDERR] at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)+
+06:36:17,500 ERROR [STDERR] at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)+
+06:36:17,500 ERROR [STDERR] at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)+
+06:36:17,500 ERROR [STDERR] at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)+
+06:36:17,500 ERROR [STDERR] at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)+
+06:36:17,500 ERROR [STDERR] at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)+
+06:36:17,500 ERROR [STDERR] at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)+
+06:36:17,500 ERROR [STDERR] at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)+
+06:36:17,500 ERROR [STDERR] at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)+
+06:36:17,500 ERROR [STDERR] at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:656)+
+06:36:17,500 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.execute(WrappedPreparedStatement.java:209)+
+06:36:17,500 ERROR [STDERR] at wenrgise.ejb.common.utility.DBUtilitiesBean.callProc(DBUtilitiesBean.java:390)+
+06:36:17,500 ERROR [STDERR] at wenrgise.sysadmin.ejb.business.SysLoginBO.getSysLoginUserInfo(SysLoginBO.java:57)+
+06:36:17,500 ERROR [STDERR] at wenrgise.sysadmin.ejb.facade.SysLoginFacadeBean.getLoginInfo(SysLoginFacadeBean.java:37)+
+06:36:17,500 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)+
+06:36:17,500 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)+
+06:36:17,500 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)+
+06:36:17,500 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:592)+
+06:36:17,500 ERROR [STDERR] at org.jboss.invocation.Invocation.performCall(Invocation.java:359)+
+06:36:17,500 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)+
+06:36:17,500 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)+
+06:36:17,500 ERROR [STDERR] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)+
+06:36:17,500 ERROR [STDERR] at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)+
+06:36:17,500 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)+
+06:36:17,500 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)+
+06:36:17,500 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)+
+06:36:17,500 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)+
+06:36:17,500 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)+
+06:36:17,500 ERROR [STDERR] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)+
+06:36:17,500 ERROR [STDERR] at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)+
+06:36:17,500 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:960)+
+06:36:17,500 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)+
+06:36:17,500 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)+
+06:36:17,500 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)+
+06:36:17,500 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:592)+
+06:36:17,500 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)+
+06:36:17,500 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)+
+06:36:17,500 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)+
+06:36:17,500 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)+
+06:36:17,500 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)+
+06:36:17,500 ERROR [STDERR] at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)+
+06:36:17,500 ERROR [STDERR] at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)+
+06:36:17,500 ERROR [STDERR] at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)+
+06:36:17,500 ERROR [STDER+What part of
identifier 'uhbvn_public.GENSYSLOGIN' must be declareddon't you understand? -
Problem in executing vb script in java pgm
hi
i need to execute vb script in java pgm
i code is given below
there are no errors but the script is not executed,instead if i replace "command.exe \C G:/vb.vbs" with notepad,notepad is being executed
import java.lang.*;
import java.io.*;
public class run
public static void main(String args[])
Process p1;
Runtime r = Runtime.getRuntime();
try
p1 = r.exec("command.exe \C G:/vb.vbs");
catch(NullPointerException eo){}
catch(IOException e) { }
}Isn't it supposed to be "/C" and not "\C"?
-
How to execute .bat file through java?
I already create a batch file to pull & push file. Now, i want to execute this .bat file java.I got this example but it doesnt work. Did i missed something or do we have the better one?
import java.lang.*;
import java.io.*;
public class Loadfile
public static void main(String args[]) throws IOException
Runtime load = Runtime.getRuntime();
r.exec("C:\\pull.bat");
}For Runtime,i'd change it to:
Runtime load = Runtime.getRuntime();
String cmd = "C:\\javaclass\\copytemp.bat";
Process proc = load.exec(cmd.toString());Is it right? But still can't work.
Here is the .bat file:
@echo off
c:
cd "c:\Inetpub\ftproot\Debitin"
C:\Inetpub\ftproot\Logrecord\pullscript.txt echo open localhost
C:\Inetpub\ftproot\Logrecord\pullscript.txt echo Administrator
C:\Inetpub\ftproot\Logrecord\pullscript.txt echo password
C:\Inetpub\ftproot\Logrecord\pullscript.txt echo cd ftpScript
C:\Inetpub\ftproot\Logrecord\pullscript.txt echo binary
C:\Inetpub\ftproot\Logrecord\pullscript.txt echo lcd C:\
C:\Inetpub\ftproot\Logrecord\pullscript.txt echo lcd "C:\Inetpub\ftproot\infile"
C:\Inetpub\ftproot\Logrecord\pullscript.txt echo prompt n
pause
C:\Inetpub\ftproot\Logrecord\pullscript.txt echo mget *.txt::@rem >> C:\Inetpub\ftproot\Logrecord\pullscript.txt echo mdel *.*
C:\Inetpub\ftproot\Logrecord\pullscript.txt echo byeftp.exe -s:C:\Inetpub\ftproot\Logrecord\pullscript.txt
::del C:\Inetpub\ftproot\Logrecord\pullscript.txt
pause
exit
[\code] -
Executing a webservice through Java Program
Hi,
I need to execute an webservice in my java program.
I also have the requirmnet of executing a BAPI.
I am using JCO for executing BAPI.
Can anyone help me out in executing a webservice in Java Program.
Regards
PraveenHi,
Check
http://help.sap.com/saphelp_nw04/helpdata/en/24/d0ff2f5d872a468b4643e1fa740569/frameset.htm
and
http://java.sun.com/developer/technicalArticles/J2EE/j2ee_ws/
for consuming a WS
Check http://help.sap.com/saphelp_nw04/helpdata/en/76/4a42f4f16d11d1ad15080009b0fb56/frameset.htm for BAPI called from Java
Eddy
PS. Which type of SDN Ubergeek/BPX suit are <a href="/people/eddy.declercq/blog/2007/05/14/which-type-of-sdn-ubergeekbpx-suit-are-you">you</a>? -
Executing Workflow Task through JAVA APIs
Hi,
I'm able to send the workflow task to the next step with JAVA APIs.
The problem comes here if I try to log in into MDM through IConnectorGatewayService.
If I get a connection to MDM through CatalogData's login method, everything works fine, task is getting executed properly. But, if I try to run the same code where I get the connection through IConnectorGatewayService, the same code doesn't work.
Surprisingly, there is no problem in retrieving data from MDM while connecting with ConnectorGatewayService.
Please do let me know if I need to specify some parameters while getting the connection with IConnectorGatewayService so that I can change the workflow task status.
Thanks and Regards,
MausamHi Mausam
Please go through this document u will get the solution
https://help.sap.com/javadocs/MDM/current/index.html
https://help.sap.com/javadocs/MDM/current/index.html
I think it may help you
Regards
Hari -
Problem in executing a SP in Java using Oracle OCI Driver...
Hi,
I have a installed the Oracle OCI driver on iPlanet Web Server 4.1. The application has been designed using the Jakarta Struts framework where the dom classes act as an interface between the database and the application(action classes). The dom classes execute stored procedures stored in an SP packages (eg. DDTS_PACK.setContact(..)). Now here's the problem. When a new record is being inserted, the dom executes the 'setContact' stored procedure using a java.sql.CallableStatement. The execution of this stored procedure is successful at times and fails at times. What could be the reason?? Could it be something to do with connection pooling. The default connection pooling class from oracle, oracle.jdbc.pool.OracleConnectionCacheImpl() is being used to get the connection. The funny thing is that the stored procedure gets executed both the time (success/failure) and returns a return status as 'N' when it fails and 'Y' when it is successful.
I would be greatful to anybody who could give a solution to the above problem. Thanks and have a great day.
Regards,
AnandSince the pipe '|' is interpreted by the shell then you need the shell to invoke your command
String[] command = {"sh","-c","find /tmp/reports1 -name " + "\"" + "*" + "\"" + " -mtime +" + strdaysback + " -print|xargs rm -r"};
final Process process = Runtime.getRuntime().exec(command);
You should also read http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html at least twice and implement the recommendation regarding stdout and stderr.
P.S. Why are you not using Java to find and delete these files?
Message was edited by:
sabre150 -
Problem meet when call exe in java.
hi all,
in my java project, i call an external exe . now the problem is that sometimes the exe is not fully finished. How could i confirm that the exe is finished before i start to use the output of this exe.
i use following code to call the external exe:
Runtime.getRuntime().exec(command).Hi,
Please post this to an appropriate forum . this forum is exclusively related to creator
MJ -
How to close a running exe through java code
hai friends,
i need to close a running exe file through code...
i tried
Runtime r;
Process p;
try {
r = Runtime.getRuntime();
p=r.exec("d:\\aaa");
} catch (IOException ex)
p.destroy();but its not closing the application properly...
pls anyone help meksnagendran26 wrote:
how to exit the application which is running in quick launchWell my guess, since you are not providing specific information, is that java is in fact closing the application that it ran. What you are seeing is some other application that was spawned by whatever it is that you did. And java isn't going to close that because it doesn't even know it exists. -
Authorization problem to execute a report through portal
Hi All,
One of user while trying to execute report through portal, getting error message saying that
"you are not authorized to execute the report XXXXXXX'
Can not load query <query name> (data provider <data provider name> No authorizations for requested service.
The report is a web template which is getting executed through portal.
User is having all the authorizations to execute the report(report autho as well as infoprovider autho also)
we have regenerated the user roles , done user comparision....every thing is OK.
Still unable to execute the report.
Please advice what can be done in this case....
RegardsHi Shaik,
Are you able to run this report with your user id?
If so check the role or authorization objects which are missing to the user.
And also check whether he got portal roles assigned to his profile.
Regards,
Ravi Kanth
Edited by: Ravi kanth on May 12, 2009 2:06 PM
Maybe you are looking for
-
N97 - Maps 3.04 - difficult to create a multi-poin...
On the face of it, the fact that Maps 3.04 can allow a multi-point, ordered route to be created is a good thing. However, I find building such routes to be difficult, particularly where they involve a mix of places stored as Favourites and places fro
-
Can't import XSD (without Namespace) into WSDL
Hi We are developing a BPEL process that takes a XML message - that adheres to the new XSD (has a namespace) - and steps the message (translates) down in to the old XML message - that adheres to the current production XSD (does not have a namespace).
-
Adobe Reader 9.3 Installer - Error 1606
When trying to update Adobe Reader it stops and gives me an Error message of : ERROR 1606. Could not access network location %APPDATA%\. Please let me know what I need to do. Thanks
-
Maximun number of selections for rscrm_bapi
Hi all, I'm using to exctract a query in CSV format rscrm_bapi transaction. The query contains a customer exit variable to populate a list of customers reading from a DSO. Everything works well if the number customers is low, but when I load in DSO
-
1 measure for nothing before recording music to video
Opened a video to score, detected cuts got a buch of semi useful markers, created 1st music cue 4/4 @ 69 BPM (does not start at a cut detected marker), the 2nd cue will be 4/4 @ 48 BPM. Here's what I don't understand; I make a marker at the location