Class JPQLException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.eclipse.persistence.exceptions.EclipseLinkException
-
- org.eclipse.persistence.exceptions.JPQLException
-
- All Implemented Interfaces:
java.io.Serializable
public class JPQLException extends EclipseLinkException
Purpose: EJBQL parsing and resolution problems will raise this exception
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.eclipse.persistence.exceptions.EclipseLinkException
CR, errorCode, hasBeenLogged, indentationString, internalException, session, shouldPrintInternalException
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
JPQLException()
INTERNAL Only TopLink can throw and create these excpetionsJPQLException(java.lang.String theMessage)
INTERNAL Only TopLink can throw and create these excpetionsJPQLException(java.lang.String message, java.lang.Exception internalException)
INTERNAL Only TopLink can throw and create these excpetionsprotected
JPQLException(java.lang.String message, java.lang.Exception internalException, int theErrorCode)
INTERNAL Only TopLink can throw and create these excpetions
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
addInternalException(java.lang.Object theException)
INTERNAL Add an internal Exception to the collection of internal Exceptionsstatic JPQLException
aliasResolutionException(java.lang.String query, int line, int column, java.lang.String theAlias)
static JPQLException
classNotFoundException(java.lang.String theClassName, java.lang.String theMessage, java.lang.Exception theException)
static JPQLException
constructorClassNotFound(java.lang.String query, int line, int column, java.lang.String className)
static JPQLException
entityTypeNotFound(java.lang.String query, java.lang.String type)
JPQLException
Entity Type Not Foundstatic JPQLException
entityTypeNotFound2(java.lang.String query, int line, int column, java.lang.String type)
static JPQLException
expectedCharFound(java.lang.String query, int line, int column, java.lang.String expected, java.lang.String found, java.lang.Exception ex)
static JPQLException
expectedOrderableOrderByItem(java.lang.String query, int line, int column, java.lang.String item, java.lang.String type)
static JPQLException
expressionNotSupported(java.lang.String query, java.lang.String unsupportedExpression)
static JPQLException
generalParsingException(java.lang.String theEjbql)
INTERNAL Create an exception to wrap a general parsing exceptionstatic JPQLException
generalParsingException(java.lang.String theEjbql, java.lang.Exception theException)
INTERNAL Create an exception to wrap a general parsing exceptionjava.util.Collection
getInternalExceptions()
INTERNAL Return the collection of internal Exceptions.boolean
hasInternalExceptions()
INTERNAL Does this exception have any internal errors?static JPQLException
indexOnlyAllowedOnVariable(java.lang.String query, int line, int column, java.lang.String node)
static JPQLException
invalidCollectionMemberDecl(java.lang.String query, int line, int column, java.lang.String attributeName)
static JPQLException
invalidCollectionNavigation(java.lang.String query, int line, int column, java.lang.String expr, java.lang.String attribute)
static JPQLException
invalidContextKeyException(java.lang.String query, java.lang.String theKey)
static JPQLException
invalidEnumEqualExpression(java.lang.String query, int line, int column, java.lang.String enumType, java.lang.String type)
static JPQLException
invalidEnumLiteral(java.lang.String query, int line, int column, java.lang.String enumType, java.lang.String literal)
static JPQLException
invalidExpressionArgument(java.lang.String query, int line, int column, java.lang.String expression, java.lang.String attributeName, java.lang.String type)
static JPQLException
invalidFunctionArgument(java.lang.String query, int line, int column, java.lang.String functionName, java.lang.String attributeName, java.lang.String type)
static JPQLException
invalidHavingExpression(java.lang.String query, int line, int column, java.lang.String having, java.lang.String groupBy)
static JPQLException
invalidMultipleUseOfSameParameter(java.lang.String query, int line, int column, java.lang.String parameter, java.lang.String oldType, java.lang.String newType)
static JPQLException
invalidNavigation(java.lang.String query, int line, int column, java.lang.String expr, java.lang.String lhs, java.lang.String type)
static JPQLException
invalidSelectForGroupByQuery(java.lang.String query, int line, int column, java.lang.String select, java.lang.String groupBy)
static JPQLException
invalidSetClauseNavigation(java.lang.String query, int line, int column, java.lang.String expr, java.lang.String relationship)
static JPQLException
invalidSetClauseTarget(java.lang.String query, int line, int column, java.lang.String expr, java.lang.String attribute)
static JPQLException
invalidSizeArgument(java.lang.String query, int line, int column, java.lang.String attributeName)
static JPQLException
missingDescriptorException(java.lang.String query, java.lang.String theClassName)
static JPQLException
missingMappingException(java.lang.String query, java.lang.String theAttributeName)
static JPQLException
multipleVariableDeclaration(java.lang.String query, int line, int column, java.lang.String variable, java.lang.String oldDecl)
static JPQLException
nonExistantOrderByAlias(java.lang.String query, int line, int column, java.lang.String alias)
static JPQLException
notYetImplemented(java.lang.String query, java.lang.String detail)
void
printFullStackTrace()
PUBLIC Print the stack trace for each error generated by the parser.static JPQLException
recognitionException(java.lang.String theEjbql, java.lang.String theMessage)
INTERNAL Create an exception to wrap the recognition exception thrownstatic JPQLException
resolutionClassNotFoundException(java.lang.String query, java.lang.String theClassName)
static JPQLException
resolutionClassNotFoundException2(java.lang.String query, int line, int column, java.lang.String theClassName)
void
setInternalExceptions(java.util.Collection theExceptions)
INTERNAL Store the exceptions related to this exceptionstatic JPQLException
syntaxError(java.lang.String query, java.lang.Exception ex)
static JPQLException
syntaxErrorAt(java.lang.String query, int line, int column, java.lang.String token, java.lang.Exception ex)
static JPQLException
unexpectedChar(java.lang.String query, int line, int column, java.lang.String unexpected, java.lang.Exception ex)
static JPQLException
unexpectedEOF(java.lang.String query, int line, int column, java.lang.Exception ex)
static JPQLException
unexpectedToken(java.lang.String query, int line, int column, java.lang.String token, java.lang.Exception ex)
static JPQLException
unknownAttribute(java.lang.String query, int line, int column, java.lang.String attribute, java.lang.String type)
static JPQLException
unsupportJoinArgument(java.lang.String query, int line, int column, java.lang.String join, java.lang.String type)
static JPQLException
variableCannotHaveMapKey(java.lang.String query, int line, int column, java.lang.String name)
-
Methods inherited from class org.eclipse.persistence.exceptions.EclipseLinkException
cr, getErrorCode, getIndentationString, getInternalException, getMessage, getSession, getUnformattedMessage, hasBeenLogged, printStackTrace, printStackTrace, printStackTrace, setErrorCode, setHasBeenLogged, setIndentationString, setInternalException, setSession, setShouldPrintInternalException, shouldPrintInternalException, toString
-
-
-
-
Field Detail
-
recognitionException
public static final int recognitionException
- See Also:
- Constant Field Values
-
generalParsingException
public static final int generalParsingException
- See Also:
- Constant Field Values
-
classNotFoundException
public static final int classNotFoundException
- See Also:
- Constant Field Values
-
aliasResolutionException
public static final int aliasResolutionException
- See Also:
- Constant Field Values
-
resolutionClassNotFoundException
public static final int resolutionClassNotFoundException
- See Also:
- Constant Field Values
-
missingDescriptorException
public static final int missingDescriptorException
- See Also:
- Constant Field Values
-
missingMappingException
public static final int missingMappingException
- See Also:
- Constant Field Values
-
invalidContextKeyException
public static final int invalidContextKeyException
- See Also:
- Constant Field Values
-
expressionNotSupported
public static final int expressionNotSupported
- See Also:
- Constant Field Values
-
generalParsingException2
public static final int generalParsingException2
- See Also:
- Constant Field Values
-
invalidCollectionMemberDecl
public static final int invalidCollectionMemberDecl
- See Also:
- Constant Field Values
-
notYetImplemented
public static final int notYetImplemented
- See Also:
- Constant Field Values
-
constructorClassNotFound
public static final int constructorClassNotFound
- See Also:
- Constant Field Values
-
invalidSizeArgument
public static final int invalidSizeArgument
- See Also:
- Constant Field Values
-
invalidEnumLiteral
public static final int invalidEnumLiteral
- See Also:
- Constant Field Values
-
invalidSelectForGroupByQuery
public static final int invalidSelectForGroupByQuery
- See Also:
- Constant Field Values
-
invalidHavingExpression
public static final int invalidHavingExpression
- See Also:
- Constant Field Values
-
invalidMultipleUseOfSameParameter
public static final int invalidMultipleUseOfSameParameter
- See Also:
- Constant Field Values
-
multipleVariableDeclaration
public static final int multipleVariableDeclaration
- See Also:
- Constant Field Values
-
invalidFunctionArgument
public static final int invalidFunctionArgument
- See Also:
- Constant Field Values
-
expectedOrderableOrderByItem
public static final int expectedOrderableOrderByItem
- See Also:
- Constant Field Values
-
invalidExpressionArgument
public static final int invalidExpressionArgument
- See Also:
- Constant Field Values
-
syntaxError
public static final int syntaxError
- See Also:
- Constant Field Values
-
syntaxErrorAt
public static final int syntaxErrorAt
- See Also:
- Constant Field Values
-
unexpectedToken
public static final int unexpectedToken
- See Also:
- Constant Field Values
-
unexpectedChar
public static final int unexpectedChar
- See Also:
- Constant Field Values
-
expectedCharFound
public static final int expectedCharFound
- See Also:
- Constant Field Values
-
unexpectedEOF
public static final int unexpectedEOF
- See Also:
- Constant Field Values
-
invalidNavigation
public static final int invalidNavigation
- See Also:
- Constant Field Values
-
unknownAttribute
public static final int unknownAttribute
- See Also:
- Constant Field Values
-
unsupportJoinArgument
public static final int unsupportJoinArgument
- See Also:
- Constant Field Values
-
invalidSetClauseTarget
public static final int invalidSetClauseTarget
- See Also:
- Constant Field Values
-
invalidSetClauseNavigation
public static final int invalidSetClauseNavigation
- See Also:
- Constant Field Values
-
entityTypeNotFound
public static final int entityTypeNotFound
-
invalidEnumEqualExpression
public static final int invalidEnumEqualExpression
- See Also:
- Constant Field Values
-
invalidCollectionNavigation
public static final int invalidCollectionNavigation
- See Also:
- Constant Field Values
-
entityTypeNotFound2
public static final int entityTypeNotFound2
- See Also:
- Constant Field Values
-
resolutionClassNotFoundException2
public static final int resolutionClassNotFoundException2
- See Also:
- Constant Field Values
-
variableCannotHaveMapKey
public static final int variableCannotHaveMapKey
- See Also:
- Constant Field Values
-
nonExistantOrderByAlias
public static final int nonExistantOrderByAlias
- See Also:
- Constant Field Values
-
indexOnlyAllowedOnVariable
public static final int indexOnlyAllowedOnVariable
- See Also:
- Constant Field Values
-
internalExceptions
public java.util.Collection internalExceptions
-
-
Constructor Detail
-
JPQLException
protected JPQLException()
INTERNAL Only TopLink can throw and create these excpetions
-
JPQLException
public JPQLException(java.lang.String theMessage)
INTERNAL Only TopLink can throw and create these excpetions
-
JPQLException
public JPQLException(java.lang.String message, java.lang.Exception internalException)
INTERNAL Only TopLink can throw and create these excpetions
-
JPQLException
protected JPQLException(java.lang.String message, java.lang.Exception internalException, int theErrorCode)
INTERNAL Only TopLink can throw and create these excpetions
-
-
Method Detail
-
recognitionException
public static JPQLException recognitionException(java.lang.String theEjbql, java.lang.String theMessage)
INTERNAL Create an exception to wrap the recognition exception thrown
-
generalParsingException
public static JPQLException generalParsingException(java.lang.String theEjbql, java.lang.Exception theException)
INTERNAL Create an exception to wrap a general parsing exception
-
generalParsingException
public static JPQLException generalParsingException(java.lang.String theEjbql)
INTERNAL Create an exception to wrap a general parsing exception
-
classNotFoundException
public static JPQLException classNotFoundException(java.lang.String theClassName, java.lang.String theMessage, java.lang.Exception theException)
-
resolutionClassNotFoundException
public static JPQLException resolutionClassNotFoundException(java.lang.String query, java.lang.String theClassName)
-
resolutionClassNotFoundException2
public static JPQLException resolutionClassNotFoundException2(java.lang.String query, int line, int column, java.lang.String theClassName)
-
missingDescriptorException
public static JPQLException missingDescriptorException(java.lang.String query, java.lang.String theClassName)
-
missingMappingException
public static JPQLException missingMappingException(java.lang.String query, java.lang.String theAttributeName)
-
aliasResolutionException
public static JPQLException aliasResolutionException(java.lang.String query, int line, int column, java.lang.String theAlias)
-
invalidContextKeyException
public static JPQLException invalidContextKeyException(java.lang.String query, java.lang.String theKey)
-
expressionNotSupported
public static JPQLException expressionNotSupported(java.lang.String query, java.lang.String unsupportedExpression)
-
invalidCollectionMemberDecl
public static JPQLException invalidCollectionMemberDecl(java.lang.String query, int line, int column, java.lang.String attributeName)
-
notYetImplemented
public static JPQLException notYetImplemented(java.lang.String query, java.lang.String detail)
-
constructorClassNotFound
public static JPQLException constructorClassNotFound(java.lang.String query, int line, int column, java.lang.String className)
-
invalidSizeArgument
public static JPQLException invalidSizeArgument(java.lang.String query, int line, int column, java.lang.String attributeName)
-
invalidEnumLiteral
public static JPQLException invalidEnumLiteral(java.lang.String query, int line, int column, java.lang.String enumType, java.lang.String literal)
-
invalidSelectForGroupByQuery
public static JPQLException invalidSelectForGroupByQuery(java.lang.String query, int line, int column, java.lang.String select, java.lang.String groupBy)
-
invalidHavingExpression
public static JPQLException invalidHavingExpression(java.lang.String query, int line, int column, java.lang.String having, java.lang.String groupBy)
-
invalidMultipleUseOfSameParameter
public static JPQLException invalidMultipleUseOfSameParameter(java.lang.String query, int line, int column, java.lang.String parameter, java.lang.String oldType, java.lang.String newType)
-
multipleVariableDeclaration
public static JPQLException multipleVariableDeclaration(java.lang.String query, int line, int column, java.lang.String variable, java.lang.String oldDecl)
-
invalidFunctionArgument
public static JPQLException invalidFunctionArgument(java.lang.String query, int line, int column, java.lang.String functionName, java.lang.String attributeName, java.lang.String type)
-
invalidExpressionArgument
public static JPQLException invalidExpressionArgument(java.lang.String query, int line, int column, java.lang.String expression, java.lang.String attributeName, java.lang.String type)
-
unsupportJoinArgument
public static JPQLException unsupportJoinArgument(java.lang.String query, int line, int column, java.lang.String join, java.lang.String type)
-
expectedOrderableOrderByItem
public static JPQLException expectedOrderableOrderByItem(java.lang.String query, int line, int column, java.lang.String item, java.lang.String type)
-
syntaxError
public static JPQLException syntaxError(java.lang.String query, java.lang.Exception ex)
-
syntaxErrorAt
public static JPQLException syntaxErrorAt(java.lang.String query, int line, int column, java.lang.String token, java.lang.Exception ex)
-
unexpectedToken
public static JPQLException unexpectedToken(java.lang.String query, int line, int column, java.lang.String token, java.lang.Exception ex)
-
unexpectedChar
public static JPQLException unexpectedChar(java.lang.String query, int line, int column, java.lang.String unexpected, java.lang.Exception ex)
-
expectedCharFound
public static JPQLException expectedCharFound(java.lang.String query, int line, int column, java.lang.String expected, java.lang.String found, java.lang.Exception ex)
-
unexpectedEOF
public static JPQLException unexpectedEOF(java.lang.String query, int line, int column, java.lang.Exception ex)
-
invalidNavigation
public static JPQLException invalidNavigation(java.lang.String query, int line, int column, java.lang.String expr, java.lang.String lhs, java.lang.String type)
-
invalidCollectionNavigation
public static JPQLException invalidCollectionNavigation(java.lang.String query, int line, int column, java.lang.String expr, java.lang.String attribute)
-
invalidSetClauseTarget
public static JPQLException invalidSetClauseTarget(java.lang.String query, int line, int column, java.lang.String expr, java.lang.String attribute)
-
invalidSetClauseNavigation
public static JPQLException invalidSetClauseNavigation(java.lang.String query, int line, int column, java.lang.String expr, java.lang.String relationship)
-
unknownAttribute
public static JPQLException unknownAttribute(java.lang.String query, int line, int column, java.lang.String attribute, java.lang.String type)
-
invalidEnumEqualExpression
public static JPQLException invalidEnumEqualExpression(java.lang.String query, int line, int column, java.lang.String enumType, java.lang.String type)
-
entityTypeNotFound
public static JPQLException entityTypeNotFound(java.lang.String query, java.lang.String type)
JPQLException
Entity Type Not FoundIndicates that a type specified in a JPQL query string cannot be found in the current persistence unit. Ensure that the entity name is properly spelled and matches the name of an entity in the persistence unit being used.
-
entityTypeNotFound2
public static JPQLException entityTypeNotFound2(java.lang.String query, int line, int column, java.lang.String type)
-
variableCannotHaveMapKey
public static JPQLException variableCannotHaveMapKey(java.lang.String query, int line, int column, java.lang.String name)
-
nonExistantOrderByAlias
public static JPQLException nonExistantOrderByAlias(java.lang.String query, int line, int column, java.lang.String alias)
-
indexOnlyAllowedOnVariable
public static JPQLException indexOnlyAllowedOnVariable(java.lang.String query, int line, int column, java.lang.String node)
-
addInternalException
public java.lang.Object addInternalException(java.lang.Object theException)
INTERNAL Add an internal Exception to the collection of internal Exceptions
-
hasInternalExceptions
public boolean hasInternalExceptions()
INTERNAL Does this exception have any internal errors?
-
getInternalExceptions
public java.util.Collection getInternalExceptions()
INTERNAL Return the collection of internal Exceptions. Intialize if there are no exceptions
-
setInternalExceptions
public void setInternalExceptions(java.util.Collection theExceptions)
INTERNAL Store the exceptions related to this exception
-
printFullStackTrace
public void printFullStackTrace()
PUBLIC Print the stack trace for each error generated by the parser. This method is intended to assist in debugging problems in EJBQL
-
-