mongoDB, connection refused

By default MongoDB only binds to the loopback interface which makes it only accessible from localhost. To change that you need to edit this line in mongod.conf file; you can change it to bind_ip = 127.0.0.1,192.168.1.102 to allow LAN and local connections or you can remove or comment out that line to allow all connections. For more info : MongoDB … Read more

Getting java.sql.SQLException: Operation not allowed after ResultSet closed

The problem is with the way you fetch data in getStuff(). Each time you visit getStuff() you obtain a fresh ResultSet but you don’t close it. This violates the expectation of the Statement class (see here – http://docs.oracle.com/javase/7/docs/api/java/sql/Statement.html): By default, only one ResultSet object per Statement object can be open at the same time. Therefore, if the reading of one ResultSet object is … Read more

ReferenceError: “alert” is not defined

alert is not part of JavaScript, it’s part of the window object provided by web browsers. So it doesn’t exist in the context you’re trying to use it in. (This is also true of setInterval, setTimeout, and other timer-related stuff, FYI.) If you just want to do simple console output, Rhino provides a print function to your script, so you could replace alert with print. … Read more

Java Copy Constructor ArrayLists

Note: Cloning the lists, isn’t the same as cloning the elements in the list. None of these approaches work the way you want them to: The approaches above will fill people such that it contains the same elements as other.people. However, you don’t want it to contain the same elements. You want to fill it with clones of … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)