Hi, If you don't wanna import-package com.google.inject in your customer bundle, you should have something like <Import-Package> !com.google.inject,... </Import-Package>
If your customer bundle do need import package com.google.inject, you need firstly install a bundle which export-package com.google.inject anyway. Freeman ------------- Freeman Fang FuseSource Email:[email protected] Web: fusesource.com Twitter: freemanfang Blog: http://freemanfang.blogspot.com http://blog.sina.com.cn/u/1473905042 weibo: http://weibo.com/u/1473905042 On 2012-7-24, at 下午10:32, wagner wrote: > Hi Freeman, > > I have been investigate what could be wrong with my bundle and I will > describe what I found. I think that its can be worthy anyway. > > > *STEP 1* > My firts actions was to activate the my war bundle and it result in a log > below: > > karaf@root> ERROR: Bundle ops4j_pax_war_archetype_fzlbpms_template [238] > Error starting > file:/run/media/wagner/fzlbpms_env/PROGSATIVOS/fzlbpms/integrated/apache-servicemix-4.4.1-fuse-07-11/deploy/ops4j_pax_war_archetype_fzlbpms_template.war > (org.osgi.framework.BundleException: Unresolved constraint in bundle > ops4j_pax_war_archetype_fzlbpms_template [238]: Unable to resolve 238.0: > *missing requirement [238.0] package; (package=android.app))* > org.osgi.framework.BundleException: Unresolved constraint in bundle > ops4j_pax_war_archetype_fzlbpms_template [238]: Unable to resolve 238.0: > missing requirement [238.0] package; (package=android.app) > at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3466) > at org.apache.felix.framework.Felix.startBundle(Felix.java:1739) > at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1168) > at > org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264) > at java.lang.Thread.run(Thread.java:662) > > > > To fix this missing I comment the selenium dependencies of my pom, > > *STEP2 (trying 1)* > but trying to iniciate my war bundle again result in: > > > 09:19:48,844 | WARN | qtp26915030-142 | / | > ? ? | 116 - org.eclipse.jetty.util - > 7.4.5.fuse20111017 | %bundles.pluginTitle: Cannot start > org.osgi.framework.BundleException: Unresolved constraint in bundle > ops4j_pax_war_archetype_fzlbpms_template [239]: *Unable to resolve 239.0: > missing requirement [239.0] package; (package=com.google.inject)* > at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3466) > at org.apache.felix.framework.Felix.startBundle(Felix.java:1739) > at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:927) > at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:914) > at > org.apache.felix.webconsole.internal.core.BundlesServlet.doPost(BundlesServlet.java:298)[233:org.apache.karaf.webconsole.console:2.2.2.fuse-07-11] > > Dealing with this missing, I discover that dwr provide support for guice, > but I am not use this dwr feature and so I exclude this dependencies as > folow, but it not solve the problem > > <dependency> > <groupId>org.directwebremoting</groupId> > <artifactId>dwr</artifactId> > <version>${dwr.version}</version> > <exclusions> > <exclusion> > <groupId>javax.servlet</groupId> > <artifactId>servlet-api</artifactId> > > </exclusion> > <exclusion> > <groupId>com.google.code.guice</groupId> > <artifactId>guice</artifactId> > > </exclusion> > </exclusions> > </dependency> > > * > STEP2 (trying 2)* > The trying was exclude from Import-Package guice like this: > <Import-Package> com.google.inject, javax.servlet, javax.servlet.http, > !javax.jws, * </Import-Package> > and like this: > <Import-Package> com.google.inject, javax.servlet, javax.servlet.http, > !javax.jws, * </Import-Package> > > But the problem persist... > 11:16:38,229 | WARN | qtp26915030-254 | / | > ? ? | 116 - org.eclipse.jetty.util - > 7.4.5.fuse20111017 | %bundles.pluginTitle: Cannot start > org.osgi.framework.BundleException: Unresolved constraint in bundle > ops4j_pax_war_archetype_fzlbpms_template [243]: Unable to resolve 243.0: > *missing requirement [243.0] package; (package=com.google.inject)* > at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3466) > > > > *STEP2 (trying 3)* > I tryed to provide the bundle by myself to get the guice avaivle to my war > bundle folowing this ur: > http://team.ops4j.org/wiki/display/ops4j/Guice-OSGi > But when I was including ops4j-repository and ops4j-laboratory in my nexus I > realized that this both repositories are empty. > > So could you give me some more advices to fix *missing requirement [243.0] > package,; (package=com.google.inject)*, please? > > > thanks > > > > > > -- > View this message in context: > http://servicemix.396122.n5.nabble.com/Servlet-Class-is-not-found-by-servicemix-in-WEB-INF-lib-package-tp5713940p5713970.html > Sent from the ServiceMix - User mailing list archive at Nabble.com.
