Error: Unable to access jarfile confluence-context-path-extractor.jar
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Problem
On startup, after executing ./start-confluence.sh the following appears in the shell output:
1
2
Using Java: /opt/openjdk/jdk8u202-b08/bin/java
Error: Unable to access jarfile /opt/atlassian/confluence/bin/confluence-context-path-extractor.jar/opt/atlassian/confluence
Diagnosis
Environment
Confluence Server or Data Center
The commands in the above error come from the <confluence-install>/bin/setenv.sh file. Note in the above error that the path is repeated after the .jar file:
1
/opt/atlassian/confluence/bin/confluence-context-path-extractor.jar/opt/atlassian/confluence
Cause
The relevant section in the setenv.sh file is missing a space between "confluence-context-path-extractor.jar" and "$CATALINA_HOME" as seen below:
1
2
3
4
5
6
echo "---------------------------------------------------------------------------"
echo "Using Java: $JRE_HOME/bin/java"
CONFLUENCE_CONTEXT_PATH=`$JRE_HOME/bin/java -jar $CATALINA_HOME/bin/confluence-context-path-extractor.jar$CATALINA_HOME`
export CONFLUENCE_CONTEXT_PATH
$JRE_HOME/bin/java -jar $CATALINA_HOME/bin/synchrony-proxy-watchdog.jar $CATALINA_HOME
echo "---------------------------------------------------------------------------"
Solution
Resolution
Change this line in setenv.sh:
1
CONFLUENCE_CONTEXT_PATH=`$JRE_HOME/bin/java -jar $CATALINA_HOME/bin/confluence-context-path-extractor.jar$CATALINA_HOME`
To look like this example which includes a space between the .jar and the $ sign:
1
CONFLUENCE_CONTEXT_PATH=`$JRE_HOME/bin/java -jar $CATALINA_HOME/bin/confluence-context-path-extractor.jar $CATALINA_HOME`
Then, restart Confluence for the changes to take effect.
Was this helpful?