JAVA(JCO) and BW Connectivity

Hi,
I am using JCO to get data from R/3. At the same time I want to get data from BW server also. Is there any methods available for this activity.
How make it possible, Please provide details.
Thanks,
Ask123

thanks for the reply Prakash.
So, i'm using websphere with JCO to connect Bw.
Actually, i encountered the same return message in my java code and during the se37 transaction.
In se37 transaction:
I call the Bapi BAPI_MDDATASET_CREATE_OBJET
I set manually an mdx command generated with MDXTEST
on my BW query.
this BAPI return a DATASETID
the persistence of the object is ok.
after that, if i use the bapi BAPI_MDDATASET_CHECK_SYNTAX
or BAPI_MDDATASET_SELECT_DATA with this DATASETID...
I have always the same error as return message.
RS_EXCEPTION : CL_RSR_MDX_COMMAND========CP
the problem is coming from the DATASETID?
Thanks,
best regards,
Ben

Similar Messages

  • Java ME and asp connectivity

    Hello everyone,
    I know this is a very repetitive question but i still havent found a satisfying solution anywhere.
    Here is the scenario:
    I am developing a MIDlet which recieves an Account number as the body of an SMS.
    I have a database in MS-Access which stores account numbers and corresponding account balances.
    I need to retrieve the balance from the database.
    HTTP connection allows the asp functionality on Java ME SDK 3.0 but not when the midlet is installed on my Samsung SGH-X700 phone.
    I want the connectivity between the phone and PC through USB cable.
    I mean the midlet works on emulators but does not access the files through USB cable
    How to access http://localhost/test1.asp (which is on PC) through the cable?
    OR can it be done through a CommConnection?Please help.

    thanks for the reply Prakash.
    So, i'm using websphere with JCO to connect Bw.
    Actually, i encountered the same return message in my java code and during the se37 transaction.
    In se37 transaction:
    I call the Bapi BAPI_MDDATASET_CREATE_OBJET
    I set manually an mdx command generated with MDXTEST
    on my BW query.
    this BAPI return a DATASETID
    the persistence of the object is ok.
    after that, if i use the bapi BAPI_MDDATASET_CHECK_SYNTAX
    or BAPI_MDDATASET_SELECT_DATA with this DATASETID...
    I have always the same error as return message.
    RS_EXCEPTION : CL_RSR_MDX_COMMAND========CP
    the problem is coming from the DATASETID?
    Thanks,
    best regards,
    Ben

  • Problem with Java Proxy and Socket Connection

    Hi Gurus!!
    I have developed a Java Proxy that connects via socket with a Server Socket application. This Server Socket application accepts more than one connection at the same time.
    When I connect the first time from my Java Proxy, the connection is correctly established. When the first connection opened, if a try a second connection, this is not established.
    I use "new Socket(SocketServer,SocketPort);" to open the connection.
    I think that all time the Java Proxy is trying to open the same connection, and this is a problem.
    Is there a way to indicate to the server that is a new connection and that the existing connections remain?
    Anybody could help me, please?
    Thanks and regards,
    Manuel Míguez.

    Sorry!!!!i must give you more information.
    The error which i have when i push the submit button is
    HTTP Status 404 -
    type Status report
    message
    descriptionThe requested resource () is not available.
    GlassFish Server Open Source Edition 3.0.1
    My thought is that the error is in this line
    String connectionURL = "jdbc:mysql://localhost/mybooking";in mysql when i write this code then the table opens with no problems:
    mysql>show databases;
    mysql>usebooking;
    mysql>showtables;
    mysql>describe booking;Furthermore i have added in my web application the library mysql JDBC driver my-sql-connector-java-5.1.6.bin.jar
    Edited by: 813355 on Nov 22, 2010 1:50 AM
    Edited by: 813355 on Nov 22, 2010 2:00 AM

  • Connection between JCo and XI

    Hello,
    I want to establish a connection between an external java program which uses JCo to XI. However, it doesn't work. I'm not able to get a connection between java program and XI.
    Can anybody help me in this case?

    Hi Dinh,
    Here is a sample code I used to test the communication calling function module THPOPUP.
    client = JCO.createClient( ...);     
    // Open the connection
    client.connect();
    // Get the attributes of the connection
    JCO.Attributes attributes = client.getAttributes();
    boolean is_backend_unicode = attributes.getPartnerCodepage().equals("4102") ||
                                       attributes.getPartnerCodepage().equals("4103");
    // Create metadata definition of the input parameter list
    JCO.MetaData input_md = new JCO.MetaData("INPUT");
    input_md.addInfo("CLIENT", JCO.TYPE_CHAR, 255, 255 * (is_backend_unicode? 2 : 1 ),-1, 0, null, null, 0, null, null);
    input_md.addInfo("USER", JCO.TYPE_CHAR, 255, 255 * (is_backend_unicode? 2 : 1 ),-1, 0, null, null, 0, null, null);
    input_md.addInfo("MESSAGE", JCO.TYPE_CHAR, 255, 255 * (is_backend_unicode? 2 : 1 ),-1, 0, null, null, 0, null, null);
    // Create the input parameter list from the metadata object
    JCO.ParameterList input = JCO.createParameterList(input_md);
    // Set the first (and only) input parameter
    input.setValue("020", "CLIENT");
    input.setValue("USERNAME", "USER");
    input.setValue("TEST MESSAGE", "MESSAGE");
    // Create metadata definition of the output parameter list
    JCO.MetaData output_md = new JCO.MetaData("OUTPUT");
    // Create the output parameter list from the metadata object
    JCO.ParameterList output = JCO.createParameterList(output_md);
    // Call the function
    client.execute("TH_POPUP", input, output);
    I suggest you to have a look at the sample code named Example1 that is delivered with jco library.
    Probably there are also higher level functionality to send the idoc via jco (that hide you the call to that function module), using something like IDOC.create() or IDOC.send() but I have never used them because when I worked in this kind of scenario I had to call a RFC, not to send and idoc, via jco.
    Instead I sent Idoc to XI from a non sap system that was built on RFC sdk (similar to jco) and we posted IDOCs to XI via function module IDOC_INBOUND_ASYNCRONOUS.
    Dinh, the reason why the Idoc will be sent to the application layer of XI (SXMB_MONI) and not to the below ALE layer (WE05) is that in XI any call to the function module IDOC_INBOUND_ASYNCRONOUS is catched by the application layer.
    Consider that when an SAP system has to send an IDoc to another SAP system it calls  as well that function module (IDOC_INBOUND_ASYNCRONOUS) to send the IDoc
    So once you call that function module the idoc is created in XI and is a normal XI IDoc scenario.
    Hope it clarify your doubts,
    Kind Regards,
    Sergio

  • WebDynpro java and Oracle Connection

    Hi,
    I'm trying to make a simple connection to an Oracle database within a custom webdynpro component. Using NWDS 7.0.08 and EP 7.0 SP 10.
    Here is a sample of the java code I use :
    Connection conn = null;
    Class.forName("oracle.jdbc.driver.OracleDriver");
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    conn =DriverManager.getConnection ("jdbc:oracle:thin:@hostname:port:DATABASENAME","schema", "password");
    Statement stmt=conn.createStatement();
    ResultSet rs=stmt.executeQuery("select * from MYTABLE");
    But when I run this WebDynpro, the following error appears :
    "oracle.jdbc.driver.OracleDriver".
    I have also catched the exception stack but it doesn't seem meaningful. If you need it, I can provide it in another thread.
    So What should I do to connect to this oracle database ? Is it the right provider ?
    Thanks,
    Loïc LEVEUGLE

    Hi!,
      please try following code, this is working fine for me.
    String  serverName = "172.21.1.62";
    String portNumber = "1526";
    String sid = "vision";
    String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" + sid;
    String userName = "scott";
    String password = "tiger";
    Connection connection = null;
    try {
        // Load the JDBC driver
        String driverName = "oracle.jdbc.driver.OracleDriver";
        Class.forName(driverName);
        connection = DriverManager.getConnection(url, userName, password);
        Statement stmt =connection.createStatement();
        PreparedStatement pstmt = connection.prepareStatement("insert into club (Name,EmpID,Location,Extention,MailID,InstPlay) values(?,?,?,?,?,?)");
                   pstmt.clearParameters();
        pstmt.setString(1,Name);
        pstmt.setString(2,EmpID);
        pstmt.setString(3,Location);
        pstmt.setString(4,Extention);
        pstmt.setString(5,MailID);
        pstmt.setString(6,Instrument);
        pstmt.executeUpdate();
    } catch(Exception exc) {
         exc.printStackTrace();
    put classes12.jar in your class Path.
    regards,
    Mithileshwar Sahu

  • Java and oracle connectivity

    Hi
    I have the connectivity from my java servlet to oracle database for changing the password on a series of servers. If the user can not login to the server or for any other reason there is a problem , there are 2 messages that are shown, one the message that java displays and the second one is the message that the oracle driver displays. I want to get these 2 messages and put them into a file but the problem is that I dont have access to the message generated by oracle driver. I dont know how to access that message, can u halp me plz?

    huh!

  • I was using a chat site and cannot get to it agian. I can put in my username and press connect and then I get a message saying java unavailible or not installed

    I was using a chat  room and now I can't get back to it.  I can enter my username and press connect and then I get a message saying Java not availble or not installed

    Hi see if this has happened...
    Disabled Java in your Browser settings, not JavaScript.
    http://support.apple.com/kb/HT5241?viewlocale=en_US
    http://support.google.com/chrome/bin/answer.py?hl=en-GB&answer=142064
    http://support.mozilla.org/en-US/kb/How%20to%20turn%20off%20Java%20applets

  • How is the interface between the Java Stack and ABAP stack is achieved?

    How is the interface between the Java Stack and ABAP stack is achieved?..Please send me the answer to [email protected]

    Hi,
    By interface, I assume you mean the connection between the ABAP and the Java stacks in a double stack system.
    The connection from Java to ABAP is through JCo connections defined in the WebDynpro section of the J2EE start page. So Java to ABAP requests are processed through JCo.
    The connection from ABAP to Java is through RFC connections defined in TA SM59. The ABAP to Java requests are processed through RFC.
    Refer https://dsd.esco-salt.com/StartPage/documents/integration/3.html for detailed explanation.
    The UME can be maintained in either ABAP or in JAVA depending on the persistence.
    Refer: http://help.sap.com/saphelp_nw70/helpdata/en/5b/5d2706ebc04e4d98036f2e1dcfd47d/frameset.htm
    Check UME data source configuration.
    Some quick FAQs can be found at:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ad47eb90-0201-0010-7cb2-ddfa5ed879ec
    Hope this helps.
    Best Regards,
    Srividya.R

  • Java WD and Socket Communication

    Hi,
    Is it possible to use Java Socket Communication with Java Web Dynpro. Or if not what is the best approach to have a Java Socket program integrated with a Web Dynpro Communication.
    Basically, I have an application which provides API for communication via Java Sockets.And this needs to be integrated in our SAP application.
    Thanks,
    CD

    Hi,
    You are currently using JCO to "Connect to a Remote System" - JCO will connect to a back-end with the main purpose of "executing BAPI's" in it.
    When you move to WebDynpro, you have what SAP calls Adaptive RFC Model - this will create a "Model Entity" in you WD Project that will do the same thing your JCO does.
    Assume your JCO now calls "BAPI_GET_FLIGHTS", to return the Flights that are currently available - In your newly create WDP Project, you will manually specify what back-end you wanna use when "Importing" and you will tell also the BAPI name. WDP will generate the class structure that you need in order to execute that function.
    JCO is what SAP created to execute BAPI's. JCO can be used by any "Java" like application that needs to connect to the back-end. But when you move to WDP, you don't need to use this anymore - You will use WDP Models.
    Youi will still need your JCO Destinations created in the Application Server, so behind the scenes WDP creates a "layer" so you don't need to code the JCO calls manually.
    Regards,
    Daniel

  • How to use JCO and RFC

    Hi guys, please help me out
    I'm new to JCO and do not have any idea about it.
    Here is my situation, for testing, I want to call an ABP RFC FM in SAP just to return a single text message to Java application through parameter.
    (Of course, I have access to SAP from my company and I do not have any Java compiler in my computer).
    From my understanding, there 2 main things to concern (Please correct me if i'm wrong and please tell me the steps I should do)
    1) Software installation and configuration
       What software do I need to install on my computer, is
       it JCO, SAPGUI, Java Compiler? What kind of
       configurations do I need for JCO?  
    2) Programming
       a) SAP side
          Write an ABAP RFC FM just to return a text message
          to Java application through parameters (No problem
          with this step)
       b) My computer side
          Write a Java application to call ABP RFC FM
          Do you guys have any simple source code example for
          this?? Please remember that this Java application
          simply call an ABAP RFC FM to get just a single
          text message.
    I really appreciate your help
    Thank you

    Hi Dean,
    USe Eclipse for Java programming.
    If you are downloading the latest version of JCO, make sure you have latest version of SAP Gui as there are version issues as the librfc.dll needs to be of compatible version.
    As far as your sample code is concerned, here it is ...
    import com.sap.mw.jco.*;
    public class CallFunction extends Object {
         public static void main(String args[]) {
              CallFunction app = new CallFunction();
         int count;
         JCO.Client mConnection;
         JCO.Repository mRepository;
         public CallFunction() {
              try {
                   // Logon info
                        mConnection = JCO.createClient("500", // SAP client
                                                   "username", // userid
                                                   "password", // password
                                                      null, // language
                                             "server name", // application server host name
                                                    "00"); // system number
                   mConnection.connect();
                   mRepository = new JCO.Repository("MY_connection", mConnection);
              } catch (Exception ex) {
                   ex.printStackTrace();
                   System.exit(1);
              JCO.Function function = null;
              try {
                   function = this.createFunction("ABAP_FM");
                     mConnection.execute(function);
                   System.out.println(
                        function.getTableParameterList().getValue("Exporting_Message"));
              } catch (Exception ex) {
                   ex.printStackTrace();
                   System.exit(1);
         public JCO.Function createFunction(String name) throws Exception {
              try {
                   IFunctionTemplate ft =
                        mRepository.getFunctionTemplate(name.toUpperCase());
                   if (ft == null)
                        return null;
                   return ft.getFunction();
              } catch (Exception ex) {
                   throw new Exception("Problem retrieving JCO.Function object.");
    Here in this mention ur function module in place of ABAP_FM and exporting parameter in place of Exporting_Message.
    Regards,
    Tanveer.
    Please please reward some points if found helpful.

  • What is JCo in SAP connectivity

    Hi all,
                i want to connect to SAP system from java program.Is it that i need a JCO jar file.
    I am new to this.the code i got by searching in all the forums for sap connectivity is
    import com.sap.mw.jco.JCO;
    import com.sap.mw.jco.IRepository;
    public class checkSAP{
         private JCO.Client client = null;
         private JCO.Function function = null;
         private IRepository repository = null;
                     try {
                        client = JCO.createClient(
                                connClient,     // SAP client
                                connUser,       // userid
                                connPW,         // password
                                connLang,       // language
                                connHost,       // host name
                                connHostSyst ); // System number
                        client.connect();
    catch (JCO.Exception ex) {
                        System.out.println("Caught an exception: \n" + ex);
    can anyone plz help me how to create a conncetion and retrive data
    Regards
    Chandra

    Hi chandra,
    pls find information on how to use jco here ... Re: Create a Planned order from JAVA JCO
    regards, jens

  • JCO.Client not connected in repository call (EP7)

    Hi guys,
    please can someone help me with this error msg?
    I don’t understand why we getting this error msg, for some users they can run reports and others get this msg.
    500 Internal Server Error
    BEx Web Application
    Failed to process request. Please contact your system administrator.
    [Hide]
    Error Summary
    While processing the current request, an exception occured which could not be handled by the application or the framework.
    If the information contained on this page doesn't help you to find and correct the cause of the problem, please contact your system administrator.
    To facilitate analysis of the problem, keep a copy of this error page. Hint: Most browsers allow to select all content, copy it and then paste it into an empty document (e.g. email or simple text file).
    Root Cause
    The initial exception that caused the request to fail, was: 
    JCO.Client not connected in repository call
    com.sap.mw.jco.JCO$Exception: (102) JCO_ERROR_COMMUNICATION: JCO.Client not connected in repository call
    at com.sap.mw.jco.JCO$Repository.getVersion(JCO.java:20290)
    at com.sap.mw.jco.JCO$Repository.queryFunctionInterface(JCO.java:20630)
    at com.sap.mw.jco.JCO$Repository.queryFunctionInterface(JCO.java:20351)
    at com.sap.mw.jco.JCO$Repository.getFunctionInterface(JCO.java:20465)
    at com.sap.mw.jco.JCO$BasicRepository.getFunctionTemplate(JCO.java:19533)
    Details: Full Exception Chain
    System Environment
    Server
    BI Java     Release: 7 - Patch level: 0000000009 - Description: BI Web Applications Java - Additional info:  - Production mode: true
    BI ABAP     unknown
    Java Virtual Machine     Java HotSpot(TM) 64-Bit Server VM - Sun Microsystems Inc. - 1.4.2_12-b03
    Operating System     Linux - ia64 - 2.6.9-22.0.1.EL
    Full Exception Chain
    Log ID     0012799E22D40054000001AF00006B9400042A20B9AF8861
    com.sap.ip.bi.base.exception.BIBaseRuntimeException: JCo exception thrown when connecting to system "SAP_BW"
         at com.sap.ip.bi.base.application.service.rfcproxy.impl.jco640.Jco640Proxy.createFunction(Jco640Proxy.java:87)
         at com.sap.ip.bi.base.application.service.impl.application.ApplicationSettingsService.initializeProperties(ApplicationSettingsService.java:130)
         at com.sap.ip.bi.base.application.service.impl.application.ApplicationSettingsService.initialization(ApplicationSettingsService.java:124)
         at com.sap.ip.bi.base.application.impl.Application.createService(Application.java:477)
         at com.sap.ip.bi.base.application.impl.Application.getProperty(Application.java:624)
         at com.sap.ip.bi.base.application.impl.Application.initialization(Application.java:229)
         at com.sap.ip.bi.base.application.ApplicationFactory.createApplication(ApplicationFactory.java:132)
         at com.sap.ip.bi.base.application.ApplicationFactory.createApplication(ApplicationFactory.java:63)
         at com.sap.ip.bi.webapplications.runtime.impl.Page.constructPage(Page.java:729)
         at com.sap.ip.bi.webapplications.runtime.impl.Page.<init>(Page.java:647)
         at com.sap.ip.bi.webapplications.runtime.controller.impl.Controller.createPage(Controller.java:504)
         at com.sap.ip.bi.webapplications.runtime.controller.impl.Controller.doProcessRequest(Controller.java:911)
         at com.sap.ip.bi.webapplications.runtime.controller.impl.Controller.processRequest(Controller.java:851)
         at com.sap.ip.bi.webapplications.runtime.jsp.portal.services.BIRuntimeService.handleRequest(BIRuntimeService.java:380)
         at com.sap.ip.bi.webapplications.runtime.jsp.portal.components.LauncherComponent.doContent(LauncherComponent.java:21)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
         at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
         at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
         at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:646)
         at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
         at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
         at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
         at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522)
    Many thanks in advance
    Jo-lize

    Hi, you can fix the problem ?
    i have same problem in BI7 and EP7, when launch Template Installer.
    <b>Create Destination in ABAP Import not successful Element 'SAPConfigLib.DES.Unclassified.createRfcDestination':!BrokerImport.import_of_element_failed!!BrokerImport.Fehler!com.sap.tc.lm.ctc.cul.cpi.exceptions.CPIBaseException: <Localization failed: ResourceBundle='com.sap.tc.lm.ctc.cul.cpi.CPIResourceBundle', ID='com.sap.tc.lm.ctc.cul.cpi.BaseException_BASE_EXCEPTION', Arguments: []> : Can't find resource for bundle java.util.PropertyResourceBundle, key com.sap.tc.lm.ctc.cul.cpi.BaseException_BASE_EXCEPTION:com.sap.tc.lm.ctc.provider.javaServiceProvider.JavaServiceWriter.writeElement!BrokerImport.LINE!157-:com.sap.tc.lm.ctc.cul.broker.BrokerImport.importElement.86
    -:com.sap.tc.lm.ctc.cul.broker.BrokerImport.importElement.128
    -:com.sap.tc.lm.ctc.cul.broker.BrokerImport.importElement.128
    -:com.sap.tc.lm.ctc.cul.serviceimpl.importservice.CULConfigurationImport.importConfiguration.96
    -:com.sap.tc.lm.ctc.ccl.templateinstaller.StepExecuter.run.41
    Element 'SAPConfigLib.DES.Unclassified.createRfcDestination':Error during executing Java Reflection:JCO.Client not connected in repository call
    </b>

  • Java Monitoring and Administration

    Hi;
    I want to know the documents\ references for Java monitoring and Administration.
    Thanks in advance.
    Regards,
    Rahul.

    Hi,
    You can check the following links :-
    1> www.service.sap.com - OSS ID and password
    2> Look for topics like ... Visual Admin, Config tool - properties sheet, JCO connections, portal template and ume configuration.
    Do let me specifically what exactly you want to configure on j2ee. Shall help you on same.
    1) Activities for Content Consumers
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/22387b0b413fe1e10000000a11466f/frameset.htm
    2) Activities for Content Producers
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/22387b0b413fe1e10000000a11466f/frameset.htm
    3) Workflow: Remote Role Assignment
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/23fd33cad10d23e10000000a1553f7/frameset.htm
    4) Configure Remote Role Assignment
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/2dd5abcd-0b01-0010-2c92-81b9f8efc2e1
    Regards,
    Manomeet

  • What is the better way to open and close connection in bean

    Hello, may i ask about the best way to open and close the connection?
    At the first, the connection code is store in Conn class bean. The JSP page will call a method in Process bean to process the query and update of database. the Process bean is using th Conn to connect to database.
    In my process bean, it have a method for each type of sql like select, insert, update, and delete for each tables. Each method will call the Conn to open and close the connection. The jsp page can simply call a method retrieve or update records.
    However, when calling the processUpdate method, it is a method that update a group of tables base on the query result of another group of tables and calculation. If I calling the query method in the same bean file, it will open and close the connection many times (more than 1000 times). After open and close the connection several times, the connection to mySQL will be fail.
    Currently, i include 2 method in Process that is only calling the Conn to open the connection and close connection. When calling the openConnection method, it will also set the boolean connected in the class to true and call Conn to open connection. When calling the closeConnection method, it will also set the boolean connected in the class to false and call Conn to close connection.
    After that, i add some change to the query method which is when the connected is false, it will open the connection by calling the Conn and close the connection themself. If the connected is true, it will not call the Conn to open and close the connection because it already connected to the database.
    Now, i when i calling the query method in jsp, it can open the connection and close the connection individually. When i call the processUpdate in the jsp, this method will calling the openConnection before calling the query and calling closeConnection at the end. It not only faster the process(less open and close), it also no cause the connect to mySQL fail error again. However, it also make the coding in the bean file more longer and complex.
    Is there have any better solution?

    Use connection pooling. This will put the connection management in the hands of the webserver, not your code. Check out this post:
    http://forum.java.sun.com/thread.jspa?threadID=741788&messageID=4252932#4252932

  • Open java app and insert text

    Hello All!
    I'm looking for a little help on an exact problem that seems to have been solved here before (but doesn't work for me).
    Here's the original archived thread:
    https://discussions.apple.com/thread/2631967?start=0&tstart=0
    The question asked is exactly the same....
    I have a java app for a Speco Technologies DVR. After opening the app, you must type in a rather long url and then click connect. If you enter the url, then quit the app, when you relaunch it, it does not remember the url that had been entered the previous time.
    I would like to create a script that will launch the Java app and then input the url (text string). I cannot get this to work.
    I've gotten as far as this:
    on run
    tell application "Finder" to activate open document file "DVRVIEWER(DO_NOT_DELETE).jar" of folder "Applications" of startup disk
    delay 5
    set myString to "192.168.0.118"
    repeat with currentCharacter in every character of myString
    tell application "system events"
    keystroke currentCharacter
    end tell
    delay 0.25
    end repeat
    tell application "system events"
    keystroke return
    end run
    AppleScript has a Syntax Error of "Expected end of line, etc. but found command name."
    Does anyone ( taylor.henderson where are you! ) have a fix, or even a better way to do this? Can I edit the existing .jar to have the info directly in there?
    I would actually love to add another section in there that fills in the username and password after entering in the IP address!
    Just for clarification on how this goes:
    Launch .jar.
    Window Launches and prompts for IP address
    Enter in IP address
    Press RETURN
    Windows disappears and new window appears and prompts for username and password
    Enter Username
    Press TAB
    Enter Password
    Press RETURN
    Thank you guys, I'm sure it's easy, but hey, for me Photoshop and Illustrator are a breeze :-0
    -AndyTheFiredog

    Hi
    andythefiredog wrote:
    Is it possible to use similar commands to maximize the java window?
    Yes.
    You must enable the checkbox labeled "Enable access for assistive devices" in the Universal Access System Preference pane
    Add these lines after the last line wich contains "keystroke return"
      delay 2
      tell (first process whose frontmost is true) to click button 2 of window 1 -- zoom
    Here's my test script ( the Speco camera demo), that works without problems here, I use the application "DVRJavaView4.1.jar", this script checks the existence of ui element (more reliable) rather than any delay.
    on run
         do shell script "/usr/bin/open '/Applications/DVRJavaView4.1.jar'"
         tell application "System Events" to tell (first process whose frontmost is true)
              repeat until exists window "Please Input DVR address"
                   delay 1
              end repeat
              keystroke "millapt.ddns.specoddns.net"
              keystroke return
              repeat until exists button "OK" of window 1
                   delay 1 -- wait until the login window is frontmost
              end repeat
              keystroke "user"
              keystroke tab
              delay 0.1
              keystroke "4321"
              delay 0.1
              keystroke return
              repeat until name of window 1 starts with "DVRJavaView"
                   delay 1 --wait while the login window is frontmost
              end repeat
              click button 2 of window 1 -- zoom
         end tell
    end run

Maybe you are looking for

  • Windows 8 Boot Camp support software

    Good day, I have installed Windows 8 successfully on my Macbook, [OS X Mountain Lion] using Boot Camp assistant. When I got to the step to install the Boot Camp Support software with the CD I created during installation through bootcamp, a pop up mes

  • How to set packages and classpath

    Hi, I want to know about packages and classpath. I have these questions 1, If I put a class in a package(work.util) is it necessary to put the java file in the same directory/directory hierarchy as mentioned in the package declaration. I have to comp

  • Doubts creating a line report in BAM 11 tp4

    Hi all, I have this scenario here, I want to create a line report with multiple lines, for example: I have a a dinamic variable wich is my sale guys, so that can be N sale guys, and I want to know how much they sold for a period of time wich I will i

  • KT3 utra-aru bios problem MS 6380E

    Hi, everyone. My problem is cold start with power on. Problem is "CPU cooler don't run" warnings on bios running.  Answer is still start y / n ? I chekded cooler and it's running. When starts warm boot it's ok. Is it bios setting  for that or what is

  • Change name of network that is seen by all

    How do I change my wireless network name?  Will I have to reconnect all systems in my home that access the network?