While trying to connect a DB2v11 in DataStudio 4.1.0.1 getting below error in error log of DS. also unable to expand any DB even after connecting to it.
java.lang.NullPointerException
at com.ibm.datatools.adm.db2.luw.connection.listener.LUWConnectionProfilePropertySetListener.handleConnectEvent(Unknown Source)
at com.ibm.datatools.adm.db2.luw.connection.listener.LUWConnectionProfilePropertySetListener.propertySetChanged(Unknown Source)
You write that you get NullPointerException trying to connect (which might suggest that the connect fails), yet you also write "unable to expand" after successfully connecting. These seem mutually incompatible.
If you have just recently created the database (db2 create database...) and did not yet create any schemas or tables then it is correct that you are "unable to expand" because the database is just a skeleton (i.e. the contains nothing except for the catalog and basic defaults).
If you are learning, it is wise to run on Windows Start > Run > db2cwadmin . In the db2cmd.exe window that results run the command db2sampl
to create the sample database. This database has lots of objects and data and all of the IBM-supplied sample programs/scripts/snippets make use of this database so it is helpful for learners. db2sampl takes a few minutes to complete, and after it completes, create a connection to this new database from your Data-Studio . You will then be able to expand the schemas and see tables and views and other objects that are contained within the sample database.
If you get continued issues with IBM Data Studio, you might want to have it upgraded to the current version (in April 2018 I believe current version is 4.1.3).