Posts Tagged ‘EclipseLink’

JSF Error – Target Unreachable, identifier ‘MyBacking’ resolved to null

Friday, July 16th, 2010

My JSF application was throwing the following error message:


Target Unreachable, identifier 'MyBacking' resolved to null

All of my other backing beans were working so It was kind of perplexing and I could not immediately pinpoint the error source.
To cut a long story short, it turns out that the ManagedBean annotation requires the name attribute like so:


@ManagedBean(name = "MyBacking")
@RequestScoped
public class MyBacking {
[...]

This is kind of odd since the class name and the defined attribute name are equal.

My environment:

Netbeans 6.9
Mojarra 2.0.2
EclipseLink, version: Eclipse Persistence Services – 2.0.0.v20091127-r5931
GlassFish Server 3

Differences between TopLink and EclipseLink

Monday, March 22nd, 2010

The default persistence manager in Netbeans Release 6.8 has changed from TopLink to EclipseLink and I will list error messages and differences that I find as I go along.

1.
ErrorMessage

Exception [EclipseLink-8034] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.JPQLException
Exception Description: Error compiling the query [findUserByEmail: SELECT u FROM theuser u WHERE u.email = :email]. Unknown entity type [theuser].
at org.eclipse.persistence.exceptions.JPQLException.entityTypeNotFound(JPQLException.java:483)

Solution
EclipseLink is case sensitive. If your entity is named “TheUser” (yes, it is a dumm name for an entity) your named query should be:
@NamedQueries({
@NamedQuery(
name="findUserByEmail",
query="SELECT u FROM TheUser u WHERE u.email = :email"
)
})

and not ...SELECT u FROM theuser....