[Jumpstart] Glassfish 4, EJB Provider not detected

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Jumpstart] Glassfish 4, EJB Provider not detected

chris@opencsta.org
Hi All,

Just a heads up.

I've just tested deploying an EAR with glassfish 4 because I thought I'd
try a JPA-2.1 sql inject on load setting available through the
persistence.xml that would be handy for my current dev project.

I'm currently using jumpstart's method of @EJB annotation lookup.

It deploys fine, but when loading the first page, a "Failed to detect a
known EJBProvider. Tried OpenEJB, JBoss, and GlassFish." Error message
appears.

In the EJBProviderUtil.java class, there is this

        try {
            Class.forName("com.sun.enterprise.admin.cli.AsadminMain");
            logger.info("...found GlassFish 3.1 local.");
            return EJBProviderEnum.GLASSFISH_3_1_LOCAL;
        }

which sets the EJBProviderEnum to the older glassfish version.

From a google search I found [1] this which suggests the same class exists.

The jndi name is the same for EJBs - so not really sure why it would fail
at this stage :)

Cheers
Chris

[1]
http://grepcode.com/file/repo1.maven.org$maven2@...$admin-cli@3.0-b54@com$sun$enterprise$admin$cli$AsadminMain.java
Reply | Threaded
Open this post in threaded view
|

Re: [Jumpstart] Glassfish 4, EJB Provider not detected

Andreas Ernst
Hi,

Am 20.12.13 03:11, schrieb Chris Mylonas:
> Hi All,
>
> Just a heads up.
>
> I've just tested deploying an EAR with glassfish 4 because I thought I'd
> try a JPA-2.1 sql inject on load setting available through the
> persistence.xml that would be handy for my current dev project.

JPA 2.1 is not working, you must use version 1.

https://issues.apache.org/jira/browse/TAP5-2206

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
[hidden email] | www.ae-online.de
www.tachyon-online.de

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [Jumpstart] Glassfish 4, EJB Provider not detected

chris@opencsta.org
Thanks Andreas but I'm using EJBs for persistence and session beans, and
using tapestry for the web layer.
So my stateless session beans are

@EJB
private SomeObjectFacadeLocal objectService ;

in the tapestry classes.

Like http://jumpstart.doublenegative.com.au/jumpstart/examples/state/atejb

Not using tapestry-jpa or tapestry-hibernate

I'm really only testing what I can do with something like
http://stackoverflow.com/questions/16379605/how-to-work-with-javax-persistence-sql-load-script-source

To load up a default user for a tapestry-security on deployment.  My
insert.sql has something like
insert if not exist into user (`username`,`pass`) values
('blahchris','urawesome');



Good to know anyways :)

Chris




On Fri, Dec 20, 2013 at 7:22 PM, Andreas Ernst <[hidden email]> wrote:

> Hi,
>
> Am 20.12.13 03:11, schrieb Chris Mylonas:
>
>  Hi All,
>>
>> Just a heads up.
>>
>> I've just tested deploying an EAR with glassfish 4 because I thought I'd
>> try a JPA-2.1 sql inject on load setting available through the
>> persistence.xml that would be handy for my current dev project.
>>
>
> JPA 2.1 is not working, you must use version 1.
>
> https://issues.apache.org/jira/browse/TAP5-2206
>
> --
> ae | Andreas Ernst | IT Spektrum
> Postfach 5, 65612 Beselich
> Schupbacher Str. 32, 65614 Beselich, Germany
> Tel: +49-6484-91002 Fax: +49-6484-91003
> [hidden email] | www.ae-online.de
> www.tachyon-online.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>