Issue Details (XML | Word | Printable)

Key: CONF-7416
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Matthew Jensen [Atlassian]
Reporter: Jens Schumacher [Atlassian]
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Confluence

LazyInitializationException on page create preview when page contains un-resolveable embedded image

Created: 04/Dec/06 05:12 PM   Updated: 20/Mar/07 01:26 AM
Component/s: Blogging
Affects Version/s: 2.3-DR2
Fix Version/s: 2.4.3

Time Tracking:
Not Specified

File Attachments: None
Image Attachments:

1. error.png
(40 kB)
Environment: Safari

Participants: Charles Miller [old account, do not assign issues], Jens Schumacher [Atlassian] and Matthew Jensen [Atlassian]
Since last comment: 1 year, 42 weeks, 2 days ago
Resolution Date: 20/Mar/07 01:26 AM
Labels:


 Description  « Hide
Steps to reproduce:
  • Create a new page using Safari
  • Set the body of the page to Unable to render embedded object: File (monkey.jpg) not found.
  • Click on the preview tab

Error:

Cause:
org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getInheritedViewPermissions' in class com.atlassian.confluence.pages.actions.CreatePageAction threw exception class net.sf.hibernate.LazyInitializationException : Failed to lazily initialize a collection
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:309)
caused by: net.sf.hibernate.LazyInitializationException: Failed to lazily initialize a collection
at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:201)
caused by: net.sf.hibernate.HibernateException: collection was evicted
at net.sf.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:3305)

Stack Trace: [hide]

org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getInheritedViewPermissions' in class com.atlassian.confluence.pages.actions.CreatePageAction threw exception class net.sf.hibernate.LazyInitializationException : Failed to lazily initialize a collection
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:309)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:207)
at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:357)
...
Caused by: net.sf.hibernate.HibernateException: collection was evicted
at net.sf.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:3305)
at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:195)
... 149 more
Referer URL: http://extranet.atlassian.com/pages/createpage.action

Build Information:
confluence.home: /opt/j2ee/domains/atlassian.com/extranet/webapps/atlassian-confluence/data
system.uptime: 22 hours, 34 minutes, 12 seconds
system.version: 2.3-SNAPSHOT
build.number: 638

Server Information:
Application Server: Apache Tomcat/5.0.28
Servlet Version: 2.4
Database Dialect: net.sf.hibernate.dialect.PostgreSQLDialect
Database Driver Name: N/A
Database Driver Version: N/A

Memory Information:
total.memory: 300 MB
free.memory: 129 MB
used.memory: 171 MB

System Information:
system.date: Monday, 04 Dec 2006
system.time: 16:56:53
system.favourite.colour: Viridian
java.version: 1.4.2_12
java.vendor: Sun Microsystems Inc.
jvm.version: 1.0
jvm.vendor: Sun Microsystems Inc.
jvm.implementation.version: 1.4.2_12-b03
java.runtime: Java(TM) 2 Runtime Environment, Standard Edition
java.vm: Java HotSpot(TM) Server VM
user.name.word: j2ee
user.timezone: America/Chicago
operating.system: Linux 2.6.9-42.0.3.ELsmp
os.architecture: i386
fs.encoding: ANSI_X3.4-1968

Cluster Information:
Name: extranet
Description: TangosolClusterInformation: extranet, listening on 235.54.69.161:32357
Members:
Member(Id=1, Timestamp=2006-11-29 19:18:34.026, Address=172.16.0.10:8088, MachineId=57135)
Member(Id=3, Timestamp=2006-12-03 18:22:43.801, Address=172.16.0.11:8088, MachineId=57136)

