rmbrowngr
Posts: 12
|
Posted: 01/28/2005, 5:18 AM |
|
I have a simple JSP page with a Record Builder and custom insert (SQL). When I added a parameter I get a compile error on Tomcat:-
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 5 in the jsp file: /projHandlers.jsp
Generated servlet error:
[javac] Compiling 1 source file
D:\Program Files\jakarta-tomcat-4.1.31\work\Standalone\localhost\NewProject2\proj_jsp.java:116: cannot resolve symbol
symbol : class projProjectRecordHandler
location: class org.apache.jsp.proj_jsp
((Record)projModel.getChild("Project")).addRecordListener(new projProjectRecordHandler());
^
1 error
If I remove the parameter Tomcat will compile the JSP.
My configuration is CCStudio 2.3.2.24, Tomcat 4.1.31 & JDK 1.3.1.
Can anyone Help?
|
|
|
mrachow
Posts: 509
|
Posted: 01/28/2005, 9:15 AM |
|
Two guesses only:
Do you have a DataSource defined for the grid despite your custom insert SQL?
Have you specified your param as {mySqlParam} inside SQL statement?
_________________
Best regards,
Michael |
|
|
rmbrowngr
Posts: 12
|
Posted: 01/31/2005, 12:25 AM |
|
I have a data source specified for the grid. If I remove the parameter completely it works and any parameter and it fails to compile on Tomcat.
I've also notice when you add a parameter an additional line of code is added to the record handler jsp file which asks for a class that doesn't exist in the codecharge framework. Maybe this is a bug! (see my first post).
Regards
Richard
|
|
|
miko
Posts: 50
|
Posted: 01/31/2005, 1:15 AM |
|
Class projProjectRecordHandler must be defined in file projHandlers.
Please check it.
In your case record handler is used to set default values for sql parameters in beforeBuildInsert event code.
As I understand record handler is present in Handlers file, and it is changed if you add/remove sql parameter. So please check name of class - if you change generated block with record handler class name and rename record or page this block will not be regenerated and jsp will not be compiled.
_________________
Regards,
Michael |
|
|
rmbrowngr
Posts: 12
|
Posted: 02/01/2005, 3:03 AM |
|
I've checked the "projHandlers" file and the class "projProjectRecordHandler" is not defined.
I Did some tests and for custom insert types "Table" & "Procedure" they work with parameters, it seems that for "SQL" type it does not. Something else I noticed is that the problem line of code is not added for the types "Table" & "Procedure".
Regards
Richard
|
|
|
miko
Posts: 50
|
Posted: 02/01/2005, 4:00 AM |
|
Hmm...
It is strange. I think it is better to submit case to codecharge support.
http://support.yessoftware.com/
_________________
Regards,
Michael |
|
|
rmbrowngr
Posts: 12
|
Posted: 02/02/2005, 12:47 AM |
|
I've reported the problem to support @ codecharge and they have confirmed it as a problem (bug). They also proposed a work around to this, see they reply below:-
We've reproduced the reported bug and it will be fixed soon.
We will send the patch to you after it's fixed.
Meanwhile you can use this workaround:
We suppose that your customInsert command's parameters have no default value.
Please specify default value for one of parameters and regenerate the page.
I've tried it and it does work.
Best regards
Richard
|
|
|