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

Similar Messages

  • 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

  • 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

  • Server Issue with Oracle and ASP Connection

    We got a new server and are trying to set it up with Oracle Client to allow our web application to connect to the database server. We are getting connection errors, but on the old server, it works fine. We have Windows 2003 and IIS 6.0 on the new server and Win2K and IIS 5.0 on the old server and it's Oracle 8i. Here is the error...
    Err.description=Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation. Provider is unable to function until these components are installed.
    Err.number=-2147467259
    ... We have the client installed, so not sure what to do from this point on. Can it be some type of a sharing issue, or network firewall issue?

    Have you granted the IIS user read & execute access to the %ORACLE_HOME% directory and subdirectories?
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Urgent help(xml, java and  asp)

    Hi all,
    I,m new with XML and i have to convert a VB application that connects to an ASP using Microsoft XML and I need to know if I can connect from a java application to an ASP using XML for transfering the infornation.
    In the ASP side it uses DOM, and I would like not to touch the ASP and create a new application with java and get rid of the VB application

    DrClap what I have in the VB side is this:
    Private Function SetBalanceForReal(Amount As Currency, Action As String) As Boolean
    On Error GoTo ehSetBalance
    Dim ohttp As New MSXML.XMLHTTPRequest
    Dim oResponseXML As New MSXML.DOMDocument
    Dim oDoc As New MSXML.XMLDSOControl
    Dim oElement As MSXML.IXMLDOMElement
    Dim oNode As MSXML.IXMLDOMNode
    ohttp.open "POST", ServerUrl & "ActualizaBalance.asp", False
    Set oElement = oDoc.XMLDocument.createElement("ActualizaBalance")
    Set oNode = oElement.appendChild(oDoc.XMLDocument.createNode(1, "Client", ""))
    Set oNode = oElement.appendChild(oDoc.XMLDocument.createNode(1, "Action", ""))
    Set oNode = oElement.appendChild(oDoc.XMLDocument.createNode(1, "Amount", ""))
    oElement.childNodes.Item(0).Text = Trim(ClientLogin)
    oElement.childNodes.Item(1).Text = Action
    oElement.childNodes.Item(2).Text = Amount
    ohttp.send (oElement.xml)
    oResponseXML.loadXML (ohttp.responseText)
    If oResponseXML.documentElement.childNodes.Item(1).Text = "OK" Then
    Available = oResponseXML.documentElement.childNodes.Item(0).Text
    Else
    Available = 0
    End If
    Set ohttp = Nothing
    Set oResponseXML = Nothing
    Set oDoc = Nothing
    Set oElement = Nothing
    Set oNode = Nothing
    SetBalanceForReal = True
    Exit Function
    ehSetBalance:
    Set oNode = Nothing
    Set oElement = Nothing
    Set oDoc = Nothing
    Set oResponseXML = Nothing
    Set ohttp = Nothing
    Available = 0
    SetBalanceForReal = False
    End Function
    Public Function GetConsecutive(Game As String) As Boolean
    On Error GoTo ehGetConsecutive
    Dim ohttp As New MSXML.XMLHTTPRequest
    Dim oResponseXML As New MSXML.DOMDocument
    Dim oDoc As New MSXML.XMLDSOControl
    Dim oElement As MSXML.IXMLDOMElement
    Dim oNode As MSXML.IXMLDOMNode
    ohttp.open "POST", ServerUrl & "ObtieneConsecutivo.asp", False
    Set oElement = oDoc.XMLDocument.createElement("ObtieneConsecutivo")
    Set oNode = oElement.appendChild(oDoc.XMLDocument.createNode(1, "Game", ""))
    oElement.childNodes.Item(0).Text = Game
    ohttp.send (oElement.xml)
    oResponseXML.loadXML (ohttp.responseText)
    Consecutive = oResponseXML.documentElement.childNodes.Item(0).Text
    Set ohttp = Nothing
    Set oResponseXML = Nothing
    Set oDoc = Nothing
    Set oElement = Nothing
    Set oNode = Nothing
    GetConsecutive = True
    Exit Function
    ehGetConsecutive:
    Set oNode = Nothing
    Set oElement = Nothing
    Set oDoc = Nothing
    Set oResponseXML = Nothing
    Set ohttp = Nothing
    Consecutive = 0
    GetConsecutive = False
    End Function
    and the ASP code is this:
    <%@LANGUAGE=VBScript%>
    <%
         'Variables Simples
         Dim Cliente
         Dim Accion
         Dim Monto
         'Variables Complejas
         Dim oClienteBD
         Dim oClienteInfoXML
         Dim oDoc
         Dim oElemento
         Dim oNode
         'Inicializacion de Variables Complejas
         Set oClienteBD = Server.CreateObject("Casino_Clases.CClient")
         Set oClientInfoXML = Server.CreateObject("MSXML.DOMDocument")
         Set oDoc          = Server.CreateObject("MSXML2.DSOControl")
         oClientInfoXML.async=false     
         oClientInfoXML.load(Request)
         Cliente = oClientInfoXML.documentElement.childNodes.item(0).text
         Accion = oClientInfoXML.documentElement.childNodes.item(1).text
         Monto = oClientInfoXML.documentElement.childNodes.item(2).text
         Set oElemento = oDoc.XMLDocument.createElement("Resultado")
         Set oNode = oElemento.appendChild(oDoc.XMLDocument.createNode(1, "AVAILABLE",""))     
         Set oNode = oElemento.appendChild(oDoc.XMLDocument.createNode(1, "ESTADO",""))
         If oClienteBD.UpdateBalance(Cliente, Accion, Monto) = True Then
              If oClienteBD.GetClientBalance(Cliente) = True Then
                   oElemento.childNodes.Item(0).Text = oClienteBD.Available
                   oElemento.childNodes.Item(1).Text = "OK"
              else
                   oElemento.childNodes.Item(0).Text = 0
                   oElemento.childNodes.Item(1).Text = "BAD"
              end If
         else
              oElemento.childNodes.Item(0).Text = 0
              oElemento.childNodes.Item(1).Text = "BAD"
         end If
         Response.Write(oElemento.xml)
         Set oClientInfoXML = Nothing
         Set oDoc = Nothing
         Set oClienteBD = Nothing
         Set oNode          = Nothing
         Set oElemento     = Nothing
    %>
    What I need to do is to change the VB part for a Java application and basicly, I don't know what Class of Java I have to use to connect to the ASP.
    If you were so kind of giving me an example to do this I will appreciate it.
    Ocorella

  • Java Crystal Server and ASP pages

    Hi
    I would like to move away from the RDC period, but our application's web tier is written in ASP
    In the near future we will migrate to J2EE applciation, but till than i wanted to migrate reporting mechanism to java server and connect it to ASP pages for view only.
    Can you point to me some code examples showing this case ?
    thanks a lot !

    Please re-post if this is still an issue to the OnDemand Forum. You can publish your reports to the WEB for user to view only

  • 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

  • Settings SLD and JCO connection for Java Web Dynpro

    Hi BI Gurus,
    I'm a Business Intelligence newbye and I'm a bit confused about Web Dynpro configurations.
    I try to execute, through Netweaver Developer Studio 7, a simple java Web Dynpro who call the standard Flight List BAPI.
    My configuration is: NW 2004s installed on BI server (with java instance and j2EE Server) and Flight List BAPI stored on R/3 ECC. 5 System in another server.
    Now, my doubt are:
    1) in SLD Data Supplier (J2EE Visual Admin on BI Server) CIM configuration, what are the connections parameter necessary?The BI host or R/3 host?
    2)if I set BW system parameters in SLD and in NWDS when I try to run my simple web dynpro an error occour This is the output:
    The initial exception that caused the request to fail, was:
       com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Failed to resolve JCO destination name 'WD_FLIGHTLIST_RFC_METADATA_DEST' in the SLD. No such JCO destination is defined in the SLD.
    Correction Hints
    Accessing the System Landsape Directory (SLD) failed. Depending on the concrete reason (see root cause) check the following:
    is the SLD Supplier in the J2EE engine configured correctly? See the SLD documentation for more details about the SLD and about how to configure it.
    are all JCO destinations maintained correctly? Use the preinstalled Web Dynpro Content Admin application to check/edit the destination. Use the Ping and Test functions of the Content Admin to verify that each destination is properly configured.
    Additional information about the System Landscape Directory and the Web Dynpro Content Admin can be found in the SAP Developer Network (SDN) and in the Online Help for the SAP Web Application Server (installed with SAP NetWeaver Developer Studio and available online).
    Note: the above hints are only a guess. They are automatically derived from the exception that occurred and therefore can't be guaranteed to address the original problem in all cases.
    3)where can I create new JCO connections?What are the requirements settings?
    I am always available for answers about the post!!
    Help me please!!
    Thanks thousand and sorry for my incorrect english!!

    Andrea,
    You can Create the JCo destination from Content Administrator. You must login as Administrator.
    use the link as
    http://<server>:<port>/webdynpro/welcome/Welcome.jsp, select Content Administator->Create JCo Destinations/Maintain JCo Destinations.
    Please have a look on the following links regarding creating/maintaining JCo destinations. The are usally asked questions regarding JCo destinations.
    Create JCo destinations:
    /message/4947478#4947478 [original link is broken]
    Creating JCO Destinations
    /message/5369333#5369333 [original link is broken]
    Rgs,
        Dni

  • 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

  • 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

  • Performance degradation using Jolt ASP Connectivity for TUXEDO

    We have a customer that uses Jolt ASP Connectivity for TUXEDO and is suffering
    from a severe performance degradation over time.
    Initial response times are fine (1 s.), but they tend to increase to 3 minutes
    after some time (well, eh, a day or so).
    Data:
    - TUXEDO 7.1
    - Jolt 1.2.1
    - Relatively recent rolling patch installed (so no there are probably no JSH performance
    issues and memory leaks as fixed in earlier patches)
    The ULOG shows that during the night the JSH instances notice a timeout on behalf
    of the client connection and do a forced shutdown of the client:
    040911.csu013.cs.kadaster.nl!JSH.234333.1.-2: JOLT_CAT:1185: "INFO: Userid:
    [ZZ_Webpol], Clientid: [AP_WEBSRV3] timed out due to inactivity"
    040911.csu013.cs.kadaster.nl!JSH.234333.1.-2: JOLT_CAT:1198: "WARN: Forced
    shutdown of client; user name 'ZZ_Webpol'; client name 'AP_WEBSRV3'"
    This happens every 10 minutes as per configuration of the JSL (-T flag).
    The customer "solved" the problem for the time being by increasing the connection
    pool size on the IIS web server.
    However, they didn't find a "smoking gun" - no definite cause for the problem.
    So, it is debatable whether their "solution" suffices.
    It is my suspicion the problem might be located in the Jolt ASP classes running
    on the IIS.
    Maybe the connection pool somehow loses connections over time, causing subsequent
    users having to queue before they get served (although an exception should be
    raised if no connections are available).
    However, there's no documentation on the functioning of the connection pool for
    Jolt ASP.
    My questions:
    1) What's the algorithm used for managing connections with Jolt ASP for TUXEDO?
    2) If connections are terminated by a JSH, will a new connection be established
    from the web server automatically? (this is especially interesting, because the
    connection policy can be configured in the JSL CLOPT, but there's no info on how
    this should be handled/configured by Jolt ASP connectivity for TUXEDO)
    Regards,
    Winfried Scheulderman

    Hi,
    For ASP connectivity I would suggest looking at the .Net client facility provided in Tuxedo 9.1 and later.
    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect

  • Using java class and variables declared in java file in jsp

    hi everyone
    i m trying to seperate business logic form web layer. i don't know i am doing in a right way or not.
    i wanted to access my own java class and its variables in jsp.
    for this i created java file like this
    package ris;
    import java.sql.*;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public class  NewClass{
        public static void main(String args[]){
            Connection con = null;
            ResultSet rs=null;
            Statement smt=null;
            try{
                Class.forName("com.mysql.jdbc.Driver").newInstance();
                con=DriverManager.getConnection("jdbc:mysql:///net","root", "anthony111");
                smt=con.createStatement();
               rs= smt.executeQuery("SELECT * FROM emp");
               while(rs.next()){
                String  str = rs.getString("Name");
                }catch( Exception e){
                    String msg="Exception:"+e.getMessage();
                }finally {
          try {
            if(con != null)
              con.close();
          } catch(SQLException e) {}
    }next i created a jsp where i want to access String str defined in java class above.
    <%--
        Document   : fisrt
        Created on : Jul 25, 2009, 3:00:38 PM
        Author     : REiSHI
    --%>
    <%@page import="ris.NewClass"%>
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>JSP Page</title>
        </head>
        <body>
            <h1><%=str%></h1>
        </body>
    </html>I wanted to print the name field extracted from database by ResultSet.
    but it gives error cannot find symbol str.
    please help me to find right way to do this.
    i am using netbeans ide.

    Very bad approach
    1) Think if your table contains more than one NAMEs then you will get only the last one with your code.
    2) Your String is declared as local variable in the method.
    3) You have not created any object of NewClass nor called the method in JSP page. Then who will call the method to run sql?
    4) Your NewClass contains main method which will not work in web application, it's not standalone desktop application so remove main.
    Better create an ArrayList and then call the method of NewClass and then store the data into ArrayList and return the ArrayList.
    It should look like
    {code:java}
    package ris;
    import java.sql.*;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public class  NewClass{
        public static ArrayList getNames(){
            Connection con = null;
            ResultSet rs=null;
            Statement smt=null;
            ArrayList nameList = new ArrayList();
            try{
                Class.forName("com.mysql.jdbc.Driver").newInstance();
                con=DriverManager.getConnection("jdbc:mysql:///net","root", "anthony111");
                smt=con.createStatement();
               rs= smt.executeQuery("SELECT * FROM emp");
               while(rs.next()){
                nameList.add(rs.getString("Name"));
               return nameList;
                }catch( Exception e){
                    String msg="Exception:"+e.getMessage();
                   </code><code class="jive-code jive-java"><font>return nameList;</code><code class="jive-code jive-java">
                }finally {
          try {
            if(con != null)
              con.close();
          } catch(SQLException e) {}
          </code><code>return nameList;</code>
    <code class="jive-code jive-java">    }

  • Error in the Socket Communication between Java Client and VC++ Server

    In my application, using Java Client to do socket bi-communication with VC++ Server, which is done by somebody else.
    The error is after the application properly running one or two days, the VC++ Server cannot receive the messages passed by java Client, but at Java client, everything is the same, although using CheckError() after every print(), there is no exception thrown.
    The JVM is jdk1.3.1, platform is Win2k Server.
    The outputstream is PrintWriter().
    Please help me to settle down this problem. Thanks in advance.

    I read some thread in the forum, and found somebody had the similar problem with me. Just want to know how to settle this problem.
    In the client/server program. Client is a JAVA program and Server a
    VC++ program. The connection works, and the problem appears after some time. The Client sends a lots of requests to Serverm, the server seems receive nothing. But at the same time, the server is able to send messages to Client. The Client also can get the messages and handle them. Don't understand why there this problem and why it appears when it wants.
    The client is a Win2k platorm with JDK1.3.1 and the server is also a Win2K platform with VC++ 6.0.
    In the Client, using:
    inputFromServer = new BufferedReader(new InputStreamReader(socket.getInputStream()));
    outputToServer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())),true);
    Hope can get your help.

