Skip to content

Stacktrace after hardware refresh #11287

@admd

Description

@admd

I deployed new code and after the hardware refresh, I wasn't able to view that server anymore as json parsing was failing, and the following exception was thrown.

Looking bit further, I came to know that hibernate was failing when mapping this part https://github.com/uyuni-project/uyuni/blob/master/java/core/src/main/java/com/redhat/rhn/domain/server/CPU.java#L102

I didn't get the chance to fix it but this is a real bug which needs fixing.

In my case, sample json for this database column was the following

{"family": "ARM", "signature": "Implementor 0x61, Variant 0x0, Architecture 15, Part 0x000, Revision 0", "manufacturer": "Apple"}

Caused by: java.lang.NullPointerException
	at java.lang.Class.isAssignableFrom(Native Method) ~[?:?]
	at com.vladmihalcea.hibernate.type.json.internal.JsonTypeDescriptor.fromString(JsonTypeDescriptor.java:104) ~[hibernate-types-52-2.16.2.jar:?]
	at com.vladmihalcea.hibernate.type.json.internal.JsonTypeDescriptor.wrap(JsonTypeDescriptor.java:165) ~[hibernate-types-52-2.16.2.jar:?]
	at com.vladmihalcea.hibernate.type.json.internal.AbstractJsonSqlTypeDescriptor$1.doExtract(AbstractJsonSqlTypeDescriptor.java:34) ~[hibernate-types-52-2.16.2.jar:?]
	at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:47) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:257) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:253) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:243) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:329) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:3026) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1844) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.loader.Loader.hydrateEntityState(Loader.java:1772) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1745) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.loader.Loader.getRow(Loader.java:1598) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:742) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.loader.Loader.processResultSet(Loader.java:1002) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.loader.Loader.doQuery(Loader.java:960) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:351) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:321) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.loader.Loader.loadEntity(Loader.java:2379) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:64) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.loader.entity.EntityLoader.loadByUniqueKey(EntityLoader.java:144) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.persister.entity.AbstractEntityPersister.loadByUniqueKey(AbstractEntityPersister.java:2370) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.type.EntityType.loadByUniqueKey(EntityType.java:739) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.type.EntityType.resolve(EntityType.java:467) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.engine.internal.TwoPhaseLoad.doInitializeEntity(TwoPhaseLoad.java:205) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.engine.internal.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:160) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:1172) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.loader.Loader.processResultSet(Loader.java:1022) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.loader.Loader.doQuery(Loader.java:960) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:351) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.loader.Loader.doList(Loader.java:2787) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.loader.Loader.doList(Loader.java:2770) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2604) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.loader.Loader.list(Loader.java:2599) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:505) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:395) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:220) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1526) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1598) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1566) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at org.hibernate.query.internal.AbstractProducedQuery.uniqueResult(AbstractProducedQuery.java:1608) ~[hibernate-core-5.3.25.jar:5.3.25.Final]
	at com.redhat.rhn.domain.server.ServerFactory.lookupByIdAndOrg(ServerFactory.java:723) ~[rhn.jar:?]
	at com.redhat.rhn.manager.system.SystemManager.lookupByIdAndUser(SystemManager.java:1610) ~[rhn.jar:?]
	at com.redhat.rhn.frontend.action.systems.sdc.SystemOverviewAction.execute(SystemOverviewAction.java:73) ~[rhn.jar:?]
	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) ~[struts-1.2.9.jar:1.2.9]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions