Neo4j can't get all nodes after reconnecting to the database - java

I used EmbeddedGraphDatabase() to create a neo4j database and create some nodes and relationships. Then I shut down the database. But after I reconnected the database,using following method:
GraphDatabaseService graphDb=new EmbeddedGraphDatabase(DB_PATH);//DB_PATH is the path of original db
and then I tried to get all nodes using GlobalGraphOperations.at(graphDb).getAllNodes();
but I can't get all nodes, that means,I can't get nodes which were created when I first connect the database.
Dev Environment:
Version of neo4j is 1.9M01 and the IDE is Eclipse while jdk is 1.6-win32
Anyone knows the reason?
Many thanks!!

I had the same issue, where i was not able to retrieve my nodes based on their index. I was missing the tx.success() when i created my database. When i recreated the DB and included tx.success() in the finally{} clause, everything started working as a magic!! Thanks a lot cporte!!
Salini

Related

ORA-02020 – Too many database links in use

i have a web based application which uses weblogic connection pooling while accessing oracle db. there is a procedure in which i must use db link to fetch and update remote table. but after a few call my service which triggers procedure call i got ORA-02020 – Too many database links in use error.
I think it causes from weblogic connection pool, it does not close session so db link is not closed and it reached max dblink count after a few try.
i've found http://dbtricks.com/?p=198 work around solution but it have not worked for me. i must use db link so what should i do? is there any solution for my case?
thanks.

NoHostAvailableException in Cassandra though host is online

I am using a DataStax Cassandra client version 2.1.1 and I connect to 10 different clusters. I use one session per cluster and we are doing inserts to different clusters in our server.
We have prepared statements to insert queries per host and when we need to do an insert to the particular cluster, we get the session object's connection and do the insert.
When we ran load test, two things we noted:
1) I do an insert to one host(X) for a long time(burst of calls,etc) - no issues are found
2) Do a burst call to two clusters(X,Y) -then most of the records inserted into the first cluster(Y) fails
Any reason for this?
Thanks,
Gopi
I found the issue for the driver misbehaving. The actual problem was with the data model used. My data model had a map(Collection) datatype and during high load, there were timeouts. When I changed my datatype from Map to Text and when I added COMPACT STORAGE when I created tables, then things worked fine.
Yes, it is weird, but it worked. An explanation to why this works would really help.
Thanks,
Gopi

Talend ETL Job Error in tOracleOutput Component

I am a newbie to TalendETL and am using Talend Open Studio for Big Data version 5.4.1 . I have developed a simple Talend ETL job that picks up data from a csv file and inserts data into my local Oracle Database. Below is how my package looks:
The job returns an exception that ArrayIndexOutOfBounds after the last record of the csv file. But I'm uncertain as to why it should return that in the first place? I checked out the solution given on this link: http://www.talendforge.org/forum/viewtopic.php?id=21644
But it doesn't seem to work at all. I have the latest driver for the oracle component and increasing/decreasing the commit size does not seem to affect it.
Can someone please help me out on this? Please let me know in case more information is needed.
P.S: The complete error log is below:-
Starting job Kaggle_Data_Load_Training at 09:31 25/06/2014.
[statistics] connecting to socket on port 3957
[statistics] connected
Exception in component tOracleOutput_1
java.lang.ArrayIndexOutOfBoundsException: -32203
at oracle.jdbc.driver.OraclePreparedStatement.setupBindBuffers(OraclePreparedStatement.java:2677)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:9270)
at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:210)
at test.kaggle_data_load_training_0_1.Kaggle_Data_Load_Training.tFileInputDelimited_1Process(Kaggle_Data_Load_Training.java:4360)
at test.kaggle_data_load_training_0_1.Kaggle_Data_Load_Training.runJobInTOS(Kaggle_Data_Load_Training.java:4717)
at test.kaggle_data_load_training_0_1.Kaggle_Data_Load_Training.main(Kaggle_Data_Load_Training.java:4582)
[statistics] disconnected
Job Kaggle_Data_Load_Training ended at 09:31 25/06/2014. [exit code=1]
Can you try to decrease the commit size on the tOracleOutput component? I remember there is some kind of bug in 5.4.1. of TOS which resulted in this error. Therefore please lower commit size (let's say to 500) and see if the problem still exists. Here's more information about the bug: http://www.talendforge.org/forum/viewtopic.php?id=5931
Had same issue in Talend 6.2.1
It can be resolved by changing updating DB Version in metadata of connection.
Same is confirmed on Talend blog

Understanding the real reason behind a Hive failure

I'm using a JDBC driver to run "describe TABLE_NAME" on hive. It gives me the following error:
NativeException: java.sql.SQLException: Query returned non-zero code: 9, cause: FAILED:
Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
return code 1 doesn't tell me very much. How do I figure out what the underlying reason is?
It's most likely because your Hive metastore is not setup properly. Hive uses a RDBMS metastore to store meta data about its tables. This includes things like table names, schemas, partitioning/bucketing/sorting columms, table level statistics, etc.
By default, Hive uses an embedded derby metastore which can only be accessed by one process at a time. If you are using that, it's possible that you have multiple sessions to Hive open that's causing this problem.
In any case, I would recommend you to set up a stand alone metastore for Hive. Embedded derby was chosen for its usability in running tests and a good out of the box metastore. However, in my opinion, it's not fit for production workflows. You can find instructions on how to configure MySQL as Hive metastore here.
Possibly you have another sesssion open. Since derby allows only one session per person.
You can check -
ps -wwwfu <your id>
kill the id which is running the hive connection.
It is because the table with the name you've specified is didn't exist in the database.
Try creating the table and again run the command. it will work. :)

JavaDB connection issues; database not found

I am having a problem with Java DB that I just don't know how to resolve. I am creating a DB and connecting to it using Java DB's native JDBC driver. If I relocate that database physically and try to connect to it using its new path, I consistently get XJ004 errors:
ERROR XJ004: Database 'blahblah' not found.
I am sure I am using the correct connection string. Is there any possibility the DB is somehow getting corrupted? Or is there some encoding of the DB path in the DB such that if you relocate a Java DB it gets confused?
I'm really at a loss here. :( Please help!
Jim
Have you verified that this error message isn't also used when there's no listener on the host machine ... and were you using JavaDB on your local machine before the relocation? Many database systems (and I'm not that familiar with JavaDB) ship set-up to only allow connections from localhost for security reasons. On PostgreSQL for instance, you have to allow TCP connections and bounce the daemon to obtain a remote connection.
Anyway ... since the problem started when you when remote, look for issues related to that first! (And if you can run your application on the remote machine, does that work?)
There must be a file named derby.log somewhere. Check the error there. If it is not detailed enough, try setting derby.stream.error.logSeverityLevel to a lower value. See the manual for more information.

Categories