Resolve dao.DuplicateKeyException in Spring MVC - spring

When I run the code I get this error . How could I resolve it .Thanks
StringBuffer contactQuery =new StringBuffer();
contactQuery.append("Insert into rescontact (");
contactQuery.append("ContactSeq,ResID,LastName,FirstName,ContactLabel,Phone1,Phone2)");
contactQuery.append("Values( ?,?,?,?,?,?,?)");
logClient.debug("Insert Query " + contactQuery.toString());
System.out.println(" Contact Insertion Query "+contactQuery.toString());
try{
JdbcTemplate jdbcTemplate = this.getJdbcTemplate();
return jdbcTemplate.update(contactQuery.toString(),new Object[] {contactSeq,resId,lastName,firstName,"WEB",Long.parseLong(contactresult),Long.parseLong(alternatecontactresult)});
Exception:
ERROR [stderr] (http-localhost/127.0.0.1:8080-2)
org.springframework.dao.DuplicateKeyException: PreparedStatementCallback; SQL [Insert into rescontact (ContactSeq,ResID,LastName,FirstName,ContactLabel,Phone1,Phone2)Values( ?,?,?,?,?,?,?)]; ORA-00001: unique constraint (DOR_RESTINSP.SYS_C0011900) violated
09:31:59,851 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) ; nested exception is java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (DOR_RESTINSP.SYS_C0011900) violated
09:31:59,852 ERROR [stderr] (http-localhost/127.0.0.1:8080-2)
09:31:59,852 ERROR [stderr] (http-localhost/127.0.0.1:8080-2)
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:239)
09:31:59,852 ERROR [stderr] (http-localhost/127.0.0.1:8080-2)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)
09:31:59,852 ERROR [stderr] (http-localhost/127.0.0.1:8080-2)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:660)
09:31:59,852 ERROR [stderr] (http-localhost/127.0.0.1:8080-2)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:909)
09:31:59,853 ERROR [stderr] (http-localhost/127.0.0.1:8080-2)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:970)
09:31:59,853 ERROR [stderr] (http-localhost/127.0.0.1:8080-2)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:980)

Related

TNS:received bad datatype in NSWMARKER packet

I am using Oracle 10.2.0.5 as database, ojdbc14.jar as jdbc driver and calling this via jdbc from an application deployed in JBoss EAP 6.4. I am sometimes getting the following exception while connecting to database:
11:01:53,804 ERROR [stderr] (http-/10.150.101.98:8080-6) java.lang.Exception: ORA-12155: TNS:received bad datatype in NSWMARKER packet
11:01:53,804 ERROR [stderr] (http-/10.150.101.98:8080-6)
11:01:53,804 ERROR [stderr] (http-/10.150.101.98:8080-6) at dk.tdc.soa.faslink.intern.commonfunctions.DBAccess.query2(DBAccess.java:115)
11:01:53,804 ERROR [stderr] (http-/10.150.101.98:8080-6) at dk.tdc.soa.faslink.intern.functions.FasoDetailRequestFunction.execute(FasoDetailRequestFunction.java:426)
11:01:53,805 ERROR [stderr] (http-/10.150.101.98:8080-6) at dk.tdc.soa.faslink.extern.RestEndpoint.fasoDetailRequest(RestEndpoint.java:426)
11:01:53,805 ERROR [stderr] (http-/10.150.101.98:8080-6) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11:01:53,805 ERROR [stderr] (http-/10.150.101.98:8080-6) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
11:01:53,805 ERROR [stderr] (http-/10.150.101.98:8080-6) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
11:01:53,805 ERROR [stderr] (http-/10.150.101.98:8080-6) at java.lang.reflect.Method.invoke(Method.java:606)
11:01:53,806 ERROR [stderr] (http-/10.150.101.98:8080-6) at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:168)
11:01:53,806 ERROR [stderr] (http-/10.150.101.98:8080-6) at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:269)
11:01:53,806 ERROR [stderr] (http-/10.150.101.98:8080-6) at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227)
11:01:53,806 ERROR [stderr] (http-/10.150.101.98:8080-6) at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216)
11:01:53,806 ERROR [stderr] (http-/10.150.101.98:8080-6) at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:541)
11:01:53,806 ERROR [stderr] (http-/10.150.101.98:8080-6) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:523)
11:01:53,807 ERROR [stderr] (http-/10.150.101.98:8080-6) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:125)
11:01:53,807 ERROR [stderr] (http-/10.150.101.98:8080-6) at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
11:01:53,807 ERROR [stderr] (http-/10.150.101.98:8080-6) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
11:01:53,807 ERROR [stderr] (http-/10.150.101.98:8080-6) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
11:01:53,807 ERROR [stderr] (http-/10.150.101.98:8080-6) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
11:01:53,807 ERROR [stderr] (http-/10.150.101.98:8080-6) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)
11:01:53,807 ERROR [stderr] (http-/10.150.101.98:8080-6) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
11:01:53,808 ERROR [stderr] (http-/10.150.101.98:8080-6) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231)
11:01:53,808 ERROR [stderr] (http-/10.150.101.98:8080-6) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149)
11:01:53,808 ERROR [stderr] (http-/10.150.101.98:8080-6) at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
11:01:53,808 ERROR [stderr] (http-/10.150.101.98:8080-6) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150)
11:01:53,808 ERROR [stderr] (http-/10.150.101.98:8080-6) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
11:01:53,808 ERROR [stderr] (http-/10.150.101.98:8080-6) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
11:01:53,809 ERROR [stderr] (http-/10.150.101.98:8080-6) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
11:01:53,809 ERROR [stderr] (http-/10.150.101.98:8080-6) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854)
11:01:53,809 ERROR [stderr] (http-/10.150.101.98:8080-6) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
11:01:53,809 ERROR [stderr] (http-/10.150.101.98:8080-6) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926)
11:01:53,809 ERROR [stderr] (http-/10.150.101.98:8080-6) at java.lang.Thread.run(Thread.java:745)
Can anyone plase suggest why I am getting this intermittent exception?