Maybe you are looking for

  • Group is not assigned error in LSWM when uploading Routings

    Hi All, I am trying to upload the routings using LSMW Direct Input method using program RCPTRA02. While executing the lsmw, i am getting an error " Group cannot be determined for material XXXXXXXX plant XXXXX". But the SAP has to assign the Group whi

  • Adding CFC timeout?

    iam trying add a timeout in a CFC but having some issues with it...I need help...here is my sample CFC which needs a timeout added....could somebody please help me how to add a timeout in the code..i tried requesttimeout using cfsetting but i could n

  • Sales Query

    Hi All, I have written a Query and need assistance in the logic. i have 4 Warehousea and each warehouse has its own Quanity and Sales Value. The Field displayed are Item Code, Item Desciption, Warehouse 1, Litres per Carton, Quantiy 1, Total Values 1

  • PO not changable after Release

    Dear Friends, We have PO Release Strategy by A , B, C. we want to restrict if PO Released by A  and B  then A cant unrelase the PO wihtout B Release and the same  with B & C at present if PO released A , B and C ... A can unrelease the PO and amendin

  • Operating System Audit Trail

    Hi, I am using Oracle 10.1.0.2.0 on WinXP. I want to start auditing on my database and I have fixed AUDIT_TRAIL=OS, but not not mentioned the AUDIT_FILE_DEST parameter. As per Oracle Docs ... If you do not set the AUDIT_FILE_DEST parameter, then Orac