Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYAQ9-0002Ty-FY for pgsql-jdbc@arkaria.postgresql.org; Thu, 29 Oct 2020 16:05:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kYAQ8-0000id-Da for pgsql-jdbc@arkaria.postgresql.org; Thu, 29 Oct 2020 16:05:00 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYA3W-00020X-9l for pgsql-jdbc@lists.postgresql.org; Thu, 29 Oct 2020 15:41:40 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYA3S-0008JX-RG for pgsql-jdbc@lists.postgresql.org; Thu, 29 Oct 2020 15:41:37 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 50F30340 for ; Thu, 29 Oct 2020 11:41:33 -0400 (EDT) Received: from imap4 ([10.202.2.54]) by compute7.internal (MEProxy); Thu, 29 Oct 2020 11:41:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= mime-version:message-id:in-reply-to:references:date:from:to :subject:content-type; s=fm1; bh=Lar0fzf+1RIH/Dg/MhZa/xSg2QOio3e a1bG+IRunp10=; b=SCYJNd0qpO8gSWJ99CeTIED1lpd3BorXLyQEsmJ8EAL6/r7 mLn1JFnF8CJNGTVVWbYB6I0Pf1/C44r5M14ka+/6ENcPeAq20Byy/oVcxOwex8DJ Sk+9flmSO5jkiEVZ9Oocf68zjx5rtX/uWa0pIbgiMs+b3o34vFnCfmR7+d5vkAyr 9zV3WHW3UY4s7hE+bWAAqSPj2nq9bTXS+JXBXaJxpMEZ6Je1gxbHCIZtCRMQ0P7E mtWF4U7kp2ykBT6voe9YzrYJ2JC4lmW11DWisi8KUD6pKrgEkSN3y39p+rSDt2+t y41SImG6sj+MAwWnRRiIMNYEukhI+X0X7KPRDsg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=Lar0fz f+1RIH/Dg/MhZa/xSg2QOio3ea1bG+IRunp10=; b=lIE0mZjrzUOq0QOz6eQbRB 8b7kalin2TwGPK01/IptpYZGsX3Fzz3uABc0w/u2iKkFSbGVOyUOzBNWSD86Kvaw r6qXrvyF3SLvpGuxjPGZqKklMVk2hiM7RrX+m+2kIVI9jhy/4Sq+znzE54sVq89e nU8zomn6SXgt5hZ+p2AtDyesRM36Sx029uDlnNl+YbFx9U8iXX3g8DCItYM3w8vi Jp9LRx9Hr9wM4i7/8tenWP9bJJmSivxOkfrMYZOx7BfR4DthHAImS0mlVWhynNp0 9AQH+K8/Gd03z0S/YPRBt9ZLKwwxT+PchbhNW9R1bSJeV2Bx/L+mLAVtWx2e3MHw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrleefgdejkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgesrgdtre erreerjeenucfhrhhomhepfdflohhnrghthhgrnhcuufhtrhgruhhsshdfuceorhgrphhi ughtrhgrnhhsihhtsehfrghsthhmrghilhdrtghomheqnecuggftrfgrthhtvghrnhepke ejfeekuddvveeljeelkefhteehvddujeeujeeuveffieelfeehuedtvdelgefhnecuffho mhgrihhnpehgihhthhhusgdrtghomhdpfhgrtghtohhrhidrshhuphhpohhrthdptghonh htvgigthdrshhuphhpohhrthdpmhhitghrohhsohhfthdrtghomhenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehrrghpihguthhrrghnshhith esfhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 46FC53C00A1; Thu, 29 Oct 2020 11:41:32 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.0-530-g8da6958-fm-20201021.003-g69105b13-v35 Mime-Version: 1.0 Message-Id: In-Reply-To: References: Date: Thu, 29 Oct 2020 11:41:12 -0400 From: "Jonathan Strauss" To: pgsql-jdbc@lists.postgresql.org Subject: Re: spring context cannot load when I use postgres 42.2.15 or higher Content-Type: multipart/alternative; boundary=cf6ddf11813147b4a82865a225e56501 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --cf6ddf11813147b4a82865a225e56501 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable I can't comment on the Driver but it looks the error is coming from Jand= ex from some nested class? https://github.com/wildfly/jandex/blob/7f2c075ba9246e4b6cc8fe7f3e3678dc2= b64891c/src/main/java/org/jboss/jandex/Indexer.java#L890 , if you are using Spring Boot you should utilize the Boot ecosystem, do= not just add specific version dependencies willy nilly unless you know = what you are doing. You should rely on the Spring Boot BOM which makes s= ure all the correct versions are used and if you need to override a vers= ion you can do it via a Maven or Gradle property instead of playing who'= s got the button (or should I say whos go the transitive dependency?) an= d need to exclude (Of course if you are using Gradle you can force exclu= de all on specific stuff but that's more the nuclear option) and then re= -add the version you need in your build. On Thu, Oct 29, 2020, at 10:04 AM, Hetty Kronemeijer wrote: > Hi there, > =20 > My spring application was using postgres driver version 42.2.16.=20 > Recently I added jpa using spring-boot-data-jpa version 2.3.1.RELEASE,= and spring version 5.2.7.RELEASE. > Loading the spring context results in and error now. This happens with= all versions of postgres from 42.2.15.=20 > I=E2=80=99m currently using 42.2.14 and that works fine. > What has changed in version 42.2.15 that causes the problem and how ca= n I upgrade? > =20 > Thanks in advance, > Hetty Kronemeijer > =20 > =20 > Here=E2=80=99s the stack trace: > =20 > 2020-10-29 13:06:12,852 [main] ERROR Server, com.hi.identify.multitena= nt.server.main.Server:101 - [] Error during application startup > com.hi.identify.multitenant.exception.MultitenantIdentifyException: Un= expected error occurred: Error creating bean with name 'entityManagerFac= tory' defined in com.hi.identify.multitenant.tenant.config.TenantSpringC= onfig: Invocation of init method failed; nested exception is java.lang.I= llegalStateException: Required class information is missing > at com.hi.identify.multitenant.server.main.Server.handleExcep= tionDuringStart(Server.java:93) > at com.hi.identify.multitenant.server.main.Server.main(Server= .java:78) > Caused by: org.springframework.beans.factory.BeanCreationException: Er= ror creating bean with name 'entityManagerFactory' defined in com.hi.ide= ntify.multitenant.tenant.config.TenantSpringConfig: Invocation of init m= ethod failed; nested exception is java.lang.IllegalStateException: Requi= red class information is missing > at org.springframework.beans.factory.support.AbstractAutowire= CapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.jav= a:1796) > at org.springframework.beans.factory.support.AbstractAutowire= CapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:= 595) > at org.springframework.beans.factory.support.AbstractAutowire= CapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:51= 7) > at org.springframework.beans.factory.support.AbstractBeanFact= ory.lambda$doGetBean$0(AbstractBeanFactory.java:323) > at org.springframework.beans.factory.support.DefaultSingleton= BeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226) > at org.springframework.beans.factory.support.AbstractBeanFact= ory.doGetBean(AbstractBeanFactory.java:321) > at org.springframework.beans.factory.support.AbstractBeanFact= ory.getBean(AbstractBeanFactory.java:202) > at org.springframework.context.support.AbstractApplicationCon= text.getBean(AbstractApplicationContext.java:1109) > at org.springframework.context.support.AbstractApplicationCon= text.finishBeanFactoryInitialization(AbstractApplicationContext.java:869= ) > at org.springframework.context.support.AbstractApplicationCon= text.refresh(AbstractApplicationContext.java:551) > at org.springframework.context.support.ClassPathXmlApplicatio= nContext.(ClassPathXmlApplicationContext.java:144) > at org.springframework.context.support.ClassPathXmlApplicatio= nContext.(ClassPathXmlApplicationContext.java:85) > at com.hi.identify.multitenant.server.context.ServerFactory.l= oadSpringContext(ServerFactory.java:55) > at com.hi.identify.multitenant.server.context.ServerFactory.c= reate(ServerFactory.java:28) > at com.hi.identify.multitenant.server.main.Server.main(Server= .java:76) > Caused by: java.lang.IllegalStateException: Required class information= is missing > at org.jboss.jandex.Indexer.rebuildNestedType(Indexer.java:92= 6) > at org.jboss.jandex.Indexer.resolveTypePath(Indexer.java:786)= > at org.jboss.jandex.Indexer.resolveTypeAnnotation(Indexer.jav= a:705) > at org.jboss.jandex.Indexer.resolveTypeAnnotations(Indexer.ja= va:613) > at org.jboss.jandex.Indexer.index(Indexer.java:1602) > at org.hibernate.boot.archive.scan.spi.ClassFileArchiveEntryH= andler.toClassDescriptor(ClassFileArchiveEntryHandler.java:64) > at org.hibernate.boot.archive.scan.spi.ClassFileArchiveEntryH= andler.handleEntry(ClassFileArchiveEntryHandler.java:52) > at org.hibernate.boot.archive.internal.JarFileBasedArchiveDes= criptor.visitArchive(JarFileBasedArchiveDescriptor.java:147) > at org.hibernate.boot.archive.scan.spi.AbstractScannerImpl.sc= an(AbstractScannerImpl.java:48) > at org.hibernate.boot.model.process.internal.ScanningCoordina= tor.coordinateScan(ScanningCoordinator.java:76) > at org.hibernate.boot.model.process.spi.MetadataBuildingProce= ss.prepare(MetadataBuildingProcess.java:98) > at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilde= rImpl.(EntityManagerFactoryBuilderImpl.java:254) > at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilde= rImpl.(EntityManagerFactoryBuilderImpl.java:168) > at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersi= stenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPer= sistenceProvider.java:52) > at org.springframework.orm.jpa.LocalContainerEntityManagerFac= toryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFac= toryBean.java:365) > at org.springframework.orm.jpa.AbstractEntityManagerFactoryBe= an.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java= :391) > at org.springframework.orm.jpa.AbstractEntityManagerFactoryBe= an.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:378) > at org.springframework.orm.jpa.LocalContainerEntityManagerFac= toryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:= 341) > at org.springframework.beans.factory.support.AbstractAutowire= CapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.= java:1855) > at org.springframework.beans.factory.support.AbstractAutowire= CapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.jav= a:1792) > ... 14 common frames omitted > =20 > =20 > =20 > =20 > Verzonden vanuit Mail voor Windows 10 > =20 --cf6ddf11813147b4a82865a225e56501 Content-Type: text/html;charset=utf-8 Content-Transfer-Encoding: quoted-printable
I can't co= mment on the Driver but it looks the error is coming from Jandex from so= me nested class?
, if you are using Spring Boot you should= utilize the Boot ecosystem, do not just add specific version dependenci= es willy nilly unless you know what you are doing. You should rely on th= e Spring Boot BOM which makes sure all the correct versions are used and= if you need to override a version you can do it via a Maven or Gradle p= roperty instead of playing who's got the button (or should I say whos go= the transitive dependency?) and need to exclude (Of course if you are u= sing Gradle you can force exclude all on specific stuff but that's more = the nuclear option) and then re-add the version you need in your build.<= br>

On Thu, Oct 29, 2020, at 10:04 AM, Hetty Kr= onemeijer wrote:
Hi =
there,
 
My spring application =
was using postgres driver version 42.2.16. 
Recently I added jpa u=
sing spring-boot-data-jpa version 2.3.1.RELEASE, and spring version 5.2.7.RELEASE.
Loading the spring context results in and e=
rror now. This happens with all versions of postgres from 42.2.15. 
I=E2=80=99m currently usi=
ng 42.2.14 and that works fine.
What has changed in version 42.2.15 that causes the problem a=
nd how can I upgrade?
 
Thanks in adv=
ance,
Hetty Kronemeij=
er
 
 
Here=E2=80=99s the stack trace:
 
2020-10-29 13:06:12,852 [main] ERROR Server, com.hi.i=
dentify.multitenant.server.main.Server:101 - [] Error during application=
 startup
com.hi.ident=
ify.multitenant.exception.MultitenantIdentifyException: Unexpected error=
 occurred: Error creating bean with name 'entityManagerFactory' defined =
in com.hi.identify.multitenant.tenant.config.TenantSpringConfig: Invocat=
ion of init method failed; nested exception is java.lang.IllegalStateExc=
eption: Required class information is missing
        = at com.hi.identify.multitenant.server.main.Server.handleExceptionDuring= Start(Server.java:93)
         at com.hi.identify.mul=
titenant.server.main.Server.main(Server.java:78)
=
Caused by: org.springframework.beans.factory=
.BeanCreationException: Error creating bean with name 'entityManagerFact=
ory' defined in com.hi.identify.multitenant.tenant.config.TenantSpringCo=
nfig: Invocation of init method failed; nested exception is java.lang.Il=
legalStateException: Required class information is missing=

     &nbs=
p;   at org.springframework.beans.factory.support.AbstractAuto=
wireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory=
.java:1796)
 &nb=
sp;       at org.springframework.beans.fac=
tory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAut=
owireCapableBeanFactory.java:595)
         at org.spr=
ingframework.beans.factory.support.AbstractAutowireCapableBeanFactory.cr=
eateBean(AbstractAutowireCapableBeanFactory.java:517)
<= /pre>
      &nb=
sp;  at org.springframework.beans.factory.support.AbstractBeanFacto=
ry.lambda$doGetBean$0(AbstractBeanFactory.java:323)
<=
span lang=3D"en-NL" style=3D"color:rgb(8, 8, 8);">       =
;  at org.springframework.beans.factory.support.DefaultSingletonBea=
nRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
     &nb=
sp;   at org.springframework.beans.factory.support.AbstractBea=
nFactory.doGetBean(AbstractBeanFactory.java:321)
=
       &n=
