Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
JPAcontainer error on entitymanager
Dear All,
I have a problem when using JPAcontainter Addon.
After importing, vaadin working properly, but after using the initiation of the JPAcontainer
JPAContainer<Vouchers> container = JPAContainerFactory.make(Vouchers.class, "voucher");
Then the error:
Aug 03, 2015 9:58:42 AM com.vaadin.server.DefaultErrorHandler doDefault
SEVERE:
java.lang.NoSuchMethodError: javax.persistence.EntityManager.getCriteriaBuilder()Ljavax/persistence/criteria/CriteriaBuilder;
at com.vaadin.addon.jpacontainer.provider.LocalEntityProvider.doGetEntityCount(LocalEntityProvider.java:510)
at com.vaadin.addon.jpacontainer.provider.CachingSupport$FilterCacheEntry.getEntityCount(CachingSupport.java:157)
at com.vaadin.addon.jpacontainer.provider.CachingSupport.getEntityCount(CachingSupport.java:826)
at com.vaadin.addon.jpacontainer.provider.CachingMutableLocalEntityProvider.getEntityCount(CachingMutableLocalEntityProvider.java:130)
at com.vaadin.addon.jpacontainer.JPAContainer.size(JPAContainer.java:912)
at com.vaadin.ui.AbstractSelect.size(AbstractSelect.java:769)
at com.vaadin.ui.Table.refreshRenderedCells(Table.java:1670)
at com.vaadin.ui.Table.attach(Table.java:4243)
....
when i clicked the method, LocalEntityProvider.java:510, it refers me to the inside of JPAcontainer, when i find the reference the class (entitymanager) is there.
Project using:
Eclipse Link 2.5.2
Pivotal tc server 3.0
Ivy
for ivy configuration:
<!-- Java Persistence -->
<dependency org="org.eclipse.persistence" name="javax.persistence" rev="2.1.0" />
<!-- Vaadin JPAContainer add-on -->
<dependency org="com.vaadin.addon" name="jpacontainer" rev="3.2.0" />
<!-- Hibernate -->
<dependency org="org.hibernate" name="ejb3-persistence" rev="1.0.2.GA"/>
<dependency org="org.hibernate" name="hibernate-annotations" rev="3.5.6-Final"/>
<dependency org="org.hibernate" name="hibernate-core" rev="4.3.10.Final"/>
<dependency org="org.hibernate" name="hibernate-entitymanager" rev="4.3.10.Final"/>
<dependency org="org.hibernate.javax.persistence" name="hibernate-jpa-2.0-api" rev="1.0.1.Final"/>
Could you tell me what i miss to implement jpacontainer?
Hi,
Looks like you are missing some JPA dependency. Are you able to attach the code here so that I can reproduce the error?