MYsql with a Java table

I'm trying to use a Jtable to display a Table from a MySQL database....
But i keep getting an error, and dunno where i'm going wrong.
Here is my code:
import java.sql.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
public class IPgroep extends JFrame {
private Connection connection;
private JTable table;
public IPgroep()      throws
          ClassNotFoundException,
          SQLException,
          IllegalAccessException,
          InstantiationException
String url = "jdbc:mysql://localhost/IPMAN";
String username = "";
String password = "";
try {
          Class.forName("org.gjt.mm.mysql.Driver").newInstance();
connection = DriverManager.getConnection(
url, username, password );
catch ( ClassNotFoundException cnfex ) {
System.err.println(
"Failed to load JDBC/ODBC driver." );
cnfex.printStackTrace();
System.exit( 1 );
catch ( SQLException sqlex ) {
System.err.println( "Unable to connect" );
sqlex.printStackTrace();
getTable();
setSize( 450, 150 );
show();
private void getTable()
Statement statement;
ResultSet resultSet;
try {
String query = "SELECT * FROM ip WHERE ip.NetwerkAdres = '213.10.15.15'";
statement = connection.createStatement();
resultSet = statement.executeQuery( query );
displayResultSet( resultSet );
statement.close();
catch ( SQLException sqlex ) {
sqlex.printStackTrace();
private void displayResultSet( ResultSet rs )
throws SQLException
boolean moreRecords = rs.next();
if ( ! moreRecords ) {
JOptionPane.showMessageDialog( this,
"ResultSet contained no records" );
setTitle( "No records to display" );
return;
setTitle( "IPTOTAL table from IP" );
Vector columnHeads = new Vector();
Vector rows = new Vector();
try {
ResultSetMetaData rsmd = rs.getMetaData();
for ( int i = 1; i <= rsmd.getColumnCount(); ++i )
columnHeads.addElement( rsmd.getColumnName( i ) );
do {
rows.addElement( getNextRow( rs, rsmd ) );
} while ( rs.next() );
table = new JTable( rows, columnHeads );
JScrollPane scroller = new JScrollPane( table );
getContentPane().add(
scroller, BorderLayout.CENTER );
validate();
catch ( SQLException sqlex ) {
sqlex.printStackTrace();
private Vector getNextRow( ResultSet rs,
ResultSetMetaData rsmd )
throws SQLException
Vector currentRow = new Vector();
for ( int i = 1; i <= rsmd.getColumnCount(); ++i )
switch( rsmd.getColumnType( i ) ) {
case Types.VARCHAR:
currentRow.addElement( rs.getString( i ) );
break;
case Types.INTEGER:
currentRow.addElement(
new Long( rs.getLong( i ) ) );
break;
default:
System.out.println( "Type was: " +
rsmd.getColumnTypeName( i ) );
return currentRow;
public void shutDown()
try {
connection.close();
catch ( SQLException sqlex ) {
System.err.println( "Unable to disconnect" );
sqlex.printStackTrace();
public static void main( String args[] )     throws
          ClassNotFoundException,
          SQLException,
          IllegalAccessException,
          InstantiationException
final IPgroep app = new IPgroep();
app.addWindowListener(
new WindowAdapter() {
public void windowClosing( WindowEvent e )
app.shutDown();
System.exit( 0 );
and here is my error:
Type was: CHAR
Type was: CHAR
Type was: CHAR
Type was: CHAR
Type was: CHAR
Type was: CHAR
Exception occurred during event dispatching:
java.lang.ArrayIndexOutOfBoundsException: 6 >= 6
at java.util.Vector.elementAt(Vector.java:417)
at javax.swing.JTable$1.getValueAt(JTable.java:415)
at javax.swing.JTable.getValueAt(JTable.java:1711)
at javax.swing.JTable.prepareRenderer(JTable.java:3530)
at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:995)
at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:917)
at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:858)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:39)
at javax.swing.JComponent.paintComponent(JComponent.java:398)
at javax.swing.JComponent.paint(JComponent.java:739)
at javax.swing.JComponent.paintChildren(JComponent.java:523)
at javax.swing.JComponent.paint(JComponent.java:748)
at javax.swing.JViewport.paint(JViewport.java:668)
at javax.swing.JComponent.paintChildren(JComponent.java:523)
at javax.swing.JComponent.paint(JComponent.java:748)
at javax.swing.JComponent.paintChildren(JComponent.java:523)
at javax.swing.JComponent.paint(JComponent.java:748)
at javax.swing.JComponent.paintChildren(JComponent.java:523)
at javax.swing.JComponent.paint(JComponent.java:748)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:546)
at javax.swing.JComponent.paintChildren(JComponent.java:523)
at javax.swing.JComponent.paint(JComponent.java:719)
at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:23)
at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:
54)
at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:91
at java.awt.Container.paint(Container.java:963)
at sun.awt.RepaintArea.paint(RepaintArea.java:298)
at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:199)
at java.awt.Component.dispatchEventImpl(Component.java:2665)
at java.awt.Container.dispatchEventImpl(Container.java:1216)
at java.awt.Window.dispatchEventImpl(Window.java:918)
at java.awt.Component.dispatchEvent(Component.java:2499)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:336)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:134)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:96)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:88)
Thanx in advance

case Types.VARCHAR:
currentRow.addElement( rs.getString( i ) );
break;
case Types.INTEGER:
currentRow.addElement(
new Long( rs.getLong( i ) ) );You're getting a type mismatch error.
For example, rs.getString() would return String. No ? Why VARCHAR ?
and rs.getLong() would get Long, not integer. right ?
Your error is here. I wish I could tell you more.

Similar Messages

  • Weird problem with mysql query and data table buttons !!!!

    Hi,
    I'm using jsc 2 update 1 on windows and mysql 4.1 . I have a page with a data table. One column of the data table contains "Details" buttons.
    Source query for the table is :
    SELECT tbl_tesserati.idtbl_tesserati idTesserato,
    tbl_tesserati.num_tessera,
    tbl_tesserati.nome,
    tbl_societa.codice_meccanografico
    FROM tbl_tesserati
    INNER JOIN tbl_rel_tesserato_discipline_societa ON tbl_tesserati.idtbl_tesserati = tbl_rel_tesserato_discipline_societa.id_tesserato
    INNER JOIN tbl_cariche ON      tbl_rel_tesserato_discipline_societa.id_carica = tbl_cariche.idtbl_cariche
    INNER JOIN tbl_qualifiche ON      tbl_rel_tesserato_discipline_societa.id_qualifica = tbl_qualifiche.idtbl_qualifiche
    INNER JOIN tbl_discipline ON      tbl_rel_tesserato_discipline_societa.id_disciplina = tbl_discipline.idtbl_discipline
    INNER JOIN tbl_societa ON      tbl_rel_tesserato_discipline_societa.id_societa = tbl_societa.idtbl_societa
    LEFT JOIN tbl_province ON tbl_societa.provincia_sede_sociale = tbl_province.idtbl_province
    LEFT JOIN tbl_comuni ON tbl_societa.comune_sede_sociale = tbl_comuni.idtbl_comuni
    LEFT JOIN tbl_rel_tesserato_discipline_praticate ON tbl_rel_tesserato_discipline_praticate.tessera_id=
    tbl_rel_tesserato_discipline_societa.idtbl_rel_tesserato_discipline
    LEFT JOIN tbl_discipline_praticate ON tbl_discipline_praticate.idtbl_disciplina_praticate=tbl_rel_tesserato_discipline_praticate.disciplina_praticata_id
    WHERE
    tbl_tesserati.cognome LIKE ?
    AND tbl_tesserati.nome LIKE ?
    AND tbl_rel_tesserato_discipline_societa.id_societa LIKE ?
    AND tbl_tesserati.idtbl_tesserati LIKE ?
    AND tbl_cariche.idtbl_cariche LIKE ?
    AND tbl_qualifiche.idtbl_qualifiche LIKE ?
    AND tbl_tesserati.data_nascita >= ?
    AND tbl_tesserati.data_nascita<= ?
    AND tbl_discipline.idtbl_discipline LIKE ?
    AND codice_affiliazione LIKE ?
    AND tbl_societa.denominazione LIKE ?
    AND YEAR(tbl_rel_tesserato_discipline_societa.data_scadenza) LIKE ?
    AND (tbl_province.nome LIKE ? OR tbl_province.nome IS NULL)
    AND ( tbl_comuni.nome LIKE ? OR tbl_comuni.nome IS NULL)
    The tbl_tesserati.data_nascita is a mysql date field.
    The click event handler code for the "Details" Button is:
    public String btnModificaTesserato_action() {
            try{
                TableRowDataProvider rowData= (TableRowDataProvider)getBean("currentRowTesserati");
                getRequestBean1().setId_tesserato((Long)rowData.getValue("idTesserato"));          
            } catch(Exception ex) {
                log("errore nella query",ex);
            return "dettaglioTesseratoSocieta";
        }When i run the project and open the page the table is correctly rendered and populated with some rows. But when i click on details button nothing happens, the page is simply reloaded.
    If i set a breakpoint in the code line   TableRowDataProvider rowData= (TableRowDataProvider)getBean("currentRowTesserati");the debbuger does not stop the code execution ! As if the button was never clicked!
    I tried to modify the source query to :
    SELECT tbl_tesserati.idtbl_tesserati idTesserato,
    tbl_tesserati.num_tessera,
    tbl_tesserati.nome,
    tbl_societa.codice_meccanografico
    FROM tbl_tesserati
    INNER JOIN tbl_rel_tesserato_discipline_societa ON tbl_tesserati.idtbl_tesserati = tbl_rel_tesserato_discipline_societa.id_tesserato
    INNER JOIN tbl_cariche ON      tbl_rel_tesserato_discipline_societa.id_carica = tbl_cariche.idtbl_cariche
    INNER JOIN tbl_qualifiche ON      tbl_rel_tesserato_discipline_societa.id_qualifica = tbl_qualifiche.idtbl_qualifiche
    INNER JOIN tbl_discipline ON      tbl_rel_tesserato_discipline_societa.id_disciplina = tbl_discipline.idtbl_discipline
    INNER JOIN tbl_societa ON      tbl_rel_tesserato_discipline_societa.id_societa = tbl_societa.idtbl_societa
    LEFT JOIN tbl_province ON tbl_societa.provincia_sede_sociale = tbl_province.idtbl_province
    LEFT JOIN tbl_comuni ON tbl_societa.comune_sede_sociale = tbl_comuni.idtbl_comuni
    LEFT JOIN tbl_rel_tesserato_discipline_praticate ON tbl_rel_tesserato_discipline_praticate.tessera_id=
    tbl_rel_tesserato_discipline_societa.idtbl_rel_tesserato_discipline
    LEFT JOIN tbl_discipline_praticate ON tbl_discipline_praticate.idtbl_disciplina_praticate=tbl_rel_tesserato_discipline_praticate.disciplina_praticata_id
    WHERE
    tbl_tesserati.cognome LIKE ?
    AND tbl_tesserati.nome LIKE ?
    AND tbl_rel_tesserato_discipline_societa.id_societa LIKE ?
    AND tbl_tesserati.idtbl_tesserati LIKE ?
    AND tbl_cariche.idtbl_cariche LIKE ?
    AND tbl_qualifiche.idtbl_qualifiche LIKE ?
    AND tbl_tesserati.data_nascita >= ?
    OR tbl_tesserati.data_nascita<= ?
    AND tbl_discipline.idtbl_discipline LIKE ?
    AND codice_affiliazione LIKE ?
    AND tbl_societa.denominazione LIKE ?
    AND YEAR(tbl_rel_tesserato_discipline_societa.data_scadenza) LIKE ?
    AND (tbl_province.nome LIKE ? OR tbl_province.nome IS NULL)
    AND ( tbl_comuni.nome LIKE ? OR tbl_comuni.nome IS NULL)
    Using this query everything works well !! The click handler works and the debugger too !!
    I changed only the AND in OR !!!
    I also tried to change mysql-x-x-connector driver but without solving my problem.
    Can someone help me ?
    Thanks
    Giorgio

    You'll find that it is more to do with the way MySql deals with dates than anything else! Depending on how your date field is setup, then try using a BETWEEN statement for those 2 lines in your first query e.g.
    AND ( tbl_tesserati.data_nascita BETWEEN ? AND ?)
    The date column needs to be in the ISO format to work. If you examine your second query output, you might discover that the output is only going to refer to one parameter (probably the OR one). Did you manage to view the output logs from the application server? You would have got an idea from there with a message like stating a conversion error'.
    Alternatively, you could try using the to_days() function and convert it directly to a number which would be a lot easier to deal with. For example:
    AND to_days(tbl_tesserati.data_nascita >= ? )
    AND to_days( tbl_tesserati.data_nascita<= ? )
    Or try the BETWEEN version with to_days() and see what you get.
    More info about date formatting (v5) here:
    http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_to-days
    Before I forget, sometimes you may need to treat dates as Strings rather 'Long' as you did.
    As a matter of interest, did you try your query in a different piece of software?
    If my queries are a little more complicated, I tend to try MySql queries out in the free MySql query browser and also double check in another to verify certain issues. I found it easier to develop SQL in a seperate program then import the final version to JSC making the required modifications for parameters.
    Message was edited by:
    aerostra

  • Using MySQL with Java

    Hi, I am writing a database program, and I decided I should try and use MySQL since many people have told me it is the best way to make a database. Does the java version that Sun provide come with the api to create mysql databases?
    Also, I would like to know of a good tutorial that teaches MySQL with java.

    Hi, I am writing a database program, and I decided I
    should try and use MySQL since many people have told
    me it is the best way to make a database. Does the
    java version that Sun provide come with the api to
    create mysql databases?
    You are more than a bit confused so please stop here until you understand the following.
    JDBC is the API for communicating with relational databases in Java. It is not a database in and of itself but it can communicate with any database that provides JDBC API access in the form of a JDBC driver.
    Also, I would like to know of a good tutorial that
    teaches MySQL with java.The Sun tutorial on JDBC may be found here http://java.sun.com/docs/books/tutorial/jdbc/index.html
    Your using (or not) MySQL is not relevent on this forum and any questions you have regarding MySQL (with the exception of one) are beyond the scope of this forum.
    The exception is "Is there a JDBC driver for MySQL and how do I use it". The answer to that question is yes and see this http://www.mysql.com/products/connector/j/

  • Convert string to mysql datetime in java

    Hi,
    Can somebody suggest me how to convert a date string in this format - Mon Aug 10 16:36:00 CDT 2009 to a MySql DateTime in Java?
    This date is the result of Apache POI. Below is my code:
    if(HSSFDateUtil.isCellDateFormatted(hssfCell)) {
         cellData = HSSFDateUtil.getJavaDate(hssfCell.getNumericCellValue()).toString();
         break;
    I want to insert cellData into MySql DateTime field.
    Thanks.

    First I would use a SimpleDateFormat object to parse that into a java.util.Date object.
    Then I would create a java.sql.Timestamp object from that and insert it into a PreparedStatement which updates the appropriate column in your MySQL table. Note that using a PreparedStatement removes all the uncertainty of creating something in a "MySQL" format as it just tells the JDBC driver to deal with those details.

  • How to create services for sql querry with joint 2 tables ?

    Hi all,
    I start to learn the php services function for mysql querry in flex 4.5 and all seam to be ok.
    But i don't find anny help or tutorial to create service that call a sql querry with joint to tables, like this :
    Select table01.fieldA table02.fieldA WHERE table01.fieldC LIKE table02.fieldC
    Are there a way to do that in flashBuilder creation services interfaces, or not ?
    Does we make a special value Object and all the AS3  classes and not use the template opperations ?
    Thank's for your help or link
    fbm

    Hi Fabien,
    I'm afraid you'll have to learn a bit more about PHP...
    Joined tables is a relational database feature. It has nothing to do with PHP, and PHP has nothing to do with Flex...
    The "magic" of the flex framework is that it can plug itself into any backend (.Net, Java, PHP...)
    The new way Flash Builder interacts with PHP is through AMF (Actionscript Messaging Format) with the help of Zend and Zend_Amf. You've been able to do it on your own for a while, but it was a bit tricky to set up... The new IDE helps you doing those mapping with wizards. What it does is that it serializes and deserializes objects from PHP to Actionscript, and also generates Actionscript value objects.
    So what you'll have to do is to write your own PHP services to retrieve your data from joined tables in MySQL. Those services will return simple arrays. Then start the wizard, select your services. Flash Builder will then map the objects contained in the PHP arrays into Actionscript typed objects.
    I suggest you have a deep look into Zend_Tables...
    Hope it'll help.
    Julien.

  • Read MYSQL with WebDynpro

    Hello Experts,
    i want to read data from a mySQL Database with WebDynpro. If i write a java programm to do this it works perfectly, but if I use this Java code in my WebDynpro Application it doesn't work.
    So how can I run this code in my WebDynpro-project:
    String Query = null;
    java.sql.Connection con = null;
    java.sql.Statement stmt = null;
    ResultSet rs = null;
    try {
    Class.forName("com.mysql.jdbc.Driver");
    catch (ClassNotFoundException e) {
    e.printStackTrace();
    System.exit(1);
    System.out.println(time.toString());
    System.out.println(time);
    try {
    con =
    DriverManager.getConnection(
    "jdbc:mysql://server.com",
    "user",
    "password");
    stmt = con.createStatement();
    rs = stmt.executeQuery("USE database");
    rs = stmt.executeQuery("SELECT * FROM table");
    while (rs.next()) {
    System.out.print(rs.getString(6));
    System.out.print(" --- " + rs.getString(7));
    System.out.print(" --- " + rs.getString(8));
    System.out.println(" --- " + rs.getString(9));
    con.close();
    rs.close();
    stmt.close();
    catch (SQLException e5) {
    e5.printStackTrace();
    Thanks!

    HI johannes,
                Web dynpro application should follow some coding rules,
    The following lines are not accepted by web dynpro
    you first go through the web dynpro documentaions
    e.printStackTrace();
    System.exit(1);
    System.out.println(time.toString());
    System.out.println(time);
    System.out.print(rs.getString(6));
    System.out.print(" --- " + rs.getString(7));
    System.out.print(" --- " + rs.getString(8));
    System.out.println(" --- " + rs.getString(9));
    e5.printStackTrace();
    in webdynpro replace following
    system.out.println()----
    >wdComponentAPI.getMessageManager().reportSuccess()
    To start with WD Java, the following tutorial wil be helpfiul
    http://help.sap.com/saphelp_nw04/helpdata/en/f8/bdfe80d9a3b048a5fb32a7d149774e/frameset.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#20
    To know about Web Dynpro UI Element Reference Guide
    http://help.sap.com/saphelp_nw04/helpdata/en/5c/1b76bc3da0504e8b535cf3e154eaa7/frameset.htm
    please go to following url,
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#20
    there is lot of basic tutorials is there. please go throught it
    Refer these links
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/web%20dynpro%20tutorial%20and%20sample%20applications.faq
    What is Web Dynpro? What is Web Dynpro?
    Why WebDynpro ? Why WebDynpro ?
    Why  webdynpro and not BSP or JSP? Why webdynpro and not BSP or JSP?
    BSP to WEB Dynpro BSP to WEB Dynpro
    Benifits of using Webdynpro Benifits of using Webdynpro
    Java vs. ABAP WEbDynpro Java vs. WebDynpro ABAP
    regarding Java related webdynpro regarding Java related webdynpro
    Web Dynpro vs. Struts - a few questions Web Dynpro vs. Struts - a few questions
    What kind of applications are being developed with Web Dynpro? What kind of applications are being developed with Web Dynpro?
    Check this:
    http://www.sappro.com/downloads/OptionComparison.pdf
    Refer these links
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/web%20dynpro%20tutorial%20and%20sample%20applications.faq
    What is Web Dynpro?
    Why WebDynpro ?
    Why  webdynpro and not BSP or JSP?
    BSP to WEB Dynpro
    Benifits of using Webdynpro
    Java vs. ABAP
    regarding Java related webdynpro regarding Java related webdynpro
    Web Dynpro vs. Struts - a few questions
    What kind of applications are being developed with Web Dynpro?
    Regards,
    P.Manivannan

  • How to fetch data from Mysql with SSL.

    I am using jdk1.5 and mysql 5.0.
    How to fetch data from Mysql with SSL
    I am using url = jdbc:mysql://localhost/database?useSSL=true&requireSSL=true.
    It shows error. how to fetch

    I have created certificate in mysql and checked in mysql.
    mysql>\s
    SSL: Cipher in use is DHE-RSA-AES256-SHA
    but through ssl how to fetch data in java.

  • How to access the data stored in Java tables in E-Commerce 7.0

    For the CRM E-Commerce 7.0 Web shop all the data related order templates, Shop Id and catalog variants are not getting stored in CRM tables. Can anyone please let us know where all the details are getting stored.
    By searching here, in SDN Forum we found that these details are getting stored in some java tables. If this is true  kindly let us know the following points.
    1). How can we access these tables.
    2).Where these java tables are stored .
    3).Do we have authorizations to check and modify these tables.
    4).If we donu2019t have authorizations to check and modify these tables, how can we get the access to them.
    4).How can we write Database Queries to retrieve the data from these tables.

    I am afraid, all these three entities are in CRM tables.
    Web Shops - Function module CRM_ISA_SHOP_GETLIST, Table crmm_isa_shop_h
    Catalog Variants - Function module - COM_PRDCAT_GET_VARIANTS (they are also stored in CRM tables) for a given catalog.
    Now for the Order Templates - They are technically order objects with system status set to "Order Template" I1034. You should be able to see them in CRM tables alongwith other orders... crmd_orderadm_h and etc...

  • Procedures with PL/SQL tables.

    Hi,
    I want to write the procedures with pl/sql tables. Can we write
    if yes can you provide the example or hint. If a person helps me
    i will be great thank ful.
    thanks.
    null

    reddy (guest) wrote:
    : Hi,
    : I want to write the procedures with pl/sql tables. Can we write
    : if yes can you provide the example or hint. If a person helps
    me
    : i will be great thank ful.
    : thanks.
    check the following faq link -- it says not supported yet ...
    http://technet.oracle.com/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm
    null

  • Taglib problem: Cannot parse custom tag with short name table

    Hello!
    I am having problems deploying a jsp tag in web as. The same war file works fine on websphere, jboss. SAP web as seems to be complaining about the short name in the tld.
    Can any body me to any known web as issues with jsp tags?
    Thanks
    [code]
    Application error occurs during processing the request.
    Details: com.sap.engine.services.servlets_jsp.server.exceptions.WebIOException: Internal error while parsing JSP page /usr/sap/J2E/JC00/j2ee/cluster/server0/apps/sap.com/dispear/servlet_jsp/disp/root/test.jsp.
         at com.sap.engine.services.servlets_jsp.server.jsp.JSPParser.parse(JSPParser.java:85)
         at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.getClassName(JSPServlet.java:207)
         at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.compileAndGetClassName(JSPServlet.java:369)
         at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:164)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:340)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:318)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:821)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:239)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
    Caused by: com.sap.engine.services.servlets_jsp.lib.jspparser.exceptions.JspParseException: Cannot parse custom tag with short name table.
         at com.sap.engine.services.servlets_jsp.lib.jspparser.syntax.xmlsyntax.CustomJspTag.action(CustomJspTag.java:129)
         at com.sap.engine.services.servlets_jsp.lib.jspparser.syntax.ElementCollection.action(ElementCollection.java:52)
         at com.sap.engine.services.servlets_jsp.server.jsp.JSPParser.initParser(JSPParser.java:307)
         at com.sap.engine.services.servlets_jsp.server.jsp.JSPParser.parse(JSPParser.java:74)
         ... 18 more
    Caused by: com.sap.engine.services.servlets_jsp.lib.jspparser.exceptions.JspParseException: Unknown class name java.lang.Object.
         at com.sap.engine.services.servlets_jsp.lib.jspparser.taglib.TagBeginGenerator.convertString(TagBeginGenerator.java:365)
         at com.sap.engine.services.servlets_jsp.lib.jspparser.taglib.TagBeginGenerator.generateSetters(TagBeginGenerator.java:187)
         at com.sap.engine.services.servlets_jsp.lib.jspparser.taglib.TagBeginGenerator.generateServiceMethodStatements(TagBeginGenerator.java:212)
         at com.sap.engine.services.servlets_jsp.lib.jspparser.taglib.TagBeginGenerator.generate(TagBeginGenerator.java:269)
         at com.sap.engine.services.servlets_jsp.lib.jspparser.syntax.xmlsyntax.CustomJspTag.action(CustomJspTag.java:127)
         ... 21 more
    [/code]

    Hi Ray,
    I am facing similar kind of issue.
    Can you please help to resolve it?
    Thanks in advance.
    Logs are as below [Here I am using standard tag lib]::
    Caused by: com.sap.engine.services.servlets_jsp.jspparser_api.exception.JspParseException: Cannot parse custom tag with short name [out].
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.xmlsyntax.CustomJspTag.action(CustomJspTag.java:183)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.ElementCollection.action(ElementCollection.java:59)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.JspIncludeDirective.action(JspIncludeDirective.java:51)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.ElementCollection.action(ElementCollection.java:59)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.JspElement.customTagAction(JspElement.java:994)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.JspElement.action(JspElement.java:228)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.ElementCollection.action(ElementCollection.java:59)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.ElementCollection.action(ElementCollection.java:69)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.GenerateJavaFile.generateJavaFile(GenerateJavaFile.java:72)
         at com.sap.engine.services.servlets_jsp.server.jsp.JSPProcessor.parse(JSPProcessor.java:270)
         at com.sap.engine.services.servlets_jsp.server.jsp.JSPProcessor.generateJavaFile(JSPProcessor.java:194)
         at com.sap.engine.services.servlets_jsp.server.jsp.JSPProcessor.parse(JSPProcessor.java:126)
         at com.sap.engine.services.servlets_jsp.jspparser_api.JSPChecker.getClassName(JSPChecker.java:319)
         at com.sap.engine.services.servlets_jsp.jspparser_api.JSPChecker.compileAndGetClassName(JSPChecker.java:248)
         at com.sap.engine.services.servlets_jsp.jspparser_api.JSPChecker.getClassNameForProduction(JSPChecker.java:178)
         at com.sap.engine.services.servlets_jsp.jspparser_api.JSPChecker.processJSPRequest(JSPChecker.java:109)
         at com.sap.engine.services.servlets_jsp.jspparser_api.JspParser.generateJspClass(JspParser.java:154)
         at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:193)
         ... 47 more
    Caused by: com.sap.engine.services.servlets_jsp.jspparser_api.exception.JspParseException: Attribute [value] of [<c:out>] can accept only static values.
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.taglib.TagBeginGenerator.calculateAttributeValue(TagBeginGenerator.java:476)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.taglib.TagBeginGenerator.generateSetters(TagBeginGenerator.java:394)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.taglib.TagBeginGenerator.generateServiceMethodStatements(TagBeginGenerator.java:562)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.taglib.TagBeginGenerator.generate(TagBeginGenerator.java:678)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.xmlsyntax.CustomJspTag.action(CustomJspTag.java:181)
         ... 64 more
    Regards,
    Sankalp

  • How to Connect to Mysql databse from Java Studio Enterprise 8

    Hello everybody,
    I have a database in mysql in linux.I have downloaded Java Studio Enterprise 8.
    How is it possible to connect to mysql.
    Could you tell the procedure .., I would be really thankfull
    From
    Ranjitha Rao

    hi
    u can connect to Mysql with the following code
    Class.forName("com.mysql.jdbc.Driver");
                   String url1 = "jdbc:mysql://localhost/<database name>";
                   String user1 = "root";
                   String pass1 = "";
                   Connection con1=DriverManager.getConnection(url1, user1, pass1);

  • Configuring mysql with J2EE

    Hi Im a newbie in J2EE. (just started learning it 2 days back that new..;-)
    I managed to set up a simple application using the J2ee tutorial. Now i want to try out a database application. I have a mysql database installed. Can anyone guide me on how to setup mysql with j2ee server? Are there any online tutorials etc that would help me in this?
    I actually managed to create a connection pool however when i try to ping it i get an error message with says "An error has occurred. Operation 'pingConnectionPool' failed in 'resources' Config Mbean. Target exception message: Class name is wrong or classpath is not set for : org.gjt.mm.mysql.jdbc2.optional.MysqlDataSource" .
    I hav already set classpath of mysql driver. Do i need to copy the jar file to any other directory?
    Im not too sure if the way i have created connection pool is right, but i used the defaults specified so i guess that should be ok.
    Any Help would be appreciated.
    Thanks in advance.

    Hi! I�m Brazilian and I�ve been learning the English language yet, but I�ll try to describe how to configure J2EE with MySQL.
    I am using MySQL version 4.1.7 with J2EE version 1.3 on Windows XP Professional. The driver version of MySQL is 3.0.16.
    You have to configure the following two files:
    - <J2EE_HOME>\bin\setenv.bat
    - <J2EE_HOME>\config\resource.properties
    Do the following steps:
    1) Copy the JAR file of MySQL driver (mysql-connector-java-3.0.16-ga-bin.jar) to <J2EE_HOME>\lib directory.
    2) In <J2EE_HOME>\bin directory open the setenv.bat file and analize the code. It is not hard to understand the code, it is just the classpath configuration of J2EE. After understand it, add a reference of MySQL driver (mysql-connector-java-3.0.16-ga-bin.jar), that was copied to <J2EE_HOME>\lib directory.
    3) Run the <J2EE_HOME>\bin\j2eeadmin.bat to configure the resource.properties file.There are two command lines to be executed, as below:
    - j2eeadmin.bat -addJdbcDriver <CLASS NAME OF THE DRIVER>
    - j2eeadmin.bat -addJdbcDatasource <JNDI NAME> <URL>
    For example:
    - j2eeadmin.bat -addJdbcDriver "com.mysql.jdbc.Driver"
    - j2eeadmin.bat -addJdbcDatasource "jdbc/mysql/test" "jdbc:mysql://localhost/test?user=username&password=pass"
    4) After run j2eeadmin.bat, the resource.properties file will be modified. But when I did it and when I executed the verbose command to start J2EE, some error messages was exhibited. So I decided to open the resource.properties file and I noticed hat the character "\" was added erroneously in a lot of places of the code. It did not seem correct, so I decided to remove these characters replacing them. Bingo!!! After I did it, I run verbose again and no more message error ocurred. I think it is a bug of J2EE.
    Finish! I modified the datasource JNDI to access MySQL and then I run my EAR application. No problems occurred. My application is running succesfully.
    Good luck!

  • MySql with JBoss connection refused

    hello,
    I am using MYSql with JBOSS, but while running starting JBOSS it
    gives
    Connection refused error:
    MySqlDB] at java.net.PlainSocketImpl.socketCon
    MySqlDB] at java.net.PlainSocketImpl.doConnect
    MySqlDB] at java.net.PlainSocketImpl.connectTo
    MySqlDB] at java.net.PlainSocketImpl.connect(U
    MySqlDB] at java.net.Socket.<init>(Unknown Sou
    MySqlDB] at java.net.Socket.<init>(Unknown Sou
    MySqlDB] at org.gjt.mm.mysql.MysqlIO.<init>(My
    MySqlDB] at org.gjt.mm.mysql.jdbc2.IO.<init>(I
    MySqlDB] at org.gjt.mm.mysql.jdbc2.Connection.
    159)
    MySqlDB] at org.gjt.mm.mysql.Connection.connec
    MySqlDB] at org.gjt.mm.mysql.jdbc2.Connection.
    va:89)
    MySqlDB] at org.gjt.mm.mysql.Driver.connect(Dr
    MySqlDB] at java.sql.DriverManager.getConnecti
    MySqlDB] at java.sql.DriverManager.getConnecti
    MySqlDB] at org.opentools.minerva.jdbc.xa.wrap
    nnection(XADataSourceImpl.java:118)
    MySqlDB] at org.opentools.minerva.jdbc.xa.wrap
    nnection(XADataSourceImpl.java:151)
    MySqlDB] at org.opentools.minerva.jdbc.xa.XACo
    (XAConnectionFactory.java:246)
    MySqlDB] at org.opentools.minerva.pool.ObjectP
    ol.java:819)
    MySqlDB] at org.opentools.minerva.pool.ObjectP
    a:569)
    MySqlDB] at org.opentools.minerva.pool.ObjectP
    a:521)
    MySqlDB] at org.opentools.minerva.jdbc.xa.XAPo
    APoolDataSource.java:165)
    MySqlDB] at org.jboss.jdbc.XADataSourceLoader.
    der.java:330)
    MySqlDB] at org.jboss.util.ServiceMBeanSupport
    ava:93)
    MySqlDB] at java.lang.reflect.Method.invoke(Na
    MySqlDB] at com.sun.management.jmx.MBeanServer
    java:1628)
    MySqlDB] at com.sun.management.jmx.MBeanServer
    java:1523)
    MySqlDB] at org.jboss.util.ServiceControl.star
    MySqlDB] at java.lang.reflect.Method.invoke(Na
    MySqlDB] at com.sun.management.jmx.MBeanServer
    java:1628)
    MySqlDB] at com.sun.management.jmx.MBeanServer
    java:1523)
    MySqlDB] at org.jboss.Main.<init>(Main.java:21
    MySqlDB] at org.jboss.Main$1.run(Main.java:121
    MySqlDB] at java.security.AccessController.doP
    MySqlDB] at org.jboss.Main.main(Main.java:117)
    I used the following tag in in JBOSS.jacml
    <!-- MYSQL -->
    <mbean code="org.jboss.jdbc.XADataSourceLoader" name="DefaultDomain:service=XADataSource,name=MySqlDB">
    <attribute name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl</attribute>
    <attribute name="PoolName">MySqlDB</attribute>
    <attribute name="URL">jdbc:mysql://192.168.0.6/AccountingDb:3333</attribute>
    <attribute name="Properties">DatabaseName=AccountingDb</attribute>
    <attribute name="JDBCUser"></attribute>
    <attribute name="Password"></attribute>
    <attribute name="MinSize">0</attribute>
    <attribute name="MaxSize">10</attribute>
    <attribute name="GCEnabled">false</attribute>
    <attribute name="GCMinIdleTime">1200000</attribute>
    <attribute name="GCInterval">120000</attribute>
    <attribute name="InvalidateOnError">false</attribute>
    <attribute name="TimestampUsed">false</attribute>
    <attribute name="Blocking">true</attribute>
    <attribute name="LoggingEnabled">false</attribute>
    <attribute name="IdleTimeoutEnabled">false</attribute>
    <attribute name="IdleTimeout">1800000</attribute>
    <attribute name="MaxIdleTimeoutPercent">1.0</attribute>
    </mbean>
    <!-- END MYSQL -->
    and JDBC tag is
    <!-- JDBC -->
    <mbean code="org.jboss.jdbc.JdbcProvider" name="DefaultDomain:service=JdbcProvider">
    <attribute name="Drivers">org.hsql.jdbcDriver,org.enhydra.instantdb.jdbc.idbDriver,com.pervasive.jdbc.v2.Driver,org.gjt.mm.mysql.Driver</attribute>
    </mbean>
    plz help me out
    thanks
    bhuwan

    I am just use that ...But it works...!!
    MySQL is Runing good ...
    the problem is that you must reset the defaultDS,
    to be Mysql.
    So,Jboss must have only one DefaultDS,
    In My Setup...
    1.standardjaws.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <jaws>
    <datasource>java:/mySQL</datasource>
    2.jboss.jcml (must changed as followed)
    <!-- JDBC -->
    <mbean code="org.jboss.jdbc.JdbcProvider" name="DefaultDomain:service=JdbcProvider">
    <attribute name="Drivers">org.gjt.mm.mysql.Driver</attribute>
    </mbean>
    <mbean code="org.jboss.jdbc.XADataSourceLoader" name="DefaultDomain:service=XADataSource,name=mySQL">
    <attribute name="PoolName">mySQL</attribute>
    <attribute name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl</attribute>
    <attribute name="Properties"></attribute>
    <attribute name="URL">jdbc:mysql://localhost/j2ee</attribute>
    <attribute name="GCMinIdleTime">1200000</attribute>
    <attribute name="JDBCUser" />
    <attribute name="MaxSize">10</attribute>
    <attribute name="Password" />
    <attribute name="GCEnabled">false</attribute>
    <attribute name="InvalidateOnError">false</attribute>
    <attribute name="TimestampUsed">false</attribute>
    <attribute name="Blocking">true</attribute>
    <attribute name="GCInterval">120000</attribute>
    <attribute name="IdleTimeout">1800000</attribute>
    <attribute name="IdleTimeoutEnabled">false</attribute>
    <attribute name="LoggingEnabled">false</attribute>
    <attribute name="MaxIdleTimeoutPercent">1.0</attribute>
    <attribute name="MinSize">0</attribute>
    </mbean>

  • Problem with Sun Java Creator JDBC driver .....

    Hi:
    I am new to Java Studio Creator. I am using Oracle Enterprise Edition 8.0.5.0 database to get data from. Through Servers Navigator->Data Sources, I define a new datasource using default JSC JDBC driver for Oracle. However, when I try to test the connection I get the following error.
    [sunm][Oracle JDBC Driver] Internal Error: Net8 Protocol Error
    Can someone tell me what is going on here? By the way I also have Netbeans 4.0 IDE which works fine with the same database.
    -Victor bagga

    I was using the following database URL.
    jdbc:sun:oracle://autoserv.cqtel.com:1521;SID=autosvdb
    The SID is valid because I can use other JDBC drivers such as Oracle's thin driver which uses the Database URL
    jdbc:oracle:thin:@autoserv.cqtel.com:1521:autosvdb
    and it works. However, I can not use the Oracle thin JDBC driver with Sun Java Creator as it seems to be incompatible. Using this driver I can successfully define a datasource and veiw all the data and make all kind of queries through the Server Navigator window but when I try to drop a database table on to a Data Table in my project, nothing happens. If I try to Edit the query on the rowset, the GUI window does not show any Column names and display names.
    By the way, I also have an Oracle 9.x database which works just fine with Java Ctreator Studio. I really like Java Creator as I find it very productive but not being able to make it work with Oracle 8.0.5.0 takes the fun out of it.

  • I needs to Display Tree With in the table, Please Help me

    I needs to display
    First Table, then inside the table tree, whenever I expand the tree then all the specified Childeren should display in another table.
    Please give me solution with example(code)
    this is simple Example
    A
    a1
    a11
    a12
    a13
    a2
    a3
    B1
    C1
    But I needs to display following format(that means with in the table)
    first step(Normal mode)
    A
    B
    C
    whenever I expand A(expand mode)
    A
    a1
    a2
    a3
    Whenever I expand a1 then(I needs to display this format) This is final Expand
    A
    a1
    a11
    a12
    a13
    a2
    a3
    B1
    C1
    Please Help me. This is very important for me. Because I am doing project. Please help me..with example

    maybe this,
    http://java.sun.com/products/jfc/tsc/articles/treetable1/index.html

Maybe you are looking for

  • Unable to see master data changes

    I added a new field as an Attribute to Master Data (Customer Number) and loaded the data which was successfull. I created an infoset and created a report but am unable to see the values in this new field. I check 'Values in the Infoprovider' on the r

  • JCo - asynchronous calling RFC

    As far as I know, there is possibility make asynchronous RFC call via JCo. How can I get return values from such calling? Is there some code example, please? Thanks.

  • Financial Reporting Chart - Waterfall or Step Chart or 2 Y-Axis chart?

    Using Hyperion Financial Reports 9.3.1.2 - How do you create a waterfall or step chart using a stacked bar chart in FR chart? I have created a waterfall or step chart as a stacked bar chart in Excel which shows the Budget figure on the left and the A

  • Tables in Service entry sheet

    Dear All, PLease guide me flow of the tables which are fetched at the time of ML81n. Thanks in advance.

  • HT201363 Please help me.thank you so much

    I forgot my answer of security questions with account Please help me to get it back.thank you so much <Email Edited by Host>