java lang reflect Constructor expected java net URI actual java io File

java lang reflect Constructor expected java net URI actual java io File


java.lang.IllegalArgumentException: Wrong arguments. new for target java.lang.reflect.Constructor expected=[java.net.URI] actual=[java.io.File]

If you are using JBoss 5.1 application server with version with JDK 1.6.0_45 and getting below exception:

Solution: This is bug on JBoss server and to fix either you change your JDK version to 1.6.0_18 or go to: your Jboss installation¬†Jboss\jboss-5.1.0.GA\server\default\conf\bootstrap\profile.xml and search for <bean name=”AttachmentStore”¬†and add below:

<constructor><parameter class=”java.io.File”>

  • Before:

java lang reflect Constructor expected java net URI actual java io File

  • After:

java lang reflect Constructor expected java net URI actual java io File

  • Now restart your server it should fix the issue.

Leave a Reply

Your email address will not be published. Required fields are marked *