Problems with recordset in PHP/MySQL setting

We use Dreamweaver CS5 for creating dynamic pages (PHP pages with MySQL database). We test the site locally on a Windows 7 operating system with EasyPHP as WAMP server.
We often have a problem in managing the record set.
The following problem occurs quite often:
We take a PHP page. We create a recordset. We use a dynamic table or a repeated region to show the results of the recordset. So far so good.
Then we want to change something to the recordset for example the filter. When editing the recordset, the advanced mode is shown, it is impossible to swith to the simple mode.
By deleting the recordset the problem is not solved. By deleting and afterwards rebuilding the recordset, syntax errors occur. It seems that the php code for building the recordset didn't dissapear.
The only solutions till now seems to completely restart with a new PHP page.
Anyone has a solution for this or anyone did experience the same problem ?
Thank you very much in advance.
Ilse 

You cannot switch to Simple mode in the Recordset dialog box if you have made any changes to the SQL in Advanced mode.
Opening the Recordset dialog box to edit the settings does occasionally result in the code being inserted again instead of being changed. This appears to be an intermittent bug, which I have experienced myself, and know that others have complained about it, too. As far as I know, there is no solution other than to watch carefully the code that Dreamweaver generates.
If you don't understand the code, you would be well advised to learn what it means and does. Relying on Dreamweaver to do everything for you severely limits what you can do with PHP/MySQL. Adobe regards the server behaviors as quick prototyping tools, rather than for developing production websites.

