java.lang.IllegalArgumentException: hostname can't be null

Apache's JIRA Issue Tracker | Dave Rushall | 8 years ago
  1. 0

    When calling connect() for a "pop3s" store with mail.debug enabled, I see... DEBUG: getProvider() returning provider protocol=pop3s; type=javax.mail.Provider$Type@48864886; class=org.apache.geronimo.javamail.store.pop3.POP3SSLStore; vendor=Apache Software Foundation;version=1.0 pop3s DEBUG: Attempting SSL socket connection to server null:0 pop3s DEBUG: Creating SSL socket using factory javax.net.ssl.SSLSocketFactory pop3s DEBUG: Received exception -> Failure creating SSL socket pop3s DEBUG: Exception message -> hostname can't be null java.lang.IllegalArgumentException: hostname can't be null at java.net.InetSocketAddress.<init>(InetSocketAddress.java:135) at com.ibm.jsse2.jc.<init>(jc.java:340) at com.ibm.jsse2.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:7) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.apache.geronimo.javamail.util.MailConnection.getConnectedSSLSocket(MailConnection.java:432) at org.apache.geronimo.javamail.util.MailConnection.getConnection(MailConnection.java:249) at org.apache.geronimo.javamail.store.pop3.connection.POP3Connection.getConnection(POP3Connection.java:152) at org.apache.geronimo.javamail.store.pop3.connection.POP3Connection.protocolConnect(POP3Connection.java:121) at org.apache.geronimo.javamail.store.pop3.connection.POP3ConnectionPool.createPoolConnection(POP3ConnectionPool.java:155) at org.apache.geronimo.javamail.store.pop3.connection.POP3ConnectionPool.getConnection(POP3ConnectionPool.java:184) at org.apache.geronimo.javamail.store.pop3.POP3Store.getConnection(POP3Store.java:181) at org.apache.geronimo.javamail.store.pop3.POP3Store.isConnected(POP3Store.java:266) at javax.mail.Service.connect(Service.java:123) ... However, the implementation does seem to recover from this as the debug trace continues to show that the POP3 connection over SSL is established. I do not see this exception when using a plain "pop3" store.

    Apache's JIRA Issue Tracker | 8 years ago | Dave Rushall
    java.lang.IllegalArgumentException: hostname can't be null
  2. 0

    When calling connect() for a "pop3s" store with mail.debug enabled, I see... DEBUG: getProvider() returning provider protocol=pop3s; type=javax.mail.Provider$Type@48864886; class=org.apache.geronimo.javamail.store.pop3.POP3SSLStore; vendor=Apache Software Foundation;version=1.0 pop3s DEBUG: Attempting SSL socket connection to server null:0 pop3s DEBUG: Creating SSL socket using factory javax.net.ssl.SSLSocketFactory pop3s DEBUG: Received exception -> Failure creating SSL socket pop3s DEBUG: Exception message -> hostname can't be null java.lang.IllegalArgumentException: hostname can't be null at java.net.InetSocketAddress.<init>(InetSocketAddress.java:135) at com.ibm.jsse2.jc.<init>(jc.java:340) at com.ibm.jsse2.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:7) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.apache.geronimo.javamail.util.MailConnection.getConnectedSSLSocket(MailConnection.java:432) at org.apache.geronimo.javamail.util.MailConnection.getConnection(MailConnection.java:249) at org.apache.geronimo.javamail.store.pop3.connection.POP3Connection.getConnection(POP3Connection.java:152) at org.apache.geronimo.javamail.store.pop3.connection.POP3Connection.protocolConnect(POP3Connection.java:121) at org.apache.geronimo.javamail.store.pop3.connection.POP3ConnectionPool.createPoolConnection(POP3ConnectionPool.java:155) at org.apache.geronimo.javamail.store.pop3.connection.POP3ConnectionPool.getConnection(POP3ConnectionPool.java:184) at org.apache.geronimo.javamail.store.pop3.POP3Store.getConnection(POP3Store.java:181) at org.apache.geronimo.javamail.store.pop3.POP3Store.isConnected(POP3Store.java:266) at javax.mail.Service.connect(Service.java:123) ... However, the implementation does seem to recover from this as the debug trace continues to show that the POP3 connection over SSL is established. I do not see this exception when using a plain "pop3" store.

    Apache's JIRA Issue Tracker | 8 years ago | Dave Rushall
    java.lang.IllegalArgumentException: hostname can't be null
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    IGV Web Start Launch Error. Hostname cant be null

    GitHub | 3 years ago | chirayugoswami
    java.lang.IllegalArgumentException: hostname can't be null
  5. 0

    RedisDB 2.6.7 issue:hostname can't be null

    GitHub | 4 years ago | cornelius80
    java.lang.IllegalArgumentException: hostname can't be null

  1. Andreas Häber 6 times, last 3 months ago
  2. alexs 12 times, last 8 months ago
  3. Juraji 2 times, last 8 months ago
3 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalArgumentException

    hostname can't be null

    at java.net.InetSocketAddress.<init>()
  2. Java RT
    InetSocketAddress.<init>
    1. java.net.InetSocketAddress.<init>(InetSocketAddress.java:135)
    1 frame
  3. com.ibm.jsse2
    SSLSocketFactoryImpl.createSocket
    1. com.ibm.jsse2.jc.<init>(jc.java:340)
    2. com.ibm.jsse2.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:7)
    2 frames
  4. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:615)
    4 frames
  5. Geronimo JavaMail
    POP3Store.isConnected
    1. org.apache.geronimo.javamail.util.MailConnection.getConnectedSSLSocket(MailConnection.java:432)
    2. org.apache.geronimo.javamail.util.MailConnection.getConnection(MailConnection.java:249)
    3. org.apache.geronimo.javamail.store.pop3.connection.POP3Connection.getConnection(POP3Connection.java:152)
    4. org.apache.geronimo.javamail.store.pop3.connection.POP3Connection.protocolConnect(POP3Connection.java:121)
    5. org.apache.geronimo.javamail.store.pop3.connection.POP3ConnectionPool.createPoolConnection(POP3ConnectionPool.java:155)
    6. org.apache.geronimo.javamail.store.pop3.connection.POP3ConnectionPool.getConnection(POP3ConnectionPool.java:184)
    7. org.apache.geronimo.javamail.store.pop3.POP3Store.getConnection(POP3Store.java:181)
    8. org.apache.geronimo.javamail.store.pop3.POP3Store.isConnected(POP3Store.java:266)
    8 frames
  6. JavaMail API
    Service.connect
    1. javax.mail.Service.connect(Service.java:123)
    1 frame