Sign in

E-mail *, (xx@domain.com)
Password *

Register | Forgot password

Active forums

Active Forums RSS September 03, 19:59
Style properties

August 31, 21:46
antrun not found

August 31, 14:12
WCB customprofile

August 31, 12:10
End of flow not doing its job

August 24, 12:37
Sort mediaItem by expiration date

 All Forums...


Unresolved constraint in bundle

The "WCB: Java development" forum contains threads on issues that are related to Java while programming a WCB (WebManager Component Bundle). If you have questions that have impact on Java code, post them in this forum. Some example topics: authorization, the different component types, setting up component dependencies, data access, and so forth.

Answered
Not marked as answered yet

Forums  >  WCB: Java development  >  Unresolved constraint in bundle


Author Unresolved constraint in bundle
patricka



Posts: 255

Posted: 16-07-2009 18:12

Bah!

I wanted to include a dependency for rome in my element WCB, so I added the following lines to my pom.xml:

    <!-- Including rome which is not part of the WM 9.8 platform -->
<dependency>
<groupId>rome</groupId>
<artifactId>rome</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/resources/lib/rome-1.0.jar</systemPath>
</dependency>



Little did I know this was the start of All Evil(tm)...

It seems rome is dependent on something else, which is dependent on something else etc. To cut things short, I've done a

C:\GX\WebManager9\settings.xml dependency:resolve



to figure out which dependencies were expected of me. Which gives a list of some forty libraries.

I patiently added all of them, copied their properties and downloaded or copied the files, then filtered out the platform ones mentioned in WebManager's "springservlet.xml".

But still I get requests for fresh packages and my bundle remains "Installed" instead of "Active".
AAAAAAaaaaaaaaaaaargh!!!!

My Felix Shell TUI says:

> start 73
org.osgi.framework.BundleException: Unresolved constraint in bundle 73: package; (package=org.omg.CosNaming)



Findjar.com says this is part of Java's "rt.jar".

How do I set a dependency to that and resolve the constraint?

And on a side note: this is really a rediculous amount of work for including one package. When will the hurting stop? Am I doing something wrong? Is there a shortcut?

Greetings,

Patrick

bramk



Posts: 34

Posted: 16-07-2009 22:04

Yup, this can be tricky but I'm not sure what you are doing here. You have declared the rome dependency with as system scope. This is cool in some cases but note that there is no accompanying pom file for a system scope dependency. Therefore maven can can not detect any transient dependencies for it. Either you are interpreting the dependency:tree results or you should report a bug for the dependency plugin. I'm guessing it's the former ;)

Anyway, it seems rome 1.0 is not deployed in the public central repository but the rome 1.0 source pom.xml]the source[/url] tells us that it depends one jdom 1.0. This one is deployed in the central repository and the pom tells us it has optional dependencies on xerces, xml-apis etc... You are going to need these and maybe some more. However I don't think it should not get close to 40 by far.

I suggest create a pom for the rome 1.0 jar, deploying it in your local repository and then let maven figure out the transitive dependencies while you are excluding whatever seems unlinkely to be useful.

GL

Cthulhu



Posts: 198

Posted: 03-08-2009 14:42

I had this problem too. There was a Felix plugin somewhere that automatically found and included transient dependencies - there should be another topic of mine with that solution.

Next to that, you should add the packages that cause errors to the importPackages and/or exportPackages of your Felix plugin configuration. I'm still not familiar with that exactly, but said other topic of mine should explain that. I'm too lazy to look it up at the moment though, .

Back to top

New message: "Unresolved constraint in bundle"
Message:
bold boitalicd underline url quote code smile cool eek grin mad razz sad wink
 
© 2010 GX creative online development B.V.

Disclaimer

This website (GXdeveloperweb.com) may discuss or contain opinions, (sample) coding, software or other information that does not include GX official interfaces, instructions or guidelines and therefore is not supported by GX. Changes made based on this information are not supported.  GX will not be held liable for any damages caused by using or misusing the information, software, instructions, code or methods suggested on this website, and anyone using these methods does so at his/her own risk. GX offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this website, including any liability resulting from incompatibility between the content of this website and the materials and services offered by GX. By using this website you will not hold, or seek to hold, GX responsible or liable with respect to the content of this website.