Update from netbeans 12.2 to netbeans 27 : trouble with sql query
"Jean-Michel DELFINO (Logarithmes)" <[email protected]> Tue, 28 Oct 2025 20:50:08 +0100
| Newsgroups | gmane.comp.java.ide.netbeans.user |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I’m update to netbeans 27 from netbeans12.2…. « Mind the gap! »
I'm in trouble to access my sql JDBC.
Before, I did this :
ArrayList <String> render = new ArrayList <> ();
String requete="SELECT v.modplacesnom FROM modplaces v »;
render.addAll(this.listRequete(requete));
// With this :
public List<String> listRequete( String requeteJQL)
{
javax.persistence.criteria.CriteriaQuery cq = getEntityManager().getCriteriaBuilder().createQuery();
cq.select(cq.from(entityClass));
return getEntityManager().createQuery(requeteJQL).getResultList();
}
And it’s working fine.
Now, this is not working :
ArrayList <String> render = new ArrayList <> ();
String requete="SELECT v.modplacesnom FROM modplaces v »;
render.addAll(this.listRequete(requete));
// With this :
public List<String> listRequete( String requeteJQL)
{
jakarta.persistence.criteria.CriteriaQuery cq = getEntityManager().getCriteriaBuilder().createQuery();
cq.select(cq.from(entityClass));
return getEntityManager().createQuery(requeteJQL).getResultList();
}
All is good with jbdc driver, the access of the database is working fine when I tried other ways to access it, like
public List<T> findAll()
{
jakarta.persistence.criteria.CriteriaQuery cq = getEntityManager().getCriteriaBuilder().createQuery();
cq.select(cq.from(entityClass));
return getEntityManager().createQuery(cq).getResultList();
}
just sql query is not working
The error page indicates :
Exception [EclipseLink-0] (Eclipse Persistence Services - 4.0.5.v202412231137-a96b873527f305f932543045c8679bb1de8d3a43): org.eclipse.persistence.exceptions.JPQLException
Exception Description: Problem compiling [SELECT v.modplacesnom FROM modplaces v].
[7, 21] The state field path 'v.modplacesnom' cannot be resolved to a valid type.
[27, 36] The abstract schema type 'modplaces' is unknown.
The only change is to put « jakarta » in place of « javax » … Is something wrong with this ?
Thanks for your help !
Jean-Michel
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists