title: Hibernate search 4.5 Alpha 1 Unable to guess FieldBridge for id in java.lang.Byte
body: <p>I have a problem on deploying an EAR project to Wildfly 8 beta1. The project uses Hibernate Search 4.5 Alpha 1. There are indexed some entities. The project builds fine but when it is deployed an exception is thrown: Unable to guess FieldBridge for id in java.lang.Byte. I try to disable all hibernate search annotations but the exception still appear. Seams to be a bug. Any suggestions?</p>
  
  <pre><code>at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:169) [wildfly-jpa-8.0.0.Beta1.jar:8.0.0.Beta1]
  at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:117) [wildfly-jpa-8.0.0.Beta1.jar:8.0.0.Beta1]
  at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_25]
  at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:463) [wildfly-security-manager-1.0.0.Beta3.jar:1.0.0.Beta3]
  at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:178) [wildfly-jpa-8.0.0.Beta1.jar:8.0.0.Beta1]
  at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_25]
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_25]
  at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_25]
  at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.1.Final.jar:2.1.1.Final]
  Caused by: org.hibernate.search.SearchException: HSEARCH000135: Unable to guess FieldBridge for id in java.lang.Byte
  at org.hibernate.search.bridge.impl.BridgeFactory.guessType(BridgeFactory.java:432)
  at org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.checkDocumentId(AnnotationMetadataProvider.java:159)
  at org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.initializeMemberLevelAnnotations(AnnotationMetadataProvider.java:625)
  at org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.initializeClass(AnnotationMetadataProvider.java:324)
  at org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.getTypeMetadataFor(AnnotationMetadataProvider.java:118)
  at org.hibernate.search.engine.spi.AbstractDocumentBuilder.&lt;init&gt;(AbstractDocumentBuilder.java:100)
  at org.hibernate.search.engine.spi.DocumentBuilderContainedEntity.&lt;init&gt;(DocumentBuilderContainedEntity.java:62)
  at org.hibernate.search.spi.SearchFactoryBuilder.initDocumentBuilders(SearchFactoryBuilder.java:342)
  at org.hibernate.search.spi.SearchFactoryBuilder.buildNewSearchFactory(SearchFactoryBuilder.java:217)
  at org.hibernate.search.spi.SearchFactoryBuilder.buildSearchFactory(SearchFactoryBuilder.java:141)
  at org.hibernate.search.hcore.impl.HibernateSearchSessionFactoryObserver.sessionFactoryCreated(HibernateSearchSessionFactoryObserver.java:74)
  at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:52)
  at org.hibernate.internal.SessionFactoryImpl.&lt;init&gt;(SessionFactoryImpl.java:581)
  at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1837)
  at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:854)
  at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:847)
  at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:396)
  at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:846)
  at org.jboss.as.jpa.hibernate4.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44)
  at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:151) [wildfly-jpa-8.0.0.Beta1.jar:8.0.0.Beta1]
  ... 8 more
  </code></pre>
  
  <p>This is an example of entity that  reproduces the exception:</p>
  
  <pre><code>@Entity
  @Table(name = "flow")
  public class Flow implements java.io.Serializable {
  
  private static final long serialVersionUID = 3556704047257784867L;
  private Byte id;
  private String name;
  private String description;
  
  public Flow() {
  }
  
  public Flow(String name) {
      this.name = name;
  }
  
  public Flow(String name, String description) {
      this.name = name;
      this.description = description;
  }
  
  @Id
  @GeneratedValue(strategy = IDENTITY)
  @Column(name = "id", unique = true, nullable = false)
  public Byte getId() {
      return this.id;
  }
  
  public void setId(Byte id) {
      this.id = id;
  }
  
  @Column(name = "name", nullable = false, length = 60)
  @NotNull
  @Length(max = 60)
  public String getName() {
      return this.name;
  }
  
  public void setName(String name) {
      this.name = name;
  }
  
  @Column(name = "description", length = 400)
  @Length(max = 400)
  public String getDescription() {
      return this.description;
  }
  
  public void setDescription(String description) {
      this.description = description;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>If the id is changed from Byte to Short is working fine. There is no builtin bridge for Byte. Maybe this is related, but the main problem is why hibernate search is looking for bridge if I don't have hibernate search annotations?</p>