Monday 1 September 2014

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 statement:


<constructor>
<parameter class="java.io.File"><inject bean="BootstrapProfileFactory" property="attachmentStoreRoot" /></parameter>
</constructor>


Spring boot with CORS

CORS (Cross-Origin Resource Sharing) errors occur when a web application running in a browser requests a resource from a different domain or...