Posts

Showing posts from December, 2011

iBatis with Spring: "JavaBeansDataExchange could not instantiate result class" Exception

The below exception trace occurs when trying to select records from database to create an instance of an entity or collection of entities. As a result of not providing default constructor on the entity class. I gave a sample entity implementation that has a constructor with string parameter and commented out default constructor. After running iBatis with Spring's framework, iBatis cannot find the default constructor and print the example stack trace. This is also pointing the basics of entity beans in Java EE, "Entity Beans must have a public default constructor". TRACE [2011-12-22 10:28:23,863] 00000522 DEBUG java.sql.Connection - {conn-100087} Preparing Statement: SELECT * FROM DEMO.SAMPLE_TABLE WHERE ID = ? [2011-12-22 10:28:23,863] 00000522 DEBUG java.sql.PreparedStatement - {pstm-100088} Executing Statement: SELECT * FROM DEMO.SAMPLE_TABLE WHERE ID = ? [2011-12-22 10:28:23,863] 00000522 DEBUG java.sql.PreparedStatement - {pstm-100088} Parameters: [1

Defining Custom Loggers in SoapUI Groovy Script Assertions

Image
Default logger in groovy script assertions of SoapUI, allows you to log into "script log" tab at the bottom of the page. Logs in this tab is volatile, read only and not easy for following errors and information. Thus, using such a logger is not gathering more benefits than printing information to system out. I defined a custom file logger configuration (ASSERTION.SCRIPT.LOGGER) in soapui-log4j.xml that is located in the soapUI installation directory under bin folder. The configuration is a standard log4j configuration . Then add a script assertion to my test request. In groovy script, I create a logger instance with using logger name in configuration file as in the example below. The example groovy assertion script takes the current response time duration. After that checks if it is greater than 10 seconds; log the message in to file(ASSERTION.log). Log4J Custom Configuration <!-- custom logger for assertion scripts --> <logger name="ASSERTION.SCRIPT.LOGG