What's mean that Caused by: javax.validation.ValidationException: Unable to find a default provider? - spring

I compiling springframework project using with springframework-3.0.1. But, I got error messages, "Caused by: javax.validation.ValidationException: Unable to find a default provider",
What is it? help me,

Do you actually have a ValidationProvider on your class path?
Try adding the reference implementation Hibernate Validator 4 to your class path.

Related

Weblogic 12 Caused By: javax.naming.NameNotFoundException: While trying to look up /jms/MyCF in /app/webapp/myapp.war/.; remaining name '/jms/MyCF'

I have issue with JNDI resolving.
Regarding this page, if it is under Weblogic it should only have this property:
https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#boot-features-jms-jndi
spring.jms.jndi-name=java:/jms/MyCF
JmsTemplate is created automatically. Or it should. But it didn't.
I get this exception.
Caused By: javax.naming.NameNotFoundException: While trying to look up /jms/MyCF in /app/webapp/myapp.war/923245655.; remaining name '/jms/MyCF'
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1292)
at weblogic.jndi.internal.ApplicationNamingNode.lookup(ApplicationNamingNode.java:144)
at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:307)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:435)
at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)
Truncated. see log file for complete stacktrace
Ok, i found what was an issue.
spring.jms.jndi-name=jms/MyCF
Simple as that. :)

No SchemaFactory that implements the schema language specified by: http://www.w3.org/2001/XMLSchema could be loaded

When trying to expose a Service with Aegis databinding in CXF DOSGi I get this error in Java 8. In java 7 it works fine.
Caused by: java.lang.IllegalArgumentException: No SchemaFactory that implements the schema language specified by: http://www.w3.org/2001/XMLSchema could be loaded
at javax.xml.validation.SchemaFactory.newInstance(SchemaFactory.java:215)
at org.apache.cxf.aegis.type.XMLTypeCreator.(XMLTypeCreator.java:122)
See full stacktrace here
I think the reason is that the code does not see the impl class com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.
Any ideas how to fix this?
Btw. the exception can be observed by running the CXF-DOSGi build in Java 8.
I still do not have found a real solution for this. For now I have committed a workaround on CXF master to ignore this exception in the static code. So the Aegis binding is not schema checked but at least works. See CXF-6959.
I would be happy about any hints to get this fully working again.

CXF 3.0.0 raises org.apache.cxf.BusException: No DestinationFactory was found for the namespace http://schemas.xmlsoap.org/soap/http

Working with CXF-STS I came across exceptions as <<||2014-07-14 21:51:14,125||http-apr-8080-exec-8|DEBUG|org.apache.ws.security.processor.Signat‌​ureProcessor:428||||>> XML Signature verification has failed <<||2014-07-14 21:51:14,127||http-apr-8080-exec-8|DEBUG|org.apache.ws.security.processor.Signat‌​ureProcessor:431||||>> Signature Validation check: false
As discussed at post, CXF STS Usernametoken symmetric binding XML Signature verification has failed
https://issues.apache.org/jira/browse/CXF-5679
https://issues.apache.org/jira/browse/CXF-5679
So assuming it was fixed for version 3.0.0 I moved to it. Now on start up I am facing the error as
... 25 more
Caused by: org.apache.cxf.service.factory.ServiceConstructionException
at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:176)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211)
at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:456)
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:334)
... 34 more
Caused by: org.apache.cxf.BusException: No DestinationFactory was found for the namespace http://schemas.xmlsoap.org/soap/http.
at org.apache.cxf.bus.managers.DestinationFactoryManagerImpl.getDestinationFactory(DestinationFactoryManagerImpl.java:122)
at org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:88)
at org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:72)
at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:160)
I am unable to figure out how can I really work with CXF STS example. Please provide some good example references to work with CXF STS in UsernameToken with Encryption Scenario
Thanks
This was becuase my project was having CAMEL-CXF dependencies which contain CXF 2.7 as embedded. It might have created the conflicts with new CXF 3.0.0 version. So removing them from classpath resolved the problem
Thanks

IBM Websphere: Getting error for Spring AOP

I am getting following error while booting up the server. Application has Spring as well as AspectJ classes in it.
Caused by: java.lang.VerifyError: JVMVRFY013 class loading constraint violated; class=org/springframework/aop/aspectj/MethodInvocationProceedingJoinPoint, method=getSourceLocation()Lorg/aspectj/lang/reflect/SourceLocation;, pc=0
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:93)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:170)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.currentJoinPoint(AbstractAspectJAdvice.java:83)
As a first pass I gave PARENT_FIRST option for Enterprise Application
Well, I'll write it here again as my first reply was deleted without any explanation though it was the correct one.
Given the exception you encounter you're likely at WAS 8.5.5.0. There's a known issue documented under APAR PM90932 about this. An ifix has been publisehd for this issue and you can read about it and download it from here. Once the ifix is installed, the issue won't appear again.

Why doesn't Websphere like BIRT?

I am trying to start a deployment of a project to Websphere and I get the following error trail. (Shortened)
ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'birtView' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'birtEngine' while setting bean property 'birtEngine'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'birtEngine': FactoryBean threw exception on object creation; nested exception is java.lang.RuntimeException: Could not start the Birt engine!
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'birtEngine': FactoryBean threw exception on object creation; nested exception is java.lang.RuntimeException: Could not start the Birt engine!
Caused by: java.lang.RuntimeException: Could not start the Birt engine!
Caused by: org.eclipse.birt.core.exception.BirtException: error.CannotStartupOSGIPlatform
Caused by: org.eclipse.birt.core.framework.FrameworkException: Cant register the ExtensionRegistry classpath
Caused by: org.eclipse.core.runtime.CoreException: Extension registry provider is already set.
The solution to the 3rd from bottom error as I have found online was to delete the following line of code.
config.setEngineHome("C:/birt-runtime-3_7_0/ReportEngine");
However, this is not present and unnecessary for our setup.
It(the BIRT specific code used) is very similar to this example online:
http://www.springsource.org/BusinessIntelligenceWithSpringAndBIRT
The BirtView and BirtEngineFactory are the only relevant parts to my project.
I have gone to this Bug Page and forum entry and tried the code addition. It did not work. The project starts up and works on Tomcat 6x without any issue.
http://www.eclipse.org/forums/index.php/m/727929/
https://bugs.eclipse.org/bugs/show_bug.cgi?id=351052
I have the class loader order in Web Sphere set to "Classes loaded with application class loader first." as in the example in the link below.
http://wiki.eclipse.org/BirtPOJO_Viewer_WebSphere_Deployment
I still get the same set of errors and I'm not sure what else I should be doing.
I know it is a bit hard to ask this without posting code, but would someone have an idea as to what I should look for?
Thanks.
I had exactly the same error as yours. I am using BIRT 3.7.2 and IBM WAS 8.5
With reference to the bug detailed below,
org.eclipse.core.runtime.CoreException when restarting the ReportEngine
and the actual reason of the bug, specified below,
ServiceLauncher.shutdown() doesn't release default RegistryProvider
I added the following line before the Platform.startup(..) call
RegistryProviderFactory.releaseDefault();
After this, BIRT reports are working fine.
But, I'm doubtful, as to whether this will break anything in WAS's runtime or not.
The reason for this is ...
As explained in the bug, this exception occurs when Platform start-up is attempted for a second time. Here, on Platform.shutdown(), the RegistryProvider is not released, and hence the exception.
Now, in my case, IBM Websphere 8.5 internally uses OSGi and hence starts OSGi Platform.
Hence, when our application attempts to start the Platform again (the second start), the exception occurs.
My concern here is, this should not break anything with WAS’s runtime (as it uses OSGi internally).
The Registry Provider is not null, as its set by BIRT runtime, so, the only problem here can be of Class Version mismatch i.e., WAS’s Registry Provider and BIRTs Registry Provider, if different, then version clashes.
I'm not sure of the solution i have used.
Experts, please guide.

Resources