Skip to content

Instantly share code, notes, and snippets.

@theopendle
Created June 21, 2020 14:42
Show Gist options
  • Select an option

  • Save theopendle/61ecf7121b8de68c13de151c58fa86e4 to your computer and use it in GitHub Desktop.

Select an option

Save theopendle/61ecf7121b8de68c13de151c58fa86e4 to your computer and use it in GitHub Desktop.
Caused by: org.apache.sling.models.factory.PostConstructException: Post-construct method has thrown an exception for model class com.theopendle.core.models.impl.TestModelImpl
at org.apache.sling.models.impl.ModelAdapterFactory.createObject(ModelAdapterFactory.java:774) [org.apache.sling.models.impl:1.4.10]
at org.apache.sling.models.impl.ModelAdapterFactory.internalCreateModel(ModelAdapterFactory.java:448) [org.apache.sling.models.impl:1.4.10]
at org.apache.sling.models.impl.ModelAdapterFactory.createModel(ModelAdapterFactory.java:314) [org.apache.sling.models.impl:1.4.10]
at org.apache.sling.scripting.sightly.models.impl.SlingModelsUseProvider.provide(SlingModelsUseProvider.java:135) [org.apache.sling.scripting.sightly.models.provider:1.0.8]
at org.apache.sling.scripting.sightly.impl.engine.extension.use.UseRuntimeExtension.call(UseRuntimeExtension.java:72) [org.apache.sling.scripting.sightly:1.1.2.1_4_0]
... 298 common frames omitted
Caused by: java.lang.NullPointerException: null
at com.theopendle.core.models.impl.TestModelImpl.init(TestModelImpl.java:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.sling.models.impl.ModelAdapterFactory.invokePostConstruct(ModelAdapterFactory.java:972) [org.apache.sling.models.impl:1.4.10]
at org.apache.sling.models.impl.ModelAdapterFactory.createObject(ModelAdapterFactory.java:772) [org.apache.sling.models.impl:1.4.10]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment