Greeting For the day!!!
While running the web4j application I got following error messages.
How to resolve this issue.
java.lang.NullPointerException
at hirondelle.web4j.database.SqlStatement.getSqlTextFromId(Unknown
Source)
at hirondelle.web4j.database.SqlStatement.<init>(Unknown Source)
at hirondelle.web4j.database.SqlFetcher.<init>(Unknown Source)
at hirondelle.web4j.database.SqlFetcher.forSingleOp(Unknown Source)
at hirondelle.web4j.database.Db.fetchValue(Unknown Source)
at
sjm.pdt.main.plugin.registration.RegistrationDAO.getCRMDAlertContent(RegistrationDAO.java:
921)
at
sjm.pdt.main.login.AlertContentAjaxCall.getXmlContent(AlertContentAjaxCall.java:
23)
at org.ajaxtags.servlets.AjaxActionHelper.invoke(Unknown Source)
at org.ajaxtags.servlets.BaseAjaxServlet.doGet(Unknown Source)
at org.ajaxtags.servlets.BaseAjaxServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
172)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
174)
at
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:
837)
at org.apache.coyote.http11.Http11AprProtocol
$Http11ConnectionHandler.process(Http11AprProtocol.java:640)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:
1286)
at java.lang.Thread.run(Thread.java:619)
=======================================================================================
java.lang.RuntimeException: Problem constructing Action for URI '/main/
login/LoginAction' (1) {
'Cannot call Action constructor using reflection (constructor threw
exception). Can't find bundle for base name messages, locale en_US'
}
at hirondelle.web4j.request.RequestParserImpl.getWebAction(Unknown
Source)
at hirondelle.web4j.Controller.processRequest(Unknown Source)
at hirondelle.web4j.Controller.doGet(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
172)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
174)
at
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:
837)
at org.apache.coyote.http11.Http11AprProtocol
$Http11ConnectionHandler.process(Http11AprProtocol.java:640)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:
1286)
at java.lang.Thread.run(Thread.java:619)
Please give me solution for this.
Thanks
Yadagiri
There's something wrong with the sql id or the .sql files.
Look at the logs upon startup of the application. Are all the SQL statements
being read in correctly? Is the app being started/initialized in the usual
way? Is the .sql file or files located in the usual place, under WEB-INF?
Web4j apps need to read in all the .sql files in an apps code base. All
those entries are logged upon startup. If that is not happening in the usual
way, then you won't be able to talk to the database at all.
- John
Here's an example of the kind of logging entries I'm speaking of :
6-Sep-2011 9:11:39 PM hirondelle.web4j.readconfig.ConfigReader fetchMany
CONFIG: Desired configuration files under /WEB-INF/: (10) {
'/WEB-INF/classes/hirondelle/predict/main/codes/code_table.sql'
'/WEB-INF/classes/hirondelle/predict/main/deleteaccount/statements.sql'
'/WEB-INF/classes/hirondelle/predict/main/lists/statements.sql'
'/WEB-INF/classes/hirondelle/predict/main/prediction/statements.sql'
'/WEB-INF/classes/hirondelle/predict/main/preferences/preferences.sql'
'/WEB-INF/classes/hirondelle/predict/pub/login/csrf.sql'
'/WEB-INF/classes/hirondelle/predict/pub/lostpassword/statements.sql'
'/WEB-INF/classes/hirondelle/predict/pub/register/statements.sql'
'/WEB-INF/classes/hirondelle/predict/pub/resetpassword/statements.sql'
'/WEB-INF/classes/hirondelle/predict/pub/search/statements.sql'
}
.....
.....
6-Sep-2011 9:11:39 PM hirondelle.web4j.readconfig.ConfigReader
logKeysFromManyFiles
CONFIG: (28) {
'ADD_NEW_USER'
'ADD_NEW_USER_ROLE'
'ADD_PREDICTION'
'CHANGE_PREDICTION'
'CHANGE_PREFERENCES'
'DELETE_LISTS'
'DELETE_PREDICTION'
'DELETE_PREDICTIONS'
'DELETE_ROLES'
'DELETE_USER'
'FETCH_FORM_SOURCE_ID'
'FETCH_OUTCOME_CODES'
'FETCH_OWNER'
'FETCH_PARTIAL_USER'
'FETCH_PREDICTION'
'FETCH_PREFERENCES'
'LIST_PREDICTIONS'
'PREDICTION_LIST_ADD'
'PREDICTION_LIST_CHANGE'
'PREDICTION_LIST_DELETE'
'PREDICTION_LIST_FETCH'
'PREDICTION_LIST_FETCH_PUBLIC'
'PREDICTION_LIST_LIST'
'RESET_LOST_PASSWORD'
'SAVE_FORM_SOURCE_ID'
'SEARCH_FOR_ALL_OF_THESE_WORDS'
'SEARCH_FOR_EXACT_PHRASE'
'SET_TEMP_PASSWORD_NONCE'
}
6-Sep-2011 9:11:39 PM hirondelle.web4j.readconfig.ConfigReader
fetchPublicStaticFinalFields
CONFIG: Fetching public static final fields of class
hirondelle.web4j.database.SqlId, from all concrete classes.
6-Sep-2011 9:11:39 PM hirondelle.web4j.readconfig.ConfigReader
fetchConcreteClassesThatImplement
CONFIG: Fetching all concrete classes.
6-Sep-2011 9:11:40 PM hirondelle.web4j.database.SqlStatement
checkSqlFilesVersusSqlIdFields
CONFIG: SqlId fields (28) {
'ADD_NEW_USER'
'ADD_NEW_USER_ROLE'
'ADD_PREDICTION'
'CHANGE_PREDICTION'
'CHANGE_PREFERENCES'
'DELETE_LISTS'
'DELETE_PREDICTION'
'DELETE_PREDICTIONS'
'DELETE_ROLES'
'DELETE_USER'
'FETCH_FORM_SOURCE_ID'
'FETCH_OUTCOME_CODES'
'FETCH_OWNER'
'FETCH_PARTIAL_USER'
'FETCH_PREDICTION'
'FETCH_PREFERENCES'
'LIST_PREDICTIONS'
'PREDICTION_LIST_ADD'
'PREDICTION_LIST_CHANGE'
'PREDICTION_LIST_DELETE'
'PREDICTION_LIST_FETCH'
'PREDICTION_LIST_FETCH_PUBLIC'
'PREDICTION_LIST_LIST'
'RESET_LOST_PASSWORD'
'SAVE_FORM_SOURCE_ID'
'SEARCH_FOR_ALL_OF_THESE_WORDS'
'SEARCH_FOR_EXACT_PHRASE'
'SET_TEMP_PASSWORD_NONCE'
}
6-Sep-2011 9:11:40 PM hirondelle.web4j.database.SqlStatement
checkSqlFilesVersusSqlIdFields
CONFIG: No mismatches found between .sql files and SqlId fields.
> --
> You received this message because you are subscribed to the Google Groups
> "web4j-users" group.
> To post to this group, send email to web4j...@googlegroups.com.
> To unsubscribe from this group, send email to
> web4j-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/web4j-users?hl=en.
>
----- Original Message ----- From: "Giri" <yadagiri.anepally@scubetech.in>
To unsubscribe from this group, send email to web4j-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/web4j-users?hl=en.
--
You received this message because you are subscribed to the Google Groups "web4j-users" group.
To post to this group, send email to web4j...@googlegroups.com.
To unsubscribe from this group, send email to web4j-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/web4j-users?hl=en.
We are not trying to talk to database in the constructor. This code
was working fine and has been in production for close to 2.5 years.
Below is the snippet of the Action class code:
public LoginAction(RequestParser aRequestParser) {
super(FORWARD, REDIRECT, aRequestParser);
this.aRequestParser = aRequestParser;
fLogger.fine(" Login Action Constructor::");
try {
removeFromSession("logged_in_userinformation");
} catch (Exception e) {
}
fRequestParser = aRequestParser;
safeLogin = new SafeLogin(username, aRequestParser);
}
Kindly help us out at the earliest, we are due to go live with teh
change request by end of this year. Client is behind us and we are
loosing time. HOpe you understand our concern.
PS: We are sending you the entire log file to your personal maild id,
so that it gives you a better understanding of the error.
On Dec 20, 6:56 am, "John O'Hanley" <webmas...@javapractices.com>
wrote:
> I just noticed that there are 2 errors in your original post, not one.
>
> java.lang.RuntimeException: Problem constructing Action for URI '/main/
> login/LoginAction' (1) {
> 'Cannot call Action constructor using reflection (constructor threw
> exception). Can't find bundle for base name messages, locale en_US'}
>
> at hirondelle.web4j.request.RequestParserImpl.getWebAction(Unknown
> Source)
>
> This occurs when the Action class has a constructor that doesn't follow the standard form.
> - class is public
> - has a public constructor that takes a single argument, a RequestParser.
>
> The above stack trace is generated near here :http://www.web4j.com/web4j/javadoc/src-html/hirondelle/web4j/request/...
--
You received this message because you are subscribed to the Google Groups "web4j-users" group.
To post to this group, send email to web4j...@googlegroups.com.
To unsubscribe from this group, send email to web4j-users...@googlegroups.com.