how to connect basic spring web application having java class confrigration with jpa using wildfly 9.0 with using server datasource

i had created spring project in eclipse having configuration class,persistence.xml,entity class
#Configuration
#EnableWebMvc
#ComponentScan(basePackages = "com.dalmiacsa.control")
#EnableJpaRepositories(basePackages = {"com.dalmiacsa.persist.entity"})
public class XMLConfrigration extends WebMvcConfigurerAdapter {
#Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/webRS/**")
.addResourceLocations("/webRS/");
}
#Bean
public ViewResolver viewResolver() {
InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
viewResolver.setViewClass(JstlView.class);
viewResolver.setPrefix("/main/");
viewResolver.setSuffix(".jsp");
return viewResolver;
}
}
also i had persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1"
xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
<persistence-unit name="dalmiaCSA" transaction-type="JTA">
<description>Persistence Unit for CSA Database</description>
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<jta-data-source>java:jboss/datasources/dalmiaCSA</jta-data-source>
<class>com.dalmiacsa.persist.entity.CompanyMaster</class>
<properties>
<property
name="javax.persistence.schema-generation.create-database-schemas"
value="true" />
<property name="javax.persistence.schema-generation.database.action"
value="none" />
<property name="hibernate.show_sql" value="false"></property>
<property name="hibernate.format_sql" value="false"></property>
<property name="use_sql_comments" value="false" />
<!-- <property name="hibernate.archive.autodetection" value="class"></property> -->
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect"></property>
<!-- Hibernate Envers -->
<property name="hibernate.auditable" value="true" />
</properties>
</persistence-unit>
</persistence>
also service class
#Repository
#Transactional(readOnly = false)
public class CrudServiceImpl implements CrudService {
#PersistenceContext(unitName = "dalmiaCSA")
EntityManager entityManager;
#Override
public <T> T create(T t) {
try {
this.entityManager.persist(t);
this.entityManager.flush();
this.entityManager.refresh(t);
} catch (Exception e) {
e.printStackTrace();
}
return t;
}
}
when i persist the entity i give error TARGETINVOCATIONEXCEPTION .my datasource is on wildfly server
full stack trace of error is
16:26:37,553 ERROR [stderr] (default task-4) java.lang.NullPointerException
16:26:37,585 ERROR [stderr] (default task-4) at org.hibernate.engine.transaction.internal.jta.JtaStatusHelper.getStatus(JtaStatusHelper.java:76)
16:26:37,585 ERROR [stderr] (default task-4) at org.hibernate.engine.transaction.internal.jta.JtaStatusHelper.isActive(JtaStatusHelper.java:118)
16:26:37,585 ERROR [stderr] (default task-4) at org.hibernate.engine.transaction.internal.jta.CMTTransaction.join(CMTTransaction.java:149)
16:26:37,589 ERROR [stderr] (default task-4) at org.hibernate.jpa.spi.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:1602)
16:26:37,589 ERROR [stderr] (default task-4) at org.hibernate.jpa.spi.AbstractEntityManagerImpl.postInit(AbstractEntityManagerImpl.java:210)
16:26:37,589 ERROR [stderr] (default task-4) at org.hibernate.jpa.internal.EntityManagerImpl.<init>(EntityManagerImpl.java:91)
16:26:37,593 ERROR [stderr] (default task-4) at org.hibernate.jpa.internal.EntityManagerFactoryImpl.internalCreateEntityManager(EntityManagerFactoryImpl.java:345)
16:26:37,613 ERROR [stderr] (default task-4) at org.hibernate.jpa.internal.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:313)
16:26:37,621 ERROR [stderr] (default task-4) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
16:26:37,621 ERROR [stderr] (default task-4) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
16:26:37,625 ERROR [stderr] (default task-4) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
16:26:37,625 ERROR [stderr] (default task-4) at java.lang.reflect.Method.invoke(Method.java:497)
16:26:37,625 ERROR [stderr] (default task-4) at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.invokeProxyMethod(AbstractEntityManagerFactoryBean.java:376)
16:26:37,629 ERROR [stderr] (default task-4) at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean$ManagedEntityManagerFactoryInvocationHandler.invoke(AbstractEntityManagerFactoryBean.java:517)
16:26:37,629 ERROR [stderr] (default task-4) at com.sun.proxy.$Proxy58.createEntityManager(Unknown Source)
16:26:37,633 ERROR [stderr] (default task-4) at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:234)
16:26:37,633 ERROR [stderr] (default task-4) at com.sun.proxy.$Proxy61.persist(Unknown Source)
16:26:37,633 ERROR [stderr] (default task-4) at com.dalmiacsa.service.impl.CrudServiceImpl.create(CrudServiceImpl.java:29)
16:26:37,637 ERROR [stderr] (default task-4) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
16:26:37,637 ERROR [stderr] (default task-4) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
16:26:37,637 ERROR [stderr] (default task-4) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
16:26:37,637 ERROR [stderr] (default task-4) at java.lang.reflect.Method.invoke(Method.java:497)
16:26:37,641 ERROR [stderr] (default task-4) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
16:26:37,641 ERROR [stderr] (default task-4) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
16:26:37,641 ERROR [stderr] (default task-4) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
16:26:37,641 ERROR [stderr] (default task-4) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155)
16:26:37,645 ERROR [stderr] (default task-4) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
16:26:37,645 ERROR [stderr] (default task-4) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155)
16:26:37,649 ERROR [stderr] (default task-4) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
16:26:37,649 ERROR [stderr] (default task-4) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
16:26:37,653 ERROR [stderr] (default task-4) at com.sun.proxy.$Proxy64.create(Unknown Source)
16:26:37,653 ERROR [stderr] (default task-4) at com.dalmiacsa.service.impl.CompanyManagerImpl.addCompany(CompanyManagerImpl.java:61)
16:26:37,653 ERROR [stderr] (default task-4) at com.dalmiacsa.control.MainController.googleLogin(MainController.java:44)
16:26:37,653 ERROR [stderr] (default task-4) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
16:26:37,657 ERROR [stderr] (default task-4) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
16:26:37,657 ERROR [stderr] (default task-4) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
16:26:37,657 ERROR [stderr] (default task-4) at java.lang.reflect.Method.invoke(Method.java:497)
16:26:37,657 ERROR [stderr] (default task-4) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
16:26:37,677 ERROR [stderr] (default task-4) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
16:26:37,677 ERROR [stderr] (default task-4) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
16:26:37,681 ERROR [stderr] (default task-4) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776)
16:26:37,689 ERROR [stderr] (default task-4) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705)
16:26:37,709 ERROR [stderr] (default task-4) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
16:26:37,713 ERROR [stderr] (default task-4) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
16:26:37,713 ERROR [stderr] (default task-4) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
16:26:37,713 ERROR [stderr] (default task-4) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
16:26:37,721 ERROR [stderr] (default task-4) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857)
16:26:37,721 ERROR [stderr] (default task-4) at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
16:26:37,721 ERROR [stderr] (default task-4) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
16:26:37,721 ERROR [stderr] (default task-4) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
16:26:37,725 ERROR [stderr] (default task-4) at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:86)
16:26:37,725 ERROR [stderr] (default task-4) at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
16:26:37,725 ERROR [stderr] (default task-4) at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
16:26:37,737 ERROR [stderr] (default task-4) at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
16:26:37,737 ERROR [stderr] (default task-4) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
16:26:37,737 ERROR [stderr] (default task-4) at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
16:26:37,737 ERROR [stderr] (default task-4) at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
16:26:37,737 ERROR [stderr] (default task-4) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
16:26:37,737 ERROR [stderr] (default task-4) at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
16:26:37,741 ERROR [stderr] (default task-4) at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
16:26:37,741 ERROR [stderr] (default task-4) at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58)
16:26:37,745 ERROR [stderr] (default task-4) at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:72)
16:26:37,749 ERROR [stderr] (default task-4) at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
16:26:37,749 ERROR [stderr] (default task-4) at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76)
16:26:37,757 ERROR [stderr] (default task-4) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
16:26:37,799 ERROR [stderr] (default task-4) at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
16:26:37,801 ERROR [stderr] (default task-4) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
16:26:37,801 ERROR [stderr] (default task-4) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
16:26:37,802 ERROR [stderr] (default task-4) at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:282)
16:26:37,803 ERROR [stderr] (default task-4) at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:261)
16:26:37,804 ERROR [stderr] (default task-4) at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:80)
16:26:37,804 ERROR [stderr] (default task-4) at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:172)
16:26:37,805 ERROR [stderr] (default task-4) at io.undertow.server.Connectors.executeRootHandler(Connectors.java:199)
16:26:37,806 ERROR [stderr] (default task-4) at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:774)
16:26:37,807 ERROR [stderr] (default task-4) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
16:26:37,808 ERROR [stderr] (default task-4) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
16:26:37,809 ERROR [stderr] (default task-4) at java.lang.Thread.run(Thread.java:745)
I think your problem is related to this, you are not using or don't see it at least a spcification for the property hibernate.transaction.jta.platform, can you try filling this property on your persistence configuration.

