Thank you for spotting that. I have made those changes and restarted Tomcat.
I am still getting errors while utilizing the JSON service registry code. Without it, things work fine. Here is what I am seeing. org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 60 in XML document from ServletContext resource [/WEB-INF/deployerConfigContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 60; columnNumber: 48; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'cas:json-services-registry'. From: Dmitriy Kopylenko [mailto:[email protected]] Sent: Wednesday, February 04, 2015 10:37 AM To: [email protected] Subject: Re: [cas-user] question about non-web console service registration Here’s the culprit (in the attached file). Last line in the “beans elem. header” looks like: http://unicon.net/schema/cas http://unicon.net/schemas/cas/addons.xsd”> it’s supposed to look like this: http://unicon.net/schema/cas http://unicon.net/schema/cas/cas-addons.xsd”> Cheers, D. On Feb 4, 2015, at 12:09 PM, Chris Adams <[email protected]<mailto:[email protected]>> wrote: Here it is... |-----Original Message----- |From: Dmitriy Kopylenko [mailto:[email protected]] |Sent: Wednesday, February 04, 2015 3:46 AM |To: [email protected]<mailto:[email protected]> |Subject: Re: [cas-user] question about non-web console service registration | |FWIW, | |can you attach your entire file? | |Cheers, |Dmitriy. | |Sent from my iPhone | |> On Feb 3, 2015, at 19:23, Chris Adams <[email protected]<mailto:[email protected]>> wrote: |> |> Thank you for your reply. |> |> I did have the line "xmlns:cas="http://unicon.net/schema/cas" defined. |> |> <beans xmlns="http://www.springframework.org/schema/beans" |> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |> xmlns:p="http://www.springframework.org/schema/p" |> xmlns:c="http://www.springframework.org/schema/c" |> xmlns:tx="http://www.springframework.org/schema/tx" |> xmlns:util="http://www.springframework.org/schema/util" |> xmlns:sec="http://www.springframework.org/schema/security" |> xmlns:cas="http://unicon.net/schema/cas" |> xsi:schemaLocation="http://www.springframework.org/schema/beans |> http://www.springframework.org/schema/beans/spring- |beans-3.2.xsd |> http://www.springframework.org/schema/tx |> http://www.springframework.org/schema/tx/spring-tx-3.2.xsd |> http://www.springframework.org/schema/security |> http://www.springframework.org/schema/security/spring- |security-3.2.xsd |> http://www.springframework.org/schema/util |> http://www.springframework.org/schema/util/spring-util.xsd |> http://unicon.net/schema/cas |> |> http://unicon.net/schema/cas/cas-addons.xsd"> |> |> After restarting Tomcat, I can't get to the login page. The log show this: |> |> |> 2015-02-03 16:01:40,237 ERROR |> [org.jasig.cas.web.init.SafeContextLoaderListener] |> - SafeContextLoaderListener: |> The Spring ContextLoaderListener we wrap threw on contextInitialized. |> But for our having caught this error, the web application context |> would not have initialized. |> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: |> Line 65 in XML document from ServletContext resource |> [/WEB-INF/deployerConfigContext.xml] i s invalid; nested exception is |> org.xml.sax.SAXParseException; lineNumber: 65; col |> umnNumber: 48; cvc-complex-type.2.4.c: The matching wildcard is |> strict, but no de claration can be found for element 'cas:json-services- |registry'. |> |> |> |> |-----Original Message----- |> |From: [email protected]<mailto:[email protected]> |> |[mailto:[email protected]] On Behalf Of Milt Epstein |> |Sent: Tuesday, February 03, 2015 1:36 PM |> |To: [email protected]<mailto:[email protected]> |> |Subject: RE: [cas-user] question about non-web console service |> |registration |> | |> |Answers inline below. |> | |> |Milt Epstein |> |Applications Developer |> |Graduate School of Library and Information Science (GSLIS) University |> |of Illinois at Urbana-Champaign (UIUC) [email protected]<mailto:[email protected]> |> | |> | |> |On Tue, 3 Feb 2015, Chris Adams wrote: |> | |> |> Thank you. |> |> |> |> I attempted to use JSON, using |> |> <https://github.com/Unicon/cas-addons/wiki/Configuring-JSON-Service |> |> -Re |> |> gistry> as a reference, but couldn't get it working. From the |> |> gistry> cas.log |> |> : |> |> |> |> 2015-02-02 14:54:42,226 ERROR |> |[org.jasig.cas.web.init.SafeContextLoaderListener] - |> |SafeContextLoaderListener: |> |> The Spring ContextLoaderListener we wrap threw on contextInitialized. |> |> But for our having caught this error, the web application context |> |> would not |> |have initialized. |> |> |org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: |> |Line 57 in XML document from ServletContext resource [/WEB- |> |INF/deployerConfigContext.xml] is invalid; nested exception is |> |org.xml.sax.SAXParseException; lineNumber: 57; columnNumber: 48; The |> |prefix "cas" for element "cas:json-services-registry" is not bound. |> | |> |In XML files, when you see something like |> |"cas:json-services-registry", the part before the ':' is the |> |namespace being used for the tag. This namespace has to have been |> |defined earlier, in this case, in the beans tag. If you look at the examples |on the page you reference, they contain something like: |> | |> | xmlns:cas="http://unicon.net/schema/cas" |> | |> |That defines the cas namespace. It sounds like your XML file is missing |that. |> | |> | |> |> For YAML, is this what you are referring to? |> |> |> |> https://github.com/unicon-cas-addons/cas-addon-yaml-services-regist |> |> ry |> | |> |Yes. If you're using CAS 4.0.x, this is easier to get going with, as |> |compared with the JSON version above. |> | |> | |> |> Just out of curiosity, does service registry utilizing |> |> deployConfigContext.xml without utilizing a database, allow one to |> |> register service data that persists across restarts ? |> | |> |If I understand you correctly, then the answer is yes. Note that if |> |you're using the JSON or YAML services registry, it's not really just |> |utilizing deployConfigContext.xml. But using these schemes, as long |> |as the services registry file persists, the information it contains |> |will be used. If you change that file, and stop/start CAS -- or |> |change it while CAS is not running -- when you start CAS up again, it will use |the info in this file for services registry. |> | |> | |> |> |-----Original Message----- |> |> |From: [email protected]<mailto:[email protected]> |> |> |[mailto:[email protected]] On Behalf Of Milt |> |> |Epstein |> |> |Sent: Monday, February 02, 2015 2:01 PM |> |> |To: [email protected]<mailto:[email protected]> |> |> |Subject: Re: [cas-user] question about non-web console service |> |> |registration |> |> | |> |> |I'm not familiar with managementConfigContext.xml, but if you |> |> |don't need a web app for service registry, I suggest you consider |> |> |JSON or YAML file-based service registry. At our site, we're |> |> |running CAS |> |> |3.4.12 using a JSON config file for service registry, and we're |> |> |about to upgrade to CAS 4.0.1 using YAML. |> |> | |> |> |Details on how to do this can be found online, or in the list |> |> |archives |> |> |-- or if you have further questions, ask here. |> |> | |> |> |Milt Epstein |> |> |Applications Developer |> |> |Graduate School of Library and Information Science (GSLIS) |> |> |University of Illinois at Urbana-Champaign (UIUC) |> |> |[email protected]<mailto:[email protected]> |> |> | |> |> | |> |> |On Mon, 2 Feb 2015, Chris Adams wrote: |> |> | |> |> |> Hello all, |> |> |> |> |> |> I built a Service Management webapp with Maven and was able to |> |> |> get it |> |> |working. Then I realized that the data was not persistent after |> |> |restarting Tomcat. |> |> |> |> |> |> I read the docs and from what I understand, services can still |> |> |> be registered |> |> |and can be persistent across restarts, rather than held in memory, |> |> |regardless if I use the web console or not. |> |> |> |> |> |> Since I only have a handful of services to register, I don't |> |> |> want to create a |> |> |database just for the data. I prefer not to utilize the web console. |> |> |> My question is where to list/register these services? After |> |> |> creating the |> |> |service management webapp, I see the file managerConfigContext.xml |> |> |in the /WEB-INF directory. The docs and the example indicate that |> |> |the services can be designated here. I assume that this is what is |> |> |referred to in the section that says, referring to |> |InMemoryServiceRegistryDaoImpl: |> |> |> |> |> |> "This component is NOT suitable for use with the service |> |> |> management |> |> |console since it does not persist data. On the other hand, it is |> |> |perfectly acceptable for deployments where the XML configuration |> |> |is authoritative for service registry data and the UI will not be used." |> |> |> |> |> |> Also: "It is perfectly acceptable to avoid the service |> |> |> management console |> |> |Web application for managing registered service data. In fact, |> |> |configuration- driven methods (e.g. XML, JSON) may be preferable |> |> |in environments where strict configuration management controls are |> |required." |> |> |> |> |> |> Is the file 'managementConfigContext.xml' where I register these |> |services ? |> |> |> |> |> |> Many thanks. |> |> |> |> |> |> |> |> |> -- |> |> |> You are currently subscribed to [email protected]<mailto:[email protected]> as: |> |> |> [email protected]<mailto:[email protected]> To unsubscribe, change settings or access |> |> |> archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user |> |> | |> |> |-- |> |> |You are currently subscribed to [email protected]<mailto:[email protected]> as: |> |> |[email protected]<mailto:[email protected]> To unsubscribe, change settings or |> |> |access archives, see |> |> |http://www.ja-sig.org/wiki/display/JSG/cas-user |> |> |> |> -- |> |> You are currently subscribed to [email protected]<mailto:[email protected]> as: |> |> [email protected]<mailto:[email protected]> To unsubscribe, change settings or access |> |> archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user |> |> |> |> |> | |> |-- |> |You are currently subscribed to [email protected]<mailto:[email protected]> as: |> |[email protected]<mailto:[email protected]> To unsubscribe, change settings or access |> |archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user |> |> -- |> You are currently subscribed to [email protected]<mailto:[email protected]> as: |> [email protected]<mailto:[email protected]> To unsubscribe, change settings or access |> archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user |> | |-- |You are currently subscribed to [email protected]<mailto:[email protected]> as: |[email protected]<mailto:[email protected]> To unsubscribe, change settings or access archives, |see http://www.ja-sig.org/wiki/display/JSG/cas-user -- You are currently subscribed to [email protected]<mailto:[email protected]> as: [email protected]<mailto:[email protected]> To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user<deployerConfigContext.xml> -- You are currently subscribed to [email protected]<mailto:[email protected]> as: [email protected]<mailto:[email protected]> To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
