
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




Help calling Java from Studio
I wanted to reuse some Java functions that were developed for SageMC to make some improvements to the stock Sage STV, but I'm stuck...
I added a call to sagemc_Global_filterMediaFileByPath() to the SageTV3.xml STV in studio and hardcoded the arguments for testing purposes (See attached jpg for picture of studio code). When I run the STV, this function seems to have no effect and I get a bunch of errors in the debug log, specifically "Unknown Method Error" Here's a snippet of the debug log: Code:
Wed 12/31 11:41:42.419 ++++++++ Video folder browser: Reloaded folder info Wed 12/31 11:41:42.428 sage.a.e: UNKNOWN METHOD ERROR name=sagemc_Global_filterMediaFilesByPath args=[[Lsage.by;@2436ac, E:\, true] Wed 12/31 11:41:42.428 at sage.e$d.a(Unknown Source) Wed 12/31 11:41:42.428 at sage.a.m$b.a(Unknown Source) Wed 12/31 11:41:42.429 at sage.a.m.a(Unknown Source) Wed 12/31 11:41:42.429 at sage.e.a(Unknown Source) Wed 12/31 11:41:42.429 at sage.a8.a(Unknown Source) Wed 12/31 11:41:42.429 at sage.a8.do(Unknown Source) Wed 12/31 11:41:42.430 at sage.a8.int(Unknown Source) Wed 12/31 11:41:42.430 at sage.a8.for(Unknown Source) Wed 12/31 11:41:42.430 at sage.a8.int(Unknown Source) Wed 12/31 11:41:42.430 at sage.a8.for(Unknown Source) Wed 12/31 11:41:42.431 at sage.a8.int(Unknown Source) Wed 12/31 11:41:42.431 at sage.a8.for(Unknown Source) Wed 12/31 11:41:42.431 at sage.a8.int(Unknown Source) Wed 12/31 11:41:42.431 at sage.a8.for(Unknown Source) Wed 12/31 11:41:42.432 at sage.a8.int(Unknown Source) Wed 12/31 11:41:42.432 at sage.a8.for(Unknown Source) Wed 12/31 11:41:42.432 at sage.b1.K(Unknown Source) Wed 12/31 11:41:42.432 at sage.UIManager.a(Unknown Source) Wed 12/31 11:41:42.433 at sage.UIManager.a(Unknown Source) Wed 12/31 11:41:42.433 at sage.UIManager.if(Unknown Source) Wed 12/31 11:41:42.433 at sage.a8.a(Unknown Source) Wed 12/31 11:41:42.433 at sage.a8.a(Unknown Source) Wed 12/31 11:41:42.433 at sage.e.a(Unknown Source) Wed 12/31 11:41:42.434 at sage.e.a(Unknown Source) Wed 12/31 11:41:42.434 at sage.e.a(Unknown Source) Wed 12/31 11:41:42.434 at sage.b1.K(Unknown Source) Wed 12/31 11:41:42.434 at sage.UIManager.a(Unknown Source) Wed 12/31 11:41:42.435 at sage.UIManager.a(Unknown Source) Wed 12/31 11:41:42.435 at sage.UIManager.if(Unknown Source) Wed 12/31 11:41:42.435 at sage.a8.a(Unknown Source) Wed 12/31 11:41:42.435 at sage.a8.a(Unknown Source) Wed 12/31 11:41:42.436 at sage.a8.new(Unknown Source) Wed 12/31 11:41:42.436 at sage.a8.mouseReleased(Unknown Source) Wed 12/31 11:41:42.436 at sage.bg.if(Unknown Source) Wed 12/31 11:41:42.436 at sage.bn.a(Unknown Source) Wed 12/31 11:41:42.437 at sage.bn.a(Unknown Source) Wed 12/31 11:41:42.437 at sage.bn.a(Unknown Source) Wed 12/31 11:41:42.437 at sage.bn.a(Unknown Source) Wed 12/31 11:41:42.437 at sage.bn.a(Unknown Source) Wed 12/31 11:41:42.437 at sage.bn.do(Unknown Source) Wed 12/31 11:41:42.438 at sage.bn.mouseReleased(Unknown Source) Wed 12/31 11:41:42.438 at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source) Wed 12/31 11:41:42.438 at java.awt.Component.processMouseEvent(Unknown Source) Wed 12/31 11:41:42.438 at java.awt.Component.processEvent(Unknown Source) Wed 12/31 11:41:42.438 at java.awt.Component.dispatchEventImpl(Unknown Source) Wed 12/31 11:41:42.439 at java.awt.Component.dispatchEvent(Unknown Source) Wed 12/31 11:41:42.439 at java.awt.EventQueue.dispatchEvent(Unknown Source) Wed 12/31 11:41:42.439 at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) Wed 12/31 11:41:42.439 at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) Wed 12/31 11:41:42.440 at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) Wed 12/31 11:41:42.440 at java.awt.EventDispatchThread.pumpEvents(Unknown Source) Wed 12/31 11:41:42.440 at java.awt.EventDispatchThread.pumpEvents(Unknown Source) Wed 12/31 11:41:42.440 at java.awt.EventDispatchThread.run(Unknown Source) Wed 12/31 11:41:42.441 EXCEPTION in getValueAsObject:sage.a.e: Error in method reflection of sagemc_Global_filterMediaFilesByPath of sage.a.e: UNKNOWN METHOD ERROR name=sagemc_Global_filterMediaFilesByPath args=[[Lsage.by;@2436ac, E:\, true] for:sagemc_Global_filterMediaFilesByPath(AllVideoFiles, "E:\\", true) Wed 12/31 11:41:42.441 sage.a.e: Error in method reflection of sagemc_Global_filterMediaFilesByPath of sage.a.e: UNKNOWN METHOD ERROR name=sagemc_Global_filterMediaFilesByPath args=[[Lsage.by;@2436ac, E:\, true] Wed 12/31 11:41:42.441 at sage.e$d.a(Unknown Source) Wed 12/31 11:41:42.442 at sage.a.m$b.a(Unknown Source) Wed 12/31 11:41:42.442 at sage.a.m.a(Unknown Source) Wed 12/31 11:41:42.442 at sage.e.a(Unknown Source) Wed 12/31 11:41:42.442 at sage.a8.a(Unknown Source) Wed 12/31 11:41:42.443 at sage.a8.do(Unknown Source) Wed 12/31 11:41:42.443 at sage.a8.int(Unknown Source) Wed 12/31 11:41:42.443 at sage.a8.for(Unknown Source) Wed 12/31 11:41:42.443 at sage.a8.int(Unknown Source) Wed 12/31 11:41:42.444 at sage.a8.for(Unknown Source) Wed 12/31 11:41:42.444 at sage.a8.int(Unknown Source) Wed 12/31 11:41:42.444 at sage.a8.for(Unknown Source) Wed 12/31 11:41:42.444 at sage.a8.int(Unknown Source) Wed 12/31 11:41:42.445 at sage.a8.for(Unknown Source) Wed 12/31 11:41:42.445 at sage.a8.int(Unknown Source) Wed 12/31 11:41:42.445 at sage.a8.for(Unknown Source) Wed 12/31 11:41:42.445 at sage.b1.K(Unknown Source) Wed 12/31 11:41:42.446 at sage.UIManager.a(Unknown Source) Wed 12/31 11:41:42.446 at sage.UIManager.a(Unknown Source) Wed 12/31 11:41:42.446 at sage.UIManager.if(Unknown Source) Wed 12/31 11:41:42.446 at sage.a8.a(Unknown Source) Wed 12/31 11:41:42.446 at sage.a8.a(Unknown Source) Wed 12/31 11:41:42.447 at sage.e.a(Unknown Source) Wed 12/31 11:41:42.447 at sage.e.a(Unknown Source) Wed 12/31 11:41:42.447 at sage.e.a(Unknown Source) Wed 12/31 11:41:42.447 at sage.b1.K(Unknown Source) Wed 12/31 11:41:42.448 at sage.UIManager.a(Unknown Source) Wed 12/31 11:41:42.448 at sage.UIManager.a(Unknown Source) Wed 12/31 11:41:42.448 at sage.UIManager.if(Unknown Source) Wed 12/31 11:41:42.448 at sage.a8.a(Unknown Source) Wed 12/31 11:41:42.449 at sage.a8.a(Unknown Source) Wed 12/31 11:41:42.449 at sage.a8.new(Unknown Source) Wed 12/31 11:41:42.449 at sage.a8.mouseReleased(Unknown Source) Wed 12/31 11:41:42.449 at sage.bg.if(Unknown Source) Wed 12/31 11:41:42.449 at sage.bn.a(Unknown Source) Wed 12/31 11:41:42.450 at sage.bn.a(Unknown Source) Wed 12/31 11:41:42.450 at sage.bn.a(Unknown Source) Wed 12/31 11:41:42.450 at sage.bn.a(Unknown Source) Wed 12/31 11:41:42.450 at sage.bn.a(Unknown Source) Wed 12/31 11:41:42.451 at sage.bn.do(Unknown Source) Wed 12/31 11:41:42.451 at sage.bn.mouseReleased(Unknown Source) Wed 12/31 11:41:42.451 at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source) Wed 12/31 11:41:42.451 at java.awt.Component.processMouseEvent(Unknown Source) Wed 12/31 11:41:42.452 at java.awt.Component.processEvent(Unknown Source) Wed 12/31 11:41:42.452 at java.awt.Component.dispatchEventImpl(Unknown Source) Wed 12/31 11:41:42.452 at java.awt.Component.dispatchEvent(Unknown Source) Wed 12/31 11:41:42.452 at java.awt.EventQueue.dispatchEvent(Unknown Source) Wed 12/31 11:41:42.453 at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) Wed 12/31 11:41:42.453 at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) Wed 12/31 11:41:42.453 at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) Wed 12/31 11:41:42.453 at java.awt.EventDispatchThread.pumpEvents(Unknown Source) Wed 12/31 11:41:42.454 at java.awt.EventDispatchThread.pumpEvents(Unknown Source) Wed 12/31 11:41:42.454 at java.awt.EventDispatchThread.run(Unknown Source) Wed 12/31 11:41:42.454 sage.a.e: UNKNOWN METHOD ERROR name=sagemc_Global_filterMediaFilesByPath args=[[Lsage.by;@2436ac, E:\, true] Wed 12/31 11:41:42.455 at sage.e$d.a(Unknown Source) Wed 12/31 11:41:42.455 at sage.a.m$b.a(Unknown Source) Wed 12/31 11:41:42.455 at sage.a.m.a(Unknown Source) Wed 12/31 11:41:42.455 at sage.e.a(Unknown Source) Wed 12/31 11:41:42.456 at sage.a8.a(Unknown Source) Wed 12/31 11:41:42.456 at sage.a8.do(Unknown Source) Wed 12/31 11:41:42.456 at sage.a8.int(Unknown Source) Wed 12/31 11:41:42.456 at sage.a8.for(Unknown Source) Wed 12/31 11:41:42.456 at sage.a8.int(Unknown Source) Wed 12/31 11:41:42.457 at sage.a8.for(Unknown Source) Wed 12/31 11:41:42.457 at sage.a8.int(Unknown Source) Wed 12/31 11:41:42.457 at sage.a8.for(Unknown Source) Wed 12/31 11:41:42.457 at sage.a8.int(Unknown Source) Wed 12/31 11:41:42.458 at sage.a8.for(Unknown Source) Wed 12/31 11:41:42.458 at sage.a8.int(Unknown Source) Wed 12/31 11:41:42.458 at sage.a8.for(Unknown Source) Wed 12/31 11:41:42.458 at sage.b1.K(Unknown Source) Wed 12/31 11:41:42.459 at sage.UIManager.a(Unknown Source) Wed 12/31 11:41:42.459 at sage.UIManager.a(Unknown Source) Wed 12/31 11:41:42.459 at sage.UIManager.if(Unknown Source) Wed 12/31 11:41:42.459 at sage.a8.a(Unknown Source) Wed 12/31 11:41:42.460 at sage.a8.a(Unknown Source) Wed 12/31 11:41:42.460 at sage.e.a(Unknown Source) Wed 12/31 11:41:42.460 at sage.e.a(Unknown Source) Wed 12/31 11:41:42.460 at sage.e.a(Unknown Source) Wed 12/31 11:41:42.461 at sage.b1.K(Unknown Source) Wed 12/31 11:41:42.461 at sage.UIManager.a(Unknown Source) Wed 12/31 11:41:42.461 at sage.UIManager.a(Unknown Source) Wed 12/31 11:41:42.461 at sage.UIManager.if(Unknown Source) Wed 12/31 11:41:42.461 at sage.a8.a(Unknown Source) Wed 12/31 11:41:42.462 at sage.a8.a(Unknown Source) Wed 12/31 11:41:42.462 at sage.a8.new(Unknown Source) Wed 12/31 11:41:42.462 at sage.a8.mouseReleased(Unknown Source) Wed 12/31 11:41:42.462 at sage.bg.if(Unknown Source) Wed 12/31 11:41:42.463 at sage.bn.a(Unknown Source) Wed 12/31 11:41:42.463 at sage.bn.a(Unknown Source) Wed 12/31 11:41:42.463 at sage.bn.a(Unknown Source) Wed 12/31 11:41:42.463 at sage.bn.a(Unknown Source) Wed 12/31 11:41:42.464 at sage.bn.a(Unknown Source) Wed 12/31 11:41:42.464 at sage.bn.do(Unknown Source) Wed 12/31 11:41:42.464 at sage.bn.mouseReleased(Unknown Source) Wed 12/31 11:41:42.464 at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source) Wed 12/31 11:41:42.465 at java.awt.Component.processMouseEvent(Unknown Source) Wed 12/31 11:41:42.465 at java.awt.Component.processEvent(Unknown Source) Wed 12/31 11:41:42.465 at java.awt.Component.dispatchEventImpl(Unknown Source) Wed 12/31 11:41:42.465 at java.awt.Component.dispatchEvent(Unknown Source) Wed 12/31 11:41:42.466 at java.awt.EventQueue.dispatchEvent(Unknown Source) Wed 12/31 11:41:42.466 at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) Wed 12/31 11:41:42.466 at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) Wed 12/31 11:41:42.466 at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) Wed 12/31 11:41:42.466 at java.awt.EventDispatchThread.pumpEvents(Unknown Source) Wed 12/31 11:41:42.467 at java.awt.EventDispatchThread.pumpEvents(Unknown Source) Wed 12/31 11:41:42.467 at java.awt.EventDispatchThread.run(Unknown Source) Wed 12/31 11:41:42.467 EXCEPTION in getValueAsObject:sage.a.e: Error in method reflection of sagemc_Global_filterMediaFilesByPath of sage.a.e: UNKNOWN METHOD ERROR name=sagemc_Global_filterMediaFilesByPath args=[[Lsage.by;@2436ac, E:\, true] for:sagemc_Global_filterMediaFilesByPath(AllVideoFiles, "E:\\", true) Wed 12/31 11:41:42.468 sage.a.e: Error in method reflection of sagemc_Global_filterMediaFilesByPath of sage.a.e: UNKNOWN METHOD ERROR name=sagemc_Global_filterMediaFilesByPath args=[[Lsage.by;@2436ac, E:\, true] Any ideas on what I could be doing wrong? Does this error indicate that Sage cannot find this function or doesn't see the JAR file?
__________________
Server: Ryzen 2400G with integrated graphics, ASRock X470 Taichi Motherboard, HDMI output to Vizio 1080p LCD, Win1064Bit (Professional), 16GB RAM Capture Devices (7 tuners): Colossus (x1), HDHR Prime (x2),USBUIRT (multizone) Source: Comcast/Xfinity X1 Cable Primary Client: Server Other Clients: (1) HD200, (1) HD300 Retired Equipment: MediaMVP, PVR150 (x2), PVR150MCE, HDHR, HVR2250, HDPVR 
#2




If it's in the JARs folder, Sage should be able to find it. So your problem is most likely a spelling or capitalization error (Java is casesensitive), or you've got the package or class name wrong, or you're passing the wrong types of arguments so that overload resolution fails (i.e. Sage can't find a method with that name that accepts those argument types). One example of bad argument types is forgetting to pass in an instance of the class for nonstatic methods.
I'm not familiar with SageMC support libraries so I can't help with the specifics, but those are the sorts of errors you should be looking for.
__________________
 Greg 
#3




I copied and pasted from the SageMC stv. Here is the original widget code from SageMC:
Code:
AllVidFiles = sagemc_Global_filterMediaFilesByPath(AllVidFiles, PathFilterExprs, PathFilterExcludes) Code:
<evalExpression>AddStaticContext("PathFilterExprs", new_java_util_ArrayList())</evalExpression> <evalExpression>java_util_List_add(PathFilterExprs, "G:\\Imported Videos\\")</evalExpression> <evalExpression>AddStaticContext("PathFilterExcludes", true)</evalExpression>
__________________
Server: Ryzen 2400G with integrated graphics, ASRock X470 Taichi Motherboard, HDMI output to Vizio 1080p LCD, Win1064Bit (Professional), 16GB RAM Capture Devices (7 tuners): Colossus (x1), HDHR Prime (x2),USBUIRT (multizone) Source: Comcast/Xfinity X1 Cable Primary Client: Server Other Clients: (1) HD200, (1) HD300 Retired Equipment: MediaMVP, PVR150 (x2), PVR150MCE, HDHR, HVR2250, HDPVR 
#4




What's being passed in that code sample is an ArrayList, which is not the same thing as an Array but is actually a subclass of List. What you're passing (according to the exception log) is an Array, which is not compatible with List. So that could conceivably be your problem. Again, I'm not an expert in that library, so you'll need to check whatever documentation came with it to see what type it's expecting, or wait for someone more knowledgeable than me to post.
__________________
 Greg 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
I am getting java violation exception after reinstalll  getstarted  SageTV Software  1  09272008 09:09 AM 
Making the connection between java JAR and an STVi?  beelzerob  SageTV Studio  8  09112008 05:34 PM 
Sage UI disappears during playback  Keith  SageTV Software  17  03032006 03:31 AM 