jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Kalkhoff ...@ninan.info>
Subject Did I miss the point about CND?
Date Thu, 28 Jun 2007 20:36:00 GMT
Hi,

today I tried to build my first node types. I integrate jackrabbit  
1.3 using spring-modules 0.8.

I defined my base.cnd:

/*
  * Basic types for ninan.info
  */
<ninan="http://ninan.info/">

[ninan:Content]
 > mix:referenceable, mix:versionable

- ninan:hidden (BOOLEAN) = TRUE
- ninan:urlTitle (STRING)
- ninan:startDate (DATE)
- ninan:endDate (DATE)
- ninan:tags (STRING) multiple

Starting my tomcat I get:

[Fatal Error] :1:1: Content is not allowed in prolog.
2007-06-28 22:24:34,013 [main] ERROR  
org.springframework.web.context.ContextLoader - Context  
initialization failed
org.springframework.beans.factory.BeanCreationException: Error  
creating bean with name 'blogService' defined in class path resource  
[applicationContext.xml]: Cannot create inner bean  
'info.ninan.blog.impl.JcrBlogDAO#48e385' of type  
[info.ninan.blog.impl.JcrBlogDAO] while setting bean property  
'blogDAO'; nested exception is  
org.springframework.beans.factory.BeanCreationException: Error  
creating bean with name 'info.ninan.blog.impl.JcrBlogDAO#48e385'  
defined in class path resource [applicationContext.xml]: Cannot  
resolve reference to bean 'jcrTemplate' while setting bean property  
'template'; nested exception is  
org.springframework.beans.factory.BeanCreationException: Error  
creating bean with name 'jcrTemplate' defined in class path resource  
[applicationContext.xml]: Cannot resolve reference to bean  
'sessionFactory' while setting bean property 'sessionFactory'; nested  
exception is org.springframework.beans.factory.BeanCreationException:  
Error creating bean with name 'sessionFactory' defined in class path  
resource [applicationContext.xml]: Invocation of init method failed;  
nested exception is java.io.IOException: Content is not allowed in  
prolog.
Caused by:
org.springframework.beans.factory.BeanCreationException: Error  
creating bean with name 'info.ninan.blog.impl.JcrBlogDAO#48e385'  
defined in class path resource [applicationContext.xml]: Cannot  
resolve reference to bean 'jcrTemplate' while setting bean property  
'template'; nested exception is  
org.springframework.beans.factory.BeanCreationException: Error  
creating bean with name 'jcrTemplate' defined in class path resource  
[applicationContext.xml]: Cannot resolve reference to bean  
'sessionFactory' while setting bean property 'sessionFactory'; nested  
exception is org.springframework.beans.factory.BeanCreationException:  
Error creating bean with name 'sessionFactory' defined in class path  
resource [applicationContext.xml]: Invocation of init method failed;  
nested exception is java.io.IOException: Content is not allowed in  
prolog.
Caused by:
org.springframework.beans.factory.BeanCreationException: Error  
creating bean with name 'jcrTemplate' defined in class path resource  
[applicationContext.xml]: Cannot resolve reference to bean  
'sessionFactory' while setting bean property 'sessionFactory'; nested  
exception is org.springframework.beans.factory.BeanCreationException:  
Error creating bean with name 'sessionFactory' defined in class path  
resource [applicationContext.xml]: Invocation of init method failed;  
nested exception is java.io.IOException: Content is not allowed in  
prolog.
Caused by:
org.springframework.beans.factory.BeanCreationException: Error  
creating bean with name 'sessionFactory' defined in class path  
resource [applicationContext.xml]: Invocation of init method failed;  
nested exception is java.io.IOException: Content is not allowed in  
prolog.
Caused by:
java.io.IOException: Content is not allowed in prolog.
         at org.apache.jackrabbit.core.util.DOMWalker.<init> 
(DOMWalker.java:65)
         at  
org.apache.jackrabbit.core.nodetype.xml.NodeTypeReader.<init> 
(NodeTypeReader.java:90)
         at  
org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl.registerNodeType 
s(NodeTypeManagerImpl.java:224)
         at  
org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl.registerNodeType 
s(NodeTypeManagerImpl.java:475)
         at  
org.springmodules.jcr.jackrabbit.JackrabbitSessionFactory.registerNodeTy 
pes(JackrabbitSessionFactory.java:67)
         at org.springmodules.jcr.JcrSessionFactory.afterPropertiesSet 
(JcrSessionFactory.java:126)
         at  
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac 
tory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1202)
         at  
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac 
tory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172)
         at  
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac 
tory.createBean(AbstractAutowireCapableBeanFactory.java:428)
         at  
org.springframework.beans.factory.support.AbstractBeanFactory 
$1.getObject(AbstractBeanFactory.java:251)
         at  
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.g 
etSingleton(DefaultSingletonBeanRegistry.java:156)
         at  
org.springframework.beans.factory.support.AbstractBeanFactory.getBean 
(AbstractBeanFactory.java:248)
         at  
