You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
java.lang.IllegalStateException: Cannot instantiate datasource instance of de.focus_shift.jaxb.JaxbConfigurationService #208
Unfortunately, it might be challenging to provide a sample project since I have no right to share it. However, it seems that the error occurs in the following method:
and it happens since dataSourceClass.getDeclaredConstructor() seems to be null. Can you please refactor the code in such a way that when debugging it is possible to see what getDeclaredConstructor returns?
I'm getting the same Exception. But I can also provide the cause of it. The root cause is - according to the stacktrace - a java.lang.ClassNotFoundException: jakarta.xml.bind.JAXBException
This on the other hand is due to a conflict in the jaxb-runtime version present in the (my) project. I have the "old" jaxb-runtime with the javax.xml.bind namespace; it comes from Spring 2. But jollyday requires the "new" jaxb-runtime with the jakarta.xml.bind namespace; which is only present in Spring 3.
Yes there are other cases when the jaxb-runtime version does not match, but the above circumstance is just one example. So check your dependencies if it has the wrong runtime. (Check which dependency provides the JAXBException and which namespace it is in; it has to be jakarta.xml.bind)
Activity
derTobsch commentedon Apr 9, 2023
Can you provide a sample project? I hope I will find some time next week.
oleksiy-rybakov commentedon Apr 11, 2023
Unfortunately, it might be challenging to provide a sample project since I have no right to share it. However, it seems that the error occurs in the following method:
and it happens since
dataSourceClass.getDeclaredConstructor()seems to be null. Can you please refactor the code in such a way that when debugging it is possible to see what getDeclaredConstructor returns?mailq commentedon Apr 13, 2023
I'm getting the same Exception. But I can also provide the cause of it. The root cause is - according to the stacktrace - a
java.lang.ClassNotFoundException: jakarta.xml.bind.JAXBExceptionThis on the other hand is due to a conflict in the jaxb-runtime version present in the (my) project. I have the "old" jaxb-runtime with the
javax.xml.bindnamespace; it comes from Spring 2. But jollyday requires the "new" jaxb-runtime with thejakarta.xml.bindnamespace; which is only present in Spring 3.Yes there are other cases when the jaxb-runtime version does not match, but the above circumstance is just one example. So check your dependencies if it has the wrong runtime. (Check which dependency provides the JAXBException and which namespace it is in; it has to be jakarta.xml.bind)