How to configure Hazelcast-WM using System Properties and spring - spring-3

I'm trying to clusterize http session using hazelcast-wm 3.0, hazelcast-spring 3.0, spring 3.2.2 and servlet-api 3.0.
web.xml:
<listener>
<listener-class>com.company.PropertiesListener</listener-class>
</listener>
...
<filter>
<filter-name>hazelcast-filter</filter-name>
<filter-class>com.hazelcast.web.WebFilter</filter-class>
<!-- Name of the distributed map storing your web session objects -->
<init-param>
<param-name>map-name</param-name>
<param-value>my-sessions</param-value>
</init-param>
<!-- How is your load-balancer configured? stick-session means all requests
of a session is routed to the node where the session is first created. This
is excellent for performance. If sticky-session is set to false, when a session
is updated on a node, entry for this session on all other nodes is invalidated.
You have to know how your load-balancer is configured before setting this
parameter. Default is true. -->
<init-param>
<param-name>sticky-session</param-name>
<param-value>false</param-value>
</init-param>
<!-- Name of session id cookie -->
<init-param>
<param-name>cookie-name</param-name>
<param-value>hazelcast.sessionId</param-value>
</init-param>
<!-- Should cookie only be sent using a secure protocol? Default is false. -->
<init-param>
<param-name>cookie-secure</param-name>
<param-value>false</param-value>
</init-param>
<!-- Should HttpOnly attribute be set on cookie ? Default is false. -->
<init-param>
<param-name>cookie-http-only</param-name>
<param-value>false</param-value>
</init-param>
<!-- Are you debugging? Default is false. -->
<init-param>
<param-name>debug</param-name>
<param-value>false</param-value>
</init-param>
<!-- Configuration xml location; * as servlet resource OR * as classpath
resource OR * as URL Default is one of hazelcast-default.xml or hazelcast.xml
in classpath. -->
<init-param>
<param-name>config-location</param-name>
<param-value>hazelcast-context.xml</param-value>
</init-param>
<!-- Do you want to use an existing HazelcastInstance? Default is null. -->
<init-param>
<param-name>instance-name</param-name>
<param-value>hz.session.instance</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>hazelcast-filter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
<listener>
<listener-class>com.hazelcast.web.SessionListener</listener-class>
</listener>
hazelcast-context.xml
<hz:hazelcast id="hz.session.cluster" depends-on="hazelcast.properties">
<hz:config>
<hz:instance-name>hz.session.instance</hz:instance-name>
<hz:group name="${cluster.name:my-sessions}" password="${cluster.password:mypass}" />
<hz:properties>
<hz:property name="hazelcast.logging.type">slf4j</hz:property>
<hz:property name="hazelcast.version.check.enabled">false</hz:property>
<hz:property name="hazelcast.jmx">true</hz:property>
</hz:properties>
<hz:network port="${cluster.network.port:5701}"
public-address="${cluster.member.address:127.0.0.1}"
port-auto-increment="${cluster.network.port-auto-increment:true}">
<hz:join>
<hz:multicast enabled="${cluster.network.multicast.enabled:false}"
multicast-group="${cluster.network.multicast.group:224.2.2.3}"
multicast-port="${cluster.network.multicast.port:54327}" />
<hz:tcp-ip enabled="${cluster.network.tcpip:true}">
<hz:members>${cluster.members:127.0.0.1}</hz:members>
</hz:tcp-ip>
</hz:join>
</hz:network>
</hz:config>
</hz:hazelcast>
PropertiesListener set System.properties: cluster.members, cluster.member.address, etc, depending on the machine where is running.
If I create hazelcast instance using Application's Spring Context, it works great:
#Configuration
#ImportResource("classpath:hazelcast-context.xml")
public class HazelcastConfig {
}
It works great! Hazelcast instance is bound to the correct network interface.
But the problem is when I use WebFilter (previously, I deleted HazelcastConfig class so not to create Hazelcast instance twice.
These are the messages that appears in the log:
Oct 13, 2013 9:09:28 PM com.hazelcast.config.UrlXmlConfig
INFO: Configuring Hazelcast from 'file:/home/neuquino/springsource/vfabric-tc-server-developer-2.9.2.RELEASE/my-app/wtpwebapps/my-app-web/WEB-INF/classes/hazelcast-context.xml'.
Oct 13, 2013 9:09:28 PM com.hazelcast.config.XmlConfigBuilder
WARNING: Could not find a value for property 'cluster.name:my-sessions' on node: null
Oct 13, 2013 9:09:28 PM com.hazelcast.config.XmlConfigBuilder
WARNING: Could not find a value for property 'cluster.password:mypass' on node: null
Oct 13, 2013 9:09:28 PM com.hazelcast.config.XmlConfigBuilder
WARNING: Could not find a value for property 'cluster.network.port:5701' on node: null
Oct 13, 2013 9:09:28 PM com.hazelcast.config.XmlConfigBuilder
WARNING: Could not find a value for property 'cluster.network.port-auto-increment:true' on node: null
Oct 13, 2013 9:09:28 PM com.hazelcast.config.XmlConfigBuilder
WARNING: Could not find a value for property 'cluster.member.address:127.0.0.1' on node: null
Oct 13, 2013 9:09:28 PM com.hazelcast.config.XmlConfigBuilder
WARNING: Could not find a value for property 'cluster.network.multicast.enabled:false' on node: null
Oct 13, 2013 9:09:28 PM com.hazelcast.config.XmlConfigBuilder
WARNING: Could not find a value for property 'cluster.network.multicast.group:224.2.2.3' on node: null
Oct 13, 2013 9:09:28 PM com.hazelcast.config.XmlConfigBuilder
WARNING: Could not find a value for property 'cluster.network.multicast.port:54327' on node: null
Oct 13, 2013 9:09:28 PM com.hazelcast.config.XmlConfigBuilder
WARNING: Could not find a value for property 'cluster.network.tcpip:true' on node: null
Oct 13, 2013 9:09:28 PM com.hazelcast.config.XmlConfigBuilder
WARNING: Could not find a value for property 'cluster.members:127.0.0.1' on node: null
Oct 13, 2013 9:09:29 PM com.hazelcast.instance.DefaultAddressPicker
INFO: Prefer IPv4 stack is true.
Oct 13, 2013 9:09:29 PM com.hazelcast.instance.DefaultAddressPicker
INFO: Picked Address[10.8.254.133]:5701, using socket ServerSocket[addr=/0:0:0:0:0:0:0:0,localport=5701], bind any local is true
Oct 13, 2013 9:09:29 PM com.hazelcast.system
INFO: [10.8.254.133]:5701 [dev] Hazelcast Community Edition 3.0.2 (20130906) starting at Address[10.8.254.133]:5701
Oct 13, 2013 9:09:29 PM com.hazelcast.system
INFO: [10.8.254.133]:5701 [dev] Copyright (C) 2008-2013 Hazelcast.com
Oct 13, 2013 9:09:29 PM com.hazelcast.instance.Node
INFO: [10.8.254.133]:5701 [dev] Creating MulticastJoiner
Oct 13, 2013 9:09:29 PM com.hazelcast.core.LifecycleService
INFO: [10.8.254.133]:5701 [dev] Address[10.8.254.133]:5701 is STARTING
Oct 13, 2013 9:09:34 PM com.hazelcast.cluster.MulticastJoiner
INFO: [10.8.254.133]:5701 [dev]
Members [1] {
Member [10.8.254.133]:5701 this
}
Oct 13, 2013 9:09:34 PM com.hazelcast.core.LifecycleService
INFO: [10.8.254.133]:5701 [dev] Address[10.8.254.133]:5701 is STARTED
The correct IP should be 11.1.0.133 (${cluster.member.address} value ), Hazelcast is picking one of the network interfaces of my PC, but not using ${cluster.member.address} value.
How can I use WebFilter with System Properties?
Thanks in advance!

You can try to read the properties yourself and modify the Config instance created from the XML or you can create the Config instance yourself. XmlConfigBuilder should do the trick for you. Maybe I'll add a way to register post-creation listeners to the Spring module.

Related

Hazelcast cluster 3.8.3 - issue Ignoring master response since this node has an active master and unable to connects all the members with application

application logs
2022-10-17T22:39:58.598 [main] DEBUG c.a.f.impl.FeatureMasterService - Finding ParentNodeId for Tenant=all-siteId=all
Oct 17, 2022 10:39:58 PM com.hazelcast.config.FileSystemXmlConfig
INFO: Configuring Hazelcast from '/WORK_DIR/attunedlabs/config/local/hazelcast.xml'.
Oct 17, 2022 10:39:58 PM com.hazelcast.instance.DefaultAddressPicker
INFO: [LOCAL] [dev] [3.8] Interfaces is enabled, trying to pick one address matching to one of: [10.244.0.*]
Oct 17, 2022 10:39:58 PM com.hazelcast.instance.DefaultAddressPicker
INFO: [LOCAL] [dev] [3.8] Prefer IPv4 stack is true.
Oct 17, 2022 10:39:58 PM com.hazelcast.instance.DefaultAddressPicker
INFO: [LOCAL] [dev] [3.8] Picked [10.244.0.42]:5701, using socket ServerSocket[addr=/0:0:0:0:0:0:0:0,localport=5701], bind any local is true
Oct 17, 2022 10:39:58 PM com.hazelcast.system
INFO: [10.244.0.42]:5701 [dev] [3.8] Hazelcast 3.8 (20170217 - d7998b4) starting at [10.244.0.42]:5701
Oct 17, 2022 10:39:58 PM com.hazelcast.system
INFO: [10.244.0.42]:5701 [dev] [3.8] Copyright (c) 2008-2017, Hazelcast, Inc. All Rights Reserved.
Oct 17, 2022 10:39:58 PM com.hazelcast.system
INFO: [10.244.0.42]:5701 [dev] [3.8] Configured Hazelcast Serialization version : 1
Oct 17, 2022 10:39:59 PM com.hazelcast.spi.impl.operationservice.impl.BackpressureRegulator
INFO: [10.244.0.42]:5701 [dev] [3.8] Backpressure is disabled
Oct 17, 2022 10:39:59 PM com.hazelcast.instance.Node
INFO: [10.244.0.42]:5701 [dev] [3.8] Creating TcpIpJoiner
Oct 17, 2022 10:39:59 PM com.hazelcast.spi.impl.operationexecutor.impl.OperationExecutorImpl
INFO: [10.244.0.42]:5701 [dev] [3.8] Starting 2 partition threads
Oct 17, 2022 10:39:59 PM com.hazelcast.spi.impl.operationexecutor.impl.OperationExecutorImpl
INFO: [10.244.0.42]:5701 [dev] [3.8] Starting 3 generic threads (1 dedicated for priority tasks)
Oct 17, 2022 10:39:59 PM com.hazelcast.core.LifecycleService
INFO: [10.244.0.42]:5701 [dev] [3.8] [10.244.0.42]:5701 is STARTING
Oct 17, 2022 10:39:59 PM com.hazelcast.nio.tcp.InitConnectionTask
INFO: [10.244.0.42]:5701 [dev] [3.8] Connecting to /10.244.0.35:5701, timeout: 0, bind-any: true
Oct 17, 2022 10:39:59 PM com.hazelcast.nio.tcp.InitConnectionTask
INFO: [10.244.0.42]:5701 [dev] [3.8] Connecting to /10.244.0.36:5701, timeout: 0, bind-any: true
Oct 17, 2022 10:39:59 PM com.hazelcast.nio.tcp.TcpIpConnectionManager
INFO: [10.244.0.42]:5701 [dev] [3.8] Established socket connection between /10.244.0.42:44923 and /10.244.0.36:5701
Oct 17, 2022 10:39:59 PM com.hazelcast.nio.tcp.InitConnectionTask
INFO: [10.244.0.42]:5701 [dev] [3.8] Connecting to /10.244.0.37:5701, timeout: 0, bind-any: true
Oct 17, 2022 10:39:59 PM com.hazelcast.nio.tcp.TcpIpConnectionManager
INFO: [10.244.0.42]:5701 [dev] [3.8] Established socket connection between /10.244.0.42:45363 and /10.244.0.37:5701
Oct 17, 2022 10:39:59 PM com.hazelcast.nio.tcp.TcpIpConnectionManager
INFO: [10.244.0.42]:5701 [dev] [3.8] Established socket connection between /10.244.0.42:57039 and /10.244.0.35:5701
Oct 17, 2022 10:40:00 PM com.hazelcast.internal.cluster.impl.ClusterJoinManager
INFO: [10.244.0.42]:5701 [dev] [3.8] Ignoring master response [10.244.0.35]:5701 from [10.244.0.35]:5701 since this node has an active master [10.244.0.36]:5701
Oct 17, 2022 10:40:00 PM com.hazelcast.internal.cluster.impl.ClusterJoinManager
INFO: [10.244.0.42]:5701 [dev] [3.8] Ignoring master response [10.244.0.37]:5701 from [10.244.0.37]:5701 since this node has an active master [10.244.0.36]:5701
Oct 17, 2022 10:40:00 PM com.hazelcast.internal.cluster.impl.ClusterJoinManager
INFO: [10.244.0.42]:5701 [dev] [3.8] Ignoring master response [10.244.0.37]:5701 from [10.244.0.37]:5701 since this node has an active master [10.244.0.36]:5701
Oct 17, 2022 10:40:00 PM com.hazelcast.internal.cluster.impl.ClusterJoinManager
INFO: [10.244.0.42]:5701 [dev] [3.8] Ignoring master response [10.244.0.35]:5701 from [10.244.0.35]:5701 since this node has an active master [10.244.0.36]:5701
Oct 17, 2022 10:40:05 PM com.hazelcast.system
INFO: [10.244.0.42]:5701 [dev] [3.8] Cluster version set to 3.8
Oct 17, 2022 10:40:05 PM com.hazelcast.internal.cluster.ClusterService
INFO: [10.244.0.42]:5701 [dev] [3.8]
Members [2] {
Member [10.244.0.36]:5701 - 5e5a19c9-5b6b-4c37-be2d-ed93d62a2703
Member [10.244.0.42]:5701 - cc204f89-dfc2-4340-bb93-e28da5e777d0 this
}
Oct 17, 2022 10:40:07 PM com.hazelcast.internal.management.ManagementCenterService
INFO: [10.244.0.42]:5701 [dev] [3.8] Hazelcast will connect to Hazelcast Management Center on address:
http://20.112.253.117:8080/mancenter
Oct 17, 2022 10:40:07 PM com.hazelcast.internal.jmx.ManagementService
hazelcast cluster config hazelcast.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- ~ Copyright (c) 2008-2015, Hazelcast, Inc. All Rights Reserved. ~ ~
Licensed under the Apache License, Version 2.0 (the "License"); ~ you may
not use this file except in compliance with the License. ~ You may obtain
a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~
~ Unless required by applicable law or agreed to in writing, software ~ distributed
under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES
OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for
the specific language governing permissions and ~ limitations under the License. -->
<!-- The default Hazelcast configuration. This is used when: - no hazelcast.xml
if present -->
<hazelcast
xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-3.8.xsd"
xmlns="http://www.hazelcast.com/schema/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<properties>
<property name="hazelcast.jmx">true</property>
</properties>
<group>
<name>dev</name>
<password>dev-pass</password>
</group>
<management-center enabled="true" update-interval="3">http://20.112.253.117:8080/mancenter</management-center>
<network>
<port auto-increment="true" port-count="100">5701</port>
<outbound-ports>
<!-- Allowed port range when connecting to other nodes. 0 or * means use
system provided port. -->
<ports>0</ports>
</outbound-ports>
<join>
<multicast enabled="false">
<multicast-group>224.2.2.3</multicast-group>
<multicast-port>54327</multicast-port>
</multicast>
<tcp-ip enabled="true">
<!-- <interface>127.0.0.1</interface> -->
<members>127.0.0.1:5701</members>
</tcp-ip>
<aws enabled="false">
<access-key>my-access-key</access-key>
<secret-key>my-secret-key</secret-key>
<!--optional, default is us-east-1 -->
<region>us-west-1</region>
<!--optional, default is ec2.amazonaws.com. If set, region shouldn't
be set as it will override this property -->
<host-header>ec2.amazonaws.com</host-header>
<!-- optional, only instances belonging to this group will be discovered,
default will try all running instances -->
<security-group-name>hazelcast-sg</security-group-name>
<tag-key>type</tag-key>
<tag-value>hz-nodes</tag-value>
</aws>
</join>
<interfaces enabled="true">
<interface>10.244.0.*</interface>
</interfaces>
<ssl enabled="false" />
<socket-interceptor enabled="false" />
<symmetric-encryption enabled="false">
application config to setup hazelcast.xml to connect member remotely in same namespace in kubernates
<?xml version="1.0" encoding="UTF-8"?>
<!-- ~ Copyright (c) 2008-2015, Hazelcast, Inc. All Rights Reserved. ~ ~
Licensed under the Apache License, Version 2.0 (the "License"); ~ you may
not use this file except in compliance with the License. ~ You may obtain
a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~
~ Unless required by applicable law or agreed to in writing, software ~ distributed
under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES
OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for
the specific language governing permissions and ~ limitations under the License. -->
<hazelcast xmlns="http://www.hazelcast.com/schema/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.hazelcast.com/schema/config http://www.hazelcast.com/schema/config/hazelcast-config-3.8.xsd">
<group>
<name>dev</name>
<password>****</password>
</group>
<license-key>****</license-key>
<management-center enabled="true" update-interval="3">http://20.112.253.117:8080/mancenter</management-center>
<properties>
<property name="hazelcast.jmx">true</property>
</properties>
<network>
<port port-count="100" auto-increment="false">5701</port>
<reuse-address>true</reuse-address>
<outbound-ports>
<ports>0</ports>
</outbound-ports>
<join>
<multicast enabled="false" loopbackModeEnabled="false">
<multicast-group>224.2.2.3</multicast-group>
<multicast-port>54327</multicast-port>
<multicast-timeout-seconds>2</multicast-timeout-seconds>
<multicast-time-to-live>32</multicast-time-to-live>
</multicast>
<tcp-ip enabled="true" connection-timeout-seconds="5">
<member-list>
<member>10.244.0.35</member>
<member>10.244.0.36</member>
<member>10.244.0.37</member>
</member-list>
</tcp-ip>
<aws enabled="false">
<access-key>my-access-key</access-key>
<secret-key>my-secret-key</secret-key>
<region>us-west-1</region>
<host-header>ec2.amazonaws.com</host-header>
<security-group-name>hazelcast-sg</security-group-name>
<tag-key>type</tag-key>
<tag-value>hz-nodes</tag-value>
</aws>
</join>
<interfaces enabled="true">
<interface>10.244.0.*</interface>
</interfaces>
<partition-group enabled="true" group-type="PER_MEMBER">
<member-group>
<interface>10.244.0.35</interface>
<interface>10.244.0.36</interface>
<interface>10.244.0.37</interface>
</member-group>
</partition-group>
Application logs ( I have created 3 members but in logs showing only one members is added )
Application pod ip : 10.224.0.42
member pod ips : 10.224.0.35,10.224.0.36 and 10.224.0.37
I am trying to connect members remotely to application pods.
Members [2] {
Member [10.244.0.36]:5701 - 5e5a19c9-5b6b-4c37-be2d-ed93d62a2703
Member [10.244.0.42]:5701 - cc204f89-dfc2-4340-bb93-e28da5e777d0 this
}
why other members are not added 10.244.0.37 and 10.244.0.35

how deploy we application with JSF2.2 to weblogic 12

I have web application that configs with with jsf 2.2.4 and primeface 5.1.it works fine when i deploy it on tomcat 8.but it doesn't deploy on weblogic 12.it goes to error in process annotation so i created weblogic.xml then it deployed but error raise up
weblogic.xml
<weblogic-web-app xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd">
<jsp-descriptor>
<keepgenerated>true</keepgenerated>
<debug>true</debug>
</jsp-descriptor>
<container-descriptor>
<prefer-application-packages>
<package-name>javax.faces.*</package-name>
<package-name>com.sun.faces.*</package-name>
<package-name>com.bea.faces.*</package-name>
<package-name>javax.persistence.*</package-name>
<package-name>org.springframework.*</package-name>
</prefer-application-packages>
<prefer-application-resources>
<resource-name>javax.faces.*</resource-name>
<resource-name>com.sun.faces.*</resource-name>
<resource-name>com.bea.faces.*</resource-name>
<resource-name>META-INF/services/javax.servlet.ServletContainerInitializer</resource-name>
<resource-name>META-INF/services/com.sun.faces.*</resource-name>
<resource-name>META-INF/services/javax.faces.*</resource-name>
</prefer-application-resources>
</container-descriptor>
<!-- <osgi-framework-reference>
<name>OsgiFramework-0</name>
<application-bundle-symbolic-name>org.nspofmw.crm.customer</application-bundle-symbolic-name>
</osgi-framework-reference>-->
<context-root>customer</context-root>
</weblogic-web-app>
error is :
May 18, 2015 3:09:04 PM org.springframework.context.support.AbstractApplicationContext doClose
INFO: Closing Root WebApplicationContext: startup date [Mon May 18 15:08:55 IRDT 2015]; root of context hierarchy
May 18, 2015 3:09:04 PM org.springframework.orm.jpa.AbstractEntityManagerFactoryBean destroy
INFO: Closing JPA EntityManagerFactory for persistence unit 'portal'
<May 18, 2015 3:09:10 PM IRDT> <Error> <javax.enterprise.resource.webcontainer.jsf.flow> <BEA-000000> <Unable to obtain CDI 1.1 utilities for Mojarra>
<May 18, 2015 3:09:10 PM IRDT> <Error> <javax.enterprise.resource.webcontainer.jsf.application.view> <BEA-000000> <Unable to obtain CDI 1.1 utilities for Mojarra>
May 18, 2015 3:09:10 PM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization started
May 18, 2015 3:09:10 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing Root WebApplicationContext: startup date [Mon May 18 15:09:10 IRDT 2015]; root of context hierarchy
May 18, 2015 3:09:10 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/springContext.xml]
May 18, 2015 3:09:11 PM org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor <init>
INFO: JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
May 18, 2015 3:09:11 PM org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean createNativeEntityManagerFactory
INFO: Building JPA container EntityManagerFactory for persistence unit 'portal'
May 18, 2015 3:09:11 PM org.hibernate.jpa.internal.util.LogHelper logPersistenceUnitInformation
INFO: HHH000204: Processing PersistenceUnitInfo [
name: portal
...]
May 18, 2015 3:09:11 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.3.6.Final}
May 18, 2015 3:09:11 PM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
May 18, 2015 3:09:11 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
May 18, 2015 3:09:12 PM org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.5.Final}
May 18, 2015 3:09:12 PM org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.Oracle10gDialect
May 18, 2015 3:09:12 PM org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>
INFO: HHH000397: Using ASTQueryTranslatorFactory
May 18, 2015 3:09:13 PM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization completed in 3205 ms
<May 18, 2015 3:09:14 PM IRDT> <Error> <javax.enterprise.resource.webcontainer.jsf.application> <jsf.spi.injection.provider_not_found> <JSF1030: The specified InjectionProvider implementation 'com.bea.faces.WeblogicInjectionProvider' cannot be loaded.>
May 18, 2015 3:09:15 PM org.primefaces.webapp.PostConstructApplicationEventListener processEvent
INFO: Running on PrimeFaces 5.1
May 18, 2015 3:09:15 PM org.primefaces.extensions.application.PostConstructApplicationEventListener processEvent
INFO: Running on PrimeFaces Extensions 3.0.0
[2015-05-18 03:09:16,023] Artifact portal-view:war: Artifact is deployed successfully
[2015-05-18 03:09:16,024] Artifact portal-view:war: Deploy took 11,517 milliseconds
What should i do?
Unfortunately, the latest release of WebLogic available when you posted this question (i.e., 12c Release 3) does not support JSF 2.2, only 2.1.
If you upgrade to 12c R2 (released in October 2015), you'll find JSF 2.2 is now supported.
Current release 12.2.1 support 2.2 according documentation: https://docs.oracle.com/middleware/1221/wls/NOTES/whatsnew.htm#NOTES589

