DBCA failing with "oracle.net.TNSAddress.Description.toString(Unknown Source)"

This post is also available in: Português

During some days, when I was testing and creating the integration of my Oracle Databases with OUD 11.1.2.2.0  (OUD-EUS integration), I received the error below:

DBCA error

In the trace file generated by dbca inside "cfgtoollogs/dbca" folder, I could find:

java.lang.NullPointerException
        at oracle.net.TNSAddress.Description.toString(Unknown Source)
        at java.lang.String.valueOf(String.java:2615)
        at java.util.AbstractCollection.toString(AbstractCollection.java:454)
        at java.util.Vector.toString(Vector.java:946)
        at java.lang.String.valueOf(String.java:2615)
        at java.lang.StringBuilder.append(StringBuilder.java:116)
        at oracle.sysman.assistants.util.NetworkUtils.registerDBWithDirSrvc(NetworkUtils.java:1917)
        at oracle.sysman.assistants.util.NetworkUtils.registerDBWithDirSrvc(NetworkUtils.java:1833)
        at oracle.sysman.assistants.util.step.network.DirServiceStep.executeImpl(DirServiceStep.java:248)
        at oracle.sysman.assistants.util.step.BasicStep.execute(BasicStep.java:210)
        at oracle.sysman.assistants.util.step.BasicStep.callStep(BasicStep.java:251)
        at oracle.sysman.assistants.dbca.backend.PreDBConfigureStep.executeImpl(PreDBConfigureStep.java:265)
        at oracle.sysman.assistants.util.step.BasicStep.execute(BasicStep.java:210)
        at oracle.sysman.assistants.util.step.Step.execute(Step.java:140)
        at oracle.sysman.assistants.util.step.StepContext$ModeRunner.run(StepContext.java:2711)
        at java.lang.Thread.run(Thread.java:637)
[Thread-32] [ 2015-04-06 11:12:11.380 BRT ] [SQLEngine.done:2189]  Done called

I tried some ways to workaround this, like:

But none of them worked or gave me any clue of what was happening.

I knew it was a bug since the beginning. First I thought it was related to some problem while detecting the OCR home as the log had in a few lines before:

PRCT-1011 : Failed to run "getcrshome". Detailed error: []

But that was not the problem. Later, I though it was related somehow with SSLv3 because of some other entries in the trace:

[Thread-32] [ 2015-04-06 18:56:42.823 BRT ] [NetworkUtils.bindToDirSrvc:1478]  NNFL_AUTH_SSL_NOAUTH failed
oracle.net.config.ConfigException: TNS-04409: Directory service error
  caused by: oracle.net.config.DirectoryServiceException: TNS-04427: DirectoryService: could not connect
  caused by: oracle.net.ldap.NNFLException
oracle.net.config.DirectoryServiceException: TNS-04427: DirectoryService: could not connect
  caused by: oracle.net.ldap.NNFLException
oracle.net.ldap.NNFLException
        at oracle.net.config.DirectoryService.throwException(Unknown Source)
        at oracle.net.config.DirectoryService.getNNFLWrapperRNE(Unknown Source)
        at oracle.net.config.DirectoryService.getNNFLWrapper(Unknown Source)
        at oracle.net.config.DirectoryService.bind(Unknown Source)
        at oracle.net.config.Config.bind(Unknown Source)
        at oracle.sysman.assistants.util.NetworkUtils.bindToDirSrvc(NetworkUtils.java:1471)
        at oracle.sysman.assistants.util.step.StepContext.doDirServiceBind(StepContext.java:1239)
        at oracle.sysman.assistants.util.step.StepContext.doDirServiceBind(StepContext.java:1224)
        at oracle.sysman.assistants.util.step.network.DirServiceStep.executeImpl(DirServiceStep.java:227)
        at oracle.sysman.assistants.util.step.BasicStep.execute(BasicStep.java:210)
        at oracle.sysman.assistants.util.step.BasicStep.callStep(BasicStep.java:251)
        at oracle.sysman.assistants.dbca.backend.PreDBConfigureStep.executeImpl(PreDBConfigureStep.java:265)
        at oracle.sysman.assistants.util.step.BasicStep.execute(BasicStep.java:210)
        at oracle.sysman.assistants.util.step.Step.execute(Step.java:140)
        at oracle.sysman.assistants.util.step.StepContext$ModeRunner.run(StepContext.java:2711)
        at java.lang.Thread.run(Thread.java:637)

That was not the problem also. This SSLv3 message was just another unhandled exception.. the lines after showed that the dbca tried another approach.

So, finally, after comparing some databases that worked with another ones that were receiving the exact same problem, I realized that the problem was caused only in databases with dynamic listeners.

All the databases that were setup with a dynamic listener, using the default host and port, without the listener being specified in listener.ora, I had that same problem.

As workaround, I inserted in the listener.ora file:

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = myhostname)(PORT = 1521))
    )
  )

Then, after restarting the listener and calling dbca again, everything worked.

10 days.. experiments, attempts and tiredness. That's what costed me the bug above.

Have you enjoyed? Please leave a comment or give a 👍!

Leave a Reply

Your email address will not be published.