I did the same thing this weekend, and had nothing but problems even after I
included mimepull.jar. I ended up upgrading to v3.1 (since I believe it is
at Jersey 1.5 now). Especially now that it's final, its probably the best
approach to go, rather than upgrading the way it's suggested in the
userguide.
From: NBW [mailto:emailnbw_at_gmail.com]
Sent: February-28-11 2:14 PM
To: users
Subject: [Jersey] Problems with GFv3.01 upgrade of Jersey components
Hi folks,
I followed the instructions [1] in the Jersey 1.5 User's Guide for upgrading
Jersey in GFv3.01. After removing the JARs listed and installing the ones
from
<
http://download.java.net/maven/2/com/sun/jersey/glassfish/v3/jersey-gfv3-co
re/1.5/jersey-gfv3-core-1.5-project.zip> jersey-gfv3-core-1.5-project.zip I
got the following error on server startup and it essentially hung the
process:
[#|2011-02-28T13:26:17.091-0500|WARNING|oracle-glassfish3.0.1|org.jvnet.hk2.
osgimain|_ThreadID=11;_ThreadName=Thread-1;|Exception while starting bundle
com.sun.enterprise.osgi-adapter [213]
org.osgi.framework.BundleException: Activator start error in bundle
com.sun.enterprise.osgi-adapter [213].
at
org.apache.felix.framework.Felix.activateBundle(Felix.java:1751)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1622)
at
org.apache.felix.framework.BundleImpl.start(BundleImpl.java:915)
at org.jvnet.hk2.osgimain.Main.start(Main.java:140)
at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.jav
a:640)
at
org.apache.felix.framework.Felix.activateBundle(Felix.java:1700)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1622)
at
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1077)
at
org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
at java.lang.Thread.run(Thread.java:662)
Caused by: com.sun.enterprise.module.ResolveError: Failed to start Bundle Id
[209] State [INSTALLED]
[org.glassfish.webservices.connector(Connector for GlassFish Web Services
Container):3.0.1]
at
org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:174)
at
org.jvnet.hk2.osgiadapter.OSGiModuleImpl$2$1$1.loadClass(OSGiModuleImpl.java
:341)
at
com.sun.hk2.component.LazyInhabitant.fetch(LazyInhabitant.java:91)
at
com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:106)
at
com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java
:60)
at org.jvnet.hk2.component.Habitat$1.get(Habitat.java:276)
at java.util.AbstractList$Itr.next(AbstractList.java:345)
at
java.util.AbstractCollection.toArray(AbstractCollection.java:124)
at java.util.ArrayList.addAll(ArrayList.java:472)
at
com.sun.enterprise.v3.server.SnifferManagerImpl.getSniffers(SnifferManagerIm
pl.java:81)
at
com.sun.enterprise.v3.server.SnifferManagerImpl.getSniffer(SnifferManagerImp
l.java:109)
at
com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(App
licationLoaderService.java:346)
at
com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(Applicat
ionLoaderService.java:185)
at
com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:174)
at
com.sun.hk2.component.ConstructorWomb$1.run(ConstructorWomb.java:87)
at java.security.AccessController.doPrivileged(Native Method)
at
com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:84)
at
com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:77)
at
com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:58)
at
com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:107)
at
com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java
:60)
at
com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:236)
at
com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:12
8)
at
com.sun.enterprise.module.bootstrap.Main.launch(Main.java:457)
at
com.sun.enterprise.module.bootstrap.Main.launch(Main.java:401)
at org.jvnet.hk2.osgiadapter.HK2Main.start(HK2Main.java:125)
at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.jav
a:640)
at
org.apache.felix.framework.Felix.activateBundle(Felix.java:1700)
... 9 more
Caused by: org.osgi.framework.BundleException: Unresolved constraint in
bundle com.sun.xml.ws [210]: package; (package=org.jvnet.mimepull)
at
org.apache.felix.framework.Felix.resolveBundle(Felix.java:3263)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1597)
at
org.apache.felix.framework.BundleImpl.start(BundleImpl.java:915)
at
org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:166)
... 36 more
|#]
I put the mimepull.jar back into the glassfish\modules directory, cleared
out the felix cache again and started the server. Putting that jar back
seemed to fix things. My question is, is this a problem with the User's
Guide in that it instructs to remove the mimepull.jar or is this a problem
with the ZIP file in that it should include a mimepull.jar but doesn't?
Thanks,
-Noah
[1] -
http://jersey.java.net/nonav/documentation/latest/user-guide.html#d4e1877