You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Charles Moulliard <cm...@gmail.com> on 2011/07/04 12:21:53 UTC

Issue with openejb on OSGI

I have been able to find the bundles required to deploy OpenEJB
4.0-SNASPHOT on Apache Karaf 2.2.1. Unfortunately, I get this error at
the launch

Starting OpenEJB...
FATAL ERROR WHILE CONFIGURING LOGGING!!!. MISSING embedded.juli.properties
FILE
FATAL ERROR WHILE CONFIGURING LOGGING!!!. MISSING embedded.juli.properties
FILE
Apache OpenEJB ${pom.version}    build:
@DATE-REPLACED-BY-MAVEN@-@TIME-REPLACED-BY-MAVEN@
http://openejb.apache.org/
Registering OSGified OpenEJB Deployer...
[Deployer] Bundle org.apache.openejb.core-osgi has been started
[Deployer] Checking whether it's an EJB module
ERROR: Bundle org.apache.openejb.core-osgi [198] EventDispatcher:
Error during dispatch. (java.lang.NullPointerException)
java.lang.NullPointerException
       at
org.apache.openejb.core.osgi.impl.Deployer.deploy(Deployer.java:58)
       at
org.apache.openejb.core.osgi.impl.Deployer.bundleChanged(Deployer.java:45)
       at
org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:807)
       at
org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:729)
       at
org.apache.felix.framework.util.EventDispatcher.run(EventDispatcher.java:949)
       at
org.apache.felix.framework.util.EventDispatcher.access$000(EventDispatcher.java:54)
       at
org.apache.felix.framework.util.EventDispatcher$1.run(EventDispatcher.java:106)
       at java.lang.Thread.run(Thread.java:680)

According to the code,

public class Deployer implements BundleListener {

    public void bundleChanged(BundleEvent event) {
        switch (event.getType()) {
        case BundleEvent.STARTED:
            deploy(event.getBundle());
            break;
        case BundleEvent.STOPPED:
            undeploy(event.getBundle());
            break;
        }
    }

