Execute (API) UI Command
Hi,
Is there a way to integrate a UI Command in a Java iView?
How can I execute an UI Command and show the Component in the jsp-File?
Regards,
Gerhard
Did you search this forum before posting this question?
It is very rude to post a question to a forum that has been answered so many times and that is easily findable in the forum...
Process p = Runtime.getRuntime().exec("your command");
BufferedReader read = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line = null;
while( (line = read.readLine()) != null)
System.out.println("OUT>>>" + line);
//
Similar Messages
-
Java APIs to execute external execute file or command
I would like to enquire about the 'program statement' to execute an external program or dos command (e.g 'cls' to clear the screen) in a java source program.
Is there any built-in API s which like 'execute' or something else so as to execute an external command ?Look at Runtime.exec()
However, 'cls' is not a external command in Windows it is and internal command and cannot be run using Runtime.exec()
If you are expecting to run programs in the same 'command prompt' window, you are going to be disappointed. That window is already running java.exe. -
Fatal error when trying to execute a dml-command with OLAP API
Hi,
when I created an OracleConnection using the jdbc thin driver. The connection works fine.
But when I try to execute any dml-command with an SPLExecutor the following fatal error occurs:
oracle.express.idl.util.OlapiException: ORA-37118: Message 37118 not found; product=RDBMS; facility=ORA
ORA-06512: at "SYS.GENCONNECTIONINTERFACE", line 66
ORA-06512: at line 1
Any Suggestions ?Hi Priya,
1.The entries for the initialization in the BW system are contained in the RSSDLINIT table for the DataSource/source system combination. Compare these with the entries in the ROOSPRMSC table in the OLTP system.
2. If there are NO entries in the RSSDLINIT table in BW, use transaction RSA7 to delete the delta queue for this DataSource/BW application combination in the source system (OLTP).
3.Once you deleted all the entries,In Infopackage scheduler option,delete all the init selections to proceed further.
In which system u r going to do this.....Quality or production.(Better,you check with basis to delete the entries.)
Regards
Kumar -
Hello!
Just upgraded from 10.2.0.4 64 bit Windows to 11.2.0.2 64 bit OEL it test environment. DB Compatibility = 11.2.
SQL> select comp_name,version,status from DBA_REGISTRY where comp_name like '%OLAP%';
COMP_NAME
VERSION STATUS
OLAP Analytic Workspace
11.2.0.2.0 VALID
Oracle OLAP API
11.2.0.2.0 VALID
OLAP Catalog
11.2.0.2.0 VALID
Problem 1: We had 2 AWs in PROD on 10.2.0.4.We can not open any of them in 10g mode.
Problem 2: When we are trying to create AW in 11G mode we receive this error: XOQ-00703: error executing OLAP DML command "(SYS.AWXML!R11_INITIALIZE_AW
We have tried to rerun xumuts.plb under sys.
Log contains following errors:
=============================================
BEGIN dbms_aw_build.build('EXPRESS', FALSE); END;
ERROR at line 1:
ORA-00600: internal error code, arguments: [xspg: RSALPAGE01], [8128], [], [],
ORA-06512: at "SYS.DBMS_AW_BUILD", line 107
ORA-06512: at line 1
BEGIN dbms_aw_build.build('AWMD', TRUE); END;
ERROR at line 1:
ORA-34738: A severe problem has been detected. Analytic workspace operations
have been disabled.
ORA-06512: at "SYS.DBMS_AW_BUILD", line 107
ORA-06512: at line 1
==========================================
and so on for each system AW
should we raise a SR or somebody has any idea?
Big thx in advance!
Regards,
Kirill
Edited by: Kirill on Jun 16, 2011 1:34 PMI think you should raise an SR on this issue.
-
How to execute dir dos command in Runtime Execution
Hi All,
Does anybody know how to execute the dir command in DOS in the runtime execution
for example,
when we open the command prompt,
c:\Documents and Settings\java> e:
e:\cd java
e:\dir *.*
how we can list the directory in runtime execution?Process childProcess = Runtime.getRuntime().exec("cmd /C dir *.*");or try with
ProcessBuilder pb = new ProcessBuilder("cmd /C dir *.*");
Process childProcess = pb.start();
NOTE: We can use the ProcessBuilder class from J2SE 5.0+.
for further reference check the below link
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html?page=3
and don't forget to go through API documentation for java.lang package
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/package-summary.html
and if you want to implement it through Java which provides you a list of Files & directories in the present directory here is an example of such code snippet REF:as insisted by my fellow poster.
File file = new File("<present_directory_path>");
if(file.isDirectory()){
String fileNames[] = file.list();
for(String fileName:fileNames)
System.out.println(fileName);
fileNames = null;
or for detailed info use
File files[] = file.listFiles();
for(File fileEntity:files)
System.out.println("FILENAME:"+fileEntity.getName+",IS FOLDER:"+fileEntity.isFolder()+",ABSOLUTE PATH:"+fileEntity.toString()+"FILE SIZE:"+fileEntity.length());
files = null;
}and please do not forget to go through File API Documentation provided as recommended by my fellow poster.
hope this might help :)
REGARDS,
RaHuL -
We have the SharePoint Server 2010 with SP1 environment on which the custom SP2010 designer pages were working as expected before the
August 13, 2013 CU has installed. But, getting the below exception while trying to add the new item after the CU has installed.
Error while executing web part: System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SharePoint.WebControls.SPDataSourceView.ExecuteInsert(IDictionary values) at
System.Web.UI.DataSourceView.Insert(IDictionary values, DataSourceViewOperationCallback callback) 3b64c3a0-48f3-4d4a-af54-d0a2fc4553cc
06/19/2014 16:49:37.65 w3wp.exe (0x1240) 0x1300 SharePoint Foundation
Runtime tkau Unexpected Microsoft.SharePoint.WebPartPages.DataFormWebPartException: The data source control
failed to execute the insert command. 3b64c3a0-48f3-4d4a-af54-d0a2fc4553cc at Microsoft.SharePoint.WebPartPages.DataFormWebPart.InsertCallback(Int32 affectedRecords, Exception ex) at System.Web.UI.DataSourceView.Insert(IDictionary
values, DataSourceViewOperationCallback callback) at Microsoft.SharePoint.WebPartPages.DataFormWebPart.FlatCommit() at Microsoft.SharePoint.WebPartPages.DataFormWebPart.HandleOnSave(Object sender, EventArgs e)
at Microsoft.SharePoint.WebPartPages.DataFormWebPart.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean
inclu... 3b64c3a0-48f3-4d4a-af54-d0a2fc4553cc
06/19/2014 16:49:37.65* w3wp.exe (0x1240) 0x1300 SharePoint Foundation
Runtime tkau Unexpected ...deStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 3b64c3a0-48f3-4d4a-af54-d0a2fc4553cc
I have tried changing the "DataSourceMode" as below, now the insert command is working, but update command is not working.
<SharePoint:SPDataSource runat="server" DataSourceMode="ListItem" />
Also, the lookup dropdown fields are displaying the value as "<a href="Daughterhttp://cpsp10/sites/Employees/_layouts/listform.aspx?PageType=4&ListId={8F62F444-FB6A-4F03-9522-C4696B45DCD1}&ID=10&RootFolder=*">Daughter</a>"
instead of only "Daughter".
Please provide the solution to get rid of this issue.
Thanks
RamasubbuTry below:
http://social.technet.microsoft.com/Forums/en-US/ae910269-3a0c-4506-844b-e8bc89d95b71/data-source-control-failed-to-execute-the-insert-command
http://blog.jussipalo.com/2012/01/sharepoint-2010-data-source-control.html
While there can be many causes for this generic error message, in my case the first parameter or ddwrt:DataBind function inside the SharePoint:FormFields element was
'i' and I was working with an Edit Form. Changing it to
'u' as it was with every other FormField fixed the issue.
<SharePoint:FormField runat="server" id="ff1{$Pos}" ControlMode="Edit" FieldName="Esittaja" __designer:bind="{ddwrt:DataBind('u',concat('ff1',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Esittaja')}"
/>
Explanation:
DataBind operation type parameters (the first parameter) are listed below:
'i' stands for INSERT,
'u' stands for UPDATE,
'd' stands for DELETE.
http://webcache.googleusercontent.com/search?q=cache:d9HHY4I7omgJ:thearkfloats.blogspot.com/2014/03/sharepoint-2010-data-source-control.html+&cd=4&hl=en&ct=clnk&gl=in
If this helped you resolve your issue, please mark it Answered -
We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader. For which, We created and execute the below command line to call Adobe Reader and print the PDF on a printer."C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" /T "\\<Application Server>\Report\<TEST.PDF>" "<Printer Name>". Current Situation: The above command line parameter when executed is working as expected in a User's Workspace. When executed in a command line on the Application Server is working as expected. But, the same is not working while executing it from Deployed environment.Software being used: 1. Adobe 11.0 enterprise version. 2. Webshpere Application Server 8.5.5.2. Please let us know if there is a way to enable trace logs in Adobe Reader to further diagnose this issue.
This is the Acrobat.com forum. Your question will have a much better chance being addressed in the Acrobat SDK forum.
-
Issue while executing the discovery command from target nodes
Hi Experts.
I had to create cluster two node using openfile, after creation of successful lun and associated partition from all the nodes i have changed the ip address of openfiler.
After changing the IP on open filer.
A) openfile version:-
[root@san ~]# uname -r
2.6.26.8-1.0.11.smp.pae.gcc3.4.x86.i686
B) Linux Oel5:-
[root@rac1 ~]# uname -r
2.6.18-194.el5xen
[root@rac1 ~]#
1:- I am able to ping and ssh etc from any node to openfiler.
However, while executing the below command i am facing the below exception..
service iscsi restart
Stopping iSCSI daemon:
iscsid dead but pid file exists [ OK ]
Starting iSCSI daemon: [ OK ]
[ OK ]
Setting up iSCSI targets: iscsiadm: No records found!
[ OK ]
[root@rac1 ~]#
Moreover, tried to discover the targets, unfortunately no message is getting displayed after execution of this below command.
[root@rac1 ~]# iscsiadm -m discovery -t sendtargets -p 192.168.37.200
[root@rac1 ~]#
The quick response will be appreciated as my whole test case is down as of now due storage issues.
Thanks,
Arch.Are you running a firewall that needs to be adjusted to support your changed Openfiler IP network?
-
Executing an OS command !!
Hi
Have anyone tried executing an OS command in UNIX(AIX) with SP12 File/FTP adapter ?
We have created a shell script , ve given execute permissions for all(chmod 777) and tried executing it using file adapter , but we dont see it working.
Ve referred to the weblog & few forum threads, but could'nt get to work
checked an SAP note , but all it talks abt is the way the implementation has been changed from SP13 . Does this mean it never works in SP12 ? pls let know
Regards
SaravanaHi Saravan,
You can try writing a log to another file for each command in your shell script. Atleast you would know why exactly the command is failing.
Something similar to this inside your script itself..
/people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching
Regards
Anand -
How to execute a Unix Command in java
Hi, Iam trying to execute a unix command on Sun Solaris by passing that command to a java program. How can I achieve this?
Thanks in advance.Have a look at the javadoc around the Runtime.exec() method. If the command is a shell command then you might have to execute a shell as well as the command.
For example, if you wanted to run a unix command 'ls -l > output.txt' the you might have to pass the following string into the exec() method,
"/bin/sh ls -l > output.txt' -
Executing a SQL Command in my bean class
Hello everyone,
I'm using JDeveloper 12.1.2.0.0.
I have an interest in executing a query in my bean method. I've done some research and i still got a code but it can't find the method that the method requires so i tried to added the query in my AppModule and i've added my method as a data control but how can i access it and modify it in my bean method?
The page with the code that doesn't find the method: http://jjzheng.blogspot.pt/2010/11/run-single-query-in-application-module.html
Which gives me: "Method 'getDBTransaction' not found"
The page that creates my method as a data control: http://amit-adf-work.blogspot.pt/2013/09/how-to-execute-sql-using-adf-application.html
Is any of this the right way? How can i execute a SQL Command in my bean class?
Regards,
Frederico.This is the code I use
// GET A METHOD FROM PAGEDEF AND EXECUTE IT
// get the binding containe
BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
// get an Action or MethodAction
OperationBinding method = bindings.getOperationBinding("YourMethodAction");
// if there are parameters to set...
Map paramsMap = method.getParamsMap();
paramsMap.put("param","value") ;
// execute the method
method.execute();
List errors = method.getErrors();
if (!errors.isEmpty())
// handle errors here errors is a list of exceptions!
// no error resume normal work
Timo -
Query execute() API goes for inifinite wait (Hang)
Hi
I am using BDB XML 2.4 in Fedora core-4. when I execute xquery update operation followed by FLWOR get query, the execute() API goes for infinite wait. We have tried setting NOWAIT flags to see if it waits for lock, but the program is in INFINITE wait (hang) state.
Below is the sample code and query I have used.
#include <dbxml/DbXml.hpp>
using namespace DbXml;
int
main(int argc, char **argv)
std::string containerName = "myContainer.dbxml";
std::string docFilename = "./NECB1.xml"; // the filename
std::string queryString1 = "declare namespace SWI='SWI'; <getBulkResult> { let $i :=collection()//SWI:wmanIfBsOfdmaDownlinkChannelTable return ($i)} </getBulkResult>";
std::string queryString = "replace node collection()//SWI:wmanIfBsOfdmaDownlinkChannelTable/SWI:wmanIfBsOfdmaDownlinkChannelEntry[@ifIndex='2']/SWI:wmanIfBsOfdmaDownlinkCenterFreq with <SWI:wmanIfBsOfdmaDownlinkCenterFreq>3</SWI:wmanIfBsOfdmaDownlinkCenterFreq>";
try {
u_int32_t env_flags=DB_CREATE|DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_AUTO_COMMIT|DB_RECOVER|DB_INIT_TXN;
DbEnv *clEnv = new DbEnv(0);
clEnv->open("/tmp",env_flags,0);
XmlManager mgr;
if (mgr.existsContainer(containerName))
mgr.removeContainer(containerName);
// Now it is safe to create the container
XmlContainer cont = mgr.createContainer(containerName);
u_int32_t cf =1000; //time out value in micro seconds
clEnv->set_timeout(cf,DB_SET_LOCK_TIMEOUT);
// All Container modification operations need XmlUpdateContext
XmlUpdateContext uc = mgr.createUpdateContext();
// Create the file input stream
XmlInputStream *myStream = mgr.createLocalFileInputStream(docFilename);
// Put the document in the container
cont.putDocument(docFilename, myStream, uc, 0); //TODO try without last parm(0)
std::cout << "File loaded" << std::endl;
// Querying requires an XmlQueryContext
XmlQueryContext qc = mgr.createQueryContext();
qc.setDefaultCollection(containerName);
qc.setNamespace("SWI","SWI");
std::cout << "update query " << std::endl;
XmlQueryExpression expr = mgr.prepare(queryString, qc);
XmlResults res = expr.execute(qc); //modify
std::cout << "get query " << std::endl;
XmlQueryExpression expr1 = mgr.prepare(queryString1, qc);
XmlResults res1 = expr1.execute(qc); //getbulk
std::cout << "The query modify, '" << expr.getQuery() << "' returned " <<
res.size() << " result(s)" << std::endl;
XmlValue value;
std::cout << "Result 1: " << std::endl;
while (res.next(value)) {
std::cout << "\t" << value.asString() << std::endl;
std::cout << "The query 2 bulk , '" << expr1.getQuery() << "' returned " <<
res1.size() << " result(s)" << std::endl;
XmlValue value1;
std::cout << "Result 2: " << std::endl;
while (res1.next(value1)) {
std::cout << "\t" << value1.asString() << std::endl;
} catch (XmlException &xe) {
std::cout << "XmlException: " << xe.what() << std::endl;
return 0;
Sample output:
===========
[root@localhost santhosh]# ./query
File loaded
update query
get query
^C
Please let me know what could be the issue. Do I need to set any transaction related flags? I hope it should through exception if any setting/query is wrong.
Thanks,
SanthoshHi Santhosh,
Because you aren't using explicit transactions, your update query is being auto-transacted, and the read-only query is running without a transaction. This is very bad, and is giving you a self-deadlock situation. You should use an explicit transaction for your queries.
John -
Is it possible to execute OS level commands through Oracle APEX?
Hi,
I would like to know if it is possible to execute OS level commands, say executing any command in command prompt using Oracle APEX.
Thanks!Welcome to Oracle Forums!
Please acquaint yourself with the FAQ and forum etiquette if you haven't already done so.
Always state
<ul>
<li>Apex Version</li>
<li>DB Version and edition</li>
<li>Web server used.I.e. EPG, OHS, ApexListner Standalone or with J2EE container</li>
<li>When asking about forms always state tabular form if it is a tabular form</li>
<li>When asking about reports always state Classic / IR</li>
<li>Always post code snippets enclosed in a pair of {code} tags as explained in FAQ</li>
</ul>
I would like to know if it is possible to execute OS level commands, say executing any command in command prompt using Oracle APEX.If by OS you are referring to the client side, then NO.
Cheers, -
Hi Gurus,
Im trying to execute a OS Command inside the file adapter.
Its a .exe file which I have written. The exe file will take in 2 parameters.
I entered this in the OS Command
F:\test\run.exe test.xml output.txt
However, it seems that the command is not be executed. Am I missing anything?
Thanks in advance.Hi,
Refer these blogs:
Executing Unix shell script using Operating System Command in XI
The specified item was not found.
The specified item was not found.
http://help.sap.com/saphelp_nw70/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
Re: RUN OPERATING SYSTEM COMMAND BEFORE MESSAGE PROCESING { Aashish Sinha }
Its is better you write the code in the batch file (.bat) and call the batch file at runtime rather than using .exe file
Regards,
Nithiyanandam -
How to execute system specific command from Java ?
I know it was done with System(String command); in C/C++.
Or is it possible at all ?Runtime.getRuntime().exec(...)And, read this:
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
Maybe you are looking for
-
Upgrade from AMD 64 to AMD X2 64
Hello : I think to upgrade from AMD Athlon 64 3200+ to AMD Athlon 64 X2 3800+ (Dual Core), but i don't know if my motherboard support it. Motherboard : MSI K8N Neo4 Platinum Edition (MS-7125) 06/23/2005-MS-7125-6A61FM49C-00 PCB :
-
Has FM 9 or 10 a better working dictionary for non-english languages?
I am using FM 7 (latest update) on Windows Vista. As it is now, there's a limit of how many characters a word can have for it to be entered into the dictionary. We here in Sweden have 3 letters that are not present in the English language, å, ä and ö
-
Explain Delegation in the context of Exchange Sharing
Hello, My company, MIT, recently migrated to Exchange server . . . I figured out how to use my iCal, and am trying to avoid Entourage, but I'm confused about the sharing support in iCal, and somewhat disappointed. Basically what I think is that deleg
-
A site is telling me that i have no digital certificate installed....
Hi. Trying to access a page on the Spanish version of the IRS, to file a tax document here. I can't get access to the page (or any of their secure pages), and I get this message, which has been Google translated: ''The error "403 byrule" is a mistake
-
Hi: I am trying to show product number (item name in inventory) on the istore UI. However, all the standard templates that exist only show the product name and description (that correspond to short and long description in the inventory module). Is th