[4.0.1] New contentlet debugging.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[4.0.1] New contentlet debugging.

Nathan Keiter

I have a brand new (never saved) contentlet (as in Contentlet contentlet = new Contentlet(); then set some properties.)  Before I save, I want to do some debugging.


So I want to write it to the log.


So I say JSONObject jsonObject = new JSONObject( contentlet ); thinking this will be a great easy way of viewing the object in the log. (Output jsonObject.toString( 4 ) to log.)


Unfortunately somewhere in the initial parsing it throws a permissions error.  Why would system user not have permissions? Any way to fix this.  It throws an ugly 500 error that completely bypasses my try catch blocks.


com.dotmarketing.exception.DotSecurityException: User: system cannot read Contentlet:

            at com.dotcms.content.elasticsearch.business.ESContentletAPIImpl.getName(ESContentletAPIImpl.java:3438) ~[dotcms_4.0.1_999999.jar:?]

            at com.dotmarketing.portlets.contentlet.business.ContentletAPIInterceptor.getName(ContentletAPIInterceptor.java:1102) ~[dotcms_4.0.1_999999.jar:?]

            at com.dotmarketing.portlets.contentlet.model.Contentlet.getTitle(Contentlet.java:139) [dotcms_4.0.1_999999.jar:?]

            at com.dotmarketing.portlets.contentlet.model.Contentlet.getName(Contentlet.java:391) [dotcms_4.0.1_999999.jar:?]

            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]

            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]

            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]

            at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]

            at com.dotmarketing.util.json.JSONObject.populateMap(JSONObject.java:921) [dotcms_4.0.1_999999.jar:?]

            at com.dotmarketing.util.json.JSONObject.<init>(JSONObject.java:256) [dotcms_4.0.1_999999.jar:?]


Nathan I. Keiter | Lead Network Applications Programmer | Benefits Advisory Council Member | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993



http://dotcms.com - Open Source Java Content Management
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/4dd8ab680a854bbda035dc084631aeda%40exch13c.ms.gettysburg.edu.
For more options, visit https://groups.google.com/d/optout.