jcabi-github
jcabi-github copied to clipboard
validation.xml ?
Hi,
What’s the file validation.xml for in META-INF
in jcabi-aspects-0.22.5.jar
?
That file makes Glassfish refuse to deploy my application (which includes jcabi-github, hence, jcabi-aspects by transitive dependency mechanisms).
Glassfish complains when deploying (in its log file), as follows (partial).
[2018-02-05T00:33:49.083+0100] [glassfish 4.1] [INFO] []
[org.hibernate.validator.internal.xml.ValidationXmlParser]
[tid: _ThreadID=44 _ThreadName=AutoDeployer]
[timeMillis: 1517787229083] [levelValue: 800] [[
HV000007: META-INF/validation.xml found. Parsing XML based configuration.]]
[2018-02-05T00:33:49.104+0100] [glassfish 4.1] [WARNING] []
[org.glassfish.jersey.internal.Errors]
[tid: _ThreadID=44 _ThreadName=AutoDeployer]
[timeMillis: 1517787229104] [levelValue: 900] [[
The following warnings have been detected: WARNING: Unknown HK2 failure detected:
MultiException stack 1 of 1
org.apache.xerces.impl.dv.ObjectFactory$ConfigurationError:
Provider org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl could not be instantiated:
java.lang.IllegalStateException: This web container has not yet been started
(I ask here rather than in jcabi-aspects because this bug hits me as a user of jcabi-github, and possible solutions might be available because of this. Sorry if it is inappopriate.)
@yegor256/z please, pay attention to this issue
@oliviercailloux this file is coming from Hibernate, I believe. I think you should just add Hibernate Validator to classpath and the problem will disappear. We can't remove the file...
Sorry to insist, but are you sure you can’t remove the file? According to jcabi-aspects
pom, hibernate-validator
is used only as a test dependency. Thus, I suspect that the validator.xml
file is required only for the tests. Would you perhaps consider moving it from src/main/resources/META-INF
to src/test/resources/META-INF
?
It would be good not to export validator.xml
in the produced artifact, as not only does it introduce complications in Java EE projects (such as in my case), but also, this file will conflict with a user supplied validator file if a user of jcabi-aspects
wishes to use one.
@oliviercailloux I will also have a look over this, soon. It's strange, I never had issues with jcabi-github on Glassfish. I have 2 JavaEE apps using it. I only had issues with that Manifest.MF stuff (not sure if you know about that bug)
Thanks. But, TBH, I switched to Graph QL in the meantime, for most of my queries, and use a home backed fetcher for the rest. So don’t feel compelled to look into this bug for me…