jakarta ee 9

23 views
Skip to first unread message

Eduard Drenth

unread,
Sep 8, 2021, 9:32:44 AM9/8/21
to Payara Forum
Dear all,

When deploying my jakarta ee 9, jpa 3 application (no javax in my sources, dependencies or config left, namespaces adapted) I keep seeing javax faults when running on 5.2021.6, snippet:

Caused by: javax.ejb.EJBException: javax.ejb.CreateException: Could not create stateless EJB
        at com.sun.ejb.containers.StatelessSessionContainer$SessionContextFactory.create(StatelessSessionContainer.java:653)
        at com.sun.ejb.containers.util.pool.NonBlockingPool.getObject(NonBlockingPool.java:219)
        at com.sun.ejb.containers.StatelessSessionContainer._getContext(StatelessSessionContainer.java:395)
        ... 61 more
Caused by: javax.ejb.CreateException: Could not create stateless EJB
        at com.sun.ejb.containers.StatelessSessionContainer.createStatelessEJB(StatelessSessionContainer.java:473)
        at com.sun.ejb.containers.StatelessSessionContainer.access$000(StatelessSessionContainer.java:100)
        at com.sun.ejb.containers.StatelessSessionContainer$SessionContextFactory.create(StatelessSessionContainer.java:651)
        ... 63 more
Caused by: javax.persistence.PersistenceException: No Persistence provider for EntityManager named standertwurdlist_unit_fast
        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:86)

Payara is ee 9 compatible I thought, am I missing something?

Regards, Eduard

Will Hartung

unread,
Sep 8, 2021, 10:20:11 AM9/8/21
to Eduard Drenth, Payara Forum
As I understand it, and someone else may be able to fill in the blanks, internally Payara is renaming classes. So, while you may be using jakarta.ejb.xxx, internally it got renamed to the original javax and away it went.

Payara needs to support both name spaces. It's a bit of hackish wizardry. That may be what you're seeing here. Operationally, it likely doesn't matter.

--
You received this message because you are subscribed to the Google Groups "Payara Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to payara-forum...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/payara-forum/6242c375c6b993df0e676ad2f6bb2d0888767461.camel%40gmail.com.

Eduard Drenth

unread,
Sep 8, 2021, 10:46:53 AM9/8/21
to Will Hartung, Payara Forum
Right, reason for me to just wait a while, I'm not a big fan of magic

Will Hartung

unread,
Sep 8, 2021, 4:36:56 PM9/8/21
to Eduard Drenth, Payara Forum
On Wed, Sep 8, 2021 at 7:46 AM Eduard Drenth <eduard...@gmail.com> wrote:
Right, reason for me to just wait a while, I'm not a big fan of magic

Wait a while for what? The container is gorged with magic. There's a boat load of on the fly byte code mangling, class loader shenanigans, classpath scanning, proxies, etc.  going on in the container. Just the transaction processing alone has it up to your ears.

If you want to avoid magic, I'd avoid JEE and Spring and JPA entirely. There's no getting away from it.

Renaming a class in a stack trace is pretty low on the list, frankly.

Regards,

WIll Hartung

Eduard Drenth

unread,
Sep 9, 2021, 2:38:40 AM9/9/21
to Will Hartung, Payara Forum
Well, I am a big fan of ee, jpa and payara, including the magic that make it work. Spring I try to avoid.

Renaming packages and classes as the strategy to support ee 9 to me feels like a temporary workaround that will be replaced with something sustainable in due time. I would like to wait for that.

I'll do another test with persistence.xml in jpa 2 format to see if the error goes away.

Regards, Eduard

Eduard Drenth

unread,
Sep 9, 2021, 4:31:04 AM9/9/21
to Will Hartung, Payara Forum
Hi, I can confirm my app is running after I changed the xml header of my persistence.xml into jpa 2.2

So now I have a running app that is a mix of ee 9  and some left-overs.

I realy hope for full ee 9 jpa 3 support without payara doing it's best (which in this case fails) to prepare my app to run on javax libs.

Bye, Eduard

steve.millidge

unread,
Sep 9, 2021, 6:36:10 AM9/9/21
to Payara Forum
Native jakarta namespace support is targeted for Payara 6 which is also targeting Jakarta EE 10. If you want to try this out Payara 6 Alpha 1 is available and is Jakarta EE 9.1 compatible see https://blog.payara.fish/payara-server-community-6.2021.1.alpha1-certified-jakarta-ee-9.1-compatible 

Payara 5 does namespace transformation from jakarta to javax so you will see javax in stack traces. Not supporting transforming the correct xml names space header in persistence.xml I would classify as a bug so can you raise this on GitHub? We are trying to get the transformation 100% spot on to support running Jakarta apps on Payara 5 and when 6 is released vice-versa.

Thanks

Steve
Reply all
Reply to author
Forward
0 new messages