JDBC or account connectivity problem?

Dears
I'm new with JDBC and i have a small issue while connecting.
I use JDBC Connector with MySql5.1 on my mac
Basically i have installed the server and by default the account with username "root" and empty password is there.
I have created a database "Test", when i try to access it with the username "Root" and password "" it works fine, the problem comes when i try to access with another username e password
Via MySql Administrator i have created a new account, when i try to access the "Test" database with the new user and password (in exactly the same way as with the 'root' user, only with ofcourse the new username and password) it gives me an access Exception "Access denied for user 'newUsername' on database "Test".
I annot understand why, i mean the username and password have access to the whole server not only to one specific database, so it should be ok to access this "Test" database with a new username and pass.
Any advice?

I doubt this has anything to do with JDBC. At least excluding that you do have the user/password correct in the java code.
You probably need to provide roles or permissions specific to the database in relation to the user.

Similar Messages

  • JDBC thin driver connection problems using cybersafe authentication

    Hi
    i am trying to use jdbc thin driver to connect to oracle 8.1.7 DB using ASO and cybersafe authentication.
    Question:
    Does the oracle jdbc thin driver in 8.1.7.0.0 support third-party authentication features supported by Oracle Advanced Security--such
    as those provided by RADIUS, Kerberos, or SecurID
    i am getting the following error.
    Exception in thread "main" java.sql.SQLException: invalid arguments in call
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
    at oracle.jdbc.dbaccess.DBError.check_error(DBError.java)
    at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
    va)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
    at java.sql.DriverManager.getConnection(DriverManager.java:517)
    at java.sql.DriverManager.getConnection(DriverManager.java:146)
    at ASOJdbc.main(ASOJdbc.java:43)
    Following is the program i am trying.
    public class ASOJdbc {
         public static void main(String args[]) throws SQLException {
              String url = "jdbc:oracle:thin:@son1129:1521:sonias";
              Connection con;
              String query = "select EMPNO, ENAME from EMP";
              Statement stmt;
              // ASO Stuff
                   Properties props = new Properties();
                   try {
                   props.put("oracle.net.authentication_services", "CYBERSAFE");
                   props.put("oracle.net.authentication_gssapi_service", "oracle/[email protected]");                    
                   props.put("oracle.net.encryption_types_client", "DES");
                   props.put("oracle.net.encryption_types_server", "DES");               
                   props.put("oracle.net.crypto_seed", "4fhXXXX");               
                   } catch (Exception e) { e.printStackTrace();
                   DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                   // ASO
                   con = DriverManager.getConnection(url, props);
                   stmt = con.createStatement();
                   ResultSet rs = stmt.executeQuery(query);
                   stmt.close();
                   con.close();          
    jdk version: jdk 1.3.1
    Oracle jdbc driver information, which i obtained as per Note 94091.1
    =============
    Database Product Name is Oracle
    Database Product Version is Oracle8i Enterprise Edition Release 8.1.7.1.1 - Production With the Partitioning option
    JServer Release 8.1.7.1.1 - Production
    JDBC Driver Name is Oracle JDBC driver
    JDBC Driver Version is 8.1.7.0.0
    JDBC Driver Major Version is 8
    JDBC Driver Minor Version is 1

    1. What JDBC Thin client Driver are you using? (version) If you don't know, open up the Manifest.
    2. the JDBC/OCI driver is a thick driver. It uses the oracle client, and therefore should read the tnsnames.ora
    3. You have yet to give us any ORA- errors, which would help immensely in troubleshooting.

  • 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

  • MSSQLServer jdbc connect problem on ODI 11G R2

    I have a MS SQL Server jdbc connect problem on ODI 11G R2 / Windows server 2008 64 bits.
    Tried, one by one, all versions of Microsoft drivers.
    Sqljdbc4.jar copied to : %appdata%\odi\oracledi\userlib\
    The Topology connect syntax is :
    driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
    URL : jdbc:sqlserver://<host>:1433
    => All the topology tests end with time-outs.
    Installed 10G ODI.
    Works with 1.4 java and sqljdbc.jar version 2 jdbc driver.
    Times out with version 3 and/or Sqljdbc4.jar + JAVA_HOME & ODI_JAVA_HOME set to 1.6 path.
    also tried, with no success (time-outs) on either 10g or 11g :
    com.inet.tds.TdsDriver
    jdbc:inetdae7://<host>:1433?database=<DB>
    same results for :
    net.sourceforge.jtds.jdbc.Driver
    jdbc:jtds:sqlserver://<host>:1433
    Any suggestions for a fix?
    Many thanks in advance.

    Hello,
    ODI (11g) Studio is certified on Windows 32 bit only, not on 64bit.
    However you may still install it and configure ODI Studio to run with a 32 bit java.
    Details pls see Master Note For ODI 11g Install Issues And Questions (Doc ID 1214428.1).
    To connect to SQL Server:
    # Check and make sure the authentication mode of your Microsoft SQL Server Server is set to "SQL Server and Windows" or "Mixed", otherwise Oracle Data Integrator (ODI) is unable to connect to the database.
    # Before you create the Oracle Data Integrator (ODI) Dataserver in Topology Manager > Physical Architecture, stop all ODI processes, and place the JDBC Driver file in the ODI's userlib and "/drivers" folder.
    For ODI Studio (Local No Agent)
    %APPDATA%\odi\oracledi\userlib
    %APPDATA% is the Windows Application Data directory for the user (usually C:\Documents and Settings\<user>\Application Data).
    Standalone Agent
    ODI_HOME\oracledi\agent\drivers
    Note: If you decide to use the DataDirect driver that comes with ODI 11g install/ embedded in ODI 11g
    weblogic.jdbc.sqlserver.SQLServerDriver
    Then you don't need to worry about this step.
    # Make sure that the database is the default database of the user account employed by ODI for connection, and that the password is correct.
    # Verify (in your Microsoft SQL Server Server network configuration) that TCP/IP has been enabled on port 1433.
    For more details see How To Set Up JDBC Driver Connections For The Microsoft SQL Server For ODI (Doc ID 423914.1)
    If you try sqljdbc.jar, you need to configure ODI_JAVA_HOME to jdk1.5
    sqljdbc4.jar, jdk1.6 (since ODI 11g requires jdk1.6, I'd suggest sqljdbc4.jar)
    More see Compatibility Matrix For Java Machines And JDBC Drivers Used With ODI (Doc ID 807235.1)
    Hope that helps other people who run into this,
    Edited by: user742480 on Apr 4, 2011 12:06 PM

  • 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

  • Why do I get "Connection problem" on my ASUS notebook when I try to access my Yahoo mail account with the new version of Firefox?

    Since I updated firefox to 29.0.1 on my desktop, I am unable to access my email account at Yahoo.com from my ASUS notebook. "Connection problem" pops up when it tries to get new mail. I was getting mail on the ASUS on 3/12/13, but starting today I get that message and no new mail comes to the ASUS.

    I deleted the account on my ASUS email at settings. The ASUS appeared to delete the Yahoo email account, but when I clicked on the shortcut, my yahoo email had updated and everything looks good.
    Thanks for your suggestions!

  • Problem with a JDBC Adapter when connect to Instance on SQL Server

    Hi,
    Currently I'm setting up a communication channel with the JDBC adapter to work on a SQL Server database. When I use a string without specifying the connection instance, the JDBC driver takes the default instance and connects to a database without problems.
    jdbc: sqlserver: / / Server01; databaseName = IntegraSAP1
    The problem is when I need to connect to another instance of it server.
    jdbc: sqlserver: / / Server01; instanceName = SAP; databaseName = IntegraSAP2
    The JDBC driver, in short, send me the following error:
    Cause Exception: 'Error when attempting
    to get processing resources: com.sap.aii.af.lib.util.concurrent.ResourcePoolException:
    Unable to create new pooled resource: DriverManagerException:
    Can not establish connection:: com.microsoft.sqlserver.jdbc.SQLServerException:
    The connection to the named instance  has failed. Error:
    java.net.UnknownHostException: .
    I appreciate your help,
    Regards,
    Johnny

    Not sure, might be port number is not required in case using instance. Give one more try with :
    jdbc:sqlserver:/ /Server01\SAP; databaseName = IntegraSAP2
    A comment from http://msdn.microsoft.com/en-us/library/ms378428.aspx
    "SQL Server 2000 and SQL Server 2005 allow for the installation of multiple database instances per server. Each instance is identified by a specific name. To connect to a named instance of SQL Server, you can either specify the port number of the named instance (preferred), or you can specify the instance name as a JDBC URL property or a datasource property."
    Regards,
    Sunil Chandra

  • STRUTS - JDBC connection problem

    im using tomcat 5.5.9, jdk 1.5, oracle database...
    � have a project in struts...
    my project works with my compiler with no problem...
    *i setup tomcat on C:\jakarta-tomcat-5.5.9
    and � made these setting for tomcat:
    � added these strings to my CLASSPATH
    --C:\jakarta-tomcat-5.5.9\common\lib\servlet-api.jar
    --C:\jakarta-tomcat-5.5.9\common\lib\jsp-api.jar
    after � deployed my project under tomcat there was a "classes12.zip" file under this path:
    C:\jakarta-tomcat-5.5.9\webapps\BILGISU\WEB-INF\lib
    � changed it to class.jar
    also � have other .jars under the same path above.
    these jars are:
    classes12.jar
    commons-beanutils.jar
    commons-collections.jar
    commons-dbcp.jar
    commons-digester.jar
    commons-fileupload.jar
    commons-lang.jar
    commons-logging.jar
    commons-pool.jar
    commons-validator.jar
    jakarta-oro.jar
    jdbc2_0-stdext.jar
    struts.jar
    struts-legacy.jar
    THE PROBLEM IS:
    my index page is a "login" page..
    i can open the login page under tomcat.
    but when � enter the username and password, page says it is wrong username or password although these are true parameters...
    i think i still have a connection problem but � dont know how to solve...
    MY SEARCHES SAYS:
    you have to reconfigure "C:\jakarta-tomcat-5.5.9\conf\server.xml" like that:
    <Resource name="jdbc/myoracle"
    auth="Container"
    type="javax.sql.DataSource"
    driverClassName="oracle.jdbc.driver.OracleDriver"
    url="jdbc:oracle:thin:[email protected]:1521:mysid"
    username="scott"
    password="tiger"
    maxActive="20"
    maxIdle="10"
    maxWait="-1"/>
    Resource name="jdbc/myoracle" ->HERE WHAT IS "myoracle"??? DOES IT BELONG TO MY PROJECT?
    you have to reconfigure "C:\jakarta-tomcat-5.5.9\conf\web.xml" like that:
    <resource-ref>
    <description>Oracle Datasource example</description>
    <res-ref-name>jdbc/myoracle</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    will i write this to my web.xml
    and what is "auth=Container" here???????
    thanks in advance
    yasin

    ONE MORE QUESTION
    Im defining the datasource in my "struts-config.xml"
    do i have to define them again in "tomcat/conf/server.xml" ...

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

  • Jsp jdbc connectivity problem.

    i'm getting the following error
    "HTTP Status 500-----
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: /create_user.jsp(2,4) Invalid directive
    org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
    org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
    org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)
    org.apache.jasper.compiler.Parser.parseDirective(Parser.java:527)
    org.apache.jasper.compiler.Parser.parseElements(Parser.java:1568)
    org.apache.jasper.compiler.Parser.parse(Parser.java:132)
    org.apache.jasper.compiler.ParserController.doParse(ParserController.java:212)
    org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
    org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:156)"
    for the jsp file is :
    <%@ page import="java.sql.*" %>
    <%@ //page errorPage="exceptionHandler.jsp"%>
    <%
    String connectionURL = "jdbc:mysql://localhost:3306/decipher?user=localhost;password=passwd";
    Connection connection = null;
    Statement statement = null;
    ResultSet rs = null;
    %>
    <html><body>
    <%
    String nr="nr";
    String a= request.getParameter("emp_id");
    String b= request.getParameter("name");
    String c= request.getParameter("department");
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    connection = DriverManager.getConnection(connectionURL, "root", "passwd");
    statement = connection.createStatement();
    statement.executeUpdate("use decipher");
    statement.executeUpdate("Insert into candidate_details values ('" +a+ "','" +b+ "','" +c+ "')");
    %>
    sucesssfully created New Account
    </body>
    </html>"

    bmahesh7feb wrote:
    org.apache.jasper.JasperException: /create_user.jsp(2,4) Invalid directiveAt line 2, character 4 of create_user.jsp there's an invalid directive. This is a plain code syntax error.
    <%@ //page errorPage="exceptionHandler.jsp"%>What are those slashes doing there? Do you think that those Java style comments outcomments the JSP line? It is JSP code, it is not Java code. Remove the whole line or use JSP comments.
    As for the remnant of your JSP code, there are a lot of flaws in there. First step to in the right direction would be to stop using scriptlets in JSP. Good luck.

  • JDBC SqlServer connection problem

    Hi,
    I'm trying to connect to a local Sql Server database. I started out connecting to a database on another computer on the network by using the following code:
    //Set up connection to database
    String driverName = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
    String serverName = "10.42.8.102";
    String portNumber = "1433";
    String mydatabase = serverName + ":" + portNumber;
    String databaseName = "traffic";
    String url = "jdbc:microsoft:sqlserver://" + mydatabase +";databaseName="+databaseName+";";
    String username = "sa";
    String password = "foobar";
    // Load the JDBC driver
    Class.forName(driverName);
    // Create a connection to the database
    connection = DriverManager.getConnection(url, username, password);
    This worked fine. However, when I started trying to connect to a database on my own computer, I started having problems. The database I'm trying to connect to is listed under the node "TERRAIN\BEATTHETRAFFIC" in SqlServer's Enterprise Manager. The database name is still traffic, and the user name and password are unchanged. My new code is as follows:
    String driverName = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
    String serverName = "localhost/TERRAIN/BEATTHETRAFFIC";
    String portNumber = "1433";
    String mydatabase = serverName + ":" + portNumber;
    String databaseName = "traffic";
    String url = "jdbc:microsoft:sqlserver://" + mydatabase +";databaseName="+databaseName+";";
    String username = "sa";
    String password = "foobar";
    // Load the JDBC driver
    Class.forName(driverName);
    // Create a connection to the database
    connection = DriverManager.getConnection(url, username, password);
    I have also tried the following as the serverName:
    "TERRAIN\\BEATTHETRAFFIC"
    "localhost/TERRAIN\\BEATTHETRAFFIC"
    "127.0.0.1/TERRAIN\\BEATTHETRAFFIC"
    I have tried the above with / instead of \\ as well.
    With these, I get the error:
    [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
    I have also tried doing
    "localhost:TERRAIN\\BEATTHETRAFFIC" and
    "localhost:TERRAIN/BEATTHETRAFFIC" and used 127.0.0.1 instead of "localhost" as well.
    but with these I get
    [Microsoft][SQLServer 2000 Driver for JDBC]Unable to connect. Invalid URL.
    I'm honestly at my wits' end here. I haven't really tried to connect to a Sql Server database before, and haven't done much work with connecting to databases in general, so maybe I'm making some glaringly obvious mistake, so if anyone could point it out, I'd be very grateful.

    For the value of serverName, you need to use an Internet-style host name, or an IP-address, not a Windows resource name.
    Examples of an internet-style host name are:
    this_host
    this_host.my_company.com
    Names with slashes in them are not Internet-style.
    The requirement is that name be something that your operating system can convert to an IP address. At least on newer versions of Windows (and most versions of Unix/Linux) you can find out the host name, with the "hostname" command. On windows:
    Click the Start button.
    Click the Run... link
    Enter "cmd" into the command line and click OK ( a new command window will open)
    In the new command window, enter "hostname" and hit enter. The system will give you the host name you need to use (upper/lower case does not matter).
    To confirm that the name ought to work, in that still-open command window, enter "ping [whatever the host name is]". You should get about 10 lines back that includes 4 lines that begin with "Reply from [your IP address] ..."

  • Jdbc connection problem

    Hi All,
    I have problem with connection to Oracle database using both 'oci8' and 'thin' types for java application run within j2ee version 1.2.1 Error messages below.
    If I use oci8 with stand-alone java application the connection and data access work fine.
    I use:oracle 8i (817); jdk 1.2.2; j2ee 1.2.1 on window 2000
    Please help - thanks
    binam
    The Errors: with oci8:
    connection ERROR...access denied (java.lang.RuntimePermission loadLibrary.ocijdbc8 )
    The Error with: "thin":
    oracle.net.TNSAddress.SOException
    at oracle.net.TNSAddress.ServiceAlias.initFromNVPair(Unknown Source)
    at oracle.net.TNSAddress.ServiceAlias.initFromString(Unknown Source)
    at oracle.net.resolver.AddrResolution.resolveAddrTree(Unknown Source)
    at oracle.net.resolver.AddrResolution.resolveAndExecute(Unknown Source)
    at oracle.net.ns.NSProtocol.establishConnection(Unknown Source)
    at oracle.net.ns.NSProtocol.connect(Unknown Source)
    at oracle.jdbc.ttc7.TTC7Protocol.connect(TTC7Protocol.java:1213)
    at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:209)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:249)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
    at java.sql.DriverManager.getConnection(DriverManager.java:457)
    at java.sql.DriverManager.getConnection(DriverManager.java:137)
    at Employee.main(Employee.java:23)

    Hello!
    I had this same problem using thin. Then I changed tnsname in getConnection by address:port:sid. Like below.
    conn = DriverManager.getConnection ("jdbc:oracle:thin:@XXX.XXX.XXX.XXX:1521:SIDNAME","LOGIN","PASSWORD");
    It worked very well.
    null

  • Filemaker JDBC connection problem

    I wonder if anyone with a lot of initiative and intelligence can help me with a connection problem.
    An ordinary copy of the Filemaker Pro database only accepts local JDBC connections - i.e. from the same machine.
    That's Ok because I also have a very expensive Filemaker Server license and Filemaker Server accepts connections from anywhere.
    However this causes me rather boring testing problems. My portable computer, where I write all my code, is a dual-boot machine (Windows and Linux), and for testing purposes I want to use an ordinary copy of Filemaker Pro on the Windows part, and throw queries at it from the Linux part. With the old version of Filemaker Pro, this was possible, with the new version, it is not (only connections from the same machine are accepted).
    Question: is there any way of writing a programme in the middle, hosted on the Windows part, that accepts connections from the Linux part, and then passes them on to the Filemaker Pro copy - which will then think that the query came from the local machine - and will then take the answer and relay it to the Linux part?
    Any help gratefully received.

    Question: is there any way of writing a programme in
    the middle, hosted on the Windows part, that accepts
    connections from the Linux part, and then passes them
    on to the Filemaker Pro copy - which will then think
    that the query came from the local machine - and
    will then take the answer and relay it to the Linux
    part?Just a small question. To my understanding dual boot means at a given time your computer will be running only one OS (either windows or linux) right?. Or are you running a VM with linux inside your windows?

  • JDBC - Oracle 8.1.7 Connection Problem

    Hi,
    Things were working great as long as i was with Oracle 8.1.6. All hell broke loose as soon as i tried to connect to Oracle 8.1.7. Only the IP, Service name, DB_Id & Db_Pass has changed in the connection string. Yet on the below statement
    DriverManager.getConnection("jdbc:oracle:thin:@192.168.172.34:1521:epcjobs","epcperf","epcperf");
    i get the following exception
    java.sql.SQLException: Protocol violation
    at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:391)
    at oracle.jdbc.ttc7.O3log.receive2nd(O3log.java:651)
    at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:172)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:103)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:148)
    Seems some problem in the protocol or sub-protocol name or do i have to change my Oracle Drivers?
    If any one has encountered this issue, please enlighten me.
    Note: I can connect successfully using SQL+.
    many thanks in advance,
    Pawan

    Just a guess...
    The Oracle comm processes (net8 or whatever it is called) allows for different protocols to communicate. Your server is set up for a different protocol than the old one was. Either the client or the server needs to adjust.
    You can test this by creating a TSN and using sqlplus to connect. Once it works open up the TSN file (*.ora?) and get the correct params from there.

  • Help!! JDBC local connection problem

    java.sql.SQLException: E/A-Exception: The Network Adapter could not establish the connection
    trying to connect to Oracle database 9.2 on local machine that is part of network, Windows XP, using jdbc.
    am using following as connect string :
    DriverManager.registerDriver(new
    oracle.jdbc.driver.OracleDriver());
    Connection conn =
    DriverManager.getConnection("jdbc:oracle:thin:@<server_name>:1521:<database_name>",username,password);
    Is this correct?
    Had no problems using above connecting to a local database on a laptop, also Oracle 9.2, also Windows XP, but not on a network.
    tried also :
    ("jdbc:oracle:thin:@<server_name>.<Domain_name>:1521:<database_name>",username,password);
    and
    ("jdbc:oracle:thin:@<server_name>.<Domain_name>:1521:<global_dbname>",username,password);
    but still same error message.
    Can connect to database with sqlplus no problem.
    Listener is running and listening on port 1521.
    Any ideas?
    Any help would be greatly appreciated!!
    Thank you!
    Gil

    Okay, connected.
    It looks like the correct form is :
    Connection conn =
    DriverManager.getConnection("jdbc:oracle:thin:@<server_name>:1521:<SID_NAME>",username,password);
    got SID_NAME from listener.ora

Maybe you are looking for