Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

java.lang.NoSuchMethodError: org.jboss.logging.Logger.getMessageLogger problem in JBoss

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been creating a REST Web Service, which would intercept requests from a client and query an employee table in the MySQL database via Hibernate and return the retrieved rows to the client. The web service calls a class in another project which solely deals with interacting with the MySQL database using Hibernate. For enabling it, I'm using Maven to build the database project into a jar which I'm then placing in the WEB-INF folder of the web service. The project structures of all three projects are attached herewith.

I had bundled all the jars required by Hibernate in the Maven dependencies. As a result, when I tried to call the deployed service from the client, it threw an exception in JBoss saying:



After browsing through a lot of solutions all pointing that this is due to me bundling the Hibernate jars in the deployed war, I removed the dependencies from Maven and instead, placed the jars in the lib folder of the JBoss server to which I am deploying my application. However, now, a new exception has cropped up, and I'm pasting the entire stacktrace here.



I have extensively searched for this exception as well, and the only solution I can find is that there may be two different logging jars on the classpath, and I would have to remove one of them. I found that JBoss 5.1.0.GA uses the jboss-logging-spi.jar for its logging and it can't be removed from the lib folder in its root. I have added jboss-logging-3.1.3.GA.jar in the lib folder of the deployment server, and if I remove it, ClassNotFoundExceptions are being thrown. So I'm now in a fix. I can't remove either of them, and if I don't remove any, then this NoSuchMethodError occurs. Please help me find a solution to this.
EmployeeClient.png
[Thumbnail for EmployeeClient.png]
The client project calling the web service.
EmployeeDatabaseMaven.png
[Thumbnail for EmployeeDatabaseMaven.png]
The database project accessing the MySQL database using Hibernate.
EmployeeManagementService.png
[Thumbnail for EmployeeManagementService.png]
The web service project.
 
We find this kind of rampant individuality very disturbing. But not this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic