Getting ParserException: / expected(:main:, row:1, col:101)

Hi Experts,
I am using a java code for schema validation of input XI message.
Java code:
import java.io.FileInputStream;
import java.io.FileOutputStream;
import com.sap.aii.mapping.api.StreamTransformation;
import java.io.*;
import java.util.Map;
import javax.xml.parsers.*;
import org.xml.sax.*;
import org.xml.sax.helpers.*;
public class P2PValidation extends DefaultHandler implements StreamTransformation{
     private Map map;
     private OutputStream out;
     //Constants when using XML Schema for SAX parsing.
     static final String JAXP_SCHEMA_LANGUAGE =
     "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
     static final String W3C_XML_SCHEMA =
     "http://www.w3.org/2001/XMLSchema";
     static final String JAXP_SCHEMA_SOURCE =
     "http://java.sun.com/xml/jaxp/properties/schemaSource";
     public void setParameter (Map param){
          map = param;
     public void execute (InputStream in, OutputStream out)
     throws com.sap.aii.mapping.api.StreamTransformationException {
        DefaultHandler handler = this;
          SAXParserFactory factory = SAXParserFactory.newInstance();
          //Obtain an object of class javax.xml.parsers.SAXParser,
         factory.setNamespaceAware(true);
         factory.setValidating(true);
          try {
               SAXParser saxParser = factory.newSAXParser();
               // Setup the schema file
               saxParser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
               saxParser.setProperty(JAXP_SCHEMA_SOURCE, new File("IOReqMsgSchema.xsd"));
              //System.out.println("Parsing");
              this.out = out;
               saxParser.parse(in, handler);
          catch (Exception t){
               t.printStackTrace();
     private void write (String s) throws SAXException{
          try{
               out.write(s.getBytes()); out.flush();
          catch (IOException e){
               throw new SAXException("I/O error", e);
     public void startDocument () throws SAXException{
          write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
          write("<ns0:ValidInternalOrder xmlns:ns0=\"http://www.xyz.com/Gopal\">");
     public void endDocument () throws SAXException {
          write("</ns0:ValidInternalOrder>");
          try { out.flush();
          catch (IOException e) {
               throw new SAXException("I/O error", e);
     public void startElement (String namespaceURI, String sName, String qName, Attributes attrs)
     throws SAXException {
        System.out.println("sName="sName" qName="+sName);
            if(sName.equals(qName))
               write("<"sName">");
     public void endElement (String namespaceURI, String sName, String qName) throws SAXException {
          if(sName.equals(qName))
               write("</"sName">");
     public void characters (char buf[], int offset, int len)
     throws SAXException {
          String s = new String(buf, offset, len);
          write (s);
     public void error(SAXParseException se) throws SAXException {
          throw se;
Input XML:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:InternalOrder_request xmlns:ns0="http://www.xyz.com/Gopal">
   <ORDER>TEST101</ORDER>
   <ORDER_TYPE>XYZ</ORDER_TYPE>
   <ORDER_NAME>TEST</ORDER_NAME>
   <CO_AREA>ABC</CO_AREA>
   <CCTR_POSTED>56345</CCTR_POSTED>
   <CURRENCY>INR</CURRENCY>
   <PERSON_RESP>SAMUAL</PERSON_RESP>
</ns0:InternalOrder_request>
Input xsd:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.xyz.com/Gopal" targetNamespace="http://www.xyz.com/Gopal">
     <xsd:element name="InternalOrder_request" type="InternalOrder" />
     <xsd:complexType name="InternalOrder">
          <xsd:annotation>
               <xsd:appinfo source="http://sap.com/xi/TextID">
               96f86070e91411dc9c0d0012799ec115
               </xsd:appinfo>
          </xsd:annotation>
          <xsd:sequence>
               <xsd:element name="ORDER">
                    <xsd:annotation>
                         <xsd:appinfo source="http://sap.com/xi/TextID">
                         577ce800896811dca23200c045000001
                         </xsd:appinfo>
                         <xsd:documentation xml:lang="EN">
                         Order
                         </xsd:documentation>
                    </xsd:annotation>
                    <xsd:simpleType>
                         <xsd:restriction base="xsd:string">
                              <xsd:minLength value="1" />
                              <xsd:maxLength value="12" />
                         </xsd:restriction>
                    </xsd:simpleType>
               </xsd:element>
               <xsd:element name="ORDER_TYPE" default="Z001">
                    <xsd:annotation>
                         <xsd:appinfo source="http://sap.com/xi/TextID">
                         577ce801896811dcc66100c045000001
                         </xsd:appinfo>
                         <xsd:documentation xml:lang="EN">
                         Order type
                         </xsd:documentation>
                    </xsd:annotation>
                    <xsd:simpleType>
                         <xsd:restriction base="xsd:string">
                              <xsd:minLength value="1" />
                              <xsd:maxLength value="4" />
                         </xsd:restriction>
                    </xsd:simpleType>
               </xsd:element>
               <xsd:element name="ORDER_NAME">
                    <xsd:annotation>
                         <xsd:appinfo source="http://sap.com/xi/TextID">
                         577ce802896811dcbb3900c045000001
                         </xsd:appinfo>
                         <xsd:documentation xml:lang="EN">
                         Order short text
                         </xsd:documentation>
                    </xsd:annotation>
                    <xsd:simpleType>
                         <xsd:restriction base="xsd:string">
                              <xsd:minLength value="0" />
                              <xsd:maxLength value="40" />
                         </xsd:restriction>
                    </xsd:simpleType>
               </xsd:element>
               <xsd:element name="CO_AREA">
                    <xsd:annotation>
                         <xsd:appinfo source="http://sap.com/xi/TextID">
                         577ce803896811dcae0e00c045000001
                         </xsd:appinfo>
                         <xsd:documentation xml:lang="EN">
                         Control area
                         </xsd:documentation>
                    </xsd:annotation>
                    <xsd:simpleType>
                         <xsd:restriction base="xsd:string">
                              <xsd:minLength value="1" />
                              <xsd:maxLength value="4" />
                         </xsd:restriction>
                    </xsd:simpleType>
               </xsd:element>
               <xsd:element name="CCTR_POSTED">
                    <xsd:annotation>
                         <xsd:appinfo source="http://sap.com/xi/TextID">
                         577ce804896811dcb50900c045000001
                         </xsd:appinfo>
                         <xsd:documentation xml:lang="EN">
                         CC true post
                         </xsd:documentation>
                    </xsd:annotation>
                    <xsd:simpleType>
                         <xsd:restriction base="xsd:string">
                              <xsd:minLength value="1" />
                              <xsd:maxLength value="10" />
                         </xsd:restriction>
                    </xsd:simpleType>
               </xsd:element>
               <xsd:element name="CURRENCY">
                    <xsd:annotation>
                         <xsd:appinfo source="http://sap.com/xi/TextID">
                         577ce805896811dca87500c045000001
                         </xsd:appinfo>
                         <xsd:documentation xml:lang="EN">
                         Currency
                         </xsd:documentation>
                    </xsd:annotation>
                    <xsd:simpleType>
                         <xsd:restriction base="xsd:string">
                              <xsd:minLength value="0" />
                              <xsd:maxLength value="5" />
                         </xsd:restriction>
                    </xsd:simpleType>
               </xsd:element>
               <xsd:element name="PERSON_RESP">
                    <xsd:annotation>
                         <xsd:appinfo source="http://sap.com/xi/TextID">
                         577ce806896811dcaef000c045000001
                         </xsd:appinfo>
                         <xsd:documentation xml:lang="EN">
                         Person Rsep
                         </xsd:documentation>
                    </xsd:annotation>
                    <xsd:simpleType>
                         <xsd:restriction base="xsd:string">
                              <xsd:minLength value="0" />
                              <xsd:maxLength value="20" />
                         </xsd:restriction>
                    </xsd:simpleType>
               </xsd:element>
          </xsd:sequence>
     </xsd:complexType>
</xsd:schema>
This java code works fine as a standalone code in my machine. I am using JDK1.4.2_13. I gave the input xml file same as that I got from message mapping under SRC tab.
But when I use the same java program in my XI interface mapping I am getting the error:
Fatal Error: com.sap.engine.lib.xml.parser.ParserException: </ expected(:main:, row:1, col:101)(:main:, row=1, col=101) -> com.sap.engine.lib.xml.parser.ParserException: </ expected(:main:, row:1, col:101) at com.sap.engine.lib.xml.parser.XMLParser.scanEndTag(XMLParser.java:1872) at com.sap.engine.lib.xml.parser.XMLParser.scanElement(XMLParser.java:1846) at com.sap.engine.lib.xml.parser.XMLParser.scanDocument(XMLParser.java:2845) at com.sap.engine.lib.xml.parser.XMLParser.parse0(XMLParser.java:231) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parseAndCatchException(AbstractXMLParser.java:145) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:160) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:261) at com.sap.engine.lib.xml.parser.Parser.parseWithoutSchemaValidationProcessing(Parser.java:280) at com.sap.engine.lib.xml.parser.Parser.parse(Parser.java:342) at com.sap.engine.lib.xml.parser.SAXParser.parse(SAXParser.java:125) at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
Basically what I am doing in interface mapping is that I am first validating the input XI message using the schema. If the validation fails then throwing an exception, Else outputting the output xml in the output stream. The output is then mapped to target message using the graphical message mapping. The target message refers to the BAPI's output interface.
So  what I doing wrong ? Why is the same java mapping code not working in XI? Is there some unicode problem in XI?
Any parser problem? My XI server is also using JDK1.4.2_13
One thing I have observed is that the code works in XI if I comment the following code lines
factory.setNamespaceAware(true);
         factory.setValidating(true);
saxParser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
               saxParser.setProperty(JAXP_SCHEMA_SOURCE, new File("IOReqMsgSchema.xsd"));
Please help me! I have been struggling with this since 3 weeks now.
Thanks
Gopal

Hi,
just comment
factory.setNamespaceAware(true);
and then try.
I am using the DOM parser
please refer:
/people/ranjit.deshmukh/blog/2008/01/14/validations-using-java-for-those-not-having-pi71
Ranjit

Similar Messages

  • How to get the number of rows in a ResultSet

    Hello,
    I'm an intern and I'm trying to get the number of rows from result set in oracle using rs.last() and rs.beforeFirst() methods
    but I got an error. Could Below is my sample code:
    import java.sql.*;
    public class SarueckConnect {
    public static void main(String[] args) {
    Connection con = null;
    Statement stmt = null;
    ResultSet re = null;
    String[] ParamArray;
    ParamArray = new String[24];
    //Properties logon;
    try {
    Class.forName("oracle.jdbc.driver.OracleDriver"); //Loading the Oracle Driver.
    con = DriverManager.getConnection
    ("jdbc:oracle:thin:@258.8.159.215:1521:test_DB","data","data"); //making the connection DB.
    stmt = con.createStatement ();// Sending a query string to the database
    //stmt.executeUpdate("UPDATE test_table set steuk = 6 WHERE steuk = 5");
    ResultSet rs = stmt.executeQuery("SELECT mandt,kokrs,werks,arbpl,aufnr,vornr,ile01,"+
    "lsa01,ism01,ile02,lsa02,ism02,ile03,lsa03,ism03,ile04,lsa04,ism04,steuk,matnr,budat,"+
    "kostl,pernr,rueckid FROM test_table where steuk =6");
    //Print the result out.
    rs.last(); //This is the line which gives an error.
    int rows = rs.getRow();
    rs.beforeFirst();// I presume this is wrong to.
    ParamArray = new String[24*rows];
    int counter=0;
    while (rs.next()) {
    for (int i = 1; i <= 24; i++){
    ParamArray[i-1+(counter*24)] = rs.getString(i);
    System.out.print(rs.getString(i) + '\t');
    System.out.println();
    counter++;
    } catch(Exception e) {
    e.printStackTrace();
    } finally {
    try
    if(stmt != null) stmt.close();
    if(con != null) con.close();
    } catch (Exception exception) {
    exception.printStackTrace();
    TryBapi sap = new TryBapi(ParamArray);
    }When I run the code I do have the following ERROR Message:
    java.sql.SQLException: Invalid operation for forward only resultset : last
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
    at oracle.jdbc.driver.BaseResultSet.last(BaseResultSet.java:91)
    at SarueckConnect.main(SarueckConnect.java:28)Please could any body Help me out here to figure out how to correct this?
    Any Help would be highly apprecited.

    make your result set scrollable...Not such a good idea. With Oracle, the JDBC driver will read and cache all the ResultSet in memory (with other DBMSs/drivers the behavior will probably be different, but you will still have some unnecessary overhead).
    You can do the caching yourself if you think it's worth it. If the piece of code you posted is why you need this for, then use a List or Vector and you won't need to know the size upfront.
    Alin,
    The jTDS Project.

  • I am getting object expected error in javascript for autocomplete function

    Hi,
    I want to search list items like autocomplete function using jquery.
    I added code in CEWP, but i am getting "Object expected" error. I have checked using alert
     $().SPServices({
        operation: "GetListItems",
        async: false,
    I think SPservices is not working.
    Please help me!!

    Hi,
    According to your post, my understanding is that you wanted to search list items like autocomplete function using jquery.
    You can use the below code to get the Titles of the Announcements list as the values of the autocomplete function.
    <script type="text/javascript" src="/SiteAssets/jquery-1.10.2.js"></script>
    <script type="text/javascript" src="/SiteAssets/jquery.SPServices-2014.01.min.js"></script>
    <script type="text/javascript" src="/SiteAssets/jquery-ui-1.10.4.min.js"></script>
    <script type="text/javascript">
    window.onload = function() {
    window.setTimeout(readyCall, 1000);
    function readyCall(){
    var externalParties = [];
    $().SPServices({
    operation: "GetListItems",
    async: false,
    listName: "Announcements",
    CAMLViewFields: "<ViewFields><FieldRef Name='Title' /></ViewFields>",
    completefunc: function (xData, Status) {
    $(xData.responseXML).SPFilterNode("z:row").each(function() {
    externalParties.push($(this).attr("ows_Title"));
    $("input[id$='FormControl0_V1_I1_T1']").autocomplete({
    source: externalParties,
    minLength: 1
    </script>
    More information:
    jQuery Library for SharePoint Web Services
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Change row and col in excel

    Hi,i have labview 6  i need to get data to the excel specific row and col than on the same worksheet write another data and so on.
     in the word doc i put the code i use.
    1) how can i do it right
    2) how can i write to the same worksheet without run over the old data
    i have to do 100 experiment and i don't want to open 100 worksheets on the excel
    thanks in advance.
    Attachments:
    excel.doc ‏27 KB

    Hi,
           Should the excel need any style for it. example, characters' color, text size. text style, append picture etc.
    if not. you can use "write characters to file.vi" this vi is easy controlled that write to the same worksheet ,as your option, run over or not the old data.
    if you need some of excel's style. you can make the old data worksheet as a temp.xls. define the worksheet written position, thus, the data will not run over the old data.
    Try to make everything Automatic

  • Sap.table.table onAfterRendering event breaks the table rows and cols

    Hi guys,
    I am coloring all the rows, which don't have an entry.
    I do that by using the event onAfterRendering from the table control.
    The coloring is working fine, but the rows and cols get broken as u can see on the attached picture.
    By adding a new entry to the table, they get fixed.
    Any ideas how could i fix that?
    I appreciate any help.
    Regars,
    Georgi

    This is because you have overwritten the library code :-)
    please do this.
    <yourControl>.onAfterRendering = function() {
         sap.ui.table.Table.prototype.onAfterRendering.apply(this);
         <your code> ....
    -D

  • Need sample code to get handle of Selected rows from ADF Table

    Hi,
    I am new to ADF. I have an ADF table based on VO object.On some button action,I need to get handle of selected rows in application module.
    If anybody is having sample code to do this then please share with me.
    Thanks,
    ashok

    wow now link http://blogs.oracle.com/smuenchadf/examples/#134 is working.thanks a lot.
    also the link http://baigsorcl.blogspot.com/2010/06/deleting-multi-selected-rows-from-adf.html is very useful. Thanks a lot for Sameh Nassar too.He made it clear that in 11g Select column is not available for a ADF table and provided a solution to get Select column.
    Thanks,
    ashok

  • In Table Control How to get only a single row .

    Hi
    In Table Control How to get only a single row .I am able to decrease it its height to 4 but then 2 rows is getting dsplayed .I want only one row to be display and 2nd row should be deactivated or not visible.
    regards
    Avik
    Edited by: Julius Bussche on Jan 30, 2009 1:10 PM
    Removed friendly greeting from the subject title

    Hi Avik
    use this code it will help you.
    MODULE passdata OUTPUT.
      READ TABLE it_revision INTO wa_rev INDEX tab_clc-current_line.
      IF sy-subrc = 0.
        LOOP AT SCREEN.
          IF screen-group1 = '111'.      " 111 IS THE GROUP NAME
            screen-input = 1.          " input mode
            screen-active = 1.         " input mode.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN.
          IF screen-group1 = '111'.       "GROUP NAME
            screen-input = 0.           " display mode
            screen-active = 1.          " DISPLAY MODE.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDMODULE.                 " PASSDATA  OUTPUT
    Make sure in group tou are passing the field name that you want in input mode on the base of other field
    Hope it will help you.
    Thanks
    Arun Kayal.

  • My ipod touch is stuck on the restore picture and when i try and sync it to itunes i cant sync to itunes because i have a password on my ipod touch and i cant get to the main screen so how do i reset my ipod ?

    my ipod touch is stuck on the restore picture and when i try and sync it to itunes i cant sync to itunes because i have a password on my ipod touch and i cant get to the main screen so how do i reset my ipod ?

    Connecting in recovery mode will help: http://support.apple.com/kb/HT1808

  • Is there ANY WAY to get my files (mainly music) off of my ipod?

    My 3rd generation Ipod touch went into recovery mode, and it says I must restore it in order to use Itunes. The thing is, my laptop broke before I had a chance to back up any of the files. My question is, is there any possible way to get the files (mainly my music) off of it? thanks!
    The sooner the answers, the better!

    There are third-apps that allow to get to your iPod content but I doubt they will work if your device is in recovery mode.  This cannot being cover here as it is not considered legit to take music out of an iOS device.
    The question should rather be is there any possible way to get your files off your broken laptop.  If it wasn't related to its HD, you should be able to recover your files this way.

  • How to get the number of rows in a repeating frame ?

    Hi all,
    When I launch a report from forms then sometimes there are data in the report and sometimes there are no data. And the problem is that when there are no data then the frame containing the repeating frame is still displaying and a blank page displays on the report.
    So I want to get the number of rows from the repeating frame so that I can code a format trigger on the frame to display or not the enclosing frame depending on the existence of data from the repeating frame.
    Thank you very much indeed.

    Dear Friend,
    You can achieve this. Define a summary column (say cnt). Select summary type as "COUNT". select any one of columns that are getting displayed in your repeating frame as summary column and provide "reset at" group name (or set this to report if you are defining this field at report level) . This "cnt" variable will contain how many records that will be fetched for your repeating frame (i.e. Group of Repeating frame). You can use this "CNT" variable in your format trigger.
    In this case there is no need to write before report trigger or anything.
    Regards,
    Manish Trivedi

  • How to get the number of rows in a DB-Cursor

    When i open a database cursor i do not know how much rows are stored in the cursor. To solve this problem i have to send a 'select count(1) ...' to get the number of rows before i set up the cursor. I think that this is not very clever and could possibly cause performance problems. But i need the num of rows to show the percentage of processed rows. Is there any other way to get the num of rows? May be by checking the cursor directly?
    Please help!
    Thanx a lot

    In order to find out how may rows are going to be processed, oracle has to visit every row. So with a cursor, there is no property that will accurately reflect the number of rows until you get to the last one. That said, you could use
    select count(*) over() as row_count, <rest of your columns> FROM <your table>
    which will give you the total row count agaist each row in the result set. There are performance penalties involved but they will be less than issuing the query twice, once to get the count and once to get the rows.
    Have a look on asktom for some very usefull info about all this.
    HTH

  • How to get the number of rows in a report region

    Hi all,
    Is there a way to get the number of rows returned in a report region, without issuing an additional "select count(*) from some_table"?
    I mean something like the substitution string #ROW_NUM# but for the total rows.
    Thanks,
    Pedro.

    http://download.oracle.com/docs/cd/E17556_01/doc/user.40/e15517/ui.htm#CHDDGGEG
    For classic report regions, the region footer supports the following substitution strings:#ROWS_FETCHED# shows the number of rows fetched by the Oracle Application Express reporting engine (the page size). You can use these substitution strings to display customized messages to the user. For example:
    Fetched #ROWS_FETCHED# rows in #TIMING# seconds.
    *#TOTAL_ROWS# displays the total number of rows that satisfy a SQL query used for a report.*
    #FIRST_ROW_FETCHED# and #LAST_ROW_FETCHED# display the range of rows displayed. For example:
    Row(s) #FIRST_ROW_FETCHED# through #LAST_ROW_FETCHED# of #ROWS_FETCHED# displayed>
    Ta,
    Trent

  • How to get the number of rows written to the header of the spool file.

    Hi
    I need to create a header line for the spool file .
    the header line should include fixed length values .
    The header should include the number of records found in the table with a maximum begin date (begin_date is the column of the table)
    To get the header in the spool file , i wrote a select query has :-
    --SPOOL 'C:\Documents and Settings\abc\Desktop\output.TXT'
    select 'W'||to_char(sysdate,'MM/DD/YYYYMi:HH:SS')||lpad(max(rownum),9,'000000000') ||'R'||max(to_char(school_from_date,'MM/DD/YYYY')) ||
    rpad(' ',76,' ')
    from dad.school
    group by sysdate;
    SPOOL OFF
    which gets me all the rows in the table , but i only want the rows with the latest school_begin_date .
    how can i achieve that ...
    I know that a subquery should be written in the from clause to get the number of rows found with a maximum school_begin_date.
    select 'W'||to_char(sysdate,'MM/DD/YYYYMi:HH:SS')||lpad(max(rownum),9,'000000000') ||'R'||max(to_char(school_from_date,'MM/DD/YYYY')) ||
    rpad(' ',76,' ')
    from dad.school where
    select rownum from dad.school
    where school_begin_date = max(school_begin_date) ;
    the error i get is
    ORA-00934: group function is not allowed here
    I NEED HELP ..IN GETTING THE ROWNUM JUST FOR THE LATEST BEGIN_DATE ?
    PLS HELP ME IN WRITING THE QUERY .
    THANKS IN ADVANCE .

    Try this:
    select 'W'||to_char(sysdate,'MM/DD/YYYYMi:HH:SS')||lpad(max(rownum),9,'000000000')||'R'||max(to_char(school_from_date,'MM/DD/YYYY')) || rpad(' ',76,' ')
      from dad.school
    where school_begin_date = (select max(school_begin_date)
                                  from dad.school);

  • The main part of the safari page is grey and won't respond/can't type in any commands.  I can move back through the previous pages, and even open new ones via the URL, but can't get onto the main part of the page and I can't get onto the 9 page option. !?

    The main part of the safari page is grey and won't respond/can't type in any commands.  I can move back through the previous pages, and even open new ones via the URL, but can't get onto the main part of the page and I can't get onto the 9 page option. !?
    Help, please.

    Try clearing Safari's cache : Settings > Safari > Clear Cache (and Clear History)
    If that doesn't work then try closing Safari completely and then re-open it : from the home screen (i.e. not with Safari 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Safari app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    A third option is a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • How to know the row and col numbers of a cell in JTable at mouseclicked

    Hi, I'm coding an app using swing and JTable, in this table I will display the records from a database, now, each time the user has click in any cell I want to display it value, whit this method:
        private void setpuntero(JTable table, int row, int col){
            Object o = table.getValueAt(row, col);
            System.out.println("Valor de la celda: "+o.toString());
    }The mouseclick event was coded like this:
                table.addMouseListener(new MouseAdapter() {
                    public void mouseClicked(MouseEvent e) {
                        setpuntero(table, 1, 3);
                });My question is:
    how in the mouseClicked I can pass to setpuntero() method the dynamic values of the cell that the user clicked?
    In this example, setpuntero(table, 1, 3); I have chosen the cell(1,3) to display the value, but really I don't know how to capture those values dinamically using the mouse click
    Regards
    Herbert

    perhaps:
          public void mouseClicked(MouseEvent e)
            int row = table.getSelectedRow();
            int col = table.getSelectedColumn();
            String selected = table.getValueAt(row, col).toString(); // this will need to be changed if not String data
          }

Maybe you are looking for