You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by MarshallB <ma...@lmco.com> on 2014/09/15 23:45:48 UTC

Error deploying EJB in WAB into Karaf

Hello everyone,
 I am running Karaf 3.0.1 with Equinox as the OSGi container instead of the
default Felix.  I am trying to deploy a simple Stateless EJB into Karaf. The
EJB is in a WAR file that has a the necessary Manifest.mf entries to make it
a WAB. I installed OpenEJB per the directions here (
http://karaf.apache.org/manual/latest/users-guide/ejb.html
<http://karaf.apache.org/manual/latest/users-guide/ejb.html>  ) and after
tweaking the jre.properties file, it installed without errors.
When I deploy the EJB war into the 'deploy' directory, there are no errors
in the karaf.log, but a log file gets created in data/cache directory with
the following errors:


Not a lot in the karaf.log about the EJB war:


It is a pretty simple EJB:


Here is the contents of the Manifest.mf:


And here is the Blueprint config.xml:


When I look at the deployed bundles in the web console, I see the war is
deployed:


and it is getting the javax.annotation classes from
"javax.annotation,version=1.2.0 from org.eclipse.osgi (0)"

When I deploy this same war to a stand alone OpenEJB 4.5.2 container, the
EJB deploys correctly:


I don't see any JNDI logging in the Karaf logs.
Any help would be appreciated. 
Thanks.
Marshall B.




--
View this message in context: http://karaf.922171.n3.nabble.com/Error-deploying-EJB-in-WAB-into-Karaf-tp4035266.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Error deploying EJB in WAB into Karaf

Posted by MarshallB <ma...@lmco.com>.
So if we use felix instead of equinox (change in the config.properties file)
and deploy the war it looks like it works! There are no errors in the Karaf
console. Here is the relevant karaf.log parts:

I see JNDI entries and Karaf shows the Remote EJB as a Service.
We used the equinox container instead of felix because of deploy errors but
that was several months ago. I'll see if felix will work for us.
Thanks. 
Marshall B.



--
View this message in context: http://karaf.922171.n3.nabble.com/Error-deploying-EJB-in-WAB-into-Karaf-tp4035266p4035363.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Error deploying EJB in WAB into Karaf

Posted by MarshallB <ma...@lmco.com>.
Hello JB,
 Thanks for the info. I followed the steps and redeployed the war. There is
more activity in the karaf.log:


However, in the karaf console, this error appears:

There was no error in the karaf console before.
Also, still no JNDI information in the logs like when I deploy to the stand
alone OpenEJB container.
Thanks.
MB



--
View this message in context: http://karaf.922171.n3.nabble.com/Error-deploying-EJB-in-WAB-into-Karaf-tp4035266p4035297.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Error deploying EJB in WAB into Karaf

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Marshall,

Actually, the documentation is not up to date, I fixed that during the 
week end.

Here's what you have to do before installing the openejb feature:

1/ update the etc/system.properties to add:

openejb.deployments.classpath.exclude=bundle:*
openejb.deployments.classpath.filter.descriptors=true

2/ update the etc/jre.properties:

...
javax.annotation, \
javax.annotation.processing, \
...
javax.xml.namespace;version="1.0.0", \
...

3/ you can install the openejb feature:

karaf@root()> feature:repo-add openejb 4.5.2
karaf@root()> feature:install openejb-core

Does it work better like this ?

Regards
JB

On 09/15/2014 11:45 PM, MarshallB wrote:
> Hello everyone,
>   I am running Karaf 3.0.1 with Equinox as the OSGi container instead of the
> default Felix.  I am trying to deploy a simple Stateless EJB into Karaf. The
> EJB is in a WAR file that has a the necessary Manifest.mf entries to make it
> a WAB. I installed OpenEJB per the directions here (
> http://karaf.apache.org/manual/latest/users-guide/ejb.html
> <http://karaf.apache.org/manual/latest/users-guide/ejb.html>  ) and after
> tweaking the jre.properties file, it installed without errors.
> When I deploy the EJB war into the 'deploy' directory, there are no errors
> in the karaf.log, but a log file gets created in data/cache directory with
> the following errors:
>
>
> Not a lot in the karaf.log about the EJB war:
>
>
> It is a pretty simple EJB:
>
>
> Here is the contents of the Manifest.mf:
>
>
> And here is the Blueprint config.xml:
>
>
> When I look at the deployed bundles in the web console, I see the war is
> deployed:
>
>
> and it is getting the javax.annotation classes from
> "javax.annotation,version=1.2.0 from org.eclipse.osgi (0)"
>
> When I deploy this same war to a stand alone OpenEJB 4.5.2 container, the
> EJB deploys correctly:
>
>
> I don't see any JNDI logging in the Karaf logs.
> Any help would be appreciated.
> Thanks.
> Marshall B.
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Error-deploying-EJB-in-WAB-into-Karaf-tp4035266.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com