You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
Hi,
I am following the SDK tutorial "Writing a Confluence Theme" (https://developer.atlassian.com/confdev/tutorials/writing-a-confluence-theme) and am stuck in step 3, because when I start Confluence via atlas-run, I get an error in the log that the class "com.atlassian.confluence.themes.BasicTheme" cannot be loaded:
com.atlassian.plugin.module.ModuleClassNotFoundException: Couldn't load the class 'com.atlassian.confluence.themes.BasicTheme'. This could mean that you misspelled the name of the class (double check) or that you're using a class in your plugin that you haven't provided bundle instructions for. See https://developer.atlassian.com/x/mQAN for more details on how to fix this.
I am trying to get the custom theme to run out of Eclipse, Confluence itself does start up, but I don't see the theme listed in Configuration -> Look and Feel -> Themes.
Do I need to declare the BasicTheme class somewhere? it shows up in my Eclipse project under Referenced LIbraries > confluence-5.9.1.jar and is correctly referenced in my proiect's atlassian-plugin.xml file.
There is no note in the documentation that I need to do anything to make this class visible.
Can somebody who has successfully gone through this tutorial help me?
My system:
Confluence Version: 5.9.1
Atlassian SDK Version 6.1.0
Community moderators have prevented the ability to post new answers.
You need to add com.atlassian.confluence.themes to the <Import-Package> definition in your pom.
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-confluence-plugin</artifactId>
<version>${amps.version}</version>
<extensions>true</extensions>
<configuration>
<productVersion>${confluence.version}</productVersion>
<productDataVersion>${confluence.data.version}</productDataVersion>
<instructions>
<Atlassian-Plugin-Key>${project.groupId}.${project.artifactId}</Atlassian-Plugin-Key>
<Spring-Context>*</Spring-Context>
<Export-Package />
<Import-Package>
com.atlassian.confluence.themes,
com.atlassian.confluence.plugin.descriptor,
org.springframework.osgi.*;resolution:="optional",
org.eclipse.gemini.blueprint.*;resolution:="optional",
com.atlassian.plugin.osgi.bridge.external,
*;resolution:=optional
</Import-Package>
</instructions>
</configuration>
</plugin>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I made this work by doing the follow workaround: Create an empty class that just extends the above BasicTheme. (I didn't have need for overriding methods). In the atlassian-plugin.xml declare as class newly created class and in the pom import the
com.atlassian.confluence.*;resolution:="optional"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to add com.atlassian.confluence.themes to the <Import-Package> definition in your pom.
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-confluence-plugin</artifactId>
<version>${amps.version}</version>
<extensions>true</extensions>
<configuration>
<productVersion>${confluence.version}</productVersion>
<productDataVersion>${confluence.data.version}</productDataVersion>
<instructions>
<Atlassian-Plugin-Key>${project.groupId}.${project.artifactId}</Atlassian-Plugin-Key>
<Spring-Context>*</Spring-Context>
<Export-Package />
<Import-Package>
com.atlassian.confluence.themes,
com.atlassian.confluence.plugin.descriptor,
org.springframework.osgi.*;resolution:="optional",
org.eclipse.gemini.blueprint.*;resolution:="optional",
com.atlassian.plugin.osgi.bridge.external,
*;resolution:=optional
</Import-Package>
</instructions>
</configuration>
</plugin>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to add com.atlassian.confluence.themes to the <Import-Package> definition in your pom.
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-confluence-plugin</artifactId>
<version>${amps.version}</version>
<extensions>true</extensions>
<configuration>
<productVersion>${confluence.version}</productVersion>
<productDataVersion>${confluence.data.version}</productDataVersion>
<instructions>
<Atlassian-Plugin-Key>${project.groupId}.${project.artifactId}</Atlassian-Plugin-Key>
<Spring-Context>*</Spring-Context>
<Export-Package />
<Import-Package>
com.atlassian.confluence.themes,
com.atlassian.confluence.plugin.descriptor,
org.springframework.osgi.*;resolution:="optional",
org.eclipse.gemini.blueprint.*;resolution:="optional",
com.atlassian.plugin.osgi.bridge.external,
*;resolution:=optional
</Import-Package>
</instructions>
</configuration>
</plugin>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, I'll try this out when I have time :)
(Sorry, I forgot to reply to your initial answer)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.