Win a copy of Getting started with Java on the Raspberry Pi this week in the Raspberry Pi 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Liutauras Vilda
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Piet Souris

Spring Roo 1.2.2 and Glassfish 3.1.2 deplyment problem

 
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,


I am trying to setup small Spring Roo application. The setup is STS 2.9.2 , Spring Roo 1.2.2 and the glassfish 3.1.2. After creating new Spring Roo project. I issued only follwing command

web mvc setup

The initial application was successfully built and running on the VFbric default server. When I try to depoly the application on Glassfish The deployment error occurs. The Glassfish is configured through the eclipes server adopter in STS. I am not getting any clue what the exact error is. I guess , the error is due to the nio package , which is throwing the NullPointerException. The full error message is as in attatchment

Pl. help

Thanks
 
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That is really strange.

Spring is getting the the charsets for which support is available in the current Java virtual machine by calling a static method in the from the java.nio.Charset class. This is used for configuring the StringHttpMessageConverter.

Your null pointer is coming out of the charset class..

What versions of spring and java are you running? Try to just call this method yourself once and see if you get a null pointer



This may be a bug in Charset or it may be some sort of permission or other IO error causing this. I did find a similar bug but it is quite old. See here:
http://lists.freebsd.org/pipermail/freebsd-java/2005-August/004243.html
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bill,

The problem is due to the wrong placement of JDBC jar file. The problem is resolved after correcting the error.

Thanks
 
Bill Gorder
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That caused a null pointer in char set? That is a cryptic error for that. Thanks for sharing the solution though.
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, The database using ISO charset and the application is using UTF-8. May be there is a problem while conversion. Previously I put the jdbc jar files in glassfish/endorsed directory. Now I have shifted them to domain_dir/lib directory. I think the problem is not related exactly to the application, but related to glassfish gizzy framework.
Thanks
 
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!

I know this post is a somewhat old but I am running into the same problem...

I haven't put my jdbc jar in any endorsed directory and yet I get the same issue. Can one of you please elaborate on the solution?

My environment is:
  • Tomcat 7
  • Spring 3.2.3


  • The problem occurs when I run the following tests:


    Here is my mvc-dispatcher-servlet.xml file:



    and finally the stacktrace:



    Can anyone please help?

    Regards,

    J.
    reply
      Bookmark Topic Watch Topic
    • New Topic