PDA

View Full Version : Hunting for a fragment bundle



iserv
May 22nd, 2009, 10:53 AM
Hi all,

I think I'm close to successfuly upload my first real world bundle to dm-server, but now I can't solve this:



osgi> start com.springsource.org.hibernate.annotations
org.osgi.framework.BundleException: A fragment bundle cannot be started: file:////home/mauricio/dm-server-1.0.2.RELEASE/repository/bundles/usr/com.springsource.org.hibernate.annotations-3.3.0.ga.jar [24]
at org.eclipse.osgi.framework.internal.core.BundleFra gment.startWorker(BundleFragment.java:224)
at org.eclipse.osgi.framework.internal.core.AbstractB undle.start(AbstractBundle.java:265)
at org.eclipse.osgi.framework.internal.core.AbstractB undle.start(AbstractBundle.java:257)
at org.eclipse.osgi.framework.internal.core.Framework CommandProvider._start(FrameworkCommandProvider.ja va:257)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.springsource.server.management.remote.ServerCo mmandInterpreter.execute(ServerCommandInterpreter. java:102)
at com.springsource.server.management.remote.Standard BundleAdmin.execute(StandardBundleAdmin.java:77)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java :36)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java :243)
at javax.management.modelmbean.RequiredModelMBean.inv okeMethod(RequiredModelMBean.java:1074)
at javax.management.modelmbean.RequiredModelMBean.inv oke(RequiredModelMBean.java:955)
at org.springframework.jmx.export.SpringModelMBean.in voke(SpringModelMBean.java:88)
at com.springsource.server.kernel.dm.ServerModelMBean .invoke(ServerModelMBean.java:51)
at com.sun.jmx.interceptor.DefaultMBeanServerIntercep tor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxM BeanServer.java:761)
at javax.management.remote.rmi.RMIConnectionImpl.doOp eration(RMIConnectionImpl.java:1426)
at javax.management.remote.rmi.RMIConnectionImpl.acce ss$200(RMIConnectionImpl.java:72)
at javax.management.remote.rmi.RMIConnectionImpl$Priv ilegedOperation.run(RMIConnectionImpl.java:1264)
at javax.management.remote.rmi.RMIConnectionImpl.doPr ivilegedOperation(RMIConnectionImpl.java:1359)
at javax.management.remote.rmi.RMIConnectionImpl.invo ke(RMIConnectionImpl.java:788)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastSe rverRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:1 59)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport. java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages( TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandl er.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandl er.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)


I checked the dependencies like this:



osgi> status com.springsource.org.dom4j
Framework is launched.

id Bundle Location
State Bundle File Name
29 file:////home/mauricio/dm-server-1.0.2.RELEASE/repository/bundles/usr/com.springsource.org.dom4j-1.6.1.jar
ACTIVE com.springsource.org.dom4j_1.6.1
Registered Services
{org.osgi.service.packageadmin.PackageAdmin}={serv ice.ranking=2147483647, service.pid=0.com.springsource.server.osgi.framewo rk.equinox.EquinoxOsgiFramework$LockEnforcingPacka geAdmin, service.vendor=Eclipse.org, service.id=1}
...
osgi> status com.springsource.javax.persistence
Framework is launched.

id Bundle Location
State Bundle File Name
19 file:////home/mauricio/dm-server-1.0.2.RELEASE/repository/bundles/ext/com.springsource.javax.persistence-1.0.0.jar
ACTIVE com.springsource.javax.persistence_1.0.0
Registered Services
{org.osgi.service.packageadmin.PackageAdmin}={serv ice.ranking=2147483647, service.pid=0.com.springsource.server.osgi.framewo rk.equinox.EquinoxOsgiFramework$LockEnforcingPacka geAdmin, service.vendor=Eclipse.org, service.id=1}
...


Where is this fragment hiding?

By the way, I agree with what's beeing said in other posts: dm-server is a great job!

Thanks

Maurício

iserv
May 22nd, 2009, 03:21 PM
I guess I misinterpreted the error message in my previous post. My new conclusions are:

1. There is no fragment below com.springsource.org.hibernate.annotations, but com.springsource.org.hibernate.annotations is a fragment itself,
2. If a bundle is ACTIVE, its fragments remain RESOLVED, but this is not a problem.

I would appreciate if somenone can give me directions for a previous post or documentation to better understand this. I'm having a problem to start a context with an old


org.springframework.orm.hibernate3.annotation.Anno tationSessionFactoryBean


where the constructor throws a class not found exception for "AnnotationConfiguration". The latter should be accessible from the fragment bundle above.

Thanks,

Mauricio.

iserv
May 24th, 2009, 03:09 PM
Found the problem to be in the hibernate configuration, thanks anyway.

Glyn Normington
May 25th, 2009, 05:07 AM
Glad you got sorted.