Code Monkey home page Code Monkey logo

headspluginapi's People

Contributors

cc007 avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

headspluginapi's Issues

Improper async shutdown

Paper 1.20.4-365
HeadsPluginAPI 3.3.0

On server shutdown

[23:43:57 ERROR]: Nag author(s): '[Rik Schaaf aka CC007 (http://coolcat007.nl/)]' of 'HeadsPluginAPI v3.3.0' about the following: This plugin is not properly shutting down its async tasks when it is being shut down. This task may throw errors during the final shutdown logs and might not complete before process dies.

and occasionally such errors are thrown

[23:42:45 WARN]: [HeadsPluginAPI] Plugin HeadsPluginAPI v3.3.0 generated an exception while executing task 11173
org.apache.openjpa.persistence.PersistenceException: connection exception: closed {SELECT t0.id, t2.id, t2.version, t2.name FROM heads t0 INNER JOIN database_heads t1 ON t0.id = t1.head_id INNER JOIN databases t2 ON t1.database_id = t2.id WHERE ((t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ?) AND t0.headOwner IS NOT NULL) ORDER BY t0.id ASC} [code=-1353, state=08503]
        at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:5320) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:5280) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.jdbc.sql.HSQLDictionary.newStoreException(HSQLDictionary.java:405) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:134) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:115) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:67) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.handleCheckedException(SelectResultObjectProvider.java:162) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.kernel.QueryImpl$PackingResultObjectProvider.handleCheckedException(QueryImpl.java:2235) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.lib.rop.EagerResultList.<init>(EagerResultList.java:42) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1314) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1061) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:911) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:842) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:601) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:297) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:314) ~[HeadsPluginAPI-3.3.0.jar:?]
        at com.github.cc007.headsplugin.integration.database.services.jpa.JpaQueryService.getMutableResultList(JpaQueryService.java:118) ~[HeadsPluginAPI-3.3.0.jar:?]
        at com.github.cc007.headsplugin.integration.database.services.jpa.JpaQueryService.findAllByPropertyIn(JpaQueryService.java:77) ~[HeadsPluginAPI-3.3.0.jar:?]
        at com.github.cc007.headsplugin.integration.database.repositories.jpa.JpaHeadRepository.findAllByHeadOwnerIn(JpaHeadRepository.java:31) ~[HeadsPluginAPI-3.3.0.jar:?]
        at com.github.cc007.headsplugin.business.services.heads.HeadUpdaterImpl.lambda$updateHeads$0(HeadUpdaterImpl.java:38) ~[HeadsPluginAPI-3.3.0.jar:?]
        at com.github.cc007.headsplugin.integration.database.transaction.jpa.JpaNestableTransaction.lambda$runTransacted$2(JpaNestableTransaction.java:71) ~[HeadsPluginAPI-3.3.0.jar:?]
        at com.github.cc007.headsplugin.integration.database.transaction.jpa.JpaNestableTransaction.runTransacted(JpaNestableTransaction.java:108) ~[HeadsPluginAPI-3.3.0.jar:?]
        at com.github.cc007.headsplugin.integration.database.transaction.jpa.JpaNestableTransaction.runTransacted(JpaNestableTransaction.java:69) ~[HeadsPluginAPI-3.3.0.jar:?]
        at com.github.cc007.headsplugin.integration.database.transaction.jpa.JpaNestableTransaction.runTransacted(JpaNestableTransaction.java:48) ~[HeadsPluginAPI-3.3.0.jar:?]
        at com.github.cc007.headsplugin.business.services.heads.HeadUpdaterImpl.updateHeads(HeadUpdaterImpl.java:30) ~[HeadsPluginAPI-3.3.0.jar:?]
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.lambda$updateCategory$13(CategoryUpdaterImpl.java:170) ~[HeadsPluginAPI-3.3.0.jar:?]
        at java.util.HashMap.forEach(HashMap.java:1429) ~[?:?]
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.updateCategory(CategoryUpdaterImpl.java:169) ~[HeadsPluginAPI-3.3.0.jar:?]
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.lambda$updateCategories$9(CategoryUpdaterImpl.java:132) ~[HeadsPluginAPI-3.3.0.jar:?]
        at com.github.cc007.headsplugin.business.services.ProfilerImpl.runProfiled(ProfilerImpl.java:62) ~[HeadsPluginAPI-3.3.0.jar:?]
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.lambda$updateCategories$11(CategoryUpdaterImpl.java:125) ~[HeadsPluginAPI-3.3.0.jar:?]
        at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.updateCategories(CategoryUpdaterImpl.java:124) ~[HeadsPluginAPI-3.3.0.jar:?]
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.lambda$updateCategoriesIfNecessary$4(CategoryUpdaterImpl.java:81) ~[HeadsPluginAPI-3.3.0.jar:?]
        at com.github.cc007.headsplugin.integration.database.transaction.jpa.JpaNestableTransaction.runTransacted(JpaNestableTransaction.java:108) ~[HeadsPluginAPI-3.3.0.jar:?]
        at com.github.cc007.headsplugin.integration.database.transaction.jpa.JpaNestableTransaction.runTransacted(JpaNestableTransaction.java:81) ~[HeadsPluginAPI-3.3.0.jar:?]
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.lambda$updateCategoriesIfNecessary$5(CategoryUpdaterImpl.java:77) ~[HeadsPluginAPI-3.3.0.jar:?]
        at com.github.cc007.headsplugin.business.services.ProfilerImpl.runProfiled(ProfilerImpl.java:62) ~[HeadsPluginAPI-3.3.0.jar:?]
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.updateCategoriesIfNecessary(CategoryUpdaterImpl.java:75) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.20.4.jar:git-Paper-365]
        at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.20.4.jar:git-Paper-365]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.20.4.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: connection exception: closed {SELECT t0.id, t2.id, t2.version, t2.name FROM heads t0 INNER JOIN database_heads t1 ON t0.id = t1.head_id INNER JOIN databases t2 ON t1.database_id = t2.id WHERE ((t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ? OR t0.headOwner = ?) AND t0.headOwner IS NOT NULL) ORDER BY t0.id ASC} [code=-1353, state=08503]
        at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:219) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:199) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$000(LoggingConnectionDecorator.java:58) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection.prepareStatement(LoggingConnectionDecorator.java:252) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:138) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.lib.jdbc.ConfiguringConnectionDecorator$ConfiguringConnection.prepareStatement(ConfiguringConnectionDecorator.java:144) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:138) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$RefCountConnection.prepareStatement(JDBCStoreManager.java:1699) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:127) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.jdbc.sql.SQLBuffer.prepareStatement(SQLBuffer.java:517) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.jdbc.sql.SQLBuffer.prepareStatement(SQLBuffer.java:497) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.jdbc.sql.SelectImpl.prepareStatement(SelectImpl.java:511) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:452) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:413) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.jdbc.sql.SelectImpl.addEagerResults(SelectImpl.java:490) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.jdbc.sql.SelectImpl.getEagerResult(SelectImpl.java:566) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:464) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:423) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.jdbc.sql.LogicalUnion$UnionSelect.execute(LogicalUnion.java:477) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:259) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:248) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.open(SelectResultObjectProvider.java:95) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.kernel.QueryImpl$PackingResultObjectProvider.open(QueryImpl.java:2187) ~[HeadsPluginAPI-3.3.0.jar:?]
        at org.apache.openjpa.lib.rop.EagerResultList.<init>(EagerResultList.java:36) ~[HeadsPluginAPI-3.3.0.jar:?]
        ... 36 more

