Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-10884

Quickstart jaxrs-jwt should use the "jboss.server.config.dir" system property for the file path to jwt.keystore

    XMLWordPrintable

Details

    Description

      Quickstart jaxrs-jwt should use the "jboss.server.config.dir" system property for the file path to jwt.keystore.

      We can not expect ../standalone/configuration/jwt.keystore is always a valid path for jwt.keystore because the process current directory can be changed to any other location than $JBOSS_HOME/bin when standalone.sh is invoked from other location.

      For example, when you start WildFly by executing ./bin/standalone.sh under $JBOSS_HOME directory, the request fails with the following FileNotFoundException:

      19:15:57,579 ERROR [stderr] (default task-1) java.io.FileNotFoundException: ../standalone/configuration/jwt.keystore (No such file or directory)
      19:15:57,581 ERROR [stderr] (default task-1) 	at java.io.FileInputStream.open0(Native Method)
      19:15:57,581 ERROR [stderr] (default task-1) 	at java.io.FileInputStream.open(FileInputStream.java:195)
      19:15:57,581 ERROR [stderr] (default task-1) 	at java.io.FileInputStream.<init>(FileInputStream.java:138)
      19:15:57,582 ERROR [stderr] (default task-1) 	at java.io.FileInputStream.<init>(FileInputStream.java:93)
      19:15:57,582 ERROR [stderr] (default task-1) 	at org.jboss.quickstarts.jaxrsjwt.auth.JwtManager.<clinit>(JwtManager.java:46)
      19:15:57,583 ERROR [stderr] (default task-1) 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      19:15:57,583 ERROR [stderr] (default task-1) 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      19:15:57,583 ERROR [stderr] (default task-1) 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      19:15:57,584 ERROR [stderr] (default task-1) 	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      19:15:57,584 ERROR [stderr] (default task-1) 	at java.lang.Class.newInstance(Class.java:442)
      19:15:57,585 ERROR [stderr] (default task-1) 	at org.jboss.weld.bean.proxy.DefaultProxyInstantiator.newInstance(DefaultProxyInstantiator.java:43)
      19:15:57,586 ERROR [stderr] (default task-1) 	at org.jboss.weld.bean.proxy.ProxyFactory.run(ProxyFactory.java:359)
      19:15:57,586 ERROR [stderr] (default task-1) 	at org.jboss.weld.bean.proxy.ProxyFactory.create(ProxyFactory.java:343)
      19:15:57,586 ERROR [stderr] (default task-1) 	at org.jboss.weld.bean.proxy.ClientProxyFactory.create(ClientProxyFactory.java:81)
      19:15:57,587 ERROR [stderr] (default task-1) 	at org.jboss.weld.bean.proxy.ClientProxyProvider.createClientProxy(ClientProxyProvider.java:206)
      ....
      

      Attachments

        Issue Links

          Activity

            People

              emartins@redhat.com Eduardo Martins
              rhn-support-mmiura Masafumi Miura
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: