pfumagalli / couldit-autoexport

Automatically exported from code.google.com/p/couldit-autoexport
Other
0 stars 1 forks source link

Confluence 3.0 Problem with editing templates #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Installed plugin autoexport-plugin-1.0.0.beta1.jar under Confluence
3.0.0_01 
2. When I click on "Edit Template" and then "Save Changes" I get the
following error (see also attached logfile):

Cause

java.lang.NullPointerException
    at org.apache.felix.framework.Felix.releaseBundleLock(Felix.java:4180)
Stack Trace:[hide]

java.lang.NullPointerException
    at org.apache.felix.framework.Felix.releaseBundleLock(Felix.java:4180)
    at org.apache.felix.framework.Felix$2.moduleResolved(Felix.java:674)
    at
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.fireModuleResolved(R4
SearchPolicyCore.java:2852)
    at
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.resolve(R4SearchPolic
yCore.java:1137)
    at
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClassOrResource(R
4SearchPolicyCore.java:377)
    at
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(R4SearchPol
icyCore.java:185)
    at
org.apache.felix.framework.searchpolicy.R4SearchPolicy.findClass(R4SearchPolicy.
java:45)
    at
org.apache.felix.framework.searchpolicy.ContentClassLoader.loadClass(ContentClas
sLoader.java:109)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)

or sometimes it comes to

Cause

java.lang.IllegalStateException: Cannot stop an uninstalled bundle.
    at org.apache.felix.framework.Felix._stopBundle(Felix.java:1977)
Stack Trace:[hide]

java.lang.IllegalStateException: Cannot stop an uninstalled bundle.
    at org.apache.felix.framework.Felix._stopBundle(Felix.java:1977)
    at org.apache.felix.framework.Felix.stopBundle(Felix.java:1952)
    at org.apache.felix.framework.BundleImpl.stop(BundleImpl.java:407)
    at
com.atlassian.plugin.osgi.factory.OsgiBundlePlugin.disableInternal(OsgiBundlePlu
gin.java:258)
    at com.atlassian.plugin.impl.AbstractPlugin.disable(AbstractPlugin.java:240)
    at
com.atlassian.plugin.manager.DefaultPluginManager.notifyPluginDisabled(DefaultPl
uginManager.java:1000)
    at
com.atlassian.confluence.plugin.ConfluencePluginManager.notifyPluginDisabled(Con
fluencePluginManager.java:109)

I poked around and found another plugin called "Auto export templates
plugin", which was apparently created by the Auto Export Plugin.

I finally got my templates working by creating such a templates-plugin-jar
offline and upload it to confluence. The Auto Export Plugin recognizes
this. However I have to restart Confluence.

I'm not yet acquainted to this OSGI-plugin-stuff, so I'm not sure, where to
look further...

Regards
Tom

Original issue reported on code.google.com by tlohschm...@googlemail.com on 17 Jun 2009 at 6:49

Attachments:

GoogleCodeExporter commented 9 years ago
I have the same problem but I do not understand your workaround. 

Do you create a dummy plugin or do you put your template in the "Auto export
templates plugin"?

Could you maybe upload your/sample "Auto export templates plugin".

Thanks!

Original comment by xoi...@gmail.com on 30 Oct 2009 at 10:50

GoogleCodeExporter commented 9 years ago
Hi there!

If you look into the plugin-cache folder in your Confluence home you should 
find a
plugin with autoexport.templates in its name, e. g.

1257151784273autoexport.templates2124142648190600079.jar

In it you will find a manifest-file and all the styles for the autoexport 
plugin. 
If you have a running 2.10 Confluence, you can try and check there.

The autoexport.templates.jar looks like the following:

  5900 Mon Nov 02 09:49:44 CET 2009 autoexport.ds.vm
  5862 Mon Nov 02 09:49:44 CET 2009 autoexport.vm
   224 Mon Nov 02 09:49:44 CET 2009 META-INF/MANIFEST.MF

autoexport.ds.vm is the stylesheet for the space with key 'ds'
autoexport.vm is the global stylesheet
META-INF/MANIFEST.MF contains the plugin metainformation

So write your vm-styles and wrap them up into a jar und load it just like a 
standard
plugin into Confluence. But be careful, to get the manifest into the jar you 
need to
specify it on the commandline:

jar cvfm autoexport.templates.jar META-INF/MANIFEST.MF autoexport.*

This way autoexport will recognize your customized styles.

Regards
Thomas

Original comment by tlohschm...@googlemail.com on 6 Nov 2009 at 10:07

GoogleCodeExporter commented 9 years ago
Bug in the version of plugins in Confluence 3.0 is causing this.  I worked 
around it
by explicitly uninstalling the bundle first.  Thanks for the ticket.

Original comment by donald.b...@gmail.com on 7 Nov 2009 at 6:16