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

Similar Messages

  • 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.

  • 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.

  • 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.
    %

  • 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>

  • 10.5.2 problems with SMB and Linux server

    I'm encountering a problem with trying to copy files to a Linux server via SMB. When I copy a file to a Linux server (via SMB), it shows the file copying, but then the file disappears from the server when it is done copying. There is also something odd on the server side where it tries to rename everything to be in lower case.
    I did not have this problem with Tiger, but I've noticed this issue on Leopard. I have tried several different machines, and all of the Leopard machines exhibit this problem.
    I then tried copying the same exact file to a Windows server via SMB -- no problem.

    I tried an experiment. I duplicated a file (MyFile.zip) and renamed it to all lower-case: myfile.zip. I tried copying MyFile.zip to the server. It copied and then disappeared. I then tried copying the lower-case file myfile.zip, and it copied fine. It appears that this is an issue with how the server is trying to handle filenames and transform everything to lowercase.

  • [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.

  • Problem with JSR188 and Application Server 8.2

    Hi there,
    I'm trying to integrate a CC/PP profile in the SOAP's Header in order to apply adaptation logic in a Web Service. An error occurs when the service tries to validate the client's Profile.
    To be more specific, when the line:
    ProfileFactory pf = ProfileFactoryImpl.getInstance();is called in order to create the profile instance, the exception:
    java.security.AccessControlException: access denied
    is thrown (in the server's log file) by the server.
    For the manipulation of the CC/PP I've used the example code that is located in the:
    http://developers.sun.com/techtopics/mobility/midp/articles/ccpp/
    When the same code in executed as a stand-alone application it runs normally.
    Thanks,
    Stavros.

    Hi,
    Give only asadmin> start-domain
    it works! If you want to see what are the commands you can use with asadmin
    try asadmin>help
    MJ

  • 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! :)

  • Update problems with catalyst and xorg-server

    /etc/pacman.conf
    [catalyst]
    Server = http://catalyst.apocalypsus.net/repo/catalyst/$arch
    $ pacman -Syu
    :: catalyst-utils: benötigt xorg-server<1.12.0
    $ pacman -Si xorg-server
    Repositorium         : extra
    Name           : xorg-server
    Version              : 1.12.0-1
    Mmmmh ...
    Ranomier

    pacman.conf
    #[...] standart stuff
    #yaourt repos
    [archlinuxfr]
    Server = http://repo.archlinux.fr/x86_64
    #catalyst repos
    [catalyst]
    Server = http://catalyst.apocalypsus.net/repo/catalyst/$arch
    #EOF
    Updating
    $ pacman -Syu
    :: Synchronizing package databases...
    core is up to date
    extra is up to date
    community is up to date
    multilib is up to date
    archlinuxfr is up to date
    catalyst is up to date
    :: Starting full system upgrade...
    resolving dependencies...
    looking for inter-conflicts...
    error: failed to prepare transaction (could not satisfy dependencies)
    :: catalyst-utils: requires xorg-server<1.12.0
    Information about the required package
    # LC_ALL=C pacman -Si xorg-server
    Repository : extra
    Name : xorg-server
    Version : 1.12.0-1
    URL : http://xorg.freedesktop.org
    Licenses : custom
    Groups : xorg
    Provides : x-server
    Depends On : libxdmcp libxfont udev libpciaccess libdrm pixman libgcrypt libxau
    xorg-server-common xf86-input-evdev
    Optional Deps : None
    Conflicts With : nvidia-utils<=290.10
    Replaces : None
    Download Size : 1273.11 KiB
    Installed Size : 3818.00 KiB
    Packager : Andreas Radke <[email protected]>
    Architecture : x86_64
    Build Date : Mon Mar 5 07:00:50 2012
    MD5 Sum : 499b6f00f70cab6f75d0cea349b69fd6
    SHA256 Sum : 0d9a4a50770912e8d90b21ffe9dbb0d83d58e60598088d55881000fccf1e87e2
    Signatures : Yes
    Description : Xorg X server
    But in the repos IS the 1.12.x package of xorg-server
    wondering, ok then i take these repos
    Last edited by Ranomier (2012-03-13 18:42:18)

  • Problems with apache and application server

    Hi there,
    I got apache running on the same port as the application server. Each time I want to start the application server or make it work (without displaying the 404 page or an search engine) I have to shut down my apache server!
    Is there a way I can change the port of the application server so that I can run both at the same time ?
    I have J2EE 1.4 version
    Thanks in advance
    Rik

    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.

  • How do I get connected to a server on my network via an IP address?  When I try to open in a URL and login as a registered user with proper login it errors out saying there was a problem with connecting to the server?

    I am new to Mac...How do I get connected to a server on my network via a hyper link IP address path?  When I try to open in a URL and login as a registered user with proper login it errors out saying there was a problem with connecting to the server?

    Some of the following is going to use some technical terms — this area is inherently somewhat technical. 
    If you don't understand some part of the following reply, please ask.
    Is this your own OS X Server system on your own network, or is this some other server within some larger organization? 
    You're posting this in the OS X Server forum, which is a software package that allows OS X systems to provide web-based and many other services; to become servers.
    If it's your OS X Server on your network, then the network and DNS configurations are suspect, or the server is somehow malfunctioning or misconfigured.   This is unfortunately fairly common, as some folks do try to avoid setting up DNS services.
    If it's a larger organization and somebody else is managing the server and the network, then you'll probably need to contact the IT folks for assistance; to learn the network setup and DNS requirements, and if there's a problem with the server itself.
    The basic web URL "hyper link IP address path" — without using DNS — usually looks something the following, where you'll need to replace 10.20.30.40 with the IP address of your server:
    http://10.20.30.40
    UptimeJeff has posted a URL that specifies the AFP file system; an OS X file share.  That's used if you're connecting to an Apple storage service somewhere on your network.  You might alternatively need to specify smb://10.20.30.40 or such, if it's a Windows file server.  (There can be additional requirements for connecting to Windows Server systems, too.)
    If there's local IT staff available here, please contact them for assistance.  If these are your own local systems and your own local OS X Server system, then some information on the server will be needed.  (If you're on a NAT'd network, you'll also need to get DNS services configured and working on your local OS X Server system and your network — you'll not be able to skip this step and reference ISP DNS servers here — or things can and usually will get weird.)

  • 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

Maybe you are looking for

  • Apps wont update (terms and conditions)

    Okay so, when i go to the app store, it all seems fine but when i go to the updates there is a picture of the app and all the text is blue, and underlined, like a link. When i go into the updates, and i press update all it says terms and conditions h

  • Gc buffer busy wait in rac

    HI, I am facing a problem of gc buffer busy waits and log file switch completion on my live rac database of two nodes. Thank you for your cooperation. Regards, Adnan Hamdus Salam

  • Group above and left classic reports

    how can i group above and left in an existing classic reports? is there any document around here please share it to me.

  • JDBC Sync - RFC Sync Scenario without BPM

    Hi Experts, I am using JDBC - RFC - JDBC Scnario. The concept is JDBC is reading data from tables and send data to RFC, after updating RFC is giving response to JDBC to update its tables. JDBC - RFC - JDBC. Is it possible to do this scnario without u

  • Duplicate check for Contracts

    Dear Gurus, While creating Contracts, we would like to put a duplicate check for the Contracts. Currently, the system allows us to create a duplicate Contract for the same Vendor, Material, Validity period, etc. Please suggest if there is a way to ha