Page History
...
Code Block |
---|
SEVERE: Exception sending context initialized event to listener instance of class info.magnolia.cms.servlets.MgnlServletContextListener java.lang.NullPointerException at info.magnolia.cms.beans.config.PropertiesInitializer.loadAllModuleProperties(PropertiesInitializer.java:92) at info.magnolia.cms.beans.config.PropertiesInitializer.loadAllProperties(PropertiesInitializer.java:79) at info.magnolia.cms.servlets.MgnlServletContextListener.contextInitialized(MgnlServletContextListener.java:176) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350) |
You must can either add the following to the pluginManagement section if your main project pom to disable the enforcer plugin or select the eclipse profile:
Code Block |
---|
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <configuration> <skip>true</skip> </configuration> </plugin> |
...
To ensure that everything is fine you have to check if magnolia-core/target/classes/mgnl-bean.properties exist.
Freemarker can't find tags (tlds)
Freemarker searches explicitly only in WEB-INF/lib for the tld files to load. But normally if you develop by using eclipse the jars won't lay there. A valid workaround is to copy the needed tld files to the WEB-INF folder and to edit the web.xml to make the tlds available.
Code Block |
---|
<jsp-config> <taglib> <taglib-uri>cms-taglib</taglib-uri> <taglib-location>cms-taglib.tld</taglib-location> </taglib> <taglib> <taglib-uri>cms-util-taglib</taglib-uri> <taglib-location>cms-util-taglib.tld</taglib-location> </taglib> </jsp-config> |
Webapp project don't work
1) make sure that you have only one webapp project open
2) add the pom dependency (not only the war dependency) otherwise the dependencies defined in the referenced war file won't be seen
3) use war:inplace to overlay the webapp project
- ensure that you delete WEB-INF/lib afterwards
Trouble shooting step by step
1) check if the project builds in the terminal (by using mvn only)
- are the parent poms available?
2) check the maven log in eclipse (select the maven console in the console view) - are the logs fine?
- verify that there is no version conflict thrown by the enforcer plugin
- if so configure the project to use the eclipse profile in the project settings (maven tab)
3) clean the project
- if so configure the project to use the eclipse profile in the project settings (maven tab)
- this ensures that maven is used to build the resources
- verifiy that the resources have been built (module descriptor in
taget/classes/META-INF/magnolia
- are the parent poms available?
4) update project configuration
- right click project -> maven -> update project configuration
- check the maven console (some errors are not reported to the GUI)