Original address: Apache groovy — Java. Lang. nosuchmethoderror: x.x.x: method() V not found 🙃)
Problem description
During the execution of groovy code, the following error occurred:
ava.lang.NoSuchMethodError: com.lispstudio.model.TeamLispstudio: method <init>()V not found
Cause of the problem
After inheriting the parent class, the constructor of the parent class is not called.
resolvent
There are two solutions: 1) call the same constructor as the parent class; 2) Use inheritconstructors annotation;
Call the same constructor as the parent class
class Creature { Creature (String feature) {} } class Humman extends Creature{ Humman (String feature) { super(feature) } } new Humman("legs")
Using inheritconstructors annotation
class Creature { Creature (String feature) {}
Read More:
- A problem occurred configuring project ‘:x x x‘. > java.lang.NullPointerException (no error message)
- RuntimeError: Expected hidden[0] size (x, x, x), got(x, x, x)
- CLP: error: getaddrinfo enotfound http://x.x.x.x/
- [Solved] emulator: glteximage2d: got err pre 🙁 0x502 internal 0x1908 format 0x1908 type 0x1401
- Could not write JSON: write javaBean error, fastjson version x.x.x, class
- module ‘win32com.gen_py.00020813-0000-0000-C000-000000000046x0x1x9‘ has no attribute ‘CLSIDToClassMa
- [-] handler failed to bind to x.x.x.x: Port troubleshooting
- 1067 – Invalid default value for ‘sex‘1366 – Incorrect string value: ‘\xE6\x8A\x80\xE6\x9C\xAF…‘ f
- 【PTA:】 Error: class X is public should be declared in a file named X.java
- OSD deployment failure code (0x00000001) 0x80004005
- Microsoft OLE DB Provider for SQL Server error & #x27;80040e4d & #x27;
- Unhandled exception at 0x00000000: 0xc0000005: access violation at position 0x0000000000
- Httprunner v3. X generates HTML report in assure format
- MySql 8.x java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed
- Ubuntu18.04 x11vnc failed, report error opening logfile: /var/log/x11vnc.log
- Method of getting app. Config. Globalproperties. X directly from vue3
- SSH Login: RSA host key for 192.168.x.x has changed and you have requested strict checking. Host key
- java.lang.NoSuchMethodError: org.json.JSONObject.put(Java/lang/String; Java/util/Collection;) “209151;”
- Running program encountered Error:Access violation at 0x**(tried to write to 0x**) program terminated
- build.gradle Warming: cannot be applied to ‘(groovy.lang.Closure)’/'(java.lang.String)’