konik-io/konik

error during validation of io.konik.zugferd.Invoice@142ce1f

Frogrek opened this issue · 4 comments

We try to implement a ZUGFErD interface in our software on a Windows/Dotnet/C# platform on the based on your zugferd.dll. In our test project derived from your master example, it works pretty good.
But in our main project (same platform) we get during the validation phase always the following exception:
error during validation of io.konik.zugferd.Invoice@142ce1f

with the inner exception:
interface javax.validation.constraints.NotNull is not visible from class loader

We googled but found none solution for this problem. Here is the sample of our validation method:

   public List<String> Validate(Invoice invoice)
    {
        List<String> err = new List<String>();
        InvoiceValidator Validator = new InvoiceValidator();

        try
        {
            Set violations = Validator.validate(invoice);

            if (violations.size() > 0)
            {
                err.Add("....);
                foreach (ConstraintViolation violation in violations.toArray())
                {
                    err.Add(violation.getMessage() + " @ " + violation.getPropertyPath() + "\n");
                }
            }
        }
        catch (Exception ex)
        {
            err.Add(ex.Message);
        }
        return (err);
    }

can you add:

ikvm.runtime.Startup.addBootClassPathAssembly(typeof(javax.validation.constraints.NotNull).Assembly)