MySQL connectivity Problem URGENT plz

Hi
plz can any one help me... its urgent
i need java to connect to MySQL database.with mm.mysql.Driver
the following sample code is just copied from the site and made changes in hostname, dbname and username.
classpath has been given correctly for the mm.mysql.Driver package (mysql.jar).
Thanx in advance....
Result
compilation --> success
while executing i get the following Error.
java.sql.SQLException: General Error: null
     at org.git.mm.mysql.connection.<init>(Connection.java)
     at org.git.mm.mysql.Driver.connect(Driver.java)
     at java.sql.DriverManager.getConnection(DriverManager.java: 515)
     at java.sql.DriverManager.getConnection(DriverManager.java: 197)
     at JDBCDemoCreate.getConnection(JDBCDemoCreate.java: 36)
     at JDBCDemoCreate.<init>(JDBCDemoCreate.java: 14)
java.lang.NullPointerException
     at JDBCDemoCreate.<init>(JDBCDemoCreate.java: 17)
     at JDBCDemoCreate.main(JDBCDemoCreate.java: 47)
Here is the code. can any one try this !
// JDBCDemoCreate.java
1.     import java.util.*;
2.     import java.sql.*;
3.
4.     public class JDBCDemoCreate {
5.
6.     private static final String hostname = "hostname";
7.     private static final String port = "3306";
8.     private static final String database = "dbname";
9.     private static final String username = "username";
10.     private static final String password = "";
11.
12.     public JDBCDemoCreate() {
13.
14.          Connection c = getConnection();
15.
16.          try {
17.               Statement s = (Statement)c.createStatement();
18.               s.executeUpdate("CREATE TABLE rich ( id int primary key, name char(25) )");
19.          } catch ( Exception e ) {
20.               e.printStackTrace();
21.          }
22.
23.     }
24.
25.     private Connection getConnection() {
26          // Register the driver using Class.forName()
27.          try {
28.               Class.forName("org.gjt.mm.mysql.Driver").newInstance();
29.          } catch ( Exception e ) {
30.               e.printStackTrace();
31.          }
32.
33.          // ask the DriverManager for a connection to the database
34.          Connection conn = null;
35.          try {
36.               conn = DriverManager.getConnection("jdbc:mysql://" + hostname +
37.                                                                      ":"+ port +"/" + database +
38.                                                                      "?user=" + username +
39.                                                                      "&password=" + password );
40.          } catch (Exception e) {
41.               e.printStackTrace();
42.          }
43.          return conn;
44.     }
45.     
46.     public static void main( String[] args ) {
47.          new JDBCDemoCreate();
48.     }
49.}

