Java多线程系列——Lock类解析

JVM提供了synchronized关键字来实现对变量的同步访问以及用wait和notify来实现线程间通信。在jdk1.5以后,JAVA提供了Lock类来实现和synchronized一样的功能,并且还提供了Condition来显示线程间通信。

阅读更多

Java多线程系列——volatile关键字

一:volatite 简述

Java 语言提供了一种稍弱的同步机制,即 volatile 变量.用来确保将变量的更新操作通知到其他线程,保证了新值能立即同步到主内存,以及每次使用前立即从主内存刷新. 当把变量声明为volatile类型后,编译器与运行时都会注意到这个变量是共享的.

阅读更多

Java多线程系列——原子类的实现(CAS算法)

  Java提供的原子类是靠 sun 基于 CAS 实现的,CAS 是一种乐观锁。关于乐观锁与悲观锁

阅读更多

乐观锁与悲观锁

乐观锁

  乐观锁(Optimistic Lock), 顾名思义,就是很乐观,每次去拿数据的时候都认为别人不会修改,所以不会上锁,但是在更新的时候会判断一下在此期间别人有没有去更新这个数据,可以使用版本号等机制。乐观锁适用于多读的应用类型,这样可以提高吞吐量,像数据库如果提供类似于write_condition机制的其实都是提供的乐观锁。
  CAS便是乐观锁技术,当多个线程尝试使用CAS同时更新同一个变量时,只有其中一个线程能更新变量的值,而其它线程都失败,失败的线程并不会被挂起,而是被告知这次竞争中失败,并可以再次尝试。
  CAS有3个操作数,内存值V,旧的预期值A,要修改的新值B。当且仅当预期值A和内存值V相同时,将内存值V修改为B,否则什么都不做。

阅读更多

Spring源码学习--Bean的生命周期

Spring作为当前Java最流行、最强大的轻量级框架,受到了程序员的热烈欢迎。准确的了解Spring Bean的生命周期是非常必要的。我们通常使用ApplicationContext作为Spring容器。这里,我们讲的也是 ApplicationContext中Bean的生命周期。而实际上BeanFactory也是差不多的,只不过处理器需要手动注册。

阅读更多

如何显示或者隐藏Ext.grid.Panel

最近做项目遇到一个问题,如图所示,需要动态隐藏这个gridPanel,
1

阅读更多

springMVC通过Filter实现防止xss注入

跨站脚本工具(cross 斯特scripting),为不和层叠样式表(cascading style sheets,CSS)的缩写混淆,故将跨站脚本攻击缩写为XSS。恶意攻击者往web页面里插入恶意scriptScript代码,当用户浏览该页之时,嵌入其中Web里面的Script代码会被执行,从而达到恶意攻击用户的目的。防止XSS攻击简单的预防就是对Request请求中的一些参数去掉一些比较敏感的脚本命令。

阅读更多

Caused by: java.sql.SQLSyntaxErrorException: ORA-00932: 数据类型不一致: 应为 -, 但却获得 CLOB

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00932: 数据类型不一致: 应为 -, 但却获得 CLOB
Error Code: 932
Call: SELECT * FROM (SELECT a.*, ROWNUM rnum FROM (SELECT DISTINCT t0.PRICEINQUIRYID AS a1, t0.CLIENTCODE AS a2, t0.COSTPRICEQUO AS a3, t0.CREATETIME AS a4, t0.CREATEUSERID AS a5, t0.CREATEUSERNAME AS a6, t0.ENDTIME AS a7, t0.INQUIRYREQUIRE AS a8, t0.MODIFYTIME AS a9, t0.MODIFYUSERID AS a10, t0.MODIFYUSERNAME AS a11, t0.MROPRICEINQUIRYSTATE AS a12, t0.PRICEINQUIRYNO AS a13, t0.PRICEINQUIRYTITLE AS a14, t0.PRICEQUOTETEMPLATE AS a15, t0.PRICEQUOTETYPE AS a16, t0.PURCHASINGGROUPCODE AS a17, t0.PURCHASINGGROUPNAME AS a18, t0.PURCHASINGORGCODE AS a19, t0.PURCHASINGORGNAME AS a20, t0.STARTTIME AS a21 FROM d_xbj_mro_priceInquiry t0, d_xbj_mro_priceinquiryvendor t1 WHERE ((t1.MROPRICEINQUIRYVENDORSTATE = ?) AND (t1.priceInquiryId = t0.PRICEINQUIRYID)) ORDER BY t0.PRICEINQUIRYID DESC) a WHERE ROWNUM <= ?) WHERE rnum > ?
bind => [0, 20, 0]
Query: ReadAllQuery(referenceClass=MroPriceInquiry sql="SELECT * FROM (SELECT a.*, ROWNUM rnum FROM (SELECT DISTINCT t0.PRICEINQUIRYID AS a1, t0.CLIENTCODE AS a2, t0.COSTPRICEQUO AS a3, t0.CREATETIME AS a4, t0.CREATEUSERID AS a5, t0.CREATEUSERNAME AS a6, t0.ENDTIME AS a7, t0.INQUIRYREQUIRE AS a8, t0.MODIFYTIME AS a9, t0.MODIFYUSERID AS a10, t0.MODIFYUSERNAME AS a11, t0.MROPRICEINQUIRYSTATE AS a12, t0.PRICEINQUIRYNO AS a13, t0.PRICEINQUIRYTITLE AS a14, t0.PRICEQUOTETEMPLATE AS a15, t0.PRICEQUOTETYPE AS a16, t0.PURCHASINGGROUPCODE AS a17, t0.PURCHASINGGROUPNAME AS a18, t0.PURCHASINGORGCODE AS a19, t0.PURCHASINGORGNAME AS a20, t0.STARTTIME AS a21 FROM d_xbj_mro_priceInquiry t0, d_xbj_mro_priceinquiryvendor t1 WHERE ((t1.MROPRICEINQUIRYVENDORSTATE = ?) AND (t1.priceInquiryId = t0.PRICEINQUIRYID)) ORDER BY t0.PRICEINQUIRYID DESC) a WHERE ROWNUM <= ?) WHERE rnum > ?")
[ERROR] DefaultDispatcherErrorHandler.error(CommonsLogger.java:42) - Exception occurred during processing request: EJB Exception:
javax.ejb.EJBTransactionRolledbackException: EJB Exception:
at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:452)
at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:251)
at weblogic.ejb.container.internal.BaseLocalObject.__WL_postInvokeTxRetry(BaseLocalObject.java:204)
at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:46)
at com.huiju.srm.e.ss.mro.inquiryquotation.eao.MroPriceInquiryEaoBean_jugebu_MroPriceInquiryEaoLocalImpl.findAll(Unknown Source)
at com.huiju.module.data.logic.GenericLogicImpl.findAll(GenericLogicImpl.java:122)
at sun.reflect.GeneratedMethodAccessor2231.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.oracle.pitchfork.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:100)
at com.oracle.pitchfork.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:117)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(Unknown Source)
at com.sun.proxy.$Proxy537.findAll(Unknown Source)
at com.huiju.srm.e.ss.mro.inquiryquotation.logic.MroPriceInquiryBean_ra0lj4_MroPriceInquiryRemoteImpl.__WL_invoke(Unknown Source)
at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:34)
at com.huiju.srm.e.ss.mro.inquiryquotation.logic.MroPriceInquiryBean_ra0lj4_MroPriceInquiryRemoteImpl.findAll(Unknown Source)
at com.huiju.srm.e.ss.mro.inquiryquotation.logic.MroPriceInquiryBean_ra0lj4_MroPriceInquiryRemoteImpl_CBV.findAll(Unknown Source)
at sun.reflect.GeneratedMethodAccessor2887.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:498)
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:84)
at com.sun.proxy.$Proxy342.findAll(Unknown Source)
at com.huiju.srm.e.ss.mro.inquiryquotation.action.MroPriceInquiryAction.getJson(MroPriceInquiryAction.java:140)
at sun.reflect.GeneratedMethodAccessor3818.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:498)
at ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:897)
at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1299)
at ognl.ObjectMethodAccessor.callMethod(ObjectMethodAccessor.java:68)
at com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethodWithDebugInfo(XWorkMethodAccessor.java:117)
at com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethod(XWorkMethodAccessor.java:108)
at ognl.OgnlRuntime.callMethod(OgnlRuntime.java:1375)
at ognl.ASTMethod.getValueBody(ASTMethod.java:91)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
at ognl.SimpleNode.getValue(SimpleNode.java:258)
at ognl.Ognl.getValue(Ognl.java:470)
at ognl.Ognl.getValue(Ognl.java:434)
at com.opensymphony.xwork2.ognl.OgnlUtil$3.execute(OgnlUtil.java:362)
at com.opensymphony.xwork2.ognl.OgnlUtil.compileAndExecuteMethod(OgnlUtil.java:414)
at com.opensymphony.xwork2.ognl.OgnlUtil.callMethod(OgnlUtil.java:360)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:430)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:290)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:251)
at com.huiju.srm.license.interceptor.LicenseInterceptor$1.proceed(LicenseInterceptor.java:85)
at com.huiju.module.license.interceptor.AbstractLicenseInterceptor.interceptor(AbstractLicenseInterceptor.java:48)
at com.huiju.srm.license.interceptor.LicenseInterceptor.intercept(LicenseInterceptor.java:45)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at com.huiju.module.web.interceptor.InvocationContextAdapter.proceed(InvocationContextAdapter.java:75)
at com.huiju.module.plugin.log.interceptor.AbstractLoggingInterceptor.aroundLogging(AbstractLoggingInterceptor.java:112)
at com.huiju.module.web.interceptor.LoggingInterceptor.intercept(LoggingInterceptor.java:45)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:168)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)
at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:76)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:253)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:73)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at org.apache.struts2.interceptor.DateTextFieldInterceptor.intercept(DateTextFieldInterceptor.java:125)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:140)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at org.apache.struts2.interceptor.MessageStoreInterceptor.intercept(MessageStoreInterceptor.java:206)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at com.huiju.module.web.interceptor.AuthorizationInterceptor.intercept(AuthorizationInterceptor.java:111)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:575)
at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at com.huiju.module.context.CurrentContextFilter.doFilter(CurrentContextFilter.java:49)
at com.huiju.module.web.filter.WebCurrentContextFilter.doFilter(WebCurrentContextFilter.java:61)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at com.huiju.module.web.filter.HttpContextWrapperFilter.doFilter(HttpContextWrapperFilter.java:37)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3436)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.__run(WebAppServletContext.java:3402)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2285)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2201)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1572)
at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:255)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00932: 数据类型不一致: 应为 -, 但却获得 CLOB
Error Code: 932
Call: SELECT * FROM (SELECT a.*, ROWNUM rnum FROM (SELECT DISTINCT t0.PRICEINQUIRYID AS a1, t0.CLIENTCODE AS a2, t0.COSTPRICEQUO AS a3, t0.CREATETIME AS a4, t0.CREATEUSERID AS a5, t0.CREATEUSERNAME AS a6, t0.ENDTIME AS a7, t0.INQUIRYREQUIRE AS a8, t0.MODIFYTIME AS a9, t0.MODIFYUSERID AS a10, t0.MODIFYUSERNAME AS a11, t0.MROPRICEINQUIRYSTATE AS a12, t0.PRICEINQUIRYNO AS a13, t0.PRICEINQUIRYTITLE AS a14, t0.PRICEQUOTETEMPLATE AS a15, t0.PRICEQUOTETYPE AS a16, t0.PURCHASINGGROUPCODE AS a17, t0.PURCHASINGGROUPNAME AS a18, t0.PURCHASINGORGCODE AS a19, t0.PURCHASINGORGNAME AS a20, t0.STARTTIME AS a21 FROM d_xbj_mro_priceInquiry t0, d_xbj_mro_priceinquiryvendor t1 WHERE ((t1.MROPRICEINQUIRYVENDORSTATE = ?) AND (t1.priceInquiryId = t0.PRICEINQUIRYID)) ORDER BY t0.PRICEINQUIRYID DESC) a WHERE ROWNUM <= ?) WHERE rnum > ?
bind => [0, 20, 0]
Query: ReadAllQuery(referenceClass=MroPriceInquiry sql="SELECT * FROM (SELECT a.*, ROWNUM rnum FROM (SELECT DISTINCT t0.PRICEINQUIRYID AS a1, t0.CLIENTCODE AS a2, t0.COSTPRICEQUO AS a3, t0.CREATETIME AS a4, t0.CREATEUSERID AS a5, t0.CREATEUSERNAME AS a6, t0.ENDTIME AS a7, t0.INQUIRYREQUIRE AS a8, t0.MODIFYTIME AS a9, t0.MODIFYUSERID AS a10, t0.MODIFYUSERNAME AS a11, t0.MROPRICEINQUIRYSTATE AS a12, t0.PRICEINQUIRYNO AS a13, t0.PRICEINQUIRYTITLE AS a14, t0.PRICEQUOTETEMPLATE AS a15, t0.PRICEQUOTETYPE AS a16, t0.PURCHASINGGROUPCODE AS a17, t0.PURCHASINGGROUPNAME AS a18, t0.PURCHASINGORGCODE AS a19, t0.PURCHASINGORGNAME AS a20, t0.STARTTIME AS a21 FROM d_xbj_mro_priceInquiry t0, d_xbj_mro_priceinquiryvendor t1 WHERE ((t1.MROPRICEINQUIRYVENDORSTATE = ?) AND (t1.priceInquiryId = t0.PRICEINQUIRYID)) ORDER BY t0.PRICEINQUIRYID DESC) a WHERE ROWNUM <= ?) WHERE rnum > ?")
at org.eclipse.persistence.internal.jpa.QueryImpl.getDetailedException(QueryImpl.java:378)
at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:260)
at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:469)
at com.huiju.module.data.eao.GenericEaoImpl.findAll(GenericEaoImpl.java:232)
at sun.reflect.GeneratedMethodAccessor2260.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.oracle.pitchfork.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:100)
at com.oracle.pitchfork.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:117)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(Unknown Source)
at com.sun.proxy.$Proxy540.findAll(Unknown Source)
at com.huiju.srm.e.ss.mro.inquiryquotation.eao.MroPriceInquiryEaoBean_jugebu_MroPriceInquiryEaoLocalImpl.__WL_invoke(Unknown Source)
at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:33)
... 121 more
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00932: 数据类型不一致: 应为 -, 但却获得 CLOB
Error Code: 932
Call: SELECT * FROM (SELECT a.*, ROWNUM rnum FROM (SELECT DISTINCT t0.PRICEINQUIRYID AS a1, t0.CLIENTCODE AS a2, t0.COSTPRICEQUO AS a3, t0.CREATETIME AS a4, t0.CREATEUSERID AS a5, t0.CREATEUSERNAME AS a6, t0.ENDTIME AS a7, t0.INQUIRYREQUIRE AS a8, t0.MODIFYTIME AS a9, t0.MODIFYUSERID AS a10, t0.MODIFYUSERNAME AS a11, t0.MROPRICEINQUIRYSTATE AS a12, t0.PRICEINQUIRYNO AS a13, t0.PRICEINQUIRYTITLE AS a14, t0.PRICEQUOTETEMPLATE AS a15, t0.PRICEQUOTETYPE AS a16, t0.PURCHASINGGROUPCODE AS a17, t0.PURCHASINGGROUPNAME AS a18, t0.PURCHASINGORGCODE AS a19, t0.PURCHASINGORGNAME AS a20, t0.STARTTIME AS a21 FROM d_xbj_mro_priceInquiry t0, d_xbj_mro_priceinquiryvendor t1 WHERE ((t1.MROPRICEINQUIRYVENDORSTATE = ?) AND (t1.priceInquiryId = t0.PRICEINQUIRYID)) ORDER BY t0.PRICEINQUIRYID DESC) a WHERE ROWNUM <= ?) WHERE rnum > ?
bind => [0, 20, 0]
Query: ReadAllQuery(referenceClass=MroPriceInquiry sql="SELECT * FROM (SELECT a.*, ROWNUM rnum FROM (SELECT DISTINCT t0.PRICEINQUIRYID AS a1, t0.CLIENTCODE AS a2, t0.COSTPRICEQUO AS a3, t0.CREATETIME AS a4, t0.CREATEUSERID AS a5, t0.CREATEUSERNAME AS a6, t0.ENDTIME AS a7, t0.INQUIRYREQUIRE AS a8, t0.MODIFYTIME AS a9, t0.MODIFYUSERID AS a10, t0.MODIFYUSERNAME AS a11, t0.MROPRICEINQUIRYSTATE AS a12, t0.PRICEINQUIRYNO AS a13, t0.PRICEINQUIRYTITLE AS a14, t0.PRICEQUOTETEMPLATE AS a15, t0.PRICEQUOTETYPE AS a16, t0.PURCHASINGGROUPCODE AS a17, t0.PURCHASINGGROUPNAME AS a18, t0.PURCHASINGORGCODE AS a19, t0.PURCHASINGORGNAME AS a20, t0.STARTTIME AS a21 FROM d_xbj_mro_priceInquiry t0, d_xbj_mro_priceinquiryvendor t1 WHERE ((t1.MROPRICEINQUIRYVENDORSTATE = ?) AND (t1.priceInquiryId = t0.PRICEINQUIRYID)) ORDER BY t0.PRICEINQUIRYID DESC) a WHERE ROWNUM <= ?) WHERE rnum > ?")
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:340)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:682)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:558)
at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2002)
at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:570)
at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:250)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:299)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:694)
at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2738)
at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2691)
at org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:495)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1168)
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:899)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1127)
at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:403)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1215)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1804)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1786)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1751)
at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:258)
... 138 more
Caused by: java.sql.SQLSyntaxErrorException: ORA-00932: 数据类型不一致: 应为 -, 但却获得 CLOB
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1059)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:522)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:257)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:587)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:225)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:53)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:774)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:925)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1111)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:4798)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:4845)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1501)
at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:141)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:1007)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:642)
... 159 more

阅读更多

JDK1.8源码解析——HashMap(二)

一:摘要

HashMap是Java程序员使用频率最高的用于映射(键值对)处理的数据类型。随着JDK(Java Developmet Kit)版本的更新,JDK1.8对HashMap底层的实现进行了优化,例如引入红黑树的数据结构和扩容的优化等。本文结合JDK1.7和JDK1.8的区别,深入探讨HashMap的结构实现和功能原理。

阅读更多

JDK1.8源码解析——HashMap(一)

一:HashMap概述

HashMap是基于哈希表的Map接口的非同步实现。此实现提供所有可选的映射操作,并允许使用null值和null键。此类不保证映射的顺序,特别是它不保证该顺序恒久不变。

阅读更多