SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v7 Customizations > Batch Metadata Tools
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

Batch Metadata Tools This forums is for discussing the user-created Batch Metadata Tools for SageTV.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-09-2015, 06:02 AM
dranockcir dranockcir is offline
Sage Advanced User
 
Join Date: Jul 2004
Location: Jupiter, FL
Posts: 137
Sageplex and BMT

Hi!

Wildgoose has helped me get his sageplex plugin for Plex Media Server working on my Ubuntu server but I still have one more (i hope only one more :-)) hurdle, when trying to retrieve the metadata for the found TV shows, I get this error. Thanks for any help! - Rick


{"sagexVersion":"7.1.9.1","exception":"java.lang.RuntimeException: javax.script.ScriptException: TypeError: sagex.api.MediaFileAPI@1ee438d has no such function \"GetMediaFiles\" in <eval> at line number 41\r\n\tat sagex.remote.api.ApiHandler.callService(ApiHandler.java:200)\r\n\tat sagex.remote.api.ApiHandler.handleRequest(ApiHandler.java:140)\r\n\tat sagex.remote.SagexServlet.doPost(SagexServlet.java:87)\r\n\tat sagex.remote.SagexServlet.doGet(SagexServlet.java:41)\r\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:707)\r\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:820)\r\n\tat org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)\r\n\tat org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:389)\r\n\tat org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)\r\n\tat org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)\r\n\tat org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)\r\n\tat org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)\r\n\tat org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)\r\n\tat org.mortbay.jetty.handler.rewrite.RewriteHandler.handle(RewriteHandler.java:230)\r\n\tat org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)\r\n\tat org.mortbay.jetty.Server.handle(Server.java:326)\r\n\tat org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)\r\n\tat org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:864)\r\n\tat org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)\r\n\tat org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)\r\n\tat org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)\r\n\tat org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)\r\n\tat org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)\r\nCaused by: javax.script.ScriptException: TypeError: sagex.api.MediaFileAPI@1ee438d has no such function \"GetMediaFiles\" in <eval> at line number 41\r\n\tat jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:455)\r\n\tat jdk.nashorn.api.scripting.NashornScriptEngine.invokeImpl(NashornScriptEngine.java:387)\r\n\tat jdk.nashorn.api.scripting.NashornScriptEngine.invokeFunction(NashornScriptEngine.java:187)\r\n\tat sagex.remote.api.ServiceFactory.callService(ServiceFactory.java:83)\r\n\tat sagex.remote.api.ApiHandler.callService(ApiHandler.java:198)\r\n\t... 22 more\r\nCaused by: <eval>:41 TypeError: sagex.api.MediaFileAPI@1ee438d has no such function \"GetMediaFiles\"\r\n\tat jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57)\r\n\tat jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:213)\r\n\tat jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:185)\r\n\tat jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:172)\r\n\tat jdk.nashorn.internal.runtime.linker.NashornBottomLinker.linkBean(NashornBottomLinker.java:103)\r\n\tat jdk.nashorn.internal.runtime.linker.NashornBottomLinker.getGuardedInvocation(NashornBottomLinker.java:71)\r\n\tat jdk.internal.dynalink.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:124)\r\n\tat jdk.internal.dynalink.support.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:149)\r\n\tat jdk.internal.dynalink.DynamicLinker.relink(DynamicLinker.java:233)\r\n\tat jdk.nashorn.internal.scripts.Script$Recompilation$1$1387A$\\^eval\\_.GetMediaFileForName(<eval>:41)\r\n\tat jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:638)\r\n\tat jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:229)\r\n\tat jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:387)\r\n\tat jdk.nashorn.api.scripting.ScriptObjectMirror.callMember(ScriptObjectMirror.java:192)\r\n\tat jdk.nashorn.api.scripting.NashornScriptEngine.invokeImpl(NashornScriptEngine.java:381)\r\n\t... 25 more\r\n","error":"javax.script.ScriptException: TypeError: sagex.api.MediaFileAPI@1ee438d has no such function \"GetMediaFiles\" in <eval> at line number 41"}
Reply With Quote
  #2  
Old 06-09-2015, 10:59 AM
wildgoose wildgoose is offline
Sage Advanced User
 
Join Date: Jan 2010
Location: CA
Posts: 156
Just to provide some context, there's a Java exception when the following is called from sagex extension:

Code:
function GetMediaFileForName(filename)
{
    var allMedia = MediaFileAPI.GetMediaFiles();
    ...
https://github.com/ai7/sagetv-for-pl...es/plex.js#L41
__________________
sagetv-for-plexmediacenter v8.3.1 is available! Github/Download site.
Reply With Quote
  #3  
Old 06-09-2015, 11:23 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by wildgoose View Post
Just to provide some context, there's a Java exception when the following is called from sagex extension:

Code:
function GetMediaFileForName(filename)
{
    var allMedia = MediaFileAPI.GetMediaFiles();
    ...
https://github.com/ai7/sagetv-for-pl...es/plex.js#L41
Well, that is a valid method, but I wonder if somehow it is getting confused because there is another GetMediaFiles("") method as well. I noticed in the .js there are commented out calls to GetMediaFiles. Is everyone having this issue, or just you?
Reply With Quote
  #4  
Old 06-09-2015, 12:27 PM
wildgoose wildgoose is offline
Sage Advanced User
 
Join Date: Jan 2010
Location: CA
Posts: 156
Quote:
Originally Posted by stuckless View Post
Is everyone having this issue, or just you?
Only one user is having this problem.

I suspect this is a setup/configuration issue on the SageTV machine, though not sure how to debug this further. I've asked dranockcir to uninstall and reinstall those sagetv plugins, the error remains.
__________________
sagetv-for-plexmediacenter v8.3.1 is available! Github/Download site.
Reply With Quote
  #5  
Old 06-09-2015, 01:05 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by wildgoose View Post
Only one user is having this problem.

I suspect this is a setup/configuration issue on the SageTV machine, though not sure how to debug this further. I've asked dranockcir to uninstall and reinstall those sagetv plugins, the error remains.
what is the Java version? I think you need 1.7 to use the sagex apis effectively, and 1.8 doesn't work well, yet.
Reply With Quote
  #6  
Old 06-09-2015, 02:28 PM
dranockcir dranockcir is offline
Sage Advanced User
 
Join Date: Jul 2004
Location: Jupiter, FL
Posts: 137
Hey Guys!

Yes it is Java 8, I will uninstall it and install 7 tonight after work. Thanks for the help!
Reply With Quote
  #7  
Old 06-09-2015, 08:45 PM
dranockcir dranockcir is offline
Sage Advanced User
 
Join Date: Jul 2004
Location: Jupiter, FL
Posts: 137
Thanks stuckless and wildgoose, that was the problem, i had Java 8 on the Sage server. I uninstalled it and installed Java 7 and now my recorded TV shows are showing up an playing in Plex media server.
Reply With Quote
  #8  
Old 06-10-2015, 05:54 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Once SageTV goes open source, we'll take a look at what is causing the issues... I think we need a newer version of the Jetty server, but we need to do more testing. (We could solve it now, but it all works with Java 7, and I'm busy doing other things )
Reply With Quote
  #9  
Old 06-24-2015, 09:26 AM
Monedeath Monedeath is offline
Sage Expert
 
Join Date: Sep 2009
Location: Idaho
Posts: 514
Quote:
Originally Posted by stuckless View Post
Once SageTV goes open source, we'll take a look at what is causing the issues... I think we need a newer version of the Jetty server, but we need to do more testing. (We could solve it now, but it all works with Java 7, and I'm busy doing other things )
Looking at the Web UI (v7) thread, Slugger was pretty certain the Java 8 issue had to do with the webui being 3 major revisions behind the curve(running Jetty 6.x while Jetty 9.x was the current version as of his posting last November).

Making him less eager to act on it was his stated suspicion that the included version of Jetty had been altered to better work with Sage, meaning someone would need to go suss out what those alterations were(if any were even made) and why they were made. Then there would be to process of finding and squashing bugs that crop up between the differing major revisions while trying to keep some backward compatibility.

He abandoned the project and offered it up to any taker, looks like someone else took (part of) it over, but likewise stated no intention to do anything regarding udating to Java 8.

Looks like the Jetty upgrade within the webserver is waiting on the OS release of Sage, not that it really needs to, but as I don't have the time, ability or pressing need to do it myself(as repeatidly mentioned elsewhere by numerous others, it works fine with Java 7), all I can do is shrug whenever someone else wanders onto the forums and posts about their discovery that Java 8 breaks things for plugins that have the WebUI as a dependency.

It is something that will need to be done, while it might be nice to build everything into the core, there also is a thing called feature creep(and plugins are wonderful ways to address that). Although I do think a webui/network API for a network service(which is what SageTV kind of is, at its core for most users) is something generally considered a standard expectation these days so this is one that falls in a grey area as to potential benefits of updating an external plugin for something that probably should be absorbed into the core.

The "day 0" problem for the OS effort however, will be the potential pitfalls of new people turning up and getting frustrated by the fact that they'll have to revert to Java 7 in order to use SageTV and get a working WebUI. (Assuming the OS version doesn't break it anyway, although I'd think trying to troubleshoot a problem between 2 software versions(sageTV7 vs SageTVOS) would be easier than troubleshooting a problem between SageV7,sageOS, jetty 6.x, jetty 9.x and java 8 all in one go)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 01:30 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.