Redis Sentinel Authentication using Lettuce+SpringDataRedis - spring

I have the redis sentinels configured in my local running at 2 different ports 10001 and 10002. I have the sentinel authentication setup for the same.
Redis sentinel configuration
port 10001
bind 127.0.0.1
requirepass password
sentinel myid qwqsffhdhjyutsfgsfg4656767ifdfgtw4tgerhj
sentinel deny-scripts-reconfig yes
sentinel monitor mymaster 127.0.0.1 7777 2
sentinel auth-pass mymaster password
Version of jars used
Spring-data-redis : 2.0.10.RELEASE
Lettuce (io.lettuce.lettuce-core) : 5.0.5.RELEASE
Upon trying to connect to the redisSentinelConfiguration, I keep getting the NOAUTH Authentication REquired error
RedisSentinelConfiguration using Spring DI
<bean id="redisSentinelConfiguration" class="org.springframework.data.redis.connection.RedisSentinelConfiguration" p:password="#{T(org.springframework.data.redis.connection.RedisPassword).of('password')}">
<constructor-arg type="java.lang.String" value="mymaster"></constructor-arg>
<constructor-arg type="java.util.Set"> <set value-type="java.lang.String">
<value>127.0.0.1:10001</value> <value>127.0.0.1:10002</value>
</set> </constructor-arg> </bean>
ERROR:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'enableRedisKeyspaceNotificationsInitializer' defined in class path resource [org/springframework/session/data/redis/config/annotation/web/http/RedisHttpSessionConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is io.lettuce.core.RedisException: java.util.concurrent.ExecutionException: io.lettuce.core.RedisCommandExecutionException: NOAUTH Authentication required.
10:38:37,980 INFO [stdout] (ServerService Thread Pool -- 72) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1699)
10:38:37,980 INFO [stdout] (ServerService Thread Pool -- 72) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:573)
10:38:37,980 INFO [stdout] (ServerService Thread Pool -- 72) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495)
10:38:37,980 INFO [stdout] (ServerService Thread Pool -- 72) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
10:38:37,980 INFO [stdout] (ServerService Thread Pool -- 72) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
10:38:37,980 INFO [stdout] (ServerService Thread Pool -- 72) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
10:38:37,980 INFO [stdout] (ServerService Thread Pool -- 72) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
10:38:37,980 INFO [stdout] (ServerService Thread Pool -- 72) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:759)
10:38:37,980 INFO [stdout] (ServerService Thread Pool -- 72) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869)
10:38:37,980 INFO [stdout] (ServerService Thread Pool -- 72) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:409)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:200)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:171)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:234)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at java.util.concurrent.FutureTask.run(FutureTask.java:266)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at java.lang.Thread.run(Thread.java:748)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at org.jboss.threads.JBossThread.run(JBossThread.java:320)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) Caused by: org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is io.lettuce.core.RedisException: java.util.concurrent.ExecutionException: io.lettuce.core.RedisCommandExecutionException: NOAUTH Authentication required.
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getNativeConnection(LettuceConnectionFactory.java:966)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getConnection(LettuceConnectionFactory.java:934)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getSharedConnection(LettuceConnectionFactory.java:786)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getConnection(LettuceConnectionFactory.java:300)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration$EnableRedisKeyspaceNotificationsInitializer.afterPropertiesSet(RedisHttpSessionConfiguration.java:284)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1758)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1695)
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) ... 31 more
10:38:37,981 INFO [stdout] (ServerService Thread Pool -- 72) Caused by: io.lettuce.core.RedisException: java.util.concurrent.ExecutionException: io.lettuce.core.RedisCommandExecutionException: NOAUTH Authentication required.
10:38:37,982 INFO [stdout] (ServerService Thread Pool -- 72) at io.lettuce.core.RedisClient.lambda$getSocketAddressSupplier$9(RedisClient.java:720)
10:38:37,982 INFO [stdout] (ServerService Thread Pool -- 72) at io.lettuce.core.ConnectionBuilder.socketAddress(ConnectionBuilder.java:132)
10:38:37,982 INFO [stdout] (ServerService Thread Pool -- 72) at io.lettuce.core.AbstractRedisClient.initializeChannelAsync(AbstractRedisClient.java:251)
10:38:37,982 INFO [stdout] (ServerService Thread Pool -- 72) at io.lettuce.core.RedisClient.connectStatefulAsync(RedisClient.java:318)
10:38:37,982 INFO [stdout] (ServerService Thread Pool -- 72) at io.lettuce.core.RedisClient.connectStandaloneAsync(RedisClient.java:276)
10:38:37,982 INFO [stdout] (ServerService Thread Pool -- 72) at io.lettuce.core.RedisClient.connectStandalone(RedisClient.java:252)
10:38:37,982 INFO [stdout] (ServerService Thread Pool -- 72) at io.lettuce.core.RedisClient.connect(RedisClient.java:202)
10:38:37,982 INFO [stdout] (ServerService Thread Pool -- 72) at org.springframework.data.redis.connection.lettuce.StandaloneConnectionProvider.getConnection(StandaloneConnectionProvider.java:56)
10:38:37,982 INFO [stdout] (ServerService Thread Pool -- 72) at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getNativeConnection(LettuceConnectionFactory.java:959)
10:38:37,982 INFO [stdout] (ServerService Thread Pool -- 72) ... 37 more
10:38:37,982 INFO [stdout] (ServerService Thread Pool -- 72) Caused by: java.util.concurrent.ExecutionException: io.lettuce.core.RedisCommandExecutionException: NOAUTH Authentication required.
10:38:37,982 INFO [stdout] (ServerService Thread Pool -- 72) at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
10:38:37,982 INFO [stdout] (ServerService Thread Pool -- 72) at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915)
10:38:37,984 INFO [stdout] (ServerService Thread Pool -- 72) at io.lettuce.core.RedisClient.lookupRedis(RedisClient.java:728)
10:38:37,984 INFO [stdout] (ServerService Thread Pool -- 72) at io.lettuce.core.RedisClient.getSocketAddress(RedisClient.java:670)
10:38:37,984 INFO [stdout] (ServerService Thread Pool -- 72) at io.lettuce.core.RedisClient.lambda$getSocketAddressSupplier$9(RedisClient.java:713)
10:38:37,984 INFO [stdout] (ServerService Thread Pool -- 72) ... 45 more
10:38:37,984 INFO [stdout] (ServerService Thread Pool -- 72) Caused by: io.lettuce.core.RedisCommandExecutionException: NOAUTH Authentication required.
10:38:37,984 INFO [stdout] (ServerService Thread Pool -- 72) at io.lettuce.core.protocol.AsyncCommand.completeResult(AsyncCommand.java:118)
10:38:37,984 INFO [stdout] (ServerService Thread Pool -- 72) at io.lettuce.core.protocol.AsyncCommand.complete(AsyncCommand.java:109)
10:38:37,984 INFO [stdout] (ServerService Thread Pool -- 72) at io.lettuce.core.protocol.CommandHandler.complete(CommandHandler.java:598)
10:38:37,984 INFO [stdout] (ServerService Thread Pool -- 72) at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:556)
10:38:37,984 INFO [stdout] (ServerService Thread Pool -- 72) at io.lettuce.core.protocol.CommandHandler.channelRead(CommandHandler.java:508)
10:38:37,984 INFO [stdout] (ServerService Thread Pool -- 72) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
10:38:37,984 INFO [stdout] (ServerService Thread Pool -- 72) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
10:38:37,984 INFO [stdout] (ServerService Thread Pool -- 72) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
10:38:37,984 INFO [stdout] (ServerService Thread Pool -- 72) at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
10:38:37,984 INFO [stdout] (ServerService Thread Pool -- 72) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
10:38:37,984 INFO [stdout] (ServerService Thread Pool -- 72) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
10:38:37,984 INFO [stdout] (ServerService Thread Pool -- 72) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
10:38:37,984 INFO [stdout] (ServerService Thread Pool -- 72) at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
10:38:37,984 INFO [stdout] (ServerService Thread Pool -- 72) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
10:38:37,984 INFO [stdout] (ServerService Thread Pool -- 72) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
10:38:37,985 INFO [stdout] (ServerService Thread Pool -- 72) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
10:38:37,985 INFO [stdout] (ServerService Thread Pool -- 72) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
10:38:37,985 INFO [stdout] (ServerService Thread Pool -- 72) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
10:38:37,985 INFO [stdout] (ServerService Thread Pool -- 72) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
10:38:37,985 INFO [stdout] (ServerService Thread Pool -- 72) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
10:38:37,985 INFO [stdout] (ServerService Thread Pool -- 72) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
10:38:37,985 INFO [stdout] (ServerService Thread Pool -- 72) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
10:38:37,985 INFO [stdout] (ServerService Thread Pool -- 72) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
10:38:37,985 INFO [stdout] (ServerService Thread Pool -- 72) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
10:38:37,985 INFO [stdout] (ServerService Thread Pool -- 72) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
10:38:37,985 INFO [stdout] (ServerService Thread Pool -- 72) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
10:38:37,985 INFO [stdout] (ServerService Thread Pool -- 72) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
10:38:37,985 INFO [stdout] (ServerService Thread Pool -- 72) at java.lang.Thread.run(Thread.java:748)
The google refereneces were not helping out in resolving this issue. Any helping hand to resolve the issue would be grateful

