A New Jersey appellate court ruled Thursday that a state agency and Franklin Township are not liable for damages or claims due to their failure to prevent a children's day-care center from opening in a contaminated mercury thermometer factory a decade ago.