Blog

  • 2024
  • 2023
  • 2022
  • 2021
  • 2020
  • 2019
  • 2018
  • 2017
  • 2016
  • 2015
  • 2014
  • 2013
  • 2012

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »




When trying to instrument a locally via the Atlassian SDK started Confluence with the Java VisualVM for profiling, the following exception is thrown:

Found in Confluence Log / Console
Caused by: java.lang.NoClassDefFoundError: org/netbeans/lib/profiler/server/ProfilerRuntimeCPUFullInstr

What seems to tell that a required class is not provided is actually a complaint that the OSGi subsystem has not been configured properly.

Add the following lines to specify a profile with additional system properties to your Maven POM to configure Confluence:

POM File
<profile>
  <id>profiling</id>
    <build>
      <pluginManagement>
        <plugins>
          <plugin>
            <groupId>com.atlassian.maven.plugins</groupId>
            <artifactId>maven-confluence-plugin</artifactId>
            <version>6.3.21</version>
            <extensions>true</extensions>
            <configuration>
              <systemPropertyVariables>
                <atlassian.org.osgi.framework.bootdelegation>org.netbeans.lib.profiler.*,sun.*,com.sun.*</atlassian.org.osgi.framework.bootdelegation>
                <atlassian.org.osgi.framework.system.packages>org.netbeans.lib.profiler.server</atlassian.org.osgi.framework.system.packages>
            </systemPropertyVariables>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
</profile>

Start the Confluence server locally using the Atlassian SDK:

Found in Confluence Log / Console
atlas-debug -Pprofiling

Then add a configuration to limit instrumentation to classes you want to take execution performance measurements and start the instrumentation.


Link

Link

Posts

  • No labels