p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional Java for Web Applications (http://p2p.wrox.com/forumdisplay.php?f=765)
-   -   Ch28 CustomerSupport InvalidDataAccessApiUsageException (http://p2p.wrox.com/showthread.php?t=92757)

mistre83 April 28th, 2014 07:58 AM

Ch28 CustomerSupport InvalidDataAccessApiUsageException
 
Hi to all,
while running Ch28 Customer support and after creating a ticket i got this error:

HTTP Status 500 - Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessApiUsageE xception: org.hibernate.TransientPropertyValueException: Not-null property references a transient value - transient instance must be saved before current operation : com.wrox.site.entities.Ticket.customer -> com.wrox.site.entities.UserPrincipal; nested exception is java.lang.IllegalStateException: org.hibernate.TransientPropertyValueException: Not-null property references a transient value - transient instance must be saved before current operation : com.wrox.site.entities.Ticket.customer -> com.wrox.site.entities.UserPrincipal

Someone know how to solve this?

beamerblvd June 11th, 2014 11:24 PM

That's very odd. I do not get this error. Can you please post the complete stacktrace(s)? Can you also post the full Java and Tomcat versions you are using, and let me know if you have updated the Maven dependency versions from those that ship in the pom file?

philrod January 27th, 2015 10:33 AM

RE: Ch28 CustomerSupport InvalidDataAccessApiUsageException
 
Hi, I have the exact same problem did you manage to solve it ??

philrod February 12th, 2015 09:42 AM

Are you still listening to this thread ?
If so, did you solve this pb, i've got the same ?
It's a very useful book for me, thank you

mistre83 February 12th, 2015 09:59 AM

i'm sorry but i havent find any solutions :(

barbelou February 22nd, 2018 12:53 AM

Same issue
 
Does anyone have a solution with mistre83 problem I am having the same problem, any help will be appreciated.


21-Feb-2018 22:35:15.498 INFO [http-nio-8080-exec-14] org.apache.catalina.core.StandardContext.reload Reloading Context with name [/customer-support] is completed
22:36:13.725 [task-1] ERROR com.wrox.config.RootContextConfiguration.[scheduling] - Unknown error occurred while executing task.
org.springframework.dao.InvalidDataAccessApiUsageE xception: Name for parameter binding must not be null or empty! For named parameters you need to use @Param for query method parameters on Java versions < 8.; nested exception is java.lang.IllegalArgumentException: Name for parameter binding must not be null or empty! For named parameters you need to use @Param for query method parameters on Java versions < 8.
at org.springframework.orm.jpa.EntityManagerFactoryUt ils.convertJpaAccessExceptionIfPossible(EntityMana gerFactoryUtils.java:384) ~[spring-orm-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.orm.jpa.vendor.HibernateJpaDia lect.translateExceptionIfPossible(HibernateJpaDial ect.java:157) ~[spring-orm-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.orm.jpa.AbstractEntityManagerF actoryBean.translateExceptionIfPossible(AbstractEn tityManagerFactoryBean.java:417) ~[spring-orm-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.dao.support.ChainedPersistence ExceptionTranslator.translateExceptionIfPossible(C hainedPersistenceExceptionTranslator.java:59) ~[spring-tx-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.dao.support.DataAccessUtils.tr anslateIfNecessary(DataAccessUtils.java:213) ~[spring-tx-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.dao.support.PersistenceExcepti onTranslationInterceptor.invoke(PersistenceExcepti onTranslationInterceptor.java:147) ~[spring-tx-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :179) ~[spring-aop-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.data.jpa.repository.support.Lo ckModeRepositoryPostProcessor$LockModePopulatingMe thodIntercceptor.invoke(LockModeRepositoryPostProc essor.java:105) ~[spring-data-jpa-1.5.3.RELEASE.jar:?]
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :179) ~[spring-aop-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.aop.interceptor.ExposeInvocati onInterceptor.invoke(ExposeInvocationInterceptor.j ava:92) ~[spring-aop-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :179) ~[spring-aop-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:207) ~[spring-aop-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at com.sun.proxy.$Proxy358.deleteWhereTimestampLessTh an(Unknown Source) ~[?:?]
at com.wrox.site.DefaultOAuthNonceServices.deleteOldN onces(DefaultOAuthNonceServices.java:30) ~[classes/:?]
at com.wrox.site.DefaultOAuthNonceServices$$FastClass BySpringCGLIB$$6c42f34d.invoke(<generated>) ~[spring-core-4.0.6.RELEASE.jar:?]
at org.springframework.cglib.proxy.MethodProxy.invoke (MethodProxy.java:204) ~[spring-core-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$Cg libMethodInvocation.invokeJoinpoint(CglibAopProxy. java:708) ~[spring-aop-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :157) ~[spring-aop-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.transaction.interceptor.Transa ctionInterceptor$1.proceedWithInvocation(Transacti onInterceptor.java:98) ~[spring-tx-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.transaction.interceptor.Transa ctionAspectSupport.invokeWithinTransaction(Transac tionAspectSupport.java:262) ~[spring-tx-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:95) ~[spring-tx-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :179) ~[spring-aop-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$Dy namicAdvisedInterceptor.intercept(CglibAopProxy.ja va:644) ~[spring-aop-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at com.wrox.site.DefaultOAuthNonceServices$$EnhancerB ySpringCGLIB$$8e9e1278.deleteOldNonces(<generated> ) ~[spring-core-4.0.6.RELEASE.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) ~[?:1.8.0_162]
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:62) ~[?:1.8.0_162]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43) ~[?:1.8.0_162]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_162]
at org.springframework.scheduling.support.ScheduledMe thodRunnable.run(ScheduledMethodRunnable.java:65) ~[spring-context-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.scheduling.support.DelegatingE rrorHandlingRunnable.run(DelegatingErrorHandlingRu nnable.java:54) [spring-context-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at java.util.concurrent.Executors$RunnableAdapter.cal l(Executors.java:511) [?:1.8.0_162]


All times are GMT -4. The time now is 01:41 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.