cancel
Showing results for 
Search instead for 
Did you mean: 

java.lang.reflect.InvocationTargetException

Former Member
0 Kudos

Hi All,

We have a Webdynpro application, where in a screen we have to select a value from a Drop Down list.

The first time we select the value, the subsequent function happens without any error, but on selecting a value for the second time we are getting teh following exception:

java.lang.reflect.InvocationTargetException

Can anyone plz help us with this, what can be the reason for this exception??

Thanks,

Becky.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Becky,

Normally "java.lang.reflect.InvocationTargetException" occurs when java compiler finds 2 different classes with same name in 2 different packages. when u r importing both classes at a time and when you r trying to create object of that class it throws "java.lang.reflect.InvocationTargetException" exception .

The solution is that when you are creating the object of the class use package name also along with class name so that compiler knows what class it has to use.

I found the above solution in the following link. Thought that might be helpful. Have a look at it.

http://java.ittoolbox.com/groups/technical-functional/javaee-l/how-to-resolve-the-errorjavalangrefle...

I hope this helps.

Regards,

PG.

gui_machado
Explorer
0 Kudos

Thank you very much, I was stuck with a problem in eclipse with the Abap Development tool where I tried to open the SAP Gui and it presented a giant error message and when I tried to open it again it went normal with your comment I went to eclipse.ini and removed what happens is which was passing -VM

java directory

-VMARGS

JavaFX directory

vincenzocappelluti
Participant
0 Kudos

Hi Guilherme,

can you explain your solution a bit better? I have the same problem 😞

Thank you

former_member185086
Active Contributor
0 Kudos

Hi

1.This error occurs when you only have one of the SQL server JAR files in your classpath.

Ensure that these three mssqlserever JAR files are in the classpath:

  • mssqlserver.jar

  • msbase.jar

  • msutil.jar

2..Check setting of the parameters

Use Throwable.geCause() method of InvocationTargetException to find out if more information is available on the error.

it still unresolved please provides us complete scenario (what is DB, How u populate the value in dropdown etc).

Best Regards

Satish Kumar