MySql with JBoss connection refused

hello,
I am using MYSql with JBOSS, but while running starting JBOSS it
gives
Connection refused error:
MySqlDB] at java.net.PlainSocketImpl.socketCon
MySqlDB] at java.net.PlainSocketImpl.doConnect
MySqlDB] at java.net.PlainSocketImpl.connectTo
MySqlDB] at java.net.PlainSocketImpl.connect(U
MySqlDB] at java.net.Socket.<init>(Unknown Sou
MySqlDB] at java.net.Socket.<init>(Unknown Sou
MySqlDB] at org.gjt.mm.mysql.MysqlIO.<init>(My
MySqlDB] at org.gjt.mm.mysql.jdbc2.IO.<init>(I
MySqlDB] at org.gjt.mm.mysql.jdbc2.Connection.
159)
MySqlDB] at org.gjt.mm.mysql.Connection.connec
MySqlDB] at org.gjt.mm.mysql.jdbc2.Connection.
va:89)
MySqlDB] at org.gjt.mm.mysql.Driver.connect(Dr
MySqlDB] at java.sql.DriverManager.getConnecti
MySqlDB] at java.sql.DriverManager.getConnecti
MySqlDB] at org.opentools.minerva.jdbc.xa.wrap
nnection(XADataSourceImpl.java:118)
MySqlDB] at org.opentools.minerva.jdbc.xa.wrap
nnection(XADataSourceImpl.java:151)
MySqlDB] at org.opentools.minerva.jdbc.xa.XACo
(XAConnectionFactory.java:246)
MySqlDB] at org.opentools.minerva.pool.ObjectP
ol.java:819)
MySqlDB] at org.opentools.minerva.pool.ObjectP
a:569)
MySqlDB] at org.opentools.minerva.pool.ObjectP
a:521)
MySqlDB] at org.opentools.minerva.jdbc.xa.XAPo
APoolDataSource.java:165)
MySqlDB] at org.jboss.jdbc.XADataSourceLoader.
der.java:330)
MySqlDB] at org.jboss.util.ServiceMBeanSupport
ava:93)
MySqlDB] at java.lang.reflect.Method.invoke(Na
MySqlDB] at com.sun.management.jmx.MBeanServer
java:1628)
MySqlDB] at com.sun.management.jmx.MBeanServer
java:1523)
MySqlDB] at org.jboss.util.ServiceControl.star
MySqlDB] at java.lang.reflect.Method.invoke(Na
MySqlDB] at com.sun.management.jmx.MBeanServer
java:1628)
MySqlDB] at com.sun.management.jmx.MBeanServer
java:1523)
MySqlDB] at org.jboss.Main.<init>(Main.java:21
MySqlDB] at org.jboss.Main$1.run(Main.java:121
MySqlDB] at java.security.AccessController.doP
MySqlDB] at org.jboss.Main.main(Main.java:117)
I used the following tag in in JBOSS.jacml
<!-- MYSQL -->
<mbean code="org.jboss.jdbc.XADataSourceLoader" name="DefaultDomain:service=XADataSource,name=MySqlDB">
<attribute name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl</attribute>
<attribute name="PoolName">MySqlDB</attribute>
<attribute name="URL">jdbc:mysql://192.168.0.6/AccountingDb:3333</attribute>
<attribute name="Properties">DatabaseName=AccountingDb</attribute>
<attribute name="JDBCUser"></attribute>
<attribute name="Password"></attribute>
<attribute name="MinSize">0</attribute>
<attribute name="MaxSize">10</attribute>
<attribute name="GCEnabled">false</attribute>
<attribute name="GCMinIdleTime">1200000</attribute>
<attribute name="GCInterval">120000</attribute>
<attribute name="InvalidateOnError">false</attribute>
<attribute name="TimestampUsed">false</attribute>
<attribute name="Blocking">true</attribute>
<attribute name="LoggingEnabled">false</attribute>
<attribute name="IdleTimeoutEnabled">false</attribute>
<attribute name="IdleTimeout">1800000</attribute>
<attribute name="MaxIdleTimeoutPercent">1.0</attribute>
</mbean>
<!-- END MYSQL -->
and JDBC tag is
<!-- JDBC -->
<mbean code="org.jboss.jdbc.JdbcProvider" name="DefaultDomain:service=JdbcProvider">
<attribute name="Drivers">org.hsql.jdbcDriver,org.enhydra.instantdb.jdbc.idbDriver,com.pervasive.jdbc.v2.Driver,org.gjt.mm.mysql.Driver</attribute>
</mbean>
plz help me out
thanks
bhuwan

