Skip to main content

Posts

Error when starting JBoss 5.1.0.GA :- wrong arguments. new for taget java.land.reflect.Constructor expected=[java.net.URI]

JBoss Error : Error when starting JBoss 5.1.0.GA "Failed to boot JBoss: java.lang.IllegalStateException: Incompletely deployed. Deployment "AttachmentStore" is in error due to: java. lang . IllegalArgumentException : wrong arguments. new for taget java. land . reflect . Constructor expected=[java. net . URI ] actual=[java. io . File ] " Solutions :- Error mainly occurred due to upgrade java 6 to java 7 or 8. Previously I used jdk 6u10 and it is changed to jdk 7u45. Run the projects using java release of jdk 6u10 or Sun JDK 1.6.0_13. JBOSS runs with these JDK version successfully. Open the file profile.xml in jboss-5.1.0.GA\server\default\conf\bootstrap find the "The attachment store" block and Replace this statement: <constructor> <parameter><inject bean= "BootstrapProfileFactory" property= "attachmentStoreRoot" /></parameter> </ constructor> With this st...

java.lang.ClassCastException: org.hibernate.type.StringType cannot be cast to org.hibernate.type.VersionType

Problem: Hibernate Tool While reverse engineering Reason for this problem: In one of my table there was a field named version. Which Hibernate tool treated as field version and try to cast the same and it throws an exception because the type of the field was not what hibernate tool was expecting. Solution:  Open the hbm configuration file for corresponding table and change the configuration of that field from <version> to <property> .

Struts 2 action called up twice.

Problem : If you are using JSON plugin with struts2 then you might end up with this problem. your action get called up twice even when you have define it only once  and you are firing ajax only at once. Solution: This is happening because JSON plugin is calling all your methods that start with " get " in an attempt to serialize them for output.Try to rename the method name other then "getxxxxx()". method name start with getXX : public String getName () { return "Rakesh" ; } method name changed to fetchXX : public String fetchName () { return "Rakesh" ; } Hopefully this will work.

IE 8 Div/span/popup/HTML content section is not visible

Problem: IE-8 Div/span/popup/HTMLcontent section is not visible  Solution : This issue usually occurs because the HTML content you are preparing is not correctly nested. Please insure that each and every TAG which is open should be closed correctly and also nested properly,otherwise your content is not visible. Regarding Firefox/Chrome these browsers are smart enough to handle these situations. They can nest the DOM by their own if its not properly nested. 

IE 8 issue :Downloading pop up comes out when firing ajax for uploading file

Downloading pop up comes out when firing ajax for uploading file This pop up comes out because ajax call after success need a response type in IE-8. So we can set the response by any of these way. If you are using Struts2 you can simply set the content type in the parameter. Struts.Xml: <result name= "success" type= "json" > <param name= "contentType" > text/html </param> </result> you can achive this using java you just need to set the result response in the JSON return Json (result, "text/html" );