Hi guys,
The repository.xml file configuration for jBRMS throws "failed to read
custom node type definitions stored in custom_nodetypes.xml: Premature
end of file.: Premature end of file"
error when org.apache.jackrabbit.core.fs.db.OracleFileSystem or
DBFileSystem is used instead of
org.apache.jackrabbit.core.fs.local.LocalFileSystem.
The environment used is JBoss 4.0.5 + Java 6
Is there any workaround to this problem? Is there something need to be
done on Oracle to make OracleFileSystem work? Please let me know
Here is the stack dump and repository.xml file contents
Stack Dump
org.drools.repository.RulesRepositoryException:
javax.jcr.RepositoryException: internal error: failed to read custom
node type definitions stored in custom_nodetypes.xml: Premature end of
file.: Premature end of file.
at
org.drools.brms.server.repository.BRMSRepositoryConfiguration.newSession
(BRMSRepositoryConfiguration.java:91)
at
org.drools.brms.server.repository.BRMSRepositoryConfiguration.create(BRM
SRepositoryConfiguration.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationCon
text.java:31)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon
text.java:56)
at
org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInte
rceptor.java:31)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon
text.java:68)
at
org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextI
nterceptor.java:42)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon
text.java:68)
at
org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106
)
at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBea
nInterceptor.java:155)
at
org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.
java:91)
at
org.drools.brms.server.repository.BRMSRepositoryConfiguration_$$_javassi
st_0.create(BRMSRepositoryConfiguration_$$_javassist_0.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
at
org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
at
org.jboss.seam.Component.callComponentMethod(Component.java:2087)
at
org.jboss.seam.Component.callCreateMethod(Component.java:2010)
at org.jboss.seam.Component.newInstance(Component.java:1981)
at
org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
at
org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
at
org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecy
cle.java:95)
at
org.jboss.seam.init.Initialization.init(Initialization.java:554)
at
org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java
:34)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.j
ava:3763)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4211
)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja
va:759)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503
)
at
org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at
org.apache.catalina.core.StandardContext.init(StandardContext.java:5052)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503
)
at
org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at
org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDepl
oyer.java:297)
at
org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.jav
a:103)
at
org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371)
at org.jboss.web.WebModule.startModule(WebModule.java:83)
at org.jboss.web.WebModule.startService(WebModule.java:61)
at
org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupp
ort.java:289)
at
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBean
Support.java:245)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown
Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.
java:155)
at
org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
a:264)
at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController
.java:978)
at $Proxy0.start(Unknown Source)
at
org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown
Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.
java:155)
at
org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
a:264)
at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at
org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy38.start(Unknown Source)
at
org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.
java:155)
at
org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at
org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.
java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at
org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBea
nOperationInterceptor.java:142)
at
org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.ja
va:97)
at
org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorSe
rviceMBeanSupport.java:238)
at
org.jboss.ws.integration.jboss.DeployerInterceptor.start(DeployerInterce
ptor.java:92)
at
org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.sta
rt(SubDeployerInterceptorSupport.java:188)
at
org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerIntercepto
r.java:95)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
a:264)
at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at
org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy39.start(Unknown Source)
at
org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.depl
14:48:35,763 INFO [STDOUT] oy(MainDeployer.java:819)
at
org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown
Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.
java:155)
at
org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at
org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.
java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at
org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBea
nOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
a:264)
at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at
org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy8.deploy(Unknown Source)
at
org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentSc
anner.java:421)
at
org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScan
ner.java:634)
at
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doS
can(AbstractDeploymentScanner.java:263)
at
org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(Abst
ractDeploymentScanner.java:336)
at
org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupp
ort.java:289)
at
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBean
Support.java:245)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown
Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.
java:155)
at
org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
a:264)
at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController
.java:978)
at $Proxy0.start(Unknown Source)
at
org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown
Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.
java:155)
at
org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
a:264)
at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at
org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.start(Unknown Source)
at
org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
at
org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at
org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at
org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at
org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.
java:155)
at
org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at
org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.
java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at
org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBea
nOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
a:264)
at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at
org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy5.deploy(Unknown Source)
at
org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
at
org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:490)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.jcr.RepositoryException: internal error: failed to read
custom node type definitions stored in custom_nodetypes.xml: Premature
end of file.: Premature end of file.
at
org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.loadCustomNodeTypeD
efs(NodeTypeRegistry.java:775)
at
org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.<init>(NodeTypeRegi
stry.java:684)
at
org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.create(NodeTypeRegi
stry.java:118)
at
org.apache.jackrabbit.core.RepositoryImpl.createNodeTypeRegistry(Reposit
oryImpl.java:571)
at
org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:262
)
at
org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:584
)
at
org.apache.jackrabbit.core.TransientRepository$2.getRepository(Transient
Repository.java:245)
at
org.apache.jackrabbit.core.TransientRepository.startRepository(Transient
Repository.java:265)
at
org.apache.jackrabbit.core.TransientRepository.login(TransientRepository
.java:333)
at
org.apache.jackrabbit.core.TransientRepository.login(TransientRepository
.java:363)
at
org.drools.brms.server.repository.BRMSRepositoryConfiguration.newSession
(BRMSRepositoryConfiguration.java:87)
... 165 more
Caused by: java.io.IOException: Premature end of file.
at
org.apache.jackrabbit.core.util.DOMWalker.<init>(DOMWalker.java:65)
at
org.apache.jackrabbit.core.nodetype.xml.NodeTypeReader.<init>(NodeTypeRe
ader.java:90)
at
org.apache.jackrabbit.core.nodetype.xml.NodeTypeReader.read(NodeTypeRead
er.java:66)
at
org.apache.jackrabbit.core.nodetype.NodeTypeDefStore.load(NodeTypeDefSto
re.java:55)
at
org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.loadCustomNodeTypeD
efs(NodeTypeRegistry.java:769)
... 175 more
Caused by: org.xml.sax.SAXParseException: Premature end of file.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown
Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
at
org.apache.jackrabbit.core.util.DOMWalker.<init>(DOMWalker.java:60)
... 179 more
Repository.xml file contents
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version
2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD
Jackrabbit 1.2//EN"
"http://jackrabbit.apache.org/dtd/repository-1.2.dtd">
<!-- Example Repository Configuration File -->
<Repository>
<!--
virtual file system where the repository stores global state
(e.g. registered namespaces, custom node types, etc.)
-->
<!-- <FileSystem
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path" value="${rep.home}/repository"/>
</FileSystem>
-->
<FileSystem
class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">
<param name="url"
value="jdbc:oracle:thin:@server:1521:sid" />
<param name="user" value="user" />
<param name="password" value="pass" />
<param name="schemaObjectPrefix"
value="rep_"/>
<param name="tableSpace"
value="default"/>
</FileSystem>
<!--
security configuration
-->
<Security appName="Jackrabbit">
<!--
access manager:
class: FQN of class implementing the AccessManager interface
-->
<AccessManager
class="org.apache.jackrabbit.core.security.SimpleAccessManager">
<!-- <param name="config"
value="${rep.home}/access.xml"/>
-->
</AccessManager>
<LoginModule
class="org.apache.jackrabbit.core.security.SimpleLoginModule">
<!-- anonymous user name ('anonymous' is the default value)
-->
<param name="anonymousId" value="anonymous"/>
<!--
default user name to be used instead of the anonymous user
when no login credentials are provided (unset by default)
-->
<!-- <param name="defaultUserId"
value="superuser"/> -->
</LoginModule>
</Security>
<!--
location of workspaces root directory and name of default
workspace
-->
<Workspaces rootPath="${rep.home}/workspaces"
defaultWorkspace="default"/>
<!--
workspace configuration template:
used to create the initial workspace if there's no workspace yet
-->
<Workspace name="${wsp.name}">
<!--
virtual file system of the workspace:
class: FQN of class implementing the FileSystem interface
-->
<FileSystem
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path" value="${wsp.home}"/>
</FileSystem>
<!--
persistence manager of the workspace:
class: FQN of class implementing the PersistenceManager
interface
-->
<PersistenceManager
class="org.apache.jackrabbit.core.persistence.db.DerbyPersistenceManager
">
<param name="url"
value="jdbc:derby:${wsp.home}/db;create=true"/>
<param name="schemaObjectPrefix"
value="${wsp.name}_"/>
</PersistenceManager>
<!--
Search index and the file system it uses.
class: FQN of class implementing the QueryHandler interface
-->
<SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
<param name="path" value="${wsp.home}/index"/>
</SearchIndex>
</Workspace>
<!--
Configures the versioning
-->
<Versioning rootPath="${rep.home}/version">
<!--
Configures the filesystem to use for versioning for the
respective
persistence manager
-->
<FileSystem
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path" value="${rep.home}/version" />
</FileSystem>
<!--
Configures the persistence manager to be used for persisting
version state.
Please note that the current versioning implementation is
based on
a 'normal' persistence manager, but this could change in
future
implementations.
-->
<PersistenceManager
class="org.apache.jackrabbit.core.persistence.db.DerbyPersistenceManager
">
<param name="url"
value="jdbc:derby:${rep.home}/version/db;create=true"/>
<param name="schemaObjectPrefix" value="version_"/>
</PersistenceManager>
</Versioning>
<!--
Search index for content that is shared repository wide
(/jcr:system tree, contains mainly versions)
-->
<SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
<param name="path"
value="${rep.home}/repository/index"/>
</SearchIndex>
</Repository>
Gururaj Havanur
Architect, Enterprise Architecture
Revenue and Guest Technology
gururaj.havanur(a)ihg.com
770.689.4273
IHG - InterContinental Hotels Group
www.ihg.com <
http://www.ihg.com/>