SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye

Welcome, Guest
Guest Settings
Help

Compass Support Forums » Compass » Compass Users

Thread: mirroring of deletion NPE

This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 33 - Pages: 3 [ 1 2 3 | Next ] - Last Post: Dec 12, 2011 7:18 PM Last Post By: anitas
Los Morales

Posts: 126
Registered: 10/2/06
mirroring of deletion NPE
Posted: Jun 27, 2007 11:38 PM
 
  Click to reply to this thread Reply
I have a separate program that purges data from my database and uses compassGps to mirror these deletions (hibernate's session.delete()) to purge the respective data from the Lucene index. When running this program, I get a NullPointerException and the transaction automatically rolls back my deletions. At first I thought this was a hibernate issue. After further debugging, all of the hibernate SQL queries execute just fine. Its when it gets to compass's part of deleting from the Lucene index that seems to throw this NPE. I've added a hibernate mirror filter for compass just for debugging purposes (prints out logs). When the return is false for the "shouldFilterDelete()", the NPE comes up right away. So to make sure this was a Compass issue, I started my program again with compassGps stopped. And indeed, all of the records were deleted from the DB just fine (no rollbacks).

Now knowing this, what could be the cause(s) of Compass throwing a NPE from mirroring a hibernate delete? Any help would be appreciated. Thanks!

-los
NetForce1

Posts: 34
Registered: 5/16/07
Re: mirroring of deletion NPE
Posted: Jun 28, 2007 1:43 AM   in response to: Los Morales in response to: Los Morales
 
  Click to reply to this thread Reply
Can you post a stacktrace?
Los Morales

Posts: 126
Registered: 10/2/06
Re: mirroring of deletion NPE
Posted: Jun 28, 2007 8:59 AM   in response to: NetForce1 in response to: NetForce1
 
  Click to reply to this thread Reply
Hi,

It's very hard to print a stack trace that has Compass logging. I have log4j set at debug, and included org.compass in my config, i.e.

<logger name="org.compass">
<level value="DEBUG"/>
</logger>

Again, I can say it is due to mirroring since when I stopped CompassGPS, there was no transaction rollback. Below is my code snippet:

******************************************
...
...
if (!compassGps.isRunning()) {
compassGps.start();
}

// if I uncomment below, no exceptions occur
// compassGps.stop();

while (loopCondition) {
int count = 0;

List<Book> books = bookService.retrieveBooksByDate(new Date());

if (books != null && !books.isEmpty()) {
count = books.size();

try {
for (Book book : books) {
LOG.info("removing book: " + book.getId());
bookService.removeBook(book);
LOG.info("COMPLETED removing book");
}
} catch (Exception e) {
LOG.info("--->" + e.toString());
e.printStackTrace();
}
}

...
...

******************************************

the output of my logging:

**************************************************
2007-06-28 08:37:04,429 | INFO | pool-flow.seda.bean-thread-1 | BookPurger | ponents.db.BookPurger 142 | removing book: 3
...
... // Bunch of Hibernate queries to be executed
...
2007-06-28 08:37:04,820 | DEBUG | pool-flow.seda.bean-thread-1 | SQL | hibernate.jdbc.AbstractBatcher 393 | delete from Book where Book_id=?
[b][i]2007-06-28 08:37:04,820 | INFO | pool-flow.seda.bean-thread-1 | HibernateMirrorFilter | e.HibernateMirrorFilter 78 | Book id = 3, returning false on shouldFilterDelete()[/i][/b]
2007-06-28 08:37:04,820 | DEBUG | pool-flow.seda.bean-thread-1 | JDBCTransaction | te.transaction.JDBCTransaction 152 | rollback
2007-06-28 08:37:04,867 | DEBUG | pool-flow.seda.bean-thread-1 | JDBCTransaction | te.transaction.JDBCTransaction 163 | rolled back JDBC Connection
2007-06-28 08:37:04,867 | DEBUG | pool-flow.seda.bean-thread-1 | ConnectionManager | bernate.jdbc.ConnectionManager 296 | transaction completed on session with on_close connection release mode; be sure to close the session to release JDBC resources!
2007-06-28 08:37:04,867 | DEBUG | pool-flow.seda.bean-thread-1 | ConnectionManager | bernate.jdbc.ConnectionManager 435 | releasing JDBC connection [ (open PreparedStatements: 1, globally: 1) (open ResultSets: 0, globally: 0)]
2007-06-28 08:37:04,867 | DEBUG | pool-flow.seda.bean-thread-1 | BasicResourcePool | resourcepool.BasicResourcePool 1644 | trace com.mchange.v2.resourcepool.BasicResourcePool@13a4cdc [managed: 5, unused: 4, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@69e528)
2007-06-28 08:37:04,867 | DEBUG | pool-flow.seda.bean-thread-1 | ConnectionManager | bernate.jdbc.ConnectionManager 296 | transaction completed on session with on_close connection release mode; be sure to close the session to release JDBC resources!
2007-06-28 08:37:04,867 | INFO | pool-flow.seda.bean-thread-1 | BookPurger | ponents.db.BookPurger 147 | ---> java.lang.NullPointerException
**********************************************************

Again, once I uncomment the compassGps.stop() line in the code snippet, there are no NPE nor rollbacks. The highlighted line in the output is a Log statement I place in the custome compass hibernate mirror filter in order to see if compass was going to delete from the index or not (it returned false and hence would have started the deletion in the index). Any ideas on how to troubleshoot this more? Thanks!

-los

Shay Banon

Posts: 4,028
Registered: 9/6/05
Re: mirroring of deletion NPE
Posted: Jun 28, 2007 10:32 AM   in response to: Los Morales in response to: Los Morales
 
  Click to reply to this thread Reply
It seems like the NPE is at BookPurger (if I am reading the logging output right). Is that your class? If it is, it might be a good idea to print the exception as well (and change the logging level to error :) ).
discount oakley...

Posts: 35
Registered: 8/20/11
Re: mirroring of deletion NPE
Posted: Aug 20, 2011 4:19 AM   in response to: Los Morales in response to: Los Morales
 
  Click to reply to this thread Reply
Looking attractive and smart in the fingers of the other people has been the aspiration for any ladies. In order to get noticed instantly, pandora jewelry have the new philosophy of out standing fashion quality.So what is the best choice for you to show yourself .The answer is pandora bracelets.Full of colorful pandora charms can take you different visual effects. The Pandora range of rings is a wealth of beautiful gemstones and precious metals combined with fabulous design.So choose our pandora beads to witness the eternity and originality. pandora jewelry sale store offer pandora bracelets and pandora charms,choose varieties of cheap pandora charms from pandora bracelets sale outlet.up to 70% discount.
discount oakley...

Posts: 35
Registered: 8/20/11
Re: mirroring of deletion NPE
Posted: Aug 20, 2011 4:19 AM   in response to: Los Morales in response to: Los Morales
 
  Click to reply to this thread Reply
Looking attractive and smart in the fingers of the other people has been the aspiration for any ladies. In order to get noticed instantly, pandora jewelry have the new philosophy of out standing fashion quality.So what is the best choice for you to show yourself .The answer is pandora bracelets.Full of colorful pandora charms can take you different visual effects. The Pandora range of rings is a wealth of beautiful gemstones and precious metals combined with fabulous design.So choose our pandora beads to witness the eternity and originality. pandora jewelry sale store offer pandora bracelets and pandora charms,choose varieties of cheap pandora charms from pandora bracelets sale outlet.up to 70% discount.
louisvuittonbox

Posts: 411
Registered: 8/23/11
Re: mirroring of deletion NPE
Posted: Aug 23, 2011 9:26 PM   in response to: Los Morales in response to: Los Morales
 
  Click to reply to this thread Reply
Welcome to louis vuitton online! Here at our online shop, we enable you to select as many styles louis vuitton bags as you can at greatly discounted prices. Established in 2006, We have already landed so many returning customers from louis vuitton outlet. We have been known for the authentic quality of our items,such as louis vuitton belts and louis vuitton purses unsurpassed customer service, rapid delivery, unique prices and so on and so forth. What we did, are doing and will do is only to make our esteemed customers consume those world-renowned luxury designer merchandise with peace of mind. So we sincerely hope that you could be our next returning customer. We are confident that you will be quite satisfied with everything we offer here. Wish you a very good shopping louis vuitton store!
hmq123

Posts: 449
Registered: 8/22/11
christian louboutin
Posted: Aug 24, 2011 10:21 PM   in response to: Los Morales in response to: Los Morales
 
  Click to reply to this thread Reply
How christian louboutin should I heard cheap louboutin shoes that, about your right discount christian louboutin shoes and wrong? How Christian Louboutin Pumps should I heard, was able to Christian Louboutin Ankle Boots smile? How should I heard, you good, for her not to let the http://www.louboutinsshoes2u.com/ tears?
hmq123

Posts: 449
Registered: 8/22/11
Louboutins Shoes Sale
Posted: Aug 24, 2011 10:24 PM   in response to: Los Morales in response to: Los Morales
 
  Click to reply to this thread Reply
Fresh Louboutins Shoes Sale sweet smile like the Christian Louboutin Shoes wine you drink, the more Cheap Christian Louboutin mellow Christian Louboutin Glitter Pumps life, elegant lingering smile Cheap Louboutin Booties like read the poem, the more http://www.louboutinsshoes4sale.com/ romantic life.
hmq123

Posts: 449
Registered: 8/22/11
Discount Christian Louboutin Shoes
Posted: Aug 24, 2011 10:26 PM   in response to: Los Morales in response to: Los Morales
 
  Click to reply to this thread Reply
A smile Discount Christian Louboutin Shoes is healthy, the smile Christian Louboutin Shoes is success, but only Christian Louboutin sale smile and life, and life Cheap Wedding Shoes road to the colorful, just Christian Louboutin Ankle Boots won't give his life with http://www.cheap-christianlouboutinpumps.com/ regrets.
hmq123

Posts: 449
Registered: 8/22/11
Cheap Louboutins
Posted: Aug 24, 2011 10:28 PM   in response to: Los Morales in response to: Los Morales
 
  Click to reply to this thread Reply
A smile is the most Cheap Louboutins moving people expression, Christian Louboutin Shoes life is good and silent Christian Louboutin Discount language, only smile Christian Louboutin Wedding life, the Louboutin Open-toe Booties mood will be relaxed and http://www.cheaplouboutins-shop.com/ cheerful.
hmq123

Posts: 449
Registered: 8/22/11
christian louboutin sale
Posted: Aug 24, 2011 10:30 PM   in response to: Los Morales in response to: Los Morales
 
  Click to reply to this thread Reply
In middle christian louboutin sale age, experience christian louboutin shoes rains and winds, have discount louboutin sale seen the rainbow. Through Christian Louboutin Peep Toe Pumps pain, also get the Christian Louboutin Sandal Booties joy. Experienced setbacks, and bear witness to the http://www.discountlouboutins-sale.com/ success.
hmq123

Posts: 449
Registered: 8/22/11
New Moncler Jackets
Posted: Aug 24, 2011 10:33 PM   in response to: Los Morales in response to: Los Morales
 
  Click to reply to this thread Reply
Self-confidence New Moncler Jackets is not conceit, it is not proud, New Moncler Coats is important, Moncler Online Store is the spiritual pillar of the Cheap Moncler Men Jackets behavior of the Moncler Jackets Women self, self motivation is the incentive to overcome difficulties reach the goal of http://www.moncler-officialwebsite.com/ energy.
hmq123

Posts: 449
Registered: 8/22/11
Christian Louboutins
Posted: Aug 26, 2011 4:05 AM   in response to: Los Morales in response to: Los Morales
 
  Click to reply to this thread Reply
Only with a Christian Louboutins smile, Discount Christian Louboutin Shoes life between people will set Louboutins Online up the bridge of friendship, just Louboutin wedding Pumps can have the Louboutin Booties Online tacit understanding, the life is a warm http://www.designershoeslouboutins.com/ and harmonious.
hmq123

Posts: 449
Registered: 8/22/11
Re: mirroring of deletion NPE
Posted: Aug 26, 2011 4:07 AM   in response to: Los Morales in response to: Los Morales
 
  Click to reply to this thread Reply
Tolerance Louboutin Shoes is life's self Christian Louboutin Sale comprehension, Christian Louboutin Shoes is the mind's accomplishment, tolerance is the most Discount Wedding Shoes noble virtue, tolerance Louboutin Bootie need a happer selfless http://www.louboutin-shoes-discount.com/ heart.
Legend
Guru: 2001 + pts
Expert: 501 - 2000 pts
Super-star: 101 - 500 pts
Assistant: 51 - 100 pts
Participant: 0 - 50 pts
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums