Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4042492
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T13:00:46+00:00 2026-05-20T13:00:46+00:00

Please bear with me, I come from .net and am new to the java

  • 0

Please bear with me, I come from .net and am new to the java world.

I have a Spring MVC 3 website that uses hibernate as a DAL. I am trying to add a web service package to the project.

Here’s the problem. As soon as I add the core and jaxb JAX-RS libraries to my solution (the libraries that enable me to add REST-JAX methods to my service project classes), hibernate stops working across the entire project (my website included). Any hibernate call that queries the DB (findbyblah()) throws a NullPointerException. When I remove both of these core libraries, clean, and rebuild, my website starts working again.

I just need to be able to implement a few service methods from my site. Can someone point me in the right direction? Thank you.

UPDATE: Here is the stacktrace:

java.lang.NullPointerException
    com.myeclipse.hibernate.ServicetypeDAO.findAll(ServicetypeDAO.java:100)
    com.indixium.models.RegistrationModel.<init>(RegistrationModel.java:27)
    com.indixium.controllers.RegisterController.get(RegisterController.java:29)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:597)
    org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:710)
    org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:167)
    org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:414)
    org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:402)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

UPDATE AGAIN:

So I found two articles that look promising:

http://www.hildeberto.com/2008/05/hibernate-and-jersey-conflict-on.html

describes that hibernate and jersey both use asm.jar, but different versions, which is why the conflicting behavior exists. It says, in order to solve this:

To solve this conflict use cglib-nodep.jar instead of cglib.jar and keep ASM version 3.x with Jersey. cglib-nodep.jar includes some ASM classes demanded by cglib.jar, changing the package name to avoid any class conflict.

Unfortunately, I do not know how to “use” a different jar for each library. Any help on this is appreciated.

The second solution I found says to modify the pom.xml file (which I also do not know how to do). I have searched my project and my entire hard drive for a file called pom.xml with no luck. How do I change pom.xml? Here is the link to the second solution:

http://blog.idm.fr/2009/04/jersey-hibernate-conflict.html

If someone can help me implement either of these, it would be much appreciated. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T13:00:46+00:00Added an answer on May 20, 2026 at 1:00 pm

    Ended up scrapping the JAX-RS approach. I am now using the built in Spring MVC 3 @RequestBody attribute to create a service within my site.

    @RequestBody causes a web method to write directly to the output stream, instead of to the routing engine to be parsed and passed to a view dictionary.

    I created a controller dedicated to my service and attributed it with @RequestMapping(“/services”). All web methods in this controller are decorated with @RequestBody so that direct data output can be returned.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to visual studio/asp.net so please bear with me. Using vs 2005
I'm new to JQuery, so please bear with me =) I have a Menu
I am very new to the entity framework, so please bear with me... How
Please bear with me as I'm a bit new to rails (especially rails 3),
I am new to JavaScript OO programming please bear with me for any ambiguities.
I'm a bit new to rails so if this is very basic please bear
I am afraid that several terminologies in my question are wrong. Please bear with
Please bear with me, I'm just learning C++. I'm trying to write my header
A longwinded question - please bear with me! I want to programatically create an
I am a complete beginner trying to develop for FCKeditor so please bear with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.