Forums: 

Hello everybody,

Im trying to recognize the name of the track using fingerprinting of gracenote. Underneath is what I tried to do.

GnUser gnUser = new GnUser( new UserStore(),CLIENT_ID, CLIENT_TAG, CLIENT_APP_VERSION);
GnMusicIdFile audioFile = new GnMusicIdFile(gnUser, new MusicIDFileEvents());
GnMusicIdFileInfoManager gnMusicIdFileInfoManager = audioFile.fileInfos();
GnMusicIdFileInfo gnMusicIdFileInfo = gnMusicIdFileInfoManager.add("C:\\Users\\GieForce\\School\\Gracenote\\sample_data\\01_stone_roses.wav");
gnMusicIdFileInfo.fingerprint();

I did everything as written in the documentation but I get constantly the following error message.

Exception in Application start method
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
    at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Exception in Application start method
    at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182)
    at java.lang.Thread.run(Thread.java:748)
Caused by: com.gracenote.gnsdk.GnException: manager not initialized! - SDKMGR_CHECK_INIT
    at com.gracenote.gnsdk.gnsdk_javaJNI.new_GnUser__SWIG_2(Native Method)
    at com.gracenote.gnsdk.GnUser.<init>(GnUser.java:71)
    at com.music.Main.start(Main.java:36)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
    at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
    at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
    ... 1 more
Exception running application com.music.Main

Can anybody explain what i'm doing wrong all the time?

PS: how can I ask the API to get the name of the track with the fingerprint I make

Forum Discussions