Thread: IRIS SeisSound Java Error with Matlab

Started: Aug. 27, 2015, 12:15 p.m.
Last activity: Sept. 2, 2015, 2:38 p.m.
Topics: Web Services
Greg Brenn
Aug. 27, 2015, 12:15 p.m.
Greetings,

I am interested in running the SeisSound package from IRIS, but I've run
into an error after following the steps provided in the README file within
the SeisSound package.

After verifying that my paths are all correct, and that the Java .Jar files
have been added to the dynamic path (I received the same error when I added
the jar file to the static path), I run the SeisSound_driver.m script, and
the script seems to run well until I get to the following error:

*Error using taupTime (line 117)*
*Java exception occurred:*
*java.lang.NoSuchFieldError: phaseNames*
* at edu.sc.seis.TauP.MatTauP_Time.init(MatTauP_Time.java:100)*
* at edu.sc.seis.TauP.MatTauP_Time.run_time(MatTauP_Time.java:187)*
*Error in SeisSound_main (line 295)*
* phaseTime = taupTime('iasp91',eventDepth,phaseList,'sta',[sta_lat
sta_lon],'evt',[eventLat,eventLon]);*
*Error in SeisSound_driver (line 44)*
* [status_SeisSound] =
SeisSound_main(fname,sta_favs(kk,:),chan,net,movie_height,basedir); *

I'm wondering if anyone else who has experience running SeisSound has run
into this error? I am almost positive that my paths to the Jar files are
correct, because I received to warnings/ errors when following the path
steps in the README file. I'm stumped, and hopefully someone might have a
solution!

Cheers,
Greg

  • Forrest Thompson
    Sept. 2, 2015, 2:38 p.m.
    I have never used SeisSound but the Java runtime error gives a clue. The error is:

    *Error using taupTime (line 117)*
    *Java exception occurred:*
    *java.lang.NoSuchFieldError: phaseNames*
    * at edu.sc.seis.TauP.MatTauP_Time.init(MatTauP_Time.java:100)*

    It just says the code at line 100 in MatTauP_Time.java is trying to access field 'phaseNames'. This link http://docs.oracle.com/javase/7/docs/api/java/lang/NoSuchFieldError.html says this error is

    "Thrown if an application tries to access or modify a specified field of an object, and that object no longer has that field. Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed."

    In this case the field 'phaseNames' is not defined in MatTauP_Time.java but is inherited from a parent class:

    class MatTauP_Time extends TauP_Time

    So the theory is your are running with incompatible code - two jars if a standard Java deployment; or a Java Jar and Matlab generated Java code? Whatever, the code containing MatTauP_Time is incompatible with code containing TauP_Time - perhaps a change was made so the field phaseNames was changed in TauP_Time, or perhaps the field was made private and is now only accessible through an access call rather than directly.

    The solution would be to make sure the two sets of code are compatible, i.e., if using 2 jars then make sure they are versions that work together. Or if Java code is generated by Matlab it needs to match the Jar version its supposed to work with.
Page built 21:00:47 | v.b7344ff2