Michael
Michael

Reputation: 33307

WAR packaging error: encoded string too long

I use grails 2.3.6 and get the following error while performing

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?

Upvotes: 4

Views: 1079

Answers (1)

Joshua Moore
Joshua Moore

Reputation: 24776

Unfortunately the limit is 64k per block of static content (because DataOutputStream.writeUTF has that limit). You can workaround the limit by splitting up your GSP by adding any GSP "token" (for example: <%-- some comment --%>) in the static content to split it in max 64kB blocks.

Upvotes: 5

Related Questions