On 6/22/10 8:16 PM, jamie campbell wrote:
> On 10-06-22 06:42 PM, Richard S. Hall wrote:
>>
>>
>> You don't need the trailing semi-colon, that separates the package
>> from any attributes. Was your bundle importing this package when you
>> tried this?
> 
> I've tried with importing and without.  When I have importing, AND I do
> an actual class construction with explicit syntax (eg Driver driv = new
> Driver()) prior to the forName() resolution, it works.  Without having
> an explicit construction statement somewhere prior to forName(), it
> fails...  I don't actually need to use forName() class resolution logic
> in my own bundle, I'm just trying to sandbox the conditions occurring in
> the openjpa bundle so I can get it working.
> 
> I googled my little heart out looking for tutorials for openjpa within
> felix or felix/karaf , but what I found either didn't work or didn't go
> so far as to actually attached to a database and do stuff.  In
> particular I looked at Aries and the samples there have persistence
> classes, but, as far as I can tell they don't go so far as to actually
> serialize, they just get you all the way up to the point of being ABLE
> to serialize once you figure the database part out.
In the case of Aries, they're implementing the OSGi JPA spec, which
AFAIK requires that datasources be retrieved via OSGi services, so you
shouldn't see Class.forName().

By the by, one thing I noticed in your prior emails was this:
org.osgi.framework.bootdelegation=sun.*,com.sun.*,javax.transaction,javax.transaction.*,com.mysql.jdbc.*


I believe having com.mysql.jdbc.* here means any package starting with
"com.mysql.jdbc." but the class you are looking for is *in* com.mysql.jdbc

If the openjpa bundle doesn't have either an explicit import or a
dynamic import, then boot delegation is your only option anyway.

Justin



> 
>>
>> For boot delegation, I think you have to set
>> org.osgi.framework.bundle.parent to "app" in config.properties, but
>> importing is probably better than boot delegation.
> 
> I tried adding the bundle.parent property and setting to both app and
> framework, but didn't have any luck with either setting.
> 
> -Jamie
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
> For additional commands, e-mail: users-h...@felix.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org

Reply via email to