Announcement Announcement Module
Collapse
No announcement yet.
[CRITICAL] Invalid byte 1 of 1-byte UTF-8 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • [CRITICAL] Invalid byte 1 of 1-byte UTF-8

    Sorry to be in such rush guys, but after a few code changes today roo started to give this error:

    Code:
    8-mag-2013 13.02.24 org.apache.catalina.core.StandardWrapperValve invoke
    GRAVE: Servlet.service() for servlet [jtec-mvc] in context with path [/jtec-mvc] threw exception [Request processing failed; nested exception is org.apache.tiles.impl.CannotRenderException: ServletException including path '/WEB-INF/layouts/default.jspx'.] with root cause
    com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.
    Now when I deploy the website it shows up but as soon as I click something like a finder or list all it raises that exception...

    I didn't change anything as far as the environment goes from when it was all working fine and when it started to misbehave (same springsource, file encoding, same roo version, etc).

    How can I fix it? I tried to refresh-validate-mvc the project, cleaning the tomcat work directory, but nothing...

    It's really urgent

    Thanks everyone,
    Rob

  • #2
    Are you running on glassfish, weblogic or some other app server that aliases the XMl parser for its own internal use? That error seems like a container error but not a standard one that I know of.

    com.sun.org.apache.xerces.internal.impl.io.Malform edByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.

    Did the application server get upgraded or something? More information would be helpful - any errors in the error log of the server, rebooting fixes / not fixes it, jdk version, app server version, did they change at all on you?

    Ken

    Comment


    • #3
      Hello ken and thanks for your help. I'll try to reply to you:

      Are you running on glassfish, weblogic or some other app server that aliases the XMl parser for its own internal use?
      I'm running on tomcat 7 which came with springsource 2.9.2

      That error seems like a container error but not a standard one that I know of.
      Not sure about it, as before deploying it to the container roo prints this:

      Code:
      Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER.
      Updated SRC_MAIN_WEBAPP\WEB-INF\i18n\application.properties
      Undo manage SRC_MAIN_WEBAPP\WEB-INF\i18n\application.properties
      Invalid byte 1 of 1-byte UTF-8 sequence.
      Did the application server get upgraded or something?
      Nope, same.

      any errors in the error log of the server
      Just the one I posted in the op.

      rebooting fixes / not fixes it
      Not fixes.

      jdk version, app server version, did they change at all on you?
      No, I was changing some stuff here and there in like a list.jspx and mytable.tagx, maybe pushed in a method from controllerjson.aj, but the underlying setup wasn't touched in the process.

      Comment


      • #4
        Great info. I'm now thinking screwed up STS workspace around the Tomcat instance files.

        Ok, let's get out of the tool for a sec then.

        Go to the command line, make sure you have Maven 3.0.4 (or 3.0.5) installed, then do:

        mvn clean package jetty:run

        (yes, let's try jetty first, let's see if it's a Tomcat version problem)

        Then hit up your URL

        If it works here, then try

        mvn clean package tomcat:run

        - that'd be tomcat 6

        You can also try:

        mvn clean package tomcat7:run but you may have to add the tomcat7 plugin.

        If all of those work but the STS Tomcat one doesn't, there is a cleanup option to remove all work files in STS for a tomcat server. I forget where it is (thinking right-click on the server itself) - maybe that'll do it.

        My perspective on this is that I never run the tool's tomcat server. I always run my servers from the maven plugin or at worst from a stand-alone tomcat server. I don't trust the tools to run the servers properly and to me it always feels like it slows down the IDE at some point, regardless of which one.

        Ken

        Comment


        • #5
          To deploy to Tomcat7 inside of maven:

          Add this to <build>..<plugins>
          Code:
               <plugin>
                  <groupId>org.apache.tomcat.maven</groupId>
                  <artifactId>tomcat7-maven-plugin</artifactId>
                  <version>2.0</version>
                 <configuration>
                    <webAppConfig>
                       <contextPath>/${project.name}</contextPath>
                    </webAppConfig>
                 </configuration>
              </plugin>
          Then use

          mvn package tomcat7:run

          Ken

          Comment


          • #6
            Originally posted by tylerdurden83 View Post
            Hello ken and thanks for your help. I'll try to reply to you:
            No, I was changing some stuff here and there in like a list.jspx and mytable.tagx, maybe pushed in a method from controllerjson.aj, but the underlying setup wasn't touched in the process.
            If what we are talking about still brings the same error, I suspect something in your tags or JSPX files.

            I would maybe try copying your tags out of the way and replacing them back with the old ones for a minute? Maybe something in one of your tags is used on all pages (tables perhaps) and since it can't parse it, Tiles just gives up. I've noticed during the writing of the book that some exceptions are hard to get out of the Tiles framework - it gives cryptic error messages. Maybe amp up your logging on org.apache.tiles and see if something is going on there that is causing a parsing error during render of something?

            Ken

            Comment

            Working...
            X