File tree 1 file changed +10
-1
lines changed
src/main/java/com/googlecode/jsonrpc4j
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ public class JsonRpcBasicServer {
50
50
public static final String VERSION = "2.0" ;
51
51
public static final int CODE_OK = 0 ;
52
52
public static final String WEB_PARAM_ANNOTATION_CLASS_LOADER = "javax.jws.WebParam" ;
53
+ public static final String WEB_PARAM_ANNOTATION_CLASS_LOADER_JAKARTA = "jakarta.jws.WebParam" ;
53
54
public static final String NAME = "name" ;
54
55
public static final String NULL = "null" ;
55
56
private static final Logger logger = LoggerFactory .getLogger (JsonRpcBasicServer .class );
@@ -136,7 +137,15 @@ private static void loadAnnotationSupportEngine() {
136
137
WEB_PARAM_ANNOTATION_CLASS = classLoader .loadClass (WEB_PARAM_ANNOTATION_CLASS_LOADER ).asSubclass (Annotation .class );
137
138
WEB_PARAM_NAME_METHOD = WEB_PARAM_ANNOTATION_CLASS .getMethod (NAME );
138
139
} catch (ClassNotFoundException | NoSuchMethodException e ) {
139
- logger .debug ("Could not find {}.{}" , WEB_PARAM_ANNOTATION_CLASS_LOADER , NAME );
140
+ logger .debug ("Could not find {}.{}" , WEB_PARAM_ANNOTATION_CLASS_LOADER , NAME );
141
+ logger .debug ("Try to load it from jakarta package" );
142
+ try {
143
+ WEB_PARAM_ANNOTATION_CLASS = classLoader .loadClass (WEB_PARAM_ANNOTATION_CLASS_LOADER_JAKARTA ).asSubclass (Annotation .class );
144
+ WEB_PARAM_NAME_METHOD = WEB_PARAM_ANNOTATION_CLASS .getMethod (NAME );
145
+ } catch (ClassNotFoundException | NoSuchMethodException ex ) {
146
+ logger .debug ("Could not find {}.{}" , WEB_PARAM_ANNOTATION_CLASS_LOADER_JAKARTA , NAME );
147
+ }
148
+
140
149
}
141
150
}
142
151
You can’t perform that action at this time.
0 commit comments