I am just use that ...But it works...!!
MySQL is Runing good ...
the problem is that you must reset the defaultDS,
to be Mysql.
So,Jboss must have only one DefaultDS,
In My Setup...
1.standardjaws.xml
<?xml version="1.0" encoding="UTF-8"?>
<jaws>
<datasource>java:/mySQL</datasource>
2.jboss.jcml (must changed as followed)
<!-- JDBC -->
<mbean code="org.jboss.jdbc.JdbcProvider" name="DefaultDomain:service=JdbcProvider">
<attribute name="Drivers">org.gjt.mm.mysql.Driver</attribute>
</mbean>
<mbean code="org.jboss.jdbc.XADataSourceLoader" name="DefaultDomain:service=XADataSource,name=mySQL">
<attribute name="PoolName">mySQL</attribute>
<attribute name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl</attribute>
<attribute name="Properties"></attribute>
<attribute name="URL">jdbc:mysql://localhost/j2ee</attribute>
<attribute name="GCMinIdleTime">1200000</attribute>
<attribute name="JDBCUser" />
<attribute name="MaxSize">10</attribute>
<attribute name="Password" />
<attribute name="GCEnabled">false</attribute>
<attribute name="InvalidateOnError">false</attribute>
<attribute name="TimestampUsed">false</attribute>
<attribute name="Blocking">true</attribute>
<attribute name="GCInterval">120000</attribute>
<attribute name="IdleTimeout">1800000</attribute>
<attribute name="IdleTimeoutEnabled">false</attribute>
<attribute name="LoggingEnabled">false</attribute>
<attribute name="MaxIdleTimeoutPercent">1.0</attribute>
<attribute name="MinSize">0</attribute>
</mbean>

