SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio

Notices

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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-31-2008, 10:58 AM
Tiki's Avatar
Tiki Tiki is online now
Sage Icon
 
Join Date: Feb 2005
Location: Southwest Florida, USA
Posts: 1,946
Help calling Java from Studio

I wanted to re-use 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 hard-coded 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]
I have the sagemc.jar file in the SageTV\JARs folder and this function works with the SageMC STV loaded (Though the arguments are not hard-coded there and get passed-in by the dynamic menus).

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?
Attached Images
File Type: jpg Studio_filterMediaFilesByPath.jpg (114.4 KB, 148 views)
__________________
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
Reply With Quote
  #2  
Old 12-31-2008, 11:20 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
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 case-sensitive), 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 non-static 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
Reply With Quote
  #3  
Old 12-31-2008, 12:38 PM
Tiki's Avatar
Tiki Tiki is online now
Sage Icon
 
Join Date: Feb 2005
Location: Southwest Florida, USA
Posts: 1,946
I copied and pasted from the SageMC stv. Here is the original widget code from SageMC:

Code:
AllVidFiles = sagemc_Global_filterMediaFilesByPath(AllVidFiles, PathFilterExprs, PathFilterExcludes)
The values for PathFilterExprs and PathFilterExcludes get set by the Dynamic menu code. Here is the code from the SageMC_menu.xml:

Code:
            <evalExpression>AddStaticContext("PathFilterExprs", new_java_util_ArrayList())</evalExpression>
            <evalExpression>java_util_List_add(PathFilterExprs, "G:\\Imported Videos\\")</evalExpression>
            <evalExpression>AddStaticContext("PathFilterExcludes", true)</evalExpression>
I just noticed that the PathFilterExprs argument appears to be an array. Could this be my problem?
__________________
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
Reply With Quote
  #4  
Old 12-31-2008, 12:51 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
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
Reply With Quote
Reply


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

Advanced Search
Display Modes

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

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


All times are GMT -6. The time now is 04:06 PM.


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