It's all about the answers!

Ask a question

Problem with IBM Liberty


Marcus Patterson (111) | asked Jun 02 '20, 11:49 p.m.

Hello


I have a widget that invokes a servlet that is deployed as war file on IBM Liberty

When the application was deployed initially, it was not working as expected. Upon further investigation, the following exception was observed in the logs :
[ERROR ] SRVE0777E: Exception thrown by application class 'org.apache.wink.common.internal.registry.metadata.ProviderMetadataCollector.parseAccessibleObject:122'
java.lang.NoSuchMethodError: org/apache/wink/common/internal/utils/GenericsUtils.getClassType(Ljava/lang/reflect/Type;Ljava/lang/Class;)Ljava/lang/Class; (loaded from file:/ngtfs01/IBM/RQM606_Liberty/server/liberty/wlp/lib/../dev/api/third-party/com.ibm.websphere.appserver.thirdparty.jaxrs_1.0.20.jar by org.eclipse.osgi.internal.loader.EquinoxClassLoader@eaeb8095[com.ibm.ws.jaxrs:1.0.20.cl180120180309-2209(id=124)]) called from class org.apache.wink.common.internal.registry.metadata.ProviderMetadataCollector (loaded from file:/ngtfs01/IBM/RQM606_Liberty/server/liberty/servers/clm/workarea/org.eclipse.osgi/82/data/cache/com.ibm.ws.app.manager_63/.cache/WEB-INF/lib/wink-common-1.4.jar by com.ibm.ws.classloading.internal.AppClassLoader@64e52729).
at org.apache.wink.common.internal.registry.metadata.ProviderMetadataCollector.parseAccessibleObject(ProviderMetadataCollector.java:122)
at [internal classes]
at org.eclipse.lyo.client.oslc.OslcClient.getResource(OslcClient.java:233)
at org.eclipse.lyo.client.oslc.OslcClient.getResource(OslcClient.java:204)
at com.gm.jts.helper.

I tried to overcome this exception by including third-party libraries using classloader option in application.xml
<classloader apiTypeVisibility="spec, ibm-api, api, stable, third-party" />

Although the above exception seems to have resolved, there are traces of other exceptions as follows :

[2/25/20 15:50:17:634 EST] 00000045 com.ibm.ws.logging.internal.impl.IncidentImpl I FFDC1015I: An FFDC Incident has been created: "java.lang.RuntimeException com.ibm.ws.anno.targets.internal.AnnotationTargetsImpl_Targets 529" at ffdc_20.02.25_15.50.17.0.log
[2/25/20 15:50:17:635 EST] 00000045 m.ibm.ws.anno.targets.internal.AnnotationTargetsImpl_Targets W CWWKC0044W: An exception occurred while scanning class and annotation data. The exception was java.lang.RuntimeException

And

000000ee pache.wink.common.internal.application.ApplicationFileLoader E The runtime environment failed to instantiate the org.apache.wink.providers.json4j.JSON4JArrayProvider class. Ensure that the class is not abstract, has a valid constructor, has the right visibility, and is not an inner member class.
java.lang.NoClassDefFoundError: org.apache.wink.json4j.JSONException
….
Caused by: java.lang.ClassNotFoundException: org.apache.wink.json4j.JSONException cannot be found by com.ibm.ws.jaxrs_1.0.20.cl180120180309-2209

Can you kindly help me resolve the above exceptions ?


Thanks

One answer



permanent link
Ralph Schoon (63.1k33645) | answered Jun 04 '20, 2:44 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
As far as I can tell, you do not have a problem with Liberty, you have a development/deployment problem. A bunch of libraries that the Lyo framework uses are missing/unavailable/can not be found.

How you can bundle libraries in your WAR file or provide the libraries otherwise so that they become available in Liberty is not really something this forum usually deals with. There are other forums where this is discussed and they would expect you to provide more information what you actually did to include the missing libraries in the WAR file or how you made them available in Liberty.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.