    private void deploy(Bundle bundle) {
        System.out.println(String.format("[Deployer] Bundle %s has been
started", bundle.getSymbolicName()));

        System.out.println(String.format("[Deployer] Checking whether it's
an EJB module"));

        Enumeration<?> e = bundle.findEntries("META-INF", "ejb-jar.xml",
false);

 the deployer tries to find into META-INF file of the bundle
org.apache.openejb.core-osgi an ejb-jar.xml file. This is a bit curious as
the Deployer class should be used to scan by example apps directory
containing EAR or WAR files to be deployed. 

Does anybody knows the reason why the class is coded like that ?

Regards,


Charles 
Apache Committer - ServiceMix, Karaf & Camel

--
View this message in context: http://openejb.979440.n4.nabble.com/Issue-with-openejb-on-OSGI-tp3643290p3643290.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Issue with openejb on OSGI

Posted by Charles Moulliard <cm...@gmail.com>.
I will open a ticket where I will copy/paste the bundles to be deployed on
Karaf 2.2.1. So you just need to download Karaf - start it and install the
bundles. Next you will see the error mentioned in the ticket.

Regards,

Charles

--
View this message in context: http://openejb.979440.n4.nabble.com/Issue-with-openejb-on-OSGI-tp3643290p3653481.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Issue with openejb on OSGI

Posted by Charles Moulliard <cm...@gmail.com>.
Hi Jacek,

As mentioned in the ticket, you have to restart Karaf after deploying
all the bundles + features as some of them are not installed in the
correct order. Sorry, I have found the time this morning to finalise
this job. The good news is that if all the bundles required are there
we can next create a features file to deploy easily OpenEJB. After
rebooting Felix will resolve correctly the dependencies

Regards,

Charles Moulliard

Apache Committer

Blog : http://cmoulliard.blogspot.com
Twitter : http://twitter.com/cmoulliard
Linkedin : http://www.linkedin.com/in/charlesmoulliard
Skype: cmoulliard



On Fri, Jul 8, 2011 at 12:34 PM, Jacek Laskowski-2 [via OpenEJB]
<ml...@n4.nabble.com> wrote:
> On Fri, Jul 8, 2011 at 11:46 AM, Charles Moulliard <[hidden email]> wrote:
>> Here is the ticket + instructions to deploy and reproduce the error :
>>
>> https://issues.apache.org/jira/browse/OPENEJB-1627
>
> Thanks! I'm getting the following errors after I deployed the very
> first 4 bundles:
>
> ERROR: Bundle org.apache.servicemix.specs.jaxws-api-2.2 [53] Error
> starting
> mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxws-api-2.2/1.7.0
> (org.osgi.framework.BundleException: Unresolved constraint in bundle
> org.apache.servicemix.specs.jaxws-api-2.2 [53]: Unable to resolve
> 53.0: missing requirement [53.0] package;
> (&(package=javax.xml.soap)(version>=1.3.0)))
> org.osgi.framework.BundleException: Unresolved constraint in bundle
> org.apache.servicemix.specs.jaxws-api-2.2 [53]: Unable to resolve
> 53.0: missing requirement [53.0] package;
> (&(package=javax.xml.soap)(version>=1.3.0))
>
> What bundle is supposed to export (package=javax.xml.soap)(version>=1.3.0)?
>
> Jacek
>
> --
> Jacek Laskowski
> Java EE, functional languages and IBM WebSphere - http://blog.japila.pl
> Warszawa JUG conference = Confitura (formerly Javarsovia) ::
> http://confitura.pl
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://openejb.979440.n4.nabble.com/Issue-with-openejb-on-OSGI-tp3643290p3653666.html
> To unsubscribe from Issue with openejb on OSGI, click here.


--
View this message in context: http://openejb.979440.n4.nabble.com/Issue-with-openejb-on-OSGI-tp3643290p3653673.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Issue with openejb on OSGI

Posted by Jacek Laskowski <ja...@japila.pl>.
On Fri, Jul 8, 2011 at 11:46 AM, Charles Moulliard <cm...@gmail.com> wrote:
> Here is the ticket + instructions to deploy and reproduce the error :
>
> https://issues.apache.org/jira/browse/OPENEJB-1627

Thanks! I'm getting the following errors after I deployed the very
first 4 bundles:

ERROR: Bundle org.apache.servicemix.specs.jaxws-api-2.2 [53] Error
starting mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxws-api-2.2/1.7.0
(org.osgi.framework.BundleException: Unresolved constraint in bundle
org.apache.servicemix.specs.jaxws-api-2.2 [53]: Unable to resolve
53.0: missing requirement [53.0] package;
(&(package=javax.xml.soap)(version>=1.3.0)))
org.osgi.framework.BundleException: Unresolved constraint in bundle
org.apache.servicemix.specs.jaxws-api-2.2 [53]: Unable to resolve
53.0: missing requirement [53.0] package;
(&(package=javax.xml.soap)(version>=1.3.0))

What bundle is supposed to export (package=javax.xml.soap)(version>=1.3.0)?

Jacek

-- 
Jacek Laskowski
Java EE, functional languages and IBM WebSphere - http://blog.japila.pl
Warszawa JUG conference = Confitura (formerly Javarsovia) :: http://confitura.pl

Re: Issue with openejb on OSGI

Posted by Charles Moulliard <cm...@gmail.com>.
Here is the ticket + instructions to deploy and reproduce the error :

https://issues.apache.org/jira/browse/OPENEJB-1627

--
View this message in context: http://openejb.979440.n4.nabble.com/Issue-with-openejb-on-OSGI-tp3643290p3653586.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Issue with openejb on OSGI

Posted by Jacek Laskowski <ja...@japila.pl>.
On Tue, Jul 5, 2011 at 4:24 PM, Charles Moulliard <cm...@gmail.com> wrote:
> Here is what we see in karaf console when openejb is started.

Thanks. I'll be looking into it and provide a patch. I'll be however
testing using a simple OSGi execution environment with felix/equinox
launched on the command line (or a variant thereof). How should I test
it out with karaf? How do you run it? A bit of introduction would be
of a great help to me.

Jacek

-- 
Jacek Laskowski
Java EE, functional languages and IBM WebSphere - http://blog.japila.pl
Warszawa JUG conference = Confitura (formerly Javarsovia) :: http://confitura.pl

Re: Issue with openejb on OSGI

Posted by Charles Moulliard <cm...@gmail.com>.
Here is what we see in karaf console when openejb is started. So it scans it
own bundle and some linked to it. This is not very nice. We should improve
that for the future using by example Apache Felix Install or something
equivalent


[Deployer] Bundle org.apache.servicemix.specs.stax-api-1.0 has been started
[Deployer] Checking whether it's an EJB module
ERROR: Bundle org.apache.openejb.core-osgi [198] EventDispatcher: Error
during dispatch. (java.lang.NullPointerException)
java.lang.NullPointerException
	at org.apache.openejb.core.osgi.impl.Deployer.deploy(Deployer.java:59)
	at
org.apache.openejb.core.osgi.impl.Deployer.bundleChanged(Deployer.java:45)
	at
org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:807)
	at
org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:729)
	at
org.apache.felix.framework.util.EventDispatcher.run(EventDispatcher.java:949)
	at
org.apache.felix.framework.util.EventDispatcher.access$000(EventDispatcher.java:54)
	at
org.apache.felix.framework.util.EventDispatcher$1.run(EventDispatcher.java:106)
	at java.lang.Thread.run(Thread.java:680)
[Deployer] Bundle org.apache.servicemix.specs.jaxws-api-2.2 has been started
[Deployer] Checking whether it's an EJB module
ERROR: Bundle org.apache.openejb.core-osgi [198] EventDispatcher: Error
during dispatch. (java.lang.NullPointerException)
java.lang.NullPointerException
	at org.apache.openejb.core.osgi.impl.Deployer.deploy(Deployer.java:59)
	at
org.apache.openejb.core.osgi.impl.Deployer.bundleChanged(Deployer.java:45)
	at
org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:807)
	at
org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:729)
	at
org.apache.felix.framework.util.EventDispatcher.run(EventDispatcher.java:949)
	at
org.apache.felix.framework.util.EventDispatcher.access$000(EventDispatcher.java:54)
	at
org.apache.felix.framework.util.EventDispatcher$1.run(EventDispatcher.java:106)
	at java.lang.Thread.run(Thread.java:680)
[Deployer] Bundle org.apache.geronimo.specs.geronimo-interceptor_1.1_spec
has been started
[Deployer] Checking whether it's an EJB module
ERROR: Bundle org.apache.openejb.core-osgi [198] EventDispatcher: Error
during dispatch. (java.lang.NullPointerException)
java.lang.NullPointerException
	at org.apache.openejb.core.osgi.impl.Deployer.deploy(Deployer.java:59)
	at
org.apache.openejb.core.osgi.impl.Deployer.bundleChanged(Deployer.java:45)
	at
org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:807)
	at
org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:729)
	at
org.apache.felix.framework.util.EventDispatcher.run(EventDispatcher.java:949)
	at
org.apache.felix.framework.util.EventDispatcher.access$000(EventDispatcher.java:54)
	at
org.apache.felix.framework.util.EventDispatcher$1.run(EventDispatcher.java:106)
	at java.lang.Thread.run(Thread.java:680)
[Deployer] Bundle org.apache.servicemix.bundles.commons-beanutils has been
started
[Deployer] Checking whether it's an EJB module
ERROR: Bundle org.apache.openejb.core-osgi [198] EventDispatcher: Error
during dispatch. (java.lang.NullPointerException)
java.lang.NullPointerException
	at org.apache.openejb.core.osgi.impl.Deployer.deploy(Deployer.java:59)
	at
org.apache.openejb.core.osgi.impl.Deployer.bundleChanged(Deployer.java:45)
	at
org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:807)
	at
org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:729)
	at
org.apache.felix.framework.util.EventDispatcher.run(EventDispatcher.java:949)
	at
org.apache.felix.framework.util.EventDispatcher.access$000(EventDispatcher.java:54)
	at
org.apache.felix.framework.util.EventDispatcher$1.run(EventDispatcher.java:106)
	at java.lang.Thread.run(Thread.java:680)
[Deployer] Bundle org.apache.servicemix.bundles.xpp3 has been started
[Deployer] Checking whether it's an EJB module
ERROR: Bundle org.apache.openejb.core-osgi [198] EventDispatcher: Error
during dispatch. (java.lang.NullPointerException)
java.lang.NullPointerException
	at org.apache.openejb.core.osgi.impl.Deployer.deploy(Deployer.java:59)
	at
org.apache.openejb.core.osgi.impl.Deployer.bundleChanged(Deployer.java:45)
	at
org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:807)
	at
org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:729)
	at
org.apache.felix.framework.util.EventDispatcher.run(EventDispatcher.java:949)
	at
org.apache.felix.framework.util.EventDispatcher.access$000(EventDispatcher.java:54)
	at
org.apache.felix.framework.util.EventDispatcher$1.run(EventDispatcher.java:106)
	at java.lang.Thread.run(Thread.java:680)


Regards,

Charles

--
View this message in context: http://openejb.979440.n4.nabble.com/Issue-with-openejb-on-OSGI-tp3643290p3646093.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Issue with openejb on OSGI

Posted by Charles Moulliard <cm...@gmail.com>.
No, I will make a test with Apache bval.

Regards,

Charles

--
View this message in context: http://openejb.979440.n4.nabble.com/Issue-with-openejb-on-OSGI-tp3643290p3645866.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Issue with openejb on OSGI

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,

did you deploy apache bval bundle?

- Romain

2011/7/5 Charles Moulliard <cm...@gmail.com>

> Hi,
>
> OpenEJB is able to scan apps directory and has tried to deploy an EJB
> module
> packaged in a jar. But during the deployment process, I get this error :
>
>
> 08:35:34,008 | ERROR | FelixStartLevel  | root
> |
> pache.openejb.util.JuliLogStream   95 |  -  -  | Application could not be
> deployed:
>
> /Users/charlesmoulliard/Applications/apache-karaf-2.2.1-dosgi/apps/camel-example-remote-ejb-2.8-SNAPSHOT.jar
> org.apache.openejb.OpenEJBException: Creating application failed:
>
> /Users/charlesmoulliard/Applications/apache-karaf-2.2.1-dosgi/apps/camel-example-remote-ejb-2.8-SNAPSHOT.jar:
> Could not create Configuration.
>        at
>
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:796)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
>        at
>
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:466)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
>        at
>
> org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:376)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
>        at
>
> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:288)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
>        at
>
> org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:130)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
>        at
>
> org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:63)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
>        at
>
> org.apache.openejb.OpenEJB.init(OpenEJB.java:276)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
>        at
>
> org.apache.openejb.OpenEJB.init(OpenEJB.java:255)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)[:1.6.0_24]
>        at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_24]
>        at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_24]
>        at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_24]
>        at
>
> org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)[126:org.apache.openejb.loader:4.0.0.SNAPSHOT]
>        at
>
> org.apache.openejb.core.osgi.impl.Activator.start(Activator.java:55)[198:org.apache.openejb.core-osgi:4.0.0.SNAPSHOT]
>        at
>
> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:629)[org.apache.felix.framework-3.0.9.jar:]
>        at
>
> org.apache.felix.framework.Felix.activateBundle(Felix.java:1842)[org.apache.felix.framework-3.0.9.jar:]
>        at
>
> org.apache.felix.framework.Felix.startBundle(Felix.java:1759)[org.apache.felix.framework-3.0.9.jar:]
>        at
>
> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1163)[org.apache.felix.framework-3.0.9.jar:]
>        at
>
> org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)[org.apache.felix.framework-3.0.9.jar:]
>        at java.lang.Thread.run(Thread.java:680)[:1.6.0_24]
> Caused by: javax.validation.ValidationException: Could not create
> Configuration.
>        at
>
> javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:175)
>        at
>
> org.apache.openejb.assembler.classic.ValidatorBuilder.getConfig(ValidatorBuilder.java:97)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
>        at
>
> org.apache.openejb.assembler.classic.ValidatorBuilder.buildFactory(ValidatorBuilder.java:70)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
>        at
>
> org.apache.openejb.assembler.classic.ValidatorBuilder.buildFactory(ValidatorBuilder.java:42)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
>        at
>
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:535)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
>        ... 19 more
> Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>        at java.util.ArrayList.RangeCheck(ArrayList.java:547)[:1.6.0_24]
>        at java.util.ArrayList.get(ArrayList.java:322)[:1.6.0_24]
>        at
>
> javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:173)
>        ... 23 more
>
> Regards,
>
> Charles
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Issue-with-openejb-on-OSGI-tp3643290p3645204.html
> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>

Re: Issue with openejb on OSGI

Posted by Charles Moulliard <cm...@gmail.com>.
Hi,

OpenEJB is able to scan apps directory and has tried to deploy an EJB module
packaged in a jar. But during the deployment process, I get this error :


08:35:34,008 | ERROR | FelixStartLevel  | root                             |
pache.openejb.util.JuliLogStream   95 |  -  -  | Application could not be
deployed: 
/Users/charlesmoulliard/Applications/apache-karaf-2.2.1-dosgi/apps/camel-example-remote-ejb-2.8-SNAPSHOT.jar
org.apache.openejb.OpenEJBException: Creating application failed:
/Users/charlesmoulliard/Applications/apache-karaf-2.2.1-dosgi/apps/camel-example-remote-ejb-2.8-SNAPSHOT.jar:
Could not create Configuration.
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:796)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:466)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
	at
org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:376)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
	at
org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:288)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
	at
org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:130)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
	at
org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:63)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
	at
org.apache.openejb.OpenEJB.init(OpenEJB.java:276)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
	at
org.apache.openejb.OpenEJB.init(OpenEJB.java:255)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_24]
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_24]
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_24]
	at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_24]
	at
org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)[126:org.apache.openejb.loader:4.0.0.SNAPSHOT]
	at
org.apache.openejb.core.osgi.impl.Activator.start(Activator.java:55)[198:org.apache.openejb.core-osgi:4.0.0.SNAPSHOT]
	at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:629)[org.apache.felix.framework-3.0.9.jar:]
	at
org.apache.felix.framework.Felix.activateBundle(Felix.java:1842)[org.apache.felix.framework-3.0.9.jar:]
	at
org.apache.felix.framework.Felix.startBundle(Felix.java:1759)[org.apache.felix.framework-3.0.9.jar:]
	at
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1163)[org.apache.felix.framework-3.0.9.jar:]
	at
org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)[org.apache.felix.framework-3.0.9.jar:]
	at java.lang.Thread.run(Thread.java:680)[:1.6.0_24]
Caused by: javax.validation.ValidationException: Could not create
Configuration.
	at
javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:175)
	at
org.apache.openejb.assembler.classic.ValidatorBuilder.getConfig(ValidatorBuilder.java:97)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
	at
org.apache.openejb.assembler.classic.ValidatorBuilder.buildFactory(ValidatorBuilder.java:70)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
	at
org.apache.openejb.assembler.classic.ValidatorBuilder.buildFactory(ValidatorBuilder.java:42)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:535)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
	... 19 more
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at java.util.ArrayList.RangeCheck(ArrayList.java:547)[:1.6.0_24]
	at java.util.ArrayList.get(ArrayList.java:322)[:1.6.0_24]
	at
javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:173)
	... 23 more

Regards,

Charles

--
View this message in context: http://openejb.979440.n4.nabble.com/Issue-with-openejb-on-OSGI-tp3643290p3645204.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Issue with openejb on OSGI

Posted by Jacek Laskowski <ja...@japila.pl>.
On Tue, Jul 5, 2011 at 12:45 PM, Romain Manni-Bucau
<rm...@gmail.com> wrote:

> i answer because to be able to deploy ejbmodule as bundle could be nice for
> me too, it is my use case ;)

Well, to be honest, a mere bundle doesn't add much to what you can do
with an EJB module :) You can do it right away with any jar provided
it has Bundle-SymbolicName and Bundle-ManifestVersion (I think turning
them into optional attrs would be a step into a right direction).

Jacek

-- 
Jacek Laskowski
Java EE, functional languages and IBM WebSphere - http://blog.japila.pl
Warszawa JUG conference = Confitura (formerly Javarsovia) :: http://confitura.pl

Re: Issue with openejb on OSGI

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi Jacek,

i answer because to be able to deploy ejbmodule as bundle could be nice for
me too, it is my use case ;). I have some other priorities  about OpenEJB
nowdays but if help is needed i could certainly participate a bit.

- Romain

2011/7/5 Jacek Laskowski <ja...@japila.pl>

> On Tue, Jul 5, 2011 at 9:03 AM, Charles Moulliard <cm...@gmail.com>
> wrote:
> > The patch of Jacek is already implemented in openEJB - 4.0-SNAPSHOT.
>
> Hi Charles,
>
> I thought I could manage openejb mailing flow and don't get
> distracted, but it's getting more and more...disturbing (meaning
> 'attractive'). I always wanted to see more osgi in openejb and what
> you could find is my understanding of how it was supposed to look at
> that time. I'm more experienced in osgi now and would rewrite it all
> from scratch.
>
> Where I could see improvements is how ejbs are found and tracked.
> BundleListener should likely be morphed to tracker (similar to what
> webapps are handled). EJBs should be scanned appropriately, according
> to osgi packaging and visibility rules.
>
> I can't claim I'll find time for this, but before delving into
> discussion about my availability, let's focus on your requirements.
> What do you want to achieve with osgi and openejb? A use case would be
> very helpful.
>
> Jacek
>
> --
> Jacek Laskowski
> Java EE, functional languages and IBM WebSphere - http://blog.japila.pl
> Warszawa JUG conference = Confitura (formerly Javarsovia) ::
> http://confitura.pl
>

Re: Issue with openejb on OSGI

Posted by Jacek Laskowski <ja...@japila.pl>.
On Tue, Jul 5, 2011 at 9:03 AM, Charles Moulliard <cm...@gmail.com> wrote:
> The patch of Jacek is already implemented in openEJB - 4.0-SNAPSHOT.

Hi Charles,

I thought I could manage openejb mailing flow and don't get
distracted, but it's getting more and more...disturbing (meaning
'attractive'). I always wanted to see more osgi in openejb and what
you could find is my understanding of how it was supposed to look at
that time. I'm more experienced in osgi now and would rewrite it all
from scratch.

Where I could see improvements is how ejbs are found and tracked.
BundleListener should likely be morphed to tracker (similar to what
webapps are handled). EJBs should be scanned appropriately, according
to osgi packaging and visibility rules.

I can't claim I'll find time for this, but before delving into
discussion about my availability, let's focus on your requirements.
What do you want to achieve with osgi and openejb? A use case would be
very helpful.

Jacek

-- 
Jacek Laskowski
Java EE, functional languages and IBM WebSphere - http://blog.japila.pl
Warszawa JUG conference = Confitura (formerly Javarsovia) :: http://confitura.pl

Re: Issue with openejb on OSGI

Posted by Charles Moulliard <cm...@gmail.com>.
The patch of Jacek is already implemented in openEJB - 4.0-SNAPSHOT.

--
View this message in context: http://openejb.979440.n4.nabble.com/Issue-with-openejb-on-OSGI-tp3643290p3645231.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Issue with openejb on OSGI

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,

from this post  (
http://openejb.979440.n4.nabble.com/Fwd-svn-commit-r831104-openejb-trunk-sandbox-openejb-osgi-openejb-core-osgi-src-main-java-org-apachea-td988201.html)
Jacek worked on it.

But it is open source ;)

However, did you try to create a conf folder adding an openejb.xml with a
deployment directory? I never tried it into an OSGi container but i guess it
could work.

- Romain


2011/7/4 Charles Moulliard <cm...@gmail.com>