Tomcat MemoryRealm not working

I have created a web application and configured the tomcat container to authenticate users using tomcat memory realms . But its not working. Below are my configuration files
Web.xml
<security-constraint>
<web-resource-collection>
<web-resource-name>MyFirst</web-resource-name>
<description> accessible by authenticated users of the tomcat role</description>
<url-pattern>/eMedicalBookingServer/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
<http-method>PUT</http-method>
<http-method>DELETE</http-method>
</web-resource-collection>
<auth-constraint>
<description>These roles are allowed access</description>
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>MyFirst Protected Area</realm-name>
<!--
<form-login-config>
<form-login-page>/login.html</form-login-page>
<form-error-page>/autherr.html</form-error-page>
</form-login-config>
-->
</login-config>
<security-role>
<description>Only 'tomcat' role is allowed to access this web application</description>
<role-name>admin</role-name>
</security-role>
server.xml
<Realm className="org.apache.catalina.realm.MemoryRealm" />
tomcat-users.xml
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="admin"/>
<role rolename="superuser"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
<user username="ars" password="pass" roles="superuser"/>
<user username="ad1" password="pass" roles="admin"/>
</tomcat-users>
The below is the console output after starting the tomcat
Jul 21, 2014 6:20:53 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path:
.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
Jul 21, 2014 6:20:53 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:eMedicalBookingServer' did not find a matching property.
Jul 21, 2014 6:20:54 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jul 21, 2014 6:20:54 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8443"]
Jul 21, 2014 6:20:54 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Jul 21, 2014 6:20:54 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2095 ms
Jul 21, 2014 6:20:54 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jul 21, 2014 6:20:54 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.54
Jul 21, 2014 6:20:55 PM org.apache.tomcat.websocket.server.WsSci onStartup
INFO: JSR 356 WebSocket (Java WebSocket 1.0) support is not available when running on Java 6. To suppress this message, run Tomcat on Java 7, remove the WebSocket JARs from $CATALINA_HOME/lib or add the WebSocket JARs to the tomcat.util.scan.DefaultJarScanner.jarsToSkip property in $CATALINA_BASE/conf/catalina.properties. Note that the deprecated Tomcat 7 WebSocket API will be available.
Jul 21, 2014 6:20:57 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Jul 21, 2014 6:20:57 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-8443"]
Jul 21, 2014 6:20:57 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2513 ms
Please could you check whats wrong in this configuration. When I open the below link
http://localhost:8080/eMedicalBookingServer/index.html
its not prompting for the user credentials.

