Netbeans *OVER* smartness

Some days back I was strucked in testing my GSoC project for almost 1 week and at the end it is the smartness of Netbeans that costed this when I created the testcases.Netbeans modified this[1] to something like this [2] and wasted a lot of my time.

[1] : https://gist.github.com/1112892
[2] : https://gist.github.com/1112893

[1] : Error when loading gists from http://gist.github.com/.
[2] : Error when loading gists from http://gist.github.com/.

Solution for org.apache.catalina.connector.RequestFacade cannot be cast to org.springframework.web.multipart.MultipartHttpServletRequest

If you are getting a error something like this (In JSP/Servlet environment) or more specifically in OpenMRS :

An Internal Error has occurred
Java.lang.ClassCastException

org.apache.catalina.connector.RequestFacade cannot be cast to org.springframework.web.multipart.MultipartHttpServletRequest

Consult the help document.
Contact your friendly neighborhood administrator if it cannot be resolved.
Hide stack trace

?Download download.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
org.springframework.web.servlet.mvc.AbstractFormControIIer.getCommand (AbstractFormCont roller. java:435)
org.springframework.web.servlet.mvc.AbstractFormControIIer.handIeRequestlnte rnal (Abst ractFo rmCont roller. java:265)
org.springframework.web.servlet.mvc.AbstractControIIer.handIeRequest (AbstractController. java: 1 53) Q
org.springframework.web.servlet.mvc.SimpIeControllerHandIe rAdapter.handIe (SimpIeControllerHandIerAdapter. java:4)
org.springframework.web.servlet.Dispatcherservlet.doDispatch (DispatcherServlet. java:771 )
org.springframework.web.servlet.Dispatcherservlet.doSe rvice (DispatcherServlet. java:716)
org.springframework.web.servlet.Frameworkservlet.processRequest (FrameworkServlet. java:644)
org.springframework.web.servlet.Frameworkservlet.doPost (FrameworkServlet. java: 560)
javax.servlet.http.Httpservlet.se rvice(HttpServlet. java:637)
javax.servlet.http.Httpservlet.se rvice(HttpServlet. java:717)
org. apache.cataIina.core.AppIicationFilterChain.inte rnaIDoFiIter(AppIicationFilterChain. java:290)
org. apache.cataIina.core.AppIicationFilterChain.doFiIter(AppIicationFilterChain. java:206)
org. apache.cataIina.core.AppIicationFilterChain.internaIDoFiIter(AppIicationFilterChain. java:235)
org. apache.cataIina.core.AppIicationFilterChain.doFiIter(AppIicationFilterChain. java:206)
org. apache.cataIina.core.AppIicationFilterChain.internaIDoFiIter(AppIicationFilterChain. java:235)
org. apache.cataIina.core.AppIicationFilterChain.doFiIter(AppIicationFilterChain. java:206)
org.springframework.web.fiIter.OncePe rRequestFiItendoFiIter(OncePe rRequestFiIter. java:76)
org. apache.cataIina.core.AppIicationFilterChain.inte rnaIDoFiIter(AppIicationFilterChain. java:235)
org. apache.cataIina.core.AppIicationFilterChain.doFiIter(AppIicationFilterChain. java:206)
org.springframework.orm.hibe rnate3.support.OpenSessionlnViewFiItendoFiIterlnte rnal (OpenSessionlnViewFiIter. java: 19)
org.springframework.web.fiIter.OncePerRequestFiItendoFiIter(OncePerRequestFiIter. java:76)
org. apache.cataIina.core.AppIicationFilterChain.inte rnaIDoFiIter(AppIicationFilterChain. java:235)
org. apache.cataIina.core.AppIicationFilterChain.doFiIter(AppIicationFilterChain. java:206)
org. apache.cataIina.core.AppIicationFilterChain.internaIDoFiIter(AppIicationFilterChain. java:235)
org. apache.cataIina.core.AppIicationFilterChain.doFiIter(AppIicationFilterChain. java:206) U

The solution is that :

You

tag in JSP doesn’t have enctype=”multipart/form-data” as property , make form tag as

, and this error will be removed.

e.g. :

?Download download.txt
1
2
3
<form method="post" enctype="multipart/form-data">
Your Data.
</form>

Master Reset in the canon i1980 ( Ink absorber Full )

Recently i brought a new Canon i1980 photo printer and when I changed the cartridge it shown me the error :

Contact the nearest Service center .The ink Absorbers are full [4 Orange + 1 Green Light Blinks]

then their are 3 things you can do :

1.Take your printer to the canon service center.

or

2.Do the master reset of the Printer motherboard.Press the Orange button for more then 120 second and reset it permanently. [Ink may start flowing out]

or

3.Switch off the printer , press the on/off switch on printer and while holding the button power on the printer , and press orange button 2 times while holding the on/off button.Now leave the on-off button and print.This is not a permanent remedy.[Ink may start flowing out]