[JBoss Cache: Core Edition] - XML validation error using JBC 3.0.1 GA
by cacheuser
I get the following error when I try to use the latest version of the jbosscache-core.jar. The error and the config are below. The config was working fine the 3.0 beta1 version.
2009-01-16 05:54:32,412 [ERROR] Main Thread org.jboss.cache.config.parsing.RootElementBuilder$FailureErrorHandler.logAndThrowException(RootElementBuilder.java:137) - Configuration warning: The markup in the document following the root element must be well-formed.
2009-01-16 05:54:32,412 [ERROR] Main Thread org.jboss.cache.config.parsing.RootElementBuilder.readRoot(RootElementBuilder.java:110) - org.jboss.cache.config.ConfigurationException: Incorrect configuration file. Use '-Djbosscache.config.validate=false' to disable validation.
[Fatal Error] :8:8: The markup in the document following the root element must be well-formed.
2009-01-16 05:54:32,443 [ERROR] Main Thread org.jboss.cache.config.parsing.XmlConfigHelper.getDocumentRoot(XmlConfigHelper.java:449) - Configurator SAXParse error
org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at org.jboss.cache.config.parsing.XmlConfigHelper.getDocumentRoot(XmlConfigHelper.java:442)
at org.jboss.cache.config.parsing.XmlConfigurationParser2x.parseStream(XmlConfigurationParser2x.java:103)
at org.jboss.cache.config.parsing.XmlConfigurationParser2x.parseFile(XmlConfigurationParser2x.java:90)
at org.jboss.cache.DefaultCacheFactory.createCache(DefaultCacheFactory.java:91)
at org.jboss.cache.DefaultCacheFactory.createCache(DefaultCacheFactory.java:77)
at cns.reports.cache.CacheServiceImpl.init(CacheServiceImpl.java:40)
at cns.reports.cache.CacheServiceImpl.getCache(CacheServiceImpl.java:72)
at cns.reports.cache.VendorCacheServiceImpl.(VendorCacheServiceImpl.java:43)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:85)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:186)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:800)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:720)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:387)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingl
| <?xml version="1.0" encoding="UTF-8"?>
| <jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xmlns="urn:jboss:jbosscache-core:config:3.0">
|
|
| <locking isolationLevel="REPEATABLE_READ" lockParentForChildInsertRemove="true" lockAcquisitionTimeout="15000" nodeLockingScheme="mvcc"/>
|
| <eviction wakeUpInterval="60000">
| <!-- Cache wide default -->
| <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="200000">
| <attribute name="maxNodes">5000</attribute>
| <attribute name="timeToLive">1000000</attribute>
| </default>
|
| <region name="/root/cache/memory" actionPolicyClass="org.jboss.cache.eviction.RemoveOnEvictActionPolicy" >
| <attribute name="maxNodes">50</attribute>
| <attribute name="timeToLive">10000</attribute>
| </region>
|
| <region name="/root/cache" algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="200000">
| <attribute name="maxNodes">5</attribute>
| <attribute name="timeToLive">1000</attribute>
| </region>
|
| </eviction>
| <loaders passivation="false" shared="true">
| <!-- if passivation is true, only the first cache loader is used; the rest are ignored -->
| <loader class="org.jboss.cache.loader.JDBCCacheLoader" async="true" fetchPersistentState="true"
| ignoreModifications="false" purgeOnStartup="false">
| <properties>
| cache.jdbc.table.name=jboss_cache
| cache.jdbc.table.create=false
| cache.jdbc.table.drop=false
| cache.jdbc.table.select=true
| cache.jdbc.table.primarykey=cache_id
| cache.jdbc.fqn.column=fqn
| cache.jdbc.fqn.type=varchar(255)
| cache.jdbc.node.column=node
| cache.jdbc.node.type=blob
| cache.jdbc.parent.column=parent
| cache.jdbc.parent.type=varchar(255)
| cache.jdbc.driver=com.mysql.jdbc.Driver
| cache.jdbc.url=jdbc:mysql://CACHEDATABASE:3333/jboss_cache
| cache.jdbc.user=user
| cache.jdbc.password=password
| cache.jdbc.sql-concat=concat(1,2)
|
| c3p0.maxIdleTime=60
| c3p0.minPoolSize=0
| c3p0.maxPoolSize=40
| c3p0.checkoutTimeout=5000
| cache.jdbc.connection.factory=org.jboss.cache.loader.C3p0ConnectionFactory
|
| </properties>
| </loader>
| </loaders>
|
| </jbosscache>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4202477#4202477
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4202477
17 years, 5 months
[Microcontainer] - Re: Service POJO JNDI Binding Problem
by ralfsteppacher
"alesj" wrote :
| Post the JNDIBinding/Interceptor code.
|
This is my jboss-beans.xml:
| <!-- Commented out because it led to the initial error where JBoss AS complained
| that a bean with the name AspectManager was already deployed. -->
| <!--bean name="AspectManager" class="org.jboss.aop.AspectManager">
| <constructor factoryClass="org.jboss.aop.AspectManager"
| factoryMethod="instance" />
| </bean-->
|
| <!-- Define the jndi binding advice -->
| <beanfactory name="JndiAdvice"
| class="org.jboss.aop.microcontainer.aspects.jndi.JndiIntroduction">
| <property name="env">
| <map class="java.util.Properties" keyClass="java.lang.String"
| valueClass="java.lang.String">
| <entry>
| <key>java.naming.factory.initial</key>
| <value>
| org.jboss.example.microcontainer.aspects.EnvInitialContextFactory
| </value>
| </entry>
| </map>
| </property>
| </beanfactory>
|
| <bean name="JndiAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
| <property name="advice">
| <inject bean="JndiAdvice" />
| </property>
| <property name="manager">
| <inject bean="AspectManager" />
| </property>
| </bean>
|
| <!--
| Introduce the KernelControllerContextAware interface to the
| JndiBinding annotation
| -->
| <bean name="JndiIntroduction"
| class="org.jboss.aop.microcontainer.beans.IntroductionBinding">
| <property name="classes">
| @org.jboss.aop.microcontainer.aspects.jndi.JndiBinding</property>
| <property name="interfaces">
| <list elementClass="java.lang.String">
| <value>org.jboss.kernel.spi.dependency.KernelControllerContextAware
| </value>
| </list>
| </property>
| <property name="manager">
| <inject bean="AspectManager" />
| </property>
| </bean>
|
| <!--
| Apply the jndi binding to all KernelControllerContextAware interface
| callbacks
| -->
| <bean name="JndiBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
| <property name="pointcut">execution(*
| $instanceof{org.jboss.kernel.spi.dependency.KernelControllerContextAware}->$implements{org.jboss.kernel.spi.dependency.KernelControllerContextAware}(..))
| </property>
| <property name="aspect">
| <inject bean="JndiAspect" property="definition" />
| </property>
| <property name="manager">
| <inject bean="AspectManager" />
| </property>
| </bean>
|
| <bean name="HibernateConfigService" class="ch.abraxas.base.infra.HibernateConfigService">
| <annotation>@org.jboss.aop.microcontainer.aspects.jndi.JndiBinding(name="hibernate/HibernateConfigService")</annotation>
| </bean>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4202470#4202470
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4202470
17 years, 5 months
[Microcontainer] - Re: Service POJO JNDI Binding Problem
by alesj
"ralfsteppacher" wrote :
| With the modified aop.xml I get several exceptions on server start-up :
|
|
| | java.lang.RuntimeException: Error configuring property: manager for JMXRegistrationAdvice$AspectBinding
| | at org.jboss.kernel.plugins.dependency.ConfigureAction.dispatchSetProperty(ConfigureAction.java:112)
| | at org.jboss.kernel.plugins.dependency.ConfigureAction.setAttributes(ConfigureAction.java:85)
| | ...
| | Caused by: java.lang.IllegalArgumentException: No such property aspectManager for bean org.jboss.aop.AspectManager available [typedefs, annotationIntroductions, call, classMetaDataLoaders, set, bindings, interceptorStacks, sortedPrecedenceDefEntries, annotationOverrides, precedenceDefs, execution, interfaceIntroductions, dynamicCFlows, interceptorFactories, perVMAspects, pointcutInfos, construction, managerFQN, advisors, includedInvisibleAnnotations, ignore, declares, get, withincode, ignoreExpressions, subscribedSubDomains, classMetaData, class, arrayReplacements, exclude, aspectDefinitions, include, dynamicAOPStrategy, lifecycleBindings, pointcuts, cflowStacks, bindingCollection, within]
| | at org.jboss.beans.info.plugins.AbstractBeanInfo.getProperty(AbstractBeanInfo.java:147)
| | at org.jboss.beans.info.plugins.BeanInfoUtil.getNestedTarget(BeanInfoUtil.java:77)
| | ...
| |
|
This means that the bean you have here
is already org.jboss.aop.AspectManager instance.
Post the JNDIBinding/Interceptor code.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4202463#4202463
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4202463
17 years, 5 months
[Microcontainer] - Re: Service POJO JNDI Binding Problem
by ralfsteppacher
"alesj" wrote :
| What exactly fails - just the root cause?
|
With the modified aop.xml I get several exceptions on server start-up :
| java.lang.RuntimeException: Error configuring property: manager for JMXRegistrationAdvice$AspectBinding
| at org.jboss.kernel.plugins.dependency.ConfigureAction.dispatchSetProperty(ConfigureAction.java:112)
| at org.jboss.kernel.plugins.dependency.ConfigureAction.setAttributes(ConfigureAction.java:85)
| ...
| Caused by: java.lang.IllegalArgumentException: No such property aspectManager for bean org.jboss.aop.AspectManager available [typedefs, annotationIntroductions, call, classMetaDataLoaders, set, bindings, interceptorStacks, sortedPrecedenceDefEntries, annotationOverrides, precedenceDefs, execution, interfaceIntroductions, dynamicCFlows, interceptorFactories, perVMAspects, pointcutInfos, construction, managerFQN, advisors, includedInvisibleAnnotations, ignore, declares, get, withincode, ignoreExpressions, subscribedSubDomains, classMetaData, class, arrayReplacements, exclude, aspectDefinitions, include, dynamicAOPStrategy, lifecycleBindings, pointcuts, cflowStacks, bindingCollection, within]
| at org.jboss.beans.info.plugins.AbstractBeanInfo.getProperty(AbstractBeanInfo.java:147)
| at org.jboss.beans.info.plugins.BeanInfoUtil.getNestedTarget(BeanInfoUtil.java:77)
| ...
|
The summary before the Vm shut down again is
| AOPDeploymentAopMetaDataDeployer -> java.lang.RuntimeException: Error configuring property: aspectManager for AOPDeploymentAopMetaDataDeployer
| AspectManagerJMXRegistrar -> java.lang.RuntimeException: Error configuring property: aspectManager for AspectManagerJMXRegistrar
| JMXStartStopAdvice$AspectBinding -> java.lang.RuntimeException: Error configuring property: manager for JMXStartStopAdvice$AspectBinding
| JMXCreateDestroyAdvice$AspectBinding -> java.lang.RuntimeException: Error configuring property: manager for JMXCreateDestroyAdvice$AspectBinding
| JMXRegistrationAdvice$AspectBinding -> java.lang.RuntimeException: Error configuring property: manager for JMXRegistrationAdvice$AspectBinding
| AOPClassLoaderDeployer -> java.lang.RuntimeException: Error configuring property: aspectManager for AOPClassLoaderDeployer
| BeansDeploymentAopMetaDataDeployer -> java.lang.RuntimeException: Error configuring property: aspectManager for BeansDeploymentAopMetaDataDeployer
|
Ralf
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4202462#4202462
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4202462
17 years, 5 months