Below problem solved:




Solved the Looks like the keyrings were not deployed in the .war file.

Those are resources as anything else so they should have been stored in
the WEB-INF/classes folder of the .war file.

Try opening the produced war and see if you can find those .skr and .pkr
files under the pgp/keys/used/ and pgp/keys/owned/ subfolders and let me
know.

F
________________________________________
From: VanIngen, Erik (FIPS)
Sent: 03 July 2014 09:15
To: Fiorellato, Fabio (FIPS)
Cc: Gentile, Aureliano (FIPS)
Subject: No keyring available as a resource at URL

Hi Fabio,

I have deployed a new version of RSG and tried it with iMarine Reports
and I got this message:”No keyring available as a resource at URL”.
Could you give me a hint on how to solve this?

Kind Regards,
Erik










09:11:13,276 [ INFO  ] {
org.fao.fi.security.server.javax.filters.origin.IPRestrictedResourceRequestValidatorFilter
} - Allowed (after applying filtering on IP 146.48.123.3): true
09:11:13,277 [ INFO  ] {
org.fao.fi.security.server.javax.filters.bandwidth.BandwidthLimitedResourceRequestValidatorFilter
} - Request IPs being checked are: [146.48.123.3]
09:11:13,297 [ INFO  ] {
org.fao.fi.security.server.providers.validators.token.impl.LocalTokenManager
} - Putting element 16411ef5fcce77bd5ec891c1babf9d87 in cache
token.cache
09:11:13,302 [ INFO  ] {
org.fao.fi.security.common.utilities.pgp.configuration.impl.jndi.PublicKeyringJNDIConfiguration
} - Keyring resource for iMarinePublicKeyringConfiguration is
classpath:///pgp/keys/used/imarine.pkr
09:11:13,304 [ ERROR ] {
org.fao.fi.security.common.support.token.impl.PGPEncryptedTokenProcessor
} - Processing token after creation yield a bad keyring error: No
keyring available as a resource at URL
classpath:///pgp/keys/used/imarine.pkr
org.fao.fi.security.common.encryption.pgp.exceptions.MissingOrBadKeyringException:
No keyring available as a resource at URL
classpath:///pgp/keys/used/imarine.pkr
               at
org.fao.fi.security.common.encryption.pgp.PGPEncryptorBean.readPublicKey(PGPEncryptorBean.java:97)
               at
org.fao.fi.security.common.encryption.pgp.PGPEncryptorBean.lazyReadPublicKey(PGPEncryptorBean.java:82)
               at
org.fao.fi.security.common.encryption.pgp.PGPEncryptorBean.encryptBytes(PGPEncryptorBean.java:74)
               at
org.fao.fi.security.common.support.token.impl.PGPEncryptedTokenProcessor.processAfterCreation(PGPEncryptedTokenProcessor.java:50)
               at
org.fao.fi.security.server.providers.validators.token.spi.AbstractTokenProducer.process(AbstractTokenProducer.java:80)
               at
org.fao.fi.security.server.services.providers.validators.token.impl.AbstractTokenProducerServiceImpl.requestToken(AbstractTokenProducerServiceImpl.java:50)
               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
               at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
               at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
               at java.lang.reflect.Method.invoke(Method.java:606)
               at
org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
               at
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:151)
               at
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:171)
               at
org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:195)
               at
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:104)
               at
org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:387)
               at
org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:331)
               at
org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:103)
               at
org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:269)
               at
org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
               at
org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
               at
org.glassfish.jersey.internal.Errors.process(Errors.java:315)
               at
org.glassfish.jersey.internal.Errors.process(Errors.java:297)
               at
org.glassfish.jersey.internal.Errors.process(Errors.java:267)
               at
org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297)
               at
org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:252)
               at
org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1025)
               at
org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:372)
               at
org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:382)
               at
org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:345)
               at
org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:220)
               at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
               at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
               at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
               at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
               at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
               at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
               at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
               at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
               at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
               at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
               at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
               at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
               at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
               at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
               at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
               at java.lang.Thread.run(Thread.java:744)
Caused by: java.io.FileNotFoundException: Unable to stream resource at
classpath:///pgp/keys/used/imarine.pkr: resource not found
               at
org.fao.fi.security.common.utilities.FileUtils.streamResource(FileUtils.java:53)
               at
org.fao.fi.security.common.encryption.pgp.PGPEncryptorBean.readPublicKey(PGPEncryptorBean.java:95)
               ... 46 more
Merge branch 'master' of https://github.com/openfigis/vme.git