|
SageTV Github Development Discussion related to SageTV Open Source Development. Use this forum for development topics about the Open Source versions of SageTV, hosted on Github. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||||
|
||||
Automatic removal of bad Lucene JAR file
What do people think about doing the following:
In Sage.java when it starts up, look in the JARs folder and see if there are 2 Lucene jar files, one of them of course must be the new one we are requiring. If it finds 2 of them, then it uses the plugin update feature to indicate that it should delete the bad lucene JAR file. It then forces a SageTV restart, which will then delete the bad Lucene jar file and then let SageTV startup normally. This will avoid people having the problem with the Lucene JAR file when they upgrade. (yeah, I should have thought of this sooner) I have no problem writing this myself, it should be fairly easy to code.
__________________
Jeffrey Kardatzke Founder of SageTV |
#2
|
||||
|
||||
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 |
#3
|
||||
|
||||
Longer term, I think that all SageTV core jars should be in a SystemJARs folder (or just called "lib"), separate from the JARs folder (used by plugins), so that we can put Sage.jar, SystemJARs, and then JARs in the classpath, in that order. That would prevent plugins from overriding System Jars (or in this case, a new System Jar that conclicts with the plugins).
But I think a good, quick first step, is to simply do the check on startup for the lucene jar as you suggested.
__________________
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 |
#4
|
||||
|
||||
Quote:
__________________
Server: Ryzen 2400G with integrated graphics, ASRock X470 Taichi Motherboard, HDMI output to Vizio 1080p LCD, Win10-64Bit (Professional), 16GB RAM Capture Devices (7 tuners): Colossus (x1), HDHR Prime (x2),USBUIRT (multi-zone) Source: Comcast/Xfinity X1 Cable Primary Client: Server Other Clients: (1) HD200, (1) HD300 Retired Equipment: MediaMVP, PVR150 (x2), PVR150MCE, HDHR, HVR-2250, HD-PVR |
#5
|
||||
|
||||
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 |
#6
|
||||
|
||||
As I was the first person bitten by this bug, I agree it should be fixed
I like Sean's idea of a System JARs folder. That seems to make more sense than putting lucene (and maybe others in the future) into the "plugin" JARs folder.
__________________
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. |
#7
|
||||
|
||||
Quote:
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
#8
|
||||
|
||||
Quote:
Once I saw the error about the missing Lucene.jar, I went to the installed plugins section and looked for ones that had notices about updates (there were 3 or 4). However, when I tried to update, I ran into the problem where it could not locate commons.io on sourceforge. This would cause the update to fail and the plugin I was attempting to update would then disappear from the installed plugins list. I know this happened with 2 or 3 plugins (one was the CMT plugin and I think another was Phoenix Fanart for default STV - both of these depend on Phoenix core). I remembered seeing forum posts that there was a Java issue related to accessing some plugin locations (I think it was that some of the plug repositories had gone to HTTPS and you needed at least Java 8 to work access these locations). So, I upgraded from Java 1.7 to 1.8 and then tried to re-install my plugins - this time they worked fine. This was all last week, before you moved some of the libraries to a new host. So, hopefully, the commons.io problem is fixed now. Though I do wonder why failed plugin updates would cause the plugins to be removed from the installed plugins list (as far as I could tell, they weren't actually removed).
__________________
Server: Ryzen 2400G with integrated graphics, ASRock X470 Taichi Motherboard, HDMI output to Vizio 1080p LCD, Win10-64Bit (Professional), 16GB RAM Capture Devices (7 tuners): Colossus (x1), HDHR Prime (x2),USBUIRT (multi-zone) Source: Comcast/Xfinity X1 Cable Primary Client: Server Other Clients: (1) HD200, (1) HD300 Retired Equipment: MediaMVP, PVR150 (x2), PVR150MCE, HDHR, HVR-2250, HD-PVR |
#9
|
||||
|
||||
Quote:
__________________
SageTV v9 Server: ASRock Z97 Extreme4, Intel i7-4790K @ 4.4Ghz, 32GB RAM, 6x 3TB 7200rpm HD, 2x 5TB 7200rpm HD, 2x 6TB 7200rpm HD, 4x 256GB SSD, 4x 500GB SSD, unRAID Pro 6.7.2 (Dual Parity + SSD Cache). Capture: 1x Ceton InfiniTV 4 (ClearQAM), 2x Ceton InfiniTV 6, 1x BM1000-HDMI, 1x BM3500-HDMI. Clients: 1x HD300 (Living Room), 1x HD200 (Master Bedroom). Software: OpenDCT :: WMC Live TV Tuner :: Schedules Direct EPG |
#10
|
|||
|
|||
As I'm starting to move toward V9, reading through all the great work everyone has done, I wondered why V9 didn't automatically remove it.
So yeah, I think it's a great idea. |
#11
|
||||
|
||||
Quote:
|
#12
|
||||
|
||||
Quote:
John |
#13
|
||||
|
||||
After some thought...I think there's an even better way to do this. Ideally, we won't remove the bad lucene JAR file so plugins do not complain. From some reading, it does appear that the JVM will search the classpath in the order it is specified on the command line. So if we just put the included lucene JAR file as the first entry in the classpath (after Sage.jar), then it will always use that one instead of the one that may come from a plugin. I also wrote a test and it was working this way (at least with OpenJDK on Linux). But logically, I see no reason it would behave any other way than searching the classpath in the order specified.
This would then just require changing the startsagecore script on Linux and launcher.cpp on Windows so that it forcibly puts the included lucene JAR file as the first entry. Anybody see any problems with that approach?
__________________
Jeffrey Kardatzke Founder of SageTV |
#14
|
||||
|
||||
Quote:
I assume you are still volunteering to do this
__________________
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 |
#15
|
||||
|
||||
Quote:
__________________
Jeffrey Kardatzke Founder of SageTV |
#16
|
||||
|
||||
OK, commit is in...hopefully it'll compile fine on Windows since I couldn't verify that...lol.
__________________
Jeffrey Kardatzke Founder of SageTV |
#17
|
|||
|
|||
The only issue with that is if any of the old plugins rely on methods in the old Lucene interface that are no longer present in the new version... otherwise it is fine.
Probably the methods are deprecated and not removed.. I believe the best answer is to: 1. create a System Jar 2. issue the classpath on the command line to include the System Jar after SageTV 3. update all the plugins to use the proper version of Lucene |
#18
|
|||
|
|||
Quote:
k
__________________
If you wish to see what I am up to and support my efforts visit my Patreon page |
#19
|
||||
|
||||
Thanks, please do!
__________________
Jeffrey Kardatzke Founder of SageTV |
#20
|
|||
|
|||
Done.
I created a test on a V7 install that had the older lucene jar and installed the last 9.0.12.506 version and it failed...as expected. I built a new installer for 9.0.13.536 and that install went smooth and V9 ran fine with the old and new lucene jars in place I am in the midst of uploading the new Windows Installer versions and will be done later today. I know stuckless is busy so not sure when the Linux one will be released. k
__________________
If you wish to see what I am up to and support my efforts visit my Patreon page |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
lucene core clarification | bmac.to | SageTV Github Development | 3 | 02-22-2016 11:53 AM |
What is the state of the art in automatic commercial removal? | pi314 | SageTV Customizations | 2 | 08-22-2008 05:29 AM |
Automatic DivX Encoding and Automatic Commercial Removal? | TurboRX-7 | SageTV Customizations | 3 | 07-28-2005 09:00 PM |
Automatic File Transfer - Not Sage Specific | DynamoBen | Hardware Support | 6 | 03-17-2005 12:32 PM |
Req: Automatic backup copies of Sage.properties file? | laurenglenn | SageTV Beta Test Software | 3 | 04-23-2003 02:02 PM |