I am working with the tutorial at:
http://www.netbeans.org/kb/articles/mysql.html


The program works great.
untouched the program displays the entire database that is a result of of

query.getResultSet().

I added a combobox,textfield,and a button with an action.

I dragged and droped an additional:

searchEnityManager1
bound to the preexisting splashbookdbPU

searchQuery1
(bound to a new searchEntityMananger,and a query that is a result of a

getSearchQueryString().

searchList1
bound to searchQuery1
<splashtemplateda.Content>

it all compiles;


nullpointer error ;basically the original query no longer works

here is a error message if that helps.
If I haven't given enough info I can extract code and display it if the above information

does not show the obvious error
Thank you for your time
-Steve

init:
deps-jar:
Compiling 1 source file to C:\Users\depot\Documents\ceyesuma\program_cache\in_progress\Enterprise\splashbookinprogress\target\SplashTemplateDA\build\classes
Note: C:\Users\depot\Documents\ceyesuma\program_cache\in_progress\Enterprise\splashbookinprogress\target\SplashTemplateDA\src\splashtemplateda\SplashTemplateDAView.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Copying 1 file to C:\Users\depot\Documents\ceyesuma\program_cache\in_progress\Enterprise\splashbookinprogress\target\SplashTemplateDA\build\classes
compile:
run:
[TopLink Info]: 2008.05.09 10:12:18.912--ServerSession(17548445)--TopLink, version: Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))
[TopLink Info]: 2008.05.09 10:12:19.611--ServerSession(17548445)--file:/C:/Users/depot/Documents/ceyesuma/program_cache/in_progress/Enterprise/splashbookinprogress/target/SplashTemplateDA/build/classes/-splashbookdbPU login successful
May 9, 2008 10:12:19 PM org.jdesktop.application.Application$1 run
SEVERE: Application class splashtemplateda.SplashTemplateDAApp failed to launch
java.lang.IllegalArgumentException: An exception occured while creating a query in EntityManager
        at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.createQuery(EntityManagerImpl.java:209)
        at splashtemplateda.SplashTemplateDAView.initComponents(SplashTemplateDAView.java:337)
        at splashtemplateda.SplashTemplateDAView.<init>(SplashTemplateDAView.java:41)
        at splashtemplateda.SplashTemplateDAApp.startup(SplashTemplateDAApp.java:19)
        at org.jdesktop.application.Application$1.run(Application.java:171)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Caused by: Exception [TOPLINK-8002] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.EJBQLException
Exception Description: General Problem parsing the query [null]. The parser returned the following [null].
Internal Exception: java.lang.NullPointerException
        at oracle.toplink.essentials.exceptions.EJBQLException.generalParsingException(EJBQLException.java:140)
        at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.buildParserFor(EJBQLParser.java:155)
        at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.buildParseTree(EJBQLParser.java:126)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:215)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:189)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:153)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.<init>(EJBQueryImpl.java:114)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.<init>(EJBQueryImpl.java:99)
        at oracle.toplink.essentials.internal.ejb.cmp3.EJBQueryImpl.<init>(EJBQueryImpl.java:86)
        at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.createQuery(EntityManagerImpl.java:204)
        ... 12 more
Caused by: java.lang.NullPointerException
        at java.io.StringReader.<init>(StringReader.java:33)
        at oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLParserBuilder.buildParser(EJBQLParserBuilder.java:61)
        at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.buildParserFor(EJBQLParser.java:149)
        ... 20 more
Exception in thread "AWT-EventQueue-0" java.lang.Error: Application class splashtemplateda.SplashTemplateDAApp failed to launch
        at org.jdesktop.application.Application$1.run(Application.java:177)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Caused by: java.lang.IllegalArgumentException: An exception occured while creating a query in EntityManager
        at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.createQuery(EntityManagerImpl.java:209)
        at splashtemplateda.SplashTemplateDAView.initComponents(SplashTemplateDAView.java:337)
        at splashtemplateda.SplashTemplateDAView.<init>(SplashTemplateDAView.java:41)
        at splashtemplateda.SplashTemplateDAApp.startup(SplashTemplateDAApp.java:19)
        at org.jdesktop.application.Application$1.run(Application.java:171)
        ... 8 more
Caused by: Exception [TOPLINK-8002] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.EJBQLException
Exception Description: General Problem parsing the query [null]. The parser returned the following [null].
Internal Exception: java.lang.NullPointerException
        at oracle.toplink.essentials.exceptions.EJBQLException.generalParsingException(EJBQLException.java:140)
        at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.buildParserFor(EJBQLParser.java:155)
        at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.buildParseTree(EJBQLParser.java:126)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:215)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:189)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:153)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.<init>(EJBQueryImpl.java:114)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.<init>(EJBQueryImpl.java:99)
        at oracle.toplink.essentials.internal.ejb.cmp3.EJBQueryImpl.<init>(EJBQueryImpl.java:86)
        at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.createQuery(EntityManagerImpl.java:204)
        ... 12 more
Caused by: java.lang.NullPointerException
        at java.io.StringReader.<init>(StringReader.java:33)
        at oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLParserBuilder.buildParser(EJBQLParserBuilder.java:61)
        at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.buildParserFor(EJBQLParser.java:149)
        ... 20 more
BUILD SUCCESSFUL (total time: 4 seconds)

I am working with the tutorial at:
http://www.netbeans.org/kb/articles/mysql.html


