Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Error persisting CustomContentEntityObject Edited

I would like to create a custom content entity object, so that it may delivered as a notification to a watcher, who may then access it. However, when I try to create the notification, it throws a hibernate exception claiming my entity is not a sub class of ContentEntityObject.

So, what am I doing wrong? My instinct says I need to provide something in my class definition, but the documentation in this area is sorely lacking, to put it nicely.

org.springframework.orm.hibernate5.HibernateSystemException: Unable to resolve entity name from Class [com.*******.atlassian.confluence.report.content.DownloadableContent] expected instance/subclass of [com.atlassian.confluence.core.ContentEntityObject]; nested exception is org.hibernate.HibernateException: Unable to resolve entity name from Class [com.*******.atlassian.confluence.report.content.DownloadableContent] expected instance/subclass of [com.atlassian.confluence.core.ContentEntityObject]
org.springframework.orm.hibernate5.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:296)
org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:364)
org.springframework.orm.hibernate5.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:328)
org.springframework.orm.hibernate5.HibernateTemplate.saveOrUpdate(HibernateTemplate.java:706)
com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao.saveRaw(HibernateObjectDao.java:242)
com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao.save(HibernateObjectDao.java:202)
com.atlassian.confluence.impl.mail.notification.persistence.CachingNotificationDao.save(CachingNotificationDao.java:74)
com.atlassian.confluence.mail.notification.DefaultNotificationManager.addContentNotification(DefaultNotificationManager.java:108)

The class definition. And yes, it is empty. I would put stuff in there, and I'm sure I need to put something in there, but quite frankly, I have no idea what kind of stuff is needed. As I said, the documentation is a bit sparse.

package com.*******.atlassian.confluence.report.content;

import com.atlassian.confluence.content.CustomContentEntityObject;

public class DownloadableContent extends CustomContentEntityObject {
}

 

1 answer

1 accepted

0 votes
Answer accepted

Never mind. Just saw the following in the javadoc

Protected. If you want a new CustomContentEntityObject, get it from the CustomContentManager

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.5.1
TAGS
Community showcase
Published in Confluence

Announcing Team Calendars in Confluence Data Center

Hi Community! We're thrilled to share that Team Calendars for Confluence is now a built-in feature for Confluence Data Center releases 7.11 and beyond.  A long time favorite,  Team Cale...

109 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you