Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
This was removed because the "PosTag(String tag, LexicalCategory...lc)" also allowd to create unmapped (tag only) instances.
However this is only true for java source code. When using the reflection API it is not possible to obtain an string only constructor. because of that the call to
PosTag.class.getConstructor(String.class)
results in a "NoSuchMethodException: org.apache.stanbol.enhancer.nlp.pos.PosTag.<init>(java.lang.String)".
An example of an component that tires to obtain the string only constructor of PosTag is the "CeliTagSetRegistry". Because of that it encounters a
Caused by: java.lang.NoSuchMethodException: org.apache.stanbol.enhancer.nlp.pos.PosTag.<init>(java.lang.String)
at java.lang.Class.getConstructor0(Class.java:2706)
at java.lang.Class.getConstructor(Class.java:1657)
at org.apache.stanbol.enhancer.engines.celi.CeliTagSetRegistry.getTag(CeliTagSetRegistry.java:354)
This was not discovered until Jenkins build #1208 because all POS tags used by CELI where actually predefined in the mappings defined by the registry. However (most likely) due to an server side change of the CELI server this is no longer the case - causing the registry to create an ad-hoc PosTag for the unknown mapping and therefore throwing this exception