Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Issues running BCVTB on Mac

Hi,

I am trying to get BCVTB running on my mac (version 10.15) but running into issues. I have the latest version of JDK. I am continuously getting "Failed to get field handle to set library path". I have the latest version of BCVTB and installed EnergyPlus 8.5.0. I have followed this link https://github.com/lbl-srg/bcvtb/issues/32 and nothing has changed. I have tried changing the system properties but not sure what I need to change. I've looked through the entries on the google group and can't figure out how to fix my issues. Please help!!

Here is my system properties file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<!--
 System properties for Mac OS X

>  Entries in this file will be added to
> the set of  environment variables when
> the BCVTB is started.
> 
>  Possible placeholders are ${x} or $x,
> where x can be PTII, CLASSPATH,
> BCVTB_HOME, or any   system
> environment variable (such as PATH).
> --> <properties> <entry key="myProgramBin">/Applications/bcvtb/bin</entry>
> 
> <entry
> key="PTII">/Applications/ptII11.01/bin</entry>
> 
> <entry
> key="PATH">$myProgramBin:$PATH</entry>
> 
> <!-- EXECUTABLES PATH -->
> 
> <entry
> key="ENERGYPLUS_BIN">/Applications/EnergyPlus-8-5-0</entry>
> 
> <entry
> key="MATLAB_BIN">/Applications/MATLAB_R2018b.app/bin</entry>
> 
> <!-- The entry below assumes that
> Radiance is installed in
> /usr/local/ray 
>      Please also check RAYPATH below --> <entry key="BCVTB_RADIANCE_BIN">/usr/local/ray/bin</entry>
> 
> <!-- RAYPATH sets the path to the
> Radiance libraries.
>      Note that a period is required to search for the current directory. -->
> <entry
> key="RAYPATH">/usr/local/lib/ray:.</entry>
> 
> <!-- SYSTEM PATH -->
> 
> <entry key="PATH">
> $BCVTB_HOME/bin:$ENERGYPLUS_BIN:$MATLAB_BIN:$BCVTB_RADIANCE_BIN:$PATH</entry>
> 
> 
> <!-- LIBRARIES PATH -->
> 
> <entry
> key="MATLABPATH">$BCVTB_HOME/lib/matlab</entry>
> 
> <entry
> key="DYLD_LIBRARY_PATH">$BCVTB_HOME/lib/util:$DYLD_LIBRARY_PATH</entry>
> 
> 
> <!-- CLASSPATH -->
> 
> <entry
> key="CLASSPATH">${BCVTB_HOME}/lib:${PTII}:${PTII}/ptolemy/actor/gui/jnlp/BCVTBApplication.jar:${PTII}/doc/codeDocBcvtb.jar:${PTII}/lbnl/lbnl.jar:${PTII}/lbnl/demo/demo.jar:${PTII}/doc/design/usingVergil/usingVergil.jar:${PTII}/doc/docConfig.jar:${PTII}/lib/diva.jar:${PTII}/lib/kieler.jar:${PTII}/ptolemy/ptsupport.jar:${PTII}/ptolemy/vergil/vergil.jar:${PTII}/ptolemy/domains/continuous/continuous.jar:${PTII}/ptolemy/domains/continuous/demo/demo.jar:${PTII}/ptolemy/domains/sdf/sdf.jar:${PTII}/ptolemy/domains/sdf/demo/demo.jar:${PTII}/ptolemy/domains/modal/modal.jar:${PTII}/ptolemy/domains/modal/demo/demo.jar:${PTII}/ptolemy/actor/parameters/demo/demo.jar:${PTII}/ptolemy/matlab/matlab.jar:${PTII}/ptolemy/matlab/demo/demo.jar:${PTII}/lib/matlab.jar:${PTII}/ptolemy/actor/lib/comm/demo/demo.jar:${PTII}/ptolemy/actor/lib/database/database.jar:${PTII}/ptolemy/actor/lib/hoc/demo/demo.jar:${PTII}/ptolemy/actor/lib/javasound/demo/demo.jar:${PTII}/ptolemy/data/type/demo/demo.jar:${PTII}/ptolemy/data/unit/demo/demo.jar:${PTII}/ptolemy/moml/demo/demo.jar:${PTII}/ptolemy/vergil/kernel/attributes/demo/demo.jar:${PTII}/lib/jna.jar:${PTII}/org/ptolemy/fmi/fmi.jar:${PTII}/ptolemy/actor/lib/fmi/fmi.jar:${PTII}/ptolemy/actor/lib/fmi/demo/demo.jar:${PTII}/ptolemy/vergil/basic/imprt/fmu/fmu.jar:${PTII}/lib/jython.jar:${PTII}/ptolemy/actor/lib/python/python.jar:${PTII}/ptolemy/actor/lib/python/demo/demo.jar:${PTII}/ptolemy/domains/qss/qss.jar:${PTII}/ptolemy/domains/de/de.jar</entry>
> 
> <!-- FOR DEVELOPERS ONLY -->
> 
> <!-- The next entry is only used if a
> developer wants to update
>      the Ptolemy II files --> <entry key="BCVTB_PTIISrc">
> ${HOME}/proj/bcvtb/code/ptII-dev</entry>
> 
> <!-- Set the next entry to true to run
> the A/D interface unit tests -->
> <entry
> key="haveADInterfaceMCC">false</entry>
> 
> <!-- Set the next entry to true to run
> the BACnet unit tests --> <entry
> key="haveBACnetALC">false</entry>
> 
> <!-- Set the path to Ptolemy -->
> <entry
> key="PTII">$BCVTB_HOME/lib/ptII</entry>
> 
> </properties>

Here are the errors I am seeing:

java.io.IOException: Failed to get field handle to set library path
    at ptolemy.util.StringUtilities.addDirectoryToJavaLibraryPath(StringUtilities.java:129)
    at ptolemy.util.StringUtilities.addPtolemyLibraryDirectoryToJavaLibraryPath(StringUtilities.java:150)
    at ptolemy.actor.gui.ConfigurationApplication.<init>(ConfigurationApplication.java:234)
    at ptolemy.actor.gui.MoMLApplication.<init>(MoMLApplication.java:100)
    at ptolemy.vergil.VergilApplication.<init>(VergilApplication.java:128)
    at ptolemy.vergil.VergilApplication.<init>(VergilApplication.java:112)
    at ptolemy.vergil.VergilApplication$1.run(VergilApplication.java:274)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.lang.NoSuchFieldException: usr_paths
    at java.base/java.lang.Class.getDeclaredField(Class.java:2412)
    at ptolemy.util.StringUtilities.addDirectoryToJavaLibraryPath(StringUtilities.java:114)
    ... 19 more