javamelody / liferay-javamelody

JavaMelody plugin for Liferay
Apache License 2.0
6 stars 8 forks source link

Error messages when creating site #10

Closed gandlec closed 3 years ago

gandlec commented 6 years ago

We're using Liferay 6.2 and getting a lot of error messages when creating a site based on a Site Template. To reproduce:

  1. Add JavaMelody Liferay plugin
  2. Add SQL Monitoring (to mysql database) as explained on https://github.com/javamelody/javamelody/wiki/LiferayPlugin
  3. In the Control Panel go to Sites
  4. Add Site - Community Site
  5. See the logs - note, we're not using staging.

ERRORcom.liferay.portal.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:244) [null][ajp-apr-8009-exec-456] Caught unexpected exception java.lang.NullPointerException 2017-10-23 15:24:33 ERRORcom.liferay.portlet.sites.util.SitesImpl.mergeLayoutSetPrototypeLayouts(SitesImpl.java:1322) [null][ajp-apr-8009-exec-456] ... at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:232) at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:209) at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:88) at net.bull.javamelody.LiferayMonitoringFilter.doFilter(LiferayMonitoringFilter.java:108) ... Caused by: com.liferay.portal.kernel.exception.SystemException: java.lang.NullPointerException at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:251) at com.liferay.counter.service.persistence.CounterFinderImpl._obtainIncrement(CounterFinderImpl.java:417) at com.liferay.counter.service.persistence.CounterFinderImpl.createCounterRegister(CounterFinderImpl.java:255) at com.liferay.counter.service.persistence.CounterFinderImpl.createCounterRegister(CounterFinderImpl.java:207) at com.liferay.counter.service.persistence.CounterFinderImpl.getCounterRegister(CounterFinderImpl.java:282) at com.liferay.counter.service.persistence.CounterFinderImpl.increment(CounterFinderImpl.java:118) at com.liferay.counter.service.persistence.CounterFinderImpl.increment(CounterFinderImpl.java:109) at com.liferay.counter.service.impl.CounterLocalServiceImpl.increment(CounterLocalServiceImpl.java:49) sitecreation.log

evernat commented 6 years ago

What is your Liferay version exactly? Is it CE / EE? Does it happen when the javamelody liferay plugin is not installed? And does it happen with the latest Liferay version (7.0 ga5 at the moment)?

gandlec commented 6 years ago

We're using Liferay 6.2 EE, service pack 20. It does not happen using javamelody without SQL monitoring, only when using javamelody with SQL monitoring. I haven't tried on LR 7.

evernat commented 6 years ago

Please try on LR 7. Thank you.

antoine-delahay commented 3 years ago

Hello, I got the exact same error using Liferay 7.0.

Hopefully I was able to find the origin. Short story, the defaultAutoCommit="false" attribute on the LiferayPool JNDI resource provided example seems to cause a side effect on Liferay "DB counter" strategy in its Hibernate session.

Using the same JDNI resource without defaultAutoCommit attribute, I was not able to reproduce the issue. Maybe the example provided in the documentation could be updated.

evernat commented 3 years ago

done, thank you