Similar Messages

  • OpenOffice Base - MySQL with JDBC connection

    I was using MySQL with ODBC connection, but cannot do all MySQL queries. In OO Forum says dev version does with JDBC.
    http://www.oooforum.org/forum/viewtopic.phtml?t=41301
    I am now using OpenOffice dev version. I am a bit lost when asked to install MySQL JDBC Driver Class:
    com.mysql.jdbc.Driver
    Is the driver a part of jre package or to be installed from somewhere?

    I downloaded, but don't know where and how to install or use it. Took a look at the documentation, seems it requires only to untar but something has to be pointed. I think its something simple but I am overlooking.
    EDIT
    This thread tells how to do...
    http://www.oooforum.org/forum/viewtopic.phtml?t=33199

  • Problems with SSH: Connection Refused

    Greetings fellow Arch users,
    I have hit a bit of a snag that I could really use some extra help getting around. I've tried everything I can think of (and everything that Google thought might work) and I have my back rather against a wall, so I thought I'd come here to see if anyone can offer some advice.
    To make a long story short, I am a college student and am attempting to set up an ssh server on a desktop at my house so I can access it remotely from the college. I have the computer set up and the server running, however I am having difficulty making connections to it from my laptop. I know that the server is running, because I can log into it both from the server itself (sshing into local host) and from my laptop when I use the internal IP address.
    The server is on a static IP address within the network(192.168.0.75), and my router is configured to forward TCP port 1500 to it (I'm using 1500 as the port for my ssh server). However, when I attempt to log into the ssh server using my network's external IP address, the connection is refused. I used nmap to scan my network and found that, even though the proper ports are forwarded to the proper place as far as my Router's configuration interface is concerned, port 1500 is not listed as one of the open TCP ports. I also, to test it, temporarily disabled the firewalls on both the server and the client. That didn't help. The command that I am running is:
    ssh -p 1500 douglas@[external ip address
    As I am really not sure what is causing this problem, I don't know what information to provide. So here is everything that my inexperienced mind sees as likely being important. If you need anything more, let me know and I will do my best to provide it.
    Here is the sshd_config file from my server.
    # This is the sshd server system-wide configuration file. See
    # sshd_config(5) for more information.
    # This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
    # The strategy used for options in the default sshd_config shipped with
    # OpenSSH is to specify options with their default value where
    # possible, but leave them commented. Uncommented options override the
    # default value.
    Port 1500
    #AddressFamily any
    #ListenAddress 0.0.0.0
    #ListenAddress ::
    # The default requires explicit activation of protocol 1
    #Protocol 2
    # HostKey for protocol version 1
    #HostKey /etc/ssh/ssh_host_key
    # HostKeys for protocol version 2
    #HostKey /etc/ssh/ssh_host_rsa_key
    #HostKey /etc/ssh/ssh_host_dsa_key
    #HostKey /etc/ssh/ssh_host_ecdsa_key
    # Lifetime and size of ephemeral version 1 server key
    #KeyRegenerationInterval 1h
    #ServerKeyBits 1024
    # Ciphers and keying
    #RekeyLimit default none
    # Logging
    # obsoletes QuietMode and FascistLogging
    #SyslogFacility AUTH
    #LogLevel INFO
    # Authentication:
    #LoginGraceTime 2m
    PermitRootLogin no
    #StrictModes yes
    #MaxAuthTries 6
    #MaxSessions 10
    #RSAAuthentication yes
    #PubkeyAuthentication yes
    # The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
    # but this is overridden so installations will only check .ssh/authorized_keys
    AuthorizedKeysFile .ssh/authorized_keys
    #AuthorizedPrincipalsFile none
    #AuthorizedKeysCommand none
    #AuthorizedKeysCommandUser nobody
    # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
    #RhostsRSAAuthentication no
    # similar for protocol version 2
    #HostbasedAuthentication no
    # Change to yes if you don't trust ~/.ssh/known_hosts for
    # RhostsRSAAuthentication and HostbasedAuthentication
    #IgnoreUserKnownHosts no
    # Don't read the user's ~/.rhosts and ~/.shosts files
    #IgnoreRhosts yes
    # To disable tunneled clear text passwords, change to no here!
    #PasswordAuthentication yes
    #PermitEmptyPasswords no
    # Change to no to disable s/key passwords
    ChallengeResponseAuthentication no
    # Kerberos options
    #KerberosAuthentication no
    #KerberosOrLocalPasswd yes
    #KerberosTicketCleanup yes
    #KerberosGetAFSToken no
    # GSSAPI options
    #GSSAPIAuthentication no
    #GSSAPICleanupCredentials yes
    # Set this to 'yes' to enable PAM authentication, account processing,
    # and session processing. If this is enabled, PAM authentication will
    # be allowed through the ChallengeResponseAuthentication and
    # PasswordAuthentication. Depending on your PAM configuration,
    # PAM authentication via ChallengeResponseAuthentication may bypass
    # the setting of "PermitRootLogin without-password".
    # If you just want the PAM account and session checks to run without
    # PAM authentication, then enable this but set PasswordAuthentication
    # and ChallengeResponseAuthentication to 'no'.
    UsePAM yes
    #AllowAgentForwarding yes
    #AllowTcpForwarding yes
    #GatewayPorts no
    #X11Forwarding no
    #X11DisplayOffset 10
    #X11UseLocalhost yes
    PrintMotd no # pam does that
    #PrintLastLog yes
    #TCPKeepAlive yes
    #UseLogin no
    UsePrivilegeSeparation sandbox # Default for new installations.
    #PermitUserEnvironment no
    #Compression delayed
    #ClientAliveInterval 0
    #ClientAliveCountMax 3
    #UseDNS yes
    #PidFile /run/sshd.pid
    #MaxStartups 10:30:100
    #PermitTunnel no
    #ChrootDirectory none
    #VersionAddendum none
    # no default banner path
    #Banner none
    # override default of no subsystems
    Subsystem sftp /usr/lib/ssh/sftp-server
    # Example of overriding settings on a per-user basis
    #Match User anoncvs
    # X11Forwarding no
    # AllowTcpForwarding no
    # ForceCommand cvs server
    The ouptut of ip addr when run on the server:
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
    valid_lft forever preferred_lft forever
    2: enp8s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 00:21:9b:3a:be:94 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.75/24 brd 192.168.255.0 scope global enp8s0
    valid_lft forever preferred_lft forever
    inet6 fe80::221:9bff:fe3a:be94/64 scope link
    valid_lft forever preferred_lft forever
    Here is the output from running nmap on the network:
    Starting Nmap 6.40 ( http://nmap.org ) at 2013-09-28 21:05 EDT
    Initiating Ping Scan at 21:05
    Scanning address [2 ports]
    Completed Ping Scan at 21:05, 0.01s elapsed (1 total hosts)
    Initiating Parallel DNS resolution of 1 host. at 21:05
    Completed Parallel DNS resolution of 1 host. at 21:05, 0.05s elapsed
    Initiating Connect Scan at 21:05
    Scanning pa-addresss.dhcp.embarqhsd.net (address) [1000 ports]
    Discovered open port 80/tcp on address
    Discovered open port 443/tcp on address
    Discovered open port 23/tcp on address
    Discovered open port 21/tcp on address
    Completed Connect Scan at 21:05, 4.08s elapsed (1000 total ports)
    Nmap scan report for pa-address.dhcp.embarqhsd.net (address)
    Host is up (0.036s latency).
    Not shown: 995 closed ports
    PORT STATE SERVICE
    21/tcp open ftp
    23/tcp open telnet
    80/tcp open http
    443/tcp open https
    8080/tcp filtered http-proxy
    Read data files from: /usr/bin/../share/nmap
    Nmap done: 1 IP address (1 host up) scanned in 4.19 seconds
    Here is the ssh_config client-side:
    # $OpenBSD: ssh_config,v 1.27 2013/05/16 02:00:34 dtucker Exp $
    # This is the ssh client system-wide configuration file. See
    # ssh_config(5) for more information. This file provides defaults for
    # users, and the values can be changed in per-user configuration files
    # or on the command line.
    # Configuration data is parsed as follows:
    # 1. command line options
    # 2. user-specific file
    # 3. system-wide file
    # Any configuration value is only changed the first time it is set.
    # Thus, host-specific definitions should be at the beginning of the
    # configuration file, and defaults at the end.
    # Site-wide defaults for some commonly used options. For a comprehensive
    # list of available options, their meanings and defaults, please see the
    # ssh_config(5) man page.
    # Host *
    # ForwardAgent no
    # ForwardX11 no
    # RhostsRSAAuthentication no
    # RSAAuthentication yes
    # PasswordAuthentication yes
    # HostbasedAuthentication no
    # GSSAPIAuthentication no
    # GSSAPIDelegateCredentials no
    # BatchMode no
    # CheckHostIP yes
    # AddressFamily any
    # ConnectTimeout 0
    # StrictHostKeyChecking ask
    # IdentityFile ~/.ssh/identity
    # IdentityFile ~/.ssh/id_rsa
    # IdentityFile ~/.ssh/id_dsa
    # Port 22
    Protocol 2
    # Cipher 3des
    # Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
    # MACs hmac-md5,hmac-sha1,[email protected],hmac-ripemd160
    # EscapeChar ~
    # Tunnel no
    # TunnelDevice any:any
    # PermitLocalCommand no
    # VisualHostKey no
    # ProxyCommand ssh -q -W %h:%p gateway.example.com
    # RekeyLimit 1G 1h
    Output of ssh -v during connection attempt:
    OpenSSH_6.3, OpenSSL 1.0.1e 11 Feb 2013
    debug1: Reading configuration data /home/douglas/.ssh/config
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug2: ssh_connect: needpriv 0
    debug1: Connecting to address [address] port 1500.
    debug1: connect to address address port 1500: Connection refused
    ssh: connect to host address port 1500: Connection refused
    Thank you guys ahead of time. Getting this server operational is hardly critical, it is just a side project of mine, but I would really like to see it working.
    Douglas Bahr Rumbaugh
    Last edited by douglasr (2013-09-29 02:58:56)

    Okay, so I finally have the opportunity to try and log in from a remote network. And. . .  it doesn't work. Which is just my luck because I now need to wait an entire week, at least, before I can touch the server again. Anyway, running ssh with the maximum verbosity I get this output:
    douglas ~ $ ssh -vvv -p 2000 address
    OpenSSH_6.3, OpenSSL 1.0.1e 11 Feb 2013
    debug1: Reading configuration data /home/douglas/.ssh/config
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug2: ssh_connect: needpriv 0
    debug1: Connecting to address [address] port 2000.
    debug1: connect to address address port 2000: Connection timed out
    ssh: connect to host address port 2000: Connection timed out
    It takes a minute or two for the command to finish with the connection timeout, as one would expect. And yes, I am reasonably sure that the address that I am using is my home network's external IP. It is dynamic, but I checked it before I left which was just over an hour ago. I guess that it may have changed. I'll know that for sure in the morning, when my server sends me an automatic email with the network's current address. In the meantime I am operating under the assumption that the address I am using is correct. What else could be the problem?

  • ADF Mobile App integration with webservices, connection refused error

    I created an ADF application for department search with business components and exposed this as a webservice. I can access the WSDL locally from a browser. Then created an ADF mobile application and deployed it to android emulator. I am able to deploy the application to emulator and I can see the app on Android emulator. When I try to search for any department, I am getting "cannot connect to localhost on port 7101 : connection refused". My server is started already and the port number is also correct. Did any one came across this issue before? Even the WSDL URL is not accessible from the browser of android emulator.
    Edited by: adf_forum on Nov 16, 2012 2:16 PM

    Hi,
    One more thing to keep in mind is that Android emulator is itself a network host, and localhost will likely loop back into itself, i.e. emulator. Please try to set up the WLS to listen on an actual IP address for your development machine, create your WS DC using this real IP address, and then try to deploy/run the app.
    If you need to retrofit your app with an new IP address, please keep in mind there are several places you would need to manually fix up, including the connections.xml file.
    In general, if the device emulator's browser cannot hit a web service, then the ADF Mobile app will also not be able to hit a web service.
    The most reliable way is to treat the emulator like an actual device, then work out your application's connection accordingly.
    Thanks,
    Joe Huang

  • Problem in configuring mysql with JBoss 4

    Hello Forum
    I m having following exceptions while invoking my session bean from servlet
    java.rmi.ServerException: RuntimeException; nested exception is: java.lang.NullPointerException I have put mysql-ds.xml file in :\jboss-4.0.3SP1\server\default\deploy directory and mysql-connector-java-3.1.10-bin.jar in :\jboss-4.0.3SP1\server\default\lib directory.
    my mysql-ds.xml code is (which I take from connector-j doc)
    <datasources>
        <local-tx-datasource>
            <!-- This connection pool will be bound into JNDI with the name
                 "java:/MySQLDB" -->
            <jndi-name>MySQLDB</jndi-name>
            <connection-url>jdbc:mysql://localhost:3306/student</connection-url>
            <driver-class>com.mysql.jdbc.Driver</driver-class>
            <user-name>root</user-name>
            <password>pakistan</password>
            <min-pool-size>5</min-pool-size>
            <max-pool-size>20</max-pool-size>
            <idle-timeout-minutes>5</idle-timeout-minutes>
            <exception-sorter-class-name>com.mysql.jdbc.integration.jboss.ExtendedMysqlExceptionSorter</exception-sorter-class-name>
            <valid-connection-checker-class-name>com.mysql.jdbc.integration.jboss.MysqlValidConnectionChecker</valid-connection-checker-class-name>
        </local-tx-datasource>
    </datasources>and my session bean code is:
    imports ....
    public class JBSessionBean implements javax.ejb.SessionBean, JBSession.JBSessionRemoteBusiness {
        private javax.ejb.SessionContext context;
        public void ejbCreate() { }
        public java.sql.ResultSet setDbConnection()
            InitialContext ctx ;
            String jndiName = "java:/MySQLDB";
            DataSource ds = null;
            Connection conn = null;
            ResultSet rs = null;                
            String query = "SELECT * FROM stdinfo";
            try
                ctx = new InitialContext();
            catch (NamingException e)
                System.out.println (e.toString());
            //Lookup the data source
            ctx = null;
            try
                ds = (DataSource) ctx.lookup(jndiName);
            catch(NamingException e)
                System.out.println (e.toString() + "Error in Creating the DataSource");
            try
                conn = ds.getConnection();
            catch(SQLException e)
                System.out.println (e.toString() + "Error in Creating Connection");
            try
                Statement stmt = conn.createStatement( );
                System.out.println("got statmnet");
                rs= stmt.executeQuery( query ) ;
                System.out.println("got rs");     
            catch(SQLException e)
                System.out.println (e.toString() + "Error in Creating statement n query");
            return rs;
    }and my servlet code is
    public class JBossWeb extends HttpServlet {
        protected void processRequest(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            response.setContentType("text/html;charset=UTF-8");
            PrintWriter out = response.getWriter();
            ResultSet rSet = null;
            JBSessionRemote remoteRef = lookupJBSessionBean();
            try {
               rSet =  remoteRef.setDbConnection();
            } catch (RemoteException ex) {
                out.println(ex.toString());
            } catch (SQLException ex) {
                out.println(ex.toString());
            } catch (Exception ex){
                out.println(ex.toString());
            out.println("<html>");
            out.println("<head>");
            out.println("<title>Servlet JBossWeb</title>");
            out.println("</head>");
            out.println("<body>");
            out.println("<h1>Servlet JBossWeb</h1>");
            out.println(remoteRef.printTemp());
            if (rSet == null)
                out.println("Resultset null");
            out.println("</body>");
            out.println("</html>");
            out.close();
        private JBSession.JBSessionRemote lookupJBSessionBean() {
            try {
                javax.naming.Context c = new javax.naming.InitialContext();
                Object remote = c.lookup("java:comp/env/ejb/JBSessionBean");
                JBSession.JBSessionRemoteHome rv = (JBSession.JBSessionRemoteHome) javax.rmi.PortableRemoteObject.narrow(remote, JBSession.JBSessionRemoteHome.class);
                return rv.create();
            catch(javax.naming.NamingException ne) {
                java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE,"exception caught" ,ne);
                throw new RuntimeException(ne);
            catch(javax.ejb.CreateException ce) {
                java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE,"exception caught" ,ce);
                throw new RuntimeException(ce);
            catch(java.rmi.RemoteException re) {
                java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE,"exception caught" ,re);
                throw new RuntimeException(re);
    }I m using NetBeans IDE 5. Am I missing anything regarding more configuration in JBoss regarding mysql?
    I could not found why I got exception, please tell me after reviewing my code.
    hope I will got solution from u ppl
    Thanx in advance

    dear dvohra09
    it still giving me the same exception
    java.rmi.ServerException: RuntimeException; nested exception is: java.lang.NullPointerException as u suggested
    <application-policy name = "MySqlDbRealm">
    <authentication>
    <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
    <module-option name ="principal"></module-option>
    <module-option name ="userName">root</module-option>
    <module-option name ="password">pakistan</module-option>
    <module-option name ="managedConnectionFactoryName"> jboss.jca:service=LocalTxCM,name=MySQLDB
    </module-option>
    </login-module>
    </authentication>
    </application-policy>but still I didnt able to connect my database to JBoss
    any idea...???

  • Connection refused.

    Hi,
    i am using NetBeans IDE 5.,5 and trying out the NewsApp tutorial for Entity beans.
    When i run the project I get the following error,
    How shall i fix this,
    Thanks in advance.
    deployment started : 0%
    Deploying application in domain failed;
    Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException : Error opening socket to server localhost on port 1527 with message : Connection refused: no further informationError Code: 0
    E:\Sitaraman\OSS1\Projects\NewsApp\nbproject\build-impl.xml:183: Deployment error:
    The module has not been deployed.
    See the server log for details.
    BUILD FAILED (total time: 13 seconds)

    Hi,
    I had not started the database server. Going to tools->start db server fixed the problem.
    Sitaraman

  • How to send a file without getting Connection Refused??

    Hello everyone!
    I'm developing a FTP (Client and Server) program as a project and I have 2 main problems:
    1. The program can't connect to computers with router (Connection Refused error)
    2. If a computer with router connects to me, the program will not transfer the file (Connection Refused error again). but if it does, my friend's internet is suddenly disconnect after one transfer
    what should i do?!? : //
    everything is working well on one computer, but when i'm trying to work on 2 computers its screwed
    ***FOR EVERY TRANSFER I OPEN A DIFFERENT SOCKET AND CLOSE IT (AND ALL THE OTHER STREAMS) IN CASE OF EXCEPTION OR COMPLETION
    Thanks!!

    cotton.m wrote:
    Oron wrote:
    lol
    sorry..just want you to notice
    so how the other ftp programs transfer files? : //
    i have a test up against 2 testers and my program will not transfer files between 2 computers : ///Are these two computers on the same network? Aka behind the same router? If so then there is another problem, which is either a bug in your program and/or a firewall on one or both of the computers.
    How does FTP work normally? Well in most cases you are talking to a server that is on the internet. This server has been configured to be behind or on a network where the routers are not blocking requests to connect to FTP ports (among other services). So nothing different other than it is configured correctly.
    I do suspect your program may have some bugs as well. For example when you talk about it dropping the connection after one transfer. That doesn't sound too great.when i checked the program...no
    in the test...yes
    so the server has no blocking ports, but what about a client with a router?..how do the programs pass the client blocking?
    when i checked the program with a friend (i have a modem and i was the server) all the data was perfectly transfered (moving among folders, deleting files, creation of folders-->all these actions on the server..sending codes, strings and stuff), but when i tried to transfer a file it did connection refused :S
    i can bring a link to the file that do the transfer and if you have patience to read

  • Jdeveloper 11g TP4: Connection refused error for Embedded Oc4j

    Hi,
    I am getting following error whenever trying to deploy any application in embedded oc4j or whenever try to connect with embedded server on Resource palette.
    Error while getting remote MBeanServer for url: ormi://127.0.0.1:23891/default:
    Error reading application-client descriptor: Error communicating with server: Connection refused: connect; nested exception is:
         javax.naming.CommunicationException: Connection refused: connect [Root exception is java.net.ConnectException
    I am using Jdeveloper 11g TP 4 on windows XP.
    I have checked other links too related to above error and have checked following:
    Proper host name entry in host file
    No spaces in Jdveleoper installed directory name
    Proxy setting in Jdeveloper: excluded localhost and ip address
    Will be very thankful if anyone can help me to resolve this issue.
    Thanks in advance                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Don't spend to much time on this. JDev 11g is production and there will be no OC4J 11g!
    --olaf                                                                                                                                                                                               

  • JBoss connection -- EJB3

    I am implemented a entity bean and a session bean.
    I am writing a client to test my session bean.
    Also, I am using JBoss.
    in my cleint class I am trying to connect to my database (local host) but I am having problems with JBoss connection.
    I am using SQL server 2005. Any Help would be great so I can get this program to run.
    When I start JBoss .. it says that SQL is not bound.
    this is the error .. how can I fix that ..
    Also, does this mean that I am missing some Jar files.
    --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
    ObjectName: persistence.units:jar=Demo.jar,unitName=DemoPU
    State: FAILED
    Reason: javax.naming.NameNotFoundException: SQL not bound
    I Depend On:
    jboss.jca:service=DataSourceBinding,name=SQL
    Depends On Me:
    jboss.j2ee:jar=Demo.jar,name=CustomerBean,service=EJB3
    jboss.j2ee:jar=Demo.jar,name=KBSessionBean,service=EJB3
    Also this is the code I am trying to run..
    public class Client {
    /** Creates a new instance of Client */
    public static void main(String[] args) throws Exception
    Connection conn;
    // Step 1: Load the JDBC driver.
    Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
    System.out.println("Driver Loaded.");
    // Step 2: Establish the connection to the database.
    String url = "jdbc:sqlserver://localhost:1433;database=jdocxpt";
    conn = DriverManager.getConnection(url, "sa", "");
    System.out.println("Got Connection.");
    Context ctx = getInitialContext();
    CustomerRemote c = (CustomerRemote) ctx.lookup("CustomerBean/remote");
    TempCustomer first = new TempCustomer();
    TempCustomer second = new TempCustomer();
    first.setId(15);
    first.setName("roro");
    second.setId(9);
    second.setName("jojo");
    c.addCustomer(first);
    c.addCustomer(second);
    conn.close();
    Thanks for your help in advance.

    I don't think I totally understand what you are trying to do. If you are testing your session bean why do you get a database connection from your client isn't that the responsibility of the server side?
    Anyway, to get JBoss to connect to a database you have to put your jdbc/connector driver in JBoss' server lib directory, (jboss/server/default/lib for example). Then you have to add a configuration file for your datasource in the deploy directory. Have a look here: http://www.onjava.com/pub/a/onjava/2004/02/25/jbossjdbc.html
    I hope that is any help!

  • Connection refused, but works on diff computer

    Ok, i'm opening a connection to a web server using ssl (jsse) and this WAS working great. But now when I try to run the same code that was working on this computer (and still works upstairs) i get:
    java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
    at ..............
    The line of code that is causing this problem is
    OutputStream outputStream = null;
    outputStream = conn.getOutputStream(); <- RIGHT HERE
    the conn was setup and is not null because I can getURL() on it and it's context has been setup, so everything seems to be ok with the connection but once I try to get an output stream it blows with that connection refused exception. I have set doOutput to true aswell:
    conn.setDoOutput(true);
    Like I said, this code works on a different computer now and used to work on this one. If anyone knows what could have happened to this machine I could appreciate any help.
    (used to work but now it doesn't box)
    JDK 1.4.1
    Intel processor
    Windows 2000
    (still works box)
    JRE 1.4.1 (no jdk)
    Intel processor
    Windows NT
    Thanks a bunch
    -Dave

    And can you ping the other computer from the one that doesn't work?

  • Connection refused error running JSP on Jdev 10.1.3.0.3.3412 with MySL 5.0

    Hello,
    I'm using Jdeveloper 10.1.3.0.3.3412 on a Mac with a MySQL database. In Jdeveloper i can make a connection to the database and create adf business components
    I've made a JSP page with ADF on a single table. No errors when compiling. When I try to run the JSP Page using Embedded OC4J (on Mac OSX Tiger) I get the error:
    5/12/09 00:45:50 java.net.ConnectException: Connection refused
    05/12/09 00:45:50      at java.net.PlainSocketImpl.socketConnect(Native Method)
    05/12/09 00:45:50      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    05/12/09 00:45:50      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    05/12/09 00:45:50      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    05/12/09 00:45:50      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:428)
    05/12/09 00:45:50      at java.net.Socket.connect(Socket.java:507)
    05/12/09 00:45:50      at java.net.Socket.connect(Socket.java:457)
    05/12/09 00:45:50      at java.net.Socket.<init>(Socket.java:365)
    05/12/09 00:45:50      at java.net.Socket.<init>(Socket.java:207)
    05/12/09 00:45:50      at oracle.jdevimpl.runner.oc4j.Oc4jNotifier.sendMessage(Oc4jNotifier.java:98)
    05/12/09 00:45:50      at oracle.jdevimpl.runner.oc4j.Oc4jNotifier.postInitApplicationServer(Oc4jNotifier.java:55)
    05/12/09 00:45:50      at com.evermind.server.ApplicationServer.serverExtensionPostInit(ApplicationServer.java:1041)
    05/12/09 00:45:50      at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:927)
    05/12/09 00:45:50      at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:98)
    05/12/09 00:45:50      at java.lang.Thread.run(Thread.java:613)
    What am I doing wrong? The embedded OC4J library is added to the project. I've tried to use the javac compiler. It looks like the OC4J instance cannot make a connection to the db.
    Thanks,
    Martin

    Hello
    I've added the connection to the web.xml, but still get the same error.
    When I go to embedded OC4J preferences and change the JNDI-names of the datasources (global and current-workspace) to the same name (this was default), i get this error message:
    9-dec-2005 9:30:09 com.evermind.server.ApplicationStateRunning initNativeDataSource
    SEVERE: Error creating native data source. The location 'jdbc/MySQLConnectionCoreDS' is already in use.
    05/12/09 09:30:09 Application: current-workspace-app is in state FAILED
    05/12/09 09:30:09 Error instantiating application 'current-workspace-app' at file:/Users/martinsuijs/jdevhome/mywork/myWorldApp/myWorldApp-oc4j-app.xml: Error creating native data source. The location 'jdbc/MySQLConnectionCoreDS' is already in use.
    05/12/09 09:30:14 java.net.ConnectException: Connection refused
    grtz
    Martin

  • Performance with MySQL and Database connectivity toolbox

    Hi!
    I'm having quite some problems with the performance of MySQL and Database connectivity toolbox. However, I'm very happy with the ease of using database connectivity toolbox. The background is:
    I have 61 variables (ints and floats) which I would like to save in the MySQL-database. This is no problem, however, the loop time increases from 8ms to 50ms when using the database. I have concluded that it has to do with the DB Tools Insert Data.vi and I think that I have some kind of performance issue with this VI. The CPU never reach more the 15% of its maximum performance. I use a default setup and connect through ODBC.
    My questions are:
    1. I would like to save 61 variables each 8-10ms, is this impossible using this solution?
    2. Is there any way of increasing the performance of the DB Tools Insert Data.vi or use any other VI?
    3. Is there any way of adjusting the MySQL setup to achieve better performance?
    Thank you very much for your time.
    Regards,
    Mattias

    First of all, thank you very much for your time. All of you have been really good support to me.
    >> Is your database on a different computer?  Does your loop execute 61 times? 
    Database is on the same computer as the MySQL server.
    The loop saves 61 values at once to the database, in one SQL-statement.
    I have now added the front panel and block diagram for my test-VI. I have implemented the queue system and separate loops for producer and consumer. However, since the queue is building up faster then the consumer loop consumes values, the queue is building up quite fast and the disc starts working.
    The test database table that I add data to is created by a simple:
    create table test(aa int, bb char(15));
    ...I'm sure that this can be improved in some way.
    I always open and close the connection to the database "outside the loop". However, it still takes some 40-50 ms to save the data to the database table - so, unfortunatly no progress to far. I currently just want to save the data.
    Any more advise will be gratefully accepted.
    Regards,
    Mattias
    Message Edited by mattias@hv on 10-23-2007 07:50 AM
    Attachments:
    front panel 2.JPG ‏101 KB
    block diagram.JPG ‏135 KB

  • Error while deploying module with iasdeploy : Exception while createXmlDocument() : connection refused

    Hi to you all,
    I work with iAS 6.0 sp2 on Solaris.
    For 1 day, I get that exception when trying to deploy or remove my modules (servlets + JSP) with the iasdeploy tool :
    Exception while createXmlDocument()
    java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native method)
    at com.netscape.server.deployment.WebbAppReg.run(compiled code)
    at com.netscape.server.deployment.WebbAppReg.main(Unknown source)
    The war archive is put in the JAR directory, unpacked in the APPS/modules directory, but the servlets of the module have the null GUID in the registry ({000000 000000 000000}. And so, I have the GX error when trying to invoke them.
    What appends ? Is it a iAS process which is unable ?
    Please help !
    Paul-Emile

    I think you have not put the xml files in the war file.
    You need to put them under WEB-INF/ directory. Manually generate the guids using kguidgen script and try to deploy the war module. It should work fine. If it doesnot work please send me the file. So that I can further investigate and find out where exactly the problem is.Other wise you can use the deploytool.
    Please let me know if this works fine.
    Thanks for visiting our web forum.

  • Problem with JBDC connection to mysql in tomcat

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

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

  • Connection refused with java, but not javaw

    I have a ServerSocket based program...listening on a port. It is really a very simple program. And I can run it with javaw. Then I can use another problem, for example, telnet to connect to that port, just to prove I can connect to that port. Everything is fine.
    Now if I run the exactly the same ServerSocket program with java, then I got the connection refused error.
    It is weird.
    Do you know why? Do you know a good socket troubleshooting tool on Windows? I am afraid of the viruses, so I haven't downloaded any free tools yet.

    You're right.
    The Norton personal firewall does not handle localhost to localhost correctly. I do all the tests on the same machine. The netstat -an shows the port is listening in either case. But now I know the firewall blocks one of them silently. No rule prompt was triggered. Worse, no logging produced for that particular access.
    Thanks. You've been very helpful.

Maybe you are looking for

  • Error during installation of ECC6- system call failed

    Dear all, i encounter the error as below during sap installation. its looks like the ID issue, but this id (fbqadm) is using by me to log into the windows. please help me. thank ERROR      2009-03-17 10:07:25.583 [syxxsyshlp.cpp:78]            syslib

  • How to extract payload data from SOA database schema using Java

    I am trying to extract the payload data and output as XML text files using Java. Seems that is stored in SOA table XML_DOCUMENT. I am trying the following Java code to get started and it's not working as I would expect. I only get a few actual lines

  • Q to o keys working intermittently

    The keys Q,W,E,R,T,Y,U,I and O work intermittently.All other keys are working perfectly. When i connect an external keyboard via bluetooth i have no problems. Any ideas?

  • Broken Display on G20 How many costs a new one?

    Hello, This is a guide to avoid breaking your screen. I was putting my stuff inside the car after some days on a Greek island. When I finally got to the port I realized..... I did not have my G20.. Coming back to the hotel there it was lying just out

  • Sky Go sound quality is poor

    Sky Go sound quality is poor, hollow and reverb like, and happens with 'on demand', 'on now' and I assume also 'downloads'. Sky Go is a great concept and feature, but this sound issue significantly reduces your enjoyment and deters you from using it.