Both 26.0 and 25.1 on OS X 10.12 via homebrew, using the Spacemacs configuration.
I have tried both (setq org-use-property-inheritance (quote (noweb-ref))) and (setq org-use-property-inheritance t), both at org-mode load and from within the org file in question. Also, note that I am using the 9.0 syntax, which I believe Spacemacs loads as part of its org-mode layer.
The result is always an empty TestDemo2.java file. What’s interesting is that if I run org-babel-expand-src-block I see this:
If I add :noweb-ref to each block, it works.
My org-mode config (org-plus-contrib-20170210)
;; org-mode
(with-eval-after-load 'org
;; Turning `org-use-property-inheritance' on can cause significant overhead when doing a search, which is why it is not on by default.
(setq org-use-property-inheritance t)
(setq org-reveal-root "/usr/workspace/reveal.js")
(setq org-src-fontify-natively t)
(setq org-src-tab-acts-natively t)
(setq org-confirm-babel-evaluate nil)
(setq org-export-babel-evaluate nil)
(setq org-startup-indented t)
(setq org-imenu-depth 3) ;;; increase imenu depth to include third level headings
(setq org-ditaa-jar-path "/usr/local/bin/ditaa")
(setq org-html-checkbox-type 'html)
(setq org-hide-emphasis-markers t)
(setq org-src-window-setup 'other-window) ;; reuses another open buffer window
(add-hook 'org-mode-hook 'org-display-inline-images)
(add-hook 'org-babel-after-execute-hook 'org-display-inline-images) ;;; Update images from babel code blocks automatically
;;; LaTex
;; To perform full-document previews (that is, aside from the inline previewing
;; under SPC m p), add the following to your .spacemacs under
;; dotspacemacs/user-config. Then when you open up a compiled PDF, the preview
;; will update automatically when you recompile.
(add-hook 'doc-view-mode-hook 'auto-revert-mode)
;; Don't use CDLaTeX mode itself under Org mode, but use the light version
;; org-cdlatex-mode that comes as part of Org mode. Turn it on for the current
;; buffer with M-x org-cdlatex-mode RET, or for all Org files with
(add-hook 'org-mode-hook 'turn-on-org-cdlatex)
(setq org-format-latex-options (plist-put org-format-latex-options :scale 2.0)) ;;
(setq org-format-latex-options (plist-put org-format-latex-options :justify 'center)) ;;
(setq org-pandoc-options-for-latex-pdf '((latex-engine . "xelatex")));; "pdflatex")));; "lualatex")));;
(add-to-list 'org-latex-packages-alist '("" "tikz" t))
(setq org-latex-create-formula-image-program 'imagemagick)
(eval-after-load "preview" '(add-to-list 'preview-default-preamble "\\PreviewEnvironment{tikzpicture}" t))
(setq org-latex-logfiles-extensions (quote ("lof" "lot" "tex~" "aux" "idx" "log" "out" "toc" "nav" "snm" "vrb" "dvi" "fdb_latexmk" "blg" "brf" "fls" "entoc" "ps" "spl" "bbl")))
(define-key evil-normal-state-map (kbd "zp") 'org-toggle-latex-fragment)
;; (add-to-list 'org-src-lang-modes '("dot" . graphviz-dot))
(require 'ob-haskell)
(require 'ob-scala)
(require 'ob-dot)
(require 'ob-ditaa)
(require 'ob-shell)
(require 'ob-C)
(require 'ob-dot)
(require 'ob-gnuplot)
(require 'ob-java)
(require 'ob-org)
(add-to-list 'org-babel-load-languages '(haskell . t))
;; (erlang . t)
(add-to-list 'org-babel-load-languages '(elixir . t))
;; (ipython . t)
(add-to-list 'org-babel-load-languages '(python . t))
(add-to-list 'org-babel-load-languages '(java . t))
(add-to-list 'org-babel-load-languages '(js . t))
(add-to-list 'org-babel-load-languages '(ruby . t))
(add-to-list 'org-babel-load-languages '(emacs-lisp . t))
(add-to-list 'org-babel-load-languages '(C . t))
(add-to-list 'org-babel-load-languages '(latex . t))
(add-to-list 'org-babel-load-languages '(ditaa . t))
(add-to-list 'org-babel-load-languages '(gnuplot . t))
(add-to-list 'org-babel-load-languages '(dot . t))
(add-to-list 'org-babel-load-languages '(latex . t))
;; (org . t)
(add-to-list 'org-babel-load-languages '(calc . t))
(add-to-list 'org-babel-load-languages '(shell . t))
(add-to-list 'org-babel-load-languages '(org . t))
;; redefines source code block templae to provide a name
(add-to-list 'org-structure-template-alist
'("s" "#+NAME: ?\n#+BEGIN_SRC \n\n#+END_SRC"))
)
(eval-after-load "preview"
'(add-to-list 'preview-default-preamble "\\PreviewEnvironment{tikzpicture}" t))
)