I know this is nine years later, but maybe it helps someone. This error is often triggered by comments in the code. If I go back and remove commenting, both --comment and /* comment */, that often stops the error. Other times, the editor has no problem with comments.
My suspicion is that something gets screwy in the source java code, but I'm building reports without knowledge of java, so I am working rather blind in that regard.
Example that throws error:
WITH TARGET_SN AS (
SELECT
INV.SERIAL_NO_OEM,
INV.INV_NO_DB_ID,
INV.INV_NO_ID,
INV.INV_CLASS_CD,
INV.H_INV_NO_DB_ID,
INV.H_INV_NO_ID
FROM INV_INV INV
WHERE
/* INV.INV_NO_DB_ID = $P{INV_NO_DB_ID} AND
INV.INV_NO_ID = $P{INV_NO_ID} */
INV.INV_NO_DB_ID = 1080001 AND
INV.INV_NO_ID = 3334616
-- INV.SERIAL_NO_OEM = '038842'
-- LEAP INSRV: '603905' LEAP NOT INSRV: '602616'
-- CFM56-7 INSRV: '889692', '891608', '892587' (no LPT REAR FRAME), '960843', '660371', '038842' CFM56-7 NOT INSRV: '890780'
AND INV.INV_CLASS_CD = 'ASSY'
)
-- Pulls Life Limited Parts for the Engine assembly
PARTS_TASKS AS (
/* Adapted from query "GetTasksForPart.qrx" in query repository */
SELECT DISTINCT
PARTS.PART_NO_DB_ID,
PARTS.PART_NO_ID,
TASK_TASK.TASK_CLASS_CD
FROM
EQP_PART_NO PARTS
INNER JOIN EQP_PART_BASELINE ON -- list of alternate part numbers (cross-ref between usual part and alternate parts)
PARTS.PART_NO_DB_ID = EQP_PART_BASELINE.PART_NO_DB_ID AND
PARTS.PART_NO_ID = EQP_PART_BASELINE.PART_NO_ID
INNER JOIN EQP_BOM_PART ON
EQP_PART_BASELINE.BOM_PART_DB_ID = EQP_BOM_PART.BOM_PART_DB_ID AND
EQP_PART_BASELINE.BOM_PART_ID = EQP_BOM_PART.BOM_PART_ID
INNER JOIN EQP_ASSMBL_BOM ON
EQP_BOM_PART.ASSMBL_DB_ID = EQP_ASSMBL_BOM.ASSMBL_DB_ID AND
EQP_BOM_PART.ASSMBL_CD = EQP_ASSMBL_BOM.ASSMBL_CD AND
EQP_BOM_PART.ASSMBL_BOM_ID = EQP_ASSMBL_BOM.ASSMBL_BOM_ID
INNER JOIN TASK_TASK ON
EQP_BOM_PART.ASSMBL_DB_ID = TASK_TASK.ASSMBL_DB_ID AND
EQP_BOM_PART.ASSMBL_CD = TASK_TASK.ASSMBL_CD AND
EQP_BOM_PART.ASSMBL_BOM_ID = TASK_TASK.ASSMBL_BOM_ID
WHERE
PARTS.PART_TYPE_CD = 'ATA-72PP'
Example that stops error:
WITH TARGET_SN AS (
SELECT
INV.SERIAL_NO_OEM,
INV.INV_NO_DB_ID,
INV.INV_NO_ID,
INV.INV_CLASS_CD,
INV.H_INV_NO_DB_ID,
INV.H_INV_NO_ID
FROM INV_INV INV
WHERE
INV.INV_NO_DB_ID = 1080001 AND
INV.INV_NO_ID = 3334616
AND INV.INV_CLASS_CD = 'ASSY'
)
PARTS_TASKS AS (
SELECT DISTINCT
PARTS.PART_NO_DB_ID,
PARTS.PART_NO_ID,
TASK_TASK.TASK_CLASS_CD
FROM
EQP_PART_NO PARTS
INNER JOIN EQP_PART_BASELINE ON
PARTS.PART_NO_DB_ID = EQP_PART_BASELINE.PART_NO_DB_ID AND
PARTS.PART_NO_ID = EQP_PART_BASELINE.PART_NO_ID
INNER JOIN EQP_BOM_PART ON
EQP_PART_BASELINE.BOM_PART_DB_ID = EQP_BOM_PART.BOM_PART_DB_ID AND
EQP_PART_BASELINE.BOM_PART_ID = EQP_BOM_PART.BOM_PART_ID
INNER JOIN EQP_ASSMBL_BOM ON
EQP_BOM_PART.ASSMBL_DB_ID = EQP_ASSMBL_BOM.ASSMBL_DB_ID AND
EQP_BOM_PART.ASSMBL_CD = EQP_ASSMBL_BOM.ASSMBL_CD AND
EQP_BOM_PART.ASSMBL_BOM_ID = EQP_ASSMBL_BOM.ASSMBL_BOM_ID
INNER JOIN TASK_TASK ON
EQP_BOM_PART.ASSMBL_DB_ID = TASK_TASK.ASSMBL_DB_ID AND
EQP_BOM_PART.ASSMBL_CD = TASK_TASK.ASSMBL_CD AND
EQP_BOM_PART.ASSMBL_BOM_ID = TASK_TASK.ASSMBL_BOM_ID
WHERE
PARTS.PART_TYPE_CD = 'ATA-72PP'