Error in Deserializing customized Stanford ner model

I had created my own NER model. While using that I got the following exception:
Error deserializing ../classifiers/ner-model.ser.gz.
Error snipet is:
Loading classifier from .../classifiers/ner-model.ser.gz ... Error deserializing /home/hrudya/Music/WORKSPACE_SAP/NER/classifiers/ner-model.ser.gz
Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.lang.RuntimeException: java.lang.ClassCastException: java.lang.Integer cannot be cast to edu.stanford.nlp.sequences.FeatureFactory
at edu.stanford.nlp.ie.AbstractSequenceClassifier.loadClassifierNoExceptions(AbstractSequenceClassifier.java:1752)
at edu.stanford.nlp.ie.AbstractSequenceClassifier.loadClassifierNoExceptions(AbstractSequenceClassifier.java:1703)
at edu.stanford.nlp.ie.AbstractSequenceClassifier.loadClassifierNoExceptions(AbstractSequenceClassifier.java:1686)
at edu.stanford.nlp.ie.crf.CRFClassifier.getClassifierNoExceptions(CRFClassifier.java:2825)
at accs.sap.NER.Test.<clinit>(Test.java:29)
Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to edu.stanford.nlp.sequences.FeatureFactory
at edu.stanford.nlp.ie.crf.CRFClassifier.loadClassifier(CRFClassifier.java:2606)
at edu.stanford.nlp.ie.AbstractSequenceClassifier.loadClassifier(AbstractSequenceClassifier.java:1622)
at edu.stanford.nlp.ie.AbstractSequenceClassifier.loadClassifier(AbstractSequenceClassifier.java:1738)
at edu.stanford.nlp.ie.AbstractSequenceClassifier.loadClassifierNoExceptions(AbstractSequenceClassifier.java:1749)
... 4 more

VerifyError using Jersey Client

I have a problem with using the Jersey Client
I am using jersey-bundle-1.17.1.jar
When i try to create a Client i throw at Runtime.
Client c = Client.create();
logcat:
01-29 12:46:52.578 13862-13862/com.example.spar.navigationdrawer E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.spar.navigationdrawer, PID: 13862
java.lang.VerifyError: com/sun/jersey/core/impl/provider/entity/MimeMultipartProvider
at java.lang.Class.getDeclaredConstructors(Native Method)
at java.lang.Class.getConstructors(Class.java:508)
at com.sun.jersey.core.spi.component.ComponentConstructor.getInstance(ComponentConstructor.java:174)
at com.sun.jersey.core.spi.component.ProviderFactory.__getComponentProvider(ProviderFactory.java:166)
at com.sun.jersey.core.spi.component.ProviderFactory.getComponentProvider(ProviderFactory.java:137)
at com.sun.jersey.core.spi.component.ProviderServices.getComponent(ProviderServices.java:256)
at com.sun.jersey.core.spi.component.ProviderServices.getServices(ProviderServices.java:160)
at com.sun.jersey.core.spi.factory.MessageBodyFactory.initReaders(MessageBodyFactory.java:176)
at com.sun.jersey.core.spi.factory.MessageBodyFactory.init(MessageBodyFactory.java:162)
at com.sun.jersey.api.client.Client.init(Client.java:342)
at com.sun.jersey.api.client.Client.access$000(Client.java:118)
at com.sun.jersey.api.client.Client$1.f(Client.java:191)
at com.sun.jersey.api.client.Client$1.f(Client.java:187)
at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
at com.sun.jersey.api.client.Client.<init>(Client.java:187)
at com.sun.jersey.api.client.Client.<init>(Client.java:159)
at com.sun.jersey.api.client.Client.create(Client.java:669)
at com.example.spar.navigationdrawer.client.ArticleClient.getArticles(ArticleClient.java:38)
at com.example.spar.navigationdrawer.MyActivity.<init>(MyActivity.java:72)
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1208)
at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2122)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2271)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1205)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5146)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:732)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:566)
at dalvik.system.NativeStart.main(Native Method)

