|
SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Plugin Dependencies: A blessing and a curse!
A friendly warning for all you plugin devs out there...
Been tracking down a problem with SRE for the last few days with another user. Finally got my hands on a stack trace, which easily pointed me to the problem: ClassNotFoundException: org.apache.commons.codec.DecoderException So I was puzzled at first, but didn't take long to realize the issue... I use the Apache xmlrpc client in SRE, xmlrpc depends on HttpClient3, and HttpClient3 depends on commons-codec (this is the dependency I failed to realize when packaging httpclient3 plugin jar). I never directly use commons-codec in my code so never had a compile error, etc. When I tested the plugin I already had commons-codec installed in my Sage\JARs dir because some other plugin I installed depended on it. So all my testing is fine locally, but this user didn't have commons-codec installed so SRE died almost immediately on startup everytime. Once I got the stack trace from this user it was easy to go back and figure out where the dependency was missing. Of course I also had to trace back up all the plugins that depended on httpclient3 and update their dependency to a new version of httpclient3, etc. Basically a big mess! So my lesson here, be very, very careful with plugin dependencies. Ideally, plugins are developed on a vanilla, fresh install of Sage so as to force yourself to properly identify all dependencies and package them properly. Realistically, I don't have an extra server/license to practice what I preach so now I'll just be more mindful when packaging my jars up for the repository. In case anyone else was using the HttpClient3 plugin for something, I have updated it in the repository with the correct dependency on commons-codec (and commons-logging).
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#2
|
|||
|
|||
Ouch those are the problems that make you want to throw your computer out the window..
all in all though even with the extra effort it takes us devs. It one of my favorite additions to v7. |
#3
|
||||
|
||||
A quick Google search shows that there are a number of tools out there for automatically analyzing dependencies between JARs and classes and calculating their transitive closure. I haven't used any of them so I can't make specific recommendations, but it looks like this problem is solvable with existing tools.
The problem that keeps biting me is when I add a function to a library to support a higher-level plugin, and then forget to update the MinVersion dependency in the plugin to pull in the library upgrade automatically.
__________________
-- Greg |
#4
|
||||
|
||||
Quote:
Another issue that I recently ran into was a case where a user had done a clean Sage7 install and bmt was failing. It had failed because there was a commons-lang-2.2 and 2-4 in the JARs directory. This should not happen using the plugin manager, but i was wondering if it's possible for a plugin to package JARS as system items and bypass the dependenices. That's the only way I can a see a clean install having duplicate jars in the JARs folder. I hope that's not the case.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#5
|
|||
|
|||
Quote:
|
#6
|
|||
|
|||
Quote:
I believe the onus is on the devs to ensure that conflicting jars aren't introduced into the repository. It'd be ideal to have the plugin manager mange this, but it just seems like there's too many ways to get around it for an auto checker to cover every conceivable scenario.
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#7
|
||||
|
||||
I'd like to see an "anti-dependency" that specifies which plugins are incompatible. I'd also like to be able to update the plugin manifest to include the anti-dependency so that if we discover that two plugings conflict we can update the manifest XML WITHOUT actually updating the entire plugin. AFAIK as it stands now you can't update the manifest unless the version number increases.
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#8
|
|||
|
|||
Quote:
Really the only time you would have anti dependency that I can think of it with STVi's trying to change the same area of the stv. Basically we have to track and let users know about those on our own. |
#9
|
||||
|
||||
Quote:
__________________
-- Greg |
#10
|
||||
|
||||
Quote:
Quote:
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#11
|
||||
|
||||
Quote:
How about being able to at least add a warning along the lines of "This plugin may not work properly ..."?
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#12
|
||||
|
||||
You could put that in the description or release notes in your plugin.xml.
__________________
Server: Intel Core i5 760 Quad, Gigabyte GA-H57M-USB3, 4GB RAM, Gigabyte GeForce 210, 120GB SSD (OS), 1TB SATA, HD HomeRun. Extender: STP-HD300, Harmony 550 Remote, Netgear MCA1001 Ethernet over Coax. SageTV: SageTV Server 7.1.8 on Ubuntu Linux 11.04, SageTV Placeshifter for Mac 6.6.2, SageTV Client 7.0.15 for Windows, Linux Placeshifter 7.1.8 on Server and Client, Java 1.6. Plugins: Jetty, Nielm's Web Server, Mobile Web Interface. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Plugin: MizookLCD (Alternate SageTV LCDSmartie Plugin) | cslatt | SageTV Customizations | 48 | 06-11-2012 10:44 AM |
MediaPlayer Plugin/STV Import: Winamp Media Player Plugin | deria | SageTV Customizations | 447 | 12-11-2010 07:38 PM |
When a plug-in states it has dependencies, are they installed automatically? | CanadianEh | SageTV v7 Customizations | 2 | 05-22-2010 09:42 AM |
SageMC, STVis, and Add Ons: Dependencies, Hoop Jumping, and Confusion [rant] | ptzink | SageMC Custom Interface | 24 | 04-14-2010 09:14 AM |