Re: [ovirt-users] Upgrade to 4.0.1 failed with NPE on org.postgresql.jdbc.TypeInfoCache.getSQLType

2016-08-03 Thread Martin Perina
Hi,

we support only postgresql packages included in centos:

postgresql-9.2.15-1.el7_2.x86_64
postgresql-libs-9.2.15-1.el7_2.x86_64
postgresql-jdbc-9.2.1002-5.el7.noarch
postgresql-server-9.2.15-1.el7_2.x86_64

This is the postgresql version which we test.

In your special case downgrading postgresql-jdbc package to 9.2 may solve
the issue, but please be aware it's not tested and it may cause other
issues. The only correct way is to use PostgreSQL 9.2.

Martin Perina



On Wed, Aug 3, 2016 at 12:56 PM, Fabrice Bacchella <
fabrice.bacche...@icloud.com> wrote:

> Just a little investigation show :
>
> # lsof -p  | grep postgresql-jdbc.jar
> java2138 ovirt  mem   REG8,2486139 18729421
> /usr/share/java/postgresql-jdbc.jar
>
> rpm -qf /usr/share/java/postgresql-jdbc.jar
> postgresql-jdbc-9.4.1208-1.rhel7.noarch
>
> rpm -qi postgresql-jdbc-9.4.1208-1.rhel7.noarch
> ...
> URL : https://jdbc.postgresql.org/
>
> And indeed I needed to install pgdg-94-centos.repo, my note says the
> package was needed by ovirt, I don't remember why. And indeed :
> yum erase postgresql94-server
> ...
> Removing:
>  postgresql94-server
> x86_64 9.4.8-1PGDG.rhel7
> @pgdg94
> 17 M
> Removing for dependencies:
>  ovirt-engine
> noarch 4.0.1.1-1.el7.centos
> @ovirt-4.0
> 2.6 M
>  ovirt-engine-backend
> noarch 4.0.1.1-1.el7.centos
> @ovirt-4.0
> 13 M
>
> So I tried:
>
> yum downgrade postgresql-jdbc
> ...
> ---> Package postgresql-jdbc.noarch 0:9.2.1002-5.el7 will be a downgrade
> ...
>
> And now it (almost) works. I have other not linked problems that needs
> more investigations.
>
>
> Le 3 août 2016 à 12:39, Martin Perina  a écrit :
>
> Hi,
>
> what is the version of postgresql-jdbc package are you using? I saw this
> error only with latest postgresql-jdbc drivers 9.4-1209, but those are not
> packaged in RPMs AFAIK.
>
> Thanks
>
> Martin Perina
>
>
> On Wed, Aug 3, 2016 at 12:31 PM, Fabrice Bacchella <
> fabrice.bacche...@icloud.com> wrote:
>
>> I'm running on Centos 7, just upgraded to ovirt 4.01 using the procedure
>> given in the release notes.
>>
>> But now I'm getting that in /var/log/ovirt-engine/engine.log:
>>
>> 2016-08-03 12:04:39,751 ERROR [org.ovirt.engine.core.bll.Backend]
>> (ServerService Thread Pool -- 54) [] Error during initialization:
>> org.jboss.weld.exceptions.WeldException: WELD-49: Unable to invoke
>> private void org.ovirt.engine.core.vds
>> broker.ResourceManager.init() on
>> org.ovirt.engine.core.vdsbroker.ResourceManager@28b87a8e
>>at
>> org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:100)
>> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>>at
>> org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.postConstruct(DefaultLifecycleCallbackInvoker.java:81)
>> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>>at
>> org.jboss.weld.injection.producer.BasicInjectionTarget.postConstruct(BasicInjectionTarget.java:126)
>> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>>at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:162)
>> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>>at
>> org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96)
>> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>>at
>> org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:101)
>> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>>at
>> org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.get(ContextualInstanceStrategy.java:141)
>> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>>at
>> org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)
>> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>>at
>> org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:742)
>> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>> ...
>> Caused by: java.lang.reflect.InvocationTargetException
>>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> [rt.jar:1.8.0_92]
>>at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>> [rt.jar:1.8.0_92]
>>at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> [rt.jar:1.8.0_92]
>>at java.lang.reflect.Method.invoke(Method.java:498)
>> [rt.jar:1.8.0_92]
>>at
>> org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:98)
>> 

