[351975]  Fix NPE's for special characters and unresolved classes.  Patch from Nan with minor adjustments.
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/JDTTools.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/JDTTools.java
index 59928f6..c91dec7 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/JDTTools.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/JDTTools.java
@@ -281,21 +281,23 @@
 		if (javaProject != null && className != null) {
 			boolean hasDefinedConstructor = false;
 			IType type = findType(javaProject, className);
-			try {
-				for (IMethod method : type.getMethods()) {
-					if (method.isConstructor()) {
-						if ((method.getNumberOfParameters() == 0) && (Flags.isPublic(method.getFlags()))) {
-							return true;
+			if (type != null) {
+				try {
+					for (IMethod method : type.getMethods()) {
+						if (method.isConstructor()) {
+							if ((method.getNumberOfParameters() == 0) && (Flags.isPublic(method.getFlags()))) {
+								return true;
+							}
+							hasDefinedConstructor = true;
 						}
-						hasDefinedConstructor = true;
 					}
+					//When there's no defined constructor, the default constructor is in place.
+					if (!hasDefinedConstructor) {
+						return true;
+					}
+				} catch (JavaModelException ex) {
+					JptCommonCorePlugin.log(ex);
 				}
-				//When there's no defined constructor, the default constructor is in place.
-				if (!hasDefinedConstructor) {
-					return true;
-				}
-			} catch (JavaModelException ex) {
-				JptCommonCorePlugin.log(ex);
 			}
 		}
 		return false;
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/jdt/ASTTools.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/jdt/ASTTools.java
index c8be45a..ccf4356 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/jdt/ASTTools.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/jdt/ASTTools.java
@@ -123,7 +123,7 @@
 	 * type binding.
 	 */
 	public static ITypeBinding resolveTypeBinding(Expression expression) {
-		if (expression.getNodeType() == ASTNode.TYPE_LITERAL) {
+		if (expression != null && expression.getNodeType() == ASTNode.TYPE_LITERAL) {
 			return ((TypeLiteral) expression).getType().resolveBinding();
 		}
 		return null;
@@ -135,7 +135,7 @@
 	 * The result may include <code>null</code> elements.
 	 */
 	public static Iterable<ITypeBinding> resolveTypeBindings(Expression expression) {
-		return (expression.getNodeType() == ASTNode.ARRAY_INITIALIZER) ?
+		return (expression != null && expression.getNodeType() == ASTNode.ARRAY_INITIALIZER) ?
 				resolveTypeBindings((ArrayInitializer) expression) :
 				EmptyIterable.<ITypeBinding>instance();
 	}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkCustomizer.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkCustomizer.java
index 47e0b3d..e171580 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkCustomizer.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkCustomizer.java
@@ -167,7 +167,10 @@
 	protected void validateCustomizerClass(List<IMessage> messages,CompilationUnit astRoot) {
 		IJavaProject javaProject = getPersistenceUnit().getJpaProject().getJavaProject();
 		EclipseLinkCustomizerAnnotation annotation = this.getCustomizerAnnotation();
-		if (annotation != null && annotation.getValue() != null) {
+		if (annotation != null && annotation.getValue() != null && 
+				//if the type cannot be resolved there is no need to perform the following validation,
+				//JDT will note the error in the source
+				JDTTools.findType(javaProject, annotation.getValue()) != null) {
 			if (!JDTTools.classHasPublicZeroArgConstructor(javaProject, this.getFullyQualifiedCustomizerClass())) {
 				messages.add(
 						DefaultEclipseLinkJpaValidationMessages.buildMessage(