Closed shodutta92 closed 7 years ago
Unfortunately I have some issues using orianna-hibernate as well. I tried to use MySQL, PostgreSQL and H2, but with all of them I get some kind of errors.
With all of them I get a bunch of errors at the very first start:
Mai 26, 2016 4:44:44 PM org.hibernate.tool.hbm2ddl.DatabaseMetadata getTableMetadata INFO: HHH000262: Table not found: aggregatedstats Mai 26, 2016 4:44:44 PM org.hibernate.tool.hbm2ddl.DatabaseMetadata getTableMetadata INFO: HHH000262: Table not found: basicdata Mai 26, 2016 4:44:44 PM org.hibernate.tool.hbm2ddl.DatabaseMetadata getTableMetadata INFO: HHH000262: Table not found: basicdata_from Mai 26, 2016 4:44:44 PM org.hibernate.tool.hbm2ddl.DatabaseMetadata getTableMetadata INFO: HHH000262: Table not found: basicdata_into Mai 26, 2016 4:44:44 PM org.hibernate.tool.hbm2ddl.DatabaseMetadata getTableMetadata INFO: HHH000262: Table not found: basicdata_map
This goes on for quite a bit. A lot of tables are missing.
From this point there are different errors for each database. For the MySQL I get this one:
https://global.api.pvp.net/api/lol/static-data/euw/v1.2/item?api_key=somekey&itemListData=all Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 753 at com.mysql.cj.mysqla.MysqlaUtils.bitToLong(MysqlaUtils.java:68) at com.mysql.cj.core.io.MysqlTextValueDecoder.decodeBit(MysqlTextValueDecoder.java:231) at com.mysql.cj.jdbc.ResultSetRow.decodeAndCreateReturnValue(ResultSetRow.java:170) at com.mysql.cj.jdbc.ResultSetRow.getValueFromBytes(ResultSetRow.java:269) at com.mysql.cj.jdbc.BufferRow.getValue(BufferRow.java:349) at com.mysql.cj.jdbc.ResultSetImpl.getNonStringValueFromRow(ResultSetImpl.java:813) at com.mysql.cj.jdbc.ResultSetImpl.getBoolean(ResultSetImpl.java:904) at com.mysql.cj.jdbc.ResultSetImpl.getBoolean(ResultSetImpl.java:908) at org.hibernate.type.descriptor.sql.BooleanTypeDescriptor$2.doExtract(BooleanTypeDescriptor.java:71) at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:64) at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:267) at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:263) at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:253) at org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:338) at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2969) at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1696) at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1628) at org.hibernate.loader.Loader.getRow(Loader.java:1515) at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:726) at org.hibernate.loader.Loader.processResultSet(Loader.java:953) at org.hibernate.loader.Loader.doQuery(Loader.java:921) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:355) at org.hibernate.loader.Loader.doList(Loader.java:2554) at org.hibernate.loader.Loader.doList(Loader.java:2540) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2370) at org.hibernate.loader.Loader.list(Loader.java:2365) at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:126) at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1682) at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:380) at org.hibernate.internal.CriteriaImpl.uniqueResult(CriteriaImpl.java:402) at com.robrua.orianna.store.HibernateDB.hibernateGet(HibernateDB.java:609) at com.robrua.orianna.store.HibernateDB.doGet(HibernateDB.java:465) at com.robrua.orianna.store.DataStore.get(DataStore.java:159) at com.robrua.orianna.api.core.StaticDataAPI.getItems(StaticDataAPI.java:270) at com.robrua.orianna.api.core.RiotAPI.getItems(RiotAPI.java:352) at com.robrua.orianna.api.core.GameAPI.getRecentGames(GameAPI.java:28) at com.robrua.orianna.api.core.GameAPI.getRecentGames(GameAPI.java:52) at com.robrua.orianna.api.core.RiotAPI.getRecentGames(RiotAPI.java:1639)
I noticed some errors when setting a database as the datastore using hibernate.
The description and sanitizedDescription fields in Mastery are varchar(255) but some of them exceed that length and throw an error, so those might have to be lengthened.
Also, the column name "full" in Image is a reserved word in Postgres (I know you use Mysql but just an FYI).