Re: [ovirt-users] Upgrade to 4.0.1 failed with NPE on org.postgresql.jdbc.TypeInfoCache.getSQLType

2016-08-03 Thread Fabrice Bacchella
Just a little investigation show :

# lsof -p  | grep postgresql-jdbc.jar
java2138 ovirt  mem   REG8,2486139 18729421 
/usr/share/java/postgresql-jdbc.jar

rpm -qf /usr/share/java/postgresql-jdbc.jar
postgresql-jdbc-9.4.1208-1.rhel7.noarch

rpm -qi postgresql-jdbc-9.4.1208-1.rhel7.noarch
...
URL : https://jdbc.postgresql.org/

And indeed I needed to install pgdg-94-centos.repo, my note says the package 
was needed by ovirt, I don't remember why. And indeed :
yum erase postgresql94-server
...
Removing:
 postgresql94-server
  x86_64 9.4.8-1PGDG.rhel7  
  @pgdg94   
  17 M
Removing for dependencies:
 ovirt-engine   
  noarch 4.0.1.1-1.el7.centos   
  @ovirt-4.0
 2.6 M
 ovirt-engine-backend   
  noarch 4.0.1.1-1.el7.centos   
  @ovirt-4.0
  13 M

So I tried:

yum downgrade postgresql-jdbc
...
---> Package postgresql-jdbc.noarch 0:9.2.1002-5.el7 will be a downgrade
...

And now it (almost) works. I have other not linked problems that needs more 
investigations.


