Posts

Showing posts with the label Exceptions

Spring Boot Error : Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory

Problem Use case: While starting a Spring Boot Application using mvn spring-boot:run The Application fails to start Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean. Exception Details [Truncated]: [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.5.9.RELEASE:run (default-cli) on project Javaexp-springboot-rest: An exception occurred while running. null: InvocationTargetException: Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1...

Failed to load or instantiate TagLibraryValidator

Problem Usecase: Downloaded the Apache Tag libraries and copied them in the web-inf /lib/jstl-libs/ folder. Included the taglib directory in jsp page, compiled and deployed in Tomcat 6. During runtime got the following exception. Exception Details [Truncated]: org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51) org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409) org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:281) org.apache.jasper.compiler.TagLibraryInfoImpl.createValidator(TagLibraryInfoImpl.java:670) org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:249) org.apache.jasper.compiler.TagLibraryInfoImpl. (TagLibraryInfoImpl.java:164) org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:386) org.apache.jasper.compi...

Hibernate Exceptions Errors and Causes

The following section will list the general exception that we get while dealing with hibernate. org.hibernate.ObjectDeletedException:deleted object would be re-saved by cascade when we try to delete the child object and don't remove the association, for instance we loaded a parent object with list of child and then we deleted one of the child object but did not removed the child from the parent. Example, Box gotBox =(Box)dao.load(Box.class, box.getBoxId()); List boxitem = new ArrayList(gotBox.getBoxItems()); BoxItem deleteItem = boxitem.get(0); dao.deletItem(deleteItem.getItemName()); Solution is, remove the transient instance from the parent object(Box) like.   gotBox.getBoxItems().remove(deleteItem); OR use   @Cascade(value=org.hibernate.annotations.CascadeType.DELETE_ORPHAN) on the child object. ------------------------------------------------------------------------------------------------- No Dialect mapping for JDBC type: -1 We get th...