Report bug about SimpleJpaCrudService

77 views
Skip to first unread message

Xj Chen

unread,
Sep 11, 2014, 3:53:23 AM9/11/14
to dataf...@googlegroups.com
Version 8.05b

    public SimpleJpaCrudService(String persistenceUnitName, Class<S> entityClass) {
        this(() -> Persistence.createEntityManagerFactory("DataFX-Samples"), entityClass, false);
    }


"DataFX-Samples" should be persistenceUnitName!

Sandah Aung

unread,
Sep 26, 2014, 1:25:49 AM9/26/14
to dataf...@googlegroups.com
I am having the same problem here.

@Async
@FlowScoped
public class ProgrammingLanguageCrudService extends SimpleJpaCrudService<ProgrammingLanguage, Long> {

    public ProgrammingLanguageCrudService() {
        super("ProgrammingLanguagePU", ProgrammingLanguage.class);
    }
}

where ProgrammingLanguagePU is the name of my persistence unit. When I run my programming using this crud service, I get the following exception:

Caused by: javax.persistence.PersistenceException: No Persistence provider for EntityManager named DataFX-Samples
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:69)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:47)
    at org.datafx.crud.jpa.SimpleJpaCrudService.lambda$new$11(SimpleJpaCrudService.java:39)
    at org.datafx.crud.jpa.SimpleJpaCrudService$$Lambda$76/372598604.get(Unknown Source)
    at org.datafx.crud.jpa.CreateOnceSupplier.get(CreateOnceSupplier.java:22)
    at org.datafx.crud.jpa.SimpleJpaCrudService.lambda$new$10(SimpleJpaCrudService.java:33)
    at org.datafx.crud.jpa.SimpleJpaCrudService$$Lambda$77/1974519051.get(Unknown Source)
    at org.datafx.crud.jpa.CreateOnceSupplier.get(CreateOnceSupplier.java:22)
    at org.datafx.crud.jpa.JpaCall.getManager(JpaCall.java:21)
    at org.datafx.crud.jpa.JpaUpdateCall.call(JpaUpdateCall.java:20)
    at org.datafx.crud.jpa.JpaUpdateCall.call(JpaUpdateCall.java:8)
    at org.datafx.crud.BasicCrudService.save(BasicCrudService.java:58)

Should I open an issue at the project's code repository?

Hendrik Ebbers

unread,
Oct 11, 2014, 8:39:26 PM10/11/14
to dataf...@googlegroups.com
Hi,

please fill a bug at bitbucket or create a pull request.
The CRUD API is still experimental and not finished / part of the stable APIs in DataFX 8.
As you can see in DataFX the crud module is moved to the incubator project. I will continue the work on this module in near future.
Reply all
Reply to author
Forward
0 new messages