Interacting with adapters from Spring Component, especially db adapter

hello everybody,
I try to interact with adapters from my Spring component. I actually try to start my query and to receive the result in my Spring Component.
I've already search for documentation about api to communicate with it or documentation about the classes created during the db adapter creation... But .. no result..
So I'm trying to do it my self but I encounter some problems when I'm trying to call the query on the dbAdapter and trying to "play" with the classes created by the db adapter.
Could anyone say me HOW we can interact with adapters from Spring component (in the class bean)?
Also, how can I access to the variables? Is there an equivalent of "getVariableData" and "setVariableData" that I can use in the Spring Component? with which jar and/or import?
I copy/paste what I've already done.
So My Composite contains a Web Service "getStatusByCC" which is linked to a Mediator. The Mediator calls the Spring Component "SprinCallDB" and the Spring Component is linked to a database adapter called "getCreditValidation". The transformation in the mediator component is correct (I test it without the call to the db and it works fine)
First, there is the classes created and added to my project by the db adapter :
Creditcardinfo.java
package com.oracle.xmlns.pcbpel.adapter.db.top.getcreditvalidation;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
* <p>Java class for Creditcardinfo complex type.
* <p>The following schema fragment specifies the expected content contained within this class.
* <pre>
* &lt;complexType name="Creditcardinfo">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="ccnumber">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;maxLength value="20"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/element>
* &lt;element name="status" minOccurs="0">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;maxLength value="20"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/element>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Creditcardinfo", propOrder = {
"ccnumber",
"status"
public class Creditcardinfo {
@XmlElement(required = true)
protected String ccnumber;
protected String status;
* Gets the value of the ccnumber property.
* @return
* possible object is
* {@link String }
public String getCcnumber() {
return ccnumber;
* Sets the value of the ccnumber property.
* @param value
* allowed object is
* {@link String }
public void setCcnumber(String value) {
this.ccnumber = value;
* Gets the value of the status property.
* @return
* possible object is
* {@link String }
public String getStatus() {
return status;
* Sets the value of the status property.
* @param value
* allowed object is
* {@link String }
public void setStatus(String value) {
this.status = value;
CreditcardinfoCollection.java
package com.oracle.xmlns.pcbpel.adapter.db.top.getcreditvalidation;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
* <p>Java class for CreditcardinfoCollection complex type.
* <p>The following schema fragment specifies the expected content contained within this class.
* <pre>
* &lt;complexType name="CreditcardinfoCollection">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="Creditcardinfo"
* type="{http://xmlns.oracle.com/pcbpel/adapter/db/top/getCreditValidation}Creditcardinfo" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CreditcardinfoCollection", propOrder = {
"creditcardinfo"
public class CreditcardinfoCollection {
@XmlElement(name = "Creditcardinfo")
protected List<Creditcardinfo> creditcardinfo;
* Gets the value of the creditcardinfo property.
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the creditcardinfo property.
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getCreditcardinfo().add(newItem);
* </pre>
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Creditcardinfo }
public List<Creditcardinfo> getCreditcardinfo() {
if (creditcardinfo == null) {
creditcardinfo = new ArrayList<Creditcardinfo>();
return this.creditcardinfo;
GetCreditValidationSelectCcnb.java
package com.oracle.xmlns.pcbpel.adapter.db.top.getcreditvalidation;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
* <p>Java class for getCreditValidationSelect_ccnb complex type.
* <p>The following schema fragment specifies the expected content contained within this class.
* <pre>
* &lt;complexType name="getCreditValidationSelect_ccnb">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="ccnb" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "getCreditValidationSelect_ccnb", propOrder = {
"ccnb"
public class GetCreditValidationSelectCcnb {
@XmlElement(required = true)
protected String ccnb;
* Gets the value of the ccnb property.
* @return
* possible object is
* {@link String }
public String getCcnb() {
return ccnb;
* Sets the value of the ccnb property.
* @param value
* allowed object is
* {@link String }
public void setCcnb(String value) {
this.ccnb = value;
ObjectFactory.java
package com.oracle.xmlns.pcbpel.adapter.db.top.getcreditvalidation;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.bind.annotation.XmlRegistry;
import javax.xml.namespace.QName;
* This object contains factory methods for each
* Java content interface and Java element interface
* generated in the com.oracle.xmlns.pcbpel.adapter.db.top.getcreditvalidation package.
* <p>An ObjectFactory allows you to programatically
* construct new instances of the Java representation
* for XML content. The Java representation of XML
* content can consist of schema derived interfaces
* and classes representing the binding of schema
* type definitions, element declarations and model
* groups. Factory methods for each of these are
* provided in this class.
@XmlRegistry
public class ObjectFactory {
private final static QName CreditcardinfoCollectionQNAME = new QName("http://xmlns.oracle.com/pcbpel/adapter/db/top/getCreditValidation", "CreditcardinfoCollection");
private final static QName GetCreditValidationSelectCcnbInputParametersQNAME = new QName("http://xmlns.oracle.com/pcbpel/adapter/db/top/getCreditValidation", "getCreditValidationSelect_ccnbInputParameters");
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.oracle.xmlns.pcbpel.adapter.db.top.getcreditvalidation
public ObjectFactory() {
* Create an instance of {@link CreditcardinfoCollection }
public CreditcardinfoCollection createCreditcardinfoCollection() {
return new CreditcardinfoCollection();
* Create an instance of {@link GetCreditValidationSelectCcnb }
public GetCreditValidationSelectCcnb createGetCreditValidationSelectCcnb() {
return new GetCreditValidationSelectCcnb();
* Create an instance of {@link Creditcardinfo }
public Creditcardinfo createCreditcardinfo() {
return new Creditcardinfo();
* Create an instance of {@link JAXBElement }{@code <}{@link CreditcardinfoCollection }{@code >}}
@XmlElementDecl(namespace = "http://xmlns.oracle.com/pcbpel/adapter/db/top/getCreditValidation", name = "CreditcardinfoCollection")
public JAXBElement<CreditcardinfoCollection> createCreditcardinfoCollection(CreditcardinfoCollection value) {
return new JAXBElement<CreditcardinfoCollection>(_CreditcardinfoCollection_QNAME, CreditcardinfoCollection.class, null, value);
* Create an instance of {@link JAXBElement }{@code <}{@link GetCreditValidationSelectCcnb }{@code >}}
@XmlElementDecl(namespace = "http://xmlns.oracle.com/pcbpel/adapter/db/top/getCreditValidation", name = "getCreditValidationSelect_ccnbInputParameters")
public JAXBElement<GetCreditValidationSelectCcnb> createGetCreditValidationSelectCcnbInputParameters(GetCreditValidationSelectCcnb value) {
return new JAXBElement<GetCreditValidationSelectCcnb>(_GetCreditValidationSelectCcnbInputParameters_QNAME, GetCreditValidationSelectCcnb.class, null, value);
package-info.java
@javax.xml.bind.annotation.XmlSchema(namespace = "http://xmlns.oracle.com/pcbpel/adapter/db/top/getCreditValidation", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
package com.oracle.xmlns.pcbpel.adapter.db.top.getcreditvalidation;
GetCreditValidation_ptt.java
package getcreditvalidation.validationforccwithspring.creditcardvalidation.db.adapter.pcbpel.com.oracle.xmlns;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.ParameterStyle;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.ws.Action;
// !DO NOT EDIT THIS FILE!
// This source file is generated by Oracle tools
// Contents may be subject to change
// For reporting problems, use the following
// Version = Oracle WebServices (11.1.1.0.0, build 111209.0821.28162)
@WebService(targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/CreditCardValidation/validationForCCWithSpring/getCreditValidation",
name="getCreditValidation_ptt")
@XmlSeeAlso(
{ com.oracle.xmlns.pcbpel.adapter.db.top.getcreditvalidation.ObjectFactory.class })
public interface GetCreditValidation_ptt
@WebMethod
@SOAPBinding(parameterStyle=ParameterStyle.BARE)
@Action(input="http://xmlns.oracle.com/pcbpel/adapter/db/CreditCardValidation/validationForCCWithSpring/getCreditValidation/getCreditValidation_ptt/getCreditValidationSelectRequest",
output="http://xmlns.oracle.com/pcbpel/adapter/db/CreditCardValidation/validationForCCWithSpring/getCreditValidation/getCreditValidation_ptt/getCreditValidationSelectResponse")
@WebResult(targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/top/getCreditValidation",
partName="CreditcardinfoCollection", name="CreditcardinfoCollection")
public com.oracle.xmlns.pcbpel.adapter.db.top.getcreditvalidation.CreditcardinfoCollection getCreditValidationSelect(@WebParam(targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/top/getCreditValidation",
partName="getCreditValidationSelect_inputParameters", name="getCreditValidationSelect_ccnbInputParameters")
com.oracle.xmlns.pcbpel.adapter.db.top.getcreditvalidation.GetCreditValidationSelectCcnb getCreditValidationSelect_inputParameters);
Here there is the classes linked to the Spring Component and the configuration file :
SpringCallDB
<?xml version="1.0" encoding="windows-1252" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:lang="http://www.springframework.org/schema/lang"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:sca="http://xmlns.oracle.com/weblogic/weblogic-sca"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd http://www.springframework.org/schema/tool http://www.springframework.org/schema/tool/spring-tool-2.5.xsd http://xmlns.oracle.com/weblogic/weblogic-sca META-INF/weblogic-sca.xsd">
<!--Spring Bean definitions go here-->
<sca:service name="CCSpringService" target="CCSpringImpl"
type="validationForCC.spring.service.api.ISpringCCService"/>
<bean id="CCSpringImpl" class="validationForCC.spring.service.impl.SpringCCServiceImpl">
<property name="dbRequest" ref="getCreditValidation"/>
</bean>
<sca:reference type="getcreditvalidation.validationforccwithspring.creditcardvalidation.db.adapter.pcbpel.com.oracle.xmlns.GetCreditValidation_ptt"
name="getCreditValidation"/>
</beans>
CreditCardNumber.java
package validationForCC.spring.model;
public class CreditCardNumber {
private String ccNumber;
public CreditCardNumber() {
super();
public void setCcNumber(String nb){
this.ccNumber = nb;
public String getCcNumber(){
return ccNumber;
Response.java
package validationForCC.spring.model;
public class Response {
String reply;
public Response() {
super();
public void setReply(String rep){
this.reply = rep;
public String getReply(){
return reply;
ISpringCCService.java
package validationForCC.spring.service.api;
import validationForCC.spring.model.CreditCardNumber;
import validationForCC.spring.model.Response;
public interface ISpringCCService {
* @param ccn
* @return
public Response getCCStatus(CreditCardNumber ccn);
SpringCCServiceImpl.java
package validationForCC.spring.service.impl;
import com.oracle.xmlns.pcbpel.adapter.db.top.getcreditvalidation.*;
import java.util.List;
import javax.jws.WebParam;
import validationForCC.spring.model.CreditCardNumber;
import validationForCC.spring.model.Response;
public class SpringCCServiceImpl {
public SpringCCServiceImpl() {
super();
private getcreditvalidation.validationforccwithspring.creditcardvalidation.db.adapter.pcbpel.com.oracle.xmlns.GetCreditValidation_ptt dbRequest;
public Response getCCStatus(CreditCardNumber ccn){
Response resp = new Response();
CreditcardinfoCollection resultSet;
GetCreditValidationSelectCcnb selectCCNb = new GetCreditValidationSelectCcnb();
selectCCNb.setCcnb(ccn.getCcNumber());
resultSet = dbRequest.getCreditValidationSelect(selectCCNb);
resp.setReply((resultSet.getCreditcardinfo().get(0).getStatus()));
return resp;
public getcreditvalidation.validationforccwithspring.creditcardvalidation.db.adapter.pcbpel.com.oracle.xmlns.GetCreditValidation_ptt getDbRequest(){
return dbRequest;
public void setDbRequest(getcreditvalidation.validationforccwithspring.creditcardvalidation.db.adapter.pcbpel.com.oracle.xmlns.GetCreditValidation_ptt dbReq){
this.dbRequest = dbReq;
So, the line which is the cause of the error is the following :
resultSet = dbRequest.getCreditValidationSelect(selectCCNb);
in the SpringCCServiceImpl.java class
And there is the error I obtain :
+weblogic.sca.api.ScaException: java.lang.RuntimeException: BINDING.JCA-12563 Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'getCreditValidationSelect' failed due to: DBReadInteractionSpec Execute Failed Exception. Query name: [getCreditValidationSelect], Descriptor name: [getCreditValidation.Creditcardinfo]. Caused by Exception [EclipseLink-6003] (Eclipse Persistence Services - 2.3.1.v20111018-r10243): org.eclipse.persistence.exceptions.QueryException Exception Description: The number of arguments provided to the query for execution does not match the number of arguments in the query definition. Query: ReadAllQuery(name="getCreditValidationSelect" referenceClass=Creditcardinfo ). See root exception for the specific exception. This exception is considered not retriable, likely due to a modelling mistake. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.
Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'getCreditValidationSelect' failed due to: DBReadInteractionSpec Execute Failed Exception. Query name: [getCreditValidationSelect], Descriptor name: [getCreditValidation.Creditcardinfo]. Caused by Exception [EclipseLink-6003] (Eclipse Persistence Services - 2.3.1.v20111018-r10243): org.eclipse.persistence.exceptions.QueryException Exception Description: The number of arguments provided to the query for execution does not match the number of arguments in the query definition. Query: ReadAllQuery(name="getCreditValidationSelect" referenceClass=Creditcardinfo ). See root exception for the specific exception. This exception is considered not retriable, likely due to a modelling mistake. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.
java.lang.RuntimeException: BINDING.JCA-12563 Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'getCreditValidationSelect' failed due to: DBReadInteractionSpec Execute Failed Exception. Query name: [getCreditValidationSelect], Descriptor name: [getCreditValidation.Creditcardinfo]. Caused by Exception [EclipseLink-6003] (Eclipse Persistence Services - 2.3.1.v20111018-r10243): org.eclipse.persistence.exceptions.QueryException Exception Description: The number of arguments provided to the query for execution does not match the number of arguments in the query definition. Query: ReadAllQuery(name="getCreditValidationSelect" referenceClass=Creditcardinfo ). See root exception for the specific exception. This exception is considered not retriable, likely due to a modelling mistake. ". The invoked JCA adapter raised a resource exception. Please examine the above error message ca
Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'getCreditValidationSelect' failed due to: DBReadInteractionSpec Execute Failed Exception. Query name: [getCreditValidationSelect], Descriptor name: [getCreditValidation.Creditcardinfo]. Caused by Exception [EclipseLink-6003] (Eclipse Persistence Services - 2.3.1.v20111018-r10243): org.eclipse.persistence.exceptions.QueryException Exception Description: The number of arguments provided to the query for execution does not match the number of arguments in the query definition. Query: ReadAllQuery(name="getCreditValidationSelect" referenceClass=Creditcardinfo ). See root exception for the specific exception. This exception is considered not retriable, likely due to a modelling mistake. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution. +
Any idea is welcome! :)
If you have great urls to communicate with adapters and variables from spring component, don't hesitate to post it!
Thanks in advance,
Sophie
Edited by: 953383 on Sep 18, 2012 6:41 AM
Edited by: 953383 on Sep 18, 2012 6:43 AM
Edited by: 953383 on Sep 18, 2012 6:46 AM

Hello,
Finally, I can interact with my db adapter.
But, I ask you the following question : is there any documentation on the manner to interact with adapters and other component of the suite and on all classes generated?
Thanks in advance,
Sophie

Similar Messages

  • Interacting with Powershell from Java

    Hi,
    I'm trying to run a Java application which creates a new powershell process on startup and then later on interacts with it multiple times. Calling powershell.exe and have it execute a single command and return the output works fine for me. The problem arises if I don't want the powershell process to immediately finish/exit but to stay open so I can write to its outputStream and receive results back from the inputStream.
    String input = "dir";
    String[] commandList = {"powershell.exe", "-Command", "dir"};
    ProcessBuilder pb = new ProcessBuilder(commandList);
    Process p = pb.start();
    if(input != null) { 
    PrintWriter writer = new PrintWriter(new OutputStreamWriter(new BufferedOutputStream(p.getOutputStream())), true);
    writer.println(input);
    writer.flush();
    writer.close();
    //p.getOutputStream().close();
    Gobbler outGobbler = new Gobbler(p.getInputStream());
    Gobbler errGobbler = new Gobbler(p.getErrorStream());
    Thread outThread = new Thread(outGobbler);
    Thread errThread = new Thread(errGobbler);
    outThread.start();
    errThread.start();
    System.out.println("Waiting for the Gobbler threads to join...");
    outThread.join();
    errThread.join();
    System.out.println("Waiting for the process to exit...");
    int exitVal = p.waitFor();
    System.out.println("\n****************************");
    System.out.println("Command: " + "cmd.exe /c dir");
    System.out.println("Exit Value = " + exitVal);
    List<String> output = outGobbler.getOuput();
    input = "";
    for(String o: output) { 
    input += o;
    System.out.println("Final Output:");
    System.out.println(input);
    This code returns the result of the "dir" command from a powershell - fine. But as you can see, I'm trying to run a second "dir" command using
    PrintWriter writer = new PrintWriter(new OutputStreamWriter(new BufferedOutputStream(p.getOutputStream())), true);
    writer.println(input);
    writer.flush();
    This has no effect whatsoever - no second dir output is shown when I run my code. I've also experimented with a powershell.exe option to open the powershell but not close it immediately:
    String[] commandList = {"powershell.exe", "-NoExit", "-Command", "dir"};
    But then my code hangs, meaning the Gobbler's who consume the process's inputStream don't read anything - strangely enough: they don't even read the first line - there must be at least some output....
    I've also tried to close the process's outputStream after writing the second "dir" command to it - didn't change anything.
    But when I initially call the cmd.exe using the /k (keep open) switch:
    String[] commandList = {"cmd.exe", "/k", "dir"};
    I can then still write to that outputstream and invoke the second "dir" command and get the output of both "dir" commands from the inputstream fo that process.
    Any help is highly appreciated.
    Thanks
    Kurt

    user4491593 wrote:
    BUT: my Gobblers only read the output of all my commands Then why don't change your Gobbler code ? ;)
    Test this, it's ugly and needs improvemens, but by now works fine on linux and windows:
    public class Gobbler implements Runnable {
        private PrintStream out;
        private String message;
        private BufferedReader reader;
        public Gobbler(InputStream inputStream, PrintStream out) {
            this.reader = new BufferedReader(new InputStreamReader(inputStream));
                   this.out = out;
            this.message = ( null != message ) ? message : "";
        public void run() {
            String line;
            try {
                while (null != (line = this.reader.readLine())) {
                    out.println(message + line);
                this.reader.close();
            } catch (IOException e) {
                System.err.println("ERROR: " + e.getMessage());
    public class PowerConsole {
        private ProcessBuilder pb;
        Process p;
        boolean closed = false;
        PrintWriter writer;
        PowerConsole(String[] commandList) {
            pb = new ProcessBuilder(commandList);
            try {
                p = pb.start();
            } catch (IOException ex) {
                throw new RuntimeException("Cannot execute PowerShell.exe", ex);
            writer = new PrintWriter(new OutputStreamWriter(new BufferedOutputStream(p.getOutputStream())), true);
            Gobbler outGobbler = new Gobbler(p.getInputStream(), System.out);
            Gobbler errGobbler = new Gobbler(p.getErrorStream(), System.out);
            Thread outThread = new Thread(outGobbler);
            Thread errThread = new Thread(errGobbler);
            outThread.start();
            errThread.start();
        public void execute(String command) {
            if (!closed) {
                writer.println(command);
                writer.flush();
            } else {
                throw new IllegalStateException("Power console has ben closed.");
        public void close() {
            try {
                execute("exit");
                p.waitFor();
            } catch (InterruptedException ex) {
        public static void main(String[] args) throws IOException, InterruptedException {
            /*   PowerConsole pc = new PowerConsole(new String[]{"/bin/bash"});
            PowerConsole pc = new PowerConsole(new String[]{"/bin/bash"});
            pc.execute("pwd");
            pc.execute("ls");
            pc.execute("cd /");
            pc.execute("ls -l");
            pc.execute("cd ~");
            pc.execute("find . -name 'test.*' -print");
            pc.close();
            //      PowerConsole pc = new PowerConsole(new String[]{"cmd.exe"});
            PowerConsole pc = new PowerConsole(new String[]{"powershell.exe", "-NoExit", "-Command", "-"});
            System.out.println("========== Executing dir");
            pc.execute("dir");
            System.out.println("========== Executing cd\\");
            pc.execute("cd \\"); Thread.sleep(2000);
            System.out.println("========== Executing dir");
            pc.execute("dir"); Thread.sleep(2000);
            System.out.println("========== Executing cd \\temp");
            pc.execute("cd \\temp"); Thread.sleep(2000);
            System.out.println("========== Executing dir");
            pc.execute("dir"); Thread.sleep(2000);
            System.out.println("========== Executing cd \\bubba");
            pc.execute("cd \\bubba"); Thread.sleep(2000);
            System.out.println("========== Exiting .... bye.");
            pc.close();
    }I tested this and there is still a little problem -look at the test below.
    It seems that when thecommand
    executed in the powershell prints only a one ot two lines,
    powershell doesn't flush the output stream
    .... but this rather problem of powershell, not the java code
    I have not a clue how to force powershell to flush
    it's output stream after each command.
    C:\temp>java -jar PowerShell.jar
    ========== Executing dir
        Directory: Microsoft.PowerShell.Core\FileSystem::C:\temp
    Mode                LastWriteTime     Length Name
    -a---        2012-01-09     01:16       5290 PowerShell.jar
    ========== Executing cd\
    ========== Executing dir
        Directory: Microsoft.PowerShell.Core\FileSystem::C:\
    Mode                LastWriteTime     Length Name
    d----        2012-01-08     02:56            61587b977687a6e22fbe
    d----        2011-12-14     03:19            Documents and Settings
    d----        2011-12-15     00:05            oraclexe
    d-r--        2012-01-08     03:44            Program Files
    d----        2012-01-05     19:59            sqldeveloper
    d----        2012-01-09     01:15            temp
    d----        2012-01-09     01:13            WINDOWS
    -a---        2011-12-14     03:12          0 AUTOEXEC.BAT
    -a---        2011-12-14     03:12          0 CONFIG.SYS
    ========== Executing cd \temp
    ========== Executing dir
        Directory: Microsoft.PowerShell.Core\FileSystem::C:\temp
    Mode                LastWriteTime     Length Name
    -a---        2012-01-09     01:16       5290 PowerShell.jar
    ========== Executing cd \bubba
    Set-Location : Cannot find path 'C:\bubba' because it does not exist.
    At line:1 char:3
    + cd  <<<< \bubba
    ========== Exiting .... bye.
    C:\temp>

  • Interacting with database from web

    Here's the situation. I have some dumb terminal (client) that interacts with a server, which holds a database. I want users to be able to query that database from the web and have it create a page with the results.
    Since I did not know cgi, or servlets, etc., I devised a primitive method. I was planning on having the database create html files and send it to the webserver so the users can interact with the premade html files. This is not a good idea :) since there would be thousands of files made.
    What is the best way to interact with the database? Servlets? Can you use servlets freely or do you need a commercial license? Please exuse my newbiness :)

    You don't need any commercial software to use Servlets and JSPs.
    Have a look at the Tomcat servlet engine from Jakarta:
    http://jakarta.apache.org
    I expect that if you search these forums (particularly the JDBC and JavaServer Pages forums) you'll find various examples of JSPs and Servlets that connect to a database to allow primitive querying capabilities.
    Hope this helps.

  • SelectBox with data from Service Component

    Hello,
    I have a SelectBox using a Service Component, I tried both using a wizard-created SC and a custom made one.
    With both, the Selectbox contains a last empty option which does not come from the SC. If selecting this empty option the running webdynpro crashes with 500.
    java.lang.NullPointerException
    at com.sap.tc.wd4vc.core.std.attributes.impl.provider.XGLEnumProvider.set(XGLEnumProvider.java:236)
    at com.sap.tc.webdynpro.progmodel.context.DataAttributeInfo$CalculatedAccessor.set(DataAttributeInfo.java:736)
    at com.sap.tc.webdynpro.progmodel.context.DataAttributeInfo.setAttributeValue(DataAttributeInfo.java:525)
    at com.sap.tc.webdynpro.progmodel.context.NodeElement.wdSetObject(NodeElement.java:600)
    at com.sap.tc.webdynpro.progmodel.context.MappedNodeElement.wdSetObject(MappedNodeElement.java:79)
    I have no idea where this empty option may come from....
    Other issues: the SC has two fields in a static data store:
    "num" and "name" for the selectbox option's "value" and "text",
    e.g.
    num=1, name=foo
    num=2, name=bar
    if num is of type number, and your configuring the selectbox entrylist to use the dynamic SC, you cant select the num-field as its type is number and not text.
    however you may select the num-field manually via the expressions dialog.
    another issue:
    it seems the static datastore may create multiple rows only if created via the SC-wizard which allows you to enter multiple static data rows.
    if creating a SC manually you cant assign multiple data-rows, the static-store's fields may only assigned once with data, no rightclick-option to "add a new record"...
    these little bugs make working productively with VC very exhausting ...
    thanks for any hint regarding the bogus selectbox-SC-connection!
    kai

    the problems rise ...
    if i select the combobox right at the beginning after page loading has completed, a proper combo list appears (still with the empty entry, which yields 500 if getting selected).
    however after the form-inputs have changed (by selecting a row in a table) selecting the combobox instantly results in a 500er without even displaying the combo`s selection-list:
    com.sap.tc.webdynpro.progmodel.context.ContextException: NodeElement(.Generic.DynamicDataNode) is invalid, either it has been removed from the context or the context has already been destroyed
        at com.sap.tc.webdynpro.progmodel.context.NodeElement.assertValid(NodeElement.java:1274)
        at com.sap.tc.webdynpro.progmodel.context.Paths.createAttributePointer(Paths.java:246)
        at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.DropDownByKeyAdapter.setViewAndNodeElement(DropDownByKeyAdapter.java:206)
        at com.sap.tc.webdynpro.clientserver.uielements.adaptmgr.URAdapterManager.getAdapterFor(URAdapterManager.java:348)
        at com.sap.tc.webdynpro.clientserver.uielements.adaptmgr.URAdapterManager.getAdapterFor(URAdapterManager.java:124)
    this whole dynamic-list feature seems to be hardcore-buggy.
    any ideas?
    kai

  • Interacting with a compiled LABView executable from another VI

    I'm using a piece of hardware that has it's driver executable written in LABView. I would like to interact with it from the inside of my own VI. There's no dedicated LABView driver and I don't have access to the source code. Communication happens over USB. The particular functionality that I need is changing one numeric control, which governs the current that's provided.
    Could someone help me with this in any way?
    If that matters, I'm using LV2013.

    Was the exe built with VI Server/ActiveX enabled? If so, all you need is a set control value method. If your company was the one that commissioned the exe, for a small cost the vendor can enable this option and rebuild it. If you did commission it, you should have required the source code in the contract.
    Other options include using something like AutoIT. You could also turn on NI-Spy/I/O Trace and capture all of the VISA commands. Even though there might not be a driver, you should have a manual that you can read. Implementing a single command should be pretty trivial.

  • Interaction with different interfaces

    Hi,
    I m using two ethernet interface (iprb0 & iprb1) in Solaris 10, i want to interact with both from my same application program, but i don't know that how i can open both of them as the driver file (iprb) is same for both interfaces, so i can assure that from which interface i m interacting, if i do:
    int fd=open (/dev/iprb, 'O_RDWR');

    Basically solved it myself. I'm now using the actual required component usage (IEmployee) as entry point for the factory, which will create the correct implementation component (based on configuration). For IModelComponent specific methods I can use the getInterfaceController() of the employee component usage class and cast it to the model component interface.

  • Interacting with VMICPCI-5588

    Hi!
    I have some Compact PCI board (reflective memory VMICPCI-5588 of VMIC) and would like to interact with it from a NI's real-time computer (say, PXI-8170). I have a VMIC's driver for NT, can I use it somehow in this standalone computer module ? If not, what may be a possible solution ?
    What kind of realtime operation system does that module have ?
    Thank you,
    Sergey.

    Sergey,
    Only boards that are programmable through registers are supported in LabVIEW Real-Time. See KnowledgeBase
    2CCG05KN :Using VISA to Write Drivers Supported in LabVIEW Real-Time for Third Party PX....
    The PXI-8170/850 MHz RT controller runs a proprietary real-time operating system with an embedded version of LabVIEW. You develop your programs in the Windows environment and download them through Ethernet to the RT Series PXI controller, where the programs run deterministically.
    Chad H.
    Applications Engineering
    National Instruments
    http://ni.com/ask

  • Math Interface Toolkit in Matlab: Can I interact with a VI as a parallel process

    I'm curious if it's possible to create a Matlab MEX file using the LabVIEW Math Interface Toolkit (MIT) that can be called in matlab and accessed while running?
    I'd like it to effectively work just like any other object in matlab.  I'd like to be able to query the object while it's running, dump values out of a buffer, and even hook events if possible.
    As it currently stands, the VI to MEX setup seems to just allow me to call a VI, run it, and then drop out.  I want to be able to continuously acquire and access the data as it's coming in and interact with it from matlab (i.e. fully integrate the VI into my matlab code as a separate object).
    Is this possible in some form or am I stuck with dedicating the matlab interface to the VI whenever I want to call it?
    Thanks

    Hi GusLott,
    You are correct that when you call a VI the command line will not continue until the output is obtained.  This makes sense since in LabVIEW that is how a VI operates (a subVI does not ouput until all outputs are obtained).  I believe this is also how commands in MATLAB work as well (correct me if I am wrong).  On the otherhand this is not a disadvantage in labVIEW since you can run VIs in parallel.  If you can create some way to run parallel threads in MATLAB then you will be able to do two (or more) MEX calls at once. 
    As far as object oriented programming goes, there is a labVIEW OOP, but I do not think it has been tested in conjuction with the Math Interface Toolkit.
    Brian K.

  • How to interact with a COM component from a Java class

    Hi, could someone give a hint on what API I should explore in order to interact with a COM component from a Java class?
    Thanks in advance
    Luis

    jacob sounds nice...http://danadler.com/jacob/

  • I have a macbook pro from 2009 and the software is 10.5.8 how do i update it so i can have more interaction with the applications

    i have a macbook pro from 2009 and the software is 10.5.8 how do i update it so i can have more interaction with the applications

    Note some programs may not work with Lion or later
    Upgrading to 10.7 and above, don't forget Rosetta!

  • "Providing interactive database lookup from forms" sample doesn't work with Acrobat Reader 7

    I have downloaded and tested the Adobe sample "Adobe LiveCycle Designer 7.0, Providing interactive database lookup from forms". Everything works great in Acrobat Professional Full version, however, when I tested it in Acrobat Reader 7.0.5, it generated a "script failed..." message.
    Did anybody have the same problem? You can download the sample from here:
    http://partners.adobe.com/public/developer/en/livecycle/lc_designer_db_lookup_tip.pdf
    Thanks a lot in advance!
    Jie

    Hi Jie,
    Database connectivity is a feature supported in Acrobat only , not Reader--unless the PDF has been extended with Adobe LiveCycle Reader Extensions.
    http://www.adobe.com/products/server/readerextensions/main.html
    See "Table 3: Form capability support for Adobe Acrobat and Adobe Reader" at:
    http://partners.adobe.com/public/developer/en/tips/lc_combine_server_tip.pdf
    Evangelos

  • Basic Spring Interaction with WebLogic Portal

    Can you please post the article "Basic Spring Interaction with WebLogic Portal" by Article by Mark Meyer and Don Davis. Actually it was posted in http://dev2dev.bea.com/pub/a/2006/09/weblogic-portal-spring.html but after the BEA's acquisition by ORACLE, this link was not active. Can some one please assist regarding the same ?

    The archived dev2dev articles are suppose to be available at:
    http://www.oracle.com/technology/pub/articles/dev2arch/index.html
    But in a brief review of this site, I did not see this exact title. Maybe someone else knows where that one is.
    There are many other spring related articles there you may find helpful as well.

  • HOW to Interact with Oracle HRMS applications from BPEL..

    Hi friends...
    Well...i just wanted to know HOW easy is it to interact with an Oracle HRMS application from within a BPEL process...
    [Say, my BPEL process has some approvals from Finance Dept.., but i need to contact some application like Oracle Payroll, for some data...]
    I think we would have to use some Application Adapter Service for this..but not sure..!
    Would be great if anyone could refer me to some links or guide me in this regard...
    Thanks...

    Hi,
         You can read the data using "Middlware Tools" like XI,Business Connector,Mercator,Webmethods
          and using DB-Link.
          If you want Read the data using ABAB coding, you need to use "Native SQL" Stament.
         For XI and other Middlware , you need configure so many steps,(RFC defination,PORT,Partner)
         Required. 
         Through ABAP Program :
         Befor creating program , You need to find out "Oracle Server Name and Other details.
          Please use below code as your reference.
    Open a native SQL connection.
    EXEC SQL.
    connect to 'ONECD'
    ENDEXEC.
    Retrieve information from the BVER tables.
    EXEC SQL PERFORMING read_dental.
    select emp_ssn_num, emp_fname, emp_lname,
    to_char(start_date, 'YYYYMMDD') as start_date,
    rec_type,
    to_char(eff_date, 'YYYYMMDD') as eff_date,
    vendor_plan_id
    into :dental
    from opr$8oc.BVER_CURR_DENTAL_MASTER
    ENDEXEC.
    EXEC SQL PERFORMING read_medical.
    select emp_ssn_num, emp_fname, emp_lname, rec_type,
    to_char(start_date, 'YYYYMMDD') as start_date,
    to_char(eff_date, 'YYYYMMDD') as eff_date,
    network_code, pcp_number, patient_flag,
    vendor_plan_id,
    to_char(network_eff_date, 'YYYYMMDD') as
    network_eff_date,
    to_char(pha_eff_date, 'YYYYMMDD') as
    pha_eff_date
    into :medical
    from opr$8oc.BVER_CURR_MEDICAL_MASTER
    ENDEXEC.
    Disconnect from the native SQL connection.
    EXEC SQL.
    DISCONNECT 'ONECD'
    ENDEXEC.
    The system log has messages like 'Work process is in reconnect status' and 'Work process has left reconnect status' after the ORA-02396 message. And I specifically do a disconnect at the end and a connect at the beginning, but it looks like it is trying to do a reconnect?
    Thanks,
    Pugazhenthi.P
    Satyam computer Services Ltd.

  • Reading/Setting Process Data Objects from Java Spring Component or XSLT

    I have a BPMN process that references a Spring Component service.
    The Spring service has a Java class and within that class I'd like to be able to reference process data objects of the BPMN process.
    Ideally, I'd like to simply read and write to those objects within the Java class.
    However, if that's not possible, I don't I can set input parameters on the Java class and have it return an object.
    If I go that route, how can I pass in or return an object of a type other than your standard types (string, int, boolean)?
    For example, I have a data object that is a type I created based on a schema.
    How would I refer to that in a Java class?
    Hope that makes sense.
    Thanks,
    Mike

    Hi Adam.
    I'm a little confused on the order of operations.
    Here are the steps I took:
    1. In JDeveloper, I created two Java classes: one interface and one class that implements it. Initially, the one method takes parameters that are Strings. I want it to also take a data type that's defined in a schema.
    2. In the composite, drag Spring Context component onto screen. This opens the XML and here I define the <bean> that points to the two Java classes I just created.
    3. In the composite, I create a pointer from the Spring component to Exposed Services and I create a new service, which creates the WSDL.
    4. Now I edit the WSDL to import the schema that defines the type I want.
    5. In my BPMN process, I add a call to the service I just created. For Data Associations, it recognizes the changes I made to the WSDL and I can map input variables to the new type added in step 4.
    Here's where I'm stuck. In the actual Java class, I don't know how to add the parameter for the data type I created. Where is this Java object created?
    Thanks,
    Mike

  • Able to interact with a cRIO remote front panel from one computer but not another

    I have a cRIO application that publishes a remote front panel for monitoring and control of the application. From one PC (Win7 & firefox) I can see, interact and control the cRIO through the published remote front panel. From a second PC, also Win7, I can see and monitor the cRIO's state, but the remote panel that is opened does not allow for any interaction and this is true whether I'm using IE, FF or Chrome as the browser. When either PC is connected to the cRIO, it is via a dedicated Ethernet link and only the cRIO and the one PC are on that network. For this two-device private network, the PC is always at address 192.168.1.1 while the cRIO always uses 192.168.84.199 (port 8000).
    The firewall rules on both PCs are setup to allow all incoming and outgoing programs/ports/protocols to be used between these two IP addresses.
    Both PC's have up-to-date LabVIEW development systems installed on them (which more or less guarantees they have the minimum require LV runtime needed to see and use a remote front panel).
    What might be different on the PC that view but cannot interact with the remote panel?
    Solved!
    Go to Solution.

    Sam_Sharp wrote:
    Right click on the second one and select "take control of this VI".
    As far as I am aware - only one viewer of the remote front panel can control the panel at any time - the rest can only view.
    As I tried to say in my original post, there was only one host physically connected to the private network at any given time (by virtue of the fact that the one Ethernet cable connection to the private network was being moved back & forth between the two hosts) so there was no way both hosts could be trying to control the cRIO at the same time. I even went so far at one point of restarting the cRIO while it was connected to the problem host to see if would render it functional, but it did not.
    But I did not know that it was possible to do what you suggested, much less that there was a right-click context menu associated with a remote panel, so I tried it and it worked!    Thank you!

Maybe you are looking for

  • How to omit color cartridge and yet be able to print on an HP Officejet 6110 all-in-one

    I rarely print in color, but after a while, the color cartridge has to be replaced because, I suppose, the ink dries up. Without the color cartridge in place, the machine says I have to insert a cartridge and will not allow me to print with only the

  • How to add Help in a Form?

    I want to add help in my forms application. Is it possible to add customized help in a form under Help Menu ? Can anybody 'help' me in this regard :) It will be a great favour !

  • Missing Topics

    I have 9 topics in a sub-folder. After I generate the project, all of the topics appear in the output folders. 3 of the 9 topics cannot be found when I search through the RoboHelp interface and they appear as Page Not Found for my context sensistive

  • How self extract the gui640_20-10001615.exe  file

    Hi Guru, I have downloaded the gui640_20-10001615.exe from Service.sap.com site. but its icon shows like Notepad when i try to open it open with note pad. Same when i try ti open in different machine it ask open with options. What is the next step af

  • Command exception :field not found

                                                           FieldId fld61 = repositorySchema.getFieldId("Phone_Numbers", "Sequence_Number");                               System.out.println("fieldId"+fld61);                               ResultDefinition