As HeadsPlugin I want to be able to disable calls to one of the heads databases, so that my log doesn't get spammed if that heads database is down

Right now Freshcoal is down. Who knows, maybe one of the others might go down in the near of far future. At the moment you get a single error line for every time a call is made to the heads database that is down.

As to not spam the server owner, a change was already made to not log the stacktrace and the response message by default (this can be enabled with a property), but it would be nice to not make calls the problematic database anyway. Therefore it would be nice to have a property to turn off those calls.

[BUG] NPE onEnable

Spigot 1.18.1-3427
HeadsPluginAPI 3.0.0

On server start-up (ie., onEnable HeadsPluginAPI)

[14:20:02] [Craft Scheduler Thread - 1/WARN]: [HeadsPluginAPI] Plugin HeadsPluginAPI v3.0.0 generated an exception while executing task 70
java.lang.NullPointerException: Cannot invoke "java.time.LocalDateTime.plusHours(long)" because the return value of "com.github.cc007.headsplugin.integration.database.entities.CategoryEntity.getLastUpdated()" is null
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.lambda$getCategoriesToBeUpdated$5(CategoryUpdaterImpl.java:101) ~[HeadsPluginAPI-3.0.0.jar:?]
        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:178) ~[?:?]
        at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1707) ~[?:?]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) ~[?:?]
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?]
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.lambda$getCategoriesToBeUpdated$6(CategoryUpdaterImpl.java:103) ~[HeadsPluginAPI-3.0.0.jar:?]
        at com.github.cc007.headsplugin.business.services.ProfilerImpl.lambda$runProfiled$0(ProfilerImpl.java:41) ~[HeadsPluginAPI-3.0.0.jar:?]
        at com.github.cc007.headsplugin.business.services.ProfilerImpl.runProfiled(ProfilerImpl.java:64) ~[HeadsPluginAPI-3.0.0.jar:?]
        at com.github.cc007.headsplugin.business.services.ProfilerImpl.runProfiled(ProfilerImpl.java:41) ~[HeadsPluginAPI-3.0.0.jar:?]
        at com.github.cc007.headsplugin.business.services.ProfilerImpl.runProfiled(ProfilerImpl.java:30) ~[HeadsPluginAPI-3.0.0.jar:?]
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.getCategoriesToBeUpdated(CategoryUpdaterImpl.java:97) ~[HeadsPluginAPI-3.0.0.jar:?]
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.lambda$updateCategoriesIfNecessary$3(CategoryUpdaterImpl.java:70) ~[HeadsPluginAPI-3.0.0.jar:?]
        at com.github.cc007.headsplugin.integration.database.transaction.jpa.JpaNestableTransaction.runTransacted(JpaNestableTransaction.java:109) ~[HeadsPluginAPI-3.0.0.jar:?]
        at com.github.cc007.headsplugin.integration.database.transaction.jpa.JpaNestableTransaction.runTransacted(JpaNestableTransaction.java:82) ~[HeadsPluginAPI-3.0.0.jar:?]
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.lambda$updateCategoriesIfNecessary$4(CategoryUpdaterImpl.java:69) ~[HeadsPluginAPI-3.0.0.jar:?]
        at com.github.cc007.headsplugin.business.services.ProfilerImpl.runProfiled(ProfilerImpl.java:64) ~[HeadsPluginAPI-3.0.0.jar:?]
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.updateCategoriesIfNecessary(CategoryUpdaterImpl.java:67) ~[HeadsPluginAPI-3.0.0.jar:?]
        at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftTask.run(CraftTask.java:82) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3427-Spigot-6edb62f-de95135]
        at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) [spigot-1.18.1-R0.1-SNAPSHOT.jar:3427-Spigot-6edb62f-de95135]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
        at java.lang.Thread.run(Thread.java:833) [?:?]

[CRITICAL BUG] When performing `/headsinv` without arguments, the server crashes due to a timeout

The issue:
When calling /headsinv cat all, /headsinv cat * or /headsinv without arguments, this command will try to fetch all categorized heads from ALL categories. This seems to crash the server due to a timeout.

Solution:

  • add a permission for this specific command, so that players can't maliciously lag or even crash the server
  • optimize the code for fetching the heads. This might need to be done on a separate thread, to not block the main thread.

Add support to latest PaperMC version (1.20.1)

