title: Jersey: Couldn't find grammar element for class
body: <p>I use Grails with the <a href="https://github.com/krasserm/grails-jaxrs" rel="nofollow noreferrer">JaxRS 311 plugin</a>. I use it with Jersey.</p>
  
  <p>My application is running on a tomcat 7.0.55 server. My server logs in production show the following info messages. I was wondering why "Couldn't find grammar element for class" is an INFO log. Here is the log:</p>
  
  <pre><code>INFO: Couldn't find grammar element for class test.shared.dto.NotificationDtoCollection
  Sep 09, 2014 3:01:03 AM com.sun.jersey.server.wadl.generators.AbstractWadlGeneratorGrammarGenerator attachTypes
  INFO: Couldn't find grammar element for class test.shared.dto.UserDto
  Sep 09, 2014 3:01:03 AM com.sun.jersey.server.wadl.generators.AbstractWadlGeneratorGrammarGenerator attachTypes
  INFO: Couldn't find grammar element for class test.shared.dto.ItemDtoCollection
  Sep 09, 2014 3:01:03 AM com.sun.jersey.server.wadl.generators.AbstractWadlGeneratorGrammarGenerator attachTypes
  INFO: Couldn't find grammar element for class test.shared.dto.UploadItemDto
  Sep 09, 2014 3:01:03 AM com.sun.jersey.server.wadl.generators.AbstractWadlGeneratorGrammarGenerator attachTypes
  INFO: Couldn't find grammar element for class test.shared.dto.UploadItemDto
  Sep 09, 2014 3:01:03 AM com.sun.jersey.server.wadl.generators.AbstractWadlGeneratorGrammarGenerator attachTypes
  INFO: Couldn't find grammar element for class test.shared.dto.ItemDetailsDto
  Sep 09, 2014 3:01:03 AM com.sun.jersey.server.wadl.generators.AbstractWadlGeneratorGrammarGenerator attachTypes
  INFO: Couldn't find grammar element for class test.shared.dto.ItemDetailsDto
  Sep 09, 2014 3:01:03 AM com.sun.jersey.server.wadl.generators.AbstractWadlGeneratorGrammarGenerator attachTypes
  INFO: Couldn't find grammar element for class boolean
  Sep 09, 2014 3:01:03 AM com.sun.jersey.server.wadl.generators.AbstractWadlGeneratorGrammarGenerator attachTypes
  </code></pre>
  
  <p>I found the following questions but they do not help in my case: <a href="https://stackoverflow.com/questions/15767973/jersey-what-does-couldnt-find-grammar-element-mean">Jersey: what does &quot;couldn&#39;t find grammar element&quot; mean?</a> and <a href="https://stackoverflow.com/questions/16247110/a-json-object-in-a-post-request-for-webserver-with-jersey">A JSON object in a POST request for webserver with JERSEY</a></p>
  
  <p>All my classes have a public default constructor and may be a second parameterized constructor:</p>
  
  <pre><code>class UserDto {
  
      String id
      String firstName
      String lastName
  
    public UserDto() { }
  
    public UserDto(User user, User currentUser) {
      ... 
    }
  
  }
  </code></pre>
  
  <p><strong>What do these INFO log messages mean and how can I prevent them?</strong></p>