0 Spring Hibernate-sessionfactory is null while trying to save employee object

Getting following error when trying to save the Employee object. Kindly help.
[stdout] (http-localhost-127.0.0.1-8082-1)
20:26:06,296 INFO [stdout] (http-localhost-127.0.0.1-8082-1)
com.javapapers.spring.Employee#1ee17a5
20:26:06,315 ERROR [stderr] (http-localhost-127.0.0.1-8082-1)
java.lang.NullPointerException
20:26:06,317 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
com.javapapers.spring.EmployeeDAOImpl.saveEmployee(EmployeeDAOImpl.java:17)
20:26:06,319 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
com.javapapers.spring.EmployeeController.employee(EmployeeController.java:41)
20:26:06,321 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
20:26:06,323 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
20:26:06,324 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
20:26:06,325 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
java.lang.reflect.Method.invoke(Unknown Source)
20:26:06,326 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:185)
20:26:06,326 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:126)
20:26:06,327 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:100)
20:26:06,328 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:502)
20:26:06,328 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:465)
20:26:06,329 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
20:26:06,330 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:863)
20:26:06,330 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792)
20:26:06,331 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:851)
20:26:06,332 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:756)
20:26:06,333 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
20:26:06,333 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
20:26:06,334 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
20:26:06,334 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
20:26:06,335 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
20:26:06,335 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
20:26:06,336 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
20:26:06,337 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
20:26:06,337 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
20:26:06,338 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
20:26:06,338 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
20:26:06,339 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
20:26:06,339 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
20:26:06,340 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
20:26:06,341 ERROR [stderr] (http-localhost-127.0.0.1-8082-1) at
java.lang.Thread.run(Unknown Source)

Resources