struts2 web app is not working in tomcat7 insalled in susi linux

I have developed a web application based on struts2.2.1, using Eclipse indigo IDE with apache-tomcat-7.0.28. To make it work without IDE I have deployed it in Eclipse IDE using: right-click on the project->Export->war.
So, I get war file which I can able to make it work on any windows server installed with apache-tomcat-7.0.28, just copying the war file to tomcat's webapps folder and running the surver. Every things work fine here.
But, when I take this same war file to Linux server installed with same apache-tomcat-7.0.28, it is unable to open event the jsp file specified in web.xml and it shows error 404 page.
I even tried on different linux machines (like Ubuntu), but its not working and I get same 404 error.
why is it so?
UPDATE:
it took this form catalina.out file inside logs folder and inside
Jul 17, 2012 9:35:55 AM org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context [/ai]
Jul 17, 2012 9:36:55 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /usr/apache-tomcat-7.0.28/webapps/ai.war
Jul 17, 2012 9:36:56 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core_rt is already defined
Jul 17, 2012 9:36:56 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core is already defined
Jul 17, 2012 9:36:56 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt_rt is already defined
Jul 17, 2012 9:36:56 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined
Jul 17, 2012 9:36:56 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/permittedTaglibs is already defined
Jul 17, 2012 9:36:56 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined
Jul 17, 2012 9:36:56 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/sql_rt is already defined
Jul 17, 2012 9:36:56 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/sql is already defined
Jul 17, 2012 9:36:56 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined
Jul 17, 2012 9:36:56 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/xml is already defined
log4j:WARN No appenders could be found for logger (com.opensymphony.xwork2.config.providers.XmlConfigurationProvider).
log4j:WARN Please initialize the log4j system properly.
Jul 17, 2012 9:36:56 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error filterStart
Jul 17, 2012 9:36:56 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/ai] startup failed due to previous errors
Jul 17, 2012 9:36:56 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/ai] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10#626028]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;#970110]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Jul 17, 2012 9:36:56 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/ai] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10#1c6f1f4]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;#36d036]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Jul 17, 2012 9:38:46 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/apache-tomcat-7.0.28/webapps/GeneTest
Jul 17, 2012 10:21:48 AM org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context [/ai]
Jul 17, 2012 10:22:38 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /usr/apache-tomcat-7.0.28/webapps/ai.war
Jul 17, 2012 10:22:39 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core_rt is already defined
Jul 17, 2012 10:22:39 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core is already defined
Jul 17, 2012 10:22:39 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt_rt is already defined
Jul 17, 2012 10:22:39 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined
Jul 17, 2012 10:22:39 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/permittedTaglibs is already defined
Jul 17, 2012 10:22:39 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined
Jul 17, 2012 10:22:39 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/sql_rt is already defined
Jul 17, 2012 10:22:39 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/sql is already defined
Jul 17, 2012 10:22:39 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined
Jul 17, 2012 10:22:39 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/xml is already defined
log4j:WARN No appenders could be found for logger (com.opensymphony.xwork2.config.providers.XmlConfigurationProvider).
log4j:WARN Please initialize the log4j system properly.
Jul 17, 2012 10:22:39 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error filterStart
Jul 17, 2012 10:22:39 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/ai] startup failed due to previous errors
Jul 17, 2012 10:22:39 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/ai] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10#1c8e80d]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;#fadb88]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Jul 17, 2012 10:22:39 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/ai] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10#162c87a]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;#57f389]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>ai</display-name>
<welcome-file-list>
<welcome-file>login.jsp</welcome-file>
</welcome-file-list>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
UPDATE: after upgrading form struts2.2.1 to struts2.3.4
Jul 18, 2012 10:38:20 AM org.apache.catalina.core.StandardServer await
INFO: A valid shutdown command was received via the shutdown port. Stopping the Server instance.
Jul 18, 2012 10:38:20 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-8080"]
Jul 18, 2012 10:38:20 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-bio-8009"]
Jul 18, 2012 10:38:20 AM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Jul 18, 2012 10:38:20 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-8080"]
Jul 18, 2012 10:38:20 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8080"]
Jul 18, 2012 10:38:20 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
Jul 18, 2012 10:38:20 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-bio-8009"]
Jul 18, 2012 10:38:25 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib64/jvm/jdk1.6.0_22/jre/lib/i386/server:/usr/lib64/jvm/jdk1.6.0_22/jre/lib/i386:/usr/lib64/jvm/jdk1.6.0_22/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
Jul 18, 2012 10:38:25 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jul 18, 2012 10:38:25 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Jul 18, 2012 10:38:25 AM org.apache.coyote.AbstractProtocol init
SEVERE: Failed to initialize end point associated with ProtocolHandler ["ajp-bio-8009"]
java.net.BindException: Address already in use <null>:8009
at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:406)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:610)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:423)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:974)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:559)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:814)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.startup.Catalina.load(Catalina.java:624)
at org.apache.catalina.startup.Catalina.load(Catalina.java:649)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
Caused by: java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at java.net.ServerSocket.<init>(ServerSocket.java:141)
at org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:49)
at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:393)
... 16 more
Jul 18, 2012 10:38:25 AM org.apache.catalina.core.StandardService initInternal
SEVERE: Failed to initialize connector [Connector[AJP/1.3-8009]]
org.apache.catalina.LifecycleException: Failed to initialize component [Connector[AJP/1.3-8009]]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:559)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:814)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.startup.Catalina.load(Catalina.java:624)
at org.apache.catalina.startup.Catalina.load(Catalina.java:649)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed
at org.apache.catalina.connector.Connector.initInternal(Connector.java:976)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
... 12 more
Caused by: java.net.BindException: Address already in use <null>:8009
at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:406)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:610)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:423)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:974)
... 13 more
Caused by: java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at java.net.ServerSocket.<init>(ServerSocket.java:141)
at org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:49)
at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:393)
... 16 more
Jul 18, 2012 10:38:25 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 544 ms
Jul 18, 2012 10:38:25 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jul 18, 2012 10:38:25 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.28
Jul 18, 2012 10:38:25 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /usr/apache-tomcat-7.0.28/webapps/ai3.war
Jul 18, 2012 10:38:27 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Parsing configuration file [struts-default.xml]
Jul 18, 2012 10:38:27 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Parsing configuration file [struts-plugin.xml]
Jul 18, 2012 10:38:27 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Parsing configuration file [struts.xml]
Jul 18, 2012 10:38:27 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.ObjectFactory)
Jul 18, 2012 10:38:27 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.FileManager)
Jul 18, 2012 10:38:27 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.XWorkConverter)
Jul 18, 2012 10:38:27 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.TextProvider)
Jul 18, 2012 10:38:27 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.ActionProxyFactory)
Jul 18, 2012 10:38:27 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ObjectTypeDeterminer)
Jul 18, 2012 10:38:27 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for (org.apache.struts2.dispatcher.mapper.ActionMapper)
Jul 18, 2012 10:38:27 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (jakarta) for (org.apache.struts2.dispatcher.multipart.MultiPartRequest)
Jul 18, 2012 10:38:27 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for (org.apache.struts2.views.freemarker.FreemarkerManager)
Jul 18, 2012 10:38:27 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for (org.apache.struts2.components.UrlRenderer)
Jul 18, 2012 10:38:27 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.validator.ActionValidatorManager)
Jul 18, 2012 10:38:27 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.util.ValueStackFactory)
Jul 18, 2012 10:38:27 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.util.reflection.ReflectionProvider)
Jul 18, 2012 10:38:27 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.util.reflection.ReflectionContextFactory)
Jul 18, 2012 10:38:27 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.util.PatternMatcher)
Jul 18, 2012 10:38:27 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for (org.apache.struts2.dispatcher.StaticContentLoader)
Jul 18, 2012 10:38:27 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.UnknownHandlerManager)
Jul 18, 2012 10:38:27 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for (org.apache.struts2.views.util.UrlHelper)
Jul 18, 2012 10:38:27 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Overriding property struts.i18n.reload - old value: false new value: true
Jul 18, 2012 10:38:27 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Overriding property struts.configuration.xml.reload - old value: false new value: true
Jul 18, 2012 10:38:27 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error filterStart
Jul 18, 2012 10:38:27 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/ai3] startup failed due to previous errors
Jul 18, 2012 10:38:27 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/apache-tomcat-7.0.28/webapps/ROOT
Jul 18, 2012 10:38:27 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/apache-tomcat-7.0.28/webapps/docs
Jul 18, 2012 10:38:27 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/apache-tomcat-7.0.28/webapps/examples
Jul 18, 2012 10:38:27 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/apache-tomcat-7.0.28/webapps/host-manager
Jul 18, 2012 10:38:27 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/apache-tomcat-7.0.28/webapps/manager
Jul 18, 2012 10:38:27 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/apache-tomcat-7.0.28/webapps/GeneTest
Jul 18, 2012 10:38:27 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Jul 18, 2012 10:38:27 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2106 ms
AFTER THE UPGRADATION This stacktrace shows the application port is already in use means the process is already running try to use different port for the application.or
before the upgradation:RUNTIME Classpath has duplicate TLD's you have to check below paths to
appserver's /lib folder or the JDK's /lib folder and then those check again in the /WEB-INF/lib folder of the WAR build. remove the tld's from the webapps/lib folder if already there in the appservers/lib or JDK's/lib folder