> Le 3 août 2016 à 12:39, Martin Perina  a écrit :
> 
> Hi,
> 
> what is the version of postgresql-jdbc package are you using? I saw this 
> error only with latest postgresql-jdbc drivers 9.4-1209, but those are not 
> packaged in RPMs AFAIK.
> 
> Thanks
> 
> Martin Perina
> 
> 
> On Wed, Aug 3, 2016 at 12:31 PM, Fabrice Bacchella 
> > wrote:
> I'm running on Centos 7, just upgraded to ovirt 4.01 using the procedure 
> given in the release notes.
> 
> But now I'm getting that in /var/log/ovirt-engine/engine.log:
> 
> 2016-08-03 12:04:39,751 ERROR [org.ovirt.engine.core.bll.Backend] 
> (ServerService Thread Pool -- 54) [] Error during initialization: 
> org.jboss.weld.exceptions.WeldException: WELD-49: Unable to invoke 
> private void org.ovirt.engine.core.vds
> broker.ResourceManager.init() on 
> org.ovirt.engine.core.vdsbroker.ResourceManager@28b87a8e
>at 
> org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:100)
>  [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>at 
> org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.postConstruct(DefaultLifecycleCallbackInvoker.java:81)
>  [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>at 
> org.jboss.weld.injection.producer.BasicInjectionTarget.postConstruct(BasicInjectionTarget.java:126)
>  [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:162) 
> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96) 
> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>at 
> org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:101)
>  [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>at 
> org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.get(ContextualInstanceStrategy.java:141)
>  [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>at 
> org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50) 
> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>at 
> org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:742) 
> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
> ...
> Caused by: java.lang.reflect.InvocationTargetException
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
> [rt.jar:1.8.0_92]
>at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
> [rt.jar:1.8.0_92]
>at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  [rt.jar:1.8.0_92]
>at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_92]
>at 
> org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:98)
>  [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>... 82 more
> Caused by: java.lang.NullPointerException
>at org.postgresql.jdbc.TypeInfoCache.getSQLType(TypeInfoCache.java:182)
>at org.postgresql.jdbc.TypeInfoCache.getSQLType(TypeInfoCache.java:178)
>at 
> org.postgresql.jdbc.PgDatabaseMetaData.getProcedureColumns(PgDatabaseMetaData.java:1259)
>at 
> 

Re: [ovirt-users] Upgrade to 4.0.1 failed with NPE on org.postgresql.jdbc.TypeInfoCache.getSQLType

2016-08-03 Thread Martin Perina
Hi,

what is the version of postgresql-jdbc package are you using? I saw this
error only with latest postgresql-jdbc drivers 9.4-1209, but those are not
packaged in RPMs AFAIK.

Thanks

Martin Perina


On Wed, Aug 3, 2016 at 12:31 PM, Fabrice Bacchella <
fabrice.bacche...@icloud.com> wrote:

> I'm running on Centos 7, just upgraded to ovirt 4.01 using the procedure
> given in the release notes.
>
> But now I'm getting that in /var/log/ovirt-engine/engine.log:
>
> 2016-08-03 12:04:39,751 ERROR [org.ovirt.engine.core.bll.Backend]
> (ServerService Thread Pool -- 54) [] Error during initialization:
> org.jboss.weld.exceptions.WeldException: WELD-49: Unable to invoke
> private void org.ovirt.engine.core.vds
> broker.ResourceManager.init() on
> org.ovirt.engine.core.vdsbroker.ResourceManager@28b87a8e
>at
> org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:100)
> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>at
> org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.postConstruct(DefaultLifecycleCallbackInvoker.java:81)
> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>at
> org.jboss.weld.injection.producer.BasicInjectionTarget.postConstruct(BasicInjectionTarget.java:126)
> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:162)
> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>at
> org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96)
> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>at
> org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:101)
> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>at
> org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.get(ContextualInstanceStrategy.java:141)
> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>at
> org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)
> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>at
> org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:742)
> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
> ...
> Caused by: java.lang.reflect.InvocationTargetException
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [rt.jar:1.8.0_92]
>at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> [rt.jar:1.8.0_92]
>at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [rt.jar:1.8.0_92]
>at java.lang.reflect.Method.invoke(Method.java:498)
> [rt.jar:1.8.0_92]
>at
> org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:98)
> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>... 82 more
> Caused by: java.lang.NullPointerException
>at
> org.postgresql.jdbc.TypeInfoCache.getSQLType(TypeInfoCache.java:182)
>at
> org.postgresql.jdbc.TypeInfoCache.getSQLType(TypeInfoCache.java:178)
>at
> org.postgresql.jdbc.PgDatabaseMetaData.getProcedureColumns(PgDatabaseMetaData.java:1259)
>at
> org.postgresql.jdbc.PgDatabaseMetaData.getProcedureColumns(PgDatabaseMetaData.java:1040)
>at
> org.springframework.jdbc.core.metadata.GenericCallMetaDataProvider.processProcedureColumns(GenericCallMetaDataProvider.java:353)
> [spring-jdbc.jar:4.2.4.RELEASE]
>at
> org.springframework.jdbc.core.metadata.GenericCallMetaDataProvider.initializeWithProcedureColumnMetaData(GenericCallMetaDataProvider.java:112)
> [spring-jdbc.jar:4.2.4.RELEASE]
>at
> org.springframework.jdbc.core.metadata.CallMetaDataProviderFactory$1.processMetaData(CallMetaDataProviderFactory.java:133)
> [spring-jdbc.jar:4.2.4.RELEASE]
>at
> org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:299)
> [spring-jdbc.jar:4.2.4.RELEASE]
>at
> org.springframework.jdbc.core.metadata.CallMetaDataProviderFactory.createMetaDataProvider(CallMetaDataProviderFactory.java:73)
> [spring-jdbc.jar:4.2.4.RELEASE]
>at
> org.springframework.jdbc.core.metadata.CallMetaDataContext.initializeMetaData(CallMetaDataContext.java:286)
> [spring-jdbc.jar:4.2.4.RELEASE]
>at
> org.springframework.jdbc.core.simple.AbstractJdbcCall.compileInternal(AbstractJdbcCall.java:303)
> [spring-jdbc.jar:4.2.4.RELEASE]
>at
> org.ovirt.engine.core.dal.dbbroker.PostgresDbEngineDialect$PostgresSimpleJdbcCall.compileInternal(PostgresDbEngineDialect.java:108)
> [dal.jar:]
>at
> org.springframework.jdbc.core.simple.AbstractJdbcCall.compile(AbstractJdbcCall.java:288)
> [spring-jdbc.jar:4.2.4.RELEASE]
>at
> org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.getCall(SimpleJdbcCallsHandler.java:169)
> [dal.jar:]
>at
>