[02:59:29 ERROR]: Error occurred while enabling HeadsPluginAPI v3.1.1 (Is it up to date?)
java.lang.NoSuchMethodError: 'void org.yaml.snakeyaml.constructor.CustomClassLoaderConstructor.(java.lang.ClassLoader)'
at com.github.cc007.headsplugin.dagger.modules.ConfigModule.provideConfigProperties(ConfigModule.java:38) ~[HeadsPluginAPI-3.1.1.jar:?]
at com.github.cc007.headsplugin.dagger.modules.ConfigModule_ProvideConfigPropertiesFactory.provideConfigProperties(ConfigModule_ProvideConfigPropertiesFactory.java:38) ~[HeadsPluginAPI-3.1.1.jar:?]
at com.github.cc007.headsplugin.dagger.modules.ConfigModule_ProvideConfigPropertiesFactory.get(ConfigModule_ProvideConfigPropertiesFactory.java:29) ~[HeadsPluginAPI-3.1.1.jar:?]
at com.github.cc007.headsplugin.dagger.modules.ConfigModule_ProvideConfigPropertiesFactory.get(ConfigModule_ProvideConfigPropertiesFactory.java:11) ~[HeadsPluginAPI-3.1.1.jar:?]
at dagger.internal.DoubleCheck.get(DoubleCheck.java:47) ~[HeadsPluginAPI-3.1.1.jar:?]
at com.github.cc007.headsplugin.dagger.modules.jpa.EntityModule_ProvideQueryServiceFactory.get(EntityModule_ProvideQueryServiceFactory.java:34) ~[HeadsPluginAPI-3.1.1.jar:?]
at com.github.cc007.headsplugin.dagger.modules.jpa.EntityModule_ProvideQueryServiceFactory.get(EntityModule_ProvideQueryServiceFactory.java:12) ~[HeadsPluginAPI-3.1.1.jar:?]
at dagger.internal.DoubleCheck.get(DoubleCheck.java:47) ~[HeadsPluginAPI-3.1.1.jar:?]
at com.github.cc007.headsplugin.dagger.modules.jpa.RepositoryModule_ProvideHeadRepositoryFactory.get(RepositoryModule_ProvideHeadRepositoryFactory.java:39) ~[HeadsPluginAPI-3.1.1.jar:?]
at com.github.cc007.headsplugin.dagger.modules.jpa.RepositoryModule_ProvideHeadRepositoryFactory.get(RepositoryModule_ProvideHeadRepositoryFactory.java:13) ~[HeadsPluginAPI-3.1.1.jar:?]
at dagger.internal.DoubleCheck.get(DoubleCheck.java:47) ~[HeadsPluginAPI-3.1.1.jar:?]
at com.github.cc007.headsplugin.dagger.modules.api.ApiServiceModule_ProvideHeadUpdaterFactory.get(ApiServiceModule_ProvideHeadUpdaterFactory.java:43) ~[HeadsPluginAPI-3.1.1.jar:?]
at com.github.cc007.headsplugin.dagger.modules.api.ApiServiceModule_ProvideHeadUpdaterFactory.get(ApiServiceModule_ProvideHeadUpdaterFactory.java:14) ~[HeadsPluginAPI-3.1.1.jar:?]
at dagger.internal.DoubleCheck.get(DoubleCheck.java:47) ~[HeadsPluginAPI-3.1.1.jar:?]
at com.github.cc007.headsplugin.dagger.modules.api.ApiServiceModule_ProvideCategoryUpdaterFactory.get(ApiServiceModule_ProvideCategoryUpdaterFactory.java:66) ~[HeadsPluginAPI-3.1.1.jar:?]
at com.github.cc007.headsplugin.dagger.modules.api.ApiServiceModule_ProvideCategoryUpdaterFactory.get(ApiServiceModule_ProvideCategoryUpdaterFactory.java:19) ~[HeadsPluginAPI-3.1.1.jar:?]
at dagger.internal.DoubleCheck.get(DoubleCheck.java:47) ~[HeadsPluginAPI-3.1.1.jar:?]
at com.github.cc007.headsplugin.dagger.DaggerHeadsPluginComponent.categoryUpdater(DaggerHeadsPluginComponent.java:281) ~[HeadsPluginAPI-3.1.1.jar:?]
at com.github.cc007.headsplugin.HeadsPlugin.onEnable(HeadsPlugin.java:46) ~[HeadsPluginAPI-3.1.1.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:189) ~[paper-1.20.1.jar:git-Paper-45]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[paper-1.20.1.jar:git-Paper-45]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugin(CraftServer.java:636) ~[paper-1.20.1.jar:git-Paper-45]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugins(CraftServer.java:547) ~[paper-1.20.1.jar:git-Paper-45]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:636) ~[paper-1.20.1.jar:git-Paper-45]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:435) ~[paper-1.20.1.jar:git-Paper-45]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:308) ~[paper-1.20.1.jar:git-Paper-45]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1101) ~[paper-1.20.1.jar:git-Paper-45]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[paper-1.20.1.jar:git-Paper-45]
at java.lang.Thread.run(Thread.java:833) ~[?:?]

Commands please

May we please have the commands returned for HPA 3.x.x

The Overview page says:
NOTE: these commands only work with version 2.x! Right now version 3.x can only be used as a library, like for HeadsInventory or HeadSweeper.
The plugin provides the following /headspluginapi commands (/hpa for short):

  • /headspluginapi (listcategories | listcat | lstcat | list | lst | showcategories | showcat | shwcat | show | shw)

    Show a list of all categories

  • /headspluginapi (update | up | updateheads | uh | uphds) [CATEGORY_NAME]

    Update all or a specific category (requires the headspluginapi.update permission)

HeadPlacer doesn't work correctly in 1.16

Both placehead with an itemstack or a head don't work properly. The head gets placed in the correct spot, but texture isn't correctly set.

This only happens in 1.16. In 1.15.2 there is no problem with the head placement.

NPE with ServerCommandEvent

