spring mvc - hsql from webapp springmvc jpa hibernate -
i have hsql server using swing manager can retrieve data fine. jdbc:hsqldb:hsql://localhost:1234/securityweb
i have dao using jpa , when run main method standalone can retrieve same data fine.
when use dao using jpa springmvc same methods called on dao , see in logs same query being executed not retrieve data.
is there setting needed when use jpa via springmvc.
here springmvc log tomcat:
17:21:35,668 debug requestmappinghandlermapping:226 - looking handler method path /user/9869002979/19.1/73.1 17:21:35,668 debug requestmappinghandlermapping:233 - returning handler method [ public java.util.list<com.ril.jio.mhood.securityjpa.userlocation> com.ril.jio.mh ood.service.securityservice.findlocations(java.lang.string,double,double)] 17:21:35,668 debug defaultlistablebeanfactory:246 - returning cached instance of singleton bean 'securityservice' 17:21:35,668 debug dispatcherservlet:912 - last-modified value [/security/us er/9869002979/19.1/73.1] is: -1 17:21:35,668 debug securityservice:42 - findlocations: phone=9869002979 latitude =19.100000 longitude=73.000000 17:21:35,683 info loghelper:46 - hhh000204: processing persistenceunitinfo [ name: securityjpapu ...] 17:21:35,699 info drivermanagerconnectionproviderimpl:100 - hhh000402: using hi bernate built-in connection pool (not production use!) 17:21:35,699 info drivermanagerconnectionproviderimpl:137 - hhh000115: hibernat e connection pool size: 20 17:21:35,699 info drivermanagerconnectionproviderimpl:140 - hhh000006: autocomm mode: false 17:21:35,699 info drivermanagerconnectionproviderimpl:156 - hhh000401: using dr iver [org.hsqldb.jdbcdriver] @ url [jdbc:hsqldb:hsql://localhost:1234/securityw eb] 17:21:35,699 info drivermanagerconnectionproviderimpl:162 - hhh000046: connecti on properties: {user=sa, password=****} 17:21:35,824 info dialect:140 - hhh000400: using dialect: org.hibernate.dialect .hsqldialect 17:21:35,824 info astquerytranslatorfactory:48 - hhh000397: using astquerytrans latorfactory 17:21:35,886 warn entitymanagerfactoryregistry:80 - hhh000436: entity manager f actory name (securityjpapu) registered. if entity manager cl ustered or passivated, specify unique value property 'hibernate.ejb.entity manager_factory_name' hibernate: select userlocati0_.phonenumber phonenum1_0_, userlocati0_.lasttouched lasttouc2_0_, userlocati0_.latitude latitude3_0_, userlocati0_.longitude longitud4_0_ public.userlocation userlocati0_ userlocati0_.phonenumber<>? , ( userlocati0_.latitude between 9.100000000000001 , 29.1 ) , ( userlocati0_.longitude between 63.0 , 83.0 ) order userlocati0_.lasttouched desc size: 0 size: 0 17:21:35,933 debug requestresponsebodymethodprocessor:150 - written [[]] "app lication/json;charset=utf-8" using [org.springframework.http.converter.json.mapp ingjacksonhttpmessageconverter@1013dc8] 17:21:35,933 debug dispatcherservlet:999 - null modelandview returned dispatc herservlet name 'mvc-dispatcher': assuming handleradapter completed request handling 17:21:35,933 debug dispatcherservlet:966 - completed request here similar log standalone dao run:
16:59:31,107 debug logging:54 - logging provider: org.jboss.logging.log4jloggerprovider 16:59:31,201 info loghelper:46 - hhh000204: processing persistenceunitinfo [ name: securityjpapu ...] 16:59:31,264 info version:54 - hhh000412: hibernate core {4.3.0.beta2} 16:59:31,264 info environment:239 - hhh000206: hibernate.properties not found 16:59:31,264 info environment:342 - hhh000021: bytecode provider name : javassist 16:59:31,420 info version:37 - hcann000001: hibernate commons annotations {4.0.1.final} 16:59:31,451 info drivermanagerconnectionproviderimpl:100 - hhh000402: using hibernate built-in connection pool (not production use!) 16:59:31,451 info drivermanagerconnectionproviderimpl:137 - hhh000115: hibernate connection pool size: 20 16:59:31,451 info drivermanagerconnectionproviderimpl:140 - hhh000006: autocommit mode: false 16:59:31,451 info drivermanagerconnectionproviderimpl:156 - hhh000401: using driver [org.hsqldb.jdbcdriver] @ url [jdbc:hsqldb:hsql://localhost:1234/securityweb] 16:59:31,451 info drivermanagerconnectionproviderimpl:162 - hhh000046: connection properties: {user=sa, password=****} 16:59:31,669 info dialect:140 - hhh000400: using dialect: org.hibernate.dialect.hsqldialect 16:59:31,810 info astquerytranslatorfactory:48 - hhh000397: using astquerytranslatorfactory hibernate: select userlocati0_.phonenumber phonenum1_0_, userlocati0_.lasttouched lasttouc2_0_, userlocati0_.latitude latitude3_0_, userlocati0_.longitude longitud4_0_ public.userlocation userlocati0_ userlocati0_.phonenumber<>? , ( userlocati0_.latitude between 9.100000000000001 , 29.1 ) , ( userlocati0_.longitude between 63.099999999999994 , 83.1 ) order userlocati0_.lasttouched desc com.ril.jio.mhood.securityjpa.userlocation[ phonenumber=9004060416 latitude=29.100000 longitude=83.100000 timestamp=2013-05-15 15:17:46.972 size: 1 size: 1 regards,
miten.
i realized double values in clauses used between checks issue. minute differences causing resultset differences. please consider question error on user end on understanding of how double related decimals causes issues , if needed close/delete question. miten.
Comments
Post a Comment