I have Spring based application with Ehcache JMS Replication. I need to deploy this application to Weblogic 12, however there is following error that fails deployment:
javax.jms.InvalidSelectorException: weblogic.messaging.kernel.InvalidExpressionException:
Expression : "cacheManagerUniqueId <> 600767500
What is wrong?
weblogic-application.xml
<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-application xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-application"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-application http://xmlns.oracle.com/weblogic/weblogic-application/1.3/weblogic-application.xsd">
<!--Configure the FilteringClassLoader to specify a certain package is loaded from an application-->
<wls:prefer-application-packages>
<!--<wls:package-name>javax.validation.*</wls:package-name>
<wls:package-name>javax.validation.spi.*</wls:package-name>-->
<wls:package-name>javax.persistence.spi.*</wls:package-name>
<wls:package-name>javax.persistence.criteria.*</wls:package-name>
<wls:package-name>javax.persistence.metamodel.*</wls:package-name>
<wls:package-name>javax.persistence.*</wls:package-name>
<wls:package-name>org.springframework.*</wls:package-name>
<wls:package-name>org.hibernate.validator.*</wls:package-name>
<wls:package-name>org.hibernate.*</wls:package-name>
<wls:package-name>net.sf.ehcache.*</wls:package-name>
<!--<wls:package-name>antlr.*</wls:package-name>-->
<wls:package-name>org.codehaus.jackson.*</wls:package-name>
<wls:package-name>com.fasterxml.jackson.*</wls:package-name>
<wls:package-name>org.apache.log4j.*</wls:package-name>
<wls:package-name>org.slf4j</wls:package-name>
<!--ftp-->
<wls:package-name>org.apache.commons.net.*</wls:package-name>
<wls:package-name>org.apache.commons.lang.*</wls:package-name>
<wls:package-name>com.thoughtworks.xstream.*</wls:package-name>
<wls:package-name>com.google.*</wls:package-name>
</wls:prefer-application-packages>
</wls:weblogic-application>
Maven dependencies:
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-jmsreplication</artifactId>
<version>0.5</version>
</dependency>
<dependency>
<groupId>com.googlecode.ehcache-spring-annotations</groupId>
<artifactId>ehcache-spring-annotations</artifactId>
<version>1.2.0</version>
<exclusions>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-core</artifactId>
<version>2.6.11</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-ehcache</artifactId>
<version>4.3.11.Final</version>
<exclusions>
<exclusion>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
<exclusions>
<exclusion>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
</exclusion>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
<exclusion>
<groupId>antlr</groupId>
<artifactId>antlr</artifactId>
</exclusion>
<exclusion>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>antlr</groupId>
<artifactId>antlr</artifactId>
<version>2.7.7</version>
<scope>test</scope>
</dependency>
Full Stack Trace:
Caused By: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.googlecode.ehcache.annotations.config.internalEhCacheCachingAdvisor': Cannot resolve reference to bean 'com.googlecode.ehcache.annotations.impl.CacheStaticMethodMatcherPointcut#0' while setting bean property 'pointcut'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.googlecode.ehcache.annotations.impl.CacheStaticMethodMatcherPointcut#0': Cannot resolve reference to bean 'com.googlecode.ehcache.annotations.impl.CacheAttributeSourceImpl#0' while setting bean property 'cacheAttributeSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.googlecode.ehcache.annotations.impl.CacheAttributeSourceImpl#0': Cannot resolve reference to bean 'serviceCacheManager' while setting bean property 'cacheManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceCacheManager' defined in class path resource [service-context.xml]: Invocation of init method failed; nested exception is net.sf.ehcache.CacheException: Exception while creating JMS connections: weblogic.messaging.kernel.InvalidExpressionException: Expression : "cacheManagerUniqueId <> 600767500"
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1481)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1226)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
Truncated. see log file for complete stacktrace
Caused By: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.googlecode.ehcache.annotations.impl.CacheStaticMethodMatcherPointcut#0': Cannot resolve reference to bean 'com.googlecode.ehcache.annotations.impl.CacheAttributeSourceImpl#0' while setting bean property 'cacheAttributeSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.googlecode.ehcache.annotations.impl.CacheAttributeSourceImpl#0': Cannot resolve reference to bean 'serviceCacheManager' while setting bean property 'cacheManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceCacheManager' defined in class path resource [service-context.xml]: Invocation of init method failed; nested exception is net.sf.ehcache.CacheException: Exception while creating JMS connections: weblogic.messaging.kernel.InvalidExpressionException: Expression : "cacheManagerUniqueId <> 600767500"
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1481)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1226)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
Truncated. see log file for complete stacktrace
Caused By: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.googlecode.ehcache.annotations.impl.CacheAttributeSourceImpl#0': Cannot resolve reference to bean 'serviceCacheManager' while setting bean property 'cacheManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceCacheManager' defined in class path resource [service-context.xml]: Invocation of init method failed; nested exception is net.sf.ehcache.CacheException: Exception while creating JMS connections: weblogic.messaging.kernel.InvalidExpressionException: Expression : "cacheManagerUniqueId <> 600767500"
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1481)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1226)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
Truncated. see log file for complete stacktrace
Caused By: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceCacheManager' defined in class path resource [service-context.xml]: Invocation of init method failed; nested exception is net.sf.ehcache.CacheException: Exception while creating JMS connections: weblogic.messaging.kernel.InvalidExpressionException: Expression : "cacheManagerUniqueId <> 600767500"
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
Truncated. see log file for complete stacktrace
Caused By: net.sf.ehcache.CacheException: Exception while creating JMS connections: weblogic.messaging.kernel.InvalidExpressionException: Expression : "cacheManagerUniqueId <> 600767500"
at net.sf.ehcache.distribution.jms.JMSCacheManagerPeerProvider.init(JMSCacheManagerPeerProvider.java:193)
at net.sf.ehcache.CacheManager.doInit(CacheManager.java:447)
at net.sf.ehcache.CacheManager.init(CacheManager.java:377)
at net.sf.ehcache.CacheManager.<init>(CacheManager.java:259)
at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:1037)
Truncated. see log file for complete stacktrace
Caused By: javax.jms.InvalidSelectorException: weblogic.messaging.kernel.InvalidExpressionException: Expression : "cacheManagerUniqueId <> 600767500"
at weblogic.jms.dispatcher.DispatcherAdapter.convertToJMSExceptionAndThrow(DispatcherAdapter.java:110)
at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSync(DispatcherAdapter.java:45)
at weblogic.jms.client.JMSSession.consumerCreate(JMSSession.java:3048)
at weblogic.jms.client.JMSSession.setupConsumer(JMSSession.java:2806)
at weblogic.jms.client.JMSSession.createConsumer(JMSSession.java:2748)
Truncated. see log file for complete stacktrace
Caused By: javax.jms.InvalidSelectorException: weblogic.messaging.kernel.InvalidExpressionException: Expression : "cacheManagerUniqueId <> 600767500"
at weblogic.jms.dispatcher.Request.handleThrowable(Request.java:87)
at weblogic.jms.dispatcher.Request.getResult(Request.java:52)
at weblogic.messaging.dispatcher.Request.wrappedFiniteStateMachine(Request.java:1135)
at weblogic.messaging.dispatcher.DispatcherImpl.syncRequest(DispatcherImpl.java:201)
at weblogic.messaging.dispatcher.DispatcherImpl.dispatchSync(DispatcherImpl.java:236)
Truncated. see log file for complete stacktrace
Caused By: javax.jms.InvalidSelectorException: weblogic.messaging.kernel.InvalidExpressionException: Expression : "cacheManagerUniqueId <> 600767500"
at weblogic.jms.dispatcher.DispatcherAdapter.convertToJMSExceptionAndThrow(DispatcherAdapter.java:110)
at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSync(DispatcherAdapter.java:45)
at weblogic.jms.frontend.FEConsumer.<init>(FEConsumer.java:296)
at weblogic.jms.frontend.FESession$2.run(FESession.java:1078)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
Truncated. see log file for complete stacktrace
Caused By: javax.jms.InvalidSelectorException: weblogic.messaging.kernel.InvalidExpressionException: Expression : "cacheManagerUniqueId <> 600767500"
at weblogic.jms.dispatcher.Request.handleThrowable(Request.java:87)
at weblogic.jms.dispatcher.Request.getResult(Request.java:52)
at weblogic.messaging.dispatcher.Request.wrappedFiniteStateMachine(Request.java:1135)
at weblogic.messaging.dispatcher.DispatcherImpl.syncRequest(DispatcherImpl.java:201)
at weblogic.messaging.dispatcher.DispatcherImpl.dispatchSync(DispatcherImpl.java:236)
Truncated. see log file for complete stacktrace
Caused By: javax.jms.InvalidSelectorException: weblogic.messaging.kernel.InvalidExpressionException: Expression : "cacheManagerUniqueId <> 600767500"
at weblogic.jms.backend.BEQueueImpl.createFilterExpression(BEQueueImpl.java:161)
at weblogic.jms.backend.BEQueueImpl.createConsumer(BEQueueImpl.java:188)
at weblogic.jms.backend.BESessionImpl.createBEConsumer(BESessionImpl.java:469)
at weblogic.jms.backend.BESessionImpl.createConsumer(BESessionImpl.java:479)
at weblogic.jms.backend.BESessionImpl.invoke(BESessionImpl.java:297)
Truncated. see log file for complete stacktrace