org.springframework.beans.factory.support.AbstractBeanFactory.getBean 
(AbstractBeanFactory.java:160)
         at  
org.springframework.beans.factory.support.BeanDefinitionValueResolver.re 
solveReference(BeanDefinitionValueResolver.java:261)
         at  
org.springframework.beans.factory.support.BeanDefinitionValueResolver.re 
solveValueIfNecessary(BeanDefinitionValueResolver.java:109)
         at  
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac 
tory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1100)
         at  
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac 
tory.populateBean(AbstractAutowireCapableBeanFactory.java:862)
         at  
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac 
tory.createBean(AbstractAutowireCapableBeanFactory.java:424)
         at  
org.springframework.beans.factory.support.AbstractBeanFactory 
$1.getObject(AbstractBeanFactory.java:251)
         at  
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.g 
etSingleton(DefaultSingletonBeanRegistry.java:156)
         at  
org.springframework.beans.factory.support.AbstractBeanFactory.getBean 
(AbstractBeanFactory.java:248)
         at  
org.springframework.beans.factory.support.AbstractBeanFactory.getBean 
(AbstractBeanFactory.java:160)
         at  
org.springframework.beans.factory.support.BeanDefinitionValueResolver.re 
solveReference(BeanDefinitionValueResolver.java:261)
         at  
org.springframework.beans.factory.support.BeanDefinitionValueResolver.re 
solveValueIfNecessary(BeanDefinitionValueResolver.java:109)
         at  
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac 
tory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1100)
         at  
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac 
tory.populateBean(AbstractAutowireCapableBeanFactory.java:862)
         at  
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac 
tory.createBean(AbstractAutowireCapableBeanFactory.java:424)
         at  
org.springframework.beans.factory.support.BeanDefinitionValueResolver.re 
solveInnerBean(BeanDefinitionValueResolver.java:215)
         at  
org.springframework.beans.factory.support.BeanDefinitionValueResolver.re 
solveValueIfNecessary(BeanDefinitionValueResolver.java:122)
         at  
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac 
tory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1100)
         at  
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac 
tory.populateBean(AbstractAutowireCapableBeanFactory.java:862)
         at  
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac 
tory.createBean(AbstractAutowireCapableBeanFactory.java:424)
         at  
org.springframework.beans.factory.support.AbstractBeanFactory 
$1.getObject(AbstractBeanFactory.java:251)
         at  
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.g 
etSingleton(DefaultSingletonBeanRegistry.java:156)
         at  
org.springframework.beans.factory.support.AbstractBeanFactory.getBean 
(AbstractBeanFactory.java:248)
         at  
org.springframework.beans.factory.support.AbstractBeanFactory.getBean 
(AbstractBeanFactory.java:160)
         at  
org.springframework.beans.factory.support.DefaultListableBeanFactory.pre 
InstantiateSingletons(DefaultListableBeanFactory.java:287)
         at  
org.springframework.context.support.AbstractApplicationContext.refresh 
(AbstractApplicationContext.java:352)
         at  
org.springframework.web.context.ContextLoader.createWebApplicationContex 
t(ContextLoader.java:244)
         at  
org.springframework.web.context.ContextLoader.initWebApplicationContext( 
ContextLoader.java:187)
         at  
org.springframework.web.context.ContextLoaderListener.contextInitialized 
(ContextLoaderListener.java:49)
         at org.apache.catalina.core.StandardContext.listenerStart 
(StandardContext.java:3763)
         at org.apache.catalina.core.StandardContext.start 
(StandardContext.java:4211)
         at org.apache.catalina.core.ContainerBase.start 
(ContainerBase.java:1013)
         at org.apache.catalina.core.StandardHost.start 
(StandardHost.java:718)
         at org.apache.catalina.core.ContainerBase.start 
(ContainerBase.java:1013)
         at org.apache.catalina.core.StandardEngine.start 
(StandardEngine.java:442)
         at org.apache.catalina.core.StandardService.start 
(StandardService.java:450)
         at org.apache.catalina.core.StandardServer.start 
(StandardServer.java:709)
         at org.apache.catalina.startup.Catalina.start(Catalina.java: 
551)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start 
(Bootstrap.java:294)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java: 
432)
Caused by: org.xml.sax.SAXParseException: Content is not allowed in  
prolog.
         at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
         at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown  
Source)
         at javax.xml.parsers.DocumentBuilder.parse 
(DocumentBuilder.java:98)
         at org.apache.jackrabbit.core.util.DOMWalker.<init> 
(DOMWalker.java:60)
         ... 55 more

As far as I can see jackrabbit is reading the cnd file as xml. But it  
is the CND format. On the website I found a reference to the "OLD"  
XML format and the new CND format. So in the stable release 1.3 is  
there support for the new CND format or am I stuck to that XML based  
definitions?

I hope you can help me get things clear.

Regards

Christian
--
Christian Kalkhoff <me@ninan.info>
Softwareentwickler und Administrator
http://ninan.info
http://www.kalkhoff.net



Mime
View raw message