Results 1 to 4 of 4
  1. #1
    compustarsg is offline Member
    Join Date
    Oct 2011
    Posts
    3
    Rep Power
    0

    Default Java net SocketException Invalid argument create Socket.Java

    Iam getting SocketException Error on connecting with mysql using jdbc also when connect to Activemq jms. Strange thing is this is only
    happening on Windows Server(2008) and when i run the application as Windows service with 'jvm' (in-process) option. Program can Connect
    when i run as Java 'exe' in the Windows Service.

    Java JDK version - jdk1.6.0_26.

    Thanks in advance, please let me know any more details needed.

    -- mysql --
    Java.net.SocketException
    MESSAGE: Invalid argument: create

    STACKTRACE:

    java.net.SocketException: Invalid argument: create
    at java.net.Socket.createImpl(Socket.java:397)
    at java.net.Socket.<init>(Socket.java:371)
    at java.net.Socket.<init>(Socket.java:189)
    at com.mysql.jdbc.StandardSocketFactory.connect(Stand ardSocketFactory.java:124)
    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:225)
    at com.mysql.jdbc.Connection.createNewIO(Connection.j ava:1779)
    at com.mysql.jdbc.Connection.<init>(Connection.java:4 50)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonReg isteringDriver.java:411)
    at java.sql.DriverManager.getConnection(DriverManager .java:582)
    at java.sql.DriverManager.getConnection(DriverManager .java:185)
    at myapp.JDBCLoader.JDBCConnect(JDBCLoader.java:129)

    ----on activemq connect ---
    javax.jms.JMSException: Could not connect to broker URL: tcp://localhost:61616?connectionTimeout=0&keepAlive=true &wireFormat.maxInactivityDuration=0. Reason: java.net.SocketException: Invalid argument: create
    at org.apache.activemq.util.JMSExceptionSupport.creat e(JMSExceptionSupport.java:35)
    at org.apache.activemq.ActiveMQConnectionFactory.crea teActiveMQConnection(ActiveMQConnectionFactory.jav a:286)
    at org.apache.activemq.ActiveMQConnectionFactory.crea teActiveMQConnection(ActiveMQConnectionFactory.jav a:230)
    at org.apache.activemq.ActiveMQConnectionFactory.crea teQueueConnection(ActiveMQConnectionFactory.java:1 93)
    at sen.connector.queue.ConnectionFactory.createQueueC onnection(ConnectionFactory.java:60)
    at sen.connector.queue.ConnectionFactory.createQueueC onnection(ConnectionFactory.java:36)
    at sen.connector.queue.HostConnection.connectToHost(H ostConnection.java:147)
    at sen.connector.queue.HostConnection.run(HostConnect ion.java:127)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: java.net.SocketException: Invalid argument: create
    at java.net.Socket.createImpl(Socket.java:397)
    at java.net.Socket.connect(Socket.java:527)
    at org.apache.activemq.transport.tcp.TcpTransport.con nect(TcpTransport.java:484)
    at org.apache.activemq.transport.tcp.TcpTransport.doS tart(TcpTransport.java:447)
    at org.apache.activemq.util.ServiceSupport.start(Serv iceSupport.java:53)
    at org.apache.activemq.transport.InactivityMonitor.st art(InactivityMonitor.java:127)
    at org.apache.activemq.transport.TransportFilter.star t(TransportFilter.java:58)
    at org.apache.activemq.transport.WireFormatNegotiator .start(WireFormatNegotiator.java:72)
    at org.apache.activemq.transport.TransportFilter.star t(TransportFilter.java:58)
    at org.apache.activemq.transport.TransportFilter.star t(TransportFilter.java:58)
    at org.apache.activemq.ActiveMQConnectionFactory.crea teActiveMQConnection(ActiveMQConnectionFactory.jav a:266)

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default Re: Java net SocketException Invalid argument create Socket.Java

    So I guess you've decided not to show the code that's causing the error. That's a pity.

  3. #3
    compustarsg is offline Member
    Join Date
    Oct 2011
    Posts
    3
    Rep Power
    0

    Default Re: Java net SocketException Invalid argument create Socket.Java

    I had not given the code because it Works Fine when the Program runs as java exe mode on Windows Service. I given the connection URL iam using. I think it is setting issue not sure something is blocking the connection. It only happen when the Program runs in 'in-process' jvm.dll mode
    on Windows.

  4. #4
    compustarsg is offline Member
    Join Date
    Oct 2011
    Posts
    3
    Rep Power
    0

    Default Re: Java net SocketException Invalid argument create Socket.Java

    And it happens when connect 'MySql' and also when connect JMS ActiveMQ.

Similar Threads

  1. Replies: 3
    Last Post: 05-22-2011, 03:16 PM
  2. Replies: 2
    Last Post: 04-29-2011, 07:04 AM
  3. Replies: 0
    Last Post: 04-02-2011, 07:26 PM
  4. Replies: 5
    Last Post: 03-13-2009, 12:45 PM
  5. Invalid Argument error in IE7
    By Kaviurs in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 07-01-2008, 09:12 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •