Announcement Announcement Module
Collapse
No announcement yet.
Glassfish 4, Spring Roo 1.2.4, Nullpointer Exception in create.tagx? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Glassfish 4, Spring Roo 1.2.4, Nullpointer Exception in create.tagx?

    I have this simple roo project:

    // Spring Roo 1.2.4.RELEASE [rev 75337cf] log opened at 2013-07-26 13:45:39
    project --topLevelPackage com.mycompany --projectName tester --java 7
    persistence setup --database MYSQL --provider ECLIPSELINK --databaseName login --userName root --password myroot
    database reverse engineer --schema login --package ~.model --testAutomatically
    web mvc setup
    web mvc all --package ~.web.controller
    web mvc install language --code de
    security setup

    When I deploy it on my glassfish 4 server and go on one of the "Create" links, I always get:

    WARNING: StandardWrapperValve[tester]: Servlet.service() for servlet tester threw exception
    java.lang.NullPointerException
    at org.apache.jsp.tag.web.form.update_tagx._jspx_meth _c_if_4(update_tagx.java:434)
    at org.apache.jsp.tag.web.form.update_tagx.doTag(upda te_tagx.java:229)
    at org.apache.jsp.WEB_002dINF.views.modules.update_js px._jspx_meth_form_update_0(update_jspx.java:85)
    at org.apache.jsp.WEB_002dINF.views.modules.update_js px._jspService(update_jspx.java:55)

    Same for update:

    WARNING: StandardWrapperValve[tester]: Servlet.service() for servlet tester threw exception
    java.lang.NullPointerException
    at org.apache.jsp.tag.web.form.update_tagx._jspx_meth _c_if_4(update_tagx.java:434)
    at org.apache.jsp.tag.web.form.update_tagx.doTag(upda te_tagx.java:229)
    at org.apache.jsp.WEB_002dINF.views.modules.update_js px._jspx_meth_form_update_0(update_jspx.java:85)
    at org.apache.jsp.WEB_002dINF.views.modules.update_js px._jspService(update_jspx.java:55)
    ...


    Any ideas?

    This applies to all update/create pages of my sql objects. The 'show' pages work fine.

    Thanks in advance!

  • #2
    Ok, solved.

    Apparently something has changed concerning null values when testing with if or when.

    Changing
    <c:if test="${multipart}">

    in create.tagx into
    <c:if test="${not empty multipart}">
    resolved the issue (yes, I could also check if it is false etc. in an additional and statement, but that's not the point here ).


    A similar fix has to be made in other files, e.g. in input.tagx
    <c:when test="${not empty disableFormBinding}">
    instead of
    <c:when test="${disableFormBinding}">

    Comment

    Working...
    X