[ 
https://issues.apache.org/jira/browse/SLING-10669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17387219#comment-17387219
 ] 

Bertrand Delacretaz commented on SLING-10669:
---------------------------------------------

I was curious and did some investigation. Not planning to work on fixing this 
myself, but hopefully this helps.

As a **workaround**, the CMS starts for me if I remove the {{launcher/cache/}} 
and {{launcher/framework/}} folders before starting, after having moved the 
whole CMS folder to a different location. This means losing any OSGi 
configuration changes that were made, but the content is preserved.

Without this workaround I get the following errors:

Case A: after **renaming the folder** that contains the CMS, I get lots of 
"Referenced file does not exist" errors at startup, with absolute bundle 
filenames which include the old folder name. Moving the {{launcher/cache}} 
folder back to the previous location avoids this issue.

Case B: On the other hand if I copy the folder contents to a different 
location, but the **old location still exists**, I get this error:
{code:java}
[ERROR] Error while running launcher: null
java.lang.reflect.InvocationTargetException
        at 
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
 Method)
...
        at 
org.apache.sling.feature.launcher.impl.launchers.FrameworkLauncher.run(FrameworkLauncher.java:98)
...
        at org.apache.sling.cms.feature.Main.main(Main.java:35)
Caused by: org.osgi.framework.BundleException: Bundle symbolic name and version 
are not unique: org.jvnet.staxex.stax-ex:1.8.3
        at 
org.apache.felix.framework.BundleImpl.createRevision(BundleImpl.java:1337)
...
        at 
org.apache.sling.feature.launcher.impl.launchers.FrameworkRunner.<init>(FrameworkRunner.java:82)
{code}
But if I rename or remove the previous location the error is back to case A.

So it looks like the **root cause** might be absolute filenames being stored to 
refer to the {{launcher/cache}} location.

> Unable to move CMS directory
> ----------------------------
>
>                 Key: SLING-10669
>                 URL: https://issues.apache.org/jira/browse/SLING-10669
>             Project: Sling
>          Issue Type: Bug
>          Components: App CMS
>    Affects Versions: App CMS 1.0.2, App CMS 1.0.4
>            Reporter: James Raynor
>            Priority: Major
>
> Operating system: Win10
> Steps to reproduce:
> Create the folder C:\SlingCMS
>  Start SlingCMS with the following command
>  java -jar org.apache.sling.cms-1.0.4.jar
> Close SlingCMS, move “SlingCMS” folder to the “C:\test” folder, and then the 
> CMS will not start.
>  C:\test\SlingCMS
>  
> It is now impossible to easily move the entire folder of the website from the 
> local computer to the server again, allowing the bundle or configuration 
> information to remain as well.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to