Invoke a CFC from Java
Can you give me an example of where or why you would invoke a CFC from Java? I have used CF to call Java and then having Java return "data" back to the CFC but not sure I know why I would want my Java to invoke a CFC.
Thanks
Hi,
how to invoke a exe file from a java program. (
operating system: windows )
is it possible ?Yep.
Navigate yourself around pitfalls related to the Runtime.exec() method
Similar Messages
-
How to invoke dos shell from java program
Hi,
I'm not able to invoke dos shell from java.
Can any one help me in this issue.
I'm providing the source code below:
try{
Runtime.getRuntime().exec("cmd.exe")
catch(IOException e) {
System.out.println(e.getStackTrace());
ThanksDoes it throw a different exception?
Or does it just do nothing at all?
It does nothing at all[/b
Is this a standalone Java app?
Or a Java Applet running via a webbrowser? [b]It's a standalone application -
How to invoke BPEL process from JAVA API
Hi Guys
Any idea if you can tell me how to invoke BPEL process from JAVA API ?
What to do in BPEL process manager to achieve that?
Regards
DeepakSee http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28981/invoke.htm#sthref1373 and the JavaDocs http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28986/toc.htm.
-
Invoking Microsoft Word from Java code
I want to invoke Microsoft word from Java code. How can i do this plz ............... Help
do something along these lines.... here is an example with notepad
create a .bat file with the commmand in to run notepad for example
notpad c:\test.txtthis command calls notepad and passes it the argument C:\test.txt which is the file and it's location, that I want to open.
The Java program
import java.util.*;
import java.io.*;
public class Run
public static void main(String args[])
try
//the name of the batch file with your commands in
String command ="runprog.bat";
//get the runtime
Runtime rt = Runtime.getRuntime();
//run the bat file
Process proc = rt.exec(command);
//wait for the program to exit i.e notepad then get the return code
int exitVal = proc.waitFor();
//print out the exit value
System.out.println(2THe Process exit value is: " + exitVal);
catch(Throwable t)
t.printStackTrace();
}have a look at this
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html
and this
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps_p.html -
Invoke beanshell methods from java
Hello
I'm learning beanshell and using it to write scripts that are ran in JDK 6.
My question is how to invok beanshell methods from java source codes.
My codes is:
import javax.script.*;
public class InvokeFunctions {
public static void main (String[] args)throws ScriptException, NoSuchMethodException
ScriptEngineManager sem = new ScriptEngineManager();
ScriptEngine bshEngine = sem.getEngineByName("beanshell");
String script = "public void sayHello()"+"{print (\"sayHello() is a method in bsh script\");}";
bshEngine.eval(script);
Invocable inbshEngine = (Invocable)bshEngine;
inbshEngine.invokeFunction("sayHello");
I defined a method "sayHello()" using beanshell, but i just can't invoke it in Java.
I got an error msg said:
Exception in thread "main" java.lang.IllegalAccessError: tried to access method bsh.NameSpace.getThis(Lbsh/Interpreter;)Lbsh/This; from class bsh.engine.BshScriptEngine
Any one has any idea about it?
ThanksLook at the Javadoc documentation of IllegalAccessError. It says:
Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to.
Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed.
Maybe recompiling all your sources (make sure you delete all existing *.class files) will help? -
Invoking dos commands from java
hi all,
I just want to invoke dos prompt from java.I know it can be done using "Runtime.getRuntime()" command.But when i try to create a directory inside another directory,how can i specify the path of the destination directory.i googled as well as tried different things.But i failed to make it up.Please help me solve this problem.
thanks in advance
RegardsHai,
Thanks for your respond.
If I give "cmd" command only, I am getting dos command window, but I didn't get the prompt like
c: or d:
How can I do it?
Expecting more helps
Joseph -
Invoking C# WS from java axis proxy generated from the same WSDL
I am trying to transparently use the same java interface for invoking a java axis WS and a C# WS generated from the same WSDL interface.
I believe the problem may be that the .NET web service which is generated from the WSDL file, is dynamically exposing a WSDL file which is not exactly the same as the original WSDL used to generate the abstract C# class with "wsdl.exe"
When I try to invoke the C# web service with the java axis client I get the error message:
"Server did not recognize the value of HTTP Header SOAPAction: ."
Any suggestions about how to be able to use the same client interface from java, to invoke a C# web service and a java axis web service supporting (i.e. generated from) the same WSDL ?The JNI method name in the .h file is different to that in the .c file.
-
Invoking Bpel Process from JAVA
Hi I am new to BPEl.
I am trying to Invoke Bpel From Java client provided in samples...
i am getting
java.lang.NullPointerException
at this line..
Map payload = res.getPayload();
The Bpel Process is on my local machine...
i kept the properties file as it is....
Can any one Respond please.....Hi
now i am getting this exception
java.lang.Exception: Failed to create "ejb/collaxa/system/DomainManagerBean" bean; exception reported is: "javax.naming.NamingException: Lookup error: java.lang.NoClassDefFoundError: javax/servlet/http/HttpSessionContext; nested exception is:
java.lang.NoClassDefFoundError: javax/servlet/http/HttpSessionContext [Root exception is java.lang.NoClassDefFoundError: javax/servlet/http/HttpSessionContext]
at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:168)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at com.oracle.bpel.client.util.BeanRegistry.lookupDomainManagerBean(BeanRegistry.java:218)
at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:83)
at com.oracle.bpel.client.Locator.<init>(Locator.java:140)
at com.oracle.bpel.client.Locator.<init>(Locator.java:111)
at com.otn.samples.RMIClient.main(RMIClient.java:49)
Caused by: java.lang.NoClassDefFoundError: javax/servlet/http/HttpSessionContext
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:1655)
at java.lang.Class.getDeclaredMethod(Class.java:1262)
at java.io.ObjectInputStream$1.run(ObjectInputStream.java:1198)
at java.security.AccessController.doPrivileged(Native Method)
at java.io.ObjectInputStream.auditSubclass(ObjectInputStream.java:1190)
at java.io.ObjectInputStream.verifySubclass(ObjectInputStream.java:1171)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:248)
at com.evermind.io.ClassLoaderObjectInputStream.<init>(ClassLoaderObjectInputStream.java:16)
at com.evermind.server.ejb.EJBInputStream.<init>(EJBInputStream.java:35)
at com.evermind.server.rmi.RMIInputStream.<init>(RMIInputStream.java:20)
at com.evermind.server.rmi.RMIConnection.createInputStream(RMIConnection.java:2417)
at com.evermind.server.rmi.RMIConnection.connect(RMIConnection.java:2555)
at com.evermind.server.rmi.RMIConnection.connect(RMIConnection.java:2361)
at com.evermind.server.rmi.RMIConnection.lookup(RMIConnection.java:1800)
at com.evermind.server.rmi.RMIServer.lookup(RMIServer.java:676)
at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:149)
... 6 more
can you say how to fix this... -
Invoking bpel process from java in oracle soa/bpm 11g
Hi,
We have some java code to invoke bpel process in oracle BPM 10g following the instructions in http://download-east.oracle.com/docs/cd/B14099_19/integrate.1012/b14448/invoke.htm.
Basically the steps are:
1) get a Locator (com.oracle.bpel.client.Locator)
2) get IDeliveryService (com.oracle.bpel.client.delivery.IDeliveryService) reference from locator
3) call IDeliveryService method request or post with input message and get the response back.
Recently we want to migrated from oracle bpm 10g to oracle soa/bpm 11g. But I can not find the similar API in 11g. It seems now some adapter/binding need to be added in exposed service lane in soa composite view, for example, ADF-BC, direct binding etc, in order to allow java to invoke a bpel process. Here are two very useful links from Edwin about the detail how this is implemented.
http://biemond.blogspot.com/2009/11/invoking-soa-suite-11g-service-from.html
http://biemond.blogspot.com/2009/11/calling-soa-suite-direct-binding.html?showComment=1285198033913#comment-c1055322845511794252
My question is:
1) what are the choices and the official/best way to invoke a bpel process in oracle soa/bpm 11g from java?
2) does user need to add an adapter/binding in exposed service lane in order to let the bpel service be called in java?
3) what is the real difference between a bpm application and soa application in 11g?
I will really appreciate any expert's opinion.
Thanks,
BinThanks for your reply and confirmation, really appreciate it.
Yes, I found the difference of the invoking process API and was able to invoke bpel process using direct and ADF-BC binding by following Edwin's blog. But I have not found any official reference to compare this API difference between 10g and 11g ( I will mark this question as answered if anyone can find an official source from oracle, need to prove it to the team). The API to work with human task workflow seems pretty much the same between 10g and 11g. -
Invoking command prompt from Java
public class NewClass2 {
public static void main(String[] args) {
Runtime p = Runtime.getRuntime();
p.exec("cmd");
I would like to invoke dos prompt from my java application. The above code is not working. What could be the problem? I am using Windows XP m/c with netbeans.jjegan wrote:
public class NewClass2 {
public static void main(String[] args) {
Runtime p = Runtime.getRuntime();
p.exec("cmd");
I would like to invoke dos prompt from my java application. The above code is not working. What could be the problem? I am using Windows XP m/c with netbeans.You didn't give it hands and feet, i.e. you can't expect the cmd.exe process to fire up a terminal for its input and output; you have to do that yourself. Read all about the Input- and OutputStreams of those sub-processes in the API documentation of the Processs class.
kind regards,
Jos -
How to invoke Bpel process from java using 'bpel process WSDL'
I want to call bpel process from java using bpel wsdl.
could any one point me to any url/sample.
Thanks
NagajyothyHi Seshagiri,
Thanks for providing links and initial steps to create web service proxy(using Jdeveloper 11g).
I created a web service proxy.
provided the needed inputs.
when I ran the client app, bpel process(has a human task) got invoked but faulted with exception as below
Operation 'initiateTask' failed with exception 'EJB Exception: : java.lang.ExceptionInInitializerError[[
at oracle.tip.pc.services.common.ServiceFactory.getAuthorizationServiceInstance(ServiceFactory.java:147)
at oracle.bpel.services.workflow.task.impl.TaskService.initiateTask(TaskService.java:1159)
at oracle.bpel.services.workflow.task.impl.TaskService.initiateTask(TaskService.java:502)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
please help me in solving the above problem.
Thanks
Nagajyothy -
Invoking beautiful widgets from Java Code
Hi experts,
I have the code given below which I obtained from www.gigya.com website. If I add the code given below in an html, I can view the widget inside the html as shown in the attached image in [http://docs.google.com/Doc?id=dfzrknk_31gxvz9nd8|http://docs.google.com/Doc?id=dfzrknk_31gxvz9nd8]
I would like to know, how I can invoke this widget from a Java code.
Please help.
Any help in this regard will be well appreciated with points.
//Copy the code below to the head section of your page:
<script src="http://cdn.gigya.com/wildfire/js/wfapiv2.js"></script>
//Copy the code below and place next to content item:
<div id="divWildfirePost"></div>
<script>
var pconf={
defaultContent: 'TEXTAREA_ID',
UIConfig: '<config><display showDesktop="false" showEmail="true" useTransitions="true" showBookmark="true" codeBoxHeight="auto"></display><body><background frame-color="#BFBFBF" background-color="#FFFFFF" gradient-color-begin="#ffffff" gradient-color-end="#F4F4F4" corner-roundness="4;4;4;4"></background><controls color="#202020" corner-roundness="4;4;4;4" gradient-color-begin="#EAEAEA" gradient-color-end="#F4F4F4" bold="false"><snbuttons type="textUnder" frame-color="#D5D5D5" background-color="#fafafa" over-frame-color="#60BFFF" over-background-color="#ebebeb" color="#808080" gradient-color-begin="#FFFFFF" gradient-color-end="d4d6d7" size="10" bold="false" down-frame-color="#60BFFF" down-gradient-color-begin="#6DDADA" over-gradient-color-end="#6DDADA" down-gradient-color-end="#F4F4F4" over-color="#52A4DA" down-color="#52A4DA" over-bold="false"><more frame-color="#A4DBFF" over-frame-color="#A4DBFF" gradient-color-begin="#F4F4F4" gradient-color-end="#BBE4FF" over-gradient-color-begin="#A4DBFF" over-gradient-color-end="#F4F4F4"></more><previous frame-color="#BBE4FF" over-frame-color="#A4DBFF" gradient-color-begin="#FFFFFF" gradient-color-end="#A4DBFF" over-gradient-color-begin="#A4DBFF" over-gradient-color-end="#F4F4F4"></previous></snbuttons><textboxes frame-color="#CACACA" color="#757575" gradient-color-begin="#ffffff" bold="false"><codeboxes color="#757575" frame-color="#DFDFDF" background-color="#FFFFFF" gradient-color-begin="#ffffff" gradient-color-end="#FFFFFF" size="10"></codeboxes><inputs frame-color="#CACACA" color="#757575" gradient-color-begin="#F4F4F4" gradient-color-end="#ffffff"></inputs><dropdowns list-item-over-color="#52A4DA" frame-color="#CACACA"></dropdowns></textboxes><buttons frame-color="#8DD1FF" gradient-color-end="#BBE4FF" color="#202020" bold="false" over-gradient-color-begin="#BBE4FF" down-gradient-color-begin="#BBE4FF" over-gradient-color-end="#FFFFFF" down-gradient-color-end="#ffffff"><post-buttons frame-color="#8DD1FF" gradient-color-end="#BBE4FF"></post-buttons></buttons><listboxes frame-color="#CACACA" corner-roundness="4;4;4;4" gradient-color-begin="#F4F4F4" gradient-color-end="#FFFFFF"></listboxes><checkboxes checkmark-color="#00B600" frame-color="#D5D5D5" corner-roundness="3;3;3;3" gradient-color-begin="#F4F4F4" gradient-color-end="#FFFFFF"></checkboxes><servicemarker gradient-color-begin="#ffffff" gradient-color-end="#D5D5D5"></servicemarker><tooltips color="#6D5128" gradient-color-begin="#FFFFFF" gradient-color-end="#FFE4BB" size="10" frame-color="#FFDBA4"></tooltips></controls><texts color="#202020"><headers color="#202020"></headers><messages color="#202020"></messages><links color="#52A4DA" underline="false" over-color="#353535" down-color="#353535" down-bold="false"></links></texts></body></config>'
Wildfire.initPost('457492', 'divWildfirePost', 400, 300, pconf);
</script>Warm Regards,
AneesAneesAhamed wrote:
Not even in a frame? java.awt.Frame or HTML frame? The former: no. The latter: probably, but it's not a Java question. -
Invoking .SQL file from JAVA
Hi All,
Anyway of calling .SQL files from JAVA ??
thanks in advance..What do you mean by calling?
Are you talking about a stored procedure? Then yes.typo !!
i meant invoking .SQL script only...
No not stored procedure..i mean running or invoking a sql file containing sql statements(inserts etc) -
Invoking unix executable from java
How do I capture the RETURN VALUE from the Unix process (executable) invoked from java program
After using Runtime.getRuntime() , and using runtime.exec(ProcessName), You get a Process object you can use waitFor() method of process. After that call process.getInputStream() and encapsulate in DataInputStream then onwards u can use readLine method to get value it is returned.
S.M.Reddy. -
Invoking python program from java
I want to execute a parser program(which is in python) that parses log file from java interface.The design of Java user interface has to be such that the log file is obtained from the user into a text field.The file name has to be read from the text field and this has to be taken by the python log parser program.How can this be implemented?
You can invoke an external program using:
Runtime.getRuntime().exec("bla.exe");
See: http://java.sun.com/j2se/1.4.1/docs/api/
Maybe you are looking for
-
I have downloaded the new version of Itunes, but it did not help.
-
Flv Video inserted into page by Dreamweaver won't play or show up on page??
The following code was inserted into a web page for a site I am trying to build in Dreamweaver CS5.5, but the video clip does not show up when I try to view the page in browser: <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="202"
-
Design of Cube for Year and Period from Posting Date
Experts, In my report requirement one of the selection criteria is Year and Month (YY-MM) which needs to be got from the Posting Date. In my ODS I have a 0PSTING_DATE. What infobjects are needed in the cube to get the value of YY and Period and the m
-
Hi, I am new to BSP. I want to know about BSP programing and how can i run the BSP programs? To run BSP program how can configure the internet services? Plese give the complete solution. Thanks & Regards, Dhanunjaya Reddy.
-
Unable to view Hard and Soft Returns
I've upgraded to 09 for Keynote and I can no longer see the lighter blue icons indicating hard and soft returns which allow control for my copy flow when animating the text. How do I make these viewable again?