I got rid of the second entity manager and the second list(searchEnityManager1 and searchList1 and bound the searchQuery1 to the original entity manager.

basically I have the tutorial (link above) that runs with query bound to entityManager bound to splashbookdbPU and populates list and now I added search list which bound the same way as the original query. Is it exceptable to have one PU,one EntityManager ,one list, and two queries (with seperate @Actions and a added actionPerformed().

If I have a SQL SELECT statement(which may not be written right(JPA) in this getSearchQueryString() will this set the query for the searchQuery

searchQuery1 = java.beans.Beans.isDesignTime() ? null : entityManager.createQuery(getSearchQueryString());
entityManager = java.beans.Beans.isDesignTime() ? null : javax.persistence.Persistence.createEntityManagerFactory("splashbookdbPU").createEntityManager();
        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(splashtemplateda.SplashTemplateDAApp.class).getContext().getResourceMap(SplashTemplateDAView.class);
        query = java.beans.Beans.isDesignTime() ? null : entityManager.createQuery(resourceMap.getString("query.query")); // NOI18N
        list = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : org.jdesktop.observablecollections.ObservableCollections.observableList(query.getResultList());
        searchQuery1 = java.beans.Beans.isDesignTime() ? null : entityManager.createQuery(getSearchQueryString());

At the moment I get this error message

init:
deps-jar:
compile:
run:
[TopLink Info]: 2008.05.10 11:19:55.247--ServerSession(17548445)--TopLink, version: Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))
[TopLink Info]: 2008.05.10 11:19:55.878--ServerSession(17548445)--file:/C:/Users/depot/Documents/ceyesuma/program_cache/in_progress/Enterprise/splashbookinprogress/target/SplashTemplateDA/build/classes/-splashbookdbPU login successful
[TopLink Info]: 2008.05.10 11:19:56.253--ServerSession(17548445)--file:/C:/Users/depot/Documents/ceyesuma/program_cache/in_progress/Enterprise/splashbookinprogress/target/SplashTemplateDA/build/classes/-splashbookdbPU logout successful
May 10, 2008 11:19:56 AM org.jdesktop.application.Application$1 run
SEVERE: Application class splashtemplateda.SplashTemplateDAApp failed to launch
java.lang.IllegalArgumentException: An exception occured while creating a query in EntityManager
        at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.createQuery(EntityManagerImpl.java:209)
        at splashtemplateda.SplashTemplateDAView.initComponents(SplashTemplateDAView.java:340)
        at splashtemplateda.SplashTemplateDAView.<init>(SplashTemplateDAView.java:41)
        at splashtemplateda.SplashTemplateDAApp.startup(SplashTemplateDAApp.java:19)
        at org.jdesktop.application.Application$1.run(Application.java:171)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Caused by: Exception [TOPLINK-8002] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.EJBQLException
Exception Description: General Problem parsing the query [null]. The parser returned the following [null].
Internal Exception: java.lang.NullPointerException
        at oracle.toplink.essentials.exceptions.EJBQLException.generalParsingException(EJBQLException.java:140)
        at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.buildParserFor(EJBQLParser.java:155)
        at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.buildParseTree(EJBQLParser.java:126)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:215)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:189)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:153)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.<init>(EJBQueryImpl.java:114)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.<init>(EJBQueryImpl.java:99)
        at oracle.toplink.essentials.internal.ejb.cmp3.EJBQueryImpl.<init>(EJBQueryImpl.java:86)
        at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.createQuery(EntityManagerImpl.java:204)
        ... 12 more
Caused by: java.lang.NullPointerException
        at java.io.StringReader.<init>(StringReader.java:33)
        at oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLParserBuilder.buildParser(EJBQLParserBuilder.java:61)
        at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.buildParserFor(EJBQLParser.java:149)
        ... 20 more
Exception in thread "AWT-EventQueue-0" java.lang.Error: Application class splashtemplateda.SplashTemplateDAApp failed to launch
        at org.jdesktop.application.Application$1.run(Application.java:177)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Caused by: java.lang.IllegalArgumentException: An exception occured while creating a query in EntityManager
        at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.createQuery(EntityManagerImpl.java:209)
        at splashtemplateda.SplashTemplateDAView.initComponents(SplashTemplateDAView.java:340)
        at splashtemplateda.SplashTemplateDAView.<init>(SplashTemplateDAView.java:41)
        at splashtemplateda.SplashTemplateDAApp.startup(SplashTemplateDAApp.java:19)
        at org.jdesktop.application.Application$1.run(Application.java:171)
        ... 8 more
Caused by: Exception [TOPLINK-8002] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.EJBQLException
Exception Description: General Problem parsing the query [null]. The parser returned the following [null].
Internal Exception: java.lang.NullPointerException
        at oracle.toplink.essentials.exceptions.EJBQLException.generalParsingException(EJBQLException.java:140)
        at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.buildParserFor(EJBQLParser.java:155)
        at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.buildParseTree(EJBQLParser.java:126)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:215)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:189)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:153)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.<init>(EJBQueryImpl.java:114)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.<init>(EJBQueryImpl.java:99)
        at oracle.toplink.essentials.internal.ejb.cmp3.EJBQueryImpl.<init>(EJBQueryImpl.java:86)
        at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.createQuery(EntityManagerImpl.java:204)
        ... 12 more
Caused by: java.lang.NullPointerException
        at java.io.StringReader.<init>(StringReader.java:33)
        at oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLParserBuilder.buildParser(EJBQLParserBuilder.java:61)
        at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.buildParserFor(EJBQLParser.java:149)
        ... 20 more
BUILD SUCCESSFUL (total time: 5 seconds)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.