add jar files to weasis project in eclipse

278 views
Skip to first unread message

Ioanna Charalambous

unread,
Oct 5, 2013, 8:37:14 AM10/5/13
to dcm...@googlegroups.com
I create a new class in weasis that uses Lava Media Framework so I need to add jms jar file in the project. I try to add it from built path but when I compiled the project I take the follow errors

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project weasis-base-ui: Compilation failure: Compilation failure:
[ERROR] /C:/Users/Ioanna/git/Weasis/weasis-base/weasis-base-ui/src/main/java/org/weasis/base/ui/gui/WeasisVideo.java:[14,19] package javax.media does not exist
[ERROR] /C:/Users/Ioanna/git/Weasis/weasis-base/weasis-base-ui/src/main/java/org/weasis/base/ui/gui/WeasisVideo.java:[15,19] package javax.media does not exist
[ERROR] /C:/Users/Ioanna/git/Weasis/weasis-base/weasis-base-ui/src/main/java/org/weasis/base/ui/gui/WeasisVideo.java:[16,19] package javax.media does not exist
[ERROR] /C:/Users/Ioanna/git/Weasis/weasis-base/weasis-base-ui/src/main/java/org/weasis/base/ui/gui/WeasisVideo.java:[17,19] package javax.media does not exist
[ERROR] /C:/Users/Ioanna/git/Weasis/weasis-base/weasis-base-ui/src/main/java/org/weasis/base/ui/gui/WeasisVideo.java:[18,27] package javax.media.control does not exist
[ERROR] /C:/Users/Ioanna/git/Weasis/weasis-base/weasis-base-ui/src/main/java/org/weasis/base/ui/gui/WeasisVideo.java:[19,26] package javax.media.format does not exist
[ERROR] /C:/Users/Ioanna/git/Weasis/weasis-base/weasis-base-ui/src/main/java/org/weasis/base/ui/gui/WeasisVideo.java:[20,24] package javax.media.util does not exist
[ERROR] /C:/Users/Ioanna/git/Weasis/weasis-base/weasis-base-ui/src/main/java/org/weasis/base/ui/gui/WeasisVideo.java:[34,26] cannot find symbol
[ERROR] symbol:   class Player
[ERROR] location: class org.weasis.base.ui.gui.WeasisVideo
[ERROR] /C:/Users/Ioanna/git/Weasis/weasis-base/weasis-base-ui/src/main/java/org/weasis/base/ui/gui/WeasisVideo.java:[37,12] cannot find symbol
[ERROR] symbol:   class Buffer
[ERROR] location: class org.weasis.base.ui.gui.WeasisVideo
[ERROR] /C:/Users/Ioanna/git/Weasis/weasis-base/weasis-base-ui/src/main/java/org/weasis/base/ui/gui/WeasisVideo.java:[38,12] cannot find symbol
[ERROR] symbol:   class BufferToImage
[ERROR] location: class org.weasis.base.ui.gui.WeasisVideo
[ERROR] /C:/Users/Ioanna/git/Weasis/weasis-base/weasis-base-ui/src/main/java/org/weasis/base/ui/gui/WeasisVideo.java:[70,21] cannot find symbol
[ERROR] symbol: class FrameGrabbingControl
[ERROR] /C:/Users/Ioanna/git/Weasis/weasis-base/weasis-base-ui/src/main/java/org/weasis/base/ui/gui/WeasisVideo.java:[70,49] cannot find symbol
[ERROR] symbol: class FrameGrabbingControl
[ERROR] /C:/Users/Ioanna/git/Weasis/weasis-base/weasis-base-ui/src/main/java/org/weasis/base/ui/gui/WeasisVideo.java:[72,20] cannot find symbol
[ERROR] symbol: class VideoFormat
[ERROR] /C:/Users/Ioanna/git/Weasis/weasis-base/weasis-base-ui/src/main/java/org/weasis/base/ui/gui/WeasisVideo.java:[72,37] cannot find symbol
[ERROR] symbol: class VideoFormat
[ERROR] /C:/Users/Ioanna/git/Weasis/weasis-base/weasis-base-ui/src/main/java/org/weasis/base/ui/gui/WeasisVideo.java:[75,31] cannot find symbol
[ERROR] symbol: class BufferToImage
[ERROR] /C:/Users/Ioanna/git/Weasis/weasis-base/weasis-base-ui/src/main/java/org/weasis/base/ui/gui/WeasisVideo.java:[134,55] cannot find symbol
[ERROR] symbol:   class MediaLocator
[ERROR] location: class org.weasis.base.ui.gui.WeasisVideo
[ERROR] /C:/Users/Ioanna/git/Weasis/weasis-base/weasis-base-ui/src/main/java/org/weasis/base/ui/gui/WeasisVideo.java:[134,22] cannot find symbol
[ERROR] symbol:   variable Manager
[ERROR] location: class org.weasis.base.ui.gui.WeasisVideo
[ERROR] -> [Help 1]

nicolas...@gmail.com

unread,
Oct 6, 2013, 4:11:24 AM10/6/13
to
The best practice would be to create an independent plugin inheriting from ViewerPlugin (see this page) and then associated this viewer to desired video mime type.

Third-party libraries must be added in the Maven dependencies of the pom.xml. This allows to create the OSGI manifest file that defines which packages must be imported or exported, because in OSGI each plugin has its own classloader. That means, without importing packages, only the classes of the plugin and JVM classes (starting by java.*) are visible in memory.

To have a better idea about OSGI, there is a good free book.

Angel Lacret

unread,
Jul 17, 2014, 4:47:48 PM7/17/14
to dcm...@googlegroups.com
Hi NIc

I am trying to do my custom export to PACS plugin, i worte the dependency in the pom.xml, and getting 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)

NOTE1: I copy the iso-writer-plugin to do this
NOTE2: Before add the library i test th UI, and it works just fine, so i narrow dow the problem to the library


On Sunday, October 6, 2013 3:16:59 AM UTC-4:30, Nicolas Roduit wrote:
The best practice would be to create an independent plugin inheriting from ViewerPlugin (see this page) and then associated this viewer to desired video mime type.

Third-party libraries must be added in the Maven dependencies of the pom.xml. This allows to create the OSGI manifest file that defines which packages must be imported or exported, because in OSGI each plugin has its own classloader. That means, without importing packages, only the classes of the plugin and JVM classes (starting by java.*) are visible in memory.

To have a better idea about OSGI, there is a good free book.


On Saturday, October 5, 2013 2:37:14 PM UTC+2, Ioanna Charalambous wrote:
Reply all
Reply to author
Forward
0 new messages