[00:45:18 ERROR]: Could not pass event ServerCommandEvent to HeadsPluginAPI v2.0.2
java.lang.NullPointerException: null
	at java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011) ~[?:1.8.0_251]
	at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1006) ~[?:1.8.0_251]
	at dev.alangomes.springspigot.context.Context.setSender(Context.java:57) ~[?:?]
	at dev.alangomes.springspigot.context.Context.runWithSender(Context.java:99) ~[?:?]
	at dev.alangomes.springspigot.context.Context.runWithSender(Context.java:139) ~[?:?]
	at dev.alangomes.springspigot.event.SpringEventExecutor.lambda$create$1(SpringEventExecutor.java:25) ~[?:?]
	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.15.2.jar:git-Paper-353]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.15.2.jar:git-Paper-353]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.15.2.jar:git-Paper-353]
	at net.minecraft.server.v1_15_R1.CommandDispatcher.dispatchServerCommand(CommandDispatcher.java:132) ~[patched_1.15.2.jar:git-Paper-353]
	at net.minecraft.server.v1_15_R1.CommandBlockListenerAbstract.a(CommandBlockListenerAbstract.java:120) ~[patched_1.15.2.jar:git-Paper-353]
	at net.minecraft.server.v1_15_R1.BlockCommand.a(BlockCommand.java:96) ~[patched_1.15.2.jar:git-Paper-353]
	at net.minecraft.server.v1_15_R1.BlockCommand.tick(BlockCommand.java:83) ~[patched_1.15.2.jar:git-Paper-353]
	at net.minecraft.server.v1_15_R1.IBlockData.a(IBlockData.java:218) ~[patched_1.15.2.jar:git-Paper-353]
	at net.minecraft.server.v1_15_R1.WorldServer.b(WorldServer.java:777) ~[patched_1.15.2.jar:git-Paper-353]
	at com.destroystokyo.paper.server.ticklist.PaperTickList.tick(PaperTickList.java:296) ~[patched_1.15.2.jar:git-Paper-353]
	at net.minecraft.server.v1_15_R1.TickListServer.b(TickListServer.java:46) ~[patched_1.15.2.jar:git-Paper-353]
	at net.minecraft.server.v1_15_R1.WorldServer.doTick(WorldServer.java:444) ~[patched_1.15.2.jar:git-Paper-353]
	at net.minecraft.server.v1_15_R1.MinecraftServer.b(MinecraftServer.java:1327) ~[patched_1.15.2.jar:git-Paper-353]
	at net.minecraft.server.v1_15_R1.DedicatedServer.b(DedicatedServer.java:431) ~[patched_1.15.2.jar:git-Paper-353]
	at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:1181) ~[patched_1.15.2.jar:git-Paper-353]
	at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:970) ~[patched_1.15.2.jar:git-Paper-353]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_251]

403 on heads update request

Spigot 1.18.2 or Paper 1.18.2
HeadsPluginAPI 3.0.2

On server start-up

[07:51:36] [Craft Scheduler Thread - 5/WARN]: [HeadsPluginAPI] Plugin HeadsPluginAPI v3.0.2 generated an exception while executing task 61
feign.FeignException$Forbidden: [403 Forbidden] during [GET] to [https://minecraft-heads.com/scripts/api.php?cat=animals] [MinecraftHeadsClient#getCategory(String)]: [<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
<!--[if IE 8]>    <html class="no-... (13529 bytes)]
        at feign.FeignException.clientErrorStatus(FeignException.java:199) ~[HeadsPluginAPI-3.0.2.jar:?]
        at feign.FeignException.errorStatus(FeignException.java:177) ~[HeadsPluginAPI-3.0.2.jar:?]
        at feign.FeignException.errorStatus(FeignException.java:169) ~[HeadsPluginAPI-3.0.2.jar:?]
        at feign.codec.ErrorDecoder$Default.decode(ErrorDecoder.java:92) ~[HeadsPluginAPI-3.0.2.jar:?]
        at feign.AsyncResponseHandler.handleResponse(AsyncResponseHandler.java:96) ~[HeadsPluginAPI-3.0.2.jar:?]
        at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:138) ~[HeadsPluginAPI-3.0.2.jar:?]
        at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:89) ~[HeadsPluginAPI-3.0.2.jar:?]
        at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100) ~[HeadsPluginAPI-3.0.2.jar:?]
        at jdk.proxy18.$Proxy126.getCategory(Unknown Source) ~[?:?]
        at com.github.cc007.headsplugin.integration.daos.MinecraftHeadsDao.getCategoryHeads(MinecraftHeadsDao.java:40) ~[HeadsPluginAPI-3.0.2.jar:?]
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.lambda$requestCategoryHeads$8(CategoryUpdaterImpl.java:135) ~[HeadsPluginAPI-3.0.2.jar:?]
        at java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:180) ~[?:?]
        at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169) ~[?:?]
        at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1707) ~[?:?]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) ~[?:?]
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?]
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.requestCategoryHeads(CategoryUpdaterImpl.java:133) ~[HeadsPluginAPI-3.0.2.jar:?]
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.lambda$updateCategories$7(CategoryUpdaterImpl.java:113) ~[HeadsPluginAPI-3.0.2.jar:?]
        at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.updateCategories(CategoryUpdaterImpl.java:112) ~[HeadsPluginAPI-3.0.2.jar:?]
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.lambda$updateCategoriesIfNecessary$3(CategoryUpdaterImpl.java:71) ~[HeadsPluginAPI-3.0.2.jar:?]
        at com.github.cc007.headsplugin.integration.database.transaction.jpa.JpaNestableTransaction.runTransacted(JpaNestableTransaction.java:108) ~[HeadsPluginAPI-3.0.2.jar:?]
        at com.github.cc007.headsplugin.integration.database.transaction.jpa.JpaNestableTransaction.runTransacted(JpaNestableTransaction.java:81) ~[HeadsPluginAPI-3.0.2.jar:?]
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.lambda$updateCategoriesIfNecessary$4(CategoryUpdaterImpl.java:68) ~[HeadsPluginAPI-3.0.2.jar:?]
        at com.github.cc007.headsplugin.business.services.ProfilerImpl.runProfiled(ProfilerImpl.java:64) ~[HeadsPluginAPI-3.0.2.jar:?]
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.updateCategoriesIfNecessary(CategoryUpdaterImpl.java:66) ~[HeadsPluginAPI-3.0.2.jar:?]
        at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftTask.run(CraftTask.java:82) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3484-Spigot-b6d12d1-7bc728a]
        at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) [spigot-1.18.2-R0.1-SNAPSHOT.jar:3484-Spigot-b6d12d1-7bc728a]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
        at java.lang.Thread.run(Thread.java:833) [?:?]