Hi!
You can try with this code coz, i worked with this code only and then i can talk to the database.
Connection con;
Class.forName("org.gjt.mm.mysql.Driver";
con = DriverManager.getConnection("jdbc:mysql:///db?user=root&password=");
Try it out!
Queries regarding this is welcome. Either in this forum itself or u can contact in the mail, the id is
[email protected]
Regards,
dinesh

Similar Messages

  • PHP and MySQL Connection problem

    I am trying to make a PHP MySQL on a remote server connection in Dreamwesaver CS3.
    When I enter the information (host, user, password, etc.) and hit TEST, I get the following error message.
    "Access Denied. The file may not exist, or there could be a permission problem. Make sure you have proper authorization on the server and the server is properly configured."
    I know the user, password, etc. work, as I can access the MySQL database with other software.
    I checked with my host and they say there are no permission problems on their end.
    I have checked the settings on the Test Server page in Site Setup and everything looks correct and works there.
    I have not seen this particular problem described in other forum postings (although there are a LOT of postings on this topic!).
    Any help would be appreciated.

    I thought my testing server was the remote server and is always on as far as I know. I don't know how to turn it on or off.
    Is there some other testing server that I should be aware of?
    Frank
    Date: Wed, 3 Jun 2009 15:43:02 -0600
    From: [email protected]
    To: [email protected]
    Subject: PHP and MySQL Connection problem
    I know you are using remote, but is your testing server on? if not turn that on and see if that does it. it just happened to me working on remote server and could not get mysql conn to work, until I turn on my testing (developer server), then I was able to connect to mysql and the tables that I created in phpmyadmin remotly was downloaded.
    >

  • DW CS3 to MySql connection problem

    I have DW CS3 on Windows Vista. I have installed the Apache
    web server and MySql. I've associated the Apache server for testing
    and it works fine for page displays, so when I make a change to a
    page and hit F12 it is uploaded to the test environment and
    displayed in a browser.
    MySql is up and running, I can log onto it with the MySql
    admin client and see my database (just a testing one).
    When I try to test the sql connection I get the message "An
    unidentified error has occurred" and I don't have access to the
    data.
    When I try to test a PHP page it is treated as a file object
    and not processed, just loaded for editing.
    I don't know what I've set up wrong, any help
    appreciated.

    Was this issue resolved?
    I have the same problem now. DW was working fine the one day and the next when I started it it had this connection problem.
    I am testing on my local PC. My sites is at http://localhost/
    All my connection are working because if I go to http://localhost/index.php I can see my site and if I go to http://localhost/register.php I can even register a new user. It will include the new user details in the data base and everything is working fine. So there is nothing wrong with the connection.
    In DW I do have http://localhost/ on the Local Info screen. As I said, all was working fine on the current setup the one day and the next day it did not want to work.
    Seems like a very common problem.
    I want to buy CS4 and surely hope that the problem has been fixed by now.

  • JDBC/MYSQL Connection problems

    I'm new to using JDBC so I'm not sure if I'm simply doing something wrong in my code or if I've installed something incorrectly. I've got the JDBC connector/J installed properly as far as I can tell. At least when I run my code I'm not getting an error about the driver not being found. The problem I'm running into is that even though I've double and triple checked the authentication info I keep getting the following error:
    Exception in thread "main" java.sql.SQLException: Invalid authorization specification message from server: "Access denied for user: '[email protected]' (Using password: YES)"
    The actual connection commands I'm using are as follows:
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    Connection con = DriverManager.getConnection("jdbc:mysql://localhost/Test", "testusr", "testpwd");
    I've checked and rechecked the spelling of my mySQL user & password and as far as I can tell, they work just fine so I can't figure out why I would be getting this error. Any suggestions on things I can try or does anyone see any obvious errors in what I'm doing?

    The failure is caused not by the JDBC driver but by how the MySQL was configured
    when it was installed. By default, MySQL is configured to allow connections that
    are created only from within the localhost.
    The line
    DriverManager.getConnection("jdbc:mysql://localhost:3306/Test?user=testusr& password=testpwd") translates to "create a connection to MySQL running at 'localhost' and use the
    'testusr@<hostname.domain>' as user name and 'testpwd' as the password".
    If you can see, the <hostname.domain> is replaced with "other value" aside from
    the "localhost" which you expect, hence connection is denied.
    The '<hostname.domain>' is replaced with the value of either your IP address or
    hostname. Therefore, any connections created from outside the host where your
    server is running will be denied. Now, making the 'host' value set from
    'localhost' to '%' would tell MySQL that you are allowing connections created from
    outside the MySQL host to connect to the server.
    Another way to go around this is problem is to modify your
    "\Windows\system32\drivers\etc\hosts" OR "/etc/hosts" file and give
    your loopback address (127.0.0.1) another alias (aside from localhost), e.g.:
    127.0.0.1    localhost    <hostnameY.domain>
    192.168.1.1  <hostnameX.domain>  <hostnameY.domain>where you replace <hostnameY.domain> with the name/alias of your computer in
    the network. The domain is optional and depends upon the domain name that
    your network is using.

  • MySQL Connectivity problem

    Hi all,
    I am new to JSP. I am using Eclipse 3.2. with all lpugins. The following code throws an error. Pleas help me.
    <html><body>
    <%@ page import="java.sql.*, java.lang.ClassNotFoundException"%>
    <%
         String connectionURL = "jdbc:mysql://localhost:3306/online_hotel_booking";
         String userName = "root";
         String password = "root";
         // Load the driver class and establish a connection
         try {
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              Connection con = DriverManager.getConnection(connectionURL,userName,password);
              Statement stmt = con.createStatement();
              ResultSet rs = stmt.executeQuery("select * from hotel_details");
              while (rs.next()) {
                   out.println(rs.getString(1));
                   out.println(rs.getDate(2));
              /* closing the connection */
              rs.close();
              stmt.close();
              con.close();
         catch (Exception e) {
              out.println("Exception!"+e);
    %>
    </body></html>It throws ClassNot FoundException: com.mysql.jdbc.Driver
    Thanks in advance

    JDBC questions should be posted in the JDBC forum: http://forum.java.sun.com/forum.jspa?forumID=48
    If you take the time to look the active topic listing of the JDBC forum, you'll see that you're not the only one who encountered the problem. Yesterday I answered similar topic on this issue.

  • JSP Mysql Connection Problem

    Hi Friend,
    I am facing some problem in connecting mysql with jsp .
    When I try and connect to mysql with the following connection string
    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/testdhiraj?user=root&password=dh");
    Statement statement     = con.createStatement();
    I get an error :
    java.sql.SQLException: Communication link failure: Bad handshake
    I don't know what is wrong,
    as I had tested mysql using telnet and it connects and executes sql nicely.
    Waiting for ur reply,
    Dhiraj Agrawal
    mail to : [email protected]

    Hi,
    You need to make sure that , you have given correct database name, user id and password in the connection url. and also check the jdbc driver is loaded properly. If your mysql is running in the standard port, you need not give the port as 3306.
    Here is the example :
    import java.sql.*;
         Notice, do not import org.gjt.mm.mysql.*
    or you will have problems!
    public class XampleClass
    public static void main(String[] Args)
    try {      
    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    catch (Exception e) {
    System.err.println("exception while loading
    driver.");
    e.printStackTrace();
    try {
    Connection C = DriverManager.getConnection(
    "jdbc:mysql://localhost/test?user=myuser&password=mypwddb");
    // Do something with the Connection
    catch (SQLException e) {
    System.out.println("Exception: " + e);
    This is the format for conenction url :
    jdbc:mysql://[hostname][:port]/dbname[?param1=value1][&param2=value2]...
    Hope this helps you.
    Thanks,
    Senthil_Slash

  • MySQL connectivity problem: no validation table provided

    hi there,
    As a superbeginner, on my Mac G4 OSX 10.4 I am trying to add a MySQL database in Sun JSC 2.1, following the tutorial:
    Creating Database Server Types and Data Sources
    So far I have managed to
    -install mysql 3.1.14 and
    -add this as a new database server
    When I try to add a data source, I cannot select a validation table (message: No Tables were found. Check your connection information), and I cannot find in the manuals how to make one. When I test the connection the connection status is succeeded, but the validation table status is failed (No validation table provided...)
    In a seccond attempt, I also installed MySQL 4.1.21 and navicat (in which the connection seems to be good), but I cannot figure out how to connect this version 4.1.21 to the JSC, because 4.1.21 differs in installation (it uses an installation package in stead of a zipped folder) which is not covered by the tutorial.
    Any hints on one of the two attempts, or a suggestion for a database which might give a beginner like me less problems to connect? Thanks a lot.
    [email protected]

    I think the simplest way is:
    create a table:if you have mysql 5.x you can di it with mysql tools (mysql administrator or mysql query browser), if you have a non graphical version of mysql you have to create the table with prompt.
    Create table Paziente (
         codice_fiscale_paziente Char(20) NOT NULL,
         nome Char(20),
         cognome Char(20))
         ENGINE = MyISAM;
    than open JSC (it doesn't have a jdbc driver installed to work with mysql, you have to download from mysql website and install in jsc)
    servers--> right click -->add data source
    than :
    data source name : the name you want to use
    server type: mysql
    database name : your's database name
    if you have user autentication in your db, set user and password
    set the correct db url
    and... test connection
    it should work

  • Tomcat5.0.28 connection pooling urgent plz.......................

    hi all,
    I am new to jndi concet.I am trying to do connection pooling in tomcat 5.0.28.
    I have searched google a lot but not been able to succeed in this.
    I have created the datasource (ccmtest) from tomcat Administration.So it will automatically writes<resource></resourceparams> info in server.xml.
    I manually written <resource-ref> in web.xml
    I am trying to access the pool from java class.and i have written the following code
    Properties p=new roperties(); p.put(Context.INITIAL_CONTEXT_FACTORY,"org.apache.commons.dbcp.BasicDataSourceFactory");
    p.put(Context.PROVIDER_URL,"http://localhost:8080");
    Context context = new InitialContext(p);
                   DataSource ds=(DataSource)context.lookup("java:/comp/env/jdbc/ccmtest");
                   Connection conn = ds.getConnection();
    but i am getting the following error:
    javax.naming.NoInitialContextException: Cannot instantiate class: org.apache.com mons.dbcp.BasicDataSourceFactory [Root exception is java.lang.ClassCastException]
    First i didn't placed the code like p.put(Context.INITIAL_CONTEXT_FACTORY,.........but when i didn't place the code i got the error:
    javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
    I have placed the commonsdbcp.jar,commonspool.jar,commonscollections.jar in classpath.
    Plz help me
    Advance thanks.

    hi aniseed
    First of all thanks for the solution.
    i have read that documentation several times.and done the same thing what ever documented in that page u have given but still get the error:
    javax.naming.NoInitialContextException: Cannot instantiate class: com.mysql.jdbc.jdbc2.optional.MysqlDataSourceFactory [Root exception is java.lang.ClassCastException]

  • DW CS4 MySQL Connection Problem

    I know this one has been covered before but i've been trawling through posts for the past 2 days and still haven't solved my problem.
    I remember from using MX Studio and Ultradev that setting up a connection could prove challenging. It seems that CS4 is just as user-unfriendly in this regard. I know that the settings i'm using for the connection must be correct as i'm using them to successfully connect to the database and display its records using a hand-coded page. I've tried disabling Kaspersky and Windows Firewall but to no avail. I noticed one difference between the php script that dw attempted to make and mine is that i'm using mysqli whereas the dw version just refers to mysql. When I click on the Select button to try and select the database i just get  "An unidentified error has occurred" - about as much use as a chocolate fireguard - well done to the dw development team for that pearl of wisdom. Is dw trying to find my databse somewhere where it's not located? I noticed that C:/InetPub and its subfolders are marked "read only" but when you uncheck this, it reverts to read only - i don't know if this may have something to do with my inability to set up a connection. I managed to manually set up MySQL, PHP and Apache without problems but this has got me beat. Is it bad design in dw or am i just stupid? Don't answer that! Any help would be greatly appreciated as i know there's a lot of good stuff in dw if i could only make a connection (and i'm on a 30 day trial with this) Why should something that looks so easy be so difficult! Thanks, Mark

    Hi PZ,
             You're correct! I just managed to get my connection to work. I looked in my php.ini file and it only had extension=php_mysqli.dll at the bottom of the page (the dll file to which this refers was in the ext folder). So, I just added extension=php_mysql.dll to the end of the php.ini file then downloaded the PHP 5.2.13 zip package from http://www.php.net/downloads.php and then copied the file php_mysql.dll into the ext folder. I got the clue about mysqli not being supported after i'd carried out a Site > Advanced > Remove Connection scripts - that at least gave me a message "Your PHP Server doesn't have the MySQL module loaded or you cant use the mysql(p) connect functions" - before i did this i just got a useless "An unidentified error has occurred" which left me no further forward. Thanks for your help!

  • Report server run problem (urgent plz)

    i am using developer9i, xp opereting system but i am not able to run report server . infact i dont know where report server reside and how configure report server. otn discussion forum gave me below instructions but i need step by step detail to run report server.
    pls help me.
    i want to see (Please reffer to Note:204538.1 on
    Metalink ) but i could not access metalink.
    registration does not alow me. i have no country on
    country list and no Support Identifier (CSI, SAC,
    Access Code etc.) . but i need access.
    please help me. access with path
    thanks
    mostafizDear see this information this is metalink information
    Note:204538.1
    Subject: Common Reasons & Troubleshooting: "Unable to communicate with the Reports Server"
    Type: BULLETIN
    Status: PUBLISHED
    Content Type: TEXT/X-HTML
    Creation Date: 22-JUL-2002
    Last Revision Date: 08-MAR-2005
    PURPOSE
    ========
    The main purpose of this document is to list the known causes of the "Unable to
    communicate with the Reports Server" error. The terms Reports Server, CGI,
    Reports Servlet are also described briefly for a better explanation of this error scenario.
    This document includes the following sections :
    I. Brief summary on the architecture of Reports Server, CGI and Reports
    Servlet
    II. Sources of errors encountered when running a report with Reports Server
    III. How the CGI (or the Reports Servlet) communicates with the Reports
    Server
    IV. Possible reasons which lead to "Unable to communicate with the Reports
    Server" error.
    1) Reports Server is up and running
    2) tnsnames.ora and sqlnet.ora problems
    3) Effect of parameter "ORACLE_HOME"
    4) Effect of parameter "maxconnect"
    5) Passing very large parameters to reports server
    6) A case specific to OAS 4.0.8.2
    7) A case specific to WEBDB version 2.1.0.9.3
    V. References
    I. Brief summary on the architecture of Reports Server, CGI and Reports Servlet
    =================================================================================
    In order to understand the causes of the error "Unable to communicate with the
    Reports Server", let's first briefly review the Reports Runtime Engines, Reports
    Server, the Reports CGI, and Reports Servlet architecture.
    There are 4 important layers in Reports Server architecture which should be
    understood in order to clearly understand the error "Unable to communicate with
    the Reports Server" :
    1) The Runtime Engines : This is the main layer where the reports are actually
    executed. On unix systems there are "rwrun60" and on NT systems there are
    "rwrun60.exe" processes.
    2) The Reports Server : The Reports Server recieves the job request and queues
    it. When one of its runtime engines becomes available, it sends the
    command line to that runtime engine for execution. On Unix systems it is
    the "rwmts60" executable and on NT systems it is "rwmts60.exe".
    3) The Reports CGI : The Reports Web CGI passes the request to the Reports Server.
    The Reports CGI or Servlet converts the request to a command line that can be executed by the Reports Server and
    submits it to the specified Reports Server. On Unix platforms this executable
    is "rwcgi60" and on NTs it is "rwcgi60.exe.
    4) The Reports Servlet : Its functionality and function is just the same as "Reports CGI", but it is
    a program written in Java as difference to the CGI program (which is
    written in C programming language).
    The Reports Server may be running on the same server with the CGI program (or
    servlet) OR may reside totally on another machine which does not necessarily have
    the same Operating System. For instance CGI may reside in a Windows NT machine
    while the Reports server may reside on a Unix box, or any other combination with
    Unix-Linux-NT-2000, etc.
    The reports are called with a URL similar to below with the CGI :
    http://fully.qualified.server.name:PORT/dev60cgi/rwcgi60.exe?server=<REPSERVER>&other_parameters=...........
    where fully.qualified.server.name is the name of the server where the Reports CGI
    reside, and <REPSERVER> is the name of the server.
    II. Sources of errors encountered when running a report with Reports Server
    ============================================================================
    The Reports Web CGI (or the Reports Servlet) makes a call to the Reports Server
    and asks it to place the output into some destination (defined by DESTYPE and
    DESNAME parameters), then gives back the necessary response to the calling
    program. For example if the DESTYPE is "cache", then the Reports server generates
    the report to a file in a temporary place and gives it back to CGI and the CGI gives
    it back to the calling program. Otherwise, if the DESTYPE is "file", the Reports Server
    generates the report output to the requested file and the CGI replies back the
    following message : "Report output was successfully written to requested
    destination.".
    If there is any error in this process, the related error message is returned. The
    possible sources of errors can be categorized as follows :
    1) The errors that are returned from Reports Server; like the Reports Server can
    not find the requested RDF file or the report may be run to file and the
    directory where the reports output is asked to be placed does not occur or
    similar errors. (Usually the REP-XXXX errors)
    2) Another possible cause of error is the errors returned by the RDBMS to the
    Reports Server, for example a table not found error or things like that. Of
    course from the CGI point of view these errors are again transmitted from the
    Reports Server but in fact the error originates from the RDBMS. (Usually the
    ORA-XXXX errors)
    3) Another possible cause of errors is the CGI itself, for example when the CGI
    executable can not connect to the requested Reports Server, then we get the
    famous "Unable to communicate with the Reports Server". In this document we will
    diagnose the common reasons of this last error.
    III. How the CGI (or the Reports Servlet) communicates with the Reports Server
    ===============================================================================
    Having said that "Oracle Reports Server CGI - Unable to communicate with the
    Reports Server." error is returned back from the CGI itself, let's discuss the
    issue of how the Reports CGI connect to the Reports Server. The name of the
    Reports Server given in the URL with "server=....." parameter is, in fact, just
    a special tnsnames alias, similar to aliases for database connect strings. As it is
    important for the CGI to resolve the alias, the CGI needs to know the HOST name (or the
    IP) of the machine where the Reports Server is running and the port on which the
    Reports Server is listening. So a typical Reports Server alias is defined as follows :
    REP60_<MACHINE>=(ADDRESS = (PROTOCOL = tcp)(HOST = <MACHINE>)(PORT = <PORT>))
    This is defined in tnsnames.ora file, and the sqlnet.ora file is also used in
    the name resolving operation.
    IV. Possible reasons which lead to "Unable to communicate with the Reports Server" error.
    ==========================================================================================
    The possible reasons for the "Unable to communicate with the Reports Server" error :
    1) Reports Server is up and running :
    Make sure that the Reports Server is really running on the specified server
    and listening on the specified port. For details have a look at above
    explanations for tnsnames alias of the reports server. And because of this the
    CGI could not establish a connection to the Reports Server.
    2) tnsnames.ora and sqlnet.ora problems :
    As described above, the CGI resolves the details for the reports server using
    the "tnsnames.ora" and "sqlnet.ora" files. There may be a problem with them,
    here are the possible configuration problems :
    a) There is no alias in the tnsnames.ora file for this Reports Server
    b) The CGI looks into the wrong directory for the "tnsnames.ora" and "sqlnet.ora"
    files. By default the CGI checks the $ORACLE_HOME/net80/admin directory for
    these scripts, where the $ORACLE_HOME is the home of the Forms & Reports
    installation. Please note that in a typical 9iAS 1.0.X installation there
    are two ORACLE_HOME's, one is for the iAS and the other is for the tools,
    usually the home for the tools is a directory with name "806" on NT and
    "6iserver" on unix systems. By defining TNS_ADMIN in the environment, one
    can override the search path for these two files.
    The TNS_ADMIN variable can be defined in one of the following places :
    i) In the environment : On MS Windows platforms check the "Settings
    --> Control Panel --> System". On NTs check the environment TAB and in
    Win2K systems check the "Environment Variables" button on Advanced tab.
    ii) In "6iserver.conf" file. Details are as follows : The main configuration
    file for Apache server is "httpd.conf" file which resides in
    $IAS_HOME/Apache/Apache/conf directory. In this file there is a line to
    include "oracle_apache.conf" and in this "oracle_apache.conf" file
    there is a line to include "$ORACLE_HOME/conf/6iserver.conf" file. And
    in this file the TNS_ADMIN variable could be defined as follows :
    SetEnvIf Request_URI "rwcgi60" TNS_ADMIN=c:\orant\network\ADMIN
    Please note that by defining it this way, the TNS_ADMIN will only be defined
    for "rwcgi60" calls, so the other parts of the 9iAS will not be affected by
    this setting.
    c) In sqlnet.ora the "names.default_domain" is set but in tnsnames.ora the
    domain is not defined in the alias description. For example if the
    "names.default_domain=world" is present and active in "sqlnet.ora" file
    then in the "tnsnames.ora" the alias of the reports server should also have
    the ".world" extension appended at the end. And another cause is of course
    the vice versa for this. If there is no "names.default_domain" is defined
    in the "sqlnet.ora" then the alias in "tnsnames.ora" should not have the
    domain extension.
    Another important point that should be checked is, if TNS_ADMIN is defined
    as described above then the search path is as follows, first the directory
    defined by TNS_ADMIN is searched, if the "tnsnames.ora" file is not found in
    this directory then $ORACLE_HOME/net80/admin is checked. (And on unix systems
    /var/opt/oracle is also checked). These directories are only checked if the file
    is not present, so if the "tnsnames.ora" file is present in TNS_ADMIN directory
    but the alias is not present, then the other directories are not checked at all.
    Let us assume that the tnsnames.ora file is present in the TNS_ADMIN directory but
    there is no "sqlnet.ora" files here, then the sqlnet.ora file is checked in
    $ORACLE_HOME/net80/admin directory, which could cause the same problem if the
    "names.default_domain" is defined in this file.
    All the above will result in, CGI to unable to resolve the alias in tnsnames.ora
    file so it will not be able to establish a connection to the Reports Server.
    3) Wrong "ORACLE_HOME" setting :
    Wrong ORACLE_HOME setting. This is usually the case for Reports Servlet,
    because the environment settings are defined in "jserv.properties" file for the
    servlets and the setting here will effect both the Reports Servlet and the
    setting for Oracle JSP and other servlets. So the other servlets or Oracle JSP
    may need to set ORACLE_HOME to home of HTTP server while the reports server needs
    it to be set to the TOOLS_HOME directory. In this case the best alternative is
    not to set ORACLE_HOME in this directory and leave it to registry or defined the
    ORACLE_HOME in "6iserver.conf" file just like the TNS_ADMIN defined above. For
    details please have a look at the following document :
    Note 179609.1 "Getting an error Unable to communicate with the Reports Server
    using RWSERVLET"
    4) Effect of parameter "maxconnect" :
    Another common case for this error is that the CGI request reaches the Reports Server but
    the Reports Server refuses connection. The main cause for this case is, that the Reports Server
    configuration parameter "maxconnect" is defined too low, there are long running reports on the
    server or the server is too busy at that time. Usually a second try some
    later time results in a successful connection. If this is the case, the end user
    may think that the problem is occasional. For details on this case please
    have a look at the following document :
    Note 125265.1 "Unable to communicate with the Reports Server"
    5) Passing very large parameters to reports server :
    Another known reason for this error is, if you are passing large parameters
    to the Reports Server which exceeds sqlnet transmission blocks then the request may
    end up with this error. To test it try with small parameter values. If you hit
    this case, the solution is to increase the SDU (Session data unit size) and the TDU
    (Transport unit data size) parameters in tnsnames.ora file, for details please
    have a look at the following document :
    Note 197358.1 "Passing large parameters to Reports show up a Reports Server
    error"
    6) A case specific to OAS 4.0.8.2 :
    If you are using OAS instead of iAS, and the error appeared after
    upgrading to 4.0.8.2 then this is caused because the 4.0.8.2 is using RSF
    (Required Support Files) version 8.1.6 and the Reports 6i is using 8.0.6 and the
    two could not reside in the same ORACLE_HOME directory. So the solution for this
    problem is to create a new batch file and use it from which the actual CGI
    executable is called. For details please see the following document :
    Note 116754.1 "After applying OAS 4.0.8.2 CGI and Cartridge cannot communicate
    to report server"
    7) A case specific to WEBDB version 2.1.0.9.3 :
    Another known case for this error is with WEBDB version 2.1.0.9.3 or less.
    If you are using these old versions of WEBDB as HTTP listener, please have a
    look at the following document :
    Note 95426.1 "URL Not Found When Calling Oracle Developer Report from WebDB Site"

    On Windows you can create a Report Services:
    rwserver -install server=repserverYou have to choose different names for all servers, like your collegue cannot create a server with the same name. You can start/stop this Report server in Services (control panel). Configuration files can be found under $ORACLE_HOME/reports/conf
    Martin

  • JDBC MYSQL Connection Problem

    Hi guys I have created a database called books in MySQL and I have the following code to test the link of connection. I am using Netbeans.
    import java.sql.*;
    public class jdbcexample1 {
    /** Creates a new instance of jdbcexample1 */
    public jdbcexample1() {
    * @param args the command line arguments
    public static void main(String[] args) {
    // TODO code application logic here
    Connection con = null;
    try {
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    con = DriverManager.getConnection("jdbc:mysql:///books", "jhtp6", "jhtp6");
    if(!con.isClosed())
    System.out.println("Successfully connected to MySQL server...");
    } catch(Exception e) {
    System.err.println("Exception: " + e.getMessage());
    } finally {
    try {
    if(con != null)
    con.close();
    } catch(SQLException e) {}
    However my program when run gives me the exception message which is
    "Exception: com.mysql.jdbc.Driver"
    Before you tell me, I have put the "mysql-connector-java-3.0.14-production-bin" in the ext folder of jre and I have also appended the CLASSPATH as follows.
    ".;C:\PATH\mysql-connector-java-3.0.14-production-bin.jar;" which leads to the jre ext folder.
    What am I doing wrong, Have I missed something above and if not what could be wrong with my setup.
    Thanks!! :)

    Helo,
    I have just started with java, I am also using netbeans, I used similar code to test the link, the code gives the following error when compiled:
    java.lang.NoClassDefFoundError: JdbcExample1
    Exception in thread "main"
    Java Result: 1
    The code I used is a s follows:
    package com.stardeveloper.example;
    import java.sql.*;
    public class JdbcExample1 {
    public static void main(String args[]) {
    Connection con = null;
    try {
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    con = DriverManager.getConnection("jdbc:mysql:///pet", "root", "siemens");
    if(!con.isClosed())
    System.out.println("Successfully connected to MySQL server...");
    } catch(Exception e) {
    System.err.println("Exception: " + e.getMessage());
    } finally {
    try {
    if(con != null)
    con.close();
    } catch(SQLException e) {}
    Pls help..
    Thanks..
    Hi guys I have created a database called books in
    MySQL and I have the following code to test the link
    of connection. I am using Netbeans.
    import java.sql.*;
    public class jdbcexample1 {
    /** Creates a new instance of jdbcexample1 */
    public jdbcexample1() {
    * @param args the command line arguments
    public static void main(String[] args) {
    // TODO code application logic here
    Connection con = null;
    try {
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    con =
    DriverManager.getConnection("jdbc:mysql:///books",
    "jhtp6", "jhtp6");
    if(!con.isClosed())
    System.out.println("Successfully connected to MySQL
    server...");
    } catch(Exception e) {
    System.err.println("Exception: " + e.getMessage());
    } finally {
    try {
    if(con != null)
    con.close();
    } catch(SQLException e) {}
    However my program when run gives me the exception
    message which is
    "Exception: com.mysql.jdbc.Driver"
    Before you tell me, I have put the
    "mysql-connector-java-3.0.14-production-bin" in the
    ext folder of jre and I have also appended the
    CLASSPATH as follows.
    ".;C:\PATH\mysql-connector-java-3.0.14-production-bin.
    jar;" which leads to the jre ext folder.
    What am I doing wrong, Have I missed something above
    and if not what could be wrong with my setup.
    Thanks!! :)

  • JDBC and MySQL connectivity problem

    The code i hav attached generates Connectivity exception.. the prob is with the part in bold.. can anyone help
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public class testconn {
      public static void main(String args[]) {
        Connection con = null;
                String serverName = "localhost:8080";
            String mydatabase = "imagedb";
            String url = "jdbc:mysql://" + serverName +  "/" + mydatabase; // a JDBC url
            String username = "am";
            String password = "ta";
        try {
          Class.forName("com.mysql.jdbc.Driver");
         con= DriverManager.getConnection(url, username, password);
          if(!con.isClosed())
            System.out.println("Successfully connected to " +
              "MySQL server using TCP/IP...");
        } catch(Exception e) {
          System.err.println("Exception: " + e);
        } finally {
          try {
            if(con != null)
              con.close();
          } catch(SQLException e) {}
    }

    I had such issue too, and I fixed it by adding in the environment variables the CLASSPATH entry that pointed to all the directories containing the .jar needed for the applications.
    for example I used jodbc folder to connect mysql database (I installed last version and I got same issue than yours and it seems to be a 'connector' issue, exactly the same issue than yours) I got something like
    CLASSPATH=my root dir/the java dir/the lib dir/jodbc;my root dir/the java dir/other important libs containing .jar files;
    This is what I got for the issue, still working around (at the level of mysql all is ok, ...)
    Microsoft Windows XP [version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\Documents and Settings\Hurukan>java ConnectJODBC brol
    java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at ConnectJODBC.main(ConnectJODBC.java:108)
    [exception] -- la valeur de 'con' est nulle (DriverManager � retourn� une valeur
    nulle)
    C:\Documents and Settings\Hurukan>set
    APPDATA=C:\Documents and Settings\Hurukan\Application Data
    CLASSPATH=c:\Program Files\Java\jdk1.5.0_06\lib;c:\Program Files\Java\jdk1.5.0_06\dev;\c:\Program Files\Java\jdk1.5.0_06\lib\jodbc;
    Here is the code that generated this exception
    String dburl="jdbc:mysql://127.0.0.1/nosdisques"; // should be next passed by command line
    String password="**scrambled**";
    String username="**scrambled**";
    Connection con=null;
    Statement stmt=null;
    ResultSet res=null;
    String requete="";
    String strToWrite="";
    // Connexion � la base de donn�e
    // Won't work with mysql 5.0.18, mysql connector 3.51.12 is installed [???]
    // Previous tests with 5.0.18 were running good, that has started with the last os restoration (and the connector was different of course...)
    // tried to retreive older version of the mysql connector
    try
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    con=DriverManager.getConnection(dburl,username,password);
    System.out.println("Nous sommes connect\u201as \u2026 la base " + con.getCatalog());
    catch(SQLException sqlex)
    System.out.println("[sqlexception]\n");
    System.exit(3);
    catch(Exception ex)
    ex.printStackTrace();
    if(con == null)
    System.out.println("[exception] -- la valeur de 'con' est nulle (DriverManager \u2026 retourn\u201a une valeur nulle)\n");
    System.exit(4);
    System.out.println("Impossible to join database, access denied\n");
    System.out.println("Verify settings (mysqld or firewall)\n"); System.exit(2);
    Maybe the drivers used (last one: connector/j 3.1.12). The .jar file is in the %classpath% directory c:\Program Files\Java\jdk1.5.0_06\lib.
    Can't really understand why this code won't run anymore, ...
    I took a look on the other computer where the same code is running ok.
    These are the differences:
    mysql server is 5.0.18 on the other computer the version is 3.23.41
    mysql connector is 3.51.12 on the other computer the version is 3.0.10
    access rights are the same because the database is the dumped one from 3.23.41 to 5.0.18, and I'm quite good with the dbms management (I'm IT developper in fact, trying to take over java technology ;) )
    in this case this is not a sql error but java error.
    the jar file is set to the %classpath% folder on both computers
    I copied the jar from the other computer, removing the new .jar file and... it failed, exactly the same issue
    Still working around, ...
    Dimitri

  • 5800 strange connectivity problem [urgent]

    My phone cannot access internet at all. The problem it seems is that the browser(o any other application) can not find the destination(or access point). If I choose default destination as Internet it simply says cannot connect and If i choose always ask it shows up the choose connection menu but it only has the search for Wi-fi option. It doesn't show my carriers access points.
    I switched my phone on and off still doesn't work.

    Delete all access points from your Operator. Request them to send fresh settings.. Save them and see if it makes any difference. While saved, just confirm they are not getting saved under the 'Uncategorised' folder ..

  • DW CS3 MySql Connect Problems Local Mac

    Hi,
    I switched from CS2 to CS3, somewhere along the way I can no
    longer connect to MySql doing local testing. I know the MySql
    server works as I can connect to it and work with tables etc with
    Navicat.
    I keep getting:
    Warning: mysql_pconnect() [function.mysql-pconnect]: Can't
    connect to local MySQL server through socket
    '/var/mysql/mysql.sock' (2) in
    /Users/Rich/Sites/Site/htdocs/Connections/Main.php on line 9
    Fatal error: Can't connect to local MySQL server through
    socket '/var/mysql/mysql.sock' (2) in
    /Users/Rich/Sites/Site/htdocs/Connections/Main.php on line 9
    Anybody got any ideas?
    Thanks
    Rich

    I'm running 10.5.8 so this may be completely the wrong answer...
    Have you set the privileges on the MySQL user on the server database to allow a connection from a remote client IP Address?
    You can do this via phpMyAdmin user privileges or as a MySQL command, something like
    GRANT SELECT ON <database>.<table>
    TO <user>@'<IP address of client>'
    IDENTIFIED BY "<password>";
    The IP address can contain a wild character, e.g. 192.168.1.%
    john

  • Migration from MySQL - connection problem

    I've just installed OMWB 1.3.1 for WINDOWS and created repository in ORACLE 8.0.5 DB.
    When I enter Source Database Details in Capture Wizard and push Next button nothing is happened. In OMWB log-file I've found the following message among many others:
    Exception occurred during event dispatching:
    java.lang.NoClassDefFoundError: org/gjt/mm/mysql/Driver
    at java.util.Vector.<init>(Vector.java:128)
    The directory C:\Oracle\oracle81\Omwb\drivers\
    is empty while in CLASSPATH env variable I've found the following item:
    C:\Oracle\oracle81\Omwb\drivers\mm.mysql.jdbc-1.2a
    If anybody could help me to solve this problem, please let me know.
    Thank you in advance.
    null

    Hi Vladimir,
    I send you a message from the Migration Workbench team that solved my problem. I hope this will resolve yours too.
    Bye,
    Pierfrancesco
    Hi Pierfrancesco
    MySQL 3.22, 3.23 Requirements
    In order to migrate from MySQL to Oracle, you must install the MM MySQL JDBC
    driver release 1.2a on the same system as the Migration Workbench. You can
    obtain this by downloading the MM MySQL JDBC driver from the WorldServer Web
    site at:
    http://www.worldserver.com/mm.mysql
    Copy and unzip the mm.mysql.jdbc-1.2a.zip file to your
    %ORACLE_HOME%\Omwb\drivers directory. This automatically creates a new
    directory called
    mm.mysql.jdbc-1.2a within the drivers directory.
    Can you please verify that you have this driver extracted to the above
    specified directory. Another check you can do is see whether all the files in
    the zip
    have extracted.
    Please refer to the Release notes which you have access to by selection the Help
    drop down menu in the Workbench.
    I hope this helps
    Best regards
    Oracle Migration Workbench Support
    null

Maybe you are looking for

  • How can I transfer photos from my  iMac to my iPad and not lose the ones already stored on the iPad.

    How can I transfer photos from my  iMac to my iPad and not lose the ones already stored on the iPad?  When using iTunes to sync a folder from the iMac to the iPad it always removes anything previously synced. Help appreciated David

  • Blurry fonts thunderbolt display on rmbp

    I have a thunderbolt display 27" connected to a rmbp, the fonts on the thunderbolt display look awfully bad? What to do? I tried switching smoothing on/off I tried defaults via terminal with different smoothing settings I tried the RGB fixed they hav

  • Material attribute assigned to a DSO field

    Hello All, A Material attribute needs to be filled with a field from the DSO and should not consider the value which it actually holds in the InfoObject Material. Is it possible to assign this attrbiute without adding a individual field in the Cube?

  • 32DV504B -TV Firmware not loading/showing on TV

    Hi all, I have downloaded the latest firmware upgrade for my TVs (x2) - 32DV504B. I have copied the downloaded file to a USB drive and plugged into the TV. I cannot seem to get the file loaded at all. I have tried numerous USB drives, numerous format

  • E-learning

    hi, i want to do sap sd training through e-learning.can any one suggests me is it worth while to get trained   through e-learning ? thank you. regards, suresh.