PROBLEM TO BE SOLVED: To provide a novel compound having a GPR40 activating action, particularly an insulin secretion promoter and an agent useful for prevention and/or therapy of diabetes, obesity, or the like.SOLUTION: The present invention provides a compound of formula (I), a salt thereof, or a solvate thereof (where n is 0 to 2; p is 0 to 4; h is 0 to 3; j is 0 to 3; k is 0 to 2; ring B is an aryl group or a heteroaryl group; X is O, S, -NR-; Jis -CRR- or -NR-; Jis -CRR- or -NR-; and R-Rare a specific group).SELECTED DRAWING: None【課題】GPR40活性化作用を有し、特にインスリン分泌促進剤、糖尿病、肥満等の予防及び/又は治療に有用な新規化合物の提供。【解決手段】下記式(I)で表される化合物、その塩又はそれらの溶媒和物。(nは0~2;pは0~4;hは0~3;jは0~3;kは0~2;環Bはアリール基、ヘテロアリール基;XはO、S、-NR7-;J1は-CR11aR11b-、-NR11c-;J2は-CR12aR12b-、-NR12c-;R1~R12cは特定の基。)【選択図】なし