Glassfish SQLException: Error in allocating a connection in MySQL

Hi All,
I have just installed the Bundled Netbeans 6.5, Glassfish v2 and v3 Prelude (not including MySQL) that runs on top of MySQL 5.1 (separate installation) on server A, in order to mirror another similar working installation (Bundled Netbeans 6.1, Glassfish v2 including MySQL 5.0) on server B. Both Windows XP servers have got identical setups in their respective C:\Program Files\glassfish-v2ur2\domains\domain1\config\domain.xml files. However, the following error was encountered when trying to deploy the same EnterpriseApplication on server A which had no such problem on server B:
Glassfish Server Log
Server: unknown
RAR5099 : Wrong class name or classpath for Datasource Object
java.lang.ClassNotFoundException: com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1498)
        at com.sun.gjc.common.DataSourceObjectBuilder.getDataSourceObject(DataSourceObjectBuilder.java:251)
        at com.sun.gjc.common.DataSourceObjectBuilder.constructDataSourceObject(DataSourceObjectBuilder.java:106)
RAR5038:Unexpected exception while creating resource for pool mysqlPool. Exception : Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
RAR5117 : Failed to obtain/create connection from connection pool [ mysqlPool ]. Reason : Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource]
Exception occured in J2EEC Phase
com.sun.enterprise.deployment.backend.IASDeploymentException:
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
Error Code: 0
        at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:305)
EnterpriseApplication (EJB 3.0) Deployment output
Deploying application in domain failed; Deployment Errorjava.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource --
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
Error Code: 0
C:\Documents and Settings\Jack\EnterpriseApplication\EnterpriseApplicationBean-ejb\nbproject\build-impl.xml:400: The module has not been deployed.Even manually re-creating the same project (as opposed to getting a copy of the Netbeans project folder from server B) did not make any difference. Likewise, the following jdbc connection pool definition was added possibly by Netbeans from Server Database JDBC Connection Resource setting:
      <property name="URL" value="jdbc:mysql://localhost:3306/employeeDB"/>
      <property name="driverClass" value="com.mysql.jdbc.Driver"/>
      <property name="Password" value="abcdef"/>
      <property name="portNumber" value="3306"/>
      <property name="databaseName" value="employeeDB"/>
      <property name="serverName" value="localhost"/>
      <property name="User" value="applicationuser"/>Can anyone see where the problem lies?
Any assistance would be much appreciated.
Thanks in advance,
Jack

I'm new to Java and GlassFish and I get the same error message when trying to ping my created data pool for MySQL. Inside the NetBeans IDE running Java Swing Applications + MySQL connection via JDBC, it works fine (Classpath settings ok). I set the same path to the JVM settings in Glassfish but every time I try to ping it the mentioned error occurs. Any suggestions?

