title: java.lang.RuntimeException: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
body: <p>I am trying to add a self-signed certificate in GlassFish Server 4.1 for the development purpose only.</p>
  <p>The server certificate is generated using the following command.</p>
  <blockquote>
  <p>&quot;C:\Program Files\Java\jdk1.8.0_25\bin\keytool&quot; -genkey -alias
  server-alias -keyalg RSA -keypass changeit -storepass changeit
  -keystore keystore.jks</p>
  </blockquote>
  <p>The server name localhost was taken in response to the keytool's first prompt in which it asks for first and last names.</p>
  <p>Added the generated server certificate to the truststore file, cacerts.jks using the following command.</p>
  <blockquote>
  <p>&quot;C:\Program Files\Java\jdk1.8.0_25\bin\keytool&quot; -import -v
  -trustcacerts -alias server-alias -file server.cer -keystore cacerts.jks -keypass changeit -storepass changeit</p>
  </blockquote>
  <p>The default password changeit was left untouched.</p>
  <p>The alias s1as was replaced by the alias used in the above commands which is server-alias (under <code>Configurations-&gt;server-config-&gt;Http Service-&gt;Http Listeners-&gt;http-listener-2</code>, the SSL tab on <code>http://localhost:4848/</code>).</p>
  <p>keystore.jks and cacerts.jks are stored under <code>C:\Program Files\glassfish-4.1\glassfish\domains\domain1\config</code>.</p>
  <p>The JVM options under <code>Configurations-&gt;server-config-&gt;JVM Settings</code>, JVM Options tab on <code>http://localhost:4848/</code>, the following options</p>
  <blockquote>
  <p>-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks</p>
  <p>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks</p>
  </blockquote>
  <p>were already mentioned and they were left untouched.</p>
  <p>Since I did not alter the default password changeit, I did not mention the following option therein either.</p>
  <blockquote>
  <p>-Djavax.net.ssl.keyStorePassword=new-password</p>
  </blockquote>
  <p>I got the following exception on server start up.</p>
  <pre><code>Severe: iiop.init_exception
  java.lang.RuntimeException: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
      at com.sun.enterprise.iiop.security.IIOPSSLUtilImpl.getKeyManagers(IIOPSSLUtilImpl.java:112)
      at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.init(IIOPSSLSocketFactory.java:250)
      at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.&lt;init&gt;(IIOPSSLSocketFactory.java:152)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
      at java.lang.Class.newInstance(Class.java:438)
      at com.sun.corba.ee.impl.orb.ParserTable$4.operate(ParserTable.java:755)
      at com.sun.corba.ee.impl.orb.NormalParserAction.apply(NormalParserAction.java:62)
      at com.sun.corba.ee.spi.orb.PropertyParser.parse(PropertyParser.java:84)
      at com.sun.corba.ee.spi.orb.ParserImplBase.init(ParserImplBase.java:77)
      at com.sun.corba.ee.impl.orb.ORBDataParserImpl.&lt;init&gt;(ORBDataParserImpl.java:492)
      at com.sun.corba.ee.impl.orb.ORBImpl.postInit(ORBImpl.java:562)
      at com.sun.corba.ee.impl.orb.ORBImpl.set_parameters(ORBImpl.java:697)
      at com.sun.corba.ee.impl.orb.ORBImpl.setParameters(ORBImpl.java:684)
      at com.sun.corba.ee.spi.osgi.ORBFactory.initialize(ORBFactory.java:107)
      at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:585)
      at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.getORB(GlassFishORBManager.java:264)
      at org.glassfish.enterprise.iiop.impl.GlassFishORBFactoryImpl.createORB(GlassFishORBFactoryImpl.java:93)
      at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:163)
      at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getProtocolManager(GlassFishORBHelper.java:231)
      at com.sun.ejb.containers.BaseContainer.initializeProtocolManager(BaseContainer.java:898)
      at com.sun.ejb.containers.BaseContainer.&lt;init&gt;(BaseContainer.java:657)
      at com.sun.ejb.containers.StatelessSessionContainer.&lt;init&gt;(StatelessSessionContainer.java:143)
      at com.sun.ejb.containers.StatelessSessionContainer.&lt;init&gt;(StatelessSessionContainer.java:137)
      at com.sun.ejb.containers.StatelessContainerFactory.createContainer(StatelessContainerFactory.java:61)
      at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
      at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
      at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
      at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
      at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:496)
      at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:406)
      at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:243)
      at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:329)
      at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:377)
      at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
      at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
      at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
      at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
      at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
      at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
      at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
      at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
  Caused by: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
      at com.sun.enterprise.iiop.security.IIOPSSLUtilImpl.getKeyManagers(IIOPSSLUtilImpl.java:93)
      ... 47 more
  
  Severe:   enterprise_util.excep_in_createorb
  org.omg.CORBA.DATA_CONVERSION: WARNING: 02410014: org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory is not a valid custom socket factory  vmcid: OMG  minor code: 14  completed: No
      at com.sun.proxy.$Proxy194.badCustomSocketFactory(Unknown Source)
      at com.sun.corba.ee.impl.orb.ParserTable$4.operate(ParserTable.java:763)
      at com.sun.corba.ee.impl.orb.NormalParserAction.apply(NormalParserAction.java:62)
      at com.sun.corba.ee.spi.orb.PropertyParser.parse(PropertyParser.java:84)
      at com.sun.corba.ee.spi.orb.ParserImplBase.init(ParserImplBase.java:77)
      at com.sun.corba.ee.impl.orb.ORBDataParserImpl.&lt;init&gt;(ORBDataParserImpl.java:492)
      at com.sun.corba.ee.impl.orb.ORBImpl.postInit(ORBImpl.java:562)
      at com.sun.corba.ee.impl.orb.ORBImpl.set_parameters(ORBImpl.java:697)
      at com.sun.corba.ee.impl.orb.ORBImpl.setParameters(ORBImpl.java:684)
      at com.sun.corba.ee.spi.osgi.ORBFactory.initialize(ORBFactory.java:107)
      at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:585)
      at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.getORB(GlassFishORBManager.java:264)
      at org.glassfish.enterprise.iiop.impl.GlassFishORBFactoryImpl.createORB(GlassFishORBFactoryImpl.java:93)
      at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:163)
      at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getProtocolManager(GlassFishORBHelper.java:231)
      at com.sun.ejb.containers.BaseContainer.initializeProtocolManager(BaseContainer.java:898)
      at com.sun.ejb.containers.BaseContainer.&lt;init&gt;(BaseContainer.java:657)
      at com.sun.ejb.containers.StatelessSessionContainer.&lt;init&gt;(StatelessSessionContainer.java:143)
      at com.sun.ejb.containers.StatelessSessionContainer.&lt;init&gt;(StatelessSessionContainer.java:137)
      at com.sun.ejb.containers.StatelessContainerFactory.createContainer(StatelessContainerFactory.java:61)
      at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
      at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
      at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
      at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
      at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:496)
      at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:406)
      at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:243)
      at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:329)
      at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:377)
      at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
      at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
      at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
      at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
      at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
      at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
      at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
      at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
  Caused by: java.lang.IllegalStateException: java.lang.RuntimeException: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
      at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.&lt;init&gt;(IIOPSSLSocketFactory.java:202)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
      at java.lang.Class.newInstance(Class.java:438)
      at com.sun.corba.ee.impl.orb.ParserTable$4.operate(ParserTable.java:755)
      ... 39 more
  Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
      at com.sun.enterprise.iiop.security.IIOPSSLUtilImpl.getKeyManagers(IIOPSSLUtilImpl.java:112)
      at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.init(IIOPSSLSocketFactory.java:250)
      at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.&lt;init&gt;(IIOPSSLSocketFactory.java:152)
      ... 45 more
  Caused by: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
      at com.sun.enterprise.iiop.security.IIOPSSLUtilImpl.getKeyManagers(IIOPSSLUtilImpl.java:93)
      ... 47 more
  
  Severe:   Exception while invoking class org.glassfish.ejb.startup.EjbDeployer load method
  java.lang.RuntimeException: EJB Container initialization error
      at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:234)
      at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
      at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
      at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
      at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:496)
      at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:406)
      at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:243)
      at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:329)
      at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:377)
      at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
      at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
      at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
      at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
      at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
      at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
      at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
      at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
  Caused by: java.lang.RuntimeException: IIOP Protocol Manager initialization failed.  Possible cause is that ORB is not available in this container
      at com.sun.ejb.containers.BaseContainer.initializeProtocolManager(BaseContainer.java:901)
      at com.sun.ejb.containers.BaseContainer.&lt;init&gt;(BaseContainer.java:657)
      at com.sun.ejb.containers.StatelessSessionContainer.&lt;init&gt;(StatelessSessionContainer.java:143)
      at com.sun.ejb.containers.StatelessSessionContainer.&lt;init&gt;(StatelessSessionContainer.java:137)
      at com.sun.ejb.containers.StatelessContainerFactory.createContainer(StatelessContainerFactory.java:61)
      at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
      ... 20 more
  Caused by: java.lang.RuntimeException: Orb initialization erorr
      at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:191)
      at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getProtocolManager(GlassFishORBHelper.java:231)
      at com.sun.ejb.containers.BaseContainer.initializeProtocolManager(BaseContainer.java:898)
      ... 25 more
  Caused by: java.lang.RuntimeException: org.omg.CORBA.DATA_CONVERSION: WARNING: 02410014: org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory is not a valid custom socket factory  vmcid: OMG  minor code: 14  completed: No
      at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:626)
      at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.getORB(GlassFishORBManager.java:264)
      at org.glassfish.enterprise.iiop.impl.GlassFishORBFactoryImpl.createORB(GlassFishORBFactoryImpl.java:93)
      at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:163)
      ... 27 more
  Caused by: org.omg.CORBA.DATA_CONVERSION: WARNING: 02410014: org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory is not a valid custom socket factory  vmcid: OMG  minor code: 14  completed: No
      at com.sun.proxy.$Proxy194.badCustomSocketFactory(Unknown Source)
      at com.sun.corba.ee.impl.orb.ParserTable$4.operate(ParserTable.java:763)
      at com.sun.corba.ee.impl.orb.NormalParserAction.apply(NormalParserAction.java:62)
      at com.sun.corba.ee.spi.orb.PropertyParser.parse(PropertyParser.java:84)
      at com.sun.corba.ee.spi.orb.ParserImplBase.init(ParserImplBase.java:77)
      at com.sun.corba.ee.impl.orb.ORBDataParserImpl.&lt;init&gt;(ORBDataParserImpl.java:492)
      at com.sun.corba.ee.impl.orb.ORBImpl.postInit(ORBImpl.java:562)
      at com.sun.corba.ee.impl.orb.ORBImpl.set_parameters(ORBImpl.java:697)
      at com.sun.corba.ee.impl.orb.ORBImpl.setParameters(ORBImpl.java:684)
      at com.sun.corba.ee.spi.osgi.ORBFactory.initialize(ORBFactory.java:107)
      at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:585)
      ... 30 more
  Caused by: java.lang.IllegalStateException: java.lang.RuntimeException: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
      at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.&lt;init&gt;(IIOPSSLSocketFactory.java:202)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
      at java.lang.Class.newInstance(Class.java:438)
      at com.sun.corba.ee.impl.orb.ParserTable$4.operate(ParserTable.java:755)
      ... 39 more
  Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
      at com.sun.enterprise.iiop.security.IIOPSSLUtilImpl.getKeyManagers(IIOPSSLUtilImpl.java:112)
      at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.init(IIOPSSLSocketFactory.java:250)
      at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.&lt;init&gt;(IIOPSSLSocketFactory.java:152)
      ... 45 more
  Caused by: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
      at com.sun.enterprise.iiop.security.IIOPSSLUtilImpl.getKeyManagers(IIOPSSLUtilImpl.java:93)
      ... 47 more
  
  Severe:   Exception during lifecycle processing
  java.lang.RuntimeException: EJB Container initialization error
      at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:234)
      at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
      at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
      at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
      at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:496)
      at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:406)
      at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:243)
      at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:329)
      at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:377)
      at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
      at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
      at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
      at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
      at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
      at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
      at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
      at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
  Caused by: java.lang.RuntimeException: IIOP Protocol Manager initialization failed.  Possible cause is that ORB is not available in this container
      at com.sun.ejb.containers.BaseContainer.initializeProtocolManager(BaseContainer.java:901)
      at com.sun.ejb.containers.BaseContainer.&lt;init&gt;(BaseContainer.java:657)
      at com.sun.ejb.containers.StatelessSessionContainer.&lt;init&gt;(StatelessSessionContainer.java:143)
      at com.sun.ejb.containers.StatelessSessionContainer.&lt;init&gt;(StatelessSessionContainer.java:137)
      at com.sun.ejb.containers.StatelessContainerFactory.createContainer(StatelessContainerFactory.java:61)
      at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
      ... 20 more
  Caused by: java.lang.RuntimeException: Orb initialization erorr
      at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:191)
      at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getProtocolManager(GlassFishORBHelper.java:231)
      at com.sun.ejb.containers.BaseContainer.initializeProtocolManager(BaseContainer.java:898)
      ... 25 more
  Caused by: java.lang.RuntimeException: org.omg.CORBA.DATA_CONVERSION: WARNING: 02410014: org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory is not a valid custom socket factory  vmcid: OMG  minor code: 14  completed: No
      at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:626)
      at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.getORB(GlassFishORBManager.java:264)
      at org.glassfish.enterprise.iiop.impl.GlassFishORBFactoryImpl.createORB(GlassFishORBFactoryImpl.java:93)
      at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:163)
      ... 27 more
  Caused by: org.omg.CORBA.DATA_CONVERSION: WARNING: 02410014: org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory is not a valid custom socket factory  vmcid: OMG  minor code: 14  completed: No
      at com.sun.proxy.$Proxy194.badCustomSocketFactory(Unknown Source)
      at com.sun.corba.ee.impl.orb.ParserTable$4.operate(ParserTable.java:763)
      at com.sun.corba.ee.impl.orb.NormalParserAction.apply(NormalParserAction.java:62)
      at com.sun.corba.ee.spi.orb.PropertyParser.parse(PropertyParser.java:84)
      at com.sun.corba.ee.spi.orb.ParserImplBase.init(ParserImplBase.java:77)
      at com.sun.corba.ee.impl.orb.ORBDataParserImpl.&lt;init&gt;(ORBDataParserImpl.java:492)
      at com.sun.corba.ee.impl.orb.ORBImpl.postInit(ORBImpl.java:562)
      at com.sun.corba.ee.impl.orb.ORBImpl.set_parameters(ORBImpl.java:697)
      at com.sun.corba.ee.impl.orb.ORBImpl.setParameters(ORBImpl.java:684)
      at com.sun.corba.ee.spi.osgi.ORBFactory.initialize(ORBFactory.java:107)
      at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:585)
      ... 30 more
  Caused by: java.lang.IllegalStateException: java.lang.RuntimeException: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
      at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.&lt;init&gt;(IIOPSSLSocketFactory.java:202)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
      at java.lang.Class.newInstance(Class.java:438)
      at com.sun.corba.ee.impl.orb.ParserTable$4.operate(ParserTable.java:755)
      ... 39 more
  Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
      at com.sun.enterprise.iiop.security.IIOPSSLUtilImpl.getKeyManagers(IIOPSSLUtilImpl.java:112)
      at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.init(IIOPSSLSocketFactory.java:250)
      at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.&lt;init&gt;(IIOPSSLSocketFactory.java:152)
      ... 45 more
  Caused by: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
      at com.sun.enterprise.iiop.security.IIOPSSLUtilImpl.getKeyManagers(IIOPSSLUtilImpl.java:93)
      ... 47 more
  
  Severe:   Exception while loading the app
  Severe:   Application deployment failed: Exception while loading the app
  </code></pre>
  <p>What does GlassFish Server dislike?</p>
  <hr />
  <p>It only worked, when those files keystore.jks and cacerts.jks were regenerated using the alias name <code>s1as</code> but it fails with the given exception, when a different alias (Certificate Nickname) is used. GlassFish appears to be using this alias name for other purposes somewhere else.</p>