Why I cannot convert this list as a string to be a real list in Common Lisp? - type-conversion

I have a local .lisp file with this content:
((:DATE #2021-08-04T17:36:57.804411-03:00 :URL
"https://www.facebook.com/r.php")
(|:name| "jazoest" |:value| "2985" |:type| "hidden")
(|:name| "lsd" |:value| "AVpp0Bi0ysk" |:type| "hidden")
(|:id| "u_0_y_q3" |:name| "custom_gender" |:type| "text")
(|:id| "referrer" |:name| "referrer" |:type| "hidden")
(|:id| "asked_to_login" |:name| "asked_to_login" |:value| "0" |:type|
"hidden")
(|:id| "use_custom_gender" |:name| "use_custom_gender" |:type| "hidden")
(|:id| "terms" |:name| "terms" |:value| "on" |:type| "hidden")
(|:id| "ns" |:name| "ns" |:value| "0" |:type| "hidden")
(|:id| "ri" |:name| "ri" |:value| "afc4dac1-259a-4006-a979-8ab182d93cce"
|:type| "hidden")
(|:id| "action_dialog_shown" |:name| "action_dialog_shown" |:type| "hidden")
(|:id| "invid" |:name| "invid" |:type| "hidden")
(|:id| "captcha_response" |:name| "captcha_response" |:type| "hidden"))
I can read it with:
(uiop:read-file-string "/home/pedro/miscellaneous/misc/tests-output/input-data.lisp")
Which returns:
" ((:DATE #2021-08-04T17:36:57.804411-03:00 :URL
\"https://www.facebook.com/r.php\")
(|:name| \"jazoest\" |:value| \"2985\" |:type| \"hidden\")
(|:name| \"lsd\" |:value| \"AVpp0Bi0ysk\" |:type| \"hidden\")
(|:id| \"u_0_y_q3\" |:name| \"custom_gender\" |:type| \"text\")
(|:id| \"referrer\" |:name| \"referrer\" |:type| \"hidden\")
(|:id| \"asked_to_login\" |:name| \"asked_to_login\" |:value| \"0\" |:type|
\"hidden\")
(|:id| \"use_custom_gender\" |:name| \"use_custom_gender\" |:type| \"hidden\")
(|:id| \"terms\" |:name| \"terms\" |:value| \"on\" |:type| \"hidden\")
(|:id| \"ns\" |:name| \"ns\" |:value| \"0\" |:type| \"hidden\")
(|:id| \"ri\" |:name| \"ri\" |:value| \"afc4dac1-259a-4006-a979-8ab182d93cce\"
|:type| \"hidden\")
(|:id| \"action_dialog_shown\" |:name| \"action_dialog_shown\" |:type| \"hidden\")
(|:id| \"invid\" |:name| \"invid\" |:type| \"hidden\")
(|:id| \"captcha_response\" |:name| \"captcha_response\" |:type| \"hidden\"))
"
I have tried to use the function read-from-string to convert this list as a string to be a real list. This approach works with sample examples such as:
CL-USER> (read-from-string "((1 2 3) (a b c))")
((1 2 3) (A B C))
17
Unfortunately, when I try to use the same approach on the string previously mentioned I receive an error message:
CL-USER> (uiop:read-file-string "/home/pedro/miscellaneous/misc/tests-output/input-data.lisp")
CL-USER> (read-from-string *)
too many colons in "36".
Line: 1, Column: 26, File-Position: 26
Stream: #<SB-IMPL::STRING-INPUT-STREAM {10083FC0E3}> [Condition
of type SB-INT:SIMPLE-READER-ERROR]
Why does this happen? And how can I solve it?
Thanks.

The problem is the date format. #2021-08-04T17:36:57.804411-03:00 is not a valid token in standard syntax. You need to change to a readtable that includes the # reader macro from the library local-time.
Example interaction:
CL-USER> (ql:quickload "local-time")
To load "local-time":
Load 1 ASDF system:
local-time
; Loading "local-time"
[package local-time]......................
("local-time")
CL-USER> (local-time:enable-read-macros)
; No value
CL-USER> (read-from-string "#2021-08-04T17:36:57.804411-03:00")
#2021-08-04T22:36:57.804411+02:00
33

Related

TF51005: The query references a field that does not exist. The error is caused by «[Custom.ReflectedWorkItemId]»

I try to migrate Azure DevOps boards from one organization to another.
And I use this tool: https://github.com/nkdAgility/azure-devops-migration-tools
I follow the instructions in the document but errors occur:
[16:43:59 INF] Processor: WorkItemMigration
[16:43:59 INF] Migration Context Start: WorkItemMigration [16:43:59 INF] WorkItemMigrationContext::InternalExecute ...
[16:44:00 INF] MigrationClient: Access granted to https://dev.azure.com/yyy/ for xxx (xxx#xxx.com) ...
[16:44:03 INF] MigrationClient: Access granted to https://dev.azure.com/zzz/ for xxx (xxx#xxx.com)
[16:44:04 INF] Migrating all Nodes before the Processor run.
[16:44:05 WRN] The node \xxx\Iteration\Sprint 1 is being excluded due to your basePath setting.
[16:44:06 INF] Querying items to be migrated: SELECT [System.Id], [System.Tags] FROM WorkItems WHERE [System.TeamProject] = #TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan') ORDER BY [System.ChangedDate] desc ...
[16:44:13 INF] Replay all revisions of 20 work items?
[16:44:13 INF] Found target project as test-han [16:44:13 INF] [FilterWorkItemsThatAlreadyExistInTarget] is enabled. Searching for work items that have already been migrated to the target...
[16:44:13 ERR] Error running query Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF51005: The query references a field that does not exist. The error is caused by «[Custom.ReflectedWorkItemId]».
at Microsoft.TeamFoundation.WorkItemTracking.Client.Query.Initialize(WorkItemStore store, String wiql, IDictionary context, Int32[] ids, Int32[] revs, Boolean dayPrecision)
at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.Query(String wiql, IDictionary context)
at MigrationTools._EngineV1.Clients.TfsWorkItemQuery.GetWorkItemsFromQuery(TfsWorkItemMigrationClient wiClient)
in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.ObjectModel\_EngineV1\Clients\TfsWorkItemQuery.cs:line 40
[16:44:13 FTL] Error while running WorkItemMigration Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF51005: The query references a field that does not exist. The error is caused by «[Custom.ReflectedWorkItemId]».
at Microsoft.TeamFoundation.WorkItemTracking.Client.Query.Initialize(WorkItemStore store, String wiql, IDictionary context, Int32[] ids, Int32[] revs, Boolean dayPrecision)
at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.Query(String wiql, IDictionary context)
at MigrationTools._EngineV1.Clients.TfsWorkItemQuery.GetWorkItemsFromQuery(TfsWorkItemMigrationClient wiClient)
in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.ObjectModel\_EngineV1\Clients\TfsWorkItemQuery.cs:line 70 at MigrationTools._EngineV1.Clients.TfsWorkItemQuery.GetWorkItems()
in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.ObjectModel\_EngineV1\Clients\TfsWorkItemQuery.cs:line 30
at MigrationTools._EngineV1.Clients.TfsWorkItemMigrationClient.FilterExistingWorkItems(List 1 sourceWorkItems, TfsWiqlDefinition wiqlDefinition, TfsWorkItemMigrationClient sourceWorkItemMigrationClient)
in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.ObjectModel\_EngineV1\Clients\TfsWorkItemMigrationClient.cs:line 54
at VstsSyncMigrator.Engine.WorkItemMigrationContext.InternalExecute()
in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 120
at MigrationTools._EngineV1.Processors.MigrationProcessorBase.Execute()
in D:\a\1\s\src\MigrationTools\_EngineV1\Processors\MigrationProcessorBase.cs:line 47 [16:44:13 ERR] WorkItemMigration The Processor MigrationEngine entered the failed state...stopping run
[16:44:13 INF] Application is shutting down...
Below is my config file
{
"ChangeSetMappingFile": null,
"Source": {
"$type": "TfsTeamProjectConfig",
"Collection": "https://dev.azure.com/yyy/",
"Project": "y01",
"ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
"AllowCrossProjectLinking": false,
"AuthenticationMode": "AccessToken",
"PersonalAccessToken": "MY_TOKEN",
"LanguageMaps": {
"AreaPath": "Area",
"IterationPath": "Iteration"
}
},
"Target": {
"$type": "TfsTeamProjectConfig",
"Collection": "https://dev.azure.com/zzz/",
"Project": "z01",
"ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
"AllowCrossProjectLinking": false,
"AuthenticationMode": "AccessToken",
"PersonalAccessToken": "MY_TOKEN2",
"LanguageMaps": {
"AreaPath": "Area",
"IterationPath": "Iteration"
}
},
"GitRepoMapping": null,
"LogLevel": "Information",
"Processors": [
{
"$type": "WorkItemMigrationConfig",
"Enabled": true,
"ReplayRevisions": false,
"PrefixProjectToNodes": false,
"UpdateCreatedDate": true,
"UpdateCreatedBy": true,
"WIQLQueryBit": "AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan')",
"WIQLOrderBit": "[System.ChangedDate] desc",
"LinkMigration": false,
"AttachmentMigration": false,
"AttachmentWorkingPath": "c:\temp\WorkItemAttachmentWorkingFolder\",
"FixHtmlAttachmentLinks": false,
"SkipToFinalRevisedWorkItemType": true,
"WorkItemCreateRetryLimit": 5,
"FilterWorkItemsThatAlreadyExistInTarget": true,
"PauseAfterEachWorkItem": false,
"AttachmentMaxSize": 480000000,
"AttachRevisionHistory": false,
"LinkMigrationSaveEachAsAdded": false,
"GenerateMigrationComment": false,
"NodeStructureEnricherEnabled": null,
"NodeBasePaths": [
"/"
],
"WorkItemIDs": null,
"MaxRevisions": 0
}
],
"Version": "11.11",
"workaroundForQuerySOAPBugEnabled": false,
"WorkItemTypeDefinition": {
"sourceWorkItemTypeName": "targetWorkItemTypeName"
},
"Endpoints": {
"InMemoryWorkItemEndpoints": [
{
"Name": "Source",
"EndpointEnrichers": null
},
{
"Name": "Target",
"EndpointEnrichers": null
}
]
}
}
I follow some solutions from other articles, setup a custom column called 'ReflectedItemId' for workitem type 'Product Backlog' (just this
type).
And apply this self-define process (inherited form Scrum) to both source & destination project. And still can not fix it.
Then, I try to run the query shown above(error log) with Wiql playground extension on source project.
It says that "#TeamProject " is not a valid name, which means the query from source project is not working, not to mention the succeeding tasks
. Am I understand it right?
Please give me some suggestion.
This field is used to releate WorkItems migrated. You need to create it in your destiny project. For this, follow this steps:
1.- Create an inherited process
2.- For each work item, you have to create a field (for first) or use an existing field (for the next) with name "ReflectedWorkItemId"
3.- Start migration again
If you have been follow this steps, you should put in your config file this value "Custom.ReflectedWorkItemId"

Exception when running in docker: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "hamzabelmellouki"

I am pretty new to docker. I have a spring-boot application that connects to postgres database (running in a container). I want to dockerize my spring-boot application and be able to connect it to the postgres database container.
What works:
Running the application without using docker works just fine: java -jar product-manager-0.0.1-SNAPSHOT.jar
What doesn't work:
Dockerizing and Running the application with Docker gives me an exception.
Note that I am not using docker-compose here.
My app Dockerfile:
FROM openjdk:11
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-jar","/app.jar"]
Steps I've taken to run the app:
Run and start up the postgres database in a container using these commands:
docker run --rm --name lil-postgres -e POSTGRES_PASSWORD=password -d -v $HOME/srv/postgres:/var/lib/postgresql/data -p 5432:5432 postgres
postgres -D /usr/local/var/postgres
I've built the app's image:
docker build -t ensa/product-manager .
This is the result from running the latest command:
Sending build context to Docker daemon 38.01MB
Step 1/4 : FROM openjdk:11
---> 612d4d483eee
Step 2/4 : ARG JAR_FILE=target/*.jar
---> Running in 1b8674e959ca
Removing intermediate container 1b8674e959ca
---> d2c2b90680de
Step 3/4 : COPY ${JAR_FILE} app.jar
---> 01295beecd1b
Step 4/4 : ENTRYPOINT ["java","-jar","/app.jar"]
---> Running in 31230e7ff323
Removing intermediate container 31230e7ff323
---> c4487683e7b1
Successfully built c4487683e7b1
Successfully tagged ensa/product-manager:latest
Finally, I've created a running container using:
docker run --net="host" -it ensa/product-manager
The third step resulted in an exception:
org.postgresql.util.PSQLException: FATAL: password authentication failed for user "hamzabelmellouki"
at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:520) ~[postgresql-42.2.8.jar!/:42.2.8]
at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:141) ~[postgresql-42.2.8.jar!/:42.2.8]
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:192) ~[postgresql-42.2.8.jar!/:42.2.8]
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49) ~[postgresql-42.2.8.jar!/:42.2.8]
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:195) ~[postgresql-42.2.8.jar!/:42.2.8]
at org.postgresql.Driver.makeConnection(Driver.java:458) ~[postgresql-42.2.8.jar!/:42.2.8]
at org.postgresql.Driver.connect(Driver.java:260) ~[postgresql-42.2.8.jar!/:42.2.8]
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) ~[HikariCP-3.4.1.jar!/:na]
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:353) ~[HikariCP-3.4.1.jar!/:na]
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) ~[HikariCP-3.4.1.jar!/:na]
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:473) ~[HikariCP-3.4.1.jar!/:na]
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:562) ~[HikariCP-3.4.1.jar!/:na]
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115) ~[HikariCP-3.4.1.jar!/:na]
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) ~[HikariCP-3.4.1.jar!/:na]
at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:158) ~[spring-jdbc-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:116) ~[spring-jdbc-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:79) ~[spring-jdbc-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:324) ~[spring-jdbc-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]
at org.springframework.boot.jdbc.EmbeddedDatabaseConnection.isEmbedded(EmbeddedDatabaseConnection.java:120) ~[spring-boot-2.2.1.RELEASE.jar!/:2.2.1.RELEASE]
at org.springframework.boot.autoconfigure.orm.jpa.HibernateDefaultDdlAutoProvider.getDefaultDdlAuto(HibernateDefaultDdlAutoProvider.java:42) ~[spring-boot-autoconfigure-2.2.1.RELEASE.jar!/:2.2.1.RELEASE]
at org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration.lambda$getVendorProperties$1(HibernateJpaConfiguration.java:130) ~[spring-boot-autoconfigure-2.2.1.RELEASE.jar!/:2.2.1.RELEASE]
at org.springframework.boot.autoconfigure.orm.jpa.HibernateSettings.getDdlAuto(HibernateSettings.java:41) ~[spring-boot-autoconfigure-2.2.1.RELEASE.jar!/:2.2.1.RELEASE]
at org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties.determineDdlAuto(HibernateProperties.java:136) ~[spring-boot-autoconfigure-2.2.1.RELEASE.jar!/:2.2.1.RELEASE]
at org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties.getAdditionalProperties(HibernateProperties.java:102) ~[spring-boot-autoconfigure-2.2.1.RELEASE.jar!/:2.2.1.RELEASE]
at org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties.determineHibernateProperties(HibernateProperties.java:94) ~[spring-boot-autoconfigure-2.2.1.RELEASE.jar!/:2.2.1.RELEASE]
at org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration.getVendorProperties(HibernateJpaConfiguration.java:132) ~[spring-boot-autoconfigure-2.2.1.RELEASE.jar!/:2.2.1.RELEASE]
at org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration.entityManagerFactory(JpaBaseConfiguration.java:133) ~[spring-boot-autoconfigure-2.2.1.RELEASE.jar!/:2.2.1.RELEASE]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:640) ~[spring-beans-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:625) ~[spring-beans-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108) ~[spring-context-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868) ~[spring-context-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.1.RELEASE.jar!/:2.2.1.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.1.RELEASE.jar!/:2.2.1.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.1.RELEASE.jar!/:2.2.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.1.RELEASE.jar!/:2.2.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot-2.2.1.RELEASE.jar!/:2.2.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) ~[spring-boot-2.2.1.RELEASE.jar!/:2.2.1.RELEASE]
at com.ensa.productmanager.ProductManagerApplication.main(ProductManagerApplication.java:10) ~[classes!/:0.0.1-SNAPSHOT]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) ~[app.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) ~[app.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:51) ~[app.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52) ~[app.jar:0.0.1-SNAPSHOT]
I've spent the whole day debugging and reading threads about this error. But I couldn't find a clue. Any help will be much appreciated.
UPDATE
I've run docker inspect on the Postgres container:
[
{
"Id": "426744f8c0a90b504c4d7c22242929f4b7f833e3ff4ddb9a112139d18ffd7c10",
"Created": "2020-01-16T19:14:14.7290504Z",
"Path": "docker-entrypoint.sh",
"Args": [
"postgres"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 8057,
"ExitCode": 0,
"Error": "",
"StartedAt": "2020-01-16T19:14:15.5451891Z",
"FinishedAt": "0001-01-01T00:00:00Z"
},
"Image": "sha256:e2d75d1c1264a777df31dcbd4fd452b238134eb27854c2a173fdbfaa47ce9b87",
"ResolvConfPath": "/var/lib/docker/containers/426744f8c0a90b504c4d7c22242929f4b7f833e3ff4ddb9a112139d18ffd7c10/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/426744f8c0a90b504c4d7c22242929f4b7f833e3ff4ddb9a112139d18ffd7c10/hostname",
"HostsPath": "/var/lib/docker/containers/426744f8c0a90b504c4d7c22242929f4b7f833e3ff4ddb9a112139d18ffd7c10/hosts",
"LogPath": "/var/lib/docker/containers/426744f8c0a90b504c4d7c22242929f4b7f833e3ff4ddb9a112139d18ffd7c10/426744f8c0a90b504c4d7c22242929f4b7f833e3ff4ddb9a112139d18ffd7c10-json.log",
"Name": "/lil-postgres",
"RestartCount": 0,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": [
"/Users/hamzabelmellouki/srv/postgres:/var/lib/postgresql/data"
],
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "default",
"PortBindings": {
"5432/tcp": [
{
"HostIp": "",
"HostPort": "5432"
}
]
},
"RestartPolicy": {
"Name": "no",
"MaximumRetryCount": 0
},
"AutoRemove": true,
"VolumeDriver": "",
"VolumesFrom": null,
"CapAdd": null,
"CapDrop": null,
"Capabilities": null,
"Dns": [],
"DnsOptions": [],
"DnsSearch": [],
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "private",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"ConsoleSize": [
0,
0
],
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": [],
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": [],
"DeviceCgroupRules": null,
"DeviceRequests": null,
"KernelMemory": 0,
"KernelMemoryTCP": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": false,
"PidsLimit": null,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"MaskedPaths": [
"/proc/asound",
"/proc/acpi",
"/proc/kcore",
"/proc/keys",
"/proc/latency_stats",
"/proc/timer_list",
"/proc/timer_stats",
"/proc/sched_debug",
"/proc/scsi",
"/sys/firmware"
],
"ReadonlyPaths": [
"/proc/bus",
"/proc/fs",
"/proc/irq",
"/proc/sys",
"/proc/sysrq-trigger"
]
},
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/baabe07f985a61979a3752f7e3c43116b980c45682d27c660b2867a6af3da28b-init/diff:/var/lib/docker/overlay2/ac6700580b74ace6c2f4eb9c274ef405124afb8019948c51516b496ed62eae8d/diff:/var/lib/docker/overlay2/35c484f8059617661ae54f749d0b938e7d81bc2089dd81ef81952aed6079c30b/diff:/var/lib/docker/overlay2/1649505946cf497fd95a5b7a118150a09315767464671f93459e3324f8e5ac42/diff:/var/lib/docker/overlay2/69a4818765c800f405e11c7755e184e4fd0837b68b4664821cf9c80daa7b629b/diff:/var/lib/docker/overlay2/177d3596510c3fdb235ec84728b8b6baf23a406dca3e9a3bfb45e98b48fe2395/diff:/var/lib/docker/overlay2/07d15f6f98f43ff88e6bdf9e361fadaaa46f83121278b5dbddac372cb95d99b8/diff:/var/lib/docker/overlay2/5e10c2001ef13459900f124ae825c210e2e001b0aa2f8b5e1e7c8c5c27d9e403/diff:/var/lib/docker/overlay2/b1e7828ebe991a7401746f581fd640bca3ae74f3a9820fd15e0fb2c666a08754/diff:/var/lib/docker/overlay2/e1b274467493537d29e25cce71acf9c3020d8a2e25080c75aa0fca10a5c05789/diff:/var/lib/docker/overlay2/11141fed542b6c519ec7621e0c4f341d2b2822a7c2885980216a2ef27609ffe0/diff:/var/lib/docker/overlay2/c3e4e9634bfe6a9e4b26f3d2d5751b2fa01aae0e8e1679a800accd94179d527d/diff:/var/lib/docker/overlay2/e7da8a834521c827046a2dc64f6f39afa6fded7f1af3241c75c592756d3053d6/diff:/var/lib/docker/overlay2/91d22f9b7d3aa1fae5cabcfe245a18c7dc6ac372696c73be70b65f7c8b42f1f4/diff:/var/lib/docker/overlay2/1a2021467ef42428eda11a9aef133e4b7ee9364266255abe5a0f2df4a9ff2584/diff",
"MergedDir": "/var/lib/docker/overlay2/baabe07f985a61979a3752f7e3c43116b980c45682d27c660b2867a6af3da28b/merged",
"UpperDir": "/var/lib/docker/overlay2/baabe07f985a61979a3752f7e3c43116b980c45682d27c660b2867a6af3da28b/diff",
"WorkDir": "/var/lib/docker/overlay2/baabe07f985a61979a3752f7e3c43116b980c45682d27c660b2867a6af3da28b/work"
},
"Name": "overlay2"
},
"Mounts": [
{
"Type": "bind",
"Source": "/Users/hamzabelmellouki/srv/postgres",
"Destination": "/var/lib/postgresql/data",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
}
],
"Config": {
"Hostname": "426744f8c0a9",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"5432/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"POSTGRES_USER=hamzabelmellouki",
"POSTGRES_PASSWORD=password",
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/postgresql/11/bin",
"GOSU_VERSION=1.11",
"LANG=en_US.utf8",
"PG_MAJOR=11",
"PG_VERSION=11.5-1.pgdg90+1",
"PGDATA=/var/lib/postgresql/data"
],
"Cmd": [
"postgres"
],
"Image": "postgres",
"Volumes": {
"/var/lib/postgresql/data": {}
},
"WorkingDir": "",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": null,
"Labels": {}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "2649b309ebde1f690927a1081497c9dc05dc249642b429f25d930243eb81e08f",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"5432/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "5432"
}
]
},
"SandboxKey": "/var/run/docker/netns/2649b309ebde",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "f01f60128018d8634f26a0c683ee6865e20361548b3a49007804dc913bfc4292",
"Gateway": "172.17.0.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"MacAddress": "02:42:ac:11:00:02",
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "045d48c0f1d22cb7c319d6e850f6e9985a08e6d08884a79e823dbd0ac6c8a1b9",
"EndpointID": "f01f60128018d8634f26a0c683ee6865e20361548b3a49007804dc913bfc4292",
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:11:00:02",
"DriverOpts": null
}
}
}
}
]
maybe,you can use docker-compose to defining and running multi-container docker applications(postgres+spring-boot) and you use a YAML file to configure your application's services.
So,You must create new volumes with different path to insert new data with new schema and configuration,because if you use volumes that already used before so you will find the problems like password authentication failed for user “hamzabelmellouki”
or the user(role) “hamzabelmellouki” does not existe or the database "database's name" does not existe because they have other user rhat created before .
#####docker-compose.yml#####
version: '3'
services:
db:
image: postgres
container_name: lil-postgres
ports:
- "5432:5432"
restart: unless-stopped
volumes:
- "./postgres/data:/var/lib/postgresql/data"
environment:
POSTGRES_USER: hamzabelmellouki
POSTGRES_PASSWORD: password
POSTGRES_DB: hamzabelmellouki
networks:
- product-net
product:
image: ensa/product-manager
restart: unless-stopped
ports:
- "8080:8080"
depends_on:
- db
networks:
- product-net
networks:
product-net:
driver: bridge
volumes:
db:
driver: local
Try below:
While running Postgres container, you have not provided any username , it should be something like:
docker run --rm --net="host" --name lil-postgres -e POSTGRES_USER=hamzabelmellouki -e POSTGRES_PASSWORD=password -d -v $HOME/srv/postgres:/var/lib/postgresql/data -p 5432:5432 postgres:9.6
by default Postgres container will run in bridge network (default docker network) and in your app, you've provided --net="host"
So maybe due to that, they are not able to communicate.
Provide the same network while running both
You can check it by below command
docker inspect container_name (or container_id)
Its nothing related, still, I've updated the docker image tag(Postgres:9.6), as it's always good to use a particular tag name, instead of default one (latest tag).
Try changing localhost by the ip adresse 172.17.0.2 in the application.properties spring.datasource.url=jdbc:postgresql://172.17.0.2:5432/testdb

Outlook MAPI Message Class Metadata in Outlook 2016

I've been looking all over and I can't seem to find anywhere that MS has this information documented. (This includes the MS documentation on MAPI message classes. This Super User answer elucidates what seems to be all of the standard Message Classes that are possible, but I haven't been able to find a list of the possible metadata that are associated with the Message Classes.
Does anyone know where I can find the metadata for each of the Message Classes as well as a possible brief (or detailed!) description of what the column means? Some of them are pretty obvious ("ReceivedDate", Start, etc.) but others are less obvious.
I've munged around with PowerShell and managed to find the following:
Schedule Meeting Request:
"Application",
"Class",
"Session",
"Parent",
"Actions",
"Attachments",
"BillingInformation",
"Body",
"Categories",
"Companies ",
"ConversationIndex",
"ConversationTopic",
"CreationTime",
"EntryID",
"FormDescription",
"GetInspector",
"Importance",
"LastModificationTime",
"MAPIOBJECT",
"MessageClass",
"Mileage",
"NoAging",
"OutlookInternalVersion",
"OutlookVersion",
"Saved",
"Sensitivity",
"Size",
"Subject",
"UnRead",
"UserProperties",
"AutoForwarded",
"DeferredDeliveryTime",
"DeleteAfterSubmit",
"ExpiryTime",
"FlagDueBy",
"FlagRequest ",
"FlagStatus",
"OriginatorDeliveryReportRequested",
"ReceivedTime",
"Recipients",
"ReminderSet",
"ReminderTime",
"ReplyRecipients",
"SaveSentMessageFolder",
"SenderName",
"Sent",
"SentOn",
"Submitted",
"Links",
"DownloadState",
"ItemProperties",
"MarkForDownload",
"IsConflict",
"MeetingWorkspaceURL",
"FlagIcon",
"AutoResolvedWinner",
"Conflicts",
"SenderEmailAddress",
"SenderEmailType",
"PropertyAccessor",
"ConversationID",
"SendUsingAccount",
"IsLatestVersion",
"RTFBody",
"RetentionExpirationDate",
"RetentionPolicyName",
"BodyFormat"
RSS:
"Application",
"Class",
"Session",
"Parent",
"Actions",
"Attachments",
"BillingInformation",
"Body",
"Categories",
"Companies",
"ConversationIndex",
"ConversationTopic",
"CreationTime",
"EntryID",
"FormDescription",
"GetInspector",
"Importance",
"LastModificationTime",
"MAPIOBJECT",
"MessageClass",
"Mileage",
"NoAging",
"OutlookInternalVersion",
"OutlookVersion",
"Saved",
"Sensitivity",
"Size",
"Subject",
"UnRead",
"UserProperties",
"ExpiryTime",
"HTMLBody",
"ReceivedTime",
"SenderName",
"SentOn",
"Links",
"ItemProperties",
"BodyFormat",
"DownloadState",
"InternetCodepage",
"MarkForDownload",
"IsConflict",
"AutoResolvedWinner",
"Conflicts",
"SenderEmailAddress",
"SenderEmailType",
"PropertyAccessor",
"TaskSubject",
"TaskDueDate",
"TaskStartDate",
"TaskCompletedDate",
"ToDoTaskOrdinal",
"ReminderOverrideDefault",
"ReminderPlaySound",
"ReminderSet",
"ReminderSoundFile",
"ReminderTime",
"IsMarkedAsTask",
"ConversationID",
"RTFBody"
Notes:
"Application",
"Class",
"Session",
"Parent",
"Body",
"Categories",
"Color",
"CreationTime",
"EntryID",
"GetInspector",
"Height",
"LastModificationTime",
"Left",
"MessageClass",
"Saved",
"Size",
"Subject",
"Top",
"Width",
"Links",
"DownloadState",
"ItemProperties",
"MarkForDownload",
"IsConflict",
"AutoResolvedWinner",
"Conflicts",
"PropertyAccessor"
Contact:
"Application",
"Class",
"Session",
"Parent",
"Actions",
"Attachments",
"BillingInformation",
"Body",
"Categories",
"Companies",
"ConversationIndex",
"ConversationTopic",
"CreationTime",
"EntryID",
"FormDescription",
"GetInspector",
"Importance",
"LastModificationTime",
"MAPIOBJECT",
"MessageClass",
"Mileage",
"NoAging",
"OutlookInternalVersion",
"OutlookVersion",
"Saved",
"Sensitivity",
"Size",
"Subject",
"UnRead",
"UserProperties",
"Account",
"Anniversary",
"AssistantName",
"AssistantTelephoneNumber",
"Birthday",
"Business2TelephoneNumber",
"BusinessAddress",
"BusinessAddressCity",
"BusinessAddressCountry",
"BusinessAddressPostalCode",
"BusinessAddressPostOfficeBox",
"BusinessAddressState",
"BusinessAddressStreet",
"BusinessFaxNumber",
"BusinessHomePage",
"BusinessTelephoneNumber",
"CallbackTelephoneNumber",
"CarTelephoneNumber",
"Children",
"CompanyAndFullName",
"CompanyLastFirstNoSpace",
"CompanyLastFirstSpaceOnly",
"CompanyMainTelephoneNumber",
"CompanyName",
"ComputerNetworkName",
"CustomerID",
"Department",
"Email1Address",
"Email1AddressType",
"Email1DisplayName",
"Email1EntryID",
"Email2Address",
"Email2AddressType",
"Email2DisplayName",
"Email2EntryID",
"Email3Address",
"Email3AddressType",
"Email3DisplayName",
"Email3EntryID",
"FileAs",
"FirstName",
"FTPSite",
"FullName",
"FullNameAndCompany",
"Gender",
"GovernmentIDNumber",
"Hobby",
"Home2TelephoneNumber",
"HomeAddress",
"HomeAddressCity",
"HomeAddressCountry",
"HomeAddressPostalCode",
"HomeAddressPostOfficeBox",
"HomeAddressState",
"HomeAddressStreet",
"HomeFaxNumber",
"HomeTelephoneNumber",
"Initials",
"InternetFreeBusyAddress",
"ISDNNumber",
"JobTitle",
"Journal",
"Language",
"LastFirstAndSuffix",
"LastFirstNoSpace",
"LastFirstNoSpaceCompany",
"LastFirstSpaceOnly",
"LastFirstSpaceOnlyCompany",
"LastName",
"LastNameAndFirstName",
"MailingAddress",
"MailingAddressCity",
"MailingAddressCountry",
"MailingAddressPostalCode",
"MailingAddressPostOfficeBox",
"MailingAddressState",
"MailingAddressStreet",
"ManagerName",
"MiddleName",
"MobileTelephoneNumber",
"NetMeetingAlias",
"NetMeetingServer",
"NickName",
"OfficeLocation",
"OrganizationalIDNumber",
"OtherAddress",
"OtherAddressCity",
"OtherAddressCountry",
"OtherAddressPostalCode",
"OtherAddressPostOfficeBox",
"OtherAddressState",
"OtherAddressStreet",
"OtherFaxNumber",
"OtherTelephoneNumber",
"PagerNumber",
"PersonalHomePage",
"PrimaryTelephoneNumber",
"Profession",
"RadioTelephoneNumber",
"ReferredBy",
"SelectedMailingAddress",
"Spouse",
"Suffix",
"TelexNumber",
"Title",
"TTYTDDTelephoneNumber",
"User1",
"User2",
"User3",
"User4",
"UserCertificate",
"WebPage",
"YomiCompanyName",
"YomiFirstName",
"YomiLastName",
"Links",
"ItemProperties",
"LastFirstNoSpaceAndSuffix",
"DownloadState",
"IMAddress",
"MarkForDownload",
"IsConflict",
"AutoResolvedWinner",
"Conflicts",
"HasPicture",
"PropertyAccessor",
"TaskSubject",
"TaskDueDate",
"TaskStartDate",
"TaskCompletedDate",
"ToDoTaskOrdinal",
"ReminderOverrideDefault",
"ReminderPlaySound",
"ReminderSet",
"ReminderSoundFile",
"ReminderTime",
"IsMarkedAsTask",
"BusinessCardLayoutXml",
"BusinessCardType",
"ConversationID",
"RTFBody"
Conversations:
"Application",
"Class",
"Session",
"Parent",
"Actions",
"Attachments",
"BillingInformation",
"Body",
"Categories",
"Companies",
"ConversationIndex",
"ConversationTopic",
"CreationTime",
"EntryID",
"FormDescription",
"GetInspector",
"Importance",
"LastModificationTime",
"MAPIOBJECT",
"MessageClass",
"Mileage",
"NoAging",
"OutlookInternalVersion",
"OutlookVersion",
"Saved",
"Sensitivity",
"Size",
"Subject",
"UnRead",
"UserProperties",
"AlternateRecipientAllowed",
"AutoForwarded",
"BCC",
"CC",
"DeferredDeliveryTime",
"DeleteAfterSubmit",
"ExpiryTime",
"FlagDueBy",
"FlagRequest",
"FlagStatus",
"HTMLBody",
"OriginatorDeliveryReportRequested",
"ReadReceiptRequested",
"ReceivedByEntryID",
"ReceivedByName",
"ReceivedOnBehalfOfEntryID",
"ReceivedOnBehalfOfName",
"ReceivedTime",
"RecipientReassignmentProhibited",
"Recipients",
"ReminderOverrideDefault",
"ReminderPlaySound",
"ReminderSet",
"ReminderSoundFile",
"ReminderTime",
"RemoteStatus",
"ReplyRecipientNames",
"ReplyRecipients",
"SaveSentMessageFolder",
"SenderName",
"Sent",
"SentOn",
"SentOnBehalfOfName",
"Submitted",
"[To]",
"VotingOptions",
"VotingResponse",
"Links",
"ItemProperties",
"BodyFormat",
"DownloadState",
"InternetCodepage",
"MarkForDownload",
"IsConflict",
"IsIPFax",
"FlagIcon",
"HasCoverSheet",
"AutoResolvedWinner",
"Conflicts",
"SenderEmailAddress",
"SenderEmailType",
"EnableSharedAttachments",
"Permission",
"PermissionService",
"PropertyAccessor",
"SendUsingAccount",
"TaskSubject",
"TaskDueDate",
"TaskStartDate",
"TaskCompletedDate",
"ToDoTaskOrdinal",
"IsMarkedAsTask",
"ConversationID",
"Sender",
"PermissionTemplateGuid",
"RTFBody",
"RetentionPolicyName",
"RetentionExpirationDate"
Tasks:
"Application",
"Class",
"Session",
"Parent",
"Actions",
"Attachments",
"BillingInformation",
"Body",
"Categories",
"Companies",
"ConversationIndex",
"ConversationTopic",
"CreationTime",
"EntryID",
"FormDescription",
"GetInspector",
"Importance",
"LastModificationTime",
"MAPIOBJECT",
"MessageClass",
"Mileage",
"NoAging",
"OutlookInternalVersion",
"OutlookVersion",
"Saved",
"Sensitivity",
"Size",
"Subject",
"UnRead",
"UserProperties",
"ActualWork",
"CardData",
"Complete",
"Contacts",
"ContactNames",
"DateCompleted",
"DelegationState",
"Delegator",
"DueDate",
"IsRecurring",
"Ordinal",
"Owner",
"Ownership",
"PercentComplete",
"Recipients",
"ReminderTime",
"ReminderOverrideDefault",
"ReminderPlaySound",
"ReminderSet",
"ReminderSoundFile",
"ResponseState",
"Role",
"SchedulePlusPriority",
"StartDate",
"Status",
"StatusOnCompletionRecipients",
"StatusUpdateRecipients",
"TeamTask",
"TotalWork",
"Links",
"DownloadState",
"ItemProperties",
"InternetCodepage",
"MarkForDownload",
"IsConflict",
"AutoResolvedWinner",
"Conflicts",
"PropertyAccessor",
"SendUsingAccount",
"ToDoTaskOrdinal",
"ConversationID",
"RTFBody",
Calendar:
"Application",
"Class",
"Session",
"Parent",
"Actions",
"Attachments",
"BillingInformation",
"Body",
"Categories",
"Companies",
"ConversationIndex",
"ConversationTopic",
"CreationTime",
"EntryID",
"FormDescription",
"GetInspector",
"Importance",
"LastModificationTime",
"MAPIOBJECT",
"MessageClass",
"Mileage",
"NoAging",
"OutlookInternalVersion",
"OutlookVersion",
"Saved",
"Sensitivity",
"Size",
"Subject",
"UnRead",
"UserProperties",
"AllDayEvent",
"BusyStatus",
"Duration",
"End",
"IsOnlineMeeting",
"IsRecurring",
"Location",
"MeetingStatus",
"NetMeetingAutoStart",
"NetMeetingOrganizerAlias",
"NetMeetingServer",
"NetMeetingType",
"OptionalAttendees",
"Organizer",
"Recipients",
"RecurrenceState",
"ReminderMinutesBeforeStart",
"ReminderOverrideDefault",
"ReminderPlaySound",
"ReminderSet",
"ReminderSoundFile",
"ReplyTime",
"RequiredAttendees",
"Resources",
"ResponseRequested",
"ResponseStatus",
"Start",
"NetMeetingDocPathName",
"NetShowURL",
"Links",
"ConferenceServerAllowExternal",
"ConferenceServerPassword",
"ItemProperties",
"DownloadState",
"InternetCodepage",
"MarkForDownload",
"IsConflict",
"MeetingWorkspaceURL",
"AutoResolvedWinner",
"Conflicts",
"PropertyAccessor",
"SendUsingAccount",
"GlobalAppointmentID",
"ForceUpdateToAllAttendees",
"StartUTC",
"EndUTC",
"StartInStartTimeZone",
"EndInEndTimeZone",
"StartTimeZone",
"EndTimeZone",
"ConversationID",
"RTFBody",
"BodyFormat"
e-mail (IPM.Note):
"Application",
"Class",
"Session",
"Parent",
"Actions",
"Attachments",
"BillingInformation",
"Body",
"Categories",
"Companies",
"ConversationIndex",
"ConversationTopic",
"CreationTime",
"EntryID",
"FormDescription",
"GetInspector",
"Importance",
"LastModificationTime",
"MAPIOBJECT",
"MessageClass",
"Mileage",
"NoAging",
"OutlookInternalVersion",
"OutlookVersion",
"Saved",
"Sensitivity",
"Size",
"Subject",
"UnRead",
"UserProperties",
"AlternateRecipientAllowed",
"AutoForwarded",
"BCC",
"CC",
"DeferredDeliveryTime",
"DeleteAfterSubmit",
"ExpiryTime",
"FlagDueBy",
"FlagRequest",
"FlagStatus",
"HTMLBody",
"OriginatorDeliveryReportRequested",
"ReadReceiptRequested",
"ReceivedByEntryID",
"ReceivedByName",
"ReceivedOnBehalfOfEntryID",
"ReceivedOnBehalfOfName",
"ReceivedTime",
"RecipientReassignmentProhibited",
"Recipients",
"ReminderOverrideDefault",
"ReminderPlaySound",
"ReminderSet",
"ReminderSoundFile",
"ReminderTime",
"RemoteStatus",
"ReplyRecipientNames",
"ReplyRecipients",
"SaveSentMessageFolder",
"SenderName",
"Sent",
"SentOn",
"SentOnBehalfOfName",
"Submitted",
"[To]",
"VotingOptions",
"VotingResponse",
"Links",
"ItemProperties",
"BodyFormat",
"DownloadState",
"InternetCodepage",
"MarkForDownload",
"IsConflict",
"IsIPFax",
"FlagIcon",
"HasCoverSheet",
"AutoResolvedWinner",
"Conflicts",
"SenderEmailAddress",
"SenderEmailType",
"EnableSharedAttachments",
"Permission",
"PermissionService",
"PropertyAccessor",
"SendUsingAccount",
"TaskSubject",
"TaskDueDate",
"TaskStartDate",
"TaskCompletedDate",
"ToDoTaskOrdinal",
"IsMarkedAsTask",
"ConversationID",
"Sender",
"PermissionTemplateGuid",
"RTFBody",
"RetentionPolicyName",
"RetentionExpirationDate"
The Microsoft Outlook object browser displays the classes, properties, methods, and events available from the Outlook object library.
If you do not see the Developer tab, see Run in Developer Mode in Outlook to activate the Developer tab. On the Developer tab, in the Form group, click View Code to open the Script Editor. In the Script Editor, click Object Browser on the Script menu or press F2.
All of the available Outlook objects are listed in the Classes pane of the object browser in alphabetical order. To view the members of an object, select the object in the Classes pane. The members of this object appear in alphabetical order in the Members of pane. The heading at the top of this pane will reflect the name of the object that you select. For example, if you select the AppointmentItem object in the Classes pane, the heading of the Members of pane will appear as Members of AppointmentItem.
The interfaces and members of the Microsoft.Office.Interop.Outlook namespace that provide support for interoperability between the COM object model of Outlook and managed applications that automate Outlook are described here.

Snappy insertion into druid

Facing problem in snappy ingestion to druid. Things start break after org.apache.hadoop.mapred.LocalJobRunner - map task executor complete. Its able to fetch the input file.
My specs json file -
{
"hadoopCoordinates": "org.apache.hadoop:hadoop-client:2.6.0",
"spec": {
"dataSchema": {
"dataSource": "apps_searchprivacy",
"granularitySpec": {
"intervals": [
"2017-01-23T00:00:00.000Z/2017-01-23T01:00:00.000Z"
],
"queryGranularity": "HOUR",
"segmentGranularity": "HOUR",
"type": "uniform"
},
"metricsSpec": [
{
"name": "count",
"type": "count"
},
{
"fieldName": "event_value",
"name": "event_value",
"type": "longSum"
},
{
"fieldName": "landing_impression",
"name": "landing_impression",
"type": "longSum"
},
{
"fieldName": "user",
"name": "DistinctUsers",
"type": "hyperUnique"
},
{
"fieldName": "cost",
"name": "cost",
"type": "doubleSum"
}
],
"parser": {
"parseSpec": {
"dimensionsSpec": {
"dimensionExclusions": [
"landing_page",
"skip_url",
"ua",
"user_id"
],
"dimensions": [
"t3",
"t2",
"t1",
"aff_id",
"customer",
"evt_id",
"install_date",
"install_week",
"install_month",
"install_year",
"days_since_install",
"months_since_install",
"weeks_since_install",
"success_url",
"event",
"chrome_version",
"value",
"event_label",
"rand",
"type_tag_id",
"channel_name",
"cid",
"log_id",
"extension",
"os",
"device",
"browser",
"cli_ip",
"t4",
"t5",
"referal_url",
"week",
"month",
"year",
"browser_version",
"browser_name",
"landing_template",
"strvalue",
"customer_group",
"extname",
"countrycode",
"issp",
"spdes",
"spsc"
],
"spatialDimensions": []
},
"format": "json",
"timestampSpec": {
"column": "time_stamp",
"format": "yyyy-MM-dd HH:mm:ss"
}
},
"type": "hadoopyString"
}
},
"ioConfig": {
"inputSpec": {
"dataGranularity": "hour",
"filePattern": ".*\\..*",
"inputPath": "hdfs://c8-auto-hadoop-service-1.srv.media.net:8020/data/apps_test_output",
"pathFormat": "'ts'=yyyyMMddHH",
"type": "granularity"
},
"type": "hadoop"
},
"tuningConfig": {
"ignoreInvalidRows": "true",
"type": "hadoop",
"useCombiner": "false"
}
},
"type": "index_hadoop"
}
Error Getting
2017-02-03T14:39:50,738 INFO [LocalJobRunner Map Task Executor #0] org.apache.hadoop.mapred.MapTask - (EQUATOR) 0 kvi 26214396(104857584)
2017-02-03T14:39:50,738 INFO [LocalJobRunner Map Task Executor #0] org.apache.hadoop.mapred.MapTask - mapreduce.task.io.sort.mb: 100
2017-02-03T14:39:50,738 INFO [LocalJobRunner Map Task Executor #0] org.apache.hadoop.mapred.MapTask - soft limit at 83886080
2017-02-03T14:39:50,738 INFO [LocalJobRunner Map Task Executor #0] org.apache.hadoop.mapred.MapTask - bufstart = 0; bufvoid = 104857600
2017-02-03T14:39:50,738 INFO [LocalJobRunner Map Task Executor #0] org.apache.hadoop.mapred.MapTask - kvstart = 26214396; length = 6553600
2017-02-03T14:39:50,738 INFO [LocalJobRunner Map Task Executor #0] org.apache.hadoop.mapred.MapTask - Map output collector class = org.apache.hadoop.mapred.MapTask$MapOutputBuffer
2017-02-03T14:39:50,847 INFO [LocalJobRunner Map Task Executor #0] org.apache.hadoop.mapred.MapTask - Starting flush of map output
2017-02-03T14:39:50,849 INFO [Thread-22] org.apache.hadoop.mapred.LocalJobRunner - map task executor complete.
2017-02-03T14:39:50,850 WARN [Thread-22] org.apache.hadoop.mapred.LocalJobRunner - job_local233667772_0001
java.lang.Exception: java.lang.UnsatisfiedLinkError: org.apache.hadoop.util.NativeCodeLoader.buildSupportsSnappy()Z
at org.apache.hadoop.mapred.LocalJobRunner$Job.runTasks(LocalJobRunner.java:462) ~[hadoop-mapreduce-client-common-2.6.0.jar:?]
at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:522) [hadoop-mapreduce-client-common-2.6.0.jar:?]
Caused by: java.lang.UnsatisfiedLinkError: org.apache.hadoop.util.NativeCodeLoader.buildSupportsSnappy()Z
at org.apache.hadoop.util.NativeCodeLoader.buildSupportsSnappy(Native Method) ~[hadoop-common-2.6.0.jar:?]
at org.apache.hadoop.io.compress.SnappyCodec.checkNativeCodeLoaded(SnappyCodec.java:63) ~[hadoop-common-2.6.0.jar:?]
at org.apache.hadoop.io.compress.SnappyCodec.getDecompressorType(SnappyCodec.java:192) ~[hadoop-common-2.6.0.jar:?]
at org.apache.hadoop.io.compress.CodecPool.getDecompressor(CodecPool.java:176) ~[hadoop-common-2.6.0.jar:?]
at org.apache.hadoop.mapreduce.lib.input.LineRecordReader.initialize(LineRecordReader.java:90) ~[hadoop-mapreduce-client-core-2.6.0.jar:?]
at org.apache.hadoop.mapreduce.lib.input.DelegatingRecordReader.initialize(DelegatingRecordReader.java:84) ~[hadoop-mapreduce-client-core-2.6.0.jar:?]
at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.initialize(MapTask.java:545) ~[hadoop-mapreduce-client-core-2.6.0.jar:?]
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:783) ~[hadoop-mapreduce-client-core-2.6.0.jar:?]
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341) ~[hadoop-mapreduce-client-core-2.6.0.jar:?]
at org.apache.hadoop.mapred.LocalJobRunner$Job$MapTaskRunnable.run(LocalJobRunner.java:243) ~[hadoop-mapreduce-client-common-2.6.0.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_121]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_121]
at java.lang.Thread.run(Thread.java:745) ~[?:1.8.0_121]
2017-02-03T14:39:51,130 INFO [task-runner-0-priority-0] org.apache.hadoop.mapreduce.Job - Job job_local233667772_0001 failed with state FAILED due to: NA
2017-02-03T14:39:51,139 INFO [task-runner-0-priority-0] org.apache.hadoop.mapreduce.Job - Counters: 0
2017-02-03T14:39:51,143 INFO [task-runner-0-priority-0] io.druid.indexer.JobHelper - Deleting path[var/druid/hadoop-tmp/apps_searchprivacy/2017-02-03T143903.262Z_bb7a812bc0754d4aabcd4bc103ed648a]
2017-02-03T14:39:51,158 ERROR [task-runner-0-priority-0] io.druid.indexing.overlord.ThreadPoolTaskRunner - Exception while running task[HadoopIndexTask{id=index_hadoop_apps_searchprivacy_2017-02-03T14:39:03.257Z, type=index_hadoop, dataSource=apps_searchprivacy}]
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.google.common.base.Throwables.propagate(Throwables.java:160) ~[guava-16.0.1.jar:?]
at io.druid.indexing.common.task.HadoopTask.invokeForeignLoader(HadoopTask.java:204) ~[druid-indexing-service-0.9.2.jar:0.9.2]
at io.druid.indexing.common.task.HadoopIndexTask.run(HadoopIndexTask.java:208) ~[druid-indexing-service-0.9.2.jar:0.9.2]
at io.druid.indexing.overlord.ThreadPoolTaskRunner$ThreadPoolTaskRunnerCallable.call(ThreadPoolTaskRunner.java:436) [druid-indexing-service-0.9.2.jar:0.9.2]
at io.druid.indexing.overlord.ThreadPoolTaskRunner$ThreadPoolTaskRunnerCallable.call(ThreadPoolTaskRunner.java:408) [druid-indexing-service-0.9.2.jar:0.9.2]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_121]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
at io.druid.indexing.common.task.HadoopTask.invokeForeignLoader(HadoopTask.java:201) ~[druid-indexing-service-0.9.2.jar:0.9.2]
... 7 more
Caused by: com.metamx.common.ISE: Job[class io.druid.indexer.IndexGeneratorJob] failed!
at io.druid.indexer.JobHelper.runJobs(JobHelper.java:369) ~[druid-indexing-hadoop-0.9.2.jar:0.9.2]
at io.druid.indexer.HadoopDruidIndexerJob.run(HadoopDruidIndexerJob.java:94) ~[druid-indexing-hadoop-0.9.2.jar:0.9.2]
at io.druid.indexing.common.task.HadoopIndexTask$HadoopIndexGeneratorInnerProcessing.runTask(HadoopIndexTask.java:261) ~[druid-indexing-service-0.9.2.jar:0.9.2]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
at io.druid.indexing.common.task.HadoopTask.invokeForeignLoader(HadoopTask.java:201) ~[druid-indexing-service-0.9.2.jar:0.9.2]
... 7 more
2017-02-03T14:39:51,165 INFO [task-runner-0-priority-0] io.druid.indexing.overlord.TaskRunnerUtils - Task [index_hadoop_apps_searchprivacy_2017-02-03T14:39:03.257Z] status changed to [FAILED].
2017-02-03T14:39:51,168 INFO [task-runner-0-priority-0] io.druid.indexing.worker.executor.ExecutorLifecycle - Task completed with status: {
"id" : "index_hadoop_apps_searchprivacy_2017-02-03T14:39:03.257Z",
"status" : "FAILED",
"duration" : 43693
}
It seems that jvm can't load native shared library (like .dll or .so), check is it available on machine(s) running the task, and if so check is its dir on the classpath of the jvm.

Verify a signature in JWT.IO

I have generated the following token and am trying to verify the signature with http://jwt.io
I have also attached the contents of my jwks endpoint that should have all the details I need to verify.
So my question is: how do I get this to say signature valid on the jwt.io website? Am I missing some transformation on the certificate chain parameter?
Here is the spec for jwks for reference.
eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6ImEzck1VZ01Gdjl0UGNsTGE2eUYzekFrZnF1RSIsImtpZCI6ImEzck1VZ01Gdjl0UGNsTGE2eUYzekFrZnF1RSJ9.eyJub25jZSI6IjYzNjA3MDM0OTc3NDIzODg2NS5OMlkxTldKbU1EZ3RZbU13TkMwME9XWTNMVGt5TlRJdE9ERXpOell4Wm1NME0yVmxNV1l5TkdOaFlXTXRaVEpqT1MwME4yRmpMVGd6WmpVdFpXWTVOVEEwWmpFMU1qWTEiLCJpYXQiOjE0NzE0MzgxODIsImF0X2hhc2giOiJLWUJpVkl1Uy1YZERzU3NHcWU5dTJBIiwic3ViIjoiMSIsImFtciI6InBhc3N3b3JkIiwiYXV0aF90aW1lIjoxNDcxNDM4MTgyLCJpZHAiOiJpZHNydiIsImlzcyI6Imh0dHBzOi8vZWx3ZWJhcHBsaWNhdGlvbjEuYXp1cmV3ZWJzaXRlcy5uZXQvaWRlbnRpdHkiLCJhdWQiOiJtdmMiLCJleHAiOjE0NzE0Mzg0ODIsIm5iZiI6MTQ3MTQzODE4Mn0.Ehck2-rA09cJzlfURhDMp-WcXm_t_dl-u0Mli3exdv1HxX8i77x5VfFPM6rP4lcpI3lpN8Yj-FefZYDTUY_UmxCYvXf6ILSrhzEfQVaXSPKX1RUQQIDJGPU6NuFLcR416JpUAkE8joYae3WPj5VsM4yNENGGjUANm4qgj6G_mYy_BiXcSqvRGRYwW5GHDsnnANrIw4oktIYS05yCbjdiNYgQZ043L6Pb2p-5eTPCFqG7WRHp208dhg8D3nhtYEov2Kxod93oKHXSp1zf-Ot0cadk6Ss4fClaTE9S1f29lbwxw7ZxI1L3R4oOL3FZPSSHGp4d3a3AdUKOjKvvTVPv6w
{
keys : [{
kty : "RSA",
use : "sig",
kid : "a3rMUgMFv9tPclLa6yF3zAkfquE",
x5t : "a3rMUgMFv9tPclLa6yF3zAkfquE",
e : "AQAB",
n : "qnTksBdxOiOlsmRNd-mMS2M3o1IDpK4uAr0T4_YqO3zYHAGAWTwsq4ms-NWynqY5HaB4EThNxuq2GWC5JKpO1YirOrwS97B5x9LJyHXPsdJcSikEI9BxOkl6WLQ0UzPxHdYTLpR4_O-0ILAlXw8NU4-jB4AP8Sn9YGYJ5w0fLw5YmWioXeWvocz1wHrZdJPxS8XnqHXwMUozVzQj-x6daOv5FmrHU1r9_bbp0a1GLv4BbTtSh4kMyz1hXylho0EvPg5p9YIKStbNAW9eNWvv5R8HN7PPei21AsUqxekK0oW9jnEdHewckToX7x5zULWKwwZIksll0XnVczVgy7fCFw",
x5c : [
"MIIDBTCCAfGgAwIBAgIQNQb+T2ncIrNA6cKvUA1GWTAJBgUrDgMCHQUAMBIxEDAOBgNVBAMTB0RldlJvb3QwHhcNMTAwMTIwMjIwMDAwWhcNMjAwMTIwMjIwMDAwWjAVMRMwEQYDVQQDEwppZHNydjN0ZXN0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqnTksBdxOiOlsmRNd+mMS2M3o1IDpK4uAr0T4/YqO3zYHAGAWTwsq4ms+NWynqY5HaB4EThNxuq2GWC5JKpO1YirOrwS97B5x9LJyHXPsdJcSikEI9BxOkl6WLQ0UzPxHdYTLpR4/O+0ILAlXw8NU4+jB4AP8Sn9YGYJ5w0fLw5YmWioXeWvocz1wHrZdJPxS8XnqHXwMUozVzQj+x6daOv5FmrHU1r9/bbp0a1GLv4BbTtSh4kMyz1hXylho0EvPg5p9YIKStbNAW9eNWvv5R8HN7PPei21AsUqxekK0oW9jnEdHewckToX7x5zULWKwwZIksll0XnVczVgy7fCFwIDAQABo1wwWjATBgNVHSUEDDAKBggrBgEFBQcDATBDBgNVHQEEPDA6gBDSFgDaV+Q2d2191r6A38tBoRQwEjEQMA4GA1UEAxMHRGV2Um9vdIIQLFk7exPNg41NRNaeNu0I9jAJBgUrDgMCHQUAA4IBAQBUnMSZxY5xosMEW6Mz4WEAjNoNv2QvqNmk23RMZGMgr516ROeWS5D3RlTNyU8FkstNCC4maDM3E0Bi4bbzW3AwrpbluqtcyMN3Pivqdxx+zKWKiORJqqLIvN8CT1fVPxxXb/e9GOdaR8eXSmB0PgNUhM4IjgNkwBbvWC9F/lzvwjlQgciR7d4GfXPYsE1vf8tmdQaY8/PtdAkExmbrb9MihdggSoGXlELrPA91Yce+fiRcKY3rQlNWVd4DOoJ/cPXsXwry8pWjNCo5JD8Q+RQ5yZEy7YPoifwemLhTdsBz3hlZr28oCGJ3kbnpW0xGvQb3VHSTVVbeei0CfXoW6iz1"
]
}
]
}
jwt.io says to enter the key
Public Key or Certificate. Enter it in plain text only if you want to verify a token
so I have converted the JSON Web Key to a PEM format guessing it would need a base64 format, and it works!.
This is the public key built from modulus and exponent
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqnTksBdxOiOlsmRNd+mMS2M3o1IDpK4uAr0T4/YqO3zYHAGAWTwsq4ms+NWynqY5HaB4EThNxuq2GWC5JKpO1YirOrwS97B5x9LJyHXPsdJcSikEI9BxOkl6WLQ0UzPxHdYTLpR4/O+0ILAlXw8NU4+jB4AP8Sn9YGYJ5w0fLw5YmWioXeWvocz1wHrZdJPxS8XnqHXwMUozVzQj+x6daOv5FmrHU1r9/bbp0a1GLv4BbTtSh4kMyz1hXylho0EvPg5p9YIKStbNAW9eNWvv5R8HN7PPei21AsUqxekK0oW9jnEdHewckToX7x5zULWKwwZIksll0XnVczVgy7fCFwIDAQAB
-----END PUBLIC KEY-----
After some attemps I decided to write a simple test program to check if JWT signature is correct or it was a key format issue. You can test it (Java 8). It is fully functional
package test;
import java.math.BigInteger;
import java.security.InvalidKeyException;
import java.security.KeyFactory;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.PublicKey;
import java.security.Signature;
import java.security.SignatureException;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.RSAPublicKeySpec;
import java.util.Base64;
public class JWKTest {
private static final String[] HEX_TABLE = new String[]{
"00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0a", "0b", "0c", "0d", "0e", "0f",
"10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d", "1e", "1f",
"20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "2a", "2b", "2c", "2d", "2e", "2f",
"30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "3a", "3b", "3c", "3d", "3e", "3f",
"40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "4a", "4b", "4c", "4d", "4e", "4f",
"50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "5a", "5b", "5c", "5d", "5e", "5f",
"60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "6a", "6b", "6c", "6d", "6e", "6f",
"70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "7a", "7b", "7c", "7d", "7e", "7f",
"80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "8a", "8b", "8c", "8d", "8e", "8f",
"90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "9a", "9b", "9c", "9d", "9e", "9f",
"a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "aa", "ab", "ac", "ad", "ae", "af",
"b0", "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "ba", "bb", "bc", "bd", "be", "bf",
"c0", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "ca", "cb", "cc", "cd", "ce", "cf",
"d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "da", "db", "dc", "dd", "de", "df",
"e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", "ea", "eb", "ec", "ed", "ee", "ef",
"f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "fa", "fb", "fc", "fd", "fe", "ff",
};
public static String toHexFromBytes(byte[] bytes) {
StringBuffer rc = new StringBuffer(bytes.length * 2);
for (int i = 0; i < bytes.length; i++) {
rc.append(HEX_TABLE[0xFF & bytes[i]]);
}
return rc.toString();
}
// Build the public key from modulus and exponent
public static PublicKey getPublicKey (String modulusB64u, String exponentB64u) throws NoSuchAlgorithmException, InvalidKeySpecException{
//conversion to BigInteger. I have transformed to Hex because new BigDecimal(byte) does not work for me
byte exponentB[] = Base64.getUrlDecoder().decode(exponentB64u);
byte modulusB[] = Base64.getUrlDecoder().decode(modulusB64u);
BigInteger exponent = new BigInteger(toHexFromBytes(exponentB), 16);
BigInteger modulus = new BigInteger(toHexFromBytes(modulusB), 16);
//Build the public key
RSAPublicKeySpec spec = new RSAPublicKeySpec(modulus, exponent);
KeyFactory factory = KeyFactory.getInstance("RSA");
PublicKey pub = factory.generatePublic(spec);
return pub;
}
public final static void main (String argv[]) throws NoSuchAlgorithmException, InvalidKeySpecException, SignatureException, NoSuchProviderException, InvalidKeyException{
String exponentB64u = "AQAB";
String modulusB64u = "qnTksBdxOiOlsmRNd-mMS2M3o1IDpK4uAr0T4_YqO3zYHAGAWTwsq4ms-NWynqY5HaB4EThNxuq2GWC5JKpO1YirOrwS97B5x9LJyHXPsdJcSikEI9BxOkl6WLQ0UzPxHdYTLpR4_O-0ILAlXw8NU4-jB4AP8Sn9YGYJ5w0fLw5YmWioXeWvocz1wHrZdJPxS8XnqHXwMUozVzQj-x6daOv5FmrHU1r9_bbp0a1GLv4BbTtSh4kMyz1hXylho0EvPg5p9YIKStbNAW9eNWvv5R8HN7PPei21AsUqxekK0oW9jnEdHewckToX7x5zULWKwwZIksll0XnVczVgy7fCFw";
String jwt = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6ImEzck1VZ01Gdjl0UGNsTGE2eUYzekFrZnF1RSIsImtpZCI6ImEzck1VZ01Gdjl0UGNsTGE2eUYzekFrZnF1RSJ9.eyJub25jZSI6IjYzNjA3MDM0OTc3NDIzODg2NS5OMlkxTldKbU1EZ3RZbU13TkMwME9XWTNMVGt5TlRJdE9ERXpOell4Wm1NME0yVmxNV1l5TkdOaFlXTXRaVEpqT1MwME4yRmpMVGd6WmpVdFpXWTVOVEEwWmpFMU1qWTEiLCJpYXQiOjE0NzE0MzgxODIsImF0X2hhc2giOiJLWUJpVkl1Uy1YZERzU3NHcWU5dTJBIiwic3ViIjoiMSIsImFtciI6InBhc3N3b3JkIiwiYXV0aF90aW1lIjoxNDcxNDM4MTgyLCJpZHAiOiJpZHNydiIsImlzcyI6Imh0dHBzOi8vZWx3ZWJhcHBsaWNhdGlvbjEuYXp1cmV3ZWJzaXRlcy5uZXQvaWRlbnRpdHkiLCJhdWQiOiJtdmMiLCJleHAiOjE0NzE0Mzg0ODIsIm5iZiI6MTQ3MTQzODE4Mn0.Ehck2-rA09cJzlfURhDMp-WcXm_t_dl-u0Mli3exdv1HxX8i77x5VfFPM6rP4lcpI3lpN8Yj-FefZYDTUY_UmxCYvXf6ILSrhzEfQVaXSPKX1RUQQIDJGPU6NuFLcR416JpUAkE8joYae3WPj5VsM4yNENGGjUANm4qgj6G_mYy_BiXcSqvRGRYwW5GHDsnnANrIw4oktIYS05yCbjdiNYgQZ043L6Pb2p-5eTPCFqG7WRHp208dhg8D3nhtYEov2Kxod93oKHXSp1zf-Ot0cadk6Ss4fClaTE9S1f29lbwxw7ZxI1L3R4oOL3FZPSSHGp4d3a3AdUKOjKvvTVPv6w";
//Build the public key from modulus and exponent
PublicKey publicKey = getPublicKey (modulusB64u,exponentB64u);
//print key as PEM (base64 and headers)
String publicKeyPEM =
"-----BEGIN PUBLIC KEY-----\n"
+ Base64.getEncoder().encodeToString(publicKey.getEncoded()) +"\n"
+ "-----END PUBLIC KEY-----";
System.out.println( publicKeyPEM);
//get signed data and signature from JWT
String signedData = jwt.substring(0, jwt.lastIndexOf("."));
String signatureB64u = jwt.substring(jwt.lastIndexOf(".")+1,jwt.length());
byte signature[] = Base64.getUrlDecoder().decode(signatureB64u);
//verify Signature
Signature sig = Signature.getInstance("SHA256withRSA");
sig.initVerify(publicKey);
sig.update(signedData.getBytes());
boolean v = sig.verify(signature);
System.out.println(v);
}
}