Cannot Build weasis plugin

113 views
Skip to first unread message

Angel Lacret

unread,
Jul 17, 2014, 4:16:52 PM7/17/14
to dcm...@googlegroups.com
I am trying to build a plugin for weasis, i already make and test the interface and the functions.

I want to use a third party lib (apache.httpcomponents.httpmime), to do some work, but when i add the dependency the weasis launch report me this error:

ERROR: Bundle dicomexporter [731] Error starting file:/home/alacret/workspace/weasis/weasis-distributions/target/portable-dist/weasis-portable/weasis/plugins/dicomexporter-2.0.1-SNAPSHOT.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle dicomexporter [731]: Unable to resolve 731.0: missing requirement [731.0] osgi.wiring.package; (osgi.wiring.package=org.apache.http))
org.osgi.framework.BundleException: Unresolved constraint in bundle dicomexporter [731]: Unable to resolve 731.0: missing requirement [731.0] osgi.wiring.package; (osgi.wiring.package=org.apache.http)
    at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3984)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:2045)
    at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1299)
    at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)
    at java.lang.Thread.run(Thread.java:744)


The question, is how do i add a library to the project.

Nicolas Roduit

unread,
Jul 18, 2014, 2:06:38 AM7/18/14
to dcm...@googlegroups.com
If you add third-party library in your plugin and this library is not loaded elsewhere in the application so you need to add it in the maven dependencies (to embed the library do not set the "provided" attribute).

Angel Lacret

unread,
Jul 18, 2014, 9:53:30 AM7/18/14
to dcm...@googlegroups.com
Greetings Nicolas,

I already try every possible value for the "scope" tag in the pom.xml (including not to put the tag at all) and the error keep repeating:


ERROR: Bundle dicomexporter [782] Error starting file:/home/alacret/workspace/weasis/weasis-distributions/target/portable-dist/weasis-portable/weasis/plugins/dicomexporter-2.0.1-SNAPSHOT.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle dicomexporter [782]: Unable to resolve 782.0: missing requirement [782.0] osgi.wiring.package; (osgi.wiring.package=org.apache.http))
org.osgi.framework.BundleException: Unresolved constraint in bundle dicomexporter [782]: Unable to resolve 782.0: missing requirement [782.0] osgi.wiring.package; (osgi.wiring.package=org.apache.http)

    at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3984)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:2045)
    at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1299)
    at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)
    at java.lang.Thread.run(Thread.java:744)


I attatch the jar



--
You received this message because you are subscribed to a topic in the Google Groups "dcm4che" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dcm4che/KJI7i9aDB9k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dcm4che+u...@googlegroups.com.
To post to this group, send email to dcm...@googlegroups.com.
Visit this group at http://groups.google.com/group/dcm4che.
For more options, visit https://groups.google.com/d/optout.



--
Attn.

Ing. Angel Lacret
dicomexporter-2.0.1-SNAPSHOT.jar

Nicolas Roduit

unread,
Jul 18, 2014, 10:44:48 AM7/18/14
to dcm...@googlegroups.com
I just looked in the maven file and I guess the problem is related to the dependency "httpmime" which contains a sub-dependency "httpclient".

Use one of the following option to fix the issue:
1) Add the dependency:
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient</artifactId>
      <version>4.3.4</version>
      <scope>compile</scope>
    </dependency>

2) Add Embed-Transitive (will embed all the sub-dependencies) in the bundle builder:
                               <groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
                                               <Embed-Transitive>true</Embed-Transitive>
</instructions>
</configuration>

I would recommend to use the first way as the second will be applied to all the dependencies
To unsubscribe from this group and all its topics, send an email to dcm4che+unsubscribe@googlegroups.com.

To post to this group, send email to dcm...@googlegroups.com.
Visit this group at http://groups.google.com/group/dcm4che.
For more options, visit https://groups.google.com/d/optout.

Angel Lacret

unread,
Jul 21, 2014, 10:48:51 AM7/21/14
to dcm...@googlegroups.com
Greetings nicolas

I've tried both ways, leading me to the same dead end, after adding 10 or more dependencies to the pom.xml i reach a point where it ask me for the org.apache.log4j >=1.2.0 !<=2.0.0 dependency, the version that it is in the maven repo is the 1.2.17, so thats ok, but when i add it, the framework then ask me to add as a dependency also a com.ibm.uvm.tools that does not exists anymore

com.ibm.uvm.tools is a record on the Import Package Manifest line, so i am stuck here

I am already trying with another HTTP library. Alternatly and re thinking the problem i was planning on removing the REST layer (POST service) and make the plugin connect directly with the dcm4chee pacs with DICOM, but i was unavailable to find a example of using the STORESCU.java class to store the file on the pacs



To unsubscribe from this group and all its topics, send an email to dcm4che+u...@googlegroups.com.

To post to this group, send email to dcm...@googlegroups.com.
Visit this group at http://groups.google.com/group/dcm4che.
For more options, visit https://groups.google.com/d/optout.

Angel Lacret

unread,
Jul 23, 2014, 5:02:29 PM7/23/14
to dcm...@googlegroups.com
Hi nicoles,

Finally i could make the plugin

It works fine for the portable version, but for the web version it
does not load the plugin

I attach the files
>>>>> workStartLevelImpl.java:304)
>>>>> at java.lang.Thread.run(Thread.java:744)
>>>>>
>>>>>
>>>>> The question, is how do i add a library to the project.
>>>>>
>>>> --
>>>> You received this message because you are subscribed to a topic in the
>>>> Google Groups "dcm4che" group.
>>>> To unsubscribe from this topic, visit https://groups.google.com/d/
>>>> topic/dcm4che/KJI7i9aDB9k/unsubscribe.
>>>> To unsubscribe from this group and all its topics, send an email to
>>>> dcm4che+u...@googlegroups.com.
>>>> To post to this group, send email to dcm...@googlegroups.com.
>>>> Visit this group at http://groups.google.com/group/dcm4che.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>>
>>> --
>>> Attn.
>>>
>>> Ing. Angel Lacret
>>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "dcm4che" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/dcm4che/KJI7i9aDB9k/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> dcm4che+u...@googlegroups.com.
>> To post to this group, send email to dcm...@googlegroups.com.
>> Visit this group at http://groups.google.com/group/dcm4che.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Attn.
>
> Ing. Angel Lacret
>


weasis-pacs-connector.war
weasis-jnlp-default.xml
Reply all
Reply to author
Forward
0 new messages