And here's my pom.xml.  Which I think looks exactly correct...

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0";
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd ">
    <modelVersion>4.0.0</modelVersion>
    <groupId>net.unicon</groupId>
    <artifactId>cas4-overlay</artifactId>
    <packaging>war</packaging>
    <version>1.0</version>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <warName>cas</warName>
                    <overlays>
                        <overlay>
                            <groupId>org.jasig.cas</groupId>
                            <artifactId>cas-server-webapp</artifactId>
                            <excludes>
                                <exclude>WEB-INF/cas.properties</exclude>

<exclude>WEB-INF/classes/log4j2.xml</exclude>
                            </excludes>
                        </overlay>
                    </overlays>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
            </plugin>

        </plugins>
        <finalName>cas</finalName>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.jasig.cas</groupId>
            <artifactId>cas-server-webapp</artifactId>
            <version>${cas.version}</version>
            <type>war</type>
            <scope>runtime</scope>
        </dependency>
 <dependency>
            <groupId>org.jasig.cas</groupId>
            <artifactId>cas-server-integration-hazelcast</artifactId>
            <version>${cas.version}</version>
        </dependency>

        <dependency>
            <groupId>org.jasig.cas</groupId>
            <artifactId>cas-server-support-ldap</artifactId>
            <version>${cas.version}</version>
        </dependency>

        <!-- For debugging in IDE -->
        <dependency>
            <groupId>org.jasig.cas</groupId>
            <artifactId>cas-server-core</artifactId>
            <version>${cas.version}</version>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.1.0</version>
            <scope>provided</scope>
        </dependency>

    </dependencies>

    <properties>
        <cas.version>4.1.0</cas.version>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <repositories>
        <repository>
            <id>sonatype-releases</id>
            <url>http://oss.sonatype.org/content/repositories/releases/
</url>
        </repository>
        <repository>
            <id>sonatype-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/
</url>
        </repository>
    </repositories>
</project>




On Tue, Oct 20, 2015 at 5:38 PM, Jonas Steinberg <jonassteinbe...@gmail.com>
wrote:

> Ok, fair enough.  Except...
>
> I've been through this so much now Dmitriy that I've got a very fresh
> overlay going.  Let me show you some output from my currently running
> tomcat7 instance, which will show you that in some sense hazelcast is
> running:
>
>
> Oct 20, 2015 5:26:13 PM org.hibernate.validator.internal.util.Version
> <clinit>
> INFO: HV000001: Hibernate Validator 5.1.3.Final
> 2015-10-20 17:26:28,360 INFO
> [org.jasig.cas.ticket.registry.HazelcastTicketRegistry]
> <Setting up Hazelcast Ticket Registry...>
> 2015-10-20 17:26:43,366 INFO
> [org.jasig.cas.util.AutowiringSchedulerFactoryBean] - <Starting Quartz
> Scheduler now>
> 2015-10-20 17:26:43,371 INFO [org.jasig.cas.CasEnvironmentContextListener]
> - <[Apache Tomcat/7.0.23] has loaded the CAS application context>
> 2015-10-20 17:26:52,492 INFO
> [org.jasig.cas.ticket.registry.support.DefaultTicketRegistryCleaner] -
> <Beginning ticket cleanup.>
> 2015-10-20 17:26:53,181 INFO
> [org.jasig.cas.ticket.registry.support.DefaultTicketRegistryCleaner] - <0
> expired tickets found to be removed.>
> 2015-10-20 17:26:53,215 INFO
> [org.jasig.cas.ticket.registry.support.DefaultTicketRegistryCleaner] -
> <Finished ticket cleanup.>
> Oct 20, 2015 5:26:59 PM org.apache.catalina.startup.HostConfig
> deployDirectory
> INFO: Deploying web application directory /usr/local/tomcat7/webapps/ROOT
> Oct 20, 2015 5:26:59 PM org.apache.catalina.startup.HostConfig
> deployDirectory
> INFO: Deploying web application directory
> /usr/local/tomcat7/webapps/host-manager
> Oct 20, 2015 5:26:59 PM org.apache.coyote.AbstractProtocol start
> INFO: Starting ProtocolHandler ["http-bio-7087"]
> Oct 20, 2015 5:26:59 PM org.apache.coyote.AbstractProtocol start
> INFO: Starting ProtocolHandler ["http-bio-7086"]
> Oct 20, 2015 5:26:59 PM org.apache.coyote.AbstractProtocol start
> INFO: Starting ProtocolHandler ["http-bio-7473"]
> Oct 20, 2015 5:26:59 PM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 120112 ms
> 2015-10-20 17:28:35,761 INFO
> [org.jasig.cas.services.DefaultServicesManagerImpl] - <Reloading registered
> services.>
> 2015-10-20 17:28:35,781 INFO
> [org.jasig.cas.services.DefaultServicesManagerImpl] - <Loaded 2 services.>
> 2015-10-20 17:30:35,761 INFO
> [org.jasig.cas.services.DefaultServicesManagerImpl] - <Reloading registered
> services.>
> 2015-10-20 17:30:35,782 INFO
> [org.jasig.cas.services.DefaultServicesManagerImpl] - <Loaded 2 services.>
> 2015-10-20 17:32:35,760 INFO
> [org.jasig.cas.services.DefaultServicesManagerImpl] - <Reloading registered
> service
>
>
>
> This is right out of tomcat7.
>
> However, using this deployConfigContext.xml file that you recommended:
>
>
> https://github.com/Jasig/cas/blob/v4.1.0/cas-server-webapp/src/main/webapp/WEB-INF/deployerConfigContext.xml#L109
>
> ...definitely results in the default ticketRegistry being written.
>
> Now, I would inject this in there:
>
>
> https://github.com/Unicon/cas-addons/wiki/Configuring-HazelcastTicketRegistry
>
> Except that throws errors.
>
> So...do I need to do filtering or whatever or what?  Because that hz
> ticket registry is not being written in there...
>
>
> On Tue, Oct 20, 2015 at 5:28 PM, Dmitriy Kopylenko <dkopyle...@unicon.net>
> wrote:
>
>> By merely including the Hazelcast ticket registry module dependency, it
>> should override the default ticket registry config which is read from HZ
>> module jar. The default CAS' web.xml has that config bit turned on.
>>
>> I'd suggest you start from a fresh overlay project and follow the 4.1
>> documentation to turn the HZ ticket registry on.
>>
>> Best,
>> D.
>>
>>
>>
>> Sent from my iPhone
>>
>> On Oct 20, 2015, at 19:08, Jonas Steinberg <jonassteinbe...@gmail.com>
>> wrote:
>>
>> Yep.  There's definitely something wrong with using
>> https://github.com/Jasig/cas/blob/v4.1.0/cas-server-webapp/src/main/webapp/WEB-INF/deployerConfigContext.xml
>> because now in target/cas/WEB-INF/spring-configuration my
>> ticketRegistry.xml is the default registry and not the hazelcast registry.
>> Any thoughts?
>>
>> On Tue, Oct 20, 2015 at 5:06 PM, Jonas Steinberg <
>> jonassteinbe...@gmail.com> wrote:
>>
>>> I think my problem is this:
>>>
>>> I'm using this:
>>>
>>>
>>> https://github.com/Jasig/cas/blob/v4.1.0/cas-server-webapp/src/main/webapp/WEB-INF/deployerConfigContext.xml
>>>
>>> as is, changing nothing, because I simply need to use the default
>>> authentication handler.  Will this work?
>>>
>>> -jonas
>>>
>>> ps-
>>>
>>> I feel I understand the process:
>>>
>>> clone repo
>>> check out hz-with-ldap branch
>>> rm -rf ldap stuff (not using ldap)
>>> use
>>> https://github.com/Jasig/cas/blob/v4.1.0/cas-server-webapp/src/main/webapp/WEB-INF/deployerConfigContext.xml
>>> instead
>>> correctly configure property whatever to point at cas.properties
>>> correctly configure cas.properties...
>>> ...that should be it...
>>>
>>> On Tue, Oct 20, 2015 at 4:58 PM, Jonas Steinberg <
>>> jonassteinbe...@gmail.com> wrote:
>>>
>>>> And anyway that dependency is already present when I clone your git
>>>> repository.
>>>>
>>>>
>>>> On Tue, Oct 20, 2015 at 4:53 PM, Jonas Steinberg <
>>>> jonassteinbe...@gmail.com> wrote:
>>>>
>>>>> When I inject
>>>>> http://jasig.github.io/cas/4.1.x/installation/Hazelcast-Ticket-Registry.html
>>>>> dependency into my parent pom I receive:
>>>>>
>>>>> ERROR org.springframework.web.context.ContextLoader - Context
>>>>> initialization failed
>>>>> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
>>>>> Line 2 in XML document from ServletContext resource
>>>>> [/WEB-INF/spring-configuration/ticketRegistry.xml] is invalid; nested
>>>>> exception is org.xml.sax.SAXParseException; systemId:
>>>>> http://hazelcast.com/schema/spring/hazelcast-spring-3.1.xsd;
>>>>> lineNumber: 2; columnNumber: 35; s4s-elt-character: Non-whitespace
>>>>> characters are not allowed in schema elements other than 'xs:appinfo' and
>>>>> 'xs:documentation'. Saw '301 Moved Permanently'.
>>>>>
>>>>> -jonas
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Oct 20, 2015 at 4:39 PM, Jonathan Johnson <j...@unicon.net>
>>>>> wrote:
>>>>>
>>>>>> Please refer to the documentation at [
>>>>>> http://jasig.github.io/cas/4.1.x/index.html].
>>>>>>
>>>>>> Specifically you will find the Hazelcast ticket registry info at [
>>>>>> http://jasig.github.io/cas/4.1.x/installation/Hazelcast-Ticket-Registry.html
>>>>>> ].
>>>>>>
>>>>>> The CAS add ons module for the Hazelcast ticket registry should not
>>>>>> be used with CAS 4.1 since it is not part of the main distribution.
>>>>>>
>>>>>> -Jj
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 10/20/15, 15:54, "Jonas Steinberg" <jonassteinbe...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>> >I receive this error when restarting cas-4.1.0 in tomcat7:
>>>>>> >
>>>>>> >15:07:00.314 [pool-2-thread-1] ERROR
>>>>>> org.springframework.web.context.ContextLoader - Context initialization
>>>>>> failed
>>>>>> >org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
>>>>>> Line 2 in XML document from ServletContext resource
>>>>>> [/WEB-INF/spring-configuration/ticketRegistry.xml] is invalid; nested
>>>>>> exception is org.xml.sax.SAXParseException; systemId:
>>>>>> http://hazelcast.com/schema/spring/hazelcast-spring-3.1.xsd;
>>>>>> lineNumber: 2; columnNumber: 35; s4s-elt-character: Non-whitespace
>>>>>> characters are not allowed in schema elements other than 'xs:appinfo' and
>>>>>> 'xs:documentation'. Saw '301 Moved Permanently'.
>>>>>> >
>>>>>> >
>>>>>> >
>>>>>> >The ticketRegistry.xml it refers to is:
>>>>>> >
>>>>>> ><?xml version="1.0" encoding="UTF-8"?>
>>>>>> ><beans xmlns="http://www.springframework.org/schema/beans";
>>>>>> >       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>>>>> >       xmlns:hz="http://www.hazelcast.com/schema/spring";
>>>>>> >       xsi:schemaLocation="
>>>>>> http://www.springframework.org/schema/beans
>>>>>> >
>>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd
>>>>>> >                           http://www.hazelcast.com/schema/spring
>>>>>> >
>>>>>> http://hazelcast.com/schema/spring/hazelcast-spring-3.1.xsd";>
>>>>>> >
>>>>>> >    <hz:hazelcast id="hazelcast">
>>>>>> >        <hz:config>
>>>>>> >            <hz:properties>
>>>>>> >                <hz:property
>>>>>> name="hazelcast.logging.type">slf4j</hz:property>
>>>>>> >                <hz:property
>>>>>> name="hazelcast.max.no.heartbeat.seconds">5</hz:property>
>>>>>> >            </hz:properties>
>>>>>> >            <hz:network port="5701" port-auto-increment="true">
>>>>>> >                <hz:join>
>>>>>> >                    <hz:multicast enabled="false"/>
>>>>>> >                    <hz:tcp-ip enabled="true">
>>>>>> >
>>>>>> <hz:members>${hz.cluster.members}</hz:members>
>>>>>> >                    </hz:tcp-ip>
>>>>>> >                </hz:join>
>>>>>> >            </hz:network>
>>>>>> >            <hz:map name="tickets"
>>>>>> >
>>>>>> max-idle-seconds="${tgt.timeToKillInSeconds:7200}"
>>>>>> >                            max-size-policy="USED_HEAP_PERCENTAGE"
>>>>>> >                            max-size="85"
>>>>>> >                            eviction-policy="LRU"
>>>>>> >                            eviction-percentage="10"/>
>>>>>> >        </hz:config>
>>>>>> >    </hz:hazelcast>
>>>>>> >
>>>>>> >    <cas:hazelcast-ticket-registry hazelcast-instance="hazelcast"
>>>>>> >
>>>>>>  tgt-entries-ttl-seconds="${tgt.maxTimeToLiveInSeconds:28800}"
>>>>>> >
>>>>>>  st-entries-ttl-seconds="${st.timeToKillInSeconds:10}"/>
>>>>>> >
>>>>>> ></beans>
>>>>>> >
>>>>>> >This is all built automatically in maven via the following
>>>>>> dependency:
>>>>>> >
>>>>>> >
>>>>>> https://github.com/unicon-cas-addons/cas-addon-hazelcast-ticket-registry
>>>>>> >
>>>>>> >As I said the unicon add-on builds the ticketRegistry.xml file via
>>>>>> maven, hence I have no idea what the error could be?!  This is not the
>>>>>> first time this error has been received:
>>>>>> >
>>>>>> >See:
>>>>>> >
>>>>>> >
>>>>>> http://stackoverflow.com/questions/31806034/spring-tomcat-non-whitespace-characters-are-not-allowed-in-schema-elements-s
>>>>>> >
>>>>>> >--
>>>>>> >You are currently subscribed to cas-user@lists.jasig.org as:
>>>>>> j...@unicon.net
>>>>>> >To unsubscribe, change settings or access archives, see
>>>>>> http://www.ja-sig.org/wiki/display/JSG/cas-user
>>>>>>
>>>>>>
>>>>>> --
>>>>>> You are currently subscribed to cas-user@lists.jasig.org as:
>>>>>> jonassteinbe...@gmail.com
>>>>>> To unsubscribe, change settings or access archives, see
>>>>>> http://www.ja-sig.org/wiki/display/JSG/cas-user
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>> --
>> You are currently subscribed to cas-user@lists.jasig.org as: 
>> dkopyle...@unicon.net
>> To unsubscribe, change settings or access archives, see 
>> http://www.ja-sig.org/wiki/display/JSG/cas-user
>>
>> --
>> You are currently subscribed to cas-user@lists.jasig.org as: 
>> jonassteinbe...@gmail.com
>> To unsubscribe, change settings or access archives, see 
>> http://www.ja-sig.org/wiki/display/JSG/cas-user
>>
>>
>

-- 
You are currently subscribed to cas-user@lists.jasig.org as: 
arch...@mail-archive.com
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to