I upgraded the Spring-data-redis jar to 2.2.2.RELEASE and Lettuce jar to 5.2.1.RELEASE and that fixed the issue.
There was issue with the lower version of Spring-data-redis jars where the sentinel password is not set properly in the lettuceConverters class which was fixed in the 2.2.2.RELEASE version.

Related

Unexpected exception parsing XML document from class path resource

I'm getting this exception while initializing the spring context.
I can confirm that I'm only using one spring version i.e. 5.3.3.
When I remove,
<context:annotation-config />
<context:component-scan base-package="com" />
from xml then no errors related to this.
Also the same applicationContext.xml file is working in another branch.
2021-07-13 05:05:01,832 INFO [stdout] (ServerService Thread Pool -- 121) DEBUG [4] (07/13/21 06:05:01:832): Startup Bean Invocation: 0 failed
2021-07-13 05:05:01,833 INFO [stdout] (ServerService Thread Pool -- 121) EXCEPTION [3] (07/13/21 06:05:01:833): org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [applicationContext.xml]; nested exception is org.springframework.beans.FatalBeanException: Class [org.springframework.context.config.ContextNamespaceHandler] for namespace [http://www.springframework.org/schema/context] does not implement the [org.springframework.beans.factory.xml.NamespaceHandler] interface: Exception occurred invoking Server Startup Bean
2021-07-13 05:05:01,835 ERROR [stderr] (ServerService Thread Pool -- 121) org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [applicationContext.xml]; nested exception is org.springframework.beans.FatalBeanException: Class [org.springframework.context.config.ContextNamespaceHandler] for namespace [http://www.springframework.org/schema/context] does not implement the [org.springframework.beans.factory.xml.NamespaceHandler] interface
2021-07-13 05:05:01,835 ERROR [stderr] (ServerService Thread Pool -- 121) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:417)
2021-07-13 05:05:01,836 ERROR [stderr] (ServerService Thread Pool -- 121) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:338)
2021-07-13 05:05:01,836 ERROR [stderr] (ServerService Thread Pool -- 121) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
2021-07-13 05:05:01,836 ERROR [stderr] (ServerService Thread Pool -- 121) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188)
2021-07-13 05:05:01,836 ERROR [stderr] (ServerService Thread Pool -- 121) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:224)
2021-07-13 05:05:01,836 ERROR [stderr] (ServerService Thread Pool -- 121) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:195)
2021-07-13 05:05:01,836 ERROR [stderr] (ServerService Thread Pool -- 121) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:257)
2021-07-13 05:05:01,836 ERROR [stderr] (ServerService Thread Pool -- 121) at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:128)
2021-07-13 05:05:01,836 ERROR [stderr] (ServerService Thread Pool -- 121) at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:94)
2021-07-13 05:05:01,836 ERROR [stderr] (ServerService Thread Pool -- 121) at org.springframework.context.support.AbstractRefreshableApplicationContext.__refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
2021-07-13 05:05:01,836 ERROR [stderr] (ServerService Thread Pool -- 121) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:40002)
2021-07-13 05:05:01,837 ERROR [stderr] (ServerService Thread Pool -- 121) at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:676)
2021-07-13 05:05:01,837 ERROR [stderr] (ServerService Thread Pool -- 121) at org.springframework.context.support.AbstractApplicationContext.__refresh(AbstractApplicationContext.java:558)
2021-07-13 05:05:01,837 ERROR [stderr] (ServerService Thread Pool -- 121) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:41010)
2021-07-13 05:05:01,837 ERROR [stderr] (ServerService Thread Pool -- 121) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:144)
2021-07-13 05:05:01,837 ERROR [stderr] (ServerService Thread Pool -- 121) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:85)
2021-07-13 05:05:01,837 ERROR [stderr] (ServerService Thread Pool -- 121) at com.prescient.stnmm.server.beans.BeanAccess.<init>(BeanAccess.java:124)
In my perspective I think that there is internal confusion dependency versions even though you are using only one version... Which led to difficulties and conflicts between dependencies.
Make sure you checked all the versions of dependencies you have locally. Anyways I'm still researching about better answers to this.
Below is the ear structure of my application
'sample.jar'
'firstWar'
'secondWar'
In sample.jar file i have defined beans which I'm initializing from the 'secondWar.war' project. Both the project i.e. sample.jar and 'secondWar.war' has same dependency i.e. 'spring-webmvc' this is causing the confusion. Removed this dependency from 'secondWar.war' and it is working now**

Unregistered Web context in Jboss

Whenever I try to run a spring app in wildfly server, it gets deployed succefully but within a instance it gets undeployed. Here is the log:
13:00:28,442 INFO [org.springframework.web.context.ContextLoader] (ServerService Thread Pool -- 29) Root WebApplicationContext: initialization completed in 1027 ms
13:00:28,445 INFO [io.undertow.servlet] (ServerService Thread Pool -- 29) Initializing Spring FrameworkServlet 'dispatcher'
13:00:28,445 INFO [org.springframework.web.servlet.DispatcherServlet] (ServerService Thread Pool -- 29) FrameworkServlet 'dispatcher': initialization started
13:00:28,447 INFO [org.springframework.web.context.support.AnnotationConfigWebApplicationContext] (ServerService Thread Pool -- 29) Refreshing WebApplicationContext for namespace 'dispatcher-servlet': startup date [Mon Jul 17 13:00:28 NPT 2017]; parent: Root WebApplicationContext
13:00:28,447 INFO [org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor] (ServerService Thread Pool -- 29) JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
13:00:28,462 INFO [org.springframework.web.servlet.DispatcherServlet] (ServerService Thread Pool -- 29) FrameworkServlet 'dispatcher': initialization completed in 17 ms
13:00:28,462 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 29) WFLYUT0021: Registered web context: /taml-nbl
13:00:28,494 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) WFLYSRV0010: Deployed "taml-nbl.war" (runtime-name : "taml-nbl.war")
13:00:30,609 INFO [stdout] (default task-21) BfiDAOImplementation:bfiLogo method invoked.
13:00:33,533 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-8) WFLYJCA0019: Stopped Driver service with driver-name = taml-nbl.war_org.postgresql.Driver_9_4
13:00:33,538 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 28) WFLYUT0022: Unregistered web context: /taml-nbl
13:00:33,542 INFO [io.undertow.servlet] (ServerService Thread Pool -- 28) Destroying Spring FrameworkServlet 'dispatcher'
13:00:33,542 INFO [org.springframework.web.context.support.AnnotationConfigWebApplicationContext] (ServerService Thread Pool -- 28) Closing WebApplicationContext for namespace 'dispatcher-servlet': startup date [Mon Jul 17 13:00:28 NPT 2017]; parent: Root WebApplicationContext
13:00:33,546 INFO [io.undertow.servlet] (ServerService Thread Pool -- 28) Closing Spring root WebApplicationContext
13:00:33,546 INFO [org.springframework.web.context.support.AnnotationConfigWebApplicationContext] (ServerService Thread Pool -- 28) Closing Root WebApplicationContext: startup date [Mon Jul 17 13:00:27 NPT 2017]; root of context hierarchy
13:00:33,547 INFO [org.springframework.context.support.DefaultLifecycleProcessor] (ServerService Thread Pool -- 28) Stopping beans in phase 2147483647
13:00:33,550 INFO [org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler] (ServerService Thread Pool -- 28) Stopping...
13:00:33,552 INFO [org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler] (ServerService Thread Pool -- 28) BrokerAvailabilityEvent[available=false, SimpleBrokerMessageHandler [DefaultSubscriptionRegistry[cache[0 destination(s)], registry[0 sessions]]]]
13:00:33,553 INFO [org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler] (ServerService Thread Pool -- 28) Stopped.
13:00:33,555 INFO [org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor] (ServerService Thread Pool -- 28) Shutting down ExecutorService 'brokerChannelExecutor'
13:00:33,564 INFO [org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler] (ServerService Thread Pool -- 28) Shutting down ExecutorService 'messageBrokerTaskScheduler'
13:00:33,565 INFO [org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor] (ServerService Thread Pool -- 28) Shutting down ExecutorService 'clientOutboundChannelExecutor'
13:00:33,565 INFO [org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor] (ServerService Thread Pool -- 28) Shutting down ExecutorService 'clientInboundChannelExecutor'
13:00:33,597 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0028: Stopped deployment taml-nbl.war (runtime-name: taml-nbl.war) in 67ms
13:00:33,606 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) WFLYSRV0009: Undeployed "taml-nbl.war" (runtime-name: "taml-nbl.war")
13:00:38,634 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) WFLYDS0004: Found taml-nbl.war in deployment directory. To trigger deployment create a file called taml-nbl.war.dodeploy
Even If I manually add .dodeploy file in deployment directory, its not working.
I know am late to this party but just wanted to post as there were no answers for this.
I was facing this issue and all i did was,
Cleared everything which was in jboss-tmp folder and boom it worked.

Migration :: Jboss 6.0 eap toWildfly 10.01+Java 8- java.security.NoSuchProviderException: JCE cannot authenticate the provider BC

I am getting below error when I deploy ear on wildfly 10.
I have used latest jar(bcprov-jdk16-1.46.jar and bcmail-jdk16-1.46.jar) but not worked.
13:46:35,654 ERROR [stderr] (ServerService Thread Pool -- 76) java.security.NoSuchProviderException: JCE cannot authenticate the provider BC
13:46:35,654 ERROR [stderr] (ServerService Thread Pool -- 76) at javax.crypto.JceSecurity.getInstance(JceSecurity.java:100)
13:46:35,669 ERROR [stderr] (ServerService Thread Pool -- 76) at javax.crypto.SecretKeyFactory.getInstance(SecretKeyFactory.java:204)
13:46:35,669 ERROR [stderr] (ServerService Thread Pool -- 76) at com.generic.util.EncryptionUtils.getKey(EncryptionUtils.java:165)
13:46:35,685 ERROR [stderr] (ServerService Thread Pool -- 76) at com.generic.util.EncryptionUtils.initializeDecryptionCipher(EncryptionUtils.java:230)
13:46:35,685 ERROR [stderr] (ServerService Thread Pool -- 76) at com.generic.util.EncryptionUtils.isEncrypted(EncryptionUtils.java:93)
13:46:35,685 ERROR [stderr] (ServerService Thread Pool -- 76) at com.generic.system.SystemStartup.loadDefaulBSettings(SystemStartup.java:286)
13:46:35,685 ERROR [stderr] (ServerService Thread Pool -- 76) at com.generic.system.SystemStartup.startUp(SystemStartup.java:120)
13:46:35,685 ERROR [stderr] (ServerService Thread Pool -- 76) at sample.servlets.tartup.init(Startup.java:187)
13:46:35,685 ERROR [stderr] (ServerService Thread Pool -- 76) at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)
13:46:35,685 ERROR [stderr] (ServerService Thread Pool -- 76) at org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:78)
13:46:35,685 ERROR [stderr] (ServerService Thread Pool -- 76) at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103)
13:46:35,700 ERROR [stderr] (ServerService Thread Pool -- 76) at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:250)
13:46:35,700 ERROR [stderr] (ServerService Thread Pool -- 76) at io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:133)
13:46:35,700 ERROR [stderr] (ServerService Thread Pool -- 76) at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:546)
13:46:35,700 ERROR [stderr] (ServerService Thread Pool -- 76) at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:517)
13:46:35,700 ERROR [stderr] (ServerService Thread Pool -- 76) at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
13:46:35,700 ERROR [stderr] (ServerService Thread Pool -- 76) at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
13:46:35,716 ERROR [stderr] (ServerService Thread Pool -- 76) at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
13:46:35,716 ERROR [stderr] (ServerService Thread Pool -- 76) at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
13:46:35,716 ERROR [stderr] (ServerService Thread Pool -- 76) at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
13:46:35,716 ERROR [stderr] (ServerService Thread Pool -- 76) at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
13:46:35,716 ERROR [stderr] (ServerService Thread Pool -- 76) at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
13:46:35,732 ERROR [stderr] (ServerService Thread Pool -- 76) at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:559)
13:46:35,732 ERROR [stderr] (ServerService Thread Pool -- 76) at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:101)
13:46:35,732 ERROR [stderr] (ServerService Thread Pool -- 76) at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
13:46:35,732 ERROR [stderr] (ServerService Thread Pool -- 76) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
13:46:35,732 ERROR [stderr] (ServerService Thread Pool -- 76) at java.util.concurrent.FutureTask.run(FutureTask.java:266)
13:46:35,732 ERROR [stderr] (ServerService Thread Pool -- 76) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
13:46:35,732 ERROR [stderr] (ServerService Thread Pool -- 76) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
13:46:35,732 ERROR [stderr] (ServerService Thread Pool -- 76) at java.lang.Thread.run(Thread.java:748)
13:46:35,732 ERROR [stderr] (ServerService Thread Pool -- 76) at org.jboss.threads.JBossThread.run(JBossThread.java:320)
13:46:35,732 ERROR [stderr] (ServerService Thread Pool -- 76) Caused by: java.lang.SecurityException: Cannot verify jar:vfs:/E:/myprj/wildfly-10.1.0.Final/bin/content/myapp.ear/lib/tik
a-app-1.4.jar!/
13:46:35,747 ERROR [stderr] (ServerService Thread Pool -- 76) at javax.crypto.JarVerifier.verifySingleJar(JarVerifier.java:446)
13:46:35,747 ERROR [stderr] (ServerService Thread Pool -- 76) at javax.crypto.JarVerifier.verifyJars(JarVerifier.java:361)
13:46:35,747 ERROR [stderr] (ServerService Thread Pool -- 76) at javax.crypto.JarVerifier.verify(JarVerifier.java:289)
13:46:35,747 ERROR [stderr] (ServerService Thread Pool -- 76) at javax.crypto.JceSecurity.verifyProviderJar(JceSecurity.java:159)
13:46:35,747 ERROR [stderr] (ServerService Thread Pool -- 76) at javax.crypto.JceSecurity.getVerificationResult(JceSecurity.java:185)
13:46:35,747 ERROR [stderr] (ServerService Thread Pool -- 76) at javax.crypto.JceSecurity.getInstance(JceSecurity.java:97)
There are two workarounds.
You create a modul with the libs (bcprov-jdk16-1.46.jar,bcmail-jdk16-1.46.jar) and import it in your jboss-deployment-structure.xml
You add the jars in the jboss-deployment-structure.xml as resource with the option use-physical-code-source="true" Example:
<resource-root path="/lib/bcprov-jdk16-1.46.jar" use-physical-code-source="true"/>

quartz scheduler db lock obtaining issue while on a 2 node cluster

We have implemented Quartz Scheduler 2.2.1 using Spring 4.0.5 . The application starts up fine in a single node , however whenever we try to deploy it to a 2 node cluster , it just hangs while trying to connect to the DB and then the server rolls back the deployment to both of the nodes.
It is interesting to note that the first node to connect Quartz database starts up fine and the 2nd one just hangs , and due to the 2nd deployment timing out, both are rolled back.
Node which works trace snippet:
Working Instance:
16:13:47,116 INFO [org.quartz.core.QuartzScheduler] (ServerService Thread Pool -- 74) Scheduler meta-data: Quartz Scheduler (v2.2.1) 'WHSE12Scheduler' with instanceId 'XTHINK1424639626086'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.
Using job-store 'org.springframework.scheduling.quartz.LocalDataSourceJobStore' - which supports persistence. and is clustered.
16:13:47,116 INFO [org.quartz.impl.StdSchedulerFactory] (ServerService Thread Pool -- 74) Quartz scheduler 'WHSE12Scheduler' initialized from an externally provided properties instance.
16:13:47,116 INFO [org.quartz.impl.StdSchedulerFactory] (ServerService Thread Pool -- 74) Quartz scheduler version: 2.2.1
16:13:47,116 INFO [org.quartz.core.QuartzScheduler] (ServerService Thread Pool -- 74) JobFactory set to: com.innotrac.wmsbridge.utils.AutowiringSpringBeanJobFactory#18d058f6
16:13:47,116 DEBUG [org.springframework.jdbc.datasource.DataSourceUtils] (ServerService Thread Pool -- 74) Fetching JDBC Connection from DataSource
16:13:47,116 DEBUG [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (ServerService Thread Pool -- 74) dds.Quartz: getConnection(null, WrappedConnectionRequestInfo#1c69b554[userName=Wmsbridge]) [0/50]
16:13:47,147 DEBUG [org.springframework.scheduling.quartz.LocalDataSourceJobStore] (ServerService Thread Pool -- 74) Adding TriggerPersistenceDelegate of type: org.quartz.impl.jdbcjobstore.SimpleTriggerPersistenceDelegate
16:13:47,147 DEBUG [org.springframework.scheduling.quartz.LocalDataSourceJobStore] (ServerService Thread Pool -- 74) Adding TriggerPersistenceDelegate of type: org.quartz.impl.jdbcjobstore.CronTriggerPersistenceDelegate
16:13:47,147 DEBUG [org.springframework.scheduling.quartz.LocalDataSourceJobStore] (ServerService Thread Pool -- 74) Adding TriggerPersistenceDelegate of type: org.quartz.impl.jdbcjobstore.CalendarIntervalTriggerPersistenceDelegate
16:13:47,147 DEBUG [org.springframework.scheduling.quartz.LocalDataSourceJobStore] (ServerService Thread Pool -- 74) Adding TriggerPersistenceDelegate of type: org.quartz.impl.jdbcjobstore.DailyTimeIntervalTriggerPersistenceDelegate
16:13:47,444 DEBUG [org.springframework.jdbc.datasource.DataSourceUtils] (ServerService Thread Pool -- 74) Returning JDBC Connection to DataSource
16:13:47,444 DEBUG [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (ServerService Thread Pool -- 74) dds.Quartz: returnConnection(4149d6d, false) [0/50]
16:13:47,444 DEBUG [org.springframework.jdbc.datasource.DataSourceUtils] (ServerService Thread Pool -- 74) Fetching JDBC Connection from DataSource
16:13:47,444 DEBUG [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (ServerService Thread Pool -- 74) dds.Quartz: getConnection(null, WrappedConnectionRequestInfo#1c69b554[userName=Wmsbridge]) [0/50]
16:13:47,444 DEBUG [org.quartz.impl.jdbcjobstore.StdRowLockSemaphore] (ServerService Thread Pool -- 74) Lock 'TRIGGER_ACCESS' is desired by: ServerService Thread Pool -- 74
16:13:47,444 DEBUG [org.quartz.impl.jdbcjobstore.StdRowLockSemaphore] (ServerService Thread Pool -- 74) Lock 'TRIGGER_ACCESS' is being obtained: ServerService Thread Pool -- 74
16:13:47,475 DEBUG [org.quartz.impl.jdbcjobstore.StdRowLockSemaphore] (ServerService Thread Pool -- 74) Lock 'TRIGGER_ACCESS' given to: ServerService Thread Pool -- 74
16:13:47,553 DEBUG [org.quartz.impl.jdbcjobstore.StdRowLockSemaphore] (ServerService Thread Pool -- 74) Lock 'TRIGGER_ACCESS' returned by: ServerService Thread Pool -- 74
16:13:47,553 DEBUG [org.springframework.jdbc.datasource.DataSourceUtils] (ServerService Thread Pool -- 74) Returning JDBC Connection to DataSource
......
18:52:18,335 INFO [org.springframework.web.servlet.DispatcherServlet] (ServerService Thread Pool -- 65) FrameworkServlet 'mvc-dispatcher': initialization completed in 1335 ms
18:52:18,335 DEBUG [org.springframework.web.servlet.DispatcherServlet] (ServerService Thread Pool -- 65) Servlet 'mvc-dispatcher' configured successfully
18:52:18,356 DEBUG [org.apache.jasper.compiler] (ServerService Thread Pool -- 65) JBWEB005025: Parent class loader is: ModuleClassLoader for Module "deployment.WmsBridgeScheduler.1.0.0.dev.war:main" from Service Module Loader
18:52:18,364 DEBUG [org.jboss.as.security] (MSC service thread 1-2) Qualified url patterns: {/=PatternInfo[pattern=/,type=3,isOverridden=false,qualifiers=[]]}
18:52:18,543 INFO [org.jboss.as.server] (ServerService Thread Pool -- 64) JBAS018559: Deployed "WmsBridgeScheduler.1.0.0.dev.war" (runtime-name : "WmsBridgeScheduler.1.0.0.dev.war")
2nd Node trace snippet just stops at:
16:13:47,163 INFO [org.quartz.core.QuartzScheduler] (ServerService Thread Pool -- 92) Scheduler meta-data: Quartz Scheduler (v2.2.1) 'WHSE12Scheduler' with instanceId 'XTHINK1424639626210'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.
Using job-store 'org.springframework.scheduling.quartz.LocalDataSourceJobStore' - which supports persistence. and is clustered.
16:13:47,163 INFO [org.quartz.impl.StdSchedulerFactory] (ServerService Thread Pool -- 92) Quartz scheduler 'WHSE12Scheduler' initialized from an externally provided properties instance.
16:13:47,163 INFO [org.quartz.impl.StdSchedulerFactory] (ServerService Thread Pool -- 92) Quartz scheduler version: 2.2.1
16:13:47,163 INFO [org.quartz.core.QuartzScheduler] (ServerService Thread Pool -- 92) JobFactory set to: com.innotrac.wmsbridge.utils.AutowiringSpringBeanJobFactory#3e433bf3
16:13:47,163 DEBUG [org.springframework.jdbc.datasource.DataSourceUtils] (ServerService Thread Pool -- 92) Fetching JDBC Connection from DataSource
16:13:47,163 DEBUG [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (ServerService Thread Pool -- 92) dds.Quartz: getConnection(null, WrappedConnectionRequestInfo#1640f765[userName=Wmsbridge]) [0/50]
16:13:47,194 DEBUG [org.springframework.scheduling.quartz.LocalDataSourceJobStore] (ServerService Thread Pool -- 92) Adding TriggerPersistenceDelegate of type: org.quartz.impl.jdbcjobstore.SimpleTriggerPersistenceDelegate
16:13:47,194 DEBUG [org.springframework.scheduling.quartz.LocalDataSourceJobStore] (ServerService Thread Pool -- 92) Adding TriggerPersistenceDelegate of type: org.quartz.impl.jdbcjobstore.CronTriggerPersistenceDelegate
16:13:47,194 DEBUG [org.springframework.scheduling.quartz.LocalDataSourceJobStore] (ServerService Thread Pool -- 92) Adding TriggerPersistenceDelegate of type: org.quartz.impl.jdbcjobstore.CalendarIntervalTriggerPersistenceDelegate
16:13:47,194 DEBUG [org.springframework.scheduling.quartz.LocalDataSourceJobStore] (ServerService Thread Pool -- 92) Adding TriggerPersistenceDelegate of type: org.quartz.impl.jdbcjobstore.DailyTimeIntervalTriggerPersistenceDelegate
16:13:47,459 DEBUG [org.springframework.jdbc.datasource.DataSourceUtils] (ServerService Thread Pool -- 92) Returning JDBC Connection to DataSource
16:13:47,459 DEBUG [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (ServerService Thread Pool -- 92) dds.Quartz: returnConnection(72b7b5e5, false) [0/50]
16:13:47,475 DEBUG [org.springframework.jdbc.datasource.DataSourceUtils] (ServerService Thread Pool -- 92) Fetching JDBC Connection from DataSource
16:13:47,475 DEBUG [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (ServerService Thread Pool -- 92) dds.Quartz: getConnection(null, WrappedConnectionRequestInfo#1640f765[userName=Wmsbridge]) [0/50]
16:13:47,475 DEBUG [org.quartz.impl.jdbcjobstore.StdRowLockSemaphore] (ServerService Thread Pool -- 92) Lock 'TRIGGER_ACCESS' is desired by: ServerService Thread Pool -- 92
16:13:47,475 DEBUG [org.quartz.impl.jdbcjobstore.StdRowLockSemaphore] (ServerService Thread Pool -- 92) Lock 'TRIGGER_ACCESS' is being obtained: ServerService Thread Pool -- 92
16:13:55,477 DEBUG [org.apache.catalina.session] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Start expire sessions StandardManager at 1424639635477 sessioncount 0
Then timing out:
16:18:37,395 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 62) JBAS013412: Timeout after [300] seconds waiting for service container stability. Operation will roll back. Step that first updated the service container was 'deploy' at address '[("deployment" => "WmsBridgeScheduler.1.0.0.dev.war")]'
16:18:37,395 ERROR [org.jboss.as.server] (ServerService Thread Pool -- 62) JBAS015870: Deploy of deployment "WmsBridgeScheduler.1.0.0.dev.war" was rolled back with the following failure message: "JBAS013487: Operation timed out awaiting service container stability"
16:18:47,411 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 62) JBAS013413: Timeout after [5000] seconds waiting for service container stability while finalizing an operation. Process must be restarted. Step that first updated the service container was 'deploy' at address '[("deployment" => "WmsBridgeScheduler.1.0.0.dev.war")]'
16:18:55,753 DEBUG [org.apache.catalina.session] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Start expire sessions StandardManager at 1424639935753 sessioncount 0
16:18:55,753 DEBUG [org.apache.catalina.session] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) End expire sessions StandardManager processingTime 0 expired sessions: 0
If anyone has deployed Quartz Scheduler to a 2 node cluster without any locking issues, I would appreciate any insight into this issue:
Quartz Properties:
org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX
org.quartz.jobStore.isClustered=true
org.quartz.jobStore.clusterCheckinInterval=10000
org.quartz.jobStore.tablePrefix=WHSE12_
org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
org.quartz.threadPool.class=org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount=10
org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread
= true org.quartz.scheduler.userTransactionURL=java:jboss/UserTransaction
org.quartz.scheduler.wrapJobExecutionInUserTransaction = false
org.quartz.jobStore.dontSetAutoCommitFalse=false
org.quartz.scheduler.instanceId=AUTO
org.quartz.jobStore.misfireThreshold=10000
org.quartz.jobStore.useProperties=true
org.quartz.scheduler.interruptJobsOnShutdown=true
org.quartz.scheduler.skipUpdateCheck=true
org.quartz.jobStore.txIsolationLevelSerializable=false
org.quartz.jobStore.acquireTriggersWithinLock=false
org.quartz.plugin.triggHistory.class=org.quartz.plugins.history.LoggingTriggerHistoryPlugin
org.quartz.plugin.triggHistory.triggerFiredMessage=Trigger {1}.{0}
fired job {6}.{5} at {4, date,yyyy-MM-dd HH:mm:ss}
org.quartz.plugin.triggHistory.triggerCompleteMessage=Trigger {1}.{0}
completed firing job {6}.{5} at {4,date, yyyy-MM-dd HH:mm:ss} with
resulting trigger instruction code
Quartz DataSource is JNDI Based which is for Local Transactions and use JTA =false, CCM=false on JBOSS EAP 6.3.0:
<bean id="schedulerFactoryBean" class="org.springframework.scheduling.quartz.SchedulerFactoryBean" destroy-method="destroy" lazy-init="false">
<property name="triggers">
<list>
<ref bean="someTrigger"/>
</list>
</property>
<property name="applicationContextSchedulerContextKey"><value>applicationContext</value></property>
Quartz Properties for the Scheduler
<property name="configLocation" value="classpath:properties/quartz.properties" />
<property name="dataSource" ref="quartzDataSource" />
<property name="schedulerName" value="${jdbc.schedulerName.quartz}" />
<property name="overwriteExistingJobs" value="${jdbc.overwriteExistingJobs.quartz}" />
<property name="autoStartup" value="${jdbc.autoStartup.quartz}" />
<property name="waitForJobsToCompleteOnShutdown" value="${jdbc.waitForJobsToCompleteOnShutdown.quartz}" />
<property name="jobFactory" ref="autowiringSpringBeanJobFactory" />
</bean>
On timing out, I get this:
Caused by: org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: Connection is not associated with a managed connection.org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6#37427b2a [See nested exception: java.sql.SQLException: Connection is not associated with a managed connection.org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6#37427b2a]'
23:14:49,996 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS013413: Timeout after [5000] seconds waiting for service container stability while finalizing an operation. Process must be restarted. Step that first updated the service container was 'add' at address '[("interface" => "management")]'
23:14:50,113 FATAL [org.jboss.as.server] (Controller Boot Thread) JBAS015957: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
23:25:08,221 ERROR [org.springframework.web.context.ContextLoader] (ServerService Thread Pool -- 70) Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schedulerFactoryBean' defined in ServletContext resource [/WEB-INF/spring-infrastructure.xml]: Invocation of init method failed; nested exception is org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: Connection is not associated with a managed connection.org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6#37427b2a [See nested exception: java.sql.SQLException: Connection is not associated with a managed connection.org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6#37427b2a]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1553) [spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) [spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) [spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304) [spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) [spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300) [spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195) [spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:684) [spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760) [spring-context-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) [spring-context-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403) [spring-web-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) [spring-web-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106) [spring-web-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3339) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3777) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:161) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:59) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:94) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_71]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_71]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_71]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_71]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_71]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: Connection is not associated with a managed connection.org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6#37427b2a [See nested exception: java.sql.SQLException: Connection is not associated with a managed connection.org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6#37427b2a]
at org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.executeSQL(StdRowLockSemaphore.java:157) [quartz-2.2.1.jar:]
at org.quartz.impl.jdbcjobstore.DBSemaphore.obtainLock(DBSemaphore.java:113) [quartz-2.2.1.jar:]
at org.quartz.impl.jdbcjobstore.JobStoreCMT.executeInLock(JobStoreCMT.java:238) [quartz-2.2.1.jar:]
at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeJob(JobStoreSupport.java:1086) [quartz-2.2.1.jar:]
at org.quartz.core.QuartzScheduler.addJob(QuartzScheduler.java:969) [quartz-2.2.1.jar:]
at org.quartz.core.QuartzScheduler.addJob(QuartzScheduler.java:958) [quartz-2.2.1.jar:]
at org.quartz.impl.StdScheduler.addJob(StdScheduler.java:268) [quartz-2.2.1.jar:]
at org.springframework.scheduling.quartz.SchedulerAccessor.addJobToScheduler(SchedulerAccessor.java:337) [spring-context-support-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.scheduling.quartz.SchedulerAccessor.addTriggerToScheduler(SchedulerAccessor.java:360) [spring-context-support-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.scheduling.quartz.SchedulerAccessor.registerJobsAndTriggers(SchedulerAccessor.java:298) [spring-context-support-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.scheduling.quartz.SchedulerFactoryBean.afterPropertiesSet(SchedulerFactoryBean.java:514) [spring-context-support-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612) [spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549) [spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
... 23 more
Caused by: java.sql.SQLException: Connection is not associated with a managed connection.org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6#37427b2a
at org.jboss.jca.adapters.jdbc.WrappedConnection.lock(WrappedConnection.java:155)
at org.jboss.jca.adapters.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:395)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_71]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_71]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_71]
at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_71]
at org.quartz.impl.jdbcjobstore.AttributeRestoringConnectionInvocationHandler.invoke(AttributeRestoringConnectionInvocationHandler.java:73) [quartz-2.2.1.jar:]
at com.sun.proxy.$Proxy36.prepareStatement(Unknown Source)
at org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.executeSQL(StdRowLockSemaphore.java:88) [quartz-2.2.1.jar:]
... 35 more

atmosphere, jboss and primefaces push. Get them to work

I'm trying to get it to work primefaces, jboss eap 6.2 and primefaces push, that is based on atmosphere. I'm fighting with it for quite some time and I'm getting nowhere, so here I am.
So here some info on my configuration. Inside my standalone.xml i've set to true the usenative flag, and this is my web.xml:
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
sra-EE
<servlet>
<servlet-name>Push Servlet</servlet-name>
<servlet-class>org.primefaces.push.PushServlet</servlet-class>
<init-param>
<param-name>org.atmosphere.cpr.broadcasterCacheClass</param-name>
<param-value>org.atmosphere.cache.UUIDBroadcasterCache</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.useNative</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
<async-supported>true</async-supported>
</servlet>
<servlet-mapping>
<servlet-name>Push Servlet</servlet-name>
<url-pattern>/primepush/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
<context-param>
<param-name>facelets.FACELETS_SKIP_COMMENTS</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<context-param>
<param-name>org.primefaces.extensions.DELIVER_UNCOMPRESSED_RESOURCES</param-name>
<param-value>false</param-value>
</context-param>
</web-app>
and inside the pom.xml I have:
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-runtime</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>4.0</version>
</dependency>
on deploy I get this error:
12:05:48,544 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) Atmosphere is using org.atmosphere.cpr.DefaultAnnotationProcessor for processing annotation
12:05:48,545 INFO [org.atmosphere.cpr.DefaultAnnotationProcessor] (ServerService Thread Pool -- 11) AnnotationProcessor class org.atmosphere.cpr.DefaultAnnotationProcessor$ServletContainerInitializerAnnotationProcessor being used
12:05:48,546 WARN [org.atmosphere.cpr.DefaultAnnotationProcessor] (ServerService Thread Pool -- 11) Unable to detect annotations. Application may fail to deploy.
12:05:48,547 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) Auto detecting atmosphere handlers /WEB-INF/classes/
12:05:48,554 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) Auto detecting WebSocketHandler in /WEB-INF/classes/
12:05:48,558 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol
12:05:48,560 WARN [org.atmosphere.cpr.DefaultAsyncSupportResolver] (ServerService Thread Pool -- 11) Found multiple containers, please specify which one to use: org.atmosphere.container.JBossWebCometSupport, org.atmosphere.container.TomcatCometSupport, until you do, Atmosphere will use:class org.atmosphere.container.JBossWebCometSupport
12:05:48,562 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) Installing Default AtmosphereInterceptor
12:05:48,563 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) org.atmosphere.interceptor.CorsInterceptor : CORS Interceptor Support
12:05:48,563 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) org.atmosphere.interceptor.CacheHeadersInterceptor : Default Response's Headers Interceptor
12:05:48,565 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) org.atmosphere.interceptor.PaddingAtmosphereInterceptor : Browser Padding Interceptor Support
12:05:48,566 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) org.atmosphere.interceptor.AndroidAtmosphereInterceptor : Android Interceptor Support
12:05:48,566 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) org.atmosphere.interceptor.HeartbeatInterceptor : Heartbeat Interceptor Support
12:05:48,567 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) org.atmosphere.interceptor.SSEAtmosphereInterceptor : SSE Interceptor Support
12:05:48,567 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) org.atmosphere.interceptor.JSONPAtmosphereInterceptor : JSONP Interceptor Support
12:05:48,568 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) org.atmosphere.interceptor.JavaScriptProtocol : Atmosphere JavaScript Protocol
12:05:48,568 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor : org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor
12:05:48,568 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) org.atmosphere.interceptor.OnDisconnectInterceptor : Browser disconnection detection
12:05:48,569 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) org.atmosphere.interceptor.IdleResourceInterceptor : org.atmosphere.interceptor.IdleResourceInterceptor
12:05:48,569 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults to disable them.
12:05:48,573 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) Using EndpointMapper class org.atmosphere.util.DefaultEndpointMapper
12:05:48,573 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) Using BroadcasterCache: org.atmosphere.cache.UUIDBroadcasterCache
12:05:48,574 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) Default Broadcaster Class: org.atmosphere.cpr.DefaultBroadcaster
12:05:48,574 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) Broadcaster Polling Wait Time 100
12:05:48,574 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) Shared ExecutorService supported: true
12:05:48,603 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) Messaging Thread Pool Size: Unlimited
12:05:48,604 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) Async I/O Thread Pool Size: 200
12:05:48,604 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory
12:05:48,605 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor
12:05:48,605 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) HttpSession supported: false
12:05:48,605 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) Atmosphere is using DefaultAtmosphereObjectFactory for dependency injection and object creation
12:05:48,605 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) Atmosphere is using async support: org.atmosphere.container.JBossWebCometSupport running under container: JBoss Web/7.2.2.Final-redhat-1
12:05:48,606 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) Atmosphere Framework 2.1.1 started.
12:05:48,606 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11)
For Atmosphere Framework Commercial Support, visit
http://www.async-io.org/ or send an email to support#async-io.org
12:05:48,607 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) Installed AtmosphereInterceptor Atmosphere LifeCycle with priority AFTER_DEFAULT
12:05:48,608 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) Installed AtmosphereInterceptor Track Message Size Interceptor using | with priority AFTER_DEFAULT
12:05:48,609 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 11) Installed AtmosphereInterceptor UUID Tracking Interceptor with priority AFTER_DEFAULT
12:05:48,680 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018565: Replaced deployment "SRA-ear-1.0.ear" with deployment "SRA-ear-1.0.ear"
12:05:48,813 INFO [org.atmosphere.cpr.AtmosphereFramework] (Thread-101) Latest version of Atmosphere's JavaScript Client 2.1.5
12:06:56,257 ERROR [org.atmosphere.container.JBossWebCometSupport] (http-/0:0:0:0:0:0:0:0:8080-1) HttpEvent is null, JBoss APR Not Properly installed
12:06:56,257 WARN [org.atmosphere.cpr.AtmosphereFramework] (http-/0:0:0:0:0:0:0:0:8080-1) Failed using comet support: org.atmosphere.container.JBossWebCometSupport, error: JBoss failed to detect this is a Comet application because the APR Connector is not enabled.
Make sure atmosphere-compat-jboss.jar is not under your WEB-INF/lib and You must use the atmosphere-native-runtime dependency in order to use native Comet Support
there is no context.xml under WEB-INF Is the NIO or APR Connector enabled?
12:06:56,257 ERROR [org.atmosphere.cpr.AtmosphereFramework] (http-/0:0:0:0:0:0:0:0:8080-1) If you have more than one Connector enabled, make sure they both use the same protocol, e.g NIO/APR or HTTP for all. If not, org.atmosphere.container.BlockingIOCometSupport will be used and cannot be changed.: java.lang.IllegalStateException: JBoss failed to detect this is a Comet application because the APR Connector is not enabled.
Make sure atmosphere-compat-jboss.jar is not under your WEB-INF/lib and You must use the atmosphere-native-runtime dependency in order to use native Comet Support
there is no context.xml under WEB-INF
at org.atmosphere.container.JBossWebCometSupport.<clinit>(JBossWebCometSupport.java:49) [atmosphere-runtime-2.1.1.jar:2.1.1]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.7.0_05]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.7.0_05]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.7.0_05]
at java.lang.reflect.Constructor.newInstance(Constructor.java:525) [rt.jar:1.7.0_05]
at org.atmosphere.cpr.DefaultAsyncSupportResolver.newCometSupport(DefaultAsyncSupportResolver.java:225) [atmosphere-runtime-2.1.1.jar:2.1.1]
at org.atmosphere.cpr.DefaultAsyncSupportResolver.resolveMultipleNativeSupportConflict(DefaultAsyncSupportResolver.java:316) [atmosphere-runtime-2.1.1.jar:2.1.1]
at org.atmosphere.cpr.DefaultAsyncSupportResolver.resolveNativeCometSupport(DefaultAsyncSupportResolver.java:300) [atmosphere-runtime-2.1.1.jar:2.1.1]
at org.atmosphere.cpr.DefaultAsyncSupportResolver.resolve(DefaultAsyncSupportResolver.java:279) [atmosphere-runtime-2.1.1.jar:2.1.1]
at org.atmosphere.cpr.AtmosphereFramework.autoDetectContainer(AtmosphereFramework.java:1579) [atmosphere-runtime-2.1.1.jar:2.1.1]
at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:717) [atmosphere-runtime-2.1.1.jar:2.1.1]
at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:614) [atmosphere-runtime-2.1.1.jar:2.1.1]
at org.atmosphere.cpr.AtmosphereServlet.configureFramework(AtmosphereServlet.java:91) [atmosphere-runtime-2.1.1.jar:2.1.1]
at org.atmosphere.cpr.AtmosphereServlet.init(AtmosphereServlet.java:80) [atmosphere-runtime-2.1.1.jar:2.1.1]
at org.primefaces.push.PushServlet.init(PushServlet.java:43) [primefaces-4.0.jar:4.0]
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1194) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1100) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3591) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3798) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_05]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_05]
at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_05]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_05]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_05]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_05]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
12:06:56,260 WARN [org.atmosphere.cpr.AtmosphereFramework] (http-/0:0:0:0:0:0:0:0:8080-1) Using org.atmosphere.container.BlockingIOCometSupport
I understand that this is not the right way of doing it but... it works, somehow. The problem is if more than one user is using my application atmosphere doesn't seems to understand to who send what, and mess things up.
So I've changed my pom to the following:
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-runtime-native</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>org.atmosphere.jboss.as</groupId>
<artifactId>jboss-as-websockets</artifactId>
<version>0.5</version>
</dependency
no error on deploy but it doesn't not work. It sends messages but it makes a mess, even with one user. Deploy info:
12:25:34,391 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) Atmosphere is using org.atmosphere.cpr.DefaultAnnotationProcessor for processing annotation
12:25:34,392 INFO [org.atmosphere.cpr.DefaultAnnotationProcessor] (ServerService Thread Pool -- 21) AnnotationProcessor class org.atmosphere.cpr.DefaultAnnotationProcessor$BytecodeBasedAnnotationProcessor being used
12:25:34,870 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) Auto detecting atmosphere handlers /WEB-INF/classes/
12:25:34,879 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) Auto detecting WebSocketHandler in /WEB-INF/classes/
12:25:34,883 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol
12:25:34,895 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) Installing Default AtmosphereInterceptor
12:25:34,895 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) org.atmosphere.interceptor.CorsInterceptor : CORS Interceptor Support
12:25:34,895 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) org.atmosphere.interceptor.CacheHeadersInterceptor : Default Response's Headers Interceptor
12:25:34,896 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) org.atmosphere.interceptor.PaddingAtmosphereInterceptor : Browser Padding Interceptor Support
12:25:34,897 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) org.atmosphere.interceptor.AndroidAtmosphereInterceptor : Android Interceptor Support
12:25:34,897 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) org.atmosphere.interceptor.HeartbeatInterceptor : Heartbeat Interceptor Support
12:25:34,898 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) org.atmosphere.interceptor.SSEAtmosphereInterceptor : SSE Interceptor Support
12:25:34,898 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) org.atmosphere.interceptor.JSONPAtmosphereInterceptor : JSONP Interceptor Support
12:25:34,899 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) org.atmosphere.interceptor.JavaScriptProtocol : Atmosphere JavaScript Protocol
12:25:34,899 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor : org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor
12:25:34,899 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) org.atmosphere.interceptor.OnDisconnectInterceptor : Browser disconnection detection
12:25:34,900 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) org.atmosphere.interceptor.IdleResourceInterceptor : org.atmosphere.interceptor.IdleResourceInterceptor
12:25:34,900 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults to disable them.
12:25:34,903 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) Using EndpointMapper class org.atmosphere.util.DefaultEndpointMapper
12:25:34,904 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) Using BroadcasterCache: org.atmosphere.cache.UUIDBroadcasterCache
12:25:34,904 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) Default Broadcaster Class: org.atmosphere.cpr.DefaultBroadcaster
12:25:34,904 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) Broadcaster Polling Wait Time 100
12:25:34,904 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) Shared ExecutorService supported: true
12:25:34,933 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) Messaging Thread Pool Size: Unlimited
12:25:34,933 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) Async I/O Thread Pool Size: 200
12:25:34,933 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory
12:25:34,933 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor
12:25:34,933 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) HttpSession supported: false
12:25:34,933 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) Atmosphere is using DefaultAtmosphereObjectFactory for dependency injection and object creation
12:25:34,933 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) Atmosphere is using async support: org.atmosphere.container.JBossWebSocketSupport running under container: JBoss Web/7.2.2.Final-redhat-1
12:25:34,935 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) Atmosphere Framework 2.1.1 started.
12:25:34,935 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21)
For Atmosphere Framework Commercial Support, visit
http://www.async-io.org/ or send an email to support#async-io.org
12:25:34,935 INFO [org.atmosphere.cpr.AtmosphereServlet] (ServerService Thread Pool -- 21) AtmosphereServlet with native support for Tomcat 6/7 and JBossWeb Installed.
12:25:34,936 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) Installed AtmosphereInterceptor Atmosphere LifeCycle with priority AFTER_DEFAULT
12:25:34,937 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) Installed AtmosphereInterceptor Track Message Size Interceptor using | with priority AFTER_DEFAULT
12:25:34,938 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 21) Installed AtmosphereInterceptor UUID Tracking Interceptor with priority AFTER_DEFAULT
12:25:35,057 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018565: Replaced deployment "SRA-ear-1.0.ear" with deployment "SRA-ear-1.0.ear"
12:25:35,144 INFO [org.atmosphere.cpr.AtmosphereFramework] (Thread-77) Latest version of Atmosphere's JavaScript Client 2.1.5
also, it mess with something once called and my application crashes with the following stack trace:
12:30:50,264 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host]] (http-/0:0:0:0:0:0:0:0:8080-3) JBWEB000238: Exception sending request destroyed lifecycle event to listener instance of class com.sun.faces.config.ConfigureListener: java.lang.UnsupportedOperationException
at javax.faces.context.FacesContext.getExceptionHandler(FacesContext.java:284) [jboss-jsf-api_2.1_spec-2.1.19.1.Final-redhat-1.jar:2.1.19.1.Final-redhat-1]
at javax.faces.event.ExceptionQueuedEventContext.getListenersForEventClass(ExceptionQueuedEventContext.java:262) [jboss-jsf-api_2.1_spec-2.1.19.1.Final-redhat-1.jar:2.1.19.1.Final-redhat-1]
at com.sun.faces.application.ApplicationImpl.invokeComponentListenersFor(ApplicationImpl.java:2102) [jsf-impl-2.1.19-redhat-2.jar:2.1.19-redhat-2]
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:289) [jsf-impl-2.1.19-redhat-2.jar:2.1.19-redhat-2]
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:247) [jsf-impl-2.1.19-redhat-2.jar:2.1.19-redhat-2]
at org.jboss.as.weld.webtier.jsf.ForwardingApplication.publishEvent(ForwardingApplication.java:293) [jboss-as-weld-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
at com.sun.faces.application.WebappLifecycleListener.requestDestroyed(WebappLifecycleListener.java:123) [jsf-impl-2.1.19-redhat-2.jar:2.1.19-redhat-2]
at com.sun.faces.config.ConfigureListener.requestDestroyed(ConfigureListener.java:348) [jsf-impl-2.1.19-redhat-2.jar:2.1.19-redhat-2]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:175) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_05]
and this one after a while:
12:33:20,952 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/SRA-web].[FacesServlet]] (http-/0:0:0:0:0:0:0:0:8080-2) JBWEB000236: Servlet.service() for servlet FacesServlet threw exception: java.lang.IllegalStateException: JBWEB000028: getOutputStream() has already been called for this response
at org.apache.catalina.connector.Response.getWriter(Response.java:609) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:191) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at com.sun.faces.context.ExternalContextImpl.getResponseOutputWriter(ExternalContextImpl.java:778) [jsf-impl-2.1.19-redhat-2.jar:2.1.19-redhat-2]
at com.sun.faces.context.PartialViewContextImpl.createPartialResponseWriter(PartialViewContextImpl.java:433) [jsf-impl-2.1.19-redhat-2.jar:2.1.19-redhat-2]
at com.sun.faces.context.PartialViewContextImpl.access$300(PartialViewContextImpl.java:72) [jsf-impl-2.1.19-redhat-2.jar:2.1.19-redhat-2]
at com.sun.faces.context.PartialViewContextImpl$DelayedInitPartialResponseWriter.getWrapped(PartialViewContextImpl.java:577) [jsf-impl-2.1.19-redhat-2.jar:2.1.19-redhat-2]
at javax.faces.context.PartialResponseWriter.startDocument(PartialResponseWriter.java:115) [jboss-jsf-api_2.1_spec-2.1.19.1.Final-redhat-1.jar:2.1.19.1.Final-redhat-1]
at org.primefaces.context.PrimePartialResponseWriter.startDocument(PrimePartialResponseWriter.java:134) [primefaces-4.0.jar:4.0]
at com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError(AjaxExceptionHandlerImpl.java:199) [jsf-impl-2.1.19-redhat-2.jar:2.1.19-redhat-2]
at com.sun.faces.context.AjaxExceptionHandlerImpl.handle(AjaxExceptionHandlerImpl.java:124) [jsf-impl-2.1.19-redhat-2.jar:2.1.19-redhat-2]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119) [jsf-impl-2.1.19-redhat-2.jar:2.1.19-redhat-2]
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.1.19-redhat-2.jar:2.1.19-redhat-2]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) [jboss-jsf-api_2.1_spec-2.1.19.1.Final-redhat-1.jar:2.1.19.1.Final-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_05]
changing the dependency from atmosphere-runtime-native to atmosphere-runtime doesn't change the situazion.
Sorry for filling this page with stack traces :D
I believe (per the docs) that PrimeFaces Push allows you to push messages to all connected clients. At least, it doesn't show in the docs how to direct push messages to specific clients. This can be done with websockets though - you need to track the connected sessions and send messages to just the session for the client that you need to send a message to. See the Websockets section in the EE7 Tutorial here: https://docs.oracle.com/javaee/7/tutorial/websocket005.htm#BABFCGBJ

Resources