-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 
Author Message
 Post subject: Problem Hibernate - Jasperreports
PostPosted: Wed May 24, 2017 6:43 pm 
Newbie

Joined: Mon Feb 09, 2015 11:05 am
Posts: 6
Hello,


I have a war with hibernate 4.5.x which I deploy on Wildfly 10.1.
Everything works well.
Now I add Jasperreports 6.4.0 and there I have a boot error:

00: 34: 33,947 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool - 99) MSC000001: Failed to start service jboss.persistenceunit. "Decla.war # decla": org.jboss.msc.service .StartException in service jboss.persistenceunit. "Decla.war # decla": java.lang.NoSuchFieldError: LATEST
At org.jboss.as.jpa.service.PersistenceUnitServiceImpl $ 1 $ 1.run (PersistenceUnitServiceImpl.java:179)
At org.jboss.as.jpa.service.PersistenceUnitServiceImpl $ 1 $ 1.run (PersistenceUnitServiceImpl.java:121)
At org.wildfly.security.manager.WildFlySecurityManager.doChecked (WildFlySecurityManager.java:667)
At org.jboss.as.jpa.service.PersistenceUnitServiceImpl $ 1.run (PersistenceUnitServiceImpl.java:193)
At java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1142)
At java.util.concurrent.ThreadPoolExecutor $ Worker.run (ThreadPoolExecutor.java:617)
At java.lang.Thread.run (Thread.java:745)
At org.jboss.threads.JBossThread.run (JBossThread.java:320)
Caused by: java.lang.NoSuchFieldError: LATEST
At org.hibernate.search.cfg.Environment. <Clinit> (Environment.java:204)
At org.hibernate.search.spi.SearchIntegratorBuilder.createCleanFactoryState (SearchIntegratorBuilder.java:280)
At org.hibernate.search.spi.SearchIntegratorBuilder.buildNewSearchFactory (SearchIntegratorBuilder.java:186)
At org.hibernate.search.spi.SearchIntegratorBuilder.buildSearchIntegrator (SearchIntegratorBuilder.java:117)
At org.hibernate.search.hcore.impl.HibernateSearchSessionFactoryObserver.sessionFactoryCreated (HibernateSearchSessionFactoryObserver.java:66)
At org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated (SessionFactoryObserverChain.java:52)
At org.hibernate.internal.SessionFactoryImpl. <Init> (SessionFactoryImpl.java:588)
At org.hibernate.cfg.Configuration.buildSessionFactory (Configuration.java:1857)
At org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl $ 4.perform (EntityManagerFactoryBuilderImpl.java:850)
At org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl $ 4.perform (entityManagerFactoryBuilderImpl.java:843)
At org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl (ClassLoaderServiceImpl.java:397)
At org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build (EntityManagerFactoryBuilderImpl.java:842)
At org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory (HibernatePersistenceProvider.java:152)
At org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory (PersistenceUnitServiceImpl.java:341)
At org.jboss.as.jpa.service.PersistenceUnitServiceImpl.access $ 1200 (PersistenceUnitServiceImpl.java:69)
At org.jboss.as.jpa.service.PersistenceUnitServiceImpl $ 1 $ 1.run (PersistenceUnitServiceImpl.java:174)
... more

00: 34: 33,951 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 20) WFLYCTL0013: Operation Description:
    "WFLYCTL0080: Failed services" => {"jboss.persistenceunit. \" Decla.war # decla \ "" => "org.jboss.msc.service.StartException in service jboss.persistenceunit. \" Decla.war # ": Java.lang.NoSuchFieldError: LATEST
    Caused by: java.lang.NoSuchFieldError: LATEST "},
    "WFLYCTL0412: Required services that are not installed:" => ["jboss.persistenceunit. \" Decla.war # decla \ ""],
    "WFLYCTL0180: Services with missing / unavailable dependencies" => undefined



I have this field that does not exist in Hibernate: LATEST.


I do not find much information on that.


Any ideas ?


Thank you in advance,

Regards,


Top
 Profile  
 
 Post subject: Re: Problem Hibernate - Jasperreports
PostPosted: Thu May 25, 2017 3:40 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
Quote:
At org.hibernate.search.cfg.Environment. <Clinit> (Environment.java:204)


I moved this post the Hibernate Search forum.


Top
 Profile  
 
 Post subject: Re: Problem Hibernate - Jasperreports
PostPosted: Thu May 25, 2017 10:18 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,

Wildfly will by default assume that you want to use its own Hibernate version, which is much more up to date.

You can of course bundle older Hibernate versions with your app but please check this guide:
- https://docs.jboss.org/author/display/W ... ence+Guide

In particular to disable Hibernate Search set the configuration property
Code:
wildfly.jpa.hibernate.search.module=none


or pick a different module, one compatible with the version of Hibernate ORM of your choice.

Also one question for you: are you using Hibernate Search? WildFly should only attempt to initialize Hibernate Search if you're actually using it (like if you have indexed entities), so if you're not using it we should improve this so that it doesn't give you any problem.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Problem Hibernate - Jasperreports
PostPosted: Thu May 25, 2017 3:27 pm 
Newbie

Joined: Mon Feb 09, 2015 11:05 am
Posts: 6
Hi,


I use a Hibernate version in my application already.

My version of hibernate is 4.3.5.
Wildfly is 10.1 and Jasperreports 6.4.0

And i use Hibernate Search in my application.
My entities is indexed.


I tried to use an older versio of Jasperreports but i have already this error.
After, i excluded the hibernate-core from Jasperreports in pom.xml with exclusions tag.


What can i do to correct this error ?

Thanks for your help,


Top
 Profile  
 
 Post subject: Re: Problem Hibernate - Jasperreports
PostPosted: Thu May 25, 2017 4:40 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Which version of Hibernate Search ? Did you try setting the wildfly.jpa.hibernate.search.module property as I suggested above?

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Problem Hibernate - Jasperreports
PostPosted: Thu May 25, 2017 5:20 pm 
Newbie

Joined: Mon Feb 09, 2015 11:05 am
Posts: 6
Hi,

This is my conf for hibernate :

<!-- Hibernate -->
<hibernate-core.version>4.3.5.Final</hibernate-core.version>
<hibernate-entitymanager.version>4.3.5.Final</hibernate-entitymanager.version>
<hibernate-validator.version>5.1.0.Final</hibernate-validator.version>
<hibernate-ehcache.version>4.3.5.Final</hibernate-ehcache.version>
<hibernate-search.version>5.2.0.Final</hibernate-search.version>

And i have written in persistence.xml
wildfly.jpa.hibernate.search.module=none

But i have always this error.

Thanks a lot


Top
 Profile  
 
 Post subject: Re: Problem Hibernate - Jasperreports
PostPosted: Thu May 25, 2017 7:12 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
ok thanks for listing all versions.

You should also set this property:
Code:
jboss.as.jpa.providerModule=application


If you don't I suspect that you're actually running the newer version of Hibernate ORM - which is included in WildFly and is not compatible with the old version of Hibernate Search you're using.

This is documented in https://docs.jboss.org/author/display/W ... pplication

Frankly it would be much simpler if you could upgrade to the versions included in WildFly and avoid including Hibernate libraries in your application ;)

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Problem Hibernate - Jasperreports
PostPosted: Fri May 26, 2017 3:30 am 
Newbie

Joined: Mon Feb 09, 2015 11:05 am
Posts: 6
Sorry i have forgotten
Yes, i already use this text

jboss.as.jpa.providerModule=application
This is my configuration :

<!-- Wildfly 10 -->
<property name="wildfly.jpa.hibernate.search.module" value="none" />
<property name="jboss.as.jpa.providerModule" value="application" />

<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform" />

<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup" />

<!-- <property name="hibernate.hbm2ddl.import_files" value="/import.sql,/value.sql,/new_values.sql"> -->

<!-- Configuration Hibernate Search -->
<property name="hibernate.search.rebuildIndex" value="false" />
<!--  <property name="hibernate.search.lucene_version" value="
<property name="hibernate.search.default.directory_provider" value="filesystem" />
<property name="hibernate.search.default.indexBase" value="${directory.path.indexes}/.xxx/indexes" />



No, i don't use now the included version of Hibernate in Wildlfy because i use a personal library and this library use for the moment hibernate 4.3.5.


Thanks for your help


Top
 Profile  
 
 Post subject: Re: Problem Hibernate - Jasperreports
PostPosted: Fri May 26, 2017 6:57 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Quote:
Sorry i have forgotten
Yes, i already use this text

jboss.as.jpa.providerModule=application
This is my configuration :


Ok good, so the Hibernate configuration seems fine.

Now that I know which sources to check I can look into this:

Quote:
At org.hibernate.search.cfg.Environment. <Clinit> (Environment.java:204)
At org.hibernate.search.spi.SearchIntegratorBuilder.createCleanFactoryState (SearchIntegratorBuilder.java:280)


This suggest you're having the wrong version of Apache Lucene. This Hibernate Search version requires version 4.10.4.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.