---
schema_version: "1"
id: fea87d183105a5572790c4854d2e0a89dfe33344fbea1d0c14037208eb39e68b
title: DataWeave の問題とエラー
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/anypoint-code-builder/troubleshoot-dataweave.md
canonical_url: https://docs.mulesoft.com/jp/anypoint-code-builder/troubleshoot-dataweave
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 6a15901c98a6321e1beb04bd24b4247287a6de6ad9da6a863c96ad790baf34d1
description: MuleSoft Documentation Site
latest: true
---
# DataWeave の問題とエラー

**進行中のベータリリース**​: **クラウド IDE は進行中のベータリリースです**​。ベータ状態での Anypoint Code Builder の使用には、IDE で入手できる、該当するベータサービス契約条件が適用されます。

Anypoint Code Builder で値を処理できない場合、値の問題を識別するビジュアルインジケーターが IDE に表示されます。次のような問題があります。

- [Unable to find sample input (サンプル入力が見つかりません)](#sample-input)
- [Unable to resolve reference (参照を解決できません)](#resolve-reference)
- [Expects ​_x_​ but got ​_y_​ (x が想定されますが y が取得されました)](#expects-y)
- [Invalid input (無効な入力)](#invalid-input)

## [](#sample-input)Unable to Find Sample Input (サンプル入力が見つかりません)

DataWeave エラー​`「Unable to find sample input (サンプル入力が見つかりません)」`​が ​`payload`​ などの Mule イベント変数に適用されます。この場合、IDE では設定 XML ファイルの値の下に青い波線が表示されます。

![「Unable to find sample input (サンプル入力が見つかりません)」エラー](/mulesoft/current/ja-jp/anypoint-code-builder/_images/dw-issue-sample-data.png)

アプリケーションが実行されていない場合、IDE で Mule 変数に関する情報を提供できないため、自分でサンプルデータを入力する必要があります。 [\[Quick Fix (クリック修正)](https://docs.mulesoft.com/jp/anypoint-code-builder/int-configure-dw-expressions#sample-data)\]​ を使用して、アプリケーション実行時の想定される形式とデータ構造でサンプルデータを入力します。

Mule イベント変数についての詳細は、[Predefined Variables](https://docs.mulesoft.com/dataweave/latest/dataweave-variables-context)を参照してください。

## [](#resolve-reference)Unable to Resolve Reference (参照を解決できません)

`「Unable to resolve reference (参照を解決できません)」`​は、一般的に ​`afkdldjf`​ のような識別されない一連の文字のエラーです。

![「Unable to resolve reference (参照を解決できません)」エラー](/mulesoft/current/ja-jp/anypoint-code-builder/_images/dw-issue-reference-resolution.png)

目的の値を入力するか、​[\[Quick Fix (クイック修正)](https://docs.mulesoft.com/jp/anypoint-code-builder/int-configure-dw-expressions#sample-data)\]​ を使用して文字シーケンスを DataWeave 変数に変換します。詳細は、[DataWeave Variables](https://docs.mulesoft.com/dataweave/latest/dataweave-variables)を参照してください。

## [](#expects-y)Expects ​_x_​ but Got ​_y_​ (x が想定されますが y が取得されました)

`「Expects ​_x_​ but got ​_y_​ (x が想定されますが y が取得されました)」`​のようなエラーは、一般的に指定された関数に問題があることを示します。たとえば、​`round()`​ 関数に引数 (この場合は丸める数値) がないために​`「Expects 1 argument but got 0 (1 個の引数が想定されますが 0 個が取得されました)」`​が発生します。たとえば、​`round(1.65)`​ のように修正します。同様に、引数のデータ型に誤りがあることを示すエラーや、関数が無効で修正が必要であることを示すエラーなどがあります。

エラーメッセージを読んで式のどの部分を修正するのかを判断し、エラーメッセージの後の関数の説明を確認して関数についての詳細を把握します。その他の DataWeave 関数のドキュメントについては、​[「DataWeave Module」](https://docs.mulesoft.com/dataweave/latest/dw-functions#dw_modules)​を参照してください。

## [](#invalid-input)Invalid input (無効な入力)

エラー​`「Invalid input (無効な入力)」`​は、一般的に ​`?`​ などの特殊文字が DataWeave 式にあり、エスケープされていない場合に発生します。

![「Invalid input (無効な入力)」エラー](/mulesoft/current/ja-jp/anypoint-code-builder/_images/dw-issue-invalid-input.png)

詳細は、​[「有効な識別子を宣言するためのルール」](https://docs.mulesoft.com/dataweave/latest/dataweave-language-introduction#valid-identifiers)​および​[「特殊文字のエスケープ」](https://docs.mulesoft.com/dataweave/latest/dataweave-language-introduction#escape-special-characters)​を参照してください。