Hippo 11.2.7 to 12 'hippo' Namespace Error

As the title states, we’re in the process of upgrading to Hippo 12 from the latest Hippo 11. I’ve gone through the documentation here:

https://www.onehippo.org/library/upgrade-11-to-12/upgrade-11.2-to-12.0.html

And we now have a solid, error-free build in local.

However, when looking to upgrade our development server (and replicated when simulating an upgrade in local), I’m encountering the following error:

[INFO] [talledLocalContainer] 17.07.2018 11:46:02 ERROR localhost-startStop-1 [RepositoryServlet.init:224] Error while setting up JCR repository:
[INFO] [talledLocalContainer] javax.jcr.RepositoryException: unchecked exception: org.onehippo.cm.engine.ConfigurationRuntimeException: Failed to process namespace definition defined in hippo-cms/hippo-repository/hippo-repository-engine [config: main.yaml]: namespace with prefix 'hippo' already exists in repository with different URI. Existing: 'http://www.onehippo.org/jcr/hippo/nt/2.0.2', target: 'http://www.onehippo.org/jcr/hippo/nt/2.0.4'. Changing existing namespaces is not supported. Aborting.
[INFO] [talledLocalContainer] 	at org.hippoecm.repository.HippoRepositoryFactory.getHippoRepository(HippoRepositoryFactory.java:161) ~[hippo-repository-connector-5.4.0.jar:5.4.0]
[INFO] [talledLocalContainer] 	at org.hippoecm.repository.RepositoryServlet.init(RepositoryServlet.java:184) [hippo-repository-servlets-5.4.0.jar:5.4.0]
[INFO] [talledLocalContainer] 	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1227) [catalina.jar:8.0.39]
[INFO] [talledLocalContainer] 	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1140) [catalina.jar:8.0.39]
[INFO] [talledLocalContainer] 	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1027) [catalina.jar:8.0.39]
[INFO] [talledLocalContainer] 	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5038) [catalina.jar:8.0.39]
[INFO] [talledLocalContainer] 	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5348) [catalina.jar:8.0.39]
[INFO] [talledLocalContainer] 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) [catalina.jar:8.0.39]
[INFO] [talledLocalContainer] 	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753) [catalina.jar:8.0.39]
[INFO] [talledLocalContainer] 	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729) [catalina.jar:8.0.39]
[INFO] [talledLocalContainer] 	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717) [catalina.jar:8.0.39]
[INFO] [talledLocalContainer] 	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940) [catalina.jar:8.0.39]
[INFO] [talledLocalContainer] 	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816) [catalina.jar:8.0.39]
[INFO] [talledLocalContainer] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_162]
[INFO] [talledLocalContainer] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_162]
[INFO] [talledLocalContainer] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_162]
[INFO] [talledLocalContainer] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_162]
[INFO] [talledLocalContainer] 	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_162]
[INFO] [talledLocalContainer] Caused by: org.onehippo.cm.engine.ConfigurationRuntimeException: Failed to process namespace definition defined in hippo-cms/hippo-repository/hippo-repository-engine [config: main.yaml]: namespace with prefix 'hippo' already exists in repository with different URI. Existing: 'http://www.onehippo.org/jcr/hippo/nt/2.0.2', target: 'http://www.onehippo.org/jcr/hippo/nt/2.0.4'. Changing existing namespaces is not supported. Aborting.
[INFO] [talledLocalContainer] 	at org.onehippo.cm.engine.ConfigurationConfigService.applyNamespaces(ConfigurationConfigService.java:251) ~[hippo-repository-engine-5.4.0.jar:5.4.0]
[INFO] [talledLocalContainer] 	at org.onehippo.cm.engine.ConfigurationConfigService.computeAndWriteDelta(ConfigurationConfigService.java:221) ~[hippo-repository-engine-5.4.0.jar:5.4.0]
[INFO] [talledLocalContainer] 	at org.onehippo.cm.engine.ConfigurationServiceImpl.applyConfig(ConfigurationServiceImpl.java:589) ~[hippo-repository-engine-5.4.0.jar:5.4.0]
[INFO] [talledLocalContainer] 	at org.onehippo.cm.engine.ConfigurationServiceImpl.init(ConfigurationServiceImpl.java:204) ~[hippo-repository-engine-5.4.0.jar:5.4.0]
[INFO] [talledLocalContainer] 	at org.onehippo.cm.engine.ConfigurationServiceImpl.start(ConfigurationServiceImpl.java:122) ~[hippo-repository-engine-5.4.0.jar:5.4.0]
[INFO] [talledLocalContainer] 	at org.hippoecm.repository.LocalHippoRepository.initializeConfiguration(LocalHippoRepository.java:308) ~[hippo-repository-engine-5.4.0.jar:5.4.0]
[INFO] [talledLocalContainer] 	at org.hippoecm.repository.LocalHippoRepository.initialize(LocalHippoRepository.java:292) ~[hippo-repository-engine-5.4.0.jar:5.4.0]
[INFO] [talledLocalContainer] 	at org.hippoecm.repository.LocalHippoRepository.create(LocalHippoRepository.java:122) ~[hippo-repository-engine-5.4.0.jar:5.4.0]
[INFO] [talledLocalContainer] 	at org.hippoecm.repository.LocalHippoRepository.create(LocalHippoRepository.java:112) ~[hippo-repository-engine-5.4.0.jar:5.4.0]
[INFO] [talledLocalContainer] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_162]
[INFO] [talledLocalContainer] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_162]
[INFO] [talledLocalContainer] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_162]
[INFO] [talledLocalContainer] 	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_162]
[INFO] [talledLocalContainer] 	at org.hippoecm.repository.HippoRepositoryFactory.getHippoRepository(HippoRepositoryFactory.java:147) ~[hippo-repository-connector-5.4.0.jar:5.4.0]
[INFO] [talledLocalContainer] 	... 17 more

