title: java.lang.IllegalArgumentException: No query defined for that name [Offices.getAllOffices]
body: <p>I'm getting started with JavaEE and Wildfly(JBoss Server App.). My project is already operational, but, when I try to start my .xhtml page I receive an error from the server app.</p>
  
  <pre><code>Caused by: java.lang.IllegalArgumentException: No query defined for that name [Offices.getAllOffices]
      at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:187)
      at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:277)
      at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:327)
      at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:239)
      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
      at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
  </code></pre>