Page 1 of 2

Error in log

Posted: Tue Mar 19, 2013 10:59 am
by MasterPhW
Updated to 2.5.2.1 today and this appeared at the end of my log.

Code: Select all

A serious error occurred during PMS init
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 2
	at com.google.gson.Gson.fromJson(Gson.java:806) ~[ums.jar:2.5.2.1]
	at com.google.gson.Gson.fromJson(Gson.java:761) ~[ums.jar:2.5.2.1]
	at com.google.gson.Gson.fromJson(Gson.java:710) ~[ums.jar:2.5.2.1]
	at net.pms.configuration.MapFileConfiguration.parse(MapFileConfiguration.java:87) ~[ums.jar:2.5.2.1]
	at net.pms.dlna.RootFolder.getVirtualFolders(RootFolder.java:249) ~[ums.jar:2.5.2.1]
	at net.pms.dlna.RootFolder.discoverChildren(RootFolder.java:106) ~[ums.jar:2.5.2.1]
	at net.pms.configuration.RendererConfiguration.getRootFolder(RendererConfiguration.java:198) ~[ums.jar:2.5.2.1]
	at net.pms.PMS.getRootFolder(PMS.java:111) [ums.jar:2.5.2.1]
	at net.pms.PMS.init(PMS.java:530) [ums.jar:2.5.2.1]
	at net.pms.PMS.createInstance(PMS.java:839) [ums.jar:2.5.2.1]
	at net.pms.PMS.main(PMS.java:926) [ums.jar:2.5.2.1]
Caused by: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 2
	at com.google.gson.stream.JsonReader.expect(JsonReader.java:339) ~[ums.jar:2.5.2.1]
	at com.google.gson.stream.JsonReader.beginArray(JsonReader.java:306) ~[ums.jar:2.5.2.1]
	at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:79) ~[ums.jar:2.5.2.1]
	at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:60) ~[ums.jar:2.5.2.1]
	at com.google.gson.Gson.fromJson(Gson.java:795) ~[ums.jar:2.5.2.1]
	... 10 common frames omitted
Any idea? A failure on my end?

Re: Error in log

Posted: Mon Mar 25, 2013 10:13 pm
by MasterPhW
Still have the same problem with 2.5.2.2. und jre 1.7.0_17...
Here is my ums_dbg.zip.
Hope anybody can help.

Re: Error in log

Posted: Mon Mar 25, 2013 10:22 pm
by Optimus_prime
Do you always run UMS on Server 2008 R2? I've never tried it before but i have a working machine with it installed so i can try and replicate it for you.
Maybe try running it as administrator but i can't think of anything else

Re: Error in log

Posted: Mon Mar 25, 2013 10:58 pm
by SharkHunter
There is some fault in your Virtual folders conf file. At the very first line. Those file are sadly not part of the debug packer (not to self make the packer include those). Look at line 1 in that file..And upload it

Re: Error in log

Posted: Tue Mar 26, 2013 5:50 am
by MasterPhW
Optimus_prime wrote:Do you always run UMS on Server 2008 R2? I've never tried it before but i have a working machine with it installed so i can try and replicate it for you.
Maybe try running it as administrator but i can't think of anything else
Jup, Server 2008 R2 is my media server, where XBMC does gets all its data from and that's the reason I also installed UMS there. Was working before.
SharkHunter wrote:There is some fault in your Virtual folders conf file. At the very first line. Those file are sadly not part of the debug packer (not to self make the packer include those). Look at line 1 in that file..And upload it
I've created the virtual folder conf file based on the conversation in this thread
The content is:

Code: Select all

[
   {
      "name"     : "Series",
      "files" : ["X:\\","Y:\\","Z:\\"]
   }
]
Nothing more, nothing less.

Re: Error in log

Posted: Tue Mar 26, 2013 8:41 pm
by SharkHunter
Your json is ok if I run it in some json validators (haven't tried gson but I don't think there is any other result). Since it complains on the first line (and basically first char) I suspect you got some weird char BEFORE the [ (that probably isn't seen). Try opening it in another editor and see if there is a crappy char there (I got one editor on windows that when I create a new file always add some crap at the top).

Or copy UMS.conf to your josn file mark everything delete and then add the stuff you want.

Re: Error in log

Posted: Tue Mar 26, 2013 8:58 pm
by MasterPhW
I've opened the file with notepad++ and tried the Windows editor and can't find a special char.
So I decided to upload it to my box aswell (get it here). Could it be the encoding? If so, could you add a encoding check + error message in an upcoming version, so everyone knows what they did wrong? Or probably I just should wait till a new version supports the virtual folder option in the main config GUI and creates a working file itself?

Re: Error in log

Posted: Tue Mar 26, 2013 9:05 pm
by SharkHunter
Yes it could be encoding. I think UMS expects all files it reads to be UTF-8.

Re: Error in log

Posted: Tue Mar 26, 2013 10:16 pm
by MasterPhW
It is UTF-8 without BOM, like the UMS.conf... O.o

Re: Error in log

Posted: Tue Mar 26, 2013 10:38 pm
by ExSport
Some editors adds special "invisible" char at the beginning for files in UTF-8/16 encodings so maybe it is problem?
Try to open it in pure notepad and save it as ANSI. Check that all is OK in file and load to UMS again.