GameProfile now requires both the id and name

Issue

A user of the puglin found an issue on a PurpurMC 1.20.2 server (version 2074)

afbeelding

Cause

It seems that Mojang changes something in their GameProfile class:
In Mojang authlib version 4.0.43:

public GameProfile(final UUID id, final String name) {
    this.properties = new PropertyMap();
    if (id == null && StringUtils.isBlank((CharSequence)name)) {
        throw new IllegalArgumentException("Name and ID cannot both be blank");
    }
    this.id = id;
    this.name = name;
}

In authlib version 5.0.47 (the version in your Purpur server):

public GameProfile(final UUID id, final String name) {
    this.properties = new PropertyMap();
    this.id = Objects.requireNonNull(id, "Profile ID must not be null");
    this.name = Objects.requireNonNull(name, "Profile name must not be null");
}

To summarize the changes: In the old version id OR name had to be filled in (both is fine too). In the new version id AND name have to be provided. I only provided the id, so that's why it works for the old version, but breaks in the new version.

Versions

Minecraft version: 1.20.2, using purpur 2074
Java version: 17
HeadsPluginAPI version: 3.2.0
HeadsInventory version: 1.11.1

Double logging

In addition, Spring injects extraneous logging. Some log entries from (other) plugins are duplicated in the log, once with preceding > marker -- as though they were commands -- then without. Examples:

>[01:27:47] [Server thread/INFO]: [ServerListPlus] [Core] ServerListPlus profile is enabled!
[01:27:47] [Server thread/INFO]: [ServerListPlus] [Core] ServerListPlus profile is enabled!
>[01:28:04] [Server thread/INFO]: CONSOLE issued server command: /essentials:weather world_yellowdog storm 111
[01:28:04] [Server thread/INFO]: CONSOLE issued server command: /essentials:weather world_yellowdog storm 111

Originally posted by @SlimeDog in #1 (comment)

Logging interference

Spigot 1.16.1
HeadsPluginAPI 2.0.5

HeadsPluginAPI has introduced some sort of interference that wreaks havoc on my logs. No doubt it originates with Spring, but it means that I still cannot use the Heads suite.

Conflicting class loading

A combination of Multiverse 4.1.0 and zPermissions 1.5 causes the following error on startup.

[17:35:57 INFO]: [HeadsPluginAPI] Enabling HeadsPluginAPI v2.0.6
[17:36:00 WARN]: [HeadsPluginAPI] Loaded class javax.persistence.EntityManagerFactory from zPermissions v1.5-SNAPSHOT which is not a depend, softdepend or loadbefore of this plugin.
[17:36:01 INFO]: 
 _    _                   _        _____   _                _                    _____  _____
| |  | |                 | |      |  __ \ | |              (_)            /\    |  __ \|_   _|
| |__| |  ___   __ _   __| | ___  | |__) || | _   _   __ _  _  _ __      /  \   | |__) | | |
|  __  | / _ \ / _` | / _` |/ __| |  ___/ | || | | | / _` || || '_ \    / /\ \  |  ___/  | |
| |  | ||  __/| (_| || (_| |\__ \ | |     | || |_| || (_| || || | | |  / ____ \ | |     _| |_
|_|  |_| \___| \__,_| \__,_||___/ |_|     |_| \__,_| \__, ||_||_| |_| /_/    \_\|_|    |_____|
 _________________________________________________    __/ |  ________________________________
|_________________________________________________|  |___/  |________________________________|

 :: HeadsPluginAPI - version 2.0.6 ::

[17:36:01 INFO]: No active profile set, falling back to default profiles: default
[17:36:02 WARN]: [HeadsPluginAPI] Loaded class net.milkbowl.vault.economy.Economy from Vault v1.7.3-b131 which is not a depend, softdepend or loadbefore of this plugin.
[17:36:02 INFO]: Bootstrapping Spring Data JPA repositories in DEFAULT mode.
[17:36:02 INFO]: Finished Spring Data repository scanning in 251ms. Found 5 JPA repository interfaces.
[17:36:03 INFO]: BeanFactory id=ef61a8c4-5e20-3877-8932-c9c0e3e91fbd
[17:36:05 INFO]: HHH000204: Processing PersistenceUnitInfo [name: default]
[17:36:05 INFO]: HHH000412: Hibernate ORM core version [WORKING]
[17:36:05 WARN]: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode;
[17:36:05 INFO]: 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
[17:36:05 ERROR]: 

***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    org.hibernate.jpa.boot.internal.PersistenceUnitInfoDescriptor.getValidationMode(PersistenceUnitInfoDescriptor.java:88)

The following method did not exist:

    javax.persistence.spi.PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode;

The method's class, javax.persistence.spi.PersistenceUnitInfo, is available from the following locations:

    jar:file:/D:/Projects/Java/Minecraft/Servers/heads/plugins/HeadsPluginAPI-2.0.6.jar!/javax/persistence/spi/PersistenceUnitInfo.class

It was loaded from the following location:

    file:/D:/Projects/Java/Minecraft/Servers/heads/plugins/zPermissions-1.5-SNAPSHOT.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of javax.persistence.spi.PersistenceUnitInfo

Failed to execute CommandLineRunner when freshcoal returns 502

Hi, I just got the plugin recently and loaded it into my server with HeadsInventory.

At the moment, freshcoal.com is down with a 502 Bad Gateway so I am currently receiving this error.

[14:08:15] [Server thread/ERROR]: Got response with status code: 502 (Bad Gateway)
[14:08:15] [Server thread/ERROR]: For request: https://freshcoal.com/mainapi.php?query=mobs
[14:08:15] [Server thread/ERROR]: Request headers:
[14:08:15] [Server thread/ERROR]: Response headers:
 - connection: keep-alive
 - content-length: 181
 - content-type: text/html
 - date: Sun, 19 Jul 2020 04:11:10 GMT
 - server: nginx/1.4.6 (Ubuntu)
[14:08:15] [Server thread/ERROR]: Body:
<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.4.6 (Ubuntu)</center>
</body>
</html>

[14:08:15] [Server thread/INFO]:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
[14:08:15] [Server thread/INFO]: Closing JPA EntityManagerFactory for persistence unit 'default'
[14:08:15] [Server thread/INFO]: HikariPool-1 - Shutdown initiated...
[14:08:15] [Server thread/INFO]: HikariPool-1 - Shutdown completed.
[14:08:15] [Server thread/ERROR]: Application run failed
java.lang.IllegalStateException: Failed to execute CommandLineRunner
        at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:787) [HeadsPluginAPI-2.0.4.jar:?]
        at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:768) [HeadsPluginAPI-2.0.4.jar:?]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:322) [HeadsPluginAPI-2.0.4.jar:?]
        at com.github.cc007.headsplugin.HeadsPlugin.onEnable(HeadsPlugin.java:88) [HeadsPluginAPI-2.0.4.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) [spigot.jar:git-Spigot-a99063f-be6aaf0]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:351) [spigot.jar:git-Spigot-a99063f-be6aaf0]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) [spigot.jar:git-Spigot-a99063f-be6aaf0]
        at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugin(CraftServer.java:464) [spigot.jar:git-Spigot-a99063f-be6aaf0]
        at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugins(CraftServer.java:378) [spigot.jar:git-Spigot-a99063f-be6aaf0]
        at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:457) [spigot.jar:git-Spigot-a99063f-be6aaf0]
        at net.minecraft.server.v1_15_R1.DedicatedServer.init(DedicatedServer.java:274) [spigot.jar:git-Spigot-a99063f-be6aaf0]
        at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:784) [spigot.jar:git-Spigot-a99063f-be6aaf0]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_151]
Caused by: feign.FeignException$BadGateway: [502 Bad Gateway] during [GET] to [https://freshcoal.com/mainapi.php?query=mobs] [FreshCoalClient#getCategory(String)]: []
        at feign.FeignException.serverErrorStatus(FeignException.java:235) ~[HeadsPluginAPI-2.0.4.jar:?]
        at feign.FeignException.errorStatus(FeignException.java:180) ~[HeadsPluginAPI-2.0.4.jar:?]
        at feign.FeignException.errorStatus(FeignException.java:169) ~[HeadsPluginAPI-2.0.4.jar:?]
        at feign.codec.ErrorDecoder$Default.decode(ErrorDecoder.java:92) ~[HeadsPluginAPI-2.0.4.jar:?]
        at com.github.cc007.headsplugin.config.feign.statuscodes.StatusCodeHandlingErrorDecoder.decode(StatusCodeHandlingErrorDecoder.java:49) ~[HeadsPluginAPI-2.0.4.jar:?]
        at feign.AsyncResponseHandler.handleResponse(AsyncResponseHandler.java:96) ~[HeadsPluginAPI-2.0.4.jar:?]
        at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:138) ~[HeadsPluginAPI-2.0.4.jar:?]
        at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:89) ~[HeadsPluginAPI-2.0.4.jar:?]
        at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100) ~[HeadsPluginAPI-2.0.4.jar:?]
        at com.sun.proxy.$Proxy129.getCategory(Unknown Source) ~[?:?]
        at com.github.cc007.headsplugin.integration.daos.heads.FreshCoalDao.getCategoryHeads(FreshCoalDao.java:38) ~[HeadsPluginAPI-2.0.4.jar:?]
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.lambda$requestCategoryHeads$3(CategoryUpdaterImpl.java:146) ~[HeadsPluginAPI-2.0.4.jar:?]
        at java.util.stream.ReferencePipeline$7$1.accept(Unknown Source) ~[?:1.8.0_151]
        at java.util.HashMap$EntrySpliterator.forEachRemaining(Unknown Source) ~[?:1.8.0_151]
        at java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[?:1.8.0_151]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[?:1.8.0_151]
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source) ~[?:1.8.0_151]
        at java.util.stream.AbstractPipeline.evaluate(Unknown Source) ~[?:1.8.0_151]
        at java.util.stream.ReferencePipeline.collect(Unknown Source) ~[?:1.8.0_151]
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.requestCategoryHeads(CategoryUpdaterImpl.java:148) ~[HeadsPluginAPI-2.0.4.jar:?]
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.updateCategory(CategoryUpdaterImpl.java:126) ~[HeadsPluginAPI-2.0.4.jar:?]
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.lambda$updateCategories$2(CategoryUpdaterImpl.java:121) ~[HeadsPluginAPI-2.0.4.jar:?]
        at java.util.HashMap.forEach(Unknown Source) ~[?:1.8.0_151]
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.updateCategories(CategoryUpdaterImpl.java:119) ~[HeadsPluginAPI-2.0.4.jar:?]
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl.updateCategoriesIfNecessary(CategoryUpdaterImpl.java:79) ~[HeadsPluginAPI-2.0.4.jar:?]
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl$$FastClassBySpringCGLIB$$f21ad011.invoke(<generated>) ~[?:?]
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) ~[HeadsPluginAPI-2.0.4.jar:?]
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:771) ~[HeadsPluginAPI-2.0.4.jar:?]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[HeadsPluginAPI-2.0.4.jar:?]
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) ~[HeadsPluginAPI-2.0.4.jar:?]
        at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88) ~[HeadsPluginAPI-2.0.4.jar:?]
        at com.github.cc007.headsplugin.config.aspects.profiler.ProfilerAspect.handleStatusCodes(ProfilerAspect.java:20) ~[HeadsPluginAPI-2.0.4.jar:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_151]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_151]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_151]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_151]
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644) ~[HeadsPluginAPI-2.0.4.jar:?]
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633) ~[HeadsPluginAPI-2.0.4.jar:?]
        at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70) ~[HeadsPluginAPI-2.0.4.jar:?]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175) ~[HeadsPluginAPI-2.0.4.jar:?]
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) ~[HeadsPluginAPI-2.0.4.jar:?]
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:366) ~[HeadsPluginAPI-2.0.4.jar:?]
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:118) ~[HeadsPluginAPI-2.0.4.jar:?]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[HeadsPluginAPI-2.0.4.jar:?]
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) ~[HeadsPluginAPI-2.0.4.jar:?]
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:95) ~[HeadsPluginAPI-2.0.4.jar:?]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[HeadsPluginAPI-2.0.4.jar:?]
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) ~[HeadsPluginAPI-2.0.4.jar:?]
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691) ~[HeadsPluginAPI-2.0.4.jar:?]
        at com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl$$EnhancerBySpringCGLIB$$4ddeec22.updateCategoriesIfNecessary(<generated>) ~[?:?]
        at com.github.cc007.headsplugin.presentation.startup.StartupCategoryUpdater.run(StartupCategoryUpdater.java:20) ~[HeadsPluginAPI-2.0.4.jar:?]
        at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:784) ~[HeadsPluginAPI-2.0.4.jar:?]
        ... 12 more

In the case that the API endpoint is down like this, is it possible for you to implement that the plugin can still be loaded and used (with the other available databases like minecraftheads/mineskin) despite one of sites being down?

Reenable Freshcoal search

The freshcoal website is back online, so it is possible enable freshcoal searches again by default.

Performance issues

When updating categories, it takes very long (sometimes >20m) for all updates to be done. In the past in version 1 and 2 of this plugin this didn't take this long.

Try to find the root cause for the low performance of this update.

HeadsPluginAPI 2.0.9 fails to properly enable on Paper 1.16.3-204

Preface:

I am able to use this plugin successfully using the same setup on a local test server. The config files are completely untouched and default. I could imagine it is an issue regarding my server host (non-dedicated, shared node); however, the plugin was working temporarily on 1.16.1, so I actually have no idea. I hope the below error log may shed some light onto the situation:

27.09 08:52:03 [Server] INFO [HeadsPluginAPI] Enabling HeadsPluginAPI v2.0.9
27.09 08:52:03 [Server] WARN [HeadsPluginAPI] Loaded class kotlin.Metadata from PolyPvP v2.0 which is not a depend, softdepend or loadbefore of this plugin.
27.09 08:52:03 [Server] WARN [HeadsPluginAPI] Loaded class javax.inject.Provider from PerWorldInventory v2.3.2 which is not a depend, softdepend or loadbefore of this plugin.
27.09 08:52:04 [Server] INFO _    _                   _        _____   _                _                    _____  _____
27.09 08:52:04 [Server] INFO | |  | |                 | |      |  __ \ | |              (_)            /\    |  __ \|_   _|
27.09 08:52:04 [Server] INFO | |__| |  ___   __ _   __| | ___  | |__) || | _   _   __ _  _  _ __      /  \   | |__) | | |
27.09 08:52:04 [Server] INFO |  __  | / _ \ / _` | / _` |/ __| |  ___/ | || | | | / _` || || '_ \    / /\ \  |  ___/  | |
27.09 08:52:04 [Server] INFO | |  | ||  __/| (_| || (_| |\__ \ | |     | || |_| || (_| || || | | |  / ____ \ | |     _| |_
27.09 08:52:04 [Server] INFO |_|  |_| \___| \__,_| \__,_||___/ |_|     |_| \__,_| \__, ||_||_| |_| /_/    \_\|_|    |_____|
27.09 08:52:04 [Server] INFO _________________________________________________    __/ |  ________________________________
27.09 08:52:04 [Server] INFO |_________________________________________________|  |___/  |________________________________|
27.09 08:52:04 [Server] Startup :: HeadsPluginAPI - version 2.0.9 ::
27.09 08:52:04 [Server] INFO [org.springframework.boot.SpringApplication] No active profile set, falling back to default profiles: default
27.09 08:52:04 [Server] WARN [HeadsPluginAPI] Loaded class net.milkbowl.vault.economy.Economy from Vault v1.7.3-b131 which is not a depend, softdepend or loadbefore of this plugin.
27.09 08:52:04 [Server] INFO [org.springframework.data.repository.config.RepositoryConfigurationDelegate] Bootstrapping Spring Data JPA repositories in DEFAULT mode.
27.09 08:52:04 [Server] INFO [org.springframework.data.repository.config.RepositoryConfigurationDelegate] Finished Spring Data repository scanning in 125ms. Found 5 JPA repository interfaces.
27.09 08:52:05 [Server] INFO [org.springframework.cloud.context.scope.GenericScope] BeanFactory id=fc412a0a-80bc-380b-817a-c7f59ae0faf4
27.09 08:52:05 [Server] WARN [org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
27.09 08:52:05 [Server] INFO [org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener] 
27.09 08:52:05 [Server] INFO Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
27.09 08:52:05 [Server] ERROR [org.springframework.boot.SpringApplication] Application run failed
27.09 08:52:05 [Server] INFO org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
27.09 08:52:05 [Server] INFO at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:156) ~[?:?]
27.09 08:52:05 [Server] INFO at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544) ~[?:?]
27.09 08:52:05 [Server] INFO at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[?:?]
27.09 08:52:05 [Server] INFO at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[?:?]
27.09 08:52:05 [Server] INFO at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[?:?]
27.09 08:52:05 [Server] INFO at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[?:?]
27.09 08:52:05 [Server] INFO at com.github.cc007.headsplugin.HeadsPlugin.onEnable(HeadsPlugin.java:88) ~[?:?]
27.09 08:52:05 [Server] INFO at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[patched_1.16.3.jar:git-Paper-203]
27.09 08:52:05 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:380) ~[patched_1.16.3.jar:git-Paper-203]
27.09 08:52:05 [Server] INFO at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483) ~[patched_1.16.3.jar:git-Paper-203]
27.09 08:52:05 [Server] INFO at org.bukkit.craftbukkit.v1_16_R2.CraftServer.enablePlugin(CraftServer.java:501) ~[patched_1.16.3.jar:git-Paper-203]
27.09 08:52:05 [Server] INFO at org.bukkit.craftbukkit.v1_16_R2.CraftServer.enablePlugins(CraftServer.java:415) ~[patched_1.16.3.jar:git-Paper-203]
27.09 08:52:05 [Server] INFO at net.minecraft.server.v1_16_R2.MinecraftServer.loadWorld(MinecraftServer.java:468) ~[patched_1.16.3.jar:git-Paper-203]
27.09 08:52:05 [Server] INFO at net.minecraft.server.v1_16_R2.DedicatedServer.init(DedicatedServer.java:237) ~[patched_1.16.3.jar:git-Paper-203]
27.09 08:52:05 [Server] INFO at net.minecraft.server.v1_16_R2.MinecraftServer.w(MinecraftServer.java:939) ~[patched_1.16.3.jar:git-Paper-203]
27.09 08:52:05 [Server] INFO at net.minecraft.server.v1_16_R2.MinecraftServer.lambda$a$0(MinecraftServer.java:177) ~[patched_1.16.3.jar:git-Paper-203]
27.09 08:52:05 [Server] INFO at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
27.09 08:52:05 [Server] INFO Caused by: org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
27.09 08:52:05 [Server] INFO at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getWebServerFactory(ServletWebServerApplicationContext.java:203) ~[?:?]
27.09 08:52:05 [Server] INFO at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:179) ~[?:?]
27.09 08:52:05 [Server] INFO at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:153) ~[?:?]
27.09 08:52:05 [Server] INFO ... 16 more