Enabled Plugins:
Basic Macros (confluence.macros.basic, Version: 1.3)
Gliffy Plugin (com.gliffy.integration.confluence, Version: 0.88)
HTML Macros (confluence.macros.html, Version: 1.3)
Chart Plugin (confluence.extra.chart, Version: 1.5)
User Listener (confluence.extra.userlister, Version: 1.2)
Global Labels Sections (confluence.sections.labels, Version: 1.0)
Information Macros (confluence.extra.information, Version: 0.1)
Profile Tabs (confluence.sections.profile, Version: 1.0)
Confluence Remote API (confluence.extra.confluencerpc, Version: 1.4)
Core Startup and Shutdown (confluence.lifecycle.core, Version: 1)
Admin Sections (confluence.sections.admin, Version: 1.0)
Space Pages Sections (confluence.sections.space.pages, Version: 1.0)
Voting Macros (com.nearinfinity.confluence.macros.vote, Version: 1.1)
YourKit Profiling Plugin (com.atlassian.confluence.ext.yourkit, Version: 0.1)
Find Email (com.atlassian.confluence.extra, Version: 1.0)
News Tabs (confluence.sections.news, Version: 1.0)
Space Advanced Sections (confluence.sections.space.advanced, Version: 1.0)
Attachments Macros (confluence.extra.attachments, Version: 1.3)
IM Presence Macros (confluence.extra.impresence, Version: 0.1)
Space Actions Sections (confluence.sections.space.actions, Version: 1.0)
Adaptavist Content Formatting Macros (com.adaptavist.confluence.contentFormattingMacros, Version: 1.6.2)
Task List Macros (confluence.extra.tasklist, Version: 1.3)
Space Labels Sections (confluence.sections.space.labels, Version: 1.0)
Dynamic Task List Macros (confluence.extra.dynamictasklist, Version: 1.3)
Core Extractors (confluence.extractors.core, Version: 1.4)
Compatibility Macros (confluence.macros.compatibility, Version: 1.3)
Page Tabs (confluence.sections.page, Version: 1.0)
Core Listeners (confluence.listeners.core, Version: 1.3)
Bamboo Theme (com.atlassian.confluence.themes.bamboo, Version: 0.1)
Dashboard Macros (confluence.macros.dashboard, Version: 1.3)
Live Search Macros (confluence.extra.livesearch, Version: 1.4)
Page View Links (confluence.sections.page.actions, Version: 1.0)
JIRA Macros (confluence.extra.jira, Version: 1.5)
Clickr Theme (com.atlassian.confluence.themes.clickr, Version: 0.5)
Layout Macros (confluence.extra.layout, Version: 0.1)
Excel Plugin (org.swift.confluence.excel, Version: 3.0.1)
Global Statistics Plugin (confluence.extra.globalstats, Version: 1.0)
Tabular Metadata (confluence.extra.masterdetail, Version: 1.0)
Space Admin Sections (confluence.sections.space.admin, Version: 1.0)
Cache Plugin (org.swift.confluence.cache, Version: 3.0.2)
Calendar Plugin (confluence.extra.calendar, Version: 2.1.11)
Advanced Macros (confluence.macros.advanced, Version: 1.3)
Confluence Repository Client (confluence.repository.client, Version: 1.3)
IM Presence NG Plugin (confluence.extra.impresence2, Version: 2.0-rc3)
Slideshow Plugin (com.atlassian.confluence.ext.slideshow, Version: 0.2)
Edit Profile Sections (confluence.sections.profile.edit, Version: 1.0)
FreeMind Plugin (com.atlassian.confluence.contrib.freemind, Version: 1.0.2)
Contributors Plugin (confluence.authors, Version: 0.8)
Attachment Extractors (confluence.extractors.attachments, Version: 1.4)
SQL Plugin (org.swift.confluence.sql, Version: 3.0.1)
Left Navigation Theme (com.atlassian.confluence.themes.leftnavigation, Version: 1.0)
RSVP Plugin (com.atlassian.confluence.extra.rsvp, Version: 1.2_dev)
Space Item Tabs (confluence.sections.space, Version: 1.0)
Code Macro (confluence.macros.code, Version: 1.4)

