what is the size of the collection you try to retrieve?
Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber <http://www.tomitribe.com> 2015-10-29 9:54 GMT+01:00 tgp <[email protected]>: > Hi again, > > Yesterday I tried to create the simple Maven application without success > (the application is too big), so, at this point, I think all I can do is to > show you this I’ve found debugging... I think the most probable cause is > some bad configuration I’ve done. > > The problem occurs in > org.apache.openjpa.jdbc.meta.strats.StoreCollectionFieldStrategy, in the > load method, in this block of code: > > // load values > Result res = union.execute(store, fetch); > try { > int seq = -1; > while (res.next()) { > if (ct != null && field.getOrderColumn() != null) > seq = res.getInt(field.getOrderColumn()); > setMappedBy(sm.getObjectId(), sm, coll, res); > add(store, coll, loadElement(sm, store, fetch, res, > resJoins[res.indexOf()])); > } > if (ct != null && field.getOrderColumn() != null) > ct.setNextSequence(seq + 1); > } finally { > res.close(); > } > > It nevers exits the while and thats why I finally get the Java Heap – > OutOfMemoryError. > > And this is the callstack: > > Daemon Thread [http-bio-8080-exec-10] (Suspended (breakpoint at line 580 in > StoreCollectionFieldStrategy)) > owns: SocketWrapper<E> (id=831) > > > RelationCollectionInverseKeyFieldStrategy(StoreCollectionFieldStrategy).load(OpenJPAStateManager, > JDBCStore, JDBCFetchConfiguration) line: 580 > FieldMapping.load(OpenJPAStateManager, JDBCStore, > JDBCFetchConfiguration) > line: 936 > JDBCStoreManager.load(OpenJPAStateManager, BitSet, > FetchConfiguration, int, > Object) line: 680 > ROPStoreManager(DelegatingStoreManager).load(OpenJPAStateManager, > BitSet, > FetchConfiguration, int, Object) line: 117 > ROPStoreManager.load(OpenJPAStateManager, BitSet, > FetchConfiguration, int, > Object) line: 78 > StateManagerImpl.loadFields(BitSet, FetchConfiguration, int, > Object) line: > 3145 > StateManagerImpl.loadField(int, int, boolean, boolean) line: 3225 > StateManagerImpl.beforeAccessField(int) line: 1690 > StateManagerImpl.accessingField(int) line: 1624 > ArticleSCHEMA.pcGetservices(ArticleSCHEMA) line: not available > ArticleSCHEMA.OpenEJB_addCmr(String, Object) line: not available > SingleValuedCmr<Bean,Proxy>.set(Bean, Proxy) line: 78 > ServiceSCHEMA.setArticle(ArticleLocal) line: not available > ServiceSCHEMA(ServiceBean).ejbPostCreate(String, String, Date, > StatutLocal, > ArticleLocal, ContactLocal, ClientLocal, String, String, String, > CodePostalLocal, String, PrestataireLocal, UtilisateurLocal, String, > BigDecimal, String, String, CentreLocal, Integer, Integer) line: 450 > NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: > not > available [native method] > NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 > DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 > Method.invoke(Object, Object...) line: 597 > CmpContainer.createEJBObject(Method, Object[], ThreadContext, > InterfaceType) line: 635 > CmpContainer.invoke(Object, InterfaceType, Class, Method, > Object[], Object) > line: 267 > EntityEjbHomeHandler(EjbHomeProxyHandler).create(Class, Method, > Object[], > Object) line: 384 > EntityEjbHomeHandler(EjbHomeProxyHandler)._invoke(Object, Class, > Method, > Object[]) line: 199 > EntityEjbHomeHandler(BaseEjbProxyHandler).invoke(Object, Method, > Object[]) > line: 322 > $Proxy173.create(String, String, Date, StatutLocal, ArticleLocal, > ContactLocal, ClientLocal, String, String, String, CodePostalLocal, String, > PrestataireLocal, UtilisateurLocal, String, BigDecimal, String, String, > CentreLocal, Integer, Integer) line: not available > > SouscriptionSession(SouscriptionBean).prendreRdvOuDiffere(ServiceVO, > UtilisateurVO) line: 771 > NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: > not > available [native method] > NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 > DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 > Method.invoke(Object, Object...) line: 597 > > > ReflectionInvocationContext$BeanInvocation(ReflectionInvocationContext$Invocation).invoke() > line: 192 > ReflectionInvocationContext.proceed() line: 173 > StatsInterceptor.record(InvocationContext, Method) line: 181 > StatsInterceptor.invoke(InvocationContext) line: 100 > NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: > not > available [native method] > NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 > DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 > Method.invoke(Object, Object...) line: 597 > > > ReflectionInvocationContext$InterceptorInvocation(ReflectionInvocationContext$Invocation).invoke() > line: 192 > ReflectionInvocationContext.proceed() line: 173 > InterceptorStack.invoke(Object...) line: 85 > StatelessContainer._invoke(Method, Method, Object[], Instance, > ThreadContext, InterfaceType) line: 227 > StatelessContainer.invoke(Object, InterfaceType, Class, Method, > Object[], > Object) line: 194 > > > StatelessEjbObjectHandler(EjbObjectProxyHandler).synchronizedBusinessMethod(Class<?>, > Method, Object[]) line: 308 > > StatelessEjbObjectHandler(EjbObjectProxyHandler).businessMethod(Class<?>, > Method, Object[], Object) line: 303 > StatelessEjbObjectHandler(EjbObjectProxyHandler)._invoke(Object, > Class, > Method, Object[]) line: 92 > StatelessEjbObjectHandler(BaseEjbProxyHandler).invoke(Object, > Method, > Object[]) line: 322 > $Proxy243.prendreRdvOuDiffere(ServiceVO, UtilisateurVO) line: not > available > SouscriptionDelegate.prendreRdvOuDiffere(ServiceVO, UtilisateurVO) > line: > 247 > CreationDiagGrDFAction.creation(ActionMapping, ActionForm, > HttpServletRequest, HttpServletResponse) line: 109 > NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: > not > available [native method] > NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 > DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 > Method.invoke(Object, Object...) line: 597 > > CreationDiagGrDFAction(DispatchAction).dispatchMethod(ActionMapping, > ActionForm, HttpServletRequest, HttpServletResponse, String) line: 266 > CreationDiagGrDFAction(BaseAction).execute(ActionMapping, > ActionForm, > HttpServletRequest, HttpServletResponse) line: 75 > ExecuteAction.execute(ActionContext, Action, ActionConfig, > ActionForm) > line: 53 > ExecuteAction(AbstractExecuteAction).execute(ActionContext) line: > 64 > ExecuteAction(ActionCommandBase).execute(Context) line: 48 > ChainBase.execute(Context) line: 190 > LookupCommand.execute(Context) line: 304 > ChainBase.execute(Context) line: 190 > ComposableRequestProcessor.process(HttpServletRequest, > HttpServletResponse) > line: 280 > ActionServlet.process(HttpServletRequest, HttpServletResponse) > line: 1858 > ActionServlet.doPost(HttpServletRequest, HttpServletResponse) > line: 459 > ActionServlet(HttpServlet).service(HttpServletRequest, > HttpServletResponse) > line: 650 > ActionServlet(HttpServlet).service(ServletRequest, > ServletResponse) line: > 731 > ApplicationFilterChain.internalDoFilter(ServletRequest, > ServletResponse) > line: 303 > ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) > line: 208 > LoginFilter.doFilter(ServletRequest, ServletResponse, FilterChain) > line: > 149 > ApplicationFilterChain.internalDoFilter(ServletRequest, > ServletResponse) > line: 241 > ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) > line: 208 > StandardWrapperValve.invoke(Request, Response) line: 220 > StandardContextValve.invoke(Request, Response) line: 122 > OpenEJBValve.invoke(Request, Response) line: 44 > NonLoginAuthenticator(AuthenticatorBase).invoke(Request, Response) > line: > 505 > StandardHostValve.invoke(Request, Response) line: 170 > ErrorReportValve.invoke(Request, Response) line: 103 > AccessLogValve.invoke(Request, Response) line: 957 > StandardEngineValve.invoke(Request, Response) line: 116 > CoyoteAdapter.service(Request, Response) line: 423 > > Http11Processor(AbstractHttp11Processor<S>).process(SocketWrapper<S>) line: > 1079 > > > Http11Protocol$Http11ConnectionHandler(AbstractProtocol$AbstractConnectionHandler<S,P>).process(SocketWrapper<S>, > SocketStatus) line: 620 > JIoEndpoint$SocketProcessor.run() line: 318 > ThreadPoolExecutor$Worker.runTask(Runnable) line: 895 > ThreadPoolExecutor$Worker.run() line: 918 > TaskThread$WrappingRunnable.run() line: 61 > TaskThread(Thread).run() line: 662 > > Thanks for everything, > > Tomás > > > > > -- > View this message in context: > http://tomee-openejb.979440.n4.nabble.com/Problem-with-Tomee-on-ejbPostCreate-method-OutOfMemoryError-tp4676642p4676647.html > Sent from the TomEE Users mailing list archive at Nabble.com. >
