Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [gemini-dev] Blueprint/JPA problem

Blueprint cannot pickup your bundle since you have another copy of the
Blueprint classes in there (through the Require-Bundle). Instead of
importing the same packages the extender uses (or not importing them at
all unless you actually use the Blueprint API) you are making your own
copy through Require-Bundle.

To solve the problem, get rid of the Require-Bundle directive. In
general it's best not to use it...

On 2/23/2011 7:47 PM, Shaun Smith wrote:
> I'm working on the Gemini/Virgo tutorial for EclipseCon and am having
> trouble with Blueprint and JPA and hope someone can help.
> 
> I've worked my way up from injecting the PackageAdmin service to a JDBC
> DataSourceFactory published by DB Access and now onto an
> EntityManagerFactoryService published by Gemini JPA.  Unfortunately when
> I start the framework I get:
> 
>     23-Feb-2011 12:42:34 PM
>     org.eclipse.gemini.blueprint.extender.internal.blueprint.activator.support.BlueprintContainerCreator
>     createApplicationContext
>     INFO: Discovered configurations
>     {bundleentry://16.fwk7214088/OSGI-INF/blueprint/echo.xml} in bundle
>     [JPA Example (shaun.blueprint.jpa)]
>     23-Feb-2011 12:42:34 PM
>     org.eclipse.gemini.blueprint.extender.internal.activator.LifecycleManager
>     maybeCreateApplicationContextFor
>     INFO: *Bundle JPA Example is not type compatible with extender
>     gemini-blueprint-extender (Incubation); ignoring bundle...*
> 
> Can anyone offer advice on debugging the issue and on what Blueprint
> bundles/packages a Blueprint "client" bundle should include? 
> 
> Manifest etc. below.
> 
>     Shaun
> 
> *Manifest.mf*
> 
>     Manifest-Version: 1.0
>     Bundle-ManifestVersion: 2
>     Bundle-Name: Example
>     Bundle-SymbolicName: shaun.blueprint.jpa
>     Bundle-Version: 1.0.0.qualifier
>     Bundle-RequiredExecutionEnvironment: JavaSE-1.6
>     Import-Package: javax.persistence;version="1.1.0";jpa="2.0"
>     Require-Bundle: org.eclipse.gemini.blueprint.core;bundle-version="1.0.0"
> 
> *Blueprint Config:
> 
> *<?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0";>
> 
>    <bean id="echoservice" class="shaun.EchoBean" />
> 
>     <service ref="echoservice" interface="shaun.Echo"
>         depends-on="aService">
>     </service>
> 
>     <reference id="aService"
> interface="javax.persistence.EntityManagerFactory"
>         availability="mandatory">
>         <reference-listener bind-method="bindService"
>             unbind-method="unbindService">
>             <ref component-id="echoservice" />
>         </reference-listener>
>     </reference>
> </blueprint>*
> 
> Run Config:*
> 
> 
> 
> -- 
> Oracle <http://www.oracle.com>
> Shaun Smith | Principal Product Manager
> Phone: +1.905.502.3094 | Mobile: +1.416.558.6244
> Oracle Fusion Middleware, TopLink
> ORACLE Canada | 110 Matheson Boulevard West, Suite 100, Mississauga,
> Ontario | L5R 3P4
> Green Oracle <http://www.oracle.com/commitment> Oracle is committed to
> developing practices and products that help protect the environment

-- 
Costin


Back to the top