Below are some sites to validate the WSDL file hosted some where in the internet.
1. http://www.validwsdl.com/
2. http://xmethods.net/ve2/Tools.po
GoogleSearchBox
Custom Search
Friday, July 12, 2013
Thursday, July 4, 2013
Content is not allowed in prolog. org.xml.sax.SAXParseException: Content is not allowed in prolog.
SEVERE: Parse Fatal Error at line 2 column 1: Content is not allowed in prolog. org.xml.sax.SAXParseException: Content is not allowed in prolog. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1642) at org.apache.catalina.startup.Catalina.load(Catalina.java:524) at org.apache.catalina.startup.Catalina.load(Catalina.java:562) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Jul 4, 2013 3:43:44 PM org.apache.catalina.startup.Catalina load WARNING: Catalina.start using conf/server.xml: org.xml.sax.SAXParseException: Content is not allowed in prolog. at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
We get this error, due to some characters in the xml file (in my case it was server.xml file) are not liked by the Parser. Even when you open the same file in IE browser, it will not open up. Also IDE like MyEclipse also shows same error "Content is not allowed in prolog."
I could not find out, which character or line are not liked by the parser.
So the solution for me : I took another same xml file (which was working) and replaced it and made changes as per my requirement.
That's it !!
Wednesday, July 3, 2013
java.lang.NullPointerException at org.apache.jsp.index_jsp._jspInit(index_jsp.java:22) and javax.servlet.ServletException: java.lang.LinkageError
SEVERE: Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at org.apache.jsp.index_jsp._jspInit(index_jsp.java:22) at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52) at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:164) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:340) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) at javax.servlet.http.HttpServlet.service(HttpServlet.java:723) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:619) Jul 3, 2013 5:27:29 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet jsp threw exception
I googled it, found some suggestions like,
we have jsp-api.jar and servlet-api.jar placed inside the project’s WEB-INF/lib
directory and That’s causing the issue. Because it should not be there as Tomcat
has it already these jars in its lib.
But removing that jar from the
projects gives me this below error:
And Sometimes, when you delete some conflicting jars (but still some conflicts remains there), then you may get below exception :
javax.servlet.ServletException: java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.getExpressionFactory()Ljavax/el/ExpressionFactory; " the class loader (instance of org/apache/jasper/servlet/JasperLoader) of the current class, org/apache/jsp/index_jsp, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type javax/el/ExpressionFactory used in the signature org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343) javax.servlet.http.HttpServlet.service(HttpServlet.java:722) root cause java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.getExpressionFactory()Ljavax/el/ExpressionFactory;" the class loader (instance of org/apache/jasper/servlet/JasperLoader) of the current class, org/apache/jsp/index_jsp, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type javax/el/ExpressionFactory used in the signature
Now the root cause of this issue is jar files conflict.
Basically identical jar's located inside server's (like Tomcat's) lib directory conflict with same jars found in your deployed application's WEB-INF/lib/ directory.
Below jars in my case above were causing the issue.
1. servlet-api.jar
2. jsp-api.jar
3. el-api.jar
I had these in the BuildPath of my MyEclipse, because of class files had dependency on these.. so could not delete from there. But when I deploy the application, these jars get copied into the TOMCAT_HOME/webapps/myproject/WEB-INF/lib/
And by default my TOMCAT_HOME/lib/ directory had these jars.
Now, I can not delete the servlet-api and jsp-api jars from my MyEclipse build path, otherwise my code will have so many compile errors due to classNotFound.
So the solution I used is:
1. I deleted servlet-api and jsp-api jars from my MyEclipse build path, and in place of these, I used javaee.jar (which had all the required class files for my project to compile).
2. Also completely deleted the el-api.jar file too from the build path
Hope that helps for you too!!
References:
http://stackoverflow.com/questions/8487048/java-lang-linkageerror-javax-servlet-jsp-jspapplicationcontext-getexpressionfac
spring / JSTL $ variable does not display the value Or Spring $ variable not carrying into view / JSP
The expression language (EL, $ syntax) like ${message} doesn't work in my JSP / JSTL tags while working with Spring!
I noticed this issue while working with Spring demo.
Lets discuss first what was my settings and what I tried to make it work, then will take about the solution.
I was setting the variable in the spring Controller like below:
And I was trying to use the "msg" variable in the JSP (abcd.jsp) as below:
Tried every possible combination of displaying the variable in the jsp.
But I was not getting any value corresponding to the variable when used along with the EL $, I used to get below response through JSP page when run under tomcat 5.5.x:
So, after googling out, I found that, its the Servlet and JSP versions not compatible with the server.
Basically in my web.xml I had declared the version of Servlet I am using is 2.5 as below:
But, I was deploying above application on a Tomcat server of version 5.5.x (which supports Servlets version 2.4). And that was the main root cause.
So, When I deployed the application to Tomcat 6.x (supporting Servlets 2.5 and a higher version of JSP and EL), It worked fine.
Now I am getting the expected result of the above JSP (abcd.jsp) page, the output is shown below:
Hope this helps you too!!
References I followed:
http://stackoverflow.com/tags/jstl/info
I noticed this issue while working with Spring demo.
Lets discuss first what was my settings and what I tried to make it work, then will take about the solution.
I was setting the variable in the spring Controller like below:
@RequestMapping("/hello")
public ModelAndView helloWorld() {
String message = "HELLO SPRING MVC";
return new ModelAndView("abcd", "msg", message);
}
/* Even I tried below way of setting the variable msg */
@RequestMapping("/welcome")
public String welcomeWorld(Model m) {
String s = "HELLO SPRING MVC";
m.addAttribute("msg", s);
return "welcome";
}
And I was trying to use the "msg" variable in the JSP (abcd.jsp) as below:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<html>
<body>
Message is: <%= request.getAttribute("msg") %> <br/>
Message is: <c:out value="${msg}" /> <br/>
Message is: ${"msg"} <br/>
Message is: ${msg} <br/>
</body>
</html>
Tried every possible combination of displaying the variable in the jsp.
But I was not getting any value corresponding to the variable when used along with the EL $, I used to get below response through JSP page when run under tomcat 5.5.x:
So, after googling out, I found that, its the Servlet and JSP versions not compatible with the server.
Basically in my web.xml I had declared the version of Servlet I am using is 2.5 as below:
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> <servlet> <servlet-name>spring</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>spring</servlet-name> <url-pattern>*.html</url-pattern> </servlet-mapping> </web-app>
But, I was deploying above application on a Tomcat server of version 5.5.x (which supports Servlets version 2.4). And that was the main root cause.
So, When I deployed the application to Tomcat 6.x (supporting Servlets 2.5 and a higher version of JSP and EL), It worked fine.
Now I am getting the expected result of the above JSP (abcd.jsp) page, the output is shown below:
Hope this helps you too!!
References I followed:
http://stackoverflow.com/tags/jstl/info
Friday, June 28, 2013
is invalid; nested exception is org.xml.sax.SAXParseException: Element type "bean" must be followed by either attribute specifications, ">" or "/>".
If you are getting extra special characters (like ascii or hexa or any weird characters) in your script/xml/txt file OR
If you are getting an error like below in your logs:
Though you keep formatting the xml, but still the error remains same as shown below:
Solutions #1:
1. Copy the code showing error into just plain notepad.
2. try deleting all the spaces between words and then manually use spacebar to add spaces between words/attributes.
3. Again copy the code from notepad and then paste into your IDE/Editor.
This should have solved.
But, in some cases, this also does not solve the issue.
Solutions #2:
1. Open the same excel file in an advanced editor like notepad++,
2. Go to the "Encode" menu --> choose "Encode in ANSI"
3. Now you should be able to see all those invisible ansi characters you have derived while copy pasting from internet (shown below):
4. So you got now proof that you have some to give company there in your xml file.
Delete all those, characters manually or by using the editors find/replace (ctrl + h ) option:
5. Now try changing the encoding to the other formats, you will be surprised to see more invisible characters suddenly becomes visible to you :)
6. Play around with encodings, delete those chars and Save.
Rerun the application. You should be fine.
If you are in Unix Environment, and you doubt your script file (.sh) contains any special characters, you can view those special characters using VI editor.
Open the file using VI editor:
$ vi <file_name>
Hit Esc
Then type in the command line of the vi editor as (To be able to see the extra characters)- :set list
To again hide the special characters or make the file to be seen as normal, type in the command line- :set nolist
If you are getting an error like below in your logs:
2013-06-28 08:57:02,295 ERROR [org.springframework.web.context.ContextLoader] - <Context initialization failed> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 67 in XML document from ServletContext resource [/WEB-INF/spring-configuration/ticketRegistry.xml] is invalid; nested exception is org.xml.sax.SAXParseException: Element type "bean" must be followed by either attribute specifications, ">" or "/>". at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180) at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125) at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131) at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:522) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:436) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111) at org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized_aroundBody0(SafeContextLoaderListener.java:75) at org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized_aroundBody1$advice(SafeContextLoaderListener.java:57) at org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized(SafeContextLoaderListener.java:1) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065) at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: org.xml.sax.SAXParseException: Element type "bean" must be followed by either attribute specifications, ">" or "/>".The reason could be that your xml file contains some invisible characters to your eye (basically some ansi characters), Normally this happens when you copy the code from internet browser or pdf and paste into your editor/IDE.
Though you keep formatting the xml, but still the error remains same as shown below:
Solutions #1:
1. Copy the code showing error into just plain notepad.
2. try deleting all the spaces between words and then manually use spacebar to add spaces between words/attributes.
3. Again copy the code from notepad and then paste into your IDE/Editor.
This should have solved.
But, in some cases, this also does not solve the issue.
Solutions #2:
1. Open the same excel file in an advanced editor like notepad++,
2. Go to the "Encode" menu --> choose "Encode in ANSI"
3. Now you should be able to see all those invisible ansi characters you have derived while copy pasting from internet (shown below):
4. So you got now proof that you have some to give company there in your xml file.
Delete all those, characters manually or by using the editors find/replace (ctrl + h ) option:
5. Now try changing the encoding to the other formats, you will be surprised to see more invisible characters suddenly becomes visible to you :)
6. Play around with encodings, delete those chars and Save.
Rerun the application. You should be fine.
If you are in Unix Environment, and you doubt your script file (.sh) contains any special characters, you can view those special characters using VI editor.
Open the file using VI editor:
$ vi <file_name>
Hit Esc
Then type in the command line of the vi editor as (To be able to see the extra characters)- :set list
To again hide the special characters or make the file to be seen as normal, type in the command line- :set nolist
Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.hibernate.mapping.SimpleValue.(Lorg/hibernate/mapping/Table;)V
2013-06-28 07:17:07,829 ERROR [org.springframework.web.context.ContextLoader] - <Context initialization failed>
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ticketRegistry' defined in ServletContext resource [/WEB-INF/spring-configuration/ticketRegistry.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.hibernate.mapping.SimpleValue.<init>(Lorg/hibernate/mapping/Table;)V
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:616)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:148)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1035)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:939)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized_aroundBody0(SafeContextLoaderListener.java:75)
at org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized_aroundBody1$advice(SafeContextLoaderListener.java:57)
at org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized(SafeContextLoaderListener.java:1)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.hibernate.mapping.SimpleValue.<init>(Lorg/hibernate/mapping/Table;)V
Solution:
If you are using hibernate-core jar version 3.6 and above, then Take out the dependency (related to hibernate-annotations jar) from your maven or remove the hibernate-annotations jar from your applications lib) :
<artifactId>hibernate-annotations</artifactId>
Chcek maven dependyncy or jar conflicts - mvn dependency:tree or mvn dependency:tree -Dverbose : is used to see/verify the dependency between jars in Maven for your project dir
Maven command
mvn dependency:tree is used to see/verify the dependency between jars used in a particular project.
To run above command, navigate to your project directory and where you have the pom.xml file for the project you want to verify the jar dependencies:
For example, like
Thats the location of my workspace, containing my projects pom file.
So, now you can run the mvn dependency:tree command.
or specifically if you know which jar you are getting loaded as extra then you can filter it to look for that particular jar by providing its groupId and artifactId and its version (all are option values):
where the above format is : mvn dependency:tree -Dincludes=[groupId]:[artifactId]:[version]
To look for a particular jar files groupId and its artifact you can search on below sites:
https://www.versioneye.com/java/org.slf4j:slf4j-api/1.4.2
https://search.maven.org/#search%7Cga%7C1%7Cjcl104-over-slf4j
Also you can use:
In verbose mode the dependency tree shows dependencies that were omitted for: being a duplicate of another; conflicting with another's version and/or scope
References:
http://maven.apache.org/plugins/maven-dependency-plugin/usage.html
http://maven.apache.org/plugins/maven-dependency-plugin/examples/filtering-the-dependency-tree.html
http://maven.apache.org/plugins/maven-dependency-plugin/examples/resolving-conflicts-using-the-dependency-tree.html
mvn dependency:tree is used to see/verify the dependency between jars used in a particular project.
To run above command, navigate to your project directory and where you have the pom.xml file for the project you want to verify the jar dependencies:
For example, like
# cd /opt/cas-workspace/local-cas
Thats the location of my workspace, containing my projects pom file.
[root@www local-cas]# ls -l total 20 -rw-r--r-- 1 root root 8795 Jun 25 11:33 pom.xml drwxr-xr-x 3 root root 4096 Jun 5 07:33 src drwxr-xr-x 5 root root 4096 Jun 25 11:57 target
So, now you can run the mvn dependency:tree command.
# mvn dependency:tree
or specifically if you know which jar you are getting loaded as extra then you can filter it to look for that particular jar by providing its groupId and artifactId and its version (all are option values):
> mvn dependency:tree -Dincludes=org.slf4j:slf4j-api:1.4.2
where the above format is : mvn dependency:tree -Dincludes=[groupId]:[artifactId]:[version]
To look for a particular jar files groupId and its artifact you can search on below sites:
https://www.versioneye.com/java/org.slf4j:slf4j-api/1.4.2
https://search.maven.org/#search%7Cga%7C1%7Cjcl104-over-slf4j
Also you can use:
# mvn dependency:tree -Dverbose
In verbose mode the dependency tree shows dependencies that were omitted for: being a duplicate of another; conflicting with another's version and/or scope
References:
http://maven.apache.org/plugins/maven-dependency-plugin/usage.html
http://maven.apache.org/plugins/maven-dependency-plugin/examples/filtering-the-dependency-tree.html
http://maven.apache.org/plugins/maven-dependency-plugin/examples/resolving-conflicts-using-the-dependency-tree.html
Cannot create a session after the response has been committed : CAS application error
Below is an issue related to CAS,
Env is: CAS 3.5.2 deployed on Tomcat 6.
"When I login I get an error. If I refresh/resubmit the information it goes through and operates normally. Any advice would be greatly appreciated."
The error is below:
Solution:
"I assume that happens when there is no 'service' param and CAS tries to render a successful generic login page. Correct? If so, that is a side effect that is caused by 'terminateWebSessionListener' bean defined in cas-servlet.xml. You could a) disable one b) set the 'timeToDieInSeconds' property to a higher value to remedy this annoyance, like so":
https://lists.wisc.edu/read/messages?id=27757318#27757318
Env is: CAS 3.5.2 deployed on Tomcat 6.
"When I login I get an error. If I refresh/resubmit the information it goes through and operates normally. Any advice would be greatly appreciated."
The error is below:
type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request exception org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: Cannot create a session after the response has been committed
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:894) org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789) javax.servlet.http.HttpServlet.service(HttpServlet.java:637) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.jasig.cas.web.init.SafeDispatcherServlet.service_aroundBody2(SafeDispatcherServlet.java:128) org.jasig.cas.web.init.SafeDispatcherServlet.service_aroundBody3$advice(SafeDispatcherServlet.java:57) org.jasig.cas.web.init.SafeDispatcherServlet.service(SafeDispatcherServlet.java:1) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259) com.github.inspektr.common.web.ClientInfoThreadLocalFilter.doFilter(ClientInfoThreadLocalFilter.java:63) root cause java.lang.IllegalStateException: Cannot create a session after the response has been committed org.apache.catalina.connector.Request.doGetSession(Request.java:2400) org.apache.catalina.connector.Request.getSession(Request.java:2120) org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833) org.springframework.webflow.context.servlet.HttpSessionMap.getMutex(HttpSessionMap.java:98) org.springframework.webflow.core.collection.LocalSharedAttributeMap.getMutex(LocalSharedAttributeMap.java:39) org.springframework.webflow.conversation.impl.ContainedConversation.unlock(ContainedConversation.java:108) org.springframework.webflow.execution.repository.support.ConversationBackedFlowExecutionLock.unlock(ConversationBackedFlowExecutionLock.java:55) org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:178) org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:183) org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789) javax.servlet.http.HttpServlet.service(HttpServlet.java:637) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.jasig.cas.web.init.SafeDispatcherServlet.service_aroundBody2(SafeDispatcherServlet.java:128) org.jasig.cas.web.init.SafeDispatcherServlet.service_aroundBody3$advice(SafeDispatcherServlet.java:57) org.jasig.cas.web.init.SafeDispatcherServlet.service(SafeDispatcherServlet.java:1) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259) com.github.inspektr.common.web.ClientInfoThreadLocalFilter.doFilter(ClientInfoThreadLocalFilter.java:63)
Solution:
"I assume that happens when there is no 'service' param and CAS tries to render a successful generic login page. Correct? If so, that is a side effect that is caused by 'terminateWebSessionListener' bean defined in cas-servlet.xml. You could a) disable one b) set the 'timeToDieInSeconds' property to a higher value to remedy this annoyance, like so":
<bean id="terminateWebSessionListener" class="org.jasig.cas.web.flow.TerminateWebSessionListener" p:serviceManagerUrl="${cas.securityContext.serviceProperties.service}" p:timeToDieInSeconds="5"/>Via Reference:
https://lists.wisc.edu/read/messages?id=27757318#27757318
Subscribe to:
Posts (Atom)







