Yes, but the rest of the name has to match the service name, as well. Again,

JSON fileName = serviceName + "-" + serviceNumericId + ".json"

so  based on your first post in this thread, you should have two files:

The first file, called HTTPSIMAPSwildcard-20170905111650.json, contains

{
        "@class" :
"org.apereo.cas.services.RegexRegisteredService",
        "serviceId" :         "^(https|imaps|http)://.*",
        "name" :              "HTTPS IMAPS wildcard",
        "id" :                20170905111650,
        "evaluationOrder" :   99999
}

Note that I changed the name of the service from "HTTPS/IMAPS wildcard" to
"HTTPS IMAPS wildcard", because '/' is not allowed in file names.

The second file should be called googleApps-1000.json that contains

{
        "@class" :
"org.apereo.cas.services.RegexRegisteredService",
        "serviceId" :         "https://www.google.com/a/dev
.<domain>.com/acs",
        "name" :              "googleApps",
        "id" :                1000,
        "evaluationOrder" :   10
}

and both of those files should be in /etc/cas/services (or whatever you've
set cas.serviceRegistry.json.location to).

All of the above is documented here:
https://apereo.github.io/cas/development/installation/JSON-Service-Management.html



--

DAVID A. CURRY, CISSP
*DIRECTOR OF INFORMATION SECURITY*
INFORMATION TECHNOLOGY

71 FIFTH AVE., 9TH FL., NEW YORK, NY 10003
+1 212 229-5300 x4728 • david.cu...@newschool.edu

[image: The New School]

On Wed, May 16, 2018 at 5:41 AM, Jay <sjayanth.contrac...@lifetouch.com>
wrote:

> Thank you David.
>
> So as I understand.
> The id inside the json file servicenumericId in the file name should
> match. Something like below:
> serviceRegistry-1524464822.json
> "id" : 1524464822
>
> Thanks
> Jay
>
> On Tuesday, May 15, 2018 at 11:23:28 AM UTC-5, Jay wrote:
>>
>> Hi Everyone,
>> Could someone help me to get this ERROR fixed.
>>
>> Below is the entry from my json file
>> Filename: serviceRegistry-1524464822.json
>> [
>> {
>> "@class" : "org.apereo.cas.services.RegexRegisteredService",
>> "serviceId" : "^(https|imaps|http)://.*",
>> "name" : "HTTPS/IMAPS wildcard",
>> "id" : 20170905111650,
>> "evaluationOrder" : 99999
>> },
>> {
>> "@class" : "org.apereo.cas.services.RegexRegisteredService",
>> "serviceId" : "https://www.google.com/a/dev.<domain>.com/acs",
>> "name" : "googleApps",
>> "id" : 1000,
>> "evaluationOrder" : 10
>> }
>> ]
>>
>> I see this error in the logs.
>> [1;31m2018-05-15 11:14:10,091 ERROR [org.apereo.cas.util.serializa
>> tion.AbstractJacksonBackedStringSerializer] - <Cannot read/parse
>> [[{"@class":"org.apereo.cas.services.RegexRegisteredService"
>> ,"serviceId":"^(https|imaps|http)://.*","name":"HTTPS/IMAPS wil...] to
>> deserialize into type [interface org.apereo.cas.services.RegisteredService].
>> This may be caused in the absence of a configuration/support module that
>> knows how to interpret the fragment, specially if the fragment describes a
>> CAS registered service definition. Internal parsing error is [Unexpected
>> token (START_OBJECT), expected VALUE_STRING: need JSON String that contains
>> type id (for subtype of org.apereo.cas.services.RegisteredService)
>>  at [Source: (String)"[{"@class":"org.apereo.cas.services.RegexRegistered
>> Service","serviceId":"^(https|imaps|http)://.*","name":"HTTPS/IMAPS
>> wildcard","id":20170905111650,"evaluationOrder":99999},{"@cl
>> ass":"org.apereo.cas.services.RegexRegisteredService","serviceId":"
>> https://www.google.com/a/dev.<domain>.com/acs","name"
>> :"googleApps","id":1000,"evaluationOrder":10}]"; line: 1, column: 2]]> [m
>> [36m2018-05-15 11:14:10,091 DEBUG [org.apereo.cas.util.serializa
>> tion.AbstractJacksonBackedStringSerializer] - <Unexpected token
>> (START_OBJECT), expected VALUE_STRING: need JSON String that contains type
>> id (for subtype of org.apereo.cas.services.RegisteredService)
>>  at [Source: (String)"[{"@class":"org.apereo.cas.services.RegexRegistered
>> Service","serviceId":"^(https|imaps|http)://.*","name":"HTTPS/IMAPS
>> wildcard","id":20170905111650,"evaluationOrder":99999},{"@cl
>> ass":"org.apereo.cas.services.RegexRegisteredService","serviceId":"
>> https://www.google.com/a/dev.<domain>.com/acs","name"
>> :"googleApps","id":1000,"evaluationOrder":10}]"; line: 1, column: 2]> [m
>> com.fasterxml.jackson.databind.exc.MismatchedInputException: Unexpected
>> token (START_OBJECT), expected VALUE_STRING: need JSON String that contains
>> type id (for subtype of org.apereo.cas.services.RegisteredService)
>>  at [Source: (String)"[{"@class":"org.apereo.cas.services.RegexRegistered
>> Service","serviceId":"^(https|imaps|http)://.*","name":"HTTPS/IMAPS
>> wildcard","id":20170905111650,"evaluationOrder":99999},{"@cl
>> ass":"org.apereo.cas.services.RegexRegisteredService","serviceId":"
>> https://www.google.com/a/dev.<domain>.com/acs","name"
>> :"googleApps","id":1000,"evaluationOrder":10}]"; line: 1, column: 2]
>> at com.fasterxml.jackson.databind.exc.MismatchedInputException.
>> from(MismatchedInputException.java:59) ~[jackson-databind-2.9.3.jar:2
>> .9.3]
>> at com.fasterxml.jackson.databind.DeserializationContext.wrongT
>> okenException(DeserializationContext.java:1498)
>> ~[jackson-databind-2.9.3.jar:2.9.3]
>> at com.fasterxml.jackson.databind.DeserializationContext.report
>> WrongTokenException(DeserializationContext.java:1273)
>> ~[jackson-databind-2.9.3.jar:2.9.3]
>> at com.fasterxml.jackson.databind.jsontype.impl.AsArrayTypeDese
>> rializer._locateTypeId(AsArrayTypeDeserializer.java:151)
>> ~[jackson-databind-2.9.3.jar:2.9.3]
>> at com.fasterxml.jackson.databind.jsontype.impl.AsArrayTypeDese
>> rializer._deserialize(AsArrayTypeDeserializer.java:96)
>> ~[jackson-databind-2.9.3.jar:2.9.3]
>> at com.fasterxml.jackson.databind.jsontype.impl.AsArrayTypeDese
>> rializer.deserializeTypedFromAny(AsArrayTypeDeserializer.java:71)
>> ~[jackson-databind-2.9.3.jar:2.9.3]
>> at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeD
>> eserializer._deserializeTypedUsingDefaultImpl(
>> AsPropertyTypeDeserializer.java:148) ~[jackson-databind-2.9.3.jar:2.9.3]
>> at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeD
>> eserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:88)
>> ~[jackson-databind-2.9.3.jar:2.9.3]
>> at com.fasterxml.jackson.databind.deser.AbstractDeserializer.de
>> serializeWithType(AbstractDeserializer.java:254)
>> ~[jackson-databind-2.9.3.jar:2.9.3]
>> at com.fasterxml.jackson.databind.deser.impl.TypeWrappedDeseria
>> lizer.deserialize(TypeWrappedDeserializer.java:68)
>> ~[jackson-databind-2.9.3.jar:2.9.3]
>> at 
>> com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4001)
>> ~[jackson-databind-2.9.3.jar:2.9.3]
>> at 
>> com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2992)
>> ~[jackson-databind-2.9.3.jar:2.9.3]
>> at org.apereo.cas.util.serialization.AbstractJacksonBackedStrin
>> gSerializer.readObjectFromJson(AbstractJacksonBackedStringSerializer.java:232)
>> ~[cas-server-core-util-api-5.3.0-RC2.jar:5.3.0-RC2]
>> at org.apereo.cas.util.serialization.AbstractJacksonBackedStrin
>> gSerializer.from(AbstractJacksonBackedStringSerializer.java:108)
>> ~[cas-server-core-util-api-5.3.0-RC2.jar:5.3.0-RC2]
>> at 
>> org.apereo.cas.util.serialization.StringSerializer.load(StringSerializer.java:100)
>> ~[cas-server-core-util-api-5.3.0-RC2.jar:5.3.0-RC2]
>> at org.apereo.cas.services.resource.AbstractResourceBasedServic
>> eRegistryDao.lambda$load$4(AbstractResourceBasedServiceRegistryDao.java:269)
>> ~[cas-server-core-services-registry-5.3.0-RC2.jar:5.3.0-RC2]
>> at org.apereo.cas.services.resource.AbstractResourceBasedServic
>> eRegistryDao$$Lambda$161/230611610.apply(Unknown Source) ~[?:?]
>> at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
>> ~[?:1.8.0_31]
>> at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
>> ~[?:1.8.0_31]
>> at 
>> java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
>> ~[?:1.8.0_31]
>> at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:512)
>> ~[?:1.8.0_31]
>> at 
>> java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502)
>> ~[?:1.8.0_31]
>> at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
>> ~[?:1.8.0_31]
>> at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
>> ~[?:1.8.0_31]
>> at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
>> ~[?:1.8.0_31]
>> at org.apereo.cas.services.resource.AbstractResourceBasedServic
>> eRegistryDao.load(AbstractResourceBasedServiceRegistryDao.java:270)
>> ~[cas-server-core-services-registry-5.3.0-RC2.jar:5.3.0-RC2]
>> at org.apereo.cas.services.resource.AbstractResourceBasedServic
>> eRegistryDao$$Lambda$154/594898479.apply(Unknown Source) ~[?:?]
>> at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
>> ~[?:1.8.0_31]
>> at java.util.LinkedList$LLSpliterator.forEachRemaining(LinkedList.java:1235)
>> ~[?:1.8.0_31]
>> at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:512)
>> ~[?:1.8.0_31]
>> at 
>> java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502)
>> ~[?:1.8.0_31]
>> at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
>> ~[?:1.8.0_31]
>> at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
>> ~[?:1.8.0_31]
>> at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
>> ~[?:1.8.0_31]
>> at org.apereo.cas.services.resource.AbstractResourceBasedServic
>> eRegistryDao.load(AbstractResourceBasedServiceRegistryDao.java:232)
>> ~[cas-server-core-services-registry-5.3.0-RC2.jar:5.3.0-RC2]
>> at 
>> org.apereo.cas.services.AbstractServicesManager.load(AbstractServicesManager.java:191)
>> ~[cas-server-core-services-registry-5.3.0-RC2.jar:5.3.0-RC2]
>> at org.apereo.cas.services.AbstractServicesManager$$FastClassBy
>> SpringCGLIB$$fbf64054.invoke(<generated>) ~[cas-server-core-services-reg
>> istry-5.3.0-RC2.jar:5.3.0-RC2]
>> at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
>> ~[spring-core-4.3.14.RELEASE.jar:4.3.14.RELEASE]
>> at org.springframework.aop.framework.CglibAopProxy$CglibMethodI
>> nvocation.invokeJoinpoint(CglibAopProxy.java:738)
>> ~[spring-aop-4.3.14.RELEASE.jar:4.3.14.RELEASE]
>> at org.springframework.aop.framework.ReflectiveMethodInvocation
>> .proceed(ReflectiveMethodInvocation.java:157)
>> ~[spring-aop-4.3.14.RELEASE.jar:4.3.14.RELEASE]
>> at org.springframework.aop.interceptor.ExposeInvocationIntercep
>> tor.invoke(ExposeInvocationInterceptor.java:92)
>> ~[spring-aop-4.3.14.RELEASE.jar:4.3.14.RELEASE]
>> at org.springframework.aop.framework.ReflectiveMethodInvocation
>> .proceed(ReflectiveMethodInvocation.java:179)
>> ~[spring-aop-4.3.14.RELEASE.jar:4.3.14.RELEASE]
>> at org.springframework.aop.framework.CglibAopProxy$DynamicAdvis
>> edInterceptor.intercept(CglibAopProxy.java:673)
>> ~[spring-aop-4.3.14.RELEASE.jar:4.3.14.RELEASE]
>> at org.apereo.cas.services.DefaultServicesManager$$EnhancerBySp
>> ringCGLIB$$cd2d6c0.load(<generated>) ~[cas-server-core-services-reg
>> istry-5.3.0-RC2.jar:5.3.0-RC2]
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> ~[?:1.8.0_31]
>> at 
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>> ~[?:1.8.0_31]
>> at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> ~[?:1.8.0_31]
>> at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_31]
>> at org.springframework.scheduling.support.ScheduledMethodRunnab
>> le.run(ScheduledMethodRunnable.java:65) ~[spring-context-4.3.14.RELEAS
>> E.jar:4.3.14.RELEASE]
>> at org.springframework.scheduling.support.DelegatingErrorHandli
>> ngRunnable.run(DelegatingErrorHandlingRunnable.java:54)
>> ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]
>> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>> ~[?:1.8.0_31]
>> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>> ~[?:1.8.0_31]
>> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFu
>> tureTask.access$301(ScheduledThreadPoolExecutor.java:180) ~[?:1.8.0_31]
>> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFu
>> tureTask.run(ScheduledThreadPoolExecutor.java:294) ~[?:1.8.0_31]
>> at 
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>> ~[?:1.8.0_31]
>> at 
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>> ~[?:1.8.0_31]
>> at java.lang.Thread.run(Thread.java:745) [?:1.8.0_31]
>>
>> --
> - Website: https://apereo.github.io/cas
> - Gitter Chatroom: https://gitter.im/apereo/cas
> - List Guidelines: https://goo.gl/1VRrw7
> - Contributions: https://goo.gl/mh7qDG
> ---
> You received this message because you are subscribed to the Google Groups
> "CAS Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cas-user+unsubscr...@apereo.org.
> To view this discussion on the web visit https://groups.google.com/a/
> apereo.org/d/msgid/cas-user/0df8f115-a97b-473f-856b-
> c21f373a7449%40apereo.org
> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/0df8f115-a97b-473f-856b-c21f373a7449%40apereo.org?utm_medium=email&utm_source=footer>
> .
>

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/CA%2Bd9XAOk%3Dg_7nvfcUXBo%3DZiH_zJDe_sDE2cC0Uhu7KL7NzE5Qw%40mail.gmail.com.

Reply via email to