no parent set on ProjectType

44 views
Skip to first unread message

Ivo Bellin Salarin

unread,
Jul 2, 2015, 8:09:45 AM7/2/15
to jenkin...@googlegroups.com
Hi all,

I have developed a custom action, which is being attached to a build.

This action has a submission method and this method, while checking for ACL
project.checkPermission(AbstractProject.BUILD);

throws a
java.lang.IllegalStateException: no parent set on
my.namespace.MyProjectType[null]

This exception is raised only after the Jenkins instance has been
reloaded, for build which have been executed before the instance
reboot. I haven't found any serialization issue in my instance logs.
Does somebody know how to fix this problem?

--
http://www.nilleb.com

Oleg Nenashev

unread,
Jul 5, 2015, 4:48:41 AM7/5/15
to jenkin...@googlegroups.com
It would be better if you post the code of your action somewhere.

Seems your Item type does not reference the ItemGroup storing it. Actuallu it means that MyProjectType#parent is null after the restart. Probably, you have a wrong implementation of the onLoad() method.

четверг, 2 июля 2015 г., 15:09:45 UTC+3 пользователь Ivo Bellin Salarin написал:

Ivo Bellin Salarin

unread,
Jul 16, 2015, 11:09:02 AM7/16/15
to jenkin...@googlegroups.com
MyProjectType doesn't have a onLoad() at all!

I simply was expecting Project
(http://javadoc.jenkins-ci.org/hudson/model/Project.html) to do it for
me.

Thanks, I'll investigate further the problem...
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-de...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/65fed2e1-4774-4497-9151-9cb29fad7f91%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
http://www.nilleb.com
Reply all
Reply to author
Forward
0 new messages