I’ve gone back and looked at older Go Green Hippo 11 and 10 projects and discovered that the namespace URI has been at http://www.onehippo.org/jcr/hippo/nt/2.0.4 for quite some time, but this change, for whatever reason, didn’t end up in our project. Now, it appears, it has become an issue.

Can anyone recommend any solutions for getting past this issue?

Thanks so much,

Jeremy

Can you look at your *.cnd file and see what is the url for <‘hippo’=’ ?

Well, congrats on being a long-time Hippo user! That 2.0.2 version of the hippo namespace is actually older than our git history, dating back sometime before 2010 in 7.6 or older.

This upgrade scenario appears to be a gap in the new v12 bootstrapping mechanism. We refuse to change the namespace URI associated with a namespace prefix, even though in this case it would be a backwards-compatible change. I have opened a JIRA ticket for this issue.

In the meantime, you can work around this with a manual pre-upgrade step via the Console. Use the CND import function to upload the latest version of the hippo.cnd file into the system you need to upgrade, while it is still running on v11. Since you’re just bringing your repository up to the state that was current in v11, there should be no trouble applying them, though of course you should still do a dry run on a test system using a copy of your production database. I suspect that you might also have some other outdated namespaces, some of which will be in the same directory of our git repo. I can point you to the right place for CND files in other projects if necessary.

Good luck, and please let us know if the workaround is successful in your case.

Thanks so much for getting back to me!

@PCentgraf
I’ve tried importing a hippo.cnd with the updating 2.0.4 version, but it seems disregarded. The version remains at 2.0.2 with no errors in the logs.

As a test, to ensure that there wasn’t some other problem, I added a new document type to an existing namespace and imported the modified CND into the server. This change did take successfully.

One interesting thing is that this new CND had a 2.0.4 version listed for the hippo namespace, but after import, the version reverted back to 2.0.2 even though the other change did take.

I’ll keep looking at this. I just wanted to provide the blow-by-blow.

Edit: In local, the version has been 2.0.4 for a while. It seems it’s only the servers on 2.0.2.

@ThoLe
Here’s how that looks: <‘hippo’=‘http://www.onehippo.org/jcr/hippo/nt/2.0.4’>