> Hi,
>
> Maybe we need 2 different approaches - one allowing to deploy an EJB module
> as a bundle and using a service to register it, the other using openEJB as
> a
> container scanning into a directory for EAR files to be deployed.
>
> Do you know who is the owner of this class Deployer ?
>
> Regards,
>
> Charles
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Issue-with-openejb-on-OSGI-tp3643290p3643792.html
> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>

Re: Issue with openejb on OSGI

Posted by Charles Moulliard <cm...@gmail.com>.
Hi,

Maybe we need 2 different approaches - one allowing to deploy an EJB module
as a bundle and using a service to register it, the other using openEJB as a
container scanning into a directory for EAR files to be deployed.

Do you know who is the owner of this class Deployer ? 

Regards,

Charles

--
View this message in context: http://openejb.979440.n4.nabble.com/Issue-with-openejb-on-OSGI-tp3643290p3643792.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Issue with openejb on OSGI

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,

some mounth ago openejb needed ejb-jar to be able to deploy a module. I
think the osgi integration was written before openejb scans annotations to
discover modules.

The use case was: you deploy an ejb module as a bundle and you want to
deploy your webservices/ejbs... it should work.

- Romain

2011/7/4 Charles Moulliard <cm...@gmail.com>

> I have been able to find the bundles required to deploy OpenEJB
> 4.0-SNASPHOT on Apache Karaf 2.2.1. Unfortunately, I get this error at
> the launch
>
> Starting OpenEJB...
> FATAL ERROR WHILE CONFIGURING LOGGING!!!. MISSING embedded.juli.properties
> FILE
> FATAL ERROR WHILE CONFIGURING LOGGING!!!. MISSING embedded.juli.properties
> FILE
> Apache OpenEJB ${pom.version}    build:
> @DATE-REPLACED-BY-MAVEN@-@TIME-REPLACED-BY-MAVEN@
> http://openejb.apache.org/
> Registering OSGified OpenEJB Deployer...
> [Deployer] Bundle org.apache.openejb.core-osgi has been started
> [Deployer] Checking whether it's an EJB module
> ERROR: Bundle org.apache.openejb.core-osgi [198] EventDispatcher:
> Error during dispatch. (java.lang.NullPointerException)
> java.lang.NullPointerException
>       at
> org.apache.openejb.core.osgi.impl.Deployer.deploy(Deployer.java:58)
>       at
> org.apache.openejb.core.osgi.impl.Deployer.bundleChanged(Deployer.java:45)
>       at
>
> org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:807)
>       at
>
> org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:729)
>       at
>
> org.apache.felix.framework.util.EventDispatcher.run(EventDispatcher.java:949)
>       at
>
> org.apache.felix.framework.util.EventDispatcher.access$000(EventDispatcher.java:54)
>       at
>
> org.apache.felix.framework.util.EventDispatcher$1.run(EventDispatcher.java:106)
>       at java.lang.Thread.run(Thread.java:680)
>
> According to the code,
>
> public class Deployer implements BundleListener {
>
>    public void bundleChanged(BundleEvent event) {
>        switch (event.getType()) {
>        case BundleEvent.STARTED:
>            deploy(event.getBundle());
>            break;
>        case BundleEvent.STOPPED:
>            undeploy(event.getBundle());
>            break;
>        }
>    }
>
>    private void deploy(Bundle bundle) {
>        System.out.println(String.format("[Deployer] Bundle %s has been
> started", bundle.getSymbolicName()));
>
>        System.out.println(String.format("[Deployer] Checking whether it's
> an EJB module"));
>
>        Enumeration<?> e = bundle.findEntries("META-INF", "ejb-jar.xml",
> false);
>
>  the deployer tries to find into META-INF file of the bundle
> org.apache.openejb.core-osgi an ejb-jar.xml file. This is a bit curious as
> the Deployer class should be used to scan by example apps directory
> containing EAR or WAR files to be deployed.
>
> Does anybody knows the reason why the class is coded like that ?
>
> Regards,
>
>
> Charles
> Apache Committer - ServiceMix, Karaf & Camel
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Issue-with-openejb-on-OSGI-tp3643290p3643290.html
> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>