GRAILS – WAR packaging error: The encoded string is too long

I use grails 2.3.6 and I get the following error during execution

grails dev war

Error:

|Compiling 84 GSP files for package [test]
.Error
|
WAR packaging error: encoded string too long : 79912 bytes

How can I prevent this error?

Unfortunately, each static content block is limited to 64k (because DataOutputStream.writeUTF has this Restrictions). You can split the GSP by adding any GSP “token” in the static content (for example: <%-some comment-%>) so that it can be split into up to 64kB blocks, thus solving the limitation problem. < /div>

I use grails 2.3.6 and I get the following error during execution

grails dev war

Error:

|Compiling 84 GSP files for package [test]
.Error
|
WAR packaging error: encoded string too long: 79912 bytes

How can I prevent this error?

Unfortunately, the limit of each static content block is 64k (because DataOutputStream.writeUTF has that limit). You can add any GSP “token” (for example: <%-some comment-%>) to split the GSP so that it can be split into up to 64kB blocks, thus solving the limitation problem.

Leave a Comment

Your email address will not be published.