Closed wsbrenk closed 4 years ago
today i got this, when starting ho r2644
java.lang.NullPointerException
at core.model.match.MatchStatistics.isOldie(MatchStatistics.java:329)
at core.model.match.MatchStatistics.
It looks like a matchlineupTeam was not found in the database.
could you please copy the error message you got to the github ticket (https://github.com/akasolace/HO/issues/396)
So I will do here: java.lang.NullPointerException at core.model.match.MatchEvent.isSE(MatchEvent.java:897) at core.model.match.MatchEvent.isSpecialtyNonWeatherSE(MatchEvent.java:921) at module.specialEvents.SpecialEventsDM.getEventType(SpecialEventsDM.java:186) at module.specialEvents.SpecialEventsDM.checkForSE(SpecialEventsDM.java:196) at module.specialEvents.SpecialEventsDM.getMatchHighlights(SpecialEventsDM.java:161) at module.specialEvents.SpecialEventsDM.getMatchRows(SpecialEventsDM.java:118) at module.specialEvents.SpecialEventsDM.getRows(SpecialEventsDM.java:35) at module.specialEvents.SpecialEventsPanel.setTableData(SpecialEventsPanel.java:163) at module.specialEvents.SpecialEventsPanel.update(SpecialEventsPanel.java:57) at core.gui.comp.panel.LazyImagePanel.callUpdate(LazyImagePanel.java:155) at core.gui.comp.panel.LazyImagePanel.setNeedsRefresh(LazyImagePanel.java:104) at module.specialEvents.SpecialEventsPanel.initialize(SpecialEventsPanel.java:52) at core.gui.comp.panel.LazyImagePanel.callInitialize(LazyImagePanel.java:145) at core.gui.comp.panel.LazyImagePanel.access$300(LazyImagePanel.java:13) at core.gui.comp.panel.LazyImagePanel$2.hierarchyChanged(LazyImagePanel.java:132) at java.awt.Component.processHierarchyEvent(Component.java:6706) at java.awt.Component.processEvent(Component.java:6325) at java.awt.Container.processEvent(Container.java:2239) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2297) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.Component.createHierarchyEvents(Component.java:5555) at java.awt.Container.createHierarchyEvents(Container.java:1448) at java.awt.Component.show(Component.java:1639) at java.awt.Component.show(Component.java:1671) at java.awt.Component.setVisible(Component.java:1623) at javax.swing.JComponent.setVisible(JComponent.java:2644) at javax.swing.JTabbedPane.fireStateChanged(JTabbedPane.java:394) at javax.swing.JTabbedPane$ModelListener.stateChanged(JTabbedPane.java:270) at javax.swing.DefaultSingleSelectionModel.fireStateChanged(DefaultSingleSelectionModel.java:132) at javax.swing.DefaultSingleSelectionModel.setSelectedIndex(DefaultSingleSelectionModel.java:67) at javax.swing.JTabbedPane.setSelectedIndexImpl(JTabbedPane.java:616) at javax.swing.JTabbedPane.setSelectedIndex(JTabbedPane.java:591) at javax.swing.plaf.basic.BasicTabbedPaneUI$Handler.mousePressed(BasicTabbedPaneUI.java:3647) at javax.swing.plaf.synth.SynthTabbedPaneUI$1.mousePressed(SynthTabbedPaneUI.java:312) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.Component.processMouseEvent(Component.java:6536) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6304) at java.awt.Container.processEvent(Container.java:2239) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2297) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4532) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476) at java.awt.Container.dispatchEventImpl(Container.java:2283) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84) at java.awt.EventQueue$4.run(EventQueue.java:733) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.awt.EventQueue.dispatchEvent(EventQueue.java:730) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
@akasolace It looks like Effey09 is suffering from an unknown MatchEventId. I tried a fix that I pushed into the current pr. please have a look on it.
today i found another bug which stops the download of match data if there is a match with verlegenheitstruppe in the list. maybe this may cause some consequential errors;-(
@akasolace the fix is in the current pull request
java.lang.NullPointerException
at module.lineup.Lineup.UpdateLineupWithMatchOrder(Lineup.java:1998)
at core.rating.RatingPredictionManager.setLineupEvolution(RatingPredictionManager.java:191)
at core.rating.RatingPredictionManager.
npe position swap of player which is no longer in lineup. fix is in current pull request.
@akasolace It looks like Effey09 is suffering from an unknown MatchEventId. I tried a fix that I pushed into the current pr. please have a look on it.
@wsbrenk Can you please give me the matchID in which this issue is raised?
@wsbrenk If I understand correctly (sorry just back from holliday) but this is fixed by 699a604 (your latest PR) but a long term solution is to map the matcheventID, right ?
@akasolace I'm glad to see you back. I hope you had a nice break. at first i thought that these messages would refer to the same origin. it is not so. i think we have to decide if we want to patch release 2.1 or fix everything in version 3. in the first case we have to sort my fixes again accordingly.
Can you please give me the matchID in which this issue is raised?
of course! i think there were two or three ids in the matches i tested. if you have a look at my proposed fix, there should be an easy way to log the unknown event ids.
If I understand correctly (sorry just back from holliday) but this is fixed by 699a604 (your latest PR) but a long term solution is to map the matcheventID, right ?
concerning the two first npes i'm not sure. could be, that they are followings errors of the other but even the first one, you should have a look on it. it is a complex join query of match event ids which deliver a null result set.
@akasolace i added the log. it gives this output:
[Debug] MatchEventID: UNKNOWN_MATCHEVENT: 803 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 497 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 804 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 803 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 497 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 804 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 802 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 496 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 802 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 496 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 802 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 497 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 802 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 497 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 803 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 803 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 802 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 802 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 550
since the hts could come up with new event ids whenever they want, we should stay with an UNKNOWN_MATCHEVENT. additionally we should map the ids we found. do not know if anyone of the given numbers would be a candidate to skip the isSE function.
@wsbrenk ok I see, indeed we should clearly stay with an UNKNOWN_MATCHEVENT
I am supprised by the UNKNOWN_MATCHEVENT: 550 because this one is not even referenced in the API documentation, otherwise I will map the other events
I guess, this would justify a 2.2 release
@wsbrenk do you have by anychance a database with those problematic matchID, personally I do not have any ... I am especially interested in the matchEventID 550.
i did shorten the log, there were approx 100 more lines with only 550. no idea what that is, maybe an ancient id which is not used anymore??
as i joined with matchdetails i found that they all happened between 2008 and 2012
@wsbrenk ok then indeed I guess it is an anicen matchID. For curiosity if you can find / provide one of those matchID (I mean one of the game in which MATCHID 550 happened). I would like to see how HT match it now ? is it still 550 or maybe it was an error within HO at the time.
I guess, this would justify a 2.2 release
I confirm that, but then we have to pick out the commits that have nothing to do with the current merge for version 3.0.
from 699a60490b442d6c1b9fd01c248092452d22e94c I will pick change made to src/main/java/core/model/match/MatchEvent.java and change made to src/main/java/core/net/OnlineWorker.java, right ?
https://www.hattrick.org/Club/Matches/Match.aspx?matchID=269417699&SourceSystem=Hattrick
@wsbrenk There is no matchEvent 550 in that game .... hence, it was an HO error, at which minute do you have it in your database ?
minute 134, i think the 550er were replaced by other ids and ho didn't replace them
from 699a604 I will pick change made to src/main/java/core/model/match/MatchEvent.java and change made to src/main/java/core/net/OnlineWorker.java, right ?
that's correct!
minute 134, i think the 550er were replaced by other ids and ho didn't replace them
indeed it is 599 is indicating match finished
I will try to fix this one, ideally it should be by changing matchEventID in the database 550 => 599, that would be one more DB version thought
couldn't it be the ratings of the best and worst players. i think there were more than one 550er per match and the attributes would better fit to it than end of match.
@akasolace concerning the first npe of this ticket, did you check the method fillMatchesOverviewChanceRow if there could still be a npe even if we fix the match_event_ids.
maybe the subtypes could deliver an empty or null string and the sql query gets corrupt (empty IN clause).
couldn't it be the ratings of the best and worst players. i think there were more than one 550er per match and the attributes would better fit to it than end of match.
ok in doubt I will leave it as is for the time being
@akasolace concerning the first npe of this ticket, did you check the method fillMatchesOverviewChanceRow if there could still be a npe even if we fix the match_event_ids.
maybe the subtypes could deliver an empty or null string and the sql query gets corrupt (empty IN clause).
I think that method should be fine ..
@wsbrenk cherry pick from 699a604 changes made to to src/main/java/core/net/OnlineWorker.java (@wsbrenk there is a lot of conflict changes, should I take all Online worker or is there a smaller patch(few lines) I need to integrate, also what exactly download matches of Verlegenheitstruppe 08/15
refers to ? which bug ID?
(@wsbrenk there is a lot of conflict changes,...
@akasolace sorry, my mistake. this change did belong to the feature#299 branch which was merge by you after release 2.1, so you should not merge it to your stable branch. i will correct my comment above.
@wsbrenk ok
closed by 699a60490b442d6c1b9fd01c248092452d22e94c and by 61e4592a1c46455a695c50d7d4514e0cefa20645
I also have the NPE with latest (pre-release) build on MacOS (taken from https://github.com/akasolace/HO/releases) with exactly the same stacktrace.
The precise version is HO_2.2.0.2639_macOS
Hi! I have just installed HO-2.2.0.2639 and still get this error in Matches tab. Ubuntu 19.10
java.lang.NullPointerException
at core.db.MatchesOverviewQuery.fillMatchesOverviewChanceRow(MatchesOverviewQuery.java:164)
at core.db.MatchesOverviewQuery.getChancesStat(MatchesOverviewQuery.java:142)
at core.db.DBManager.getChancesStat(DBManager.java:1286)
at module.matches.statistics.MatchesHighlightsTable.getValues(MatchesHighlightsTable.java:37)
at module.matches.statistics.MatchesHighlightsTable.initModel(MatchesHighlightsTable.java:30)
at module.matches.statistics.MatchesHighlightsTable.
@netmaniac @masher82 can one of you (or both of you even better) share its database ? @wsbrenk do you want to look again at this one because it seems we still have an issue ...
@akasolace how to do it?
@akasolace @netmaniac @masher82
in the HO log file should be infos about the sql statement that failed. Could you please check if you find error messages mentioning the class core.db.MatchesOverviewQuery continued by "JDBCAdapter.executeQuery : " + e + "\nStatement: " + Sql + "\n"
would be great if one of you could copy those lines to this ticket.
the log file is found in the hattrick folder under /logs
There are many errors in log file (I see that is from one session). I'm attaching whole log file. HO-2020-03-11.zip
great - thank you
and the message is:
22:02:37 [Error] core.db.JDBCAdapter: JDBCAdapter.executeQuery : java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: MATCH_EVENT_ID Statement: SELECT MATCH_EVENT_ID, COUNT(*) AS C FROM MATCHHIGHLIGHTS JOIN MATCHESKURZINFO ON MATCHHIGHLIGHTS.MATCHID = MATCHESKURZINFO.MATCHID WHERE TEAMID=871690 AND MATCH_EVENT_ID IN(104, 114, 124, 134, 154, 164, 174, 184, 204, 214, 224, 234, 254, 264, 274, 284) GROUP BY MATCH_EVENT_ID java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: MATCH_EVENT_ID at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
other error messages are saying that EVENT_INDEX column is missing too. is there any reason why db update of HO 2.1 is not successfully running on 2.2 installation?
@netmaniac could you please check if the columns MATCH_EVENT_ID and EVENT_INDEX are in your table please select menu Debug -> sql editor enter in the command line: select * from MATCHHIGHLIGHTS and press F5
I have migrated on new computer. Installed HO 2.1, imported old .hrf files and got exceptions in Matches tab. So i have installed dev version - the same. Next I have removed ~/.ho directory, started HO dev version, downloaded once from hattrick.org. Still error on Matches tab. I have ran this query, and no results.
I also do not have those columns running 2.2.0.2639 on MacOS
@akasolace how to do it?
@netmaniac you can either put it here as attachement or share via service like mozilla send ...
I think the question rather is meant as how to retrieve the database content.
@masher82 @netmaniac could you please enter the following sql command to examine your db version: select * from USERCONFIGURATION where config_key like 'DB%'
@wsbrenk I got DBVersion | 26
@akasolace @masher82 @netmaniac i found the error. DbUpdate is OK but the DB-Init not.
@masher82 @netmaniac can you please check the error has been fixed in HO_2.2.0.2642. thank you
From the HO Forum:
Hello
When I try to open 'Matches' tab HO 2.1 returns an error 'java.lang.NullPointerException'. I works on Ubuntu 18.04.4 LTS and have Java in the latest version.