Similar Messages

  • I'm having problems with iPhoto and the facebook set-up.  Every time I attempt to do so it says an error has occured and try again later.  I have not seen a solution posted.  Therefore, how does one contact Apple to solve the problem?  I'm new to the worl

    I'm having problems with iPhoto and the facebook set-up.  Every time I attempt to do so it says an error has occured and try again later.  I have not seen a solution posted.  Therefore, how does one contact Apple to solve the problem?  I'm new to the world of iMac but I find it a bit frustrating trying to solve basic issues/problems:(

    For what it's worth, you posted this in 2011, and here in 2014 I am still having this same issue. Over the last two days, I have had to unlock my apple account 8 times. I didn't get any new devices. I haven't initiated a password reset. I didn't forget my password. I set up two factor authentication and have been able to do the unlocking with the key and using a code sent to one of my devices. 
    That all works.
    It's this having to unlock my account every time I go to use any of my devices. And I have many: iMac, iPad, iPad2, iPad mini, iPhone 5s, iPod touch (daughter), and my old iPhone 4 being used as an ipod touch now.  They are all synced, and all was working just fine.
    I have initiated an incident with Apple (again) but I know they are just going to suggest I change my Apple ID. It's a simple one, and one that I am sure others think is theirs. I don't want to change it. I shouldn't have to. Apple should be able to tell me who is trying to use it, or at least from where.
    Thanks for listening,
    Melissa

  • Performance problem with recordset object

    Hi,
    I have a performance problem with record set object. Is it true using RecordSet object as argument to the method will cause any perfomance degradation?
    here is my code.
    finStmtList = selectFinancialStatements(rs, shortFormat, latestOnly, true);
    I changed the code by populating the recordset in the method that called the above statement. previously the population of valueobject is within the select FinancialStatements.
    Now the method looks like
    finStmtList = selectFinancialStatements(ValueObject, shortFormat, latestOnly, true);
    Is this fix will result in any performance gain?

    Can any one suggest me that the above RecordSet Object contains large number of records that counts up to 1000 rows and having 30 columns? I tested the application. But the performance varies from time to time.
    Is there any other way to fine tune it?

  • Problems with recordset paging and dynamic menu displaying all the options

    Hi hope someone can help on this - I've posted the code on the FoEd Backend Blight - with no takers/success yet -
    I've created a jobs page using DWCS3 which has a dynamic drop down menu filtering the 'countries' that jobs are located in.  When I introduce a recordset page only those countries associated with the jobs on that particular page are shown in the dynamic menu above, not all of the countries listed in the database. When I get to the second page of results - again - only those jobs' countries are shown in the menu (and not the previous pages/next pages as well).
    I'd clearly like a user to be able to select from the menu of countries available for all the jobs in the database, and not just those on the page.  Any ideas?
    On a similar strain - my country menu/filter is wrapped up in a form above the list of jobs.  On loading the page, only the search and menus appear.  No jobs are shown until I hit submit.  Is there a way to have all the jobs display on first load, and then for the search/menu filter to work on the displayed jobs. I've tried altering the variables on the search to 1 from -1, and other options but I can't seem to get a page of content on first load.
    I'd really appreciate any pointers on the above, as this would help solve the final stage of my project. The full post and code can be seen on the friendsofed website under backend blight.
    Many thanks in advance.
    Matt

    I'm still stuck on getting the page to load with some actual content, however.  I'm just getting the search box and country filter displaying on first load.
    Pages 584-6 explain why you get nothing when a page first loads. Dreamweaver sets the default value to -1. The problem with trying to change the default value even to an empty string or % is that Dreamweaver's security function, GetSQLValueString() changes an empty string to NULL and wraps % in quotes, so neither will work.
    One way to display all records when the page first loads is to create another recordset that selects all records. Wrap the code in a conditional statement that checks whether the $_GET array contains any values:
    if (!$_GET) {
      // recordset to retrieve all records here
    This means that you need two repeat regions to display the results. Wrap both of them in conditional statements:
    if (isset($fullRecordsetName)) {
      // display the full recordset
    } elseif (isset($searchResultsRecordsetName)) {
      // display the search results
    You also need to wrap the mysql_free_result() statements in conditional statements at the end of the page:
    if (isset($fullRecordsetName)) mysql_free_result($fullRecordsetName);
    if (isset($searchResultsRecordsetName)) mysql_free_result($searchResultsRecordsetName);
    Another way to do it is to use just one recordset, but split the SQL query into two sections:
    $query_RecordsetName = "SELECT * FROM myTable";
    if (isset($_GET['searchTerm')) {
    $query_RecordsetName .= sprintf(" WHERE searchTerm LIKE %s",
         GetSQLValueString("%" . $colname_RecordsetName . "%", "text"));
    This uses the combined concatenation operator to add the WHERE clause to the query only if $_GET['searchTerm'] has been set. Notice that you need a space before the "WHERE".

  • Problem with recordset structure sequence

    Hi,
    I have a problem with my file cotent conversion.
    When i specify my recordstructure sequence as R1,1,R2,*
    the file is picked up but cannot be seen in MONI.
    but when i specify as R1,1,R2,2(OR 3 OR 4)
    The file is processed and seen in MONI.
    But when i give * to any of the records processing in XI fails..
    Please let me know wht must be going wrong
    Regards
    Venkat

    Venkat,
    I tried with your file and i am receiving the xml after conversion in sxmb_moni without any problem (no matter the file size )
    Can you try the following for your file,
    Recordset name : Details
    Recordset str. : Header,1,Body,*
    Key field name : field2
    Content conversion
    Header.fieldFixedLengths     3,2,10,27,8,8,8
    Header.fieldNames     field1,field2,field3,field4,field5,field6,field7
    Header.keyFieldValue     01
    Body.fieldFixedLengths     3,2,40,110,15,2
    Body.fieldNames     field1,field2,field3,field4,field5,field6
    Body.keyFieldValue     02
    ignoreRecordsetName     true
    ~ShaBZ~

  • Problems with installing coldfusion mx and setting up CF for home practice

    problems with installing coldfusion mx:
    hello,
    i have some books of cf.
    i need to start on my tutorials
    however,
    they said the prereq is mx server
    home site,
    1. i did download mx 7 and chose mx developer edition.
    my problem is that when it is self configure. (the second
    option without apache or iis)
    it is reall taking a long time to configure 2hrs. i did not
    let it finish so i stopped the process.
    what am i doing wrong in the set up process.
    2. do i need apache to run CF. if so i did go to apache .org
    and went to a mirror site. but i dont know which one to down load.
    any tips?
    3. can i run my tutorials with out apcahe or IIS?
    4 . the book also mentioned homesite / dreamweaver as a
    editor.
    where and how can i put this in my personal PC?
    i really appreciate your help in advance
    i am really eager to learn so i can develop for my work, i
    figure if i get a head start at home, i wont have to rely on
    others.
    thanks if someone can help me set up CF at home.

    i got a copy from a disc today and i installed it.
    i think this one is good.
    i also have apcahe 2.0 together in a cd.
    i need a walk through on both
    mx 7 and apache 2.0 for installing and configure.
    can you help me?

  • Problems with connection from PHP to Oracle DB

    Hello,
    I have a Win2k3 Server with IIS 6.0 and PHP 5.1.2. and an Oracle Client 9i installed.
    Recently I tried to connect via PHP to the DB but it failed with the following message:
    "Warning: ocilogon() [function.ocilogon]: OCIEnvInit() failed. There is something wrong with your system - please check that ORACLE_HOME is set and points to the right directory in ...\php-skript\test\funk_test.php on line 54"
    So I started looking in the internet for help and found a lot, but nothing that solved my problem. I tried everything (I think):
    * Oracle Client 9i regular Client- environment vars in all variations
    * Oracle Client 10g Instant Client- all variations again
    * I tried to delete all spaces in the "tns.ora" after a hint in another PHP-forum
    * I looked in this forum and found some hints
    BUT: Nothing helped me to solve my problem.
    So I changed my PHP-version from 5.1.2 to 5.0.4 and I got a different failure:
    "[26-Apr-2006 17:58:15] PHP Warning: ocilogon() [<a href='function.ocilogon'>function.ocilogon</a>]: _oci_open_server: ˜Õ‚ in ...\php-skript\test\funk_test.php on line 56"
    This message is really strange, because it contains no information about the failure.
    Has ANYONE another hint for me?? I really don't know what I should do.

    Because it's IIS, I set the env vars manually. That means --> my computer/.../advanced/environment vars/etc.
    After every change, I rebootet the IIS Service. Problem consists.
    Let's have a look, if your links could help...
    ########## EDIT ##########
    Ok, your links WERE INDEED REALLY helpful!
    My problems were caused by missing access-rights.
    How to solve this problem:
    * reinstall your Oracle-client
    * inet-user needs now access rights for
    + "oracle"- folder
    + "oracle\bin"- folder
    + "tnsnames.ora"- file
    * set environment vars
    + NLS_LANG = AMERICAN
    + ORACLE_HOME = "C:\oracle\ora92"
    + TNS_ADMIN = "C:\oracle\ora92\network\ADMIN"
    * restart IIS
    Now it should work!!! THX for your help!

  • Problems with flex and php.

    Hello, my name is Gamaliel Arredondo, i have to develope a project in flash builder 4 using the data service to connect with php, the application has installed the zend framework automatically just like the tutorials said, I use xampp and i have the files in the htdoc location, all the path are correct but when i want to connect to my php classes i receive this message:
    Make sure that Zend Framework is installed correctly and  the parameter "amf.production" is not set to true in the amf_config.ini file  located in the project output folder.     /0/onResultÿÿÿÿ � Uflex.messaging.messages.AcknowledgeMessage correlationId clientId destination messageId timestamp timeToLive headers  body I797BFBCC-250A-A100-9954-68CD2AC82DF5 I2570DA6E-2F76-55E9-2249-000075B2C293  I590AA123-C3CE-5F48-6A94-00002F9B370A  126571301000      ‡G
    I have searched on internet in order to find a solution but i haven't found anything that can help me, so i would like to receive some of help, my email is [email protected], if you can help me i will thank you so much, have a nice day.

    Hello, I am Gamaliel Arredondo, i have solved this problem, the error is in the code, you have a mistake in your code, check it out.
    The way to run the flex applications, in my case, i installed xampp, in the htdoc directory i put the folder with the files of the application and all is working very well, only when the apache is running because if it is stoped the application show error, please review your code and if you have problems you can contact me by e-mail ([email protected]) i also fought with that problem but i could find the solution, i hope to help you.

  • Problems with prepared statement in MYSQL.

    I 've this code:
    String sql = "UPDATE dcr SET Fecha=?, Origen=?, Destino=?, Mensaje=?, Estado=? WHERE IDDCR=? AND IDUsuario=?";
    PreparedStatement st = cn.prepareStatement(sql);
    SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
    java.sql.Date sqlDate = java.sql.Date.valueOf(fmt.format(this.fecha));
    st.setDate(1, sqlDate);
    st.setString(2, this.origen);
    st.setString(3, this.destino);
    st.setString(4, this.mensaje);
    st.setString(5, this.estado);
    st.setString(6, this.primaryKey);
    st.setString(7, this.usuario);
    I receive a SQLException with this message "Callable statments not supported" when the line "PreparedStatement st = cn.prepareStatement(sql)" is executed.
    My JDBC Driver is "mysql-connector-java-3.0.11-stable-bin" and my server is "*MySQL 4.0.17-max"*.
    Anybody see where is the problem?
    Tnaks in advance.
    Ricardo.

    I've more information about this problem.
    If I take my code and put it in a class with a main function it works fine.
    The original code is a part of a DAO pattern object that is invoked by a servlet (is the storeObject function).
    The servlet create a record, send a native TCP/IP transaction to a external system and whit this code update the record previously created with the result of the transaction.
    The system uses connection pooling. But the conection used in create of the record is diferent from the used in this code. (It's returned to the Datasource) All objects of the database process are closed in a finaly block before return the connection. (Statements, PreparedStatements , ResultSets, etc...)
    Thanks in advance.
    Ricardo

  • PHP - MySQL - SET column

    In my sql database I have a set column that works fine.  The user can select multiple options.  However, I am having trouble displaying those options using the record set in dreamweaver.  I want the recordset to find any one of the possible options and display the record, but it's not displaying anything.  Am I missing something here?

    OK, my bad. So a SET is sort of a user defined datatype, where the developer sets the allowable values of the column?  The thing that troubled me is that the example the reference guide gives shows it being used to store multiple values as in the last line here:
    For example, a column specified as SET('one', 'two')         NOT NULL can have any of these values:
    'one'
    'two'
    'one,two'
    So that's not really a problem inherent in a SET column, just a way that it can be misused like any other string column.
    David_Powers wrote:
    bregent wrote:
    I'll just put in my $0.02 that +99% of the time using a SET to store more than one piece of data in a database field is a bad idea. It violates rules of normalization and makes data analysis very difficult.
    Not really. A SET column in MySQL doesn't violate the rules of normalization. It's actually a shorthand way of creating a lookup table - or a linking table, since it creates a many-to-many relationship. Internally, MySQL simply stores a numerical reference to each value. In other words, behind the scenes it's storing a bunch of foreign keys.
    The way you search for a particular option stored in a SET column is to use the MySQL function, FIND_IN_SET().
    SELECT * FROM mytable
    WHERE FIND_IN_SET('whatever', column_name)

  • Read/Write problems with multiple connections using MySQL & Tomcat

    hello all,
    I am developing a web-based java application that runs on a 4.1 tomcat server and uses MySQL 3.23.52 as db server.
    this program uses hundreds of tables with hundreds of rows each.
    when two or more users are connected, we are experiencing several problems:
    1. when a query is started, they get cross-results that come from both connections.
    2. when inserting/updating (most queries are long and take a few seconds), sometimes data are crossed too, sometimes they are saved incorrectly but get no error message, sometimes they are not saved and get 'null pointer' sqlexception (but tables and queries are correct).
    3. using SHOW PROCESSLIST and SHOW STATUS, we saw that MySQL server hosted no more than 3 max_used_connections, even when my.cnf parameters where set with more. when 3 or more users try to access the database, they get a bad handshake error until other connections are freed.
    any suggestions?
    thanks
    alessandro bonanni
    university of udine

    I am not using a connection pool. I read that when two different connections try to access the same data simultaneously, mysql is not secure. maybe a connection pool could solve that? or maybe is it a mysql limit?
    alessandro

  • Problem with CMP bean and MySQL: please help me!!!

    Hi,
    I am using J2EE Sun server 1.3 and Mysql 4.0 database with its MySQL Connector/J 3.0.
    The driver connection to the database is fine since "Generate Default SQL" in deploytool gives "SQL generation complete".
    However, I can't have a simple row with one text field called test being created in my mysql table called test.
    Of course , the mysql server is started and the test table set for use.
    Here is my code (I try to access my database from a servlet using a CMP Entity bean):
    try{
    Context initial = new InitialContext();
    Object objref = initial.lookup(EntityHome.JNDI_NAME);
    EntityHome home = (EntityHome)PortableRemoteObject.narrow(objref,EntityHome.class);     
    Entity test= home.create("zob");               
    /*EntityHome home = (EntityHome)PortableRemoteObject.narrow(objref,EntityHome.class);     
    catch (Exception ex){                                                                out.println("exception message : " + ex.getMessage()+"</body></html>");}
    I get the following exception message :
    RemoteException occurred in server thread; nested exception is: java.rmi.RemoteException: nested exception is: java.sql.SQLException: Syntax error or access violation, message from server: "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 '"EntityCMPTable" WHERE "test" = 'zob'' at line 1"; nested exception is: java.sql.SQLException: Syntax error or access violation, message from server: "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 '"EntityCMPTable" WHERE "test" = 'zob'' at line 1"
    I would be very grateful for help since I have a close deadline for this!!!!!!!!
    Thank you very much in advance dear java experts!!!!!!!
                                       

    Hallo
    I have the same problem and the same configuration.
    Do you have a solution for this problem ??
    Thanks
    Georg

  • Problem with iCloud and E-mail set-up

    I have been trying to set-up an iCloud e-mail account but keep getting the messages that it cannot set-up the account.
    Problems from the iCloud control provide the message that I should use the e-mail preferences to set-up the account, the e-mail preferences provides the message that I should set-up iCloud account. The iCloud account has been set-up and the apple ID works well with other applications.
    Not sure what the issue is?

    Welcome to the Apple Community SupportLesley9119.
    Go to system preferences > iCloud and uncheck Mail. Go to the Mail application and check that the account has disappeared, if not delete it. Go back to system preferences > iCloud and check mail.

  • Problem with Hibernate Connection and MySQL

    I have the following setup:
    J2EE web-application, Java Servlets, Jsp, Hibernate for DB persistence, MySQL 4 (InnoDB tables)
    I have not specified any connection pool parameters (c3p0) in my hibernate.cfg.xml, as the default settings should suffice for my purposes.
    I use the SessionFactory object as follows.
    In my database access class, I have a static declaration that initialises the new SessionFactory.
    Then, I use Session session = sessionFactory.getSession(); and session.close(); to do my DB access.
    Likewise, when storing data into the DB, I use a Transaction object, and use transaction.commit(); at the end of database access.
    The problem is:
    When I store data into the database, the changes do not occur on the website. In other words, the data gets stored into the tables (I check that via phpMyAdmin) but when accessing it, it only gets the old data. This is a serious problem as I am developing a website with attached CMS that will be used to update the pages.
    The OTHER problem is:
    Instead of having a static initialisation of the SessionFactory object, I created a new one every time I needed to access the database. Although I had a sessionFactory.close(); statement at the end of the database acccess, I got an exception:
    "java.sql.SQLException: User db_user already has more than 'max_user_connections' active connections"
    At the very moment I don't have access to my code.
    If somebody has a suggestion or a solution to the problem, please reply.
    Also, I will supply any code that is necessary to identify the problem.
    Anders

    Thanks for the tip, but how do you mean to update the object?
    Here is the code that stores the data into the database:
    'sessionFactory' is a static SessionFactory object.
         public static int saveOrUpdate ( Object object ) {
              int flag = 0; // 0 is true
              LOG.info("CMSLogic >>> saveOrUpdate() - object: " + object );
              Session session = null;
              Transaction transaction = null;
              try {
                   session = sessionFactory.openSession();
                   transaction = session.beginTransaction();
                   LOG.info("CMSLogic >>> saveOrUpdate() - object to save or update: " + object );
                   session.saveOrUpdate(object);
                   // Flush the session
                   if ( session!= null )
                        session.flush();
                   transaction.commit();
              } catch ( Exception e ) {
                   e.printStackTrace ();
                   transaction.rollback();
                   flag = 1;
              } finally {
                   try{
                        if (session != null) {
                             session.close();
                   } catch (Exception e) {
                        LOG.error("CMSLogic >>> saveOrUpdate() - threw exception: " + e);
              return flag;
         }Further, here is the code that fetches the data from the DB:
         public static Item getItemByURL ( String url ) {
              // Verify the URL
              if ( url.charAt(0) == '/' ) url = url.substring (1);
              String [] urlArr = url.split( "/" );
              LOG.info("BusinessLogic >>> getItemByURL() - split url: urlArr.length: " + urlArr.length );
              for ( int i = 0; i < urlArr.length; i++ )
                   System.out.println ( urlArr[i] + ", " );
              if ( urlArr == null ) return null;
              if ( urlArr.length == 0 ) return null;
              if ( urlArr.length > 4 ) return null; // If the path depth is more than 3 levels, abort
              // Fetch data from DB
              List<Item> items = null;
              Session session = null;
              Query query = null;
              try {
                   session = sessionFactory.openSession();
                   if ( urlArr.length == 1 ) {
                        query = session.createQuery(
                             "FROM Item WHERE section.sectionKey LIKE 'root' " +
                             "AND filename LIKE '" + urlArr[0] + "'" );
                   else if ( urlArr.length == 2 ) {
                        query = session.createQuery(
                             "FROM Item WHERE section.sectionKey LIKE '" + urlArr[0] + "' " +
                             "AND filename LIKE '" + urlArr[1] + "'" );
                   else if ( urlArr.length == 3 ) {
                        query = session.createQuery(
                             "FROM Item WHERE section.sectionKey LIKE '" + urlArr[1] + "' " +
                             "AND section.parentSection.sectionKey LIKE '" + urlArr[0] + "' " +
                             "AND filename LIKE '" + urlArr[2] + "'" );
                   else { // if ( urlArr.length == 4 ) {
                        query = session.createQuery(
                             "FROM Item WHERE section.sectionKey LIKE '" + urlArr[2] + "' " +
                             "AND section.parentSection.sectionKey LIKE '" + urlArr[1] + "' " +
                             "AND section.parentSection.parentSection.sectionKey LIKE '" + urlArr[0] + "' " +
                             "AND filename LIKE '" + urlArr[3] + "'" );
                   items = query.list();
                   LOG.info("BusinessLogic >>> getItemByURL() - items = query.list(): " + items );
                   // Load the related revisions, too
                   if ( !items.isEmpty() ) {
                        Hibernate.initialize ( items.get(0).getRevisions() );
                        LOG.info("BusinessLogic >>> getItemByURL() - initialised revisions for item." );
                        Hibernate.initialize ( items.get(0).getRevisions().get(0).getTemplate() );
                        LOG.info("BusinessLogic >>> getItemByURL() - initialised template for first revision." );
                   // Flush the session
                   if ( session!= null )
                        session.flush();
              } catch ( Exception e ) {
                   e.printStackTrace ();
                   LOG.error("BusinessLogic >>> getItemByURL() - threw exception: " + e );
              } finally {
                   session.close();
                   //sessionFactory.close(); // !!!???
              // Return query results
              if ( items == null ) return null;
              else if ( items.isEmpty() == true ) return null;
              else {
                   LOG.info("BusinessLogic >>> getItemByURL() - items.get(0).getRevisions().size(): " + items.get(0).getRevisions().size() );
                   LOG.info("BusinessLogic >>> getItemByURL() - items.get(0).getRevisions().get(0): " + items.get(0).getRevisions().get(0) );
                   return items.get(0);
         }Any constructive suggestions and helpful comments are more than welcome.
    I have been struggling with this problem for a while now.
    Anders

  • Problem with JBDC connection to mysql in tomcat

    hi ,
    can anyone plz help me?..
    iam new to JSP. iam trying to impelement a application in JSP with JDBC connection using tomcat. Database is MYSQL .
    iam getting the following error:
    org.apache.jasper.JasperException: Unable to get connection, DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Server connection failure during transaction.
    Attempted reconnect 3 times. Giving up.)"
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    javax.servlet.ServletException: Unable to get connection, DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Server connection failure during transaction.
    Attempted reconnect 3 times. Giving up.)"
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
         org.apache.jsp.test_jsp._jspService(test_jsp.java:81)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    THIS IS MY APPLICATION:
    <html>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <sql:query var="rs" dataSource="jdbc/TestDB">
    select id, foo, bar from testdata
    </sql:query>
    <html>
    <head>
    <title>DB Test</title>
    </head>
    <body>
    <h2>Results</h2>
    <c:forEach var="row" items="${rs.rows}">
    Foo ${row.foo}
    Bar ${row.bar}
    </c:forEach>
    </body>
    </html>
    Following is the context file called "DBtest.xml" stored in webapps/DBtest/META-INF folder( i have a same copy of the file in /conf/Catelina/localhost)
    <Context path="/DBTest" docBase="DBTest"
    debug="5" reloadable="true" crossContext="true">
    <Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource"
    maxActive="100" maxIdle="30" maxWait="10000"
    username="javauser" password="javadude" driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost:3306/javatest?autoReconnect=true"/>
    </Context>
    i have following web.xml file in webapps/DBtest/WEB-INF
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">
    <description>MySQL Test App</description>
    <resource-ref>
    <description>DB Connection</description>
    <res-ref-name>jdbc/TestDB</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    i have been refering to the internet form past 3 days and making lot of changes.but,there is no use.
    plz guide me
    thanks

    Perhaps a stupid question: is MySQL running and listening on port 3306? The problem is not always in the webapp. Perhaps you can create a small test class that uses Driver to make a connection to your database.

Maybe you are looking for

  • Purchased Ringtones not showing in Sounds folder

    I have purchased a couple of ringtones from itunes but they are not showing up in my Settings\Sounds\Ringtone folder. How does a person get them into that folder or have the iphone 4s recognize where they are so access can be gained. Currently they c

  • Power surge on hub point

    I have a 60GB Ipod colour and use it to save my photos. I have just come back from Athens - which supplies 260v/50Hz power. Now I am back in England (240V/50Hz), I get an error when I plug the Ipod into my Win XP Dell Inspiron 1100 laptop. The error

  • 'G' and 'H' keys seem to be lifting up from keyboard.

    I recently bought a new Macbook Pro 13" 2012 model and the 'G' and 'H' keys on the keyboard are lifted up on one side. On the right side of these keys they are higher than the left side and also very easy to fall off. Any idea's on whether this is no

  • PO Creator And chager are different.

    While generating PO if anyone is changing the PO other than Creator I.e If change Perosn and Creator Peroson of that Po is differnet than a mail should go to Creator with PO number and Change Perosn Name. I want steps to do this. Hemanshu. 9920262006

  • How to handle Undelivered messages when the Target Application is down

    Hi in our scenario, sapEccSystem>OuboundProxy>PI>ReceiverAdapter>ReceiverThirdPartyApplication the known issue with the ReceiverThirdPartyApplication is, it gets down in frequent intervals, and automatically gets up and running, but we don't know at