Request
Information:
URL: http://extranet.atlassian.com/pages/docreatepage.action

  • Scheme: http
  • Server: extranet.atlassian.com
  • Port: 80
  • URI: /500page.jsp
  • - Context Path:
  • - Servlet Path: /500page.jsp
  • - Path Info: null
  • - Query String: null

Attributes:

  • javax.servlet.forward.request_uri : /pages/docreatepage.action
  • javax.servlet.forward.context_path :
  • javax.servlet.forward.servlet_path : /pages/docreatepage.action
  • javax.servlet.forward.path_info : /500page.jsp
  • javax.servlet.error.exception : org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getInheritedViewPermissions' in class com.atlassian.confluence.pages.actions.CreatePageAction threw exception class net.sf.hibernate.LazyInitializationException : Failed to lazily initialize a collection
  • javax.servlet.error.message :
  • os_securityfilter_already_filtered : true
  • com.atlassian.johnson.filters.JohnsonFilter_already_filtered : true
  • _sitemesh_using_stream : false
  • javax.servlet.error.request_uri : /pages/docreatepage.action
  • javax.servlet.error.status_code : 500
  • _sitemesh_filterapplied : true
  • javax.servlet.error.servlet_name : action
  • webwork.valueStack : com.opensymphony.xwork.util.OgnlValueStack@17138d8
  • loginfilter.already.filtered : true
  • atlassian.core.seraph.original.url : /pages/docreatepage.action
  • javax.servlet.jsp.jspException : org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getInheritedViewPermissions' in class com.atlassian.confluence.pages.actions.CreatePageAction threw exception class net.sf.hibernate.LazyInitializationException : Failed to lazily initialize a collection
  • sessioninview.FILTERED : true
  • com.atlassian.core.filters.gzip.GzipFilter_already_filtered : true

Parameters:

  • editPermission =
  • title = Customer signup form feedback
  • newSpaceKey = CHE
  • fromPageId = 527007810
  • titleWritten = true
  • mode = markup
  • inPreview = false
  • content = A customer gave us some unintentional feedback today by replying to the invite email send by Confluence. Here is what he said:

    Cool - it's very slick and you get a nice sigh-up page too....

    Unable to render embedded object: File (signup_form.jpg) not found.
  • spaceKey = CHE
  • sel2 =
  • xhtml = false
  • linkCreation = false
  • selectedText =
  • labelsString =
  • viewPermissionGroup =
  • preview = preview
  • editPermissionGroup =
  • sel1 =
  • viewPermission =
  • parentPageString = Home
    Confluence User:
  • anonymous

Logging:
0 log statements generated by this request.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Charles Miller [old account, do not assign issues] added a comment - 04/Dec/06 07:24 PM
Steps to reproduce?

Matthew Jensen [Atlassian] added a comment - 19/Mar/07 10:21 PM
Tested on 2.4.2

Steps to reproduce:

  • Create a new page using Safari (exact browser is irrelevant)
  • Set the body of the page to Unable to render embedded object: File (monkey.jpg) not found. (any
  • Click on the preview tab

I don't get the exception (on 2.4.2) but I get this error message:
The collection was unreferenced; nested exception is net.sf.hibernate.QueryException: The collection was unreferenced


Matthew Jensen [Atlassian] added a comment - 19/Mar/07 10:25 PM
Screen shot of the error

Matthew Jensen [Atlassian] added a comment - 19/Mar/07 10:28 PM
Same behavior on 2.3.3.

Matthew Jensen [Atlassian] added a comment - 20/Mar/07 01:26 AM

This issue i believe was caused in the AbstractHibernateAttachmentDao.getLatestVersionsOfAttachments method. This method performed a 'session.filter()' on 'ContentEntityObject.getAttachments()'. If the ContentEntityObject was not persisted, this method threw the HibernateException. This is what was happening when previewing a page that hadn't been saved.

I couldn't reproduce this issue exactly so I assume that the error handling has changed slightly.

I changed the DAO to not filter an empty list of attachements. This makes the page render:
Unable to render embedded object: File (monkey.png) not found.

Which is better than an obscure hibernate exception output.