Jackrabbit Content Repository
  1. Jackrabbit Content Repository
  2. JCR-936

Using Oracle bundle PM throws SQL exception (cannot insert NULL)

    Details

    • Type: Bug Bug
    • Status: Patch Available
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.5.7, 1.6, 2.0-beta3
    • Fix Version/s: None
    • Component/s: jackrabbit-core
    • Labels:
      None
    • Environment:
      Magnolia 3.1
      Jackrabbit 1.3

      DB: Oracle Database 10g Release 2 (10.2.0.3.0)
      JDBC (thin): Oracle Database 10g Release 2 (10.2.0.2)

      Description

      When using org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager as a PM, empty string (root node???) seems to be causing problems...
      This may be similar to http://issues.apache.org/jira/browse/JCR-748

      Here is the error I get:

      2007-05-22 09:56:51,880 INFO [STDOUT] INFO info.magnolia.cms.beans.config.ContentRepository ContentRepository.java(loadRepository:331) 22.05.2007 09:56:51 System : loading JCR magnolia
      2007-05-22 09:56:51,911 INFO [STDOUT] INFO info.magnolia.jackrabbit.ProviderImpl ProviderImpl.java(init:143) 22.05.2007 09:56:51 Loading repository at C:/mycompany/webapp/data/magnolia-cms/repositories/magnolia (config file: C:\mycompany\webapp\deploy\magnolia-community-3.1-SNAPSHOT-cms.war\WEB-INF\config\repo-conf\mycompany-jackrabbit-oracle-search.xml)
      2007-05-22 09:56:53,708 INFO [STDOUT] ERROR org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager BundleDbPersistenceManager.java(storeBundle:943) 22.05.2007 09:56:53 failed to write bundle: deadbeef-face-babe-cafe-babecafebabe
      java.lang.IllegalStateException: Unable to insert index: java.sql.SQLException: ORA-01400: cannot insert NULL into ("WAMGNLCMS"."VERSION_NAMES"."ID")

      at org.apache.jackrabbit.core.persistence.bundle.util.NGKDbNameIndex.insertString(NGKDbNameIndex.java:76)
      at org.apache.jackrabbit.core.persistence.bundle.util.DbNameIndex.stringToIndex(DbNameIndex.java:98)
      at org.apache.jackrabbit.core.persistence.bundle.util.BundleBinding.writeBundle(BundleBinding.java:245)
      at org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager.storeBundle(BundleDbPersistenceManager.java:930)
      at org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.putBundle(AbstractBundlePersistenceManager.java:693)
      at org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.store(AbstractBundlePersistenceManager.java:634)
      at org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager.store(BundleDbPersistenceManager.java:495)
      at org.apache.jackrabbit.core.version.VersionManagerImpl.<init>(VersionManagerImpl.java:159)
      at org.apache.jackrabbit.core.RepositoryImpl.createVersionManager(RepositoryImpl.java:372)
      at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:282)
      at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:584)
      at org.apache.jackrabbit.core.jndi.BindableRepository.createRepository(BindableRepository.java:174)
      at org.apache.jackrabbit.core.jndi.BindableRepository.init(BindableRepository.java:138)
      at org.apache.jackrabbit.core.jndi.BindableRepository.create(BindableRepository.java:125)
      at org.apache.jackrabbit.core.jndi.BindableRepositoryFactory.createInstance(BindableRepositoryFactory.java:59)
      at org.apache.jackrabbit.core.jndi.RegistryHelper.registerRepository(RegistryHelper.java:60)
      at info.magnolia.jackrabbit.ProviderImpl.init(ProviderImpl.java:165)
      at info.magnolia.cms.beans.config.ContentRepository.loadRepository(ContentRepository.java:333)
      at info.magnolia.cms.beans.config.ContentRepository.loadRepositories(ContentRepository.java:297)
      at info.magnolia.cms.beans.config.ContentRepository.init(ContentRepository.java:184)
      at info.magnolia.cms.beans.config.ConfigLoader.load(ConfigLoader.java:111)
      at info.magnolia.cms.beans.config.ConfigLoader.<init>(ConfigLoader.java:97)
      at info.magnolia.cms.servlets.PropertyInitializer.contextInitialized(PropertyInitializer.java:189)
      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.addChildInternal(ContainerBase.java: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.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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(TomcatDeployer.java:297)
      at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java: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(ServiceMBeanSupport.java:289)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
      at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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.java: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(DelegatingMethodAccessorImpl.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.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy46.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.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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(ModelMBeanOperationInterceptor.java:142)
      at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
      at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
      at org.jboss.ws.integration.jboss.DeployerInterceptor.start(DeployerInterceptor.java:92)
      at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
      at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy47.start(Unknown Source)
      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 sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invo
      2007-05-22 09:56:53,724 INFO [STDOUT] ke(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(ModelMBeanOperationInterceptor.java:142)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java: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(URLDeploymentScanner.java:421)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
      at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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.java: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(DelegatingMethodAccessorImpl.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.java: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.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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(ModelMBeanOperationInterceptor.java:142)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java: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)
      2007-05-22 09:56:53,724 INFO [STDOUT] ERROR info.magnolia.jackrabbit.ProviderImpl ProviderImpl.java(init:176) 22.05.2007 09:56:53 Unable to initialize repository: failed to write bundle: deadbeef-face-babe-cafe-babecafebabe
      javax.jcr.RepositoryException: failed to write bundle: deadbeef-face-babe-cafe-babecafebabe: failed to write bundle: deadbeef-face-babe-cafe-babecafebabe
      at org.apache.jackrabbit.core.version.VersionManagerImpl.<init>(VersionManagerImpl.java:173)
      at org.apache.jackrabbit.core.RepositoryImpl.createVersionManager(RepositoryImpl.java:372)
      at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:282)
      at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:584)
      at org.apache.jackrabbit.core.jndi.BindableRepository.createRepository(BindableRepository.java:174)
      at org.apache.jackrabbit.core.jndi.BindableRepository.init(BindableRepository.java:138)
      at org.apache.jackrabbit.core.jndi.BindableRepository.create(BindableRepository.java:125)
      at org.apache.jackrabbit.core.jndi.BindableRepositoryFactory.createInstance(BindableRepositoryFactory.java:59)
      at org.apache.jackrabbit.core.jndi.RegistryHelper.registerRepository(RegistryHelper.java:60)
      at info.magnolia.jackrabbit.ProviderImpl.init(ProviderImpl.java:165)
      at info.magnolia.cms.beans.config.ContentRepository.loadRepository(ContentRepository.java:333)
      at info.magnolia.cms.beans.config.ContentRepository.loadRepositories(ContentRepository.java:297)
      at info.magnolia.cms.beans.config.ContentRepository.init(ContentRepository.java:184)
      at info.magnolia.cms.beans.config.ConfigLoader.load(ConfigLoader.java:111)
      at info.magnolia.cms.beans.config.ConfigLoader.<init>(ConfigLoader.java:97)
      at info.magnolia.cms.servlets.PropertyInitializer.contextInitialized(PropertyInitializer.java:189)
      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.addChildInternal(ContainerBase.java: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.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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(TomcatDeployer.java:297)
      at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java: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(ServiceMBeanSupport.java:289)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
      at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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.java: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(DelegatingMethodAccessorImpl.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.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy46.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.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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(ModelMBeanOperationInterceptor.java:142)
      at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
      at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
      at org.jboss.ws.integration.jboss.DeployerInterceptor.start(DeployerInterceptor.java:92)
      at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
      at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy47.start(Unknown Source)
      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 sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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(ModelMBeanOperationInterceptor.java:142)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java: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(URLDeploymentScanner.java:421)
      at o

      1. JCR-936.patch
        45 kB
        Martijn Hendriks
      2. JCR-936.patch
        5 kB
        Martijn Hendriks

        Activity

        Hide
        Martijn Hendriks added a comment -

        Here's another patch that improves the logging of schema creation. Note that it is quite big because I extracted an interface from the ConnectionHelper class.

        Show
        Martijn Hendriks added a comment - Here's another patch that improves the logging of schema creation. Note that it is quite big because I extracted an interface from the ConnectionHelper class.
        Hide
        Martijn Hendriks added a comment -

        Mmm, this doesn't work on all databases. See e.g., http://dev.mysql.com/doc/refman/5.0/en/implicit-commit.html and http://wiki.postgresql.org/wiki/Transactional_DDL_in_PostgreSQL:_A_Competitive_Analysis.

        Oracle doesn't seem to support transactional DDL and that's unfortunate because this is typically going to occur on Oracle because of the restrictive limit on the DB object name length.

        I think that it is nevertheless good to wrap the DDL in a transaction anyway for the databases that do support it. Besides that we should improve logging.

        Show
        Martijn Hendriks added a comment - Mmm, this doesn't work on all databases. See e.g., http://dev.mysql.com/doc/refman/5.0/en/implicit-commit.html and http://wiki.postgresql.org/wiki/Transactional_DDL_in_PostgreSQL:_A_Competitive_Analysis . Oracle doesn't seem to support transactional DDL and that's unfortunate because this is typically going to occur on Oracle because of the restrictive limit on the DB object name length. I think that it is nevertheless good to wrap the DDL in a transaction anyway for the databases that do support it. Besides that we should improve logging.
        Hide
        Martijn Hendriks added a comment -

        Is it an idea to wrap the checkSchema operation in a JDBC transaction? In that case you don't get partially created schemas in case one of the statements fails.

        Show
        Martijn Hendriks added a comment - Is it an idea to wrap the checkSchema operation in a JDBC transaction? In that case you don't get partially created schemas in case one of the statements fails.
        Hide
        Jukka Zitting added a comment -

        Yes, you can work around the issue by adding the trigger manually.

        AFAIK nobody is actively working on fixing this.

        Show
        Jukka Zitting added a comment - Yes, you can work around the issue by adding the trigger manually. AFAIK nobody is actively working on fixing this.
        Hide
        Micah Whitacre added a comment -

        What's the status on this bug? This issue has recently popped up for us and this bug doesn't seem to have been updated in over a year. Is the recommended fix to create the trigger by hand?

        Show
        Micah Whitacre added a comment - What's the status on this bug? This issue has recently popped up for us and this bug doesn't seem to have been updated in over a year. Is the recommended fix to create the trigger by hand?
        Hide
        Jukka Zitting added a comment -

        This issue is caused if the workspace initialization code is unable to create a trigger for generating new ID numbers. I guess the typical reason (at least the one I've seen) for such problems is that the trigger name is too long. We should probably at least try to catch such errors and inform the user that they should configure a shorter table name prefix.

        Show
        Jukka Zitting added a comment - This issue is caused if the workspace initialization code is unable to create a trigger for generating new ID numbers. I guess the typical reason (at least the one I've seen) for such problems is that the trigger name is too long. We should probably at least try to catch such errors and inform the user that they should configure a shorter table name prefix.
        Hide
        Stefan Guggisberg added a comment -

        reopening due to new backround information reported on the mailing list:
        http://article.gmane.org/gmane.comp.apache.jackrabbit.devel/12040

        Show
        Stefan Guggisberg added a comment - reopening due to new backround information reported on the mailing list: http://article.gmane.org/gmane.comp.apache.jackrabbit.devel/12040
        Hide
        zambak added a comment -

        Added Oracle version and JDBC driver version

        Show
        zambak added a comment - Added Oracle version and JDBC driver version
        Hide
        Stefan Guggisberg added a comment -

        according to the stacktrace the following sql stmt:

        insert into VERSION_NAMES (NAME) values ("...")

        causes a

        ORA-01400: cannot insert NULL into ("WAMGNLCMS"."VERSION_NAMES"."ID")

        the id should be set by the following insert trigger:

        create trigger VERSION_t1 before insert on VERSION_NAMES for each row begin select VERSION_seq_names_id.nextval into :new.id from dual; end;

        please verify the existence of the trigger and test it in a sql console, e.g. by executing:

        insert into VERSION_NAMES (NAME) values ("blablah");

        (please provide information about oracle and jdbc driver versions.)

        Show
        Stefan Guggisberg added a comment - according to the stacktrace the following sql stmt: insert into VERSION_NAMES (NAME) values ("...") causes a ORA-01400: cannot insert NULL into ("WAMGNLCMS"."VERSION_NAMES"."ID") the id should be set by the following insert trigger: create trigger VERSION_t1 before insert on VERSION_NAMES for each row begin select VERSION_seq_names_id.nextval into :new.id from dual; end; please verify the existence of the trigger and test it in a sql console, e.g. by executing: insert into VERSION_NAMES (NAME) values ("blablah"); (please provide information about oracle and jdbc driver versions.)

          People

          • Assignee:
            Martijn Hendriks
            Reporter:
            zambak
          • Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:

              Development