Remove dependency on NBT API

Since mc 1.18 there is a new PlayerProfile api in Bukkit, that isn't version dependent. This would eliminate the need for the highly version dependent NBT API library.

Goal is to change the code so that it uses PlayerProfile instead of NBT API.

Give a more specific message when a category tries to update itself after the database has been closed when stopping the server

See logs.

TLDR: when a category is being updated, but the server is stopped at the same time, the database will be closed and the following error will be thrown:

[11:59:46] [Craft Scheduler Thread - 11 - HeadsPluginAPI/WARN]: [HeadsPluginAPI] Plugin HeadsPluginAPI v3.2.0 generated an exception while executing task 39 
    org.apache.openjpa.persistence.PersistenceException: connection exception: closed { <sql statement> } 
    <stacktrace>

It would be nice if this exception was caught and only a warning was logged regarding being unable to finish updating the categories.

Updating categories on startup takes too long, causing issues for the server

At the moment the during startup all categories that need an update are scheduled to be updated at the same time. This causes issues for the server so that it can't keep up. One of the users reported the following:

[K[18:05:24 ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH - git-Paper-24 (MC: 1.16.1) ---
[K[18:05:24 ERROR]: The server has not responded for 25 seconds! Creating thread dump
[K[18:05:24 ERROR]: ------------------------------
[K[18:05:24 ERROR]: Server thread dump (Look for plugins here before reporting to Paper!):
[K[18:05:24 ERROR]: ------------------------------
[K[18:05:24 ERROR]: Current Thread: Server thread
[K[18:05:24 ERROR]: PID: 18 | Suspended: false | Native: true | State: RUNNABLE
[K[18:05:24 ERROR]: Stack:
[K[18:05:24 ERROR]: [email protected]/java.net.SocketInputStream.socketRead0(Native Method)
[K[18:05:24 ERROR]: [email protected]/java.net.SocketInputStream.socketRead(SocketInputStream.java:115)
[K[18:05:24 ERROR]: [email protected]/java.net.SocketInputStream.read(SocketInputStream.java:168)
[K[18:05:24 ERROR]: [email protected]/java.net.SocketInputStream.read(SocketInputStream.java:140)
[K[18:05:24 ERROR]: [email protected]/sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:448)
[K[18:05:24 ERROR]: [email protected]/sun.security.ssl.SSLSocketInputRecord.bytesInCompletePacket(SSLSocketInputRecord.java:68)
[K[18:05:24 ERROR]: [email protected]/sun.security.ssl.SSLSocketImpl.readApplicationRecord(SSLSocketImpl.java:1096)
[K[18:05:24 ERROR]: [email protected]/sun.security.ssl.SSLSocketImpl$AppInputStream.read(SSLSocketImpl.java:816)
[K[18:05:24 ERROR]: [email protected]/java.io.BufferedInputStream.fill(BufferedInputStream.java:252)
[K[18:05:24 ERROR]: [email protected]/java.io.BufferedInputStream.read1(BufferedInputStream.java:292)
[K[18:05:24 ERROR]: [email protected]/java.io.BufferedInputStream.read(BufferedInputStream.java:351)
[K[18:05:24 ERROR]: [email protected]/sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:754)
[K[18:05:24 ERROR]: [email protected]/sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:689)
[K[18:05:24 ERROR]: [email protected]/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1610)
[K[18:05:24 ERROR]: [email protected]/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1515)
[K[18:05:24 ERROR]: [email protected]/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)
[K[18:05:24 ERROR]: [email protected]/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:33

While I believe by default the server waits 60 seconds before giving this error, it is of course not the case that the plugin should cause such a long delay.

Therefore it would be best if the update of each category is staggered, just like how category updates are staggered if you use the /hpa update all command.

installing the plugin causes all commands to fail

After installing the plugin, all players get internal error message when sending commands to login (this is the only command they normally have access until they login, thus, we are unable to check for other commands.)

Uninstalling HeadsPluginAPI solves this.

I'll send this short log in which I tried to run the server and immediately had to stop it.
2021-03-18-2.log

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.