bsp; at org.springframework.beans.factory.support.AbstractBeanFactory.ge=
tBean(AbstractBeanFactory.java:202)
         at org.s=
pringframework.context.support.AbstractApplicationContext.getBean(Abstra=
ctApplicationContext.java:1109)
         at org.sprin=
gframework.context.support.AbstractApplicationContext.finishBeanFactoryI=
nitialization(AbstractApplicationContext.java:869)
       =
  at org.springframework.context.support.AbstractApplicationContext=
.refresh(AbstractApplicationContext.java:551)
        = at org.springframework.context.support.ClassPathXmlApplicationContext.&= lt;init>(ClassPathXmlApplicationContext.java:144)
=
      &nbs=
p;  at org.springframework.context.support.ClassPathXmlApplicationC=
ontext.<init>(ClassPathXmlApplicationContext.java:85)
     &nb=
sp;   at com.hi.identify.multitenant.server.context.ServerFact=
ory.loadSpringContext(ServerFactory.java:55)
        = at com.hi.identify.multitenant.server.context.ServerFactory.create(Serv= erFactory.java:28)
&n=
bsp;        at com.hi.identify.multit=
enant.server.main.Server.main(Server.java:76)
Caused by: java.lang.IllegalStateException: Requ= ired class information is missing
         at org.jbo=
ss.jandex.Indexer.rebuildNestedType(Indexer.java:926)
<= /pre>
      &nb=
sp;  at org.jboss.jandex.Indexer.resolveTypePath(Indexer.java:786)<=
/span>
   &nb=
sp;     at org.jboss.jandex.Indexer.resolveTypeAnnot=
ation(Indexer.java:705)
         at org.jboss.jandex.=
Indexer.resolveTypeAnnotations(Indexer.java:613)
=
       &n=
bsp; at org.jboss.jandex.Indexer.index(Indexer.java:1602)<=
br>
      =
;   at org.hibernate.boot.archive.scan.spi.ClassFileArchiveEnt=
ryHandler.toClassDescriptor(ClassFileArchiveEntryHandler.java:64)=

    &nb=
sp;    at org.hibernate.boot.archive.scan.spi.ClassFileAr=
chiveEntryHandler.handleEntry(ClassFileArchiveEntryHandler.java:52)
    &=
nbsp;    at org.hibernate.boot.archive.internal.JarFileBa=
sedArchiveDescriptor.visitArchive(JarFileBasedArchiveDescriptor.java:147=
)
=
   &=
nbsp;     at org.hibernate.boot.archive.scan.spi.Abs=
tractScannerImpl.scan(AbstractScannerImpl.java:48)
       =
  at org.hibernate.boot.model.process.internal.ScanningCoordinator.=
coordinateScan(ScanningCoordinator.java:76)
         =
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.prepare(=
MetadataBuildingProcess.java:98)
         at org.hibe=
rnate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(Ent=
ityManagerFactoryBuilderImpl.java:254)
         at or=
g.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init&g=
t;(EntityManagerFactoryBuilderImpl.java:168)
        = at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProv= ider.createContainerEntityManagerFactory(SpringHibernateJpaPersistencePr= ovider.java:52)
 =
;        at org.springframework.orm.j=
pa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFacto=
ry(LocalContainerEntityManagerFactoryBean.java:365)
<=
span lang=3D"en-NL" style=3D"color:rgb(8, 8, 8);">       =
;  at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.=
buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:39=
1)
   =
      at org.springframework.orm.jpa.AbstractEn=
tityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBe=
an.java:378)
 &n=
bsp;       at org.springframework.orm.jpa.=
LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainer=
EntityManagerFactoryBean.java:341)
         at org.sp=
ringframework.beans.factory.support.AbstractAutowireCapableBeanFactory.i=
nvokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855)
     =
    at org.springframework.beans.factory.support.Abstract=
AutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFac=
tory.java:1792)
 =
;        ... 14 common frames omitted=

<=
span class=3D"font" style=3D"font-family:Consolas;"> =

 
<= /p>

 

<= p class=3D"qt-MsoNormal"> 

Verzonden vanuit Mail voor Windows 1= 0

 


--cf6ddf11813147b4a82865a225e56501--