[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDFJava #JJM-436507]: toolsUI-4.5.jar hang and logging error on Mac Yosemite OS X 10.10.2



Greetings Dave,

I'm glad you found the issue and found a workaround.

Where were the external places from which the other logging classes
were coming from? Is it possible that your java classpath was being
set globally for your user? It sounds like the GDAL framework modifies
your java classpath, which can cause a lot of issues for other java
executable jars as well.

Cheers!

Sean

> Thanks,
> 
> Googling a chunk of the error, I found 
> http://stackoverflow.com/questions/20537459/java-lang-nosuchmethoderror-org-slf4j-spi-locationawarelogger-log
>  giving a hint at trying a '-verbose:class' option. Using it, I noticed there 
> were some org.apache.commons.logging.impl stuff loaded from external places.
> 
> Googling that gave me:
> 
> http://commons.apache.org/proper/commons-logging/troubleshooting.html#Fixes 
> gave this
> 
> Which appears to workaround the problem with:
> 
> $ java 
> -Dorg.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImpl
>  -jar ./toolsUI-4.5.jar
> 
> I guess the toolsUI-4.5.jar interacts poorly with the GDAL framework from 
> http://www.kyngchaos.com/software/frameworks.
> 
> Dave
> 
> 
> $ java -Xmx1g -verbose:class -jar toolsUI-4.5.jar  > log &
> [1] 16227
> $ Exception in thread "main" java.lang.NoSuchMethodError: 
> org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
> at 
> org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocationAwareLog.java:133)
> at 
> org.springframework.core.env.MutablePropertySources.addLast(MutablePropertySources.java:108)
> at 
> org.springframework.core.env.StandardEnvironment.customizePropertySources(StandardEnvironment.java:78)
> at 
> org.springframework.core.env.AbstractEnvironment.<init>(AbstractEnvironment.java:124)
> at 
> org.springframework.core.env.StandardEnvironment.<init>(StandardEnvironment.java:54)
> at 
> org.springframework.context.support.AbstractApplicationContext.createEnvironment(AbstractApplicationContext.java:442)
> at 
> org.springframework.context.support.AbstractApplicationContext.getEnvironment(AbstractApplicationContext.java:288)
> at 
> org.springframework.context.support.AbstractRefreshableConfigApplicationContext.resolvePath(AbstractRefreshableConfigApplicationContext.java:122)
> at 
> org.springframework.context.support.AbstractRefreshableConfigApplicationContext.setConfigLocations(AbstractRefreshableConfigApplicationContext.java:80)
> at 
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:137)
> at 
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
> at ucar.nc2.ui.ToolsUI.main(ToolsUI.java:6343)
> 
> $ grep org.apache.commons log
> [Loaded org.apache.commons.logging.LogFactory from 
> file:/Library/Frameworks/GDAL.framework/Versions/1.11/Java/commons-logging-1.1.3.jar]
> [Loaded org.apache.commons.logging.LogConfigurationException from 
> file:/Library/Frameworks/GDAL.framework/Versions/1.11/Java/commons-logging-1.1.3.jar]
> [Loaded org.apache.commons.logging.LogFactory$6 from 
> file:/Library/Frameworks/GDAL.framework/Versions/1.11/Java/commons-logging-1.1.3.jar]
> [Loaded org.apache.commons.logging.impl.WeakHashtable from 
> file:/Library/Frameworks/GDAL.framework/Versions/1.11/Java/commons-logging-1.1.3.jar]
> [Loaded org.apache.commons.logging.LogFactory$1 from 
> file:/Library/Frameworks/GDAL.framework/Versions/1.11/Java/commons-logging-1.1.3.jar]
> [Loaded org.apache.commons.logging.impl.WeakHashtable$Referenced from 
> file:/Library/Frameworks/GDAL.framework/Versions/1.11/Java/commons-logging-1.1.3.jar]
> [Loaded org.apache.commons.logging.impl.WeakHashtable$WeakKey from 
> file:/Library/Frameworks/GDAL.framework/Versions/1.11/Java/commons-logging-1.1.3.jar]
> [Loaded org.apache.commons.logging.LogFactory$4 from 
> file:/Library/Frameworks/GDAL.framework/Versions/1.11/Java/commons-logging-1.1.3.jar]
> [Loaded org.apache.commons.logging.LogFactory$3 from 
> file:/Library/Frameworks/GDAL.framework/Versions/1.11/Java/commons-logging-1.1.3.jar]
> [Loaded org.apache.commons.logging.LogFactory$2 from 
> file:/Library/Frameworks/GDAL.framework/Versions/1.11/Java/commons-logging-1.1.3.jar]
> [Loaded org.apache.commons.logging.impl.SLF4JLogFactory from 
> file:/Users/drf/Downloads/toolsUI-4.5.jar]
> [Loaded org.apache.commons.logging.Log from 
> file:/Library/Frameworks/GDAL.framework/Versions/1.11/Java/commons-logging-1.1.3.jar]
> [Loaded org.apache.commons.logging.impl.SLF4JLocationAwareLog from 
> file:/Users/drf/Downloads/toolsUI-4.5.jar]
> [Loaded org.apache.commons.logging.impl.SLF4JLog from 
> file:/Users/drf/Downloads/toolsUI-4.5.jar]
> $
> 
> Dave
> 
> 
> > On Mar 18, 2015, at 3:15 PM, Unidata netCDF Java Support <address@hidden> 
> > wrote:
> >
> > Hi David,
> >
> > I'm on a ver similar setup as you:
> >
> > Mac OSX 10.10.2
> > Java 1.8:
> >    java version "1.8.0_25"
> >    Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
> >    Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
> >
> > But I am able to run toolsUI without any issues. Let me check with another
> > developer who uses Mac OS X to see if they can reproduce this.
> >
> > Ryan, can you give this a try and see what you come up with?
> >
> > Thanks!
> >
> > Sean
> >
> >>
> >>> On Mar 18, 2015, at 2:13 PM, Unidata netCDF Java Support <address@hidden> 
> >>> wrote:
> >>>
> >>> Greetings David,
> >>>
> >>> Could you tell me from where you got the toolsUI jar?
> >>
> >>
> >> I did a:
> >>
> >> wget ftp://ftp.unidata.ucar.edu/pub/netcdf-java/v4.5/toolsUI-4.5.jar
> >>
> >> after copying the link form the page at 
> >> http://www.unidata.ucar.edu/software/thredds/current/netcdf-java/documentation.htm
> >>
> >> Below are some checksums and a reconfirmation that this checksummed jar is 
> >> giving me that error.
> >>
> >> While apparently hung at the command line, the top menu bar on my Mac 
> >> shows a 'ToolsUI' entry next to the apple, which, when pulled down, has an 
> >> 'About ToolsUI' menu item that reports 'About ToolsUI Version 1.0 (1.0)'  
> >> The Quit menu entry is functional.
> >>
> >> dave
> >>
> >> $
> >> $ pwd
> >> /Users/drf/Downloads
> >> $ md5sum toolsUI-*
> >> 66a78164682281acf2f78a0207b1dbe1  toolsUI-4.2.jar
> >> 546aa9326d2a39de2a5ee0b575000748  toolsUI-4.3.jar
> >> ab74bd2d43b59102d4de479dbc169484  toolsUI-4.5.jar
> >> $ java -version
> >> java version "1.8.0_25"
> >> Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
> >> Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
> >> $ java -jar toolsUI-4.5.jar
> >> Exception in thread "main" java.lang.NoSuchMethodError: 
> >> org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
> >> at 
> >> org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocationAwareLog.java:133)
> >> at 
> >> org.springframework.core.env.MutablePropertySources.addLast(MutablePropertySources.java:108)
> >> at 
> >> org.springframework.core.env.StandardEnvironment.customizePropertySources(StandardEnvironment.java:78)
> >> at 
> >> org.springframework.core.env.AbstractEnvironment.<init>(AbstractEnvironment.java:124)
> >> at 
> >> org.springframework.core.env.StandardEnvironment.<init>(StandardEnvironment.java:54)
> >> at 
> >> org.springframework.context.support.AbstractApplicationContext.createEnvironment(AbstractApplicationContext.java:442)
> >> at 
> >> org.springframework.context.support.AbstractApplicationContext.getEnvironment(AbstractApplicationContext.java:288)
> >> at 
> >> org.springframework.context.support.AbstractRefreshableConfigApplicationContext.resolvePath(AbstractRefreshableConfigApplicationContext.java:122)
> >> at 
> >> org.springframework.context.support.AbstractRefreshableConfigApplicationContext.setConfigLocations(AbstractRefreshableConfigApplicationContext.java:80)
> >> at 
> >> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:137)
> >> at 
> >> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
> >> at ucar.nc2.ui.ToolsUI.main(ToolsUI.java:6343)
> >>
> >>
> >>
> >> Thanks
> >>
> >>
> >>>
> >>> Thanks!
> >>>
> >>> Sean
> >>>
> >>>> When attempting to run the toolsUI-4.5 from the command line I get the 
> >>>> following message and a hang.  Any advice?
> >>>>
> >>>>
> >>>> $ java -jar ~/Downloads/toolsUI-4.5.jar
> >>>> Exception in thread "main" java.lang.NoSuchMethodError: 
> >>>> org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
> >>>> at 
> >>>> org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocationAwareLog.java:133)
> >>>> at 
> >>>> org.springframework.core.env.MutablePropertySources.addLast(MutablePropertySources.java:108)
> >>>> at 
> >>>> org.springframework.core.env.StandardEnvironment.customizePropertySources(StandardEnvironment.java:78)
> >>>> at 
> >>>> org.springframework.core.env.AbstractEnvironment.<init>(AbstractEnvironment.java:124)
> >>>> at 
> >>>> org.springframework.core.env.StandardEnvironment.<init>(StandardEnvironment.java:54)
> >>>> at 
> >>>> org.springframework.context.support.AbstractApplicationContext.createEnvironment(AbstractApplicationContext.java:442)
> >>>> at 
> >>>> org.springframework.context.support.AbstractApplicationContext.getEnvironment(AbstractApplicationContext.java:288)
> >>>> at 
> >>>> org.springframework.context.support.AbstractRefreshableConfigApplicationContext.resolvePath(AbstractRefreshableConfigApplicationContext.java:122)
> >>>> at 
> >>>> org.springframework.context.support.AbstractRefreshableConfigApplicationContext.setConfigLocations(AbstractRefreshableConfigApplicationContext.java:80)
> >>>> at 
> >>>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:137)
> >>>> at 
> >>>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
> >>>> at ucar.nc2.ui.ToolsUI.main(ToolsUI.java:6343)
> >>>> ##############(hang here  - Ctrl-C will exit)
> >>>> ^C$
> >>>> $
> >>>> $
> >>>> $ java -version
> >>>> java version "1.8.0_25"
> >>>> Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
> >>>> Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
> >>>>
> >>>>
> >>>> Dave
> >>>> --
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>> Ticket Details
> >>> ===================
> >>> Ticket ID: JJM-436507
> >>> Department: Support netCDF Java
> >>> Priority: Normal
> >>> Status: Open
> >>>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >
> > Ticket Details
> > ===================
> > Ticket ID: JJM-436507
> > Department: Support netCDF Java
> > Priority: Normal
> > Status: Open
> >
> 
> --
> Dr. David Forrest
> address@hidden
> 804-684-7900w
> 757-968-5509h
> 804-413-7125c
> #240 Andrews Hall
> Virginia Institute of Marine Science
> Route 1208, Greate Road
> PO Box 1346
> Gloucester Point, VA, 23062-1346
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 

Ticket Details
===================
Ticket ID: JJM-436507
Department: Support netCDF Java
Priority: Normal
Status: Open