No, just adding:

Bundle-ClassPath:
  ...,
  META-INF/ejb-jar.xml

to openejb bundle's Manifest.mf does not change anything, the same
exception. 
Question: is OpenEJB capable to look for META-INF/ejb-jar.xml in other
bundles/plugins? At least I heard that Hibernate does a special search for
META-INF/persistence.xml in the case of bundle environment. Is OpenEJB
limited to just file system search?

Donatas

-----Original Message-----
From: Donatas Ciuksys [mailto:[email protected]] 
Sent: Sunday, January 25, 2009 11:39 PM
To: [email protected]
Subject: RE: Using OpenEJB in Eclipse RCP application

Hi Daniel,

Thanks for your fast reply!
Below is a copy of my Manifest.mf. 

Answering your question: No, ejb-jar.xml is not on my Bundle-ClassPath.
What I changed - I have just added a line:

    Eclipse-BuddyPolicy: registered

Also I added a line to my primary plugin's Manifest.mf (that contains
META-INF/ejb-jar.xml):

    Eclipse-RegisterBuddy: openejb

I hoped that this would be enough for openejb to get access to the classpath
of my primary plug-in (that was enough for HibernateEntityManager to find my
entities in different project).

Question: what should I write to Bundle-ClassPath? Something like this:

    META-INF/ejb-jar.xml

? I'll try :)

Greetings,
Donatas


Manifest.mf:

------------------------------------------------------------------------
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Openejb Plug-in
Bundle-SymbolicName: openejb
Bundle-Version: 1.0.0
Eclipse-BuddyPolicy: registered
Bundle-ClassPath: activeio-core-3.0.0-incubator.jar,
 activemq-core-4.1.1.jar,
 activemq-ra-4.1.1.jar,
 asm-finder-3.1.jar,
 backport-util-concurrent-2.1.jar,
 commons-cli-1.1.jar,
 ... << skipped for brevity, all jar's found in openejb distribution's lib
folder are listed here >>

Export-Package: com.ctc.wstx.api,
 com.ctc.wstx.cfg,
 com.ctc.wstx.compat,
 com.ctc.wstx.dom,
 com.ctc.wstx.dtd,
 ... << skipped for brevity; auto-generated by Eclipse wizard "Plugin from
existing jar" >>

Require-Bundle: log4j;bundle-version="1.0.0"
-----------------------------------------------------------------------

-----Original Message-----
From: Daniel S. Haischt [mailto:[email protected]] 
Sent: Sunday, January 25, 2009 3:18 PM
To: [email protected]
Subject: Re: Using OpenEJB in Eclipse RCP application

Hey Donatas,

do you mind to send your plugin Manifest.mf files to the list (I
suspect you need to copy & paste them into your mail instead of
attaching them cause otherwise the mailing list manager is going to
strip them from your message). I am curious how your Bundle-ClassPath
is setup.

What I want to make sure is that your ejb-jar.xml is part of your
Bundle-ClassPath and thus can be found by the bundle class loader.

Regards
Daniel S. Haischt

On Fri, Jan 23, 2009 at 11:22 PM, Donatas Ciuksys
<[email protected]> wrote:
> Hi,
>
> I'm trying to build Eclipse RCP application and use OpenEJB as a local
> server. RCP application has two plugins: main plugin (that creates UI) and
> OpenEJB (created using "Plugin from JAR archives" wizard, including all
the
> jar files in its lib directory). Main plugin will contain several EJB
> session beans.
> Problem: even if I setup eclipse buddy policies, OpenEJB still cannot see
my
> META-INF/ejb-jar.xml (though it is in my main plugins path). If fails with
> exceptions shown below. I guess it has trouble looking for resources in
jar
> archives. Could you please help me with this problem?
>
> Regards,
> Donatas
>
> Apache OpenEJB 3.1    build: 20081009-03:31
> http://openejb.apache.org/
> INFO - openejb.home = F:\Programs\eclipse-rrt
> INFO - openejb.base = F:\Programs\eclipse-rrt
> INFO - Configuring Service(id=Default Security Service,
> type=SecurityService, provider-id=Default Security Service)
> INFO - Configuring Service(id=Default Transaction Manager,
> type=TransactionManager, provider-id=Default Transaction Manager)
> INFO - Configuring Service(id=movieDatabase, type=Resource,
> provider-id=Default JDBC Database)
> ERROR - FATAL ERROR: Unknown error in Assembler.  Please send the
following
> stack trace and this message to [email protected] :
>  java.lang.NullPointerException
>        at
>
org.apache.openejb.config.DeploymentLoader.getWebDescriptors(DeploymentLoade
> r.java:953)
>        at
>
org.apache.openejb.config.DeploymentLoader.discoverModuleType(DeploymentLoad
> er.java:1060)
>        at
>
org.apache.openejb.config.DeploymentsResolver.processUrls(DeploymentsResolve
> r.java:298)
>        at
>
org.apache.openejb.config.DeploymentsResolver.loadFromClasspath(DeploymentsR
> esolver.java:252)
>        at
>
org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(Confi
> gurationFactory.java:350)
>        at
>
org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assem
> bler.java:297)
>        at
> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:276)
>        at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:150)
>        at org.apache.openejb.OpenEJB.init(OpenEJB.java:299)
>        at org.apache.openejb.OpenEJB.init(OpenEJB.java:278)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
>        at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at
> org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
>        at
>
org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContex
> tFactory.java:69)
>        at
>
org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContex
> tFactory.java:52)
>        at
>
org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(Local
> InitialContextFactory.java:41)
>        at
> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
>        at
> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
>        at javax.naming.InitialContext.init(InitialContext.java:223)
>        at javax.naming.InitialContext.<init>(InitialContext.java:197)
>        at lt.mitsoft.Application.init(Application.java:98)
>        at lt.mitsoft.Application.start(Application.java:40)
>        at
>
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:
> 193)
>        at
>
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(
> EclipseAppLauncher.java:110)
>        at
>
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAp
> pLauncher.java:79)
>        at
>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
>        at
>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
>        at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
>        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
>        at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
>        at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
>
>


Reply via email to