Home » Archived » EGL Development Tools » EDT:Tutorial: RUI With DataBase Lesson 4 problem(Getting CRRUI2090E error)
| | |
Re: EDT:Tutorial: RUI With DataBase Lesson 4 problem [message #766955 is a reply to message #766828] |
Fri, 16 December 2011 18:28 |
blakeb72 Messages: 5 Registered: December 2011 |
Junior Member |
|
|
Thanks for your response, Rocky and Paul. My error was that I created the records.paymentRec in the wrong project (PaymentService instead of PaymentShared). Once I corrected that, my problem was solved. Though, Paul, I don't have a file named PaymentFieldMaintenance.egl, but only PaymentFileMaintenance.egl, unless I am missing something. That latter file does have the import statement in it.
I am now at step 8 of the tutorial in section "Test the interface". I have a few observations and am also running into another problem.
Observations:
1. In lesson 4, section 1.5 "Add grid layout for a single row", a dialog comes up after being instructed to drag "the selectedPayment variable to the bracketed area inside the bracketed area in the payment record pane". In the "Data to display" section of that dialog, the amount field field type is decimal(10,2) instead of money(10,2). As a result, I could not change the widget type to DojoCurrencyTextBox through the dialog. I went through the steps and subsequently changed the source manually to set the appropriate widget type. I don't know if this resulted from an error in the original table definition (though I cut and pasted the tutorial SQL code to create the table), due to the fact that I am running the tutorial against DB2 for IBM i instead of Derby or something else, but I thought I'd bring it to your attention.
2. In lesson 6, section 1.8 "Create test data", the code for the createDefaultTable() function seems to throw off the editor when formatting the EGL source (CTRL+SHIFT+F). It may be due to the two try statements (unless I am doing something wrong). This is a minor issue, but again, I thought I'd bring it to your attention.
3. In lesson 8, section 1.7 "Create functions that use the service-access variable to invoke the service", it reads, "Now, to create the updateAll callback function, click anywhere in the call statement, right-click, hold down the Ctrl key, and press 1." I think it should be "left-click".
4. In lesson 8, section 1.7 "Create functions that use the service-access variable to invoke the service", the code for the addrow function includes onException serviceLib.serviceExceptionHandler;. Should it be onException serviceExceptionHandler; instead?
5. In lesson 8, section 1.9 "Complete the callback functions", the link for the completed source code is labeled PaymentLib.egl, but I think it should be PaymentFileMaintenance.egl.
New Problem:
When I test out the interface in lesson 8, section 1.10, I am getting this error. Maybe it has something to do with the way my JDBC driver is set up; I don't know. I was able to create the PAYMENT table in lesson 3 and add the SQL service in lesson 6. I am connected to the DB per the connection listed in Datasource Explorer as well. Here's are the errors that display when I preview my PaymentFileMaintenance.egl in the editor:
Failure: service invocation, exception = An exception occurred during a service call. Service:services.SQLService, Function:services.SQLService
Detail 1:
Detail 2:
Detail 3: java.lang.NullPointerException
[CRRUI1072E] An An exception occurred during a service call. Service:services.SQLService, Function:services.SQLService exception occurred in the error call back function, code with try...OnException
An exception occurred during a service call. Service:services.SQLService, Function:services.SQLService
[CRRUI2094E] Here are the EGL function calls leading to this error:
handlers/PaymentFileMaintenance.egl() at line 268
handlers/PaymentFileMaintenance.egl() at line 263
RUI Runtime.Handling callback for services.SQLService() [native JavaScript]
RUI Runtime.Response for services.SQLService() [native JavaScript]
Failure: service invocation, exception = [CRRUI3660E] Exception occurred, could not handle response for 'services.SQLService', reason: '[CRRUI1072E] An An exception occurred during a service call. Service:services.SQLService, Function:services.SQLService exception occurred in the error call back function, code with try...OnException'
Detail 1: 200
Detail 2:
Detail 3: {"headers" : null, "body" : "{\"error\" : {\"name\" : \"JSONRPCError\", \"code\" : \"EGL0024E\", \"message\" : \"An exception occurred during a service call. Service:services.SQLService, Function:services.SQLService\", \"error\" : {\"source\" : 1, \"detail1\" : \"\", \"detail2\" : \"\", \"detail3\" : \"java.lang.NullPointerException\", \"message\" : \"An exception occurred during a service call. Service:services.SQLService, Function:services.SQLService\", \"messageID\" : \"EGL0024E\", \"STACK_TRACES\" : true, \"name\" : \"eglx.services.ServiceInvocationException\"}}}", "status" : 500, "statusmessage" : "FAILED"}
[CRRUI1072E] An [CRRUI3660E] Exception occurred, could not handle response for 'services.SQLService', reason: '[CRRUI1072E] An An exception occurred during a service call. Service:services.SQLService, Function:services.SQLService exception occurred in the error call back function, code with try...OnException' exception occurred in the error call back function, code with try...OnException
[CRRUI3660E] Exception occurred, could not handle response for 'services.SQLService', reason: '[CRRUI1072E] An An exception occurred during a service call. Service:services.SQLService, Function:services.SQLService exception occurred in the error call back function, code with try...OnException'
[CRRUI2094E] Here are the EGL function calls leading to this error:
handlers/PaymentFileMaintenance.egl() at line 268
handlers/PaymentFileMaintenance.egl() at line 263
[type=eglx.lang.AnyException, message=[CRRUI1072E] An [CRRUI3660E] Exception occurred, could not handle response for 'services.SQLService', reason: '[CRRUI1072E] An An exception occurred during a service call. Service:services.SQLService, Function:services.SQLService exception occurred in the error call back function, code with try...OnException' exception occurred in the error call back function, code with try...OnException]
undefined:0
[CRRUI2095E] Could not find the EGL function calls leading to this error
Any ideas?
Thanks,
Blake
|
|
| |
Re: EDT:Tutorial: RUI With DataBase Lesson 4 problem [message #768140 is a reply to message #767830] |
Mon, 19 December 2011 16:40 |
blakeb72 Messages: 5 Registered: December 2011 |
Junior Member |
|
|
Rocky,
If I notice anything else, I will let you know. It might help others using the tutorial later.
I tried cleaning my workspace, but am still getting the same error. Maybe I should have used the Derby DB for the tutorial, but in production, I would most likely be going against DB2 for IBM i. The DB2 connection in Data Explorer shows that I am connected, and that I can browse through the various schemas on the system.
The errors above refer to these lines of code in PaymentFileMaintenance.egl:
function serviceExceptionHandler(ex anyException)
try
throw ex;
onException(serviceEx ServiceInvocationException)
log("Failure: service invocation, exception = " +
serviceEx.message);
log("Detail 1: " + serviceEx.detail1);
log("Detail 2: " + serviceEx.detail2);
log("Detail 3: " + serviceEx.detail3);
onException(anyex anyException)
log("Failure: service invocation, exception = " + anyex.message);
end
throw ex;
end
logActive boolean = true;
function log(text string in)
if(logActive)
sysLib.writeStderr(text);
end
end
The actual lines in the code are throw ex and function log(text string in). I think the exception is being thrown due to an error with the readFromTable() function call in start(). This is calling the getAllPayments() function in PaymentService/services/SQLService.sql. I created a test SQL file and can run a query against the PAYMENT table in my BLAKE1 DB2 schema (library) on IBM i. I have to qualify the table name with the schema (i.e., BLAKE1.PAYMENT), however; otherwise it looks for the table in a bogus library named as my user profile.
So the problem may be that the program can't find the PAYMENT file. The URL for my JDBC connection in my PaymentService.egldd is "jdbc:as400:<systemName>;prompt=false;libraries=blake1", but that does not work. I tried setting the Default Schema to BLAKE1 as well with no success. Last thing, I tried was qualifying the table name in PaymentShared/records/paymentRec.egl as BLAKE1.PAYMENT, but again no luck. Not sure what else to try. It could be a JDBC configuration issue though.
Blake
[Updated on: Mon, 19 December 2011 17:42] Report message to a moderator
|
|
| | | |
Re: EDT:Tutorial: RUI With DataBase Lesson 4 problem [message #768757 is a reply to message #768629] |
Tue, 20 December 2011 18:11 |
blakeb72 Messages: 5 Registered: December 2011 |
Junior Member |
|
|
Thanks, Colin and Will. After your responses, I did a little more digging and also looked at the thread above. I noticed that Bob added a resource binding for his DB not only in PaymentService.egldd per lesson 6, section "Create binding to database connection", but also in PaymentClient.egldd as well. Once I created a resource binding in PaymentClient, previewing PaymentClient/handlers/PaymentFileMaintenance.egl in the EGL editor works fine. I can create sample data and get results back from DB2 to populate the data grid. So is this solution the proper fix? If so, the tutorial will need to be updated to instruct readers to add a resource binding in the PaymentClient project as well (unless I missed it somewhere).
Here's the XML for my EGL DDs:
<?xml version="1.0" encoding="UTF-8"?>
<egl:deployment... [had to remove link to post] ...>
<bindings>
<binding name="DB2" type="edt.binding.sql" useURI="false">
<parameters>
<parameter name="dbms" value="DB2 for i5/OS"/>
<parameter name="sqlID" value="<userName"/>
<parameter name="sqlPassword" value="<password>"/>
<parameter name="jarList" value="/opt/jtopen_7_6/lib/jt400.jar"/>
<parameter name="sqlJDBCDriverClass" value="com.ibm.as400.access.AS400JDBCDriver"/>
<parameter name="sqlDB" value="jdbc:as400:<systemName>;prompt=false;libraries=blake1"/>
</parameters>
</binding>
</bindings>
</egl:deployment>
Also, I played around with my JDBC connection parameters. If I remove the libraries=blake1 property, but qualify the table name with blake1 in PaymentShared/records/paymentRec.egl, then things work as expected. If I add the property back in and remove the table name qualification, it works as expected. So the problem appears to have been with the missing resource binding.
I will continue on with the tutorial. If I find anything else or run into additional problems, I will let you know.
Edit
On second thought, it doesn't seem correct that the DB2 resource binding should be added to the client project. It seems like that violates separation of concerns. The UI shouldn't have to know anything about the service and persistence layers. Of course, I am not very familiar with EGL development. Hopefully, one the devs can clarify here.
Blake
[Updated on: Tue, 20 December 2011 21:09] Report message to a moderator
|
|
|
Re: EDT:Tutorial: RUI With DataBase Lesson 4 problem [message #768836 is a reply to message #768757] |
Tue, 20 December 2011 22:36 |
blakeb72 Messages: 5 Registered: December 2011 |
Junior Member |
|
|
I finished the tutorial and have one final observation.
After adding an empty payment record, modifying it in the form and then saving it, I can't get the record to reload into the form. Unlike the newly added record, however, I can click preexisting records in the grid and load them without issue. This seems to be the case whether using the internal IDE browser or an external one, like Firefox. If I refresh (reload) the page, then I can select the record in question. I briefly ran the app in debug mode, but didn't see anything different with the added record in comparison to the preexisting ones (i.e., I was taken to the appropriate event handler function and the data was in the payment record). I suppose it could be something with my setup, but I thought the devs might want to know in case there is a bug somewhere in the underlying EGL, Java or JS code.
Other than that the completed app runs great. Since I installed Tomcat standalone, I exported the client project to a WAR and deployed it through the Tomcat manager app. After researching various Java web technologies, I have to say I am impressed with EGL's ease of development. Thanks to the tutorial author and devs for providing this.
Closing thoughts/questions: I guess the next question is what is the best way to get a deeper knowledge of the technology beyond this tutorial? Are EGL books now becoming outdated with EDT and other enhancements? My main concern using EGL further is getting questions answered as it is currently not as widely adopted as, say, Java or PHP. Another concern is with the code generation aspect. It makes for easier development quicker, but what if something goes wrong? I guess comfort level in this respect would come with further development and experience. Is EDT 0.7.0 considered a production release or should one wait until 1.0+ comes out?
Thanks,
Blake
|
|
|
Re: EDT:Tutorial: RUI With DataBase Lesson 4 problem [message #775267 is a reply to message #768836] |
Thu, 05 January 2012 17:14 |
Lisa Lasher Messages: 5 Registered: May 2011 |
Junior Member |
|
|
Blake,
I see that nobody has responded to your last of questions, so I'll give it a shot
To learn more about EGL, look through all of the information on our Eclipse Documentation site.
The EDT project is based on technology from IBM Rational Business Developer, and there is a wealth of information at the EGL Cafe (www.ibm.com/developerworks/mydeveloperworks/groups/service/html/communityview?communityUuid=3e2b35ae-d3b1-4008-adee-2b31d4be5c92). Just remember that EDT contains only a subset of the function that is found in Rational Business Developer, and we are redesigning the IDE and adjusting the EGL language to be leaner and cleaner.
You worry about getting questions answered because EGL has not been widely adopted. That is one of our main purposes for going open source with this EDT Eclipse project, to vastly expand our user community.
Code generation - we're big believers in it (obviously!), because EGL provides a simplified yet highly powerful language, with much of the complexity and heavy lifting hidden under the covers. It also provides easy portability across platforms and underlying technologies. When something goes wrong, you debug the EGL code, not the generated code.
Finally, EDT 0.7.0 is NOT production level. That is indicated by the leading 0 in the release number. We are still in the incubator stages, with a plan to reach 1.0 (production level) by the end of this year. In the meantime, we encourage you learn about EDT and the EGL language, give us feedback, and help us test by creating applications that reflect your world!
- Lisa
|
|
| |
Goto Forum:
Current Time: Sun Sep 22 23:04:50 GMT 2024
Powered by FUDForum. Page generated in 0.05004 seconds
|