Similar Messages

  • Java.sql.SQLException: Error in allocating a connection. Cause: No Password

    I'm deploying an EJB Module with a CMP in SJAS from SJSE.
    I get the following exception "java.sql.SQLException: Error in allocating a connection. Cause: No PasswordCredential found" the first time a CMP tries to connect to the MS SQL Server database.
    I can connect through the Admin console (PING works fine) but this error hapens in runtime.
    The datasource classname i'm using is "com.sun.sql.jdbcx.sqlserver.SQLServerDataSource" which is suggested by the SJSE.
    Any help will be welcome...
    Nelson Marques

    If you are using Netbeans, then this link might help:
    http://forum.java.sun.com/thread.jspa?forumID=136&threadID=598423
    Otherwise, have you try this ?
    Verify your sun-ejb-jar.xml does not use default-resource-princinpal element:
    <res-ref-name>jdbc/pdisasdb</res-ref-name>
    <jndi-name>jdbc/pdisasdb</jndi-name>
    <default-resource-principal>
    <name>myname</name>
    <password>geheim</password>
    </default-resource-principal>
    </resource-ref>

  • Java.sql.SQLException: Error in allocating a connection

    hi,
    I have developed enterprise application using net beans IDE 5.5.I created one enity bean using sql server database.When i tried deploy this project i am getting following error...
    Internal Exception: java.sql.SQLException: Error in allocating a connection.
    Cause: Class name is wrong or classpath is not set for : com.microsoft.jdbc.sqlserver.SQLServerDataSourceError
    can anybody please help me.....where i went wrong...i am new to netbeans IDE
    regrds
    patel

    u need to download the three jar files.
    download the following jar files and add in ur classpath.
    msutil-2000.sp2-lib.jar
    msbase-2000.sp2-lib.jar
    mssqlserver-2000.sp2-lib.jar
    This is sample program...
    u can test in standalone first and do in netbeans....
    import java.sql.*;
    public class querybean {
    public String getdata(String sql) {
         try {
    System.out.println("testing connection ");
              Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
         Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433;databaseName=master;user=sa;password=userpass;");
         Statement statement = connection.createStatement();
    ResultSet rs = statement.executeQuery(sql);
    System.out.println("testing connection pooling");
    while(rs.next()) {
    System.out.println(rs.getString(1));
    } catch(Exception e1) {
    System.out.println("exception caught" + e1);
    return "";
    public static void main (String args[]) throws Exception {
    querybean qb = new querybean();
    qb.getdata("select * from sampletable");
    I belive it will work now

  • Error in allocating a connection + JPA

    Hello Experts,
    I am trying my first ever JPA Program.I am using netbeans 6.0.In netbeans there is a sample application for WebJPA.In that they are calling entity from servlet.I just made a different project.I have copied all files in my project.At the time of creating persistence unit I have used DB2.But now when I am compiling my project I am getting the following errors.Seems there is some problem with connection to DB2.I have also added the correct jar files during creation of persistence unit.Please help me.Many Thanx in advance.
    *Deploying application in domain failed; Deployment Errorjava.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: Failure in loading T2 native library db2jcct2, reason: java.lang.UnsatisfiedLinkError: no db2jcct2 in java.library.path --*
    Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: Failure in loading T2 native library db2jcct2, reason: java.lang.UnsatisfiedLinkError: no db2jcct2 in java.library.path
    Error Code: 0
    Deployment error:
    The module has not been deployed.
    See the server log for details.
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:163)
    at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:104)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor1068.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:277)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:460)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
    Caused by: The module has not been deployed.
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:157)

    Hi garava,
    Thanks for the reply.I had followed the same path while creating Persistence Unit.I googled this error & I found a solution where I need to set the NativeLibraryPathPrefix in my JVM.
    For this I went to Servers->Glassfish V2 -> JVM-> .There I set NativeLibraryPathPrefix = D:\Program Files\IBM\SQLLIB\BIN.
    It's working now.But I can't understand what was the problem & how it got solved.
    One more issue ,suppose tom I am facing the same problem for some other XYZ database.Do I need to change this path again for that database.What this path exactly means.I read it looks for "db2jcc2.dll" in this path.What is the need of this dll if I am including jar files during creation of persistence Unit.
    Please help.Thanks in advance.

  • CTS1.4.1 Samples JDBC test failing with Error in allocating a connection

    Tests under CTS1.4.1 samples>>JDBC>>ee>>testConn>> are failing with the following error :
    Sep 14, 2005 4:27:55 PM com.sun.gjc.spi.DSManagedConnectionFactory createManagedConnection
    WARNING: RAR5113 : Error creating connection from supplied information: Reason - Error while parsing address
    Sep 14, 2005 4:27:55 PM com.sun.enterprise.resource.LocalTxConnectorAllocator createResource
    WARNING: RAR5038:Unexpected exception while creating resource
    Sep 14, 2005 4:27:55 PM com.sun.enterprise.connectors.ConnectionManagerImpl internalGetConnection
    WARNING: RAR5117 : Failed to obtain/create connection. Reason : Connection could not be allocated because: Error while parsing address
    Sep 14, 2005 4:27:55 PM com.sun.gjc.spi.DataSource getConnection
    WARNING: RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: Connection could not be allocated because: Error while parsing address ]
    ERROR: SQL Exception : Error in allocating a connection. Cause: Connection could not be allocated because: Error while parsing address
    ERROR: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: Error while parsing address
    at com.sun.gjc.spi.DataSource.getConnection(DataSource.java:72)
    at com.sun.ts.tests.samples.jdbc.ee.testConn.testConnClient.getConnection(testConnClient.java:252)
    at com.sun.ts.tests.samples.jdbc.ee.testConn.testConnClient.setup(testConnClient.java:91)
    But the mystery is that the main set of JDBC tests (outside of samples) in CTS1.4.1 are running fine.
    One difference I notice is that the tests that are failing use "createManagedConnection".
    The main configurations file "ts.jte" present under %TS_HOME%\bin has all the settings correct. Thats why the main JDBC tests go through fine.
    I wonder where these failing tests pick up the bad "address" from.
    Any help on this would be greatly appreciated.
    Thanks !

    CTS is a paid product and any question regarding that should be answered by a Licencee Engineer. Pls contact the LE regard the setup of CTS or any TCK.

  • JDBC Error in allocating a connection

    Hi,
    I am trying to use an outbound jdbc eway to do a select, but the connection is not being established
    Here is the log error,
    java.sql.SQLException: Error in allocating a connection. Cause: com.microsoft.sqlserver.jdbc.SQLServerDriver
    And here are the config settings from the log
    setPortNumber = [1433]
    setUser = [sa]
    setServerName = [localhost]
    setPassword = [xxxxx]
    setDriverProperties = [setURL#jdbc:sqlserver://localhost:1433;databaseName=eamh;]
    setDatabaseName = [eamh]
    setClassName = [com.microsoft.sqlserver.jdbc.SQLServerDriver]
    Any idea what is wrong?
    Rupert

    The driver classname is not correct. You need to use com.SeeBeyond.sqlserver.jdbc.sqlserver.SQLServerDataSource.
    Let me know if this works.
    Cheers,
    Mac.

  • Error in allocating a connection.

    Hi all!
    I have this problem with my sun application server version 8 and its connection to my mysql database. It works like a charm most of the time, but when I go home at night and come back in the morning I get this error message when trying to access the entity bean that has a bean managed conenction to the database :
    java.rmi.RemoteException: ejbFindAllApplications: Error in allocating a connection. Cause: java.lang.RuntimeException: Got exception during XAResource.start:
         com.sun.corba.ee.impl.javax.rmi.CORBA.Util.wrapException(Util.java:597)
         javax.rmi.CORBA.Util.wrapException(Util.java:277)
         Accedo.EntityBeans.OperatorBean._OperatorHome_Stub.findAllOperators(Unknown Source)
         org.apache.jsp.customer_005fsystem.index_005fcustomerservice_jsp._jspService(index_005fcustomerservice_jsp.java:143)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:102)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:282)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:263)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:210)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
         sun.reflect.GeneratedMethodAccessor1297.invoke(Unknown Source)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:324)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
    I figure it has do with some idle time-out I have forgotten to set or something, but when I log in to the server administration console I can't figure out what's wrong! Anyone else bumped into this issue that can lend a helping hand?
    Yours sincerely
    /ted

    Hi again,
    seems like I found the cause of the problem; the mysql system variable wait_timeout was set to 28800 (8 hours) which caused the server to stop responding. What I did is simply set it to 604800 (equals a week) and hope that it will work, which I will find out tomorrow morning...

  • SQL Insert Error Error in allocating a connection. Cause: No PasswordCreden

    Friends,
    While testing my connection in the Sun java Application Server , I get the following error .
    "SQL Insert Error Error in allocating a connection. Cause: No PasswordCredential found "
    Can somebody please guide ?
    regards
    Dhiraj

    If you are using Netbeans, then this link might help:
    http://forum.java.sun.com/thread.jspa?forumID=136&threadID=598423
    Otherwise, have you try this ?
    Verify your sun-ejb-jar.xml does not use default-resource-princinpal element:
    <res-ref-name>jdbc/pdisasdb</res-ref-name>
    <jndi-name>jdbc/pdisasdb</jndi-name>
    <default-resource-principal>
    <name>myname</name>
    <password>geheim</password>
    </default-resource-principal>
    </resource-ref>

  • Database error #2002 can not connect local mysql server to socket through '/var/run/mysqld/mysqld.sock'(2) on mac os x 10.9.2

    Dear Fellas:
    I received "database error #2002 can not connect local mysql server to socket through '/var/run/mysqld/mysqld.sock'(2)" on mac os x 10.9.2.
    mysql info:
    ps -ef | grep mysql
        0    66     1   0 11:06AM ??         0:00.04 /bin/sh /usr/local/mysql/bin/mysqld_safe --user=mysql
       74   225    66   0 11:06AM ??         0:02.50 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/usr/local/mysql/data/Chuans-MacBook-Pro-2.local.err --pid-file=/usr/local/mysql/data/Chuans-MacBook-Pro-2.local.pid --socket=/var/run/mysqld/mysqld.sock
      501   952   947   0  3:52PM ttys000    0:00.00 grep mysql
    Please help!!

    Fascinated and guessing:
    Something related to sock(2) because that's not part of your copied info. I'm thinking you've doubled up on sockets and the second socket doesn't exist, meaning you should be connecting to the first socket "mysqld.sock" whether automatic or not.
    I've only used GUI tools on purpose, so does this mean you've already got MySQL running and you tried to launch it again manually? Perhaps you already have one instance of a db and you're trying to launch a second instance, and the two can't coexist with a single user local db?
    Assuming this is all local, I'd shut down the db service and restart it, out of hand. I've seen similar messages when I set the db to start up on boot, and it didn't finish shutting down when I tried to restart it manually. Usually the GUI won't let me turn it on because it reports it's already running, but in that case it hadn't finished performing what the GUI was reporting.
    Just speculating.

  • "An unidentified error has ocurred" when connecting to mySQL in Dreamweaver MX

    Hi All,
    I've been trying & failing to figure this out for 2 days. I hope someone can help! I installed xampp on my local machine, got the Apache server, phpMyAdmin, and SQL up and running. My next step is to connect to my MySQL database in Dreamweaver MX. This where I'm running into trouble.
    I've given super access rights to several db users in my MySQL database just to be sure that it wasn't a matter of not-enough-permissions. Here is a screenshot of the privileges: http://www.skyebrannon.com/db_privs.jpg
    I am sure my connection information is correct, as I've used it to create a php page that lists my database tables.Those are working just fine Here is my info:
            $dbhost = "localhost";
            $dbuser = "root";
            $dbpass = "dbpassword";
            $dbname = "camin0_music";
    When I put the same information in my MySQL Connection, I get "An unidentified error has occured".
    Here is a screenshot of the error and my (working) connection info:
    http://www.skyebrannon.com/db_error.jpg
    My apologies if this has been asked & solved. If I missed a thread that answes this, could you please let me know?
    Thanks so much!
    Skye

    Hi All,
    I've been trying & failing to figure this out for 2 days. I hope someone can help! I installed xampp on my local machine, got the Apache server, phpMyAdmin, and SQL up and running. My next step is to connect to my MySQL database in Dreamweaver MX. This where I'm running into trouble.
    I've given super access rights to several db users in my MySQL database just to be sure that it wasn't a matter of not-enough-permissions. Here is a screenshot of the privileges: http://www.skyebrannon.com/db_privs.jpg
    I am sure my connection information is correct, as I've used it to create a php page that lists my database tables.Those are working just fine Here is my info:
            $dbhost = "localhost";
            $dbuser = "root";
            $dbpass = "dbpassword";
            $dbname = "camin0_music";
    When I put the same information in my MySQL Connection, I get "An unidentified error has occured".
    Here is a screenshot of the error and my (working) connection info:
    http://www.skyebrannon.com/db_error.jpg
    My apologies if this has been asked & solved. If I missed a thread that answes this, could you please let me know?
    Thanks so much!
    Skye

  • Error: OGG-00146 - error 600 - Failed to connect to mysql database

    Dear All,
    I am replicating Data from MySQL to Oracle.
    Version of my MySQL is Server version: 5.5.19 MySQL Enterprise Server - Advanced Edition
    Version of Oracle is : Oracle 11gR2
    My extract is giving the following error and I am unable to identify the problem:
    *2012-12-25 14:18:48 ERROR OGG-00146 Oracle GoldenGate Capture for MySQL, netfors.prm: VAM function VAMInitialize returned unexpected result:*
    error 600 - VAM Client Report <CAUSE OF FAILURE : Failed to connect to mysql database WHEN FAILED : While initializing mysql context WHERE FAILED :
    MySQLBinLog Reader Module CONTEXT OF FAILURE : No Information Available!>
    Following are the contents of my /etc/odbc.ini file
    *[netfors]*
    Driver = /usr/lib/libmyodbc3.so
    Description = Connector/ODBC 3.51 Driver DSN
    Server = 10.168.20.226
    Port = 6629
    User = replication
    Password = ******
    Database = netfors
    Option = 3
    Socket = /tmp/mysql_sandbox5519.sock
    When i isql -v netfors replication ***** *
    it say Connected!
    This is my extract:
    EXTRACT NETFORS
    DBOPTIONS HOST 10.168.20.226, CONNECTIONPORT 6629
    SOURCEDB [email protected]:6629, USERID replication, PASSWORD ******
    RMTHOST 10.168.20.31, MGRPORT 7809
    RMTTRAIL /u01/app/oracle/oradata/GG/dirdat/n1
    TRANLOGOPTIONS ALTLOGDEST /root/sandboxes/msb_5_5_19/data/mysql-bin.index
    TABLE netfors.syslog;
    Extract gets ABENDED
    Kindly help on this.
    Regards, Imran

    Got it solved some how, golden gate was trying to connect with default socket file.
    */tmp/mysql.sock*
    while my socket file was
    */tmp/mysql_sandbox5519.sock*
    I changed it to default and got rid of the error.
    Thanks for the help.
    Regards, Imran

  • ERROR#: 2002 can't connect to MySQL server through socket '/var/mysql/mysql.sock'

    I was following this adobe article (
    http://www.adobe.com/devnet/dreamweaver/articles/php_macintosh.html)
    to set up PHP and MySQL and connect a MySQL database to dreamweaver
    in Mac OS 10.4.8 and I kept getting:
    "Can't connect to MySQL server through socket
    '/var/mysql/mysql.sock' ERROR#: 2002".
    After a lot of searching I came across
    this
    article which said that there was an error in the PHP and MySQL
    connection or something.
    Anyway all I had to do was type (in a TERMINAL window):
    $ sudo mkdir /var/mysql
    $ sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
    and that fixed the problem, otherwise the adobe article
    worked very well.
    Check out the "this article" link to get the fix straight
    from the horse's mouth.

    I was following this adobe article (
    http://www.adobe.com/devnet/dreamweaver/articles/php_macintosh.html)
    to set up PHP and MySQL and connect a MySQL database to dreamweaver
    in Mac OS 10.4.8 and I kept getting:
    "Can't connect to MySQL server through socket
    '/var/mysql/mysql.sock' ERROR#: 2002".
    After a lot of searching I came across
    this
    article which said that there was an error in the PHP and MySQL
    connection or something.
    Anyway all I had to do was type (in a TERMINAL window):
    $ sudo mkdir /var/mysql
    $ sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
    and that fixed the problem, otherwise the adobe article
    worked very well.
    Check out the "this article" link to get the fix straight
    from the horse's mouth.

  • How to fix:  Database connection error (2): Could not connect to MySQL.

    Hi - I am trying to reconnect to a site and continue to get this message.  Can anyone suggest a fix for this?

    That's a server error and has nothing to do with your computer.

  • Problem in establishing connection with mysql 5.0

    Hi,
    I am using JCAPS 5.1. I tried to insert data to mysql database table.
    But i got following error
    java.sql.SQLException: Error in allocating a connection. Cause:
    Physical Connection doesn't exist.
    My intention is to read file in which data are comma seperated and to
    populate those values to a mysql 5.0 database table.
    Sample DATA in file [test.txt]
    111,gg,23,MFG
    112,hh,24,MFG
    113,ii,25,RETAIL
    114,jj,26,IT
    Database table: employee
    eno,ename,eage,edept
    While creating JDBC OTD there is no problem in establishing connection with database. But after deploying i got above error.
    I have used Mysql 5.0 Connector/J JDBC driver. Added JDBC driver jar files to following directories as required.
    1) C:\JavaCAPS51\logicalhost\is\lib
    2)C:\JavaCAPS51\logicalhost\is\domains\test\lib
    Steps i have followed as per JDBC-ODBC -eway user guide doc.
    1) Created USerDefined OTD and added necessary fields
    2) Created JDBC OTD.
    3) Created JAVA collaboration and do business process for inserting
    4) Mapped all components by creating in Connectivity MAp
    5) created necessary external systems in envrionment explorer.[JDBC External System and File External System]
    6)Created Deployment profile
    5) Deployed it.
    After deploying it gives error as
    java.sql.SQLException: Error in allocating a connection. Cause: Physical Connection doesn't exist
    Please let me know the solution for problem.
    Message was edited by:
    VenkateshSampoornam

    In the environment definition,
    -> External Application JDBC
    -> Properties
    -> Outbound JDBC Connection
    You have the database URL in the "DriverProperties" field
    Valid URL would be : jdbc:mysql://localhost:3306/caps
    !! The doc says that this field is optional !! Seems to be an error in the doc:
    Hope this helps
    Seb

  • Remote connection to MySQL

    I am trying in Java to connect remotely to a database and use the following code:
    import java.io.*;
    import java.lang.*;
    import java.util.*;
    import java.sql.*;
    public class Test {
    public static void main(String args[]) {
    Connection con = null;
    try {
    Class.forName("com.mysql.jdbc.Driver").newInstance ();
    con = DriverManager.getConnection("jdbc:mysql://llsti.org:3306/universalaccess?user=*****&password=****");
    if(!con.isClosed())
    System.out.println("Successfully connected to " +
    "MySQL server using TCP/IP...");
    } catch(Exception e) {
    System.err.println("Exception: " + e.getMessage());
    } finally {
    try {
    if(con != null)
    con.close();
    } catch(SQLException e) {}
    But it doesnt do anything.. it compiles properly but then it just stuck in getConnection(). it doesnt print thereafter.
    Any suggestion would be of great help.
    Thanks,
    Akhil

    Hi,
    So what network settings I am suppose to perform? I
    would be really greatful for any more suggestions.
    I cannot put this really any clearer because it's been told to you before. You are getting a 2003 error. This is what the MySQL site has to say about that error.
    The error (2003) Can't connect to MySQL server on 'server' (10061) indicates that the network connection has been refused. You should check that there is a MySQL server running, that it has network connections enabled, the network port you specified is the one configured on the server, and that the TCP/IP port you are using has not been blocked by a firewall or port blocking service.
    Please talk to your local network administrator and/or the administrator of the MySQL database for assistance. Either the database is not listening on that port or there is a firewall blocking your access either at your end or at the server end.
    This is NOT a Java problem. You cannot connect using any other tool to this database.

Maybe you are looking for