Issue Details (XML | Word | Printable)

Key: CHKOUT-29
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Shannon Krebs
Reporter: Shannon Krebs
Votes: 3
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
Confluence Attachment Checkout Plugin

Compatibility with Gliffy Plugin saving attachments

Created: 05/Oct/08 07:08 AM   Updated: 29/May/09 06:38 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 2.0

Time Tracking:
Not Specified

Environment:
Attachment Checkout 2.0-dr01
Gliffy 1.4.1
Confluence 2.9

Labels:


 Description  « Hide
The Gliffy plugin currently doesn't work when the Attachment Checkout plugin is installed as an error is thrown when it tries to save an attachment. (Gliffy Reference GLIFFY-923).

The error is occuring because the Gliffy plugin calls the AttachmentManager.saveAttachment(...) method directly which ends up new manager provided by the Checkout plugin. A null pointer exception is then thrown by the Confluence core code in AbstractAttachmentManager.saveAttachment(...) because it tries to send an attachment event, but the EventManager is never initialised in the super class. To fix this the VersionedAttachmentManager needs to be autowired to set all instance variables in the super class before installed as the new AttachmentManager.

This error is not observed when saving an attachment through the attachment checkout actions because CheckoutFileUploadManager.storeFile(...) catches null pointer exceptions and only logs a message at debug level !!

(This may also be related to CHKOUT-28.)



 All   Comments   Work Log   Change History   FishEye   Crucible   Builds      Sort Order: Ascending order - Click to sort in descending order
Riyaz Shaikh added a comment - 23/Oct/08 10:57 PM - edited
Shannon,

I could not replicate the same in my environment. Please provide some screen shots.

Env detail:-
Attachment Checkout 2.0-dr01
Gliffy 1.4.1 (Trial version)
Confluence 2.9.1


Shannon Krebs added a comment - 23/Oct/08 11:07 PM
You need to try to make some changes to the diagram then try to save, adding a blank gliffy diagram doesn't cause an error

A screen shot isn't much to look at Gliffy just provides its standard error message when something goes wrong. The stacktrace attached to GLIFFY-923 points to where the problem is:

com.atlassian.confluence.pages.AbstractAttachmentManager.saveAttachment(AbstractAttachmentManager.java:88)
com.atlassian.confluence.extra.checkout.VersionedAttachmentManager.saveAttachment(VersionedAttachmentManager.java:45)
com.atlassian.confluence.pages.DelegatorAttachmentManager.saveAttachment(DelegatorAttachmentManager.java:98)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
$Proxy12.saveAttachment(Unknown Source)
com.gliffy.confluencePlugin.dao.ConfluenceDiagramDAO.updateDiagram(ConfluenceDiagramDAO.java:213)
com.gliffy.core.biz.DefaultDiagramBiz.save(DefaultDiagramBiz.java:100)
com.gliffy.core.clientapi.action.ClientSaveDiagramAction.handleRequest(ClientSaveDiagramAction.java:114)
com.gliffy.core.clientapi.ClientAPIServlet.processAction(ClientAPIServlet.java:95)
com.gliffy.core.clientapi.ClientAPIServlet.doRequest(ClientAPIServlet.java:67)
com.gliffy.core.clientapi.ClientAPIServlet.doPost(ClientAPIServlet.java:53)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)

Shannon Krebs added a comment - 29/May/09 06:38 PM
Added a one line change to the VersionedAttachmentManager to make sure it initialises variables in its super class.