richfaces + eclipse ee + tomcat 7

am having a problem configuring tomcat with richfaces. I copied the:
richfaces-components-ui-4.2.2.Final.jar
richfaces-components-api-4.2.2.Final.jar
richfaces-core-api-4.2.2.Final.jar
richfaces-core-impl-4.2.2.Final.jar
jars into tomcat's \lib and restarted my server. The definition of my xhtml page looks like this:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
But eclipse generates a warning which says
NSL missing: CANNOT_FIND_FACELET_TAGLIB in : org.eclipse.jst.jsf.core.validation.internal.facelet.messages
Is there any other thing I need to configure? I skimmed a lot of tutorials but almost all uses JBoss. Is there a way to configure richfaces with my eclipse and tomcat?
Edited
When I add the jars as external jars, and add the dependencies too, it does not crash the site,though in the console it produces a this:
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.PRETTY_HTML' found, using default value true
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT' found, using default value true
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON' found, using default value false
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS' found, using default value false
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.SAVE_FORM_SUBMIT_LINK_IE' found, using default value false
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS' found, using default value true
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.RENDER_VIEWSTATE_ID' found, using default value true
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.STRICT_XHTML_LINKS' found, using default value true
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.RENDER_FORM_SUBMIT_SCRIPT_INLINE' found, using default value false
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getLongInitParameter
INFO: No context init parameter 'org.apache.myfaces.CONFIG_REFRESH_PERIOD' found, using default value 2
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.VIEWSTATE_JAVASCRIPT' found, using default value false
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getStringInitParameter
INFO: No context init parameter 'org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS' found, using default value auto
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE' found, using default value false
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.VALIDATE_XML' found, using default value false
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG' found, using default value true
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig createAndInitializeMyFacesConfig
INFO: Tomahawk jar not available. Autoscrolling, DetectJavascript, AddResourceClass and CheckExtensionsFilter are disabled now.
Jun 10, 2012 2:15:55 PM org.apache.myfaces.config.FacesConfigurator feedStandardConfig
INFO: Reading standard config META-INF/standard-faces-config.xml
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator getWebAppConfig
INFO: Reading config /WEB-INF/faces-config.xml
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: Starting up MyFaces-package : myfaces-api in version : 2.0.2 from path : file:/D:/Programming/Eclipse%20Workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/OnTheRun/WEB-INF/lib/myfaces-api-2.0.2.jar
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: Starting up MyFaces-package : myfaces-impl in version : 2.0.2 from path : file:/D:/Programming/Eclipse%20Workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/OnTheRun/WEB-INF/lib/myfaces-impl-2.0.2.jar
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : tomahawk not found.
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : tomahawk12 not found.
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : tomahawk-sandbox not found.
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : tomahawk-sandbox12 not found.
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : tomahawk-sandbox15 not found.
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : myfaces-orchestra-core not found.
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : myfaces-orchestra-core12 not found.
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : trinidad-api not found.
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : trinidad-impl not found.
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : tobago not found.
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : commons-el not found.
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : jsp-api not found.
Jun 10, 2012 2:15:56 PM org.apache.myfaces.util.ExternalSpecifications isBeanValidationAvailable
INFO: MyFaces Bean Validation support disabled
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator handleSerialFactory
INFO: Serialization provider : class org.apache.myfaces.shared_impl.util.serial.DefaultSerialFactory
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.annotation.DefaultLifecycleProviderFactory getLifecycleProvider
INFO: Using LifecycleProvider java.lang.String
Jun 10, 2012 2:15:56 PM org.apache.myfaces.webapp.AbstractFacesInitializer initFaces
INFO: ServletContext 'D:\Programming\Eclipse Workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\OnTheRun\' initialized.
Jun 10, 2012 2:15:56 PM org.apache.myfaces.webapp.AbstractFacesInitializer initFaces
Which I assume is because some libraries are missing
UPDATE
Here are my config files:
<faces-config
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
version="2.0">
<application>
<resource-bundle>
<base-name>on.run.messages</base-name>
<var>msgs</var>
</resource-bundle>
</application>
<navigation-rule>
<from-view-id>/login.xhtml</from-view-id>
<navigation-case>
<from-outcome>secret</from-outcome>
<to-view-id>/restricted/transactions.xhtml</to-view-id>
<redirect/>
</navigation-case>
</navigation-rule>
</faces-config>
and
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
<display-name>OnTheRun</display-name>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.xhtml</welcome-file>
</welcome-file-list>
<filter>
<filter-name>AuthFilter</filter-name>
<filter-class>on.run.AuthFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>AuthFilter</filter-name>
<url-pattern>/restricted/*</url-pattern>
</filter-mapping>
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
</web-app>
I also tried tomahawk lib, but I removed it and cleaned the project. I tried this example to test richface but there is nothing displayed.
The console message still remains valid, even though I don't have any reference to tomahawk neither I have it in my buildpath and the project and server is clean. I also tried to add to the buildpath myfaces-impl.jar, does not help. The same console messages come up.
But eclipse generates a warning which says
NSL missing: CANNOT_FIND_FACELET_TAGLIB in : org.eclipse.jst.jsf.core.validation.internal.facelet.messages
That's because you placed the RichFaces libraries in Tomcat instead of in webapp itself. Those libraries are supposed to be placed in webapp's own /WEB-INF/lib. Otherwise you need to add the RichFaces libraries to the server-supplied libraries in Eclipse project buildpath settings. Eclipse namely doesn't expect that you modify the default libraries of Tomcat.
When I add the jars as external jars, and add the dependencies too, it does not crash the site,though in the console it produces a this:
Those are just INFO messages, not WARNING messages. This is specific to MyFaces and those are just to inform the developer/serveradmin what actions MyFaces has taken as to setting some applicationwide parameters. Just ignore them. Only once you get a WARNING, SEVERE, ERROR or FATAL, then you may start worrying. You do not necessarily need Tomahawk.
Folowing dependencies are required:
sac-1.3.jar,
cssparser-0.9.5.jar - for CSS styling.
guava-r09.jar - core runtime dependency.
And of course javax.faces.jar for JSF (or myfaces alternative), take a look here
UPDATE:
And #BalusC have suggested these steps:
Close/reopen project.
Rightclick project > Validate.
Project > Clean... and clean selected project.
Restart Eclipse.
UPDATE 2:
I've prepared a working initial (Dynamic Web) project based on mojarra JSF 2.1, you can download it here. Place this libraries to its WEB-INF\lib folder, start it on tomcat7 server:
http://localhost:8080/TEST/

Resources