简体   繁体   中英

jboss throws out of memory: heap space while running in intellij idea but not when running in eclipse

Up until a merge of a branch into trunk earlier this week which updated a large portion of the common code, my IntelliJ IDEA JBOSS configuration was working fine. Now when the application runs a query that returns a large amount of data, I'm getting the following error:

java.lang.OutOfMemoryError: Java heap space
at oracle.jdbc.driver.PhysicalConnection.getCharBuffer(PhysicalConnection.java:7018)
at oracle.jdbc.driver.OracleStatement.prepareAccessors(OracleStatement.java:907)
at oracle.jdbc.driver.T4CTTIdcb.receiveCommon(T4CTTIdcb.java:261)
at oracle.jdbc.driver.T4CTTIdcb.receive(T4CTTIdcb.java:127)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:992)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:791)
at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
at oracle.jdbc.driver.OracleStatement.doScrollExecuteCommon(OracleStatement.java:4219)
at oracle.jdbc.driver.OraclePreparedStatement.doScrollPstmtExecuteUpdate(OraclePreparedStatement.java:9517)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3385)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3431)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:342)

Oddly enough, this seems very specific to querying oracle and returning large amounts of data. I've tried anything I could find regarding increasing the heap size to alleviate the issue, but even setting the max for the application in the VM options to 4GB and the max for the IDE to 8GB does nothing.

Most of our team uses Eclipse as an IDE and haven't seen this issue pop up, so I downloaded the most recent eclipse and got the project pulled in and configured to run with the same values (except the original heap size max for the VM options) and it works fine.

Can anyone tell me what could possibly be causing the out of memory solely when running the application through IntelliJ IDEA? It's driving me crazy, I'd rather not have to switch IDEs just to run the application locally and attach a debugger to monitor values in memory, so if anyone could provide any insight or additional steps to try, I'd really appreciate it.

I noticed that we were pulling down 2 versions of ojdbc via our ivy file after the merge down on Monday, so I asked the programmer in charge of the migration to the updated common code about it and I tried excluding the older version, but this wasn't a full solution to the multiple versions of jdbc drivers. The other programmer pursued cleaning up the ivy file to remove the dependencies for jdbc6 and only use the latest version of jdbc8... this resolved the issue.

Thank you all for your help, I'm not sure I would've noticed the ojdbc jar issue if it wasn't for y'all...

I'm still curious as to what the difference between standalone/IDEA and Eclipse was that Eclipse was able to deal with the driver conflict while the others threw the OOME.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM