Problem with BigInteger and MySql

Hi !!
I've a problem with BigInteger and MySql.
I've a BigInteger object (suppose that value is 0.02270412445068359375).
I must store that value in a database (MySql).
The value of BigInteger object must be stored in a column of type Decimal.
Stored value is 0.022704124450683594. Why ??
My target is to store 0.02270412445068359375
Can anyone help me?
Thanks.

Hi !!
I've a problem with BigInteger and MySql.
I've a BigInteger object (suppose that value is
0.02270412445068359375).
I must store that value in a database (MySql).
The value of BigInteger object must be stored in a
column of type Decimal.if this is the case I fear you are SOL. a decimal is the same size as a double but with a fixed max number of decimal places. if it isn't big enough then you have no real choice other than to VARCHAR it.
Stored value is 0.022704124450683594. Why ??
My target is to store 0.02270412445068359375
Can anyone help me?
Thanks.

Similar Messages

  • Problems with JSP and MySql bean.

    Hi,
    I'm new to JSP and I'm having some problems with it. I'm trying to do a simple login where a java class (bean?) handles the SQL injektion. I have deployed the page on tomcat and it works fine, except that the sqlinjektion does basically nothing. I have installed the mysql driver. I think there is something wrong with the java class, or the way im calling it. It does not produce any error. But its like it would never actually process the java code, because ive tried to append things to error string to see what is going on, nothing happens. everything stay null, no exceptions are thrown. If I implement the code to JSP itself, it does load the driver and print exception that there is no connection to database (which is correct). What am I missing? Code follows:
    the sqlhandler:
    public abstract class SqlInjektor {
         private static String Database = "*****";
         private static String serverName = "localhost:3306";
         private static String usrName="******";
         private static String passw="******";
         * @return Connection
         public static Connection createConnection(String error){
              Connection mySqlCon = null;
              try{
                   Class.forName("com.mysql.jdbc.Driver").newInstance();
              catch(Exception E){
                   PrintWriter out = response.getWriter();
                   out.println("lol");
              String url = "jdbc:mysql://" + serverName + "/" + Database + "?user=" + usrName + "&password=" + passw;
              try{
                   mySqlCon = DriverManager.getConnection(url);
              catch (Exception E){
                   E.printStackTrace(System.out);
              return mySqlCon;
         * Metodi saa sy�tteen��n SQL komennon, jonka se suorittaa sek� palauttaa komennon tulokset.
         * @param command
         * @return ResultSet
         public static ResultSet querySQL(String command,String error, Connection con){
              ResultSet rs = null;
              try{
                   Statement stmt = con.createStatement();
                   rs = stmt.executeQuery(command);
              catch(Exception E){
                   E.printStackTrace(System.out);
              return rs;
    the jsp page:
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ page isErrorPage="false" %>
    <%@ page import="java.sql.*" %>
    <%@page import="ot3.User"%>
    <%@page import="ot3.SqlInjektor"%>
    <%@page import="Javax.servlet.jsp.*"%>
    <!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=ISO-8859-1">
    <title>vastaanotto</title>
    </head>
    <body>
    <%!      String id;
         String password;
         String error = new String("Error!\n");
         User user;
    %>
    <%      user = new User();
         session.putValue("currentUser",user);
         id = request.getParameter("authName");
    password = request.getParameter("Password");
         Connection conn=null;
         ResultSet rs=null;
         conn = SqlInjektor.createConnection(error);
         if(conn!=null){
              out.println("conn ok!");
              rs = SqlInjektor.querySQL("SELECT * FROM user WHERE id='" + id +"' AND password='" + password+"' COLLATE latin1_bin;",error,conn);}
         try {
              if (rs!= null && rs.next()){
                   user.setID(rs.getInt("id"));
                   user.setName(rs.getString("name"));
                   user.setPassword(rs.getString("password"));
                   user.setClearance(rs.getInt("clearance"));
                   if(rs.getString("addedby")!=null)
                        user.setAdder(rs.getInt("addedby"));
                   if(rs.getString("lastmodifier")!=null)
                        user.setModifier(rs.getInt("lastmodifier"));
                   rs.close();%>
                   ONNISTU!
              <%}
              else {
                   out.println(error);     
         } catch (SQLException e) {
              out.println(e.getMessage());
         }%>
    </body>
    </html>

    Hi,
    I'm new to JSP and I'm having some problems with it. I'm trying to do a simple login where a java class (bean?) handles the SQL injektion. I have deployed the page on tomcat and it works fine, except that the sqlinjektion does basically nothing. I have installed the mysql driver. I think there is something wrong with the java class, or the way im calling it. It does not produce any error. But its like it would never actually process the java code, because ive tried to append things to error string to see what is going on, nothing happens. everything stay null, no exceptions are thrown. If I implement the code to JSP itself, it does load the driver and print exception that there is no connection to database (which is correct). What am I missing? Code follows:
    the sqlhandler:
    public abstract class SqlInjektor {
         private static String Database = "*****";
         private static String serverName = "localhost:3306";
         private static String usrName="******";
         private static String passw="******";
         * @return Connection
         public static Connection createConnection(String error){
              Connection mySqlCon = null;
              try{
                   Class.forName("com.mysql.jdbc.Driver").newInstance();
              catch(Exception E){
                   PrintWriter out = response.getWriter();
                   out.println("lol");
              String url = "jdbc:mysql://" + serverName + "/" + Database + "?user=" + usrName + "&password=" + passw;
              try{
                   mySqlCon = DriverManager.getConnection(url);
              catch (Exception E){
                   E.printStackTrace(System.out);
              return mySqlCon;
         * Metodi saa sy�tteen��n SQL komennon, jonka se suorittaa sek� palauttaa komennon tulokset.
         * @param command
         * @return ResultSet
         public static ResultSet querySQL(String command,String error, Connection con){
              ResultSet rs = null;
              try{
                   Statement stmt = con.createStatement();
                   rs = stmt.executeQuery(command);
              catch(Exception E){
                   E.printStackTrace(System.out);
              return rs;
    the jsp page:
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ page isErrorPage="false" %>
    <%@ page import="java.sql.*" %>
    <%@page import="ot3.User"%>
    <%@page import="ot3.SqlInjektor"%>
    <%@page import="Javax.servlet.jsp.*"%>
    <!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=ISO-8859-1">
    <title>vastaanotto</title>
    </head>
    <body>
    <%!      String id;
         String password;
         String error = new String("Error!\n");
         User user;
    %>
    <%      user = new User();
         session.putValue("currentUser",user);
         id = request.getParameter("authName");
    password = request.getParameter("Password");
         Connection conn=null;
         ResultSet rs=null;
         conn = SqlInjektor.createConnection(error);
         if(conn!=null){
              out.println("conn ok!");
              rs = SqlInjektor.querySQL("SELECT * FROM user WHERE id='" + id +"' AND password='" + password+"' COLLATE latin1_bin;",error,conn);}
         try {
              if (rs!= null && rs.next()){
                   user.setID(rs.getInt("id"));
                   user.setName(rs.getString("name"));
                   user.setPassword(rs.getString("password"));
                   user.setClearance(rs.getInt("clearance"));
                   if(rs.getString("addedby")!=null)
                        user.setAdder(rs.getInt("addedby"));
                   if(rs.getString("lastmodifier")!=null)
                        user.setModifier(rs.getInt("lastmodifier"));
                   rs.close();%>
                   ONNISTU!
              <%}
              else {
                   out.println(error);     
         } catch (SQLException e) {
              out.println(e.getMessage());
         }%>
    </body>
    </html>

  • Problems with PHP and MySQLi server behaviors

    Hi,
    I'm a graphic and Web-designer with some knowledge of PHP and MySQL and I've been using Dreaweaver since very early ages in creating dynamic web projects and use the Bindings and Server behaviors quite a lot. But recently PHP has deprecated MySQL_connect since 2012 and it seems Dreamweaver isnt suporting the alternative MYSQLi server behaviors which will be the future of accessing Databases in MySQL along side with other options. Without this feature Dreamweaver is not of any use to us web-designers, since there are many Free great Editing software out there... Is the Dreamweaver team solving this problem? Or are you really planning on dropping this software? I've been using CS5.5 for a while and was planning on updating but this is a key feature and without it its not worth the investment.
    Kind regards.
    Eddy

    heduino wrote:
    Hi,
    I'm a graphic and Web-designer with some knowledge of PHP and MySQL and I've been using Dreaweaver since very early ages in creating dynamic web projects and use the Bindings and Server behaviors quite a lot. But recently PHP has deprecated MySQL_connect since 2012 and it seems Dreamweaver isnt suporting the alternative MYSQLi server behaviors which will be the future of accessing Databases in MySQL along side with other options. Without this feature Dreamweaver is not of any use to us web-designers, since there are many Free great Editing software out there... Is the Dreamweaver team solving this problem? Or are you really planning on dropping this software? I've been using CS5.5 for a while and was planning on updating but this is a key feature and without it its not worth the investment.
    Kind regards.
    Eddy
    There are no plans that I know of to introduce a new set of mysqli server behaviours into DW from Adobe. They have left that to  thrid party developers to bring out extensions which replace them.
    What the server behaviours could do was very limiting anyway so I suspect any replacement mysqli behaviours would also be very limiting. I personally jumped into thre code and started to write my own mysqli connection files and query strings by watching a few simple tutorials on youtube - it isnt that difficult.
    Look for 'php academy' on youtube - they have about 9 simple to follow tutorials on getting started with mysqli.

  • Problems with PreparedStatement and MySQL selecting bytes

    Hi,
    i have a problem trying to select information when the "select" has a byte restrict.
    The table in database is:
    CREATE TABLE `positions` (
    `PKID` int(10) unsigned NOT NULL auto_increment,
    `POSCODE` varbinary(30) NOT NULL,
    `ISWTURN` binary(1) NOT NULL,
    `QTT_GAMES` int(10) unsigned NOT NULL default '1',
    PRIMARY KEY (`PKID`),
    UNIQUE KEY `UNIQ_POS` (`POSCODE`,`ISWTURN`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    And the test code to get the qtt_games is :
    conn = DriverManager.getConnection (url,user,pwd);
    byte bcode[] = poscode.getByteArrayCode();
    // bcode is inserted ok in another preparedstatement...
    String query = "SELECT qtt_games FROM positions "+
         "WHERE poscode=? and iswturn=?";
    PreparedStatement pstmt = conn.prepareStatement(query);
    pstmt.setBytes (1,bcode);
    pstmt.setByte (2,poscode.getIsWhiteTurn()); //it returns a byte
    ResultSet rs = pstmt.executeQuery (query);
    When pstmt.executeQuery is reached, it's thrown the exception:
    com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=? and iswturn=?' at line 1
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:3170)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:3099)
    at com.mysql.jdbc.Statement.execute(Statement.java:695)
    at app.server.bbdd.MYSQLBDManager.getGamesBasicInfo(MYSQLBDManager.java:942)
    at app.server.bbdd.MYSQLBDManager.main(MYSQLBDManager.java:1068)
    Can anybody tell me what's wrong?? I think the query is ok, but don't know what's happening with this...
    Lots of thanks.

    Don't cross-post, it's considered rude:
    http://forum.java.sun.com/thread.jspa?threadID=5122604&messageID=9430056#9430056
    http://forum.java.sun.com/thread.jspa?threadID=5122603&messageID=9430050#9430050
    One to a customer, please.
    %

  • [JAVA] problems with java and mysql

    Hi, i have already installed php + mysql and work's them fine, but i want to install java + mysql. I have downloaded eclipse and installed its, that's ok. I have download tomcat and, that's ok. I have download module jconnector and have copied the file .jar in the java home and set classpath. Run and compiled this source that's ok. At runtime the program ask: Impossible connection at the database, why ? It's the source of program:
    [JAVA]
    import java.sql.*;
    public class connessione {
    private String nomeDB; // Nome del Database a cui connettersi
    private String nomeUtente; // Nome utente utilizzato per la connessione al Database
    private String pwdUtente; // Password usata per la connessione al Database
    private String errore; // Raccoglie informazioni riguardo l'ultima eccezione sollevata
    private Connection db; // La connessione col Database
    private boolean connesso; // Flag che indica se la connessione � attiva o meno
    public connessione(String nomeDB) { this(nomeDB, "", ""); }
    public connessione(String nomeDB, String nomeUtente, String pwdUtente) {
    this.nomeDB = nomeDB;
    this.nomeUtente = nomeUtente;
    this.pwdUtente = pwdUtente;
    connesso = false;
    errore = "";
    // Apre la connessione con il Database
    public boolean connetti() {
    connesso = false;
    try {
    // Carico il driver JDBC per la connessione con il database MySQL
    Class.forName("com.mysql.jdbc.Driver");
    // Controllo che il nome del Database non sia nulla
    if (!nomeDB.equals("")) {
    // Controllo se il nome utente va usato o meno per la connessione
    if (nomeUtente.equals("")) {
    // La connessione non richiede nome utente e password
    db = DriverManager.getConnection("jdbc:mysql://localhost/" + nomeDB);
    } else {
    // La connessione richiede nome utente, controllo se necessita anche della password
    if (pwdUtente.equals("")) {
    // La connessione non necessita di password
    db = DriverManager.getConnection("jdbc:mysql://localhost/" + nomeDB + "?user=" + nomeUtente);
    } else {
    // La connessione necessita della password
    db = DriverManager.getConnection("jdbc:mysql://localhost/" + nomeDB + "?user=" + nomeUtente + "&password=" + pwdUtente);
    // La connessione � avvenuta con successo
    connesso = true;
    } else {
    System.out.println("Manca il nome del database!!");
    System.out.println("Scrivere il nome del database da utilizzare all'interno del file \"config.xml\"");
    System.exit(0);
    } catch (Exception e) { errore = e.getMessage(); }
    return connesso;
    public static void main(String [] args) {
    connessione a=new connessione("asta","root","");
    if(a.connetti())
    System.out.println("Connessione al database riuscita");
    else
    System.out.println("Connessione al database non riuscita");
    [JAVA]

    With this line I always pass the username and password also:
    db = DriverManager.getConnection("jdbc:mysql://localhost/" + nomeDB);
    db = DriverManager.getConnection("jdbc:mysql://localhost/" + nomeDB, useName, Password);
    Make sure you create your users in MySQL with the correct permissions

  • Problems with java and mysql error: 1064

    Hello,
    I have been struggling with the following java code for a day. I ALWAYS get the following error code : 1064 and I just can't figure out why. I am trying to insert data into a mysql table.
    Can anyone please help?
    Thanks in advance,
    Julien.
    package com.newedgegroup.pnr.misc;
    import java.sql.BatchUpdateException;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    * @author Julien Martin
    public class RunDataCopy {
        public static void main(String[] args) throws ClassNotFoundException, Exception , ParseException {
            Class.forName("com.ibm.as400.access.AS400JDBCDriver");
            String url_source = "jdbc:as400://as400a.calyonfinancial.com";
            Connection con_source = DriverManager.getConnection(url_source, "upload", "upload");
            Class.forName("com.mysql.jdbc.Driver");
            String url_target = "jdbc:mysql://localhost:3306/pnr";
            Connection con_target = DriverManager.getConnection(url_target, "root", "");
            Statement stat_source = con_source.createStatement();
    //        ResultSet rs_source = stat_source.executeQuery("select * from QS36F.GMIST4F1 po");
            String query = "SELECT " +
                    " sum (po.PGROSS) AS OPTION_PREMIUM, " +
                    "po.PFIRM, " +
                    "po.POFFIC, " +
                    "po.PACCT, " +
                    "po.PTDATE, " +
                    "po.PRR, " +
                    "po.PEXCH, " +
                    "po.PSUBEX, " +
                    "po.PFC, " +
                    "po.PSYMBL, " +
                    "po.PCLASS, " +
                    "po.PSUBCL, " +
                    "po.PSUBTY, " +
                    "po.PSDSC1, " +
                    "po.PCTYM, " +
                    "po.PSTRIK, " +
                    "po.PCLOSE, " +
                    "po.PUNDCP, " +
                    "po.PCURSY, " +
                    "po.PEXPDT, " +
                    "po.PLTDAT, " +
                    "po.PMULTF, " +
                    "po.PPTYPE, " +
                    "po.PBS " +
                    "FROM QS36F.GMIST4F1 as po " +
                    "WHERE " +
                    "0              = 0 " +
                    "AND po.PFIRM   = 'I' " +
                    "AND po.POFFIC  = '349' " +
                    "AND po.PRECID in ('T','B','Q') " +
                    "AND po.PSUBTY != ' ' " +
                    "AND po.PCMNT1 != ' E' " +
                    "AND po.PCMNT1 != ' A' " +
                    "GROUP BY " +
                    "po.PFIRM, " +
                    "po.POFFIC, " +
                    "po.PACCT, " +
                    "po.PTDATE," +
                    "po.PRR, " +
                    "po.PEXCH, " +
                    "po.PSUBEX," +
                    "po.PFC, " +
                    "po.PSYMBL, " +
                    "po.PCLASS, " +
                    "po.PSUBCL, " +
                    "po.PSUBTY, " +
                    "po.PSDSC1, " +
                    "po.PCTYM, " +
                    "po.PSTRIK, " +
                    "po.PCLOSE, " +
                    "po.PUNDCP, " +
                    "po.PCURSY, " +
                    "po.PEXPDT, " +
                    "po.PLTDAT, " +
                    "po.PMULTF, " +
                    "po.PPTYPE, " +
                    "po.PBS ";
            // System.out.println(query);
            ResultSet rss = stat_source.executeQuery(query);
            StringBuffer sb = new StringBuffer("");
            SimpleDateFormat df_s = new SimpleDateFormat("yyyyMMdd");
            SimpleDateFormat df_t = new SimpleDateFormat("yyyy-MM-dd");
            con_target.setAutoCommit(false);
            Statement stat_target = con_target.createStatement();
            int i = 0;
            try {
                while (rss.next()) {
                    i++;
                    sb.append("INSERT INTO `pnr`.`pnr_transaction` (").append("\n");
                    sb.append("`FIRM_ID`,").append("\n");
                    sb.append("`OFFICE_NUMBER`,").append("\n");
                    sb.append("`ACCOUNT_NUMBER`,").append("\n");
                    sb.append("`SALESMAN`,").append("\n");
                    sb.append("`EXCHANGE_CODE`,").append("\n");
                    sb.append("`SUBEXCHANGE`,").append("\n");
                    sb.append("`FUTURES_CODE`,").append("\n");
                    sb.append("`SYMBOL`,").append("\n");
                    sb.append("`ACCOUNT_CLASS_CODE`,").append("\n");
                    sb.append("`SUB_CLASS_CODE`,").append("\n");
                    sb.append("`SECURITY_SUB_TYPE`,").append("\n");
                    sb.append("`SECURITY_DESCRIPTION_LINE`,").append("\n");
                    sb.append("`CONTRACT_YR_MON`,").append("\n");
                    sb.append("`STRIKE_PRICE`,").append("\n");
                    sb.append("`CLOSING_MARKET_SETTLEMENT_PRICE`,").append("\n");
                    sb.append("`UNDERLYING_CLOSE_PRICE`,").append("\n");
                    sb.append("`PRODUCT_CURRENCY_SYMBOL`,").append("\n");
                    sb.append("`EXPIRATION_DATE`,").append("\n");
                    sb.append("`LAST_TRADING_DATE`,").append("\n");
                    sb.append("`MULTIPLICATION_FACTOR`,").append("\n");
                    sb.append("`PRODUCT_TYPE_CODE`,").append("\n");
                    sb.append("`CATEGORY_ID`,").append("\n");
                    sb.append("`MARKET_TYPE_ID`,").append("\n");
                    sb.append("`TAX_STATUS_ID`,").append("\n");
                    sb.append("`AMOUNT`").append("\n");
                    sb.append(") VALUES (").append("\n");
                    sb.append("'").append(rss.getString("PFIRM")).append("'").append(",").append("\n");
                    sb.append("'").append(rss.getString("POFFIC")).append("'").append(",").append("\n");
                    sb.append("'").append(rss.getString("PACCT")).append("'").append(",").append("\n");
                    sb.append("'").append(rss.getString("PRR")).append("'").append(",").append("\n");
                    sb.append("'").append(rss.getString("PEXCH")).append("'").append(",").append("\n");
                    sb.append("'").append(rss.getString("PSUBEX")).append("'").append(",").append("\n");
                    sb.append("'").append(rss.getString("PFC")).append("'").append(",").append("\n");
                    sb.append("'").append(rss.getString("PSYMBL")).append("'").append(",").append("\n");
                    sb.append("'").append(rss.getString("PCLASS")).append("'").append(",").append("\n");
                    sb.append("'").append(rss.getString("PSUBCL")).append("'").append(",").append("\n");
                    sb.append("'").append(rss.getString("PSUBTY")).append("'").append(",").append("\n");
                    sb.append("'").append(rss.getString("PSDSC1")).append("'").append(",").append("\n");
                    sb.append("'").append(rss.getString("PCTYM")).append("'").append(",").append("\n");
                    sb.append(rss.getString("PSTRIK")).append(",").append("\n");
                    sb.append(rss.getString("PCLOSE")).append(",").append("\n");
                    sb.append(rss.getString("PUNDCP")).append(",").append("\n");
                    sb.append("'").append(rss.getString("PCURSY")).append("'").append(",").append("\n");
                    sb.append("'").append(df_t.format(df_s.parse(rss.getString("PEXPDT")))).append("'").append(",").append("\n");
                    sb.append("'").append(df_t.format(df_s.parse(rss.getString("PLTDAT")))).append("'").append(",").append("\n");
                    sb.append(rss.getString("PMULTF")).append(",").append("\n");
                    sb.append("'").append(rss.getString("PPTYPE")).append("'").append(",").append("\n");
                    //sb.append(rss.getString("PBS")).append(",");
                    sb.append("1").append(",").append("\n");
                    sb.append("1").append(",").append("\n");
                    sb.append("1").append(",").append("\n");
                    sb.append(rss.getString("OPTION_PREMIUM")).append("").append("\n");
                    // sb.append(df_t.format(df_s.parse(rss.getString("PTDATE")))).append(",");
                    sb.append(") ").append("\n");
                    System.out.println(sb.toString());
                    //     stat_target.executeUpdate(sb.toString());
                    stat_target.addBatch(sb.toString());
    //        stat_target.executeUpdate(sb.toString());
                    if (i == 2) {
                        break;
                stat_target.executeBatch();
                con_target.commit();
            } catch (BatchUpdateException be) {
                System.out.println("be: "+be.getErrorCode());
                System.out.println("be: "+be.getMessage());
                be.printStackTrace();
                System.out.println("be: "+i);
            } catch (SQLException se) {
                System.out.println("se: "+se.getErrorCode());
                System.out.println("se: "+i);
    }

    What is the error message?
    I advice you to use prepared statement for batch inserting.

  • Performance problems with JDBC and mysql

    Hi,
    I have here a "one table" database which has 1.000.000 data rows. The problem is, that deleting a special entry (ie delete from mytable where da_value="foo1") takes between 10 and 60 seconds.
    Does anyone can help me out of this performance trap.
    LoCal

    table indexed and keys used?
    always preferred postgres! :)

  • Problems with ACS4 and MySQL Server

    Hi,
    I am using acs4 with MySQL Server 5.0.67 as database under Windows. It all works fine except that very often I get a deadlock exception using the admin console.
    Here is what is logged in the admin.log:
    23 Apr 2009 12:20:15,231 TRACE DefaultSQLDatabaseRecordEnumerator: SELECT resourceid, voucherid, encryptionkey, permissions, defaultitem FROM resourcekey WHERE resourceid = ?
    23 Apr 2009 12:20:15,231 TRACE DefaultSQLDatabaseRecordEnumerator:   obj 1 = acc14cde-ea85-4f29-82ef-a771438bbcfc
    23 Apr 2009 12:20:15,262 ERROR DefaultSQLDatabaseConnection: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
    23 Apr 2009 12:20:15,262 TRACE DefaultSQLDatabaseConnection: rollback
    23 Apr 2009 12:20:15,262 ERROR AdeptServlet: database error [192.168.2.101]
    com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
        at com.mysql.jdbc.Util.getInstance(Util.java:381)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1045)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2554)
        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1761)
        at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2046)
        at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1964)
        at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1949)
        at com.adobe.adept.persist.DefaultSQLDatabaseConnection.deleteExpired(DefaultSQLDatabaseConn ection.java:479)
        at com.adobe.adept.shared.security.DistributorNonceUtil.checkNonce(DistributorNonceUtil.java :56)
        at com.adobe.adept.admin.servlet.ManagePersistent.doPost(ManagePersistent.java:291)
        at com.adobe.adept.admin.servlet.ManagePersistent.doPost(ManagePersistent.java:40)
        at com.adobe.adept.servlet.AdeptServlet.doPost(AdeptServlet.java:184)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.ja va:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Unknown Source)
    23 Apr 2009 12:20:15,278 TRACE AdeptServlet: request end http://...
    MySql is using InnoDB as storage engine.

    yes, you can do this via the admin gui by modifying the http listener port.
    You can also do this via the cli commandline as well http-listener-1 is the one you want to change the port for.
    http://docs.sun.com/source/817-6088/httpservice.html has details

  • Problem with storing and retriving a different langauge font in mysql

    hi,
    i have problem with storing and retriving a different character set in
    mysql database ( for example storing kannada font text in database)
    it simply store what ever typed in JTextField in database in the
    formate ??????????? and it showing ???????? .
    please what can i do this problem.
    thanks
    daya

    MySQL does not know about what type of Font you use or store. that is applicatioon specific. All it knows is the character set that you are storing and the data type and data. THere are something you should know when working with database and Java:
    1. make sure you know what character set is used for the database table.
    2. make sure you know what character set is used by Java (default to UTF-8 ..
    sort off - there are few character that it cannot save). You can enforce the
    character set being sent to the database by the String's getBytes(String charsetName) method.
    3. make sure the application you use to view the table use the correct character set
    if it use a different character set, then any character that it does not recogized
    will be replaced with a quetion mark '?'....eventhough the data is correct.

  • Problem with JFrame and busy/wait Cursor

    Hi -- I'm trying to set a JFrame's cursor to be the busy cursor,
    for the duration of some operation (usually just a few seconds).
    I can get it to work in some situations, but not others.
    Timing does seem to be an issue.
    There are thousands of posts on the BugParade, but
    in general Sun indicates this is not a bug. I just need
    a work-around.
    I've written a test program below to demonstrate the problem.
    I have the problem on Solaris, running with both J2SE 1.3 and 1.4.
    I have not tested on Windows yet.
    When you run the following code, three JFrames will be opened,
    each with the same 5 buttons. The first "F1" listens to its own
    buttons, and works fine. The other two (F2 and F3) listen
    to each other's buttons.
    The "BUSY" button simply sets the cursor on its listener
    to the busy cursor. The "DONE" button sets it to the
    default cursor. These work fine.
    The "SLEEP" button sets the cursor, sleeps for 3 seconds,
    and sets it back. This does not work.
    The "INVOKE LATER" button does the same thing,
    except is uses invokeLater to sleep and set the
    cursor back. This also does not work.
    The "DELAY" button sleeps for 3 seconds (giving you
    time to move the mouse into the other (listerner's)
    window, and then it behaves just like the "SLEEP"
    button. This works.
    Any ideas would be appreciated, thanks.
    -J
    import java.awt.BorderLayout;
    import java.awt.Cursor;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.SwingUtilities;
    public class BusyFrameTest implements ActionListener
    private static Cursor busy = Cursor.getPredefinedCursor (Cursor.WAIT_CURSOR);
    private static Cursor done = Cursor.getDefaultCursor();
    JFrame frame;
    JButton[] buttons;
    public BusyFrameTest (String title)
    frame = new JFrame (title);
    buttons = new JButton[5];
    buttons[0] = new JButton ("BUSY");
    buttons[1] = new JButton ("DONE");
    buttons[2] = new JButton ("SLEEP");
    buttons[3] = new JButton ("INVOKE LATER");
    buttons[4] = new JButton ("DELAY");
    JPanel buttonPanel = new JPanel();
    for (int i = 0; i < buttons.length; i++)
    buttonPanel.add (buttons);
    frame.getContentPane().add (buttonPanel);
    frame.pack();
    frame.setVisible (true);
    public void addListeners (ActionListener listener)
    for (int i = 0; i < buttons.length; i++)
    buttons[i].addActionListener (listener);
    public void actionPerformed (ActionEvent e)
    System.out.print (frame.getTitle() + ": " + e.getActionCommand());
    if (e.getActionCommand().equals ("BUSY"))
    frame.setCursor (busy);
    else if (e.getActionCommand().equals ("DONE"))
    frame.setCursor (done);
    else if (e.getActionCommand().equals ("SLEEP"))
    frame.setCursor (busy);
    try { Thread.sleep (3000); } catch (Exception ex) { }
    frame.setCursor (done);
    System.out.print (" finished");
    else if (e.getActionCommand().equals ("INVOKE LATER"))
    frame.setCursor (busy);
    SwingUtilities.invokeLater (thread);
    else if (e.getActionCommand().equals ("DELAY"))
    try { Thread.sleep (3000); } catch (Exception ex) { }
    frame.setCursor (busy);
    try { Thread.sleep (3000); } catch (Exception ex) { }
    frame.setCursor (done);
    System.out.print (" finished");
    System.out.println();
    Runnable thread = new Runnable()
    public void run()
    try { Thread.sleep (3000); } catch (Exception ex) { }
    frame.setCursor (done);
    System.out.println (" finished");
    public static void main (String[] args)
    BusyFrameTest f1 = new BusyFrameTest ("F1");
    f1.addListeners (f1);
    BusyFrameTest f2 = new BusyFrameTest ("F2");
    BusyFrameTest f3 = new BusyFrameTest ("F3");
    f2.addListeners (f3); // 2 listens to 3
    f3.addListeners (f2); // 3 listens to 2

    I've had the same problems with cursors and repaints in a swing application, and I was thinking of if I could use invokeLater, but I never got that far with it.
    I still believe you would need a thread for the time consuming task, and that invokeLater is something you only need to use in a thread different from the event thread.

  • Problem with installing and running some applications or drivers

    When installing and installing some items, towards the end of the installation I get this message:
    /System/Library/Extensions/comcy_driver_USBDevice.kext
    *was installed improperly and cannot be used. Please try reinstalling it or contact product's vendor for update*
    The end result is that some things do not seem to work properly, such as my HP printer. Would anybody have any ideas on how to fix this problem?

    Thank you for your response. Originally, I had a problem with Airport and ended up reinstalling Snow Leopard. Since then, when downloading upgrades etc, such as HP printer drivers, iTunes etc., towards the end of the download when its running the script, I get this message: /System/Library/Extensions/comcy_driver_USBDevice.kext
    +was installed improperly and cannot be used. Please try reinstalling it or contact product's vendor for update+
    Sometimes, the download hangs and is unable to complete. The main problem I've encountered so far with an application is when I use the printer to scan an image via Preview, it's blank: there's nothing there.

  • Problems with outlook and address book contacts: my outlook contacts had around 3,000 entries. Outlook duplicated by itself and now outlook and address book have each over 340,000. What should I do?

    Problems with outlook and address book contacts: my outlook contacts had around 3,000 entries. Outlook duplicated entries and have now 340,000. I reinstalled microsoft office and, thus, outlook, and reinstalled mac OS X system and applications. While I managed to delete outlook contacts so that I can re-sync with my blackberry, the contacts at Mac Address Book were not deleted and still have over 340,000 entries. I do not mind deleting all contacts since I have back up, but I have not been able to delete them. Also, when I go at Address Book and try to delete or merge duplicated entries, the system takes forever and never ends because of such large amount of entries. Worse, when I do so I run out of RAM memory.
    My Macbook pro is just 2 months old.
    What should I do? Is there a way to delete my Mac Address Book without having the problem above?
    Many thanks
    Regis

    zlatan24 wrote:
    For solving out troubles connected with corrupted or lost address book you may use address book recovery. It owns various features such as restoring wab files, it working under any Windows OS. The utility has modern and easy to use interface due to almost every experienced users.
    If it is a windows problem it's not going to run on the OP's MacBook Pro

  • Problems with Safari and Firefox (HTTP?)

    Problems with Safari and Firefox (HTTP?)
    On a laptop G4, 10.5.8 and Safari 5.02 I experience the following:
    On the account of my oldest daughter everything works fine, i.e. wireless internet works and no problems with mail or safari.
    On the same laptop, on the account of my other daughter, the wireless is OK, she can mail etc. But safari nor firefox works. It says: can’t find server (whatever site) and in the activity window it looks if safari tries to open files (in the safari preferences-folder) in stead of http. Same applies to Firefox, so maybe it has more to do with HTTP in general?
    What goes wrong? What to do? I tried the following on the host terminal (tips from Apple)
    defaults write com.apple.safari WebKitDNSPrefetchingEnabled -boolean false
    and
    defaults delete com.apple.safari WebKitDNSPrefetchingEnabled
    but that did not help,
    Nanne

    I'm still wondering why it happens now at this moment in time...
    PC does seem to be a bit odd & inconsistent, the few times I've tested with it, at least so far as we content filtering goes; and if I remember rightly, you're not the first to report previously ok settings suddenly preventing some or all internet until pc is switched off altogether.
    It may work when re-enabled

  • Haven't been able to use pages for a while.  Keep getting following message.  Have tried reinstalling iWork, but no luck.  Same problems with Keynote and Numbers/Users/scottmcdonald/Desktop/Screen Shot 2012-03-14 at 9.39.52 PM.png

    Haven't been able to use pages for a while.  Keep getting following message.  Have tried reinstalling iWork, but no luck.  Same problems with Keynote and Numbers/

    Have you moved Pages from its installed location? Or just dragged a copy to your current system?
    It can't find some of its resources apparently.
    Peter

  • Problem with DMGs and error: "No Mountable File Systems"

    Problem with DMGs and error: "No Mountable File Systems"
    The files are not corrupt. The problem is occurring with all DMGs that are apparently formatted in MS-DOS FAT16. No the file will not mount with Disk utility or any other disk mounter programs I have found.
    This is now the second time this occurred and now effects my MBP and my iMac. First time i spent days with Apple support and the only solution was ultimately back up the data, reformat the HD, start over from scratch and reload everything. That lasted about a month before the problem resurfaced and is now an issue on both iMac and MBP.
    I tried to identify all the programs I installed immediately before the error, as I am convinced it is the result of a software conflict.
    Recent programs includes:
    1) upgrading from Parallels 5.5 to 6.0 on both machines.
    2) using an HP secure II usb drive and setting up a secure disk.
    3) installing new itunes 10
    4) new update to Flip For Mac.
    The files affected are downloaded dmgs, including personal brain and google earth, both which are formatted in FAT16.
    Any help or thoughts? Apple has now spent hours trying and they say i now have to reformat and wipe and start over. That is unacceptable and based on pasted experience the problem is likely to repeat itself. having to wipe and rebuild a HD ever month is not an solution. i need to fid the root problem.
    In the meantime, anyone got a real solution on how to extract the data for a DMG using a different method?
    Message was edited by: remaia

    Where you able to find the solution, i am having the same problem, all was fine till i install some programs only same one i saw did we both did was flip4mac i uninstalled it but the problem is still there, i also restored and erased the hardrive but im not up to doing that all over again. If you found anything out let me know i would greatly appreciate it

Maybe you are looking for

  • Regarding Matrix Report Issue in (RTF Template)

    Hi, We are developing the new report in XMLP (Matrix Report) and this is new stuff for us in XMLP. we dont have any material to explore about how to apply matrix report concepts in RTF Template. We have tried with some xml data with the RTF file but

  • Labview program interface

    Dear all,  I have a some problem in running my labview program. I intention is to generate an output voltage by using my machine (by Nanonis), thus I am using their program in Nanoinis program interface. However, I might have make some connection wro

  • Calling Java Function with Return as String []

    Hi, I have written the following code. It's not compiling OK. DECLARE TYPE Tokens_Type IS VARYING ARRAY(20) OF VARCHAR2(20); s1 Tokens_Type DEFAULT NULL; SQL_STR VARCHAR2(2000) DEFAULT NULL; BEGIN SQL_STR := 'CREATE OR REPLACE FUNCTION Schema1.SPLIT_

  • Determination Idoc Control data - Outbound

    Hi Guru's I would like to know how to get the idoc control data, like receiver port and receiver partner. For example: I have an ABAP program which collects the IDOC data at the end I want to send out the IDOC, but what is the best way to determine t

  • WD Abap - get system (windows) user

    hi folks, is it possible to get the system user (e.g. windows user) when running a webdynpro abap application? kind regards, oliver