System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
One of my applications was supposed to use image having its URL. The Image was instantiated with the stream the server that stored the image file responded with after being requested as below: // create a request for image HttpWebRequest request = (HttpWebRequest)WebRequest.Create(IMAGE_URL); request.Method = “GET”; request.ContentType = “multipart/form-data”; request.UserAgent = “Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0”; request.Proxy.Credentials = CredentialCache.DefaultCredentials;…
Exception – ORA-00604: error occurred at recursive SQL level 1 ORA-01003: no statement parsed
In my application data were collected from database (Oracle) using web services that called stored procedures. One of the stored procedure had SELECT defined similar to the one below: WITH sth1 as ( SELECT … ), sth2 as ( SELECT … ) SELECT … This construction was the reason why in my application I was…
How to wait until AJAX call completes in Selenium tests
If you introduce AJAX to the application that is web tested with Selenium your tests might fail from time to time. In my case the tests were failing randomly, not that often but it made their quality decreased. So, how can you fix this? Solution Ideally, what you need is to stop the test execution…
Collection classes in Java
Collections are very important on SCJP exam. It’s useful to remember the following… List ordered (index) duplicates allowed ArrayList fast iteration fast random access; as of Java 1.4 implements RandomAccess interface slower instertion and deletion Vector the same as ArrayList but its metods are synchronized (therefore slower) LinkedList elements are doubly linked to one another;…
Assertions in Java
assert Expression1 : Expression2; Expression1 is asserted to be true; otherwise AssertionError (that shouldn’t be handled) is thrown Expression2 allows to produce some additional information Expression2 MUST result in a value – it generates a String message allow testing during the development and debugging are disabled at runtime by default can be enabled using -ea…
High Performance Web Sites
Recently I’ve been reading “High Performance Web Sites” (look at amazon). I think it’s a good book who can be recommended to all who do even little bit of front end development. The book describes 15 rules (regarding CSS, JavaScript, etc.) that should be followed in order to deliver high performance web sites. It’s rather…
Threds: multiple call to run() method
You can call run() method of a thread many times. However, not a single new thread will be started. This way JVM will only execute the code from run() method. And this will not probably be what you tried to achieve. Remember: to start a new thread, you need to call start() method, which among…
Java: main method declaration
It’s good to remember that there are a few ways of defining the main() method in Java 5: public static void main(String[] args) {} or public static void main(String args[]) {} or public static void main(String… args) {} Sometimes, we don’t care and remeber of basic stuff, which can result in worse score on the…