: Could not create connection; - nested throwable: (java.sql.SQLException: Access denied for user 'adobe'@'localhost' (using password: YES))

hi all can anyone help me i am geting Exception while starting LCES server
: Could not create connection; - nested throwable: (java.sql.SQLException: Access denied for user 'adobe'@'localhost' (using password: YES))

hi all can anyone help me i am geting Exception while starting LCES server
: Could not create connection; - nested throwable: (java.sql.SQLException: Access denied for user 'adobe'@'localhost' (using password: YES))

Similar Messages

  • Error...java.sql.SQLException:Access denied for user

    Hi,
    I am getting the following error message while connecting with the MySQL .(O/S :Sun OS 5.6)
    Error.....java.sql.SQLException: Invalid authorization specification: Access denied for user: 'some_user&password@localhost' (Using password: NO)
    Note that i have given all permission to the user using,
    GRANT ALL PRIVILEGES .......................
    The code i have used to connect with the database is,
    import java.io.*;
    import java.sql.*;
    class test
    public static void main(String a[])
    try
    Connection con;
    Statement stmt;
    ResultSet rs;
    Class.forName("org.gjt.mm.mysql.Driver");
    con=DriverManager.getConnection(jdbc:mysql://localhost/db_name?user=some_user&password=some_pass");
    stmt=con.createStatement();
    //do something with resultset
    catch(Exception e)
    System.out.println("Exception in second try.."+e);
    plese guide me on this problem to solve.
    Thankz,
    Bala.

    Hi friends...
    I've read the last post...
    The problem that I have is as follow....
    1. I have installed on my machine MySQL 5.0 Server running
    1.1 I have a database called "base1"
    1.2 User "root", password "works"
    1.3 I have the following sentence to connect it using JDBC
    Connection con = DriverManager.getConnection("jdbc:mysql://localhost/base1", "root", "works");
    More notes:
    - I use the JDBC 5.0
    - My Machine is a Windows XP SP2 Pentium 3.0 512Mb
    and it connects����
    but I have this environment to develop applications, now that I want to connect to Production Environment happens the following:
    2 The Production database is mounted on a Linux Server with MySQL 3.2.
    2.1 I change the sentences as follow:
    Connection con = DriverManager.getConnection("jdbc:mysql://192.168.0.7/base1", "user", "password");
    2.3 But a message appears when I run the Java Program:
    java.sql.SQLException:Access denied for user: '[email protected]' (Using password: YES)
    2.4 As you can see it changes the IP Address...
    More notes:- I have the MySQL Query Browser and I got connection.
    - The IP that display the Error Message is my Second IP configurated on my Network Properties.
    - Server is a Pentium 4 3.0 GHz 2Gb Linux Red Hat 3.0
    I leave this case for the spider... I hope that somebady has the solution.
    What is the problem? Why the JDBC doesn't respect the IP that I wrote.

  • MySQL connection with OWB 11gR2 results in "access denied for user"

    Hello,
    I just try to establish a connection to a MySQL database with OWB 11gR2, but I always get the error "access denied for user...". I did the things written on [http://blogs.oracle.com/warehousebuilder/2010/01/owb_11gr2_mysql_open_connectivity.html] and I also used the platform configuration from this description. Newest JDBC driver was downloaded and I put the jar-file into the folder OWB_HOME/owb/lib/ext. The definition of the MySQL platform worked and the entry "MySQL" was created in OWB, but no connection can be established. I also tried other tools like MySQL Administrator in order to find out whether the problem is caused by network configuration or sth. like that, but with this tool the connection works.
    OWB is installed on OpenSuse 11.1 64bit. Does anyone know why this error occurs? Perhaps I missed some configuration tasks, which I don't know so far?
    I'm looking forward to your answers.
    Greetings
    Joerg

    Hi David,
    thank you for your reply. The corresponding user has already got this host setting. Anyway he got the wildcard '%' and with other tools I can connect.
    I solved the problem now due to just trying around with usernames. The error was quite funny: OWB changes the username always into upper case and MySQL cannot handle this username. The username must match 100% to be able to login.
    Now I just changed the user in MySQL and wrote the username in upper case. But in fact I would like to know if it is possible to avoid that OWB changes the username, with quotes it didn't work ;-)
    Greetings
    Joerg
    UPDATE:
    Now I'm facing another problem: the connection works, but I cannot import any metadata. When I click on "Browse" to select the correct schema in MySQL DB, no result is displayed. The user anyway has go the privileges to select data from this schema. I also tried to provide the user with every possible privileges for this schema, but I still cannot select any schema. When I write the schema manually and then try to import database objects iin OWB the error message "definitions of userdefined metadata interface are invalid" is displayed (translated from german, so the wording could be different). Does anybody have an idea what the problem could be?
    Edited by: Scantid on 15.01.2010 00:41

  • Java.sql.SQLException: Login failed for user 'ccms'.

    Windows Server 2003 R2 Enterprise x64 Edition service pack 1
    SQL Server 2000 Enterprise edition 32 bit, SP4 : 2000.8.00.2039
    jdbc driver: jtds
    connection string: jdbc:jtdsqlserver://ZH-DATA-4:1434/[dbname];instance=[instance name]
    the connectivity works fine...almost.
    I have 2 identical sql servers one of which is linked to the other via a linked server config which for one particular query gives back the error I give in the subject of this thread:
    java.sql.SQLException: Could not get the data of the row from the OLE DB provider 'SQLOLEDB'
    if I run the exact same sql string in query analyser it runs with no problem.
    if have similar queries also running from java which use the linked server and these do not give an error. I am at a loss as to explain why this is happening.
    the query in question joins together a number of views which reference the linked server.
    I have tried everything I can think of including recreating the views and linked server definition.
    If all is OK in query analyser, how can it fail when called over jbdc (especially when all other db requests succeed) ?

    refer below link
    http://blog.soapplied.com/2013/06/websphere-distributed-transactions-with.html

  • What's wrong with this MySQL connection? "Could not create connection to database server"

    I'm able to connect to other MySQL databases but this one particular remote MySQL connection isn't working and I cannot figure it out.  It probably has something to do with the remote server, not CF, but I thought I'd post it here if anyone had an idea.  The MySQL account has full priviledges.
    Here is the message when I try to validate the data source:
    Connection verification failed for data source: test
    com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:  Could not create connection to database server. Attempted reconnect 3  times. Giving up.
    The root cause was that:  com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:  Could not create connection to database server. Attempted reconnect 3  times. Giving up.

    This happened on two servers.  One one, the cause was that skip-networking was turned on.  In the other situation, it appears that the database name was case sensitive, so TEST was not the same as test.  Even though I edited the data source in the CF administrator, it still didn't work (very misleading).  When a coworker entered a new data source with the same information (uppercase database name this time from the start), it worked.
    Has anyone else seen this problem with the case sensitive database names?  And with the data source in CF not updating the case correctly?  Seems like a bug in CF.

  • Could Not Establish Connection to AS Java with Available Profiles

    Hi All,
    I am installing AS Java on SAP Netweaver 7.4 SR2.
    OS: Windows Server 2008r2 and DB: MSSQLSever 2012
    During the installation I got the below error on 28th Phase out of 29th.
    "Deploy Java Components"
    Below is the Error Log as extracted from SAPINST Log File
    [ Error ] Could not establish connection to AS Java on [WIN-9OD90N7C:50204]. Cannot establish connection with any of the available profiles:
    url=WIN-9OD90N7C:50204 protocol=p4 (None); Reason: com.sap.engine.services.rmi_p4.P4IOException: Cannot open connection to host: 192.168.245.130 and port: 50204
    Check if server is started, access point for the protocol is available, and IP/Host name is accessible on network.. Check if the host and port specified are correct and AS Java is up and running.
    [ LOG EXCEPTION ]  :: Could not establish connection to AS Java on [WIN-9OD90N7C:50204]. Cannot establish connection with any of the available profiles:
    url=WIN-9OD90N7C:50204 protocol=p4 (None); Reason: com.sap.engine.services.rmi_p4.P4IOException: Cannot open connection to host: 192.168.245.130 and port: 50204
    Check if server is started, access point for the protocol is available, and IP/Host name is accessible on network.. Check if the host and port specified are correct and AS Java is up and running.
    javax.naming.NamingException: Exception while trying to get InitialContext. [Root exception is com.sap.engine.interfaces.cross.DestinationException: Cannot establish connection with any of the available profiles:
    url=WIN-9OD90N7C:50204 protocol=p4 (None); Reason: com.sap.engine.services.rmi_p4.P4IOException: Cannot open connection to host: 192.168.245.130 and port: 50204
    Check if server is started, access point for the protocol is available, and IP/Host name is accessible on network.]
      at com.sap.engine.services.jndi.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:386)
      at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
      at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
      at javax.naming.InitialContext.init(InitialContext.java:223)
      at javax.naming.InitialContext.<init>(InitialContext.java:197)
      at com.sap.engine.services.dc.api.session.impl.SessionImpl.getContext(SessionImpl.java:215)
      at com.sap.engine.services.dc.api.deploy.impl.DeployProcessorImpl.reconnectDeployer(DeployProcessorImpl.java:1954)
      at com.sap.engine.services.dc.api.deploy.impl.DeployProcessorImpl.waitResultForOfflineDeploy(DeployProcessorImpl.java:1626)
      at com.sap.engine.services.dc.api.deploy.impl.DeployProcessorImpl.deployItems(DeployProcessorImpl.java:903)
      at com.sap.engine.services.dc.api.deploy.impl.DeployProcessorImpl.deploy(DeployProcessorImpl.java:259)
      at com.sap.engine.services.dc.api.cmd.deploy.DeployCommand.performOperation(DeployCommand.java:208)
      at com.sap.engine.services.dc.api.cmd.deploy.DeployCommand.executeCommand(DeployCommand.java:540)
      at com.sap.engine.services.dc.api.cmd.AbstractCommand.execute(AbstractCommand.java:197)
      at com.sap.engine.services.dc.api.cmd.Runner.execute(Runner.java:37)
      at com.sap.engine.services.dc.api.cmd.Runner.main(Runner.java:61)
    Caused by: com.sap.engine.interfaces.cross.DestinationException: Cannot establish connection with any of the available profiles:
    url=WIN-9OD90N7C:50204 protocol=p4 (None); Reason: com.sap.engine.services.rmi_p4.P4IOException: Cannot open connection to host: 192.168.245.130 and port: 50204
    Check if server is started, access point for the protocol is available, and IP/Host name is accessible on network.
      at com.sap.engine.interfaces.cross.Destination.getNextAvailableBroker(Destination.java:64)
      at com.sap.engine.interfaces.cross.Destination.getRemoteBroker(Destination.java:39)
      at com.sap.engine.services.jndi.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:298)
      ... 14 more
    Thanks and Regards
    Anurag

    Hi Anurag
    Could you refer the SAP Notes for your issue
    1571274 - Cannot connect to server using message server ms://
    1925352 - How to check the access points (or ports) being used by a live SAP J2EE server
    BR
    SS

  • Error connecting to database - java.sql.SQLException: Io exception: The Net

    Hello friends,
    I know this question has been asked in a lot of other threads; but my problem is quite unique and that's why I'm starting a new thread...
    When I try to access an Oracle 10g database through a Servlet code using a JDBC thin driver (both Tomcat and the database are running on Solaris 9), I get the following error:
    "Error connecting to database - java.sql.SQLException: Io exception: The Network Adapter could not establish the connection"
    However, there is another application running on the same server using the same database server (only the actual databases being used differ) and it is able to access the database without any issues. Both of these are absolutely similar applications and I couldn't think of any reasons why one would work and the other wouldn't. I thought they might be conflicting each other and tried running only the problematic application. But even then, I get the same error.
    I know this might not be too relevant but to provide you some more information on the environment, the applications are running on separate Tomcat instances on the same server and they are connected to an Apache web server through Mod jk.
    Any help in solving this problem is greatly appreciated!
    Thanks!
    Regards,
    Yogaesh

    Yogaesh wrote:
    The 'application' that works is also a Tomcat application... It's exactly same as the problematic application in terms of the configuration and stuff... As for the typo errors, I copied the config info and pasted it... So pretty much it should be the same. And to add an additional note, I'm able to connect to the database from my localhost... I mean if I run the problematic application from localhost (without Apache and directly hitting Tomcat) I'm able to access the screens...
    The second part of that (localhost) usually isn't all that useful. You know it is a connection failure so that means the code is running and technically successfully (since connection failure is a legitimate runtime error.)
    You know it isn't a firewall issue because it connects from another app in tomcat. So it must be a configuration issue.
    So something like one of the following.
    1. It isn't the same (we already know this but this particular item means that it is not in fact exactly the same because you deliberately or accidently modified it.)
    2. It isn't pulling the right config. Maybe you aren't packaging it, maybe it is buffered on the server and it is using that rather than what you think it is.
    3. Java code is referring to the wrong name.
    Do this, change the configuration so it points to a server that does not exist. Repack, redeploy. If the error is the same (no diff) then you know that it is not running the code that you think it is. If it does change then you know that it can only be 1.

  • Hi, i am having trouble with my mac mail account, i cannot send or receive any emails because of the server connection problems. Message says it could not be connected to SMTP server. Thanks in advance for your help.

    Hi, i am having trouble with my mac mail account, i cannot send or receive any emails because of the server connection problems. Message says it could not be connected to SMTP server. Thanks in advance for your help.

    Hello Sue,
    I have an iPad 3, iPad Mini and iPhone 5S and they are all sluggish on capitalisation using shift keys. I hope that Apple will solve the problem because it is driving me crazy.
    I find using a Microsoft Surface and Windows 8 phone, which I also have, work as well as all the ios devices before the ios 7 upgrade.
    It has something to do with the length of time that you need to hold the shift key down. The shift key needs to be held longer than the letter key for the capitalisation to work. For some reason, this is a major change in the way we have learnt to touch type on computers. I am having to relearn how to type!
    Michael

  • I continue to recieve the error message "Could not create key: Verify that you have sufficient access to that key" when I am try to down Akamai NetSession Interface that's needed to download the adobe photoshop elements 13 software that I purchased.

    I continue to receive the error message "Could not create key: Verify that you have sufficient access to that key" when I am try to down Akamai NetSession Interface that's needed to download the adobe Photoshop elements 13 software that I purchased.

    cancel the akamai download and download files 1 of 2 and 2 of 2 directly.  put both in the same directory and double click the exe to start installation.
    Downloadable installation files available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4, CS4 Web Standard | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  13 | 12 | 11, 10 | 9, 8, 7 win | 8 mac | 7 mac
    Photoshop Elements:  13 |12 | 11, 10 | 9,8,7 win | 8 mac | 7 mac
    Lightroom:  5.7.1| 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5.5, 5
    Contribute:  CS5 | CS4, CS3
    FrameMaker:  12, 11, 10, 9, 8, 7.2
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

  • What is this error java.sql.SQLException: Bad format for number ?

    Dear All,
    I am reading few values from database. Then I get this error "MyError:Error : java.sql.SQLException: Bad format for number 'Sarawak' in column 6. " So what is this error referring to. I have checked the database column and its value fits according the data type. Any hints please?

    I have checked the database column and its value fits according the data type.Check again. Then check again. Keep checking until you find your error. You are trying to read a string containing "Sarawak" as a number. You have "getInt(6)" or other numeric type, and the 6th column in the select statement is not numeric.

  • Java.sql.SQLException: FATAL ERROR  for DB2

    Hi
    In my scenario IDOC-XI-DB2,
    When I am getting following error message in communication channel. I have checked all the field length, they are correctly displayed. Please let me know how to resolve the same.
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'BI5FILMM.BSOMSAPP' (structure 'StatementInsert'): java.sql.SQLException: FATAL ERROR document format in structure 'StatementInsert': expected 'access' tag(s) not found
    Payload is as follows
    <?xml version="1.0" encoding="UTF-8" ?>
    - <I805_Abstr_CustOutlet_MT>
    - <StatementInsert>
    - <STATUS action="INSERT">
      <table>BI5FILMM.BSOMSAPP</table>
      <key OUTLET_NO="0001231229" OUTLET_RF="0002122756" OMFUNC="CRT" />
    - <access>
      <STATUS>N</STATUS>
      <IFCEDATE>1080701</IFCEDATE>
      <IFCETIME>160849</IFCETIME>
      <OUTLETTYPE>Y</OUTLETTYPE>
      <NAME>DREW SMITH AGAINXXXXXXXXXXXXXXXXXXX</NAME>
      <STREET>E</STREET>
      <STATE>NSW</STATE>
      <POST_CODE>2000</POST_CODE>
      <PHONE_NO>567999</PHONE_NO>
      <ALTPHONE>11111</ALTPHONE>
      <FAX_NO>111</FAX_NO>
      <CNTCT_PERS>Constant</CNTCT_PERS>
      <ALTNAME>Constant</ALTNAME>
      <EMAIL1>Drew_downunder</EMAIL1>
      <EMAIL2>DREW_DOWNUNDER</EMAIL2>
      <SFE_CODE>G</SFE_CODE>
      <BILL_TO>0001231229</BILL_TO>
      <SUPP_DATE>080801</SUPP_DATE>
      </access>
      </STATUS>
      </StatementInsert>
    - <StatementProce>
    - <STATUS action="EXECUTE">
      <table>CC5PTF.BSOMPSAP</table>
      <Para1 isInput="true" type="CHAR">BI5FILMM</Para1>
      <Para2 isInput="true" type="CHAR">BMIJOBD</Para2>
      </STATUS>
      </StatementProce>
      </I805_Abstr_CustOutlet_MT>

    Hi Ria,
    In your input try to make the access tag in capitals(ACCESS) and try. I am not sure though. I think its case sensitive. Just try and let me know. Also your second action="EXECUTE" does not has any access parameters. Refer to this blog:
    JDBC Receiver Adapter -- Synchronous Select – Step by Step
    It might be useful.
    Regards,
    Sanjeev.

  • Java.security.AccessControlException: access denied; for a signed applet

    Hi,
    I have a signed applet which is used to read local files. When I call the applet method which is reading the file, from javascript I am getting "java.security.AccessControlException: access denied ". Where as if the method gets called during applet load, file is read without errors? How can I get over this problem?
    If there is a way loading the applet based on a condition from Javascript, please let me know.
    Thanks,

    [http://forums.sun.com/thread.jspa?forumID=421&threadID=5308353]

  • Could not load file or assembly entity framework 5 .Access denied

    Hi All,
    I am using secure store applicatin id(set credentials using my windows account) to get the data from sql server using entity framework and WCF.
    When trying to run webservice I am getting below error
    System.IO.FileLoadException: Could not load file or assembly 'EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. Access is denied.
    here i am trying to impersonate using my account. All works well when I give access to bin folder.
    But this is not correct. I can't give access to myself to bin folder or temp .
    is there anyway to get rid of this error.
    Any help is appreciated.

    I think giving access to bin or temp folder is not good. Also, EF dll in Gac is not good approach.
    I am wodering why the first time deployed dll is working and if i do iisreset then it's not working
    below is the detail error
    System.IO.FileLoadException: Could not load file or assembly 'EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. Access is denied. 
    File name: 'EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'     at test.test.Services.PropertyService.GetAllProperties(Nullable`1 startRow, Nullable`1 itemCount)     at test.test.Services.PropertyService.GetAllProperties(Nullable`1
    batchSize) in d:\user\PropertyServices\test.test.Services\PropertyService.svc.cs:line 36    === Pre-bind state information ===  LOG: User = Unknown  LOG: DisplayName = EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 
    (Fully-specified)  LOG: Appbase = file://... 
    07/02/2014 13:49:52.69* w3wp.exe (0x05AC)                        0x3630 test SharePoint      Error                        
     00000 High     .../E:/Sites/  LOG: Initial PrivatePath = E:\Sites\bin  Calling assembly : test.test.Services.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.  ===  LOG: This bind starts in default
    load context.  LOG: Using application configuration file: E:\Sites\web.config  LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet.config  LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config. 
    LOG: Post-policy reference: EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089  LOG: Attempting download of new URL
    file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/root/6a4208e7/8a408e87... 
    07/02/2014 13:49:52.69* w3wp.exe (0x05AC)                        0x3630 LandSecurities SharePoint      Error                        
     00000 High     .../EntityFramework.DLL.  LOG: Attempting download of new URL
    file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/root/6a4208e7/8a408e87/EntityFramework/EntityFramework.DLL.  LOG: Attempting download of new
    URL file:///E:/Sites/bin/EntityFramework.DLL.  ERR: A fatal error occurred when retrieving next codebase for download (hr = 0x80070005).

  • Could not create the TimesTen database and load it into memory for the first time

    Hi all,
    I am making tutorial from  http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/timesten/tt1121/1_creating_imdbcache_win/1_creating_imdbcache_win.htm
      I've got problem on step "Create the TimesTen Database and Configure It to be an In-Memory Cache Database" - step two.
    after command: 
    ttisql myDatabaseDSN
    I've got only:
    connect "DSN=inmemoryDB";
    The connection should be successful but it's not. What could be the problem of it ? I want to run it on my laptop with proccesor Intel 5 on Windows 7.
    on

    Per your paste, this is the error:
    9:28:30.65 Info:    :  4412: 7208 0000000001EBFAD0: No such data store
    19:28:30.65 Info:    :  4412: daDbConnect failed
    19:28:30.65 Info:    :  4412: return 1 833 'no such data store!' arg1='c:\timesten\database\my_ttdb'
    So it's trying to find or create a TimesTen checkpoint file with the prefix "my_ttdb" in the directory path c:\timesten\database. Does this directory path exist? Or alternatively have you unticked AutoCreate under the First Connection tab in the TimesTen ODBC Setup for this database? If you have unticked this, then TimesTen won't try to automatically create the database if it does not find any already existing checkpoint files, and will return an 833 error.

  • Sql exception access denied

    well as the topic says I get an access denied exception. This is when I try to connect to the database
    java.sql.SQLException: Access denied for user 'Java'@'localhost' (using password: YES)
    I get the same problem when I try to connect with the root user.
    this is the code I'm using, ignore the threads as they do not matter
    devil_server.java
    import java.io.*;
    import java.net.MalformedURLException;
    import java.net.*;
    import java.sql.*;
    import java.util.*;
    public class devil_server
    //variable types concerning userthreads
    static public int uid;
    static public int nou;
    static public ServerSocket skanal;
    public static Vector users = new Vector();
    public static Vector usernames = new Vector();
    public static String user;
    public static String pass;
         public static void main(String arg[])
         try {
              System.out.println("write the user used to access the mysql database with Devil Chat");
              user = Keyboard.readString(); //read mysql username from keyboard
              System.out.println("write the password used to access the mysql database with Devil Chat");
              String pass = Keyboard.readString(); //read password for user from keyboard
              uid = 0;
              nou = 0; //Number Of Users
              skanal = new ServerSocket(5555);
              new Thread(new devil_server_user(uid)).start();
              while(true)
                   if(uid>nou)
                        String buffer = "buffer";
                        String userl = "user";
                        users.add(buffer);
                        usernames.add(userl);
                        new Thread(new devil_server_user(uid)).start();
                        nou++;
            }//end while
              }/*end try*/ catch (Exception ex) {
               ex.printStackTrace();
              }//end catch
              //con.close
         } //end main
    }//end classdevil_server_user.java
    import java.io.*;
    import java.net.MalformedURLException;
    import java.net.*;
    import java.util.*;
    import java.sql.*;
    public class devil_server_user implements Runnable
    public devil_server_user (int uid){this.uid=uid;};
    public int uid;
    public Socket kanal;
    public InetAddress ip;
    public InputStream streamin;
    public OutputStream streamout;
    public BufferedReader bufferind;
    public PrintWriter printout;
    public String lastuserin;
    public String userinput;
    public String sip;
    public int isadmin;
    //variable types concerning mysql database connectivity
    public Statement stmt;
    //public Statement rstmt;
    public ResultSet rs;
    public Connection conn;
         public void run()
              try {
         System.out.println("Listening on port 5555");
         System.out.println("Waiting for clients");
         kanal = devil_server.skanal.accept();
         devil_server.uid++;
         ip = kanal.getInetAddress();
         sip = ip.toString();
         sip = sip.replace("/","");
         isadmin = 0;
         if(sip.equals("127.0.0.1"))
         isadmin = 1;
         } catch (Exception ex) {
         ex.printStackTrace();
         try {
         System.out.println("Incomming request: "+ ip);
         streamin = kanal.getInputStream();
         System.out.println("Input ready");
         streamout = kanal.getOutputStream();
         System.out.println("Output ready");
         devil_server.users.set(this.uid, printout = new PrintWriter(streamout));
         printout = (PrintWriter)devil_server.users.get(this.uid);
         bufferind = new BufferedReader(new InputStreamReader(streamin));
         catch (IOException e){
         e.printStackTrace();
        try { 
         Class.forName("com.mysql.jdbc.Driver").newInstance();
         conn = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/Java?user="+devil_server.user+"&password=s"+devil_server.pass);
         stmt = conn.createStatement();
         stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
         } catch (Exception e) {
         e.printStackTrace();
         //String request = bufferind.readLine();
         //System.out.println("message from "+ip+" : "+request);
         //printout.flush();
    //forbindelse
    try {
         userinput = (String)bufferind.readLine();
         } catch(Exception e) {
         e.printStackTrace();
         while(!userinput.startsWith("/name"))
         try {
              userinput = (String)bufferind.readLine();
                   } catch(Exception e) {
         e.printStackTrace();
         try
         stmt = conn.createStatement();
         stmt.executeUpdate("INSERT INTO devilchat_users (ip, username, isadmin) VALUES('"+sip+"',' "+userinput.substring(6)+"','"+isadmin+"')");
         new Thread(new devil_server_broadcast("/say "+userinput.substring(6)+" has joined devilchat")).start();
         devil_server.usernames.set(this.uid, userinput.substring(6));
         printout.println("/knock"); //knocks to the client
         printout.flush();
         userinput = (String)bufferind.readLine();
              } catch(Exception e) {
         e.printStackTrace();
         while(!userinput.startsWith("/knock"))
         try {
         userinput = (String)bufferind.readLine(); //waiting for client to knock back
              } catch(Exception e) {
         e.printStackTrace();
         printout.println("/ready"); //tells client it's ready to read userinput
         printout.flush();
         int spoken = 0;
         System.out.println(devil_server.usernames.get(this.uid)+": has connected");
         new Thread(new devil_server_usercheck()).start();
    //starter l�kke som checker for nye input fra useren
         while(true)
         try{
              userinput = (String)bufferind.readLine();
              if(!userinput.equals(lastuserin))
              if(userinput.startsWith("/name"))
              stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
              rs = stmt.executeQuery("SELECT * FROM devilchat_users WHERE uid='"+this.uid+"'");
              rs.absolute(this.uid);
              String oldname = rs.getString("username"); // get old name from database and save it in a string before applying the new name
              stmt = conn.createStatement();
              stmt.executeUpdate("UPDATE devilchat_users set username='"+userinput.substring(6)+"' WHERE uid ='"+this.uid+"'");
              //start a broadcast to tell the name has changed
              new Thread(new devil_server_broadcast("/namechange *** "+oldname+" has changed their name to "+userinput.substring(6)+" ***")).start();
              //change the username in the vector containing usernames
              devil_server.usernames.set(this.uid, userinput.substring(6));
              //start a new listcheck so the list can be updated
              new Thread(new devil_server_usercheck()).start();
              else if(userinput.startsWith("/say"))
              stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
              rs = stmt.executeQuery("SELECT * FROM devilchat_users WHERE uid='"+this.uid+"'");
              rs.absolute(this.uid);
              String sname = rs.getString("username");
              String say1 = userinput.substring(6);
              userinput = "/say "+sname+": "+say1;
              spoken++;
              stmt = conn.createStatement();
              stmt.executeUpdate("UPDATE devilchat_users set spoken='"+spoken+"' WHERE uid ='"+this.uid+"'");
              new Thread(new devil_server_broadcast(userinput)).start();
              else if(userinput.startsWith("/quit"))
              stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
              rs = stmt.executeQuery("SELECT * FROM devilchat_users WHERE uid='"+this.uid+"'");
              rs.absolute(this.uid);
              String name = rs.getString("username");
              printout.println("/quit "+name+" has left devilchat"); //tells client it's ready to read userinput
              printout.flush();
              devil_server.usernames.set(this.uid, "user");
              devil_server.users.set(this.uid, "buffer");
              new Thread(new devil_server_broadcast("/quit "+name+" has left devilchat")).start();
              conn.close();
              kanal.close();
              break;
              lastuserin = userinput;
         catch(Exception e) {
         e.printStackTrace();
    }this is the full exception handling
    java.sql.SQLException: Access denied for user 'Java'@'localhost' (using password
    : YES)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1056)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3376)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3308)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:894)
    at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3808)
    at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1256)
    at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2032)
    at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:729)
    at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
    rce)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
    at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
    :283)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at devil_server_user.run(devil_server_user.java:71)
    at java.lang.Thread.run(Unknown Source)
    java.lang.NullPointerException
    at devil_server_user.run(devil_server_user.java:97)
    at java.lang.Thread.run(Unknown Source)
    I have tried the org driver too and I have tried (url, user, pass) and (url?user=user&password=pass)
    Edited by: Angelwinged_Devil on Mar 13, 2008 6:04 AM

    well it's pretty weird, because I'm trying to make some kind of pattern with the install file I made, although... the install file works and looks like this
    import java.io.*;
    import java.net.*;
    import java.sql.*;
    public class install
        public static void main(String[] args) {
            try {
                // The newInstance() call is a work around for some
                   //older java implementations
                   //org.gjt.mm.mysql.Driver or com.mysql.jdbc.driver
                Class.forName("org.gjt.mm.mysql.Driver").newInstance();
            } catch (Exception ex) {
                ex.printStackTrace();
              try {
              System.out.println("write the user used to access the mysql database with Devil Chat");
              String user = Keyboard.readString(); //read mysql username from keyboard
              System.out.println("write the password used to access the mysql database with Devil Chat");
              String pass = Keyboard.readString(); //read password for user from keyboard
              Connection conn = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/mysql", user, pass);
              Statement stmt = conn.createStatement();
              stmt.executeUpdate("CREATE DATABASE IF NOT EXISTS Java");
              System.out.println("Database has been created");
              Connection con = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/Java", user, pass);
              Statement nstmt = con.createStatement();
              nstmt.executeUpdate("CREATE TABLE IF NOT EXISTS devilchat_users ("+
              "uid int NOT NULL AUTO_INCREMENT, PRIMARY KEY(uid), "
              +"username varchar(25), isadmin bool, spoken int, ip varchar(15))");
              System.out.println("Table has been created");
              con.close();
              conn.close();
                   } catch (SQLException ex) {
        // handle any errors
        System.out.println("SQLException: " + ex.getMessage());
        System.out.println("SQLState: " + ex.getSQLState());
        System.out.println("VendorError: " + ex.getErrorCode() + "\n");
    }

Maybe you are looking for

  • IDOC posting error with dollar values

    Hello, We have recently started posting general ledger transactions via IDOC.  We just noticed that a few of the idocs reflect a status 53 however did not create postings.  When drilling into the message, it says that there were not valid line items.

  • Where is located or where to find the list of printer drivers included in Windows 7

    Hello, Like the http://support.microsoft.com/kb/293360 for XP I wish to have the list of 'built-in' print drivers on Windows 7 Didn't find any from technet, KB, Forum, ... Maybe wrong search critera or else. May someone know where is located the list

  • Choose an entry in Search help and not in its input field

    Hi to all, In my application I have a field with a search help. I want that this field only can be modified using a search help and this field can't be modified directly writing in this field. Is similar to transaction se63 - Translation - Abap objec

  • Issues with account and preferences

    I logged on to my computer and my desktop image was gone, and there are no images in Desktop/ Screen Saver folder in my system preferences. I am missing my widget preferences, and all the adobe and flash plugins I had installed. I am also missing my

  • Rolling upgrade

    Hi all, How to know if my Oracle home is shared to install the patcher 10.2.0.3 to 10.2.0.4 in rolling upgrade for Oracle Clusterware? Which refers to the shared homes, only CRS Home or Oracle Home and CRS Home? I have 3 nodes on RAC. SO: Solaris Ope