[infinispan-dev] ISPN-296 closed but not sure why

Bryan Grunow bgrunow at rim.com
Wed Dec 16 13:15:48 EST 2009


Just did some more testing here and it appears to do with the
transaction manager.  We're using jbossts-jta-4.9.0.GA.  If I use the
default DummyTransactionManager everything "appears" to work.

 

When I debugged my JUnit test (I'm not sure how to debug your tests)
using the DummyTransactionManager I could see the problem still occurs
but on line 263 of DummyTransaction.java the exception thrown is
consumed.  A log line is generated but that's it.  I'm not sure how to
view a log in your tests but I couldn't see the message anywhere in the
reports.

 

You said you tested with the attached jbossts-properties.xml so I assume
you were using the same or similar transaction manager so I'm not sure
why you can't reproduce this.  I can now reproduce "success" by using
the DumyTransactionManager but I don't think the DummyTransactionManager
is handling this properly or making it apparent.

 

The problem in the code appears to be when removing the value from the
index (QueryInterceptor.java 166) a bit of work is passed in and the
value is null because it doesn't exist in the cache.  In
BatchedQueueingProcessor (line 148) in the hibernate-search code the
following code is run.

 

           Class<T> entityClass = work.getEntityClass() != null ?

                     work.getEntityClass() :

                     Hibernate.getClass( work.getEntity() );

 

The entityClass is the class of the value.  The value is null so
therefore it runs Hibernate.getClass(work.getEntity()); and then throws
a NullPointerException.  This is the exception that the
DummyTransaction.java consumes.

 

Anyhow, this is what I'm seeing.

 

Bryan

 

From: infinispan-dev-bounces at lists.jboss.org
[mailto:infinispan-dev-bounces at lists.jboss.org] On Behalf Of Manik
Surtani
Sent: Wednesday, December 16, 2009 4:23 AM
To: infinispan -Dev List
Subject: Re: [infinispan-dev] ISPN-296 closed but not sure why

 

Hmm, I just did this and ... it worked!

 

Ok, what I did was *slightly* different - I put your XML files on my
classpath and created a CacheManager using:

 

      m_cacheManager = new
DefaultCacheManager("datagrid-infinispan.xml");

      m_cache = m_cacheManager.getCache();

      m_transactionManager =
m_cache.getAdvancedCache().getTransactionManager();

      return m_cacheManager;

 

This is the same datagrid-infinispan.xml (and jbossts-properties.xml)
that you attached at the start of this thread.

 

Cheers

Manik

 

 

 

On 15 Dec 2009, at 18:01, Bryan Grunow wrote:





When I run the test as configured the test succeeds.  When I use the
attached configuration file which is the one we're using the test fails.

 

   @Override

   protected CacheManager createCacheManager() throws Exception {

      //Configuration c = getDefaultStandaloneConfig(true);

      //c.setIndexingEnabled(true);

      //c.setIndexLocalOnly(true);

      //m_cacheManager = TestCacheManagerFactory.createCacheManager(c,
true);

      InputStream is = new FileInputStream("infinispan.xml");

      m_cacheManager = new DefaultCacheManager(is, true);

      m_cache = m_cacheManager.getCache();

      m_transactionManager =
m_cache.getAdvancedCache().getTransactionManager();

      return m_cacheManager;

   }

 

I don't think there is a lot different from the standard config other
than the following.

 

 - We use FIFODataContainer with no eviction

 - We've got JMX turned on.

 - Lock striping is turned off

 - We're running in local mode

 

Bryan

 

From: infinispan-dev-bounces at lists.jboss.org
[mailto:infinispan-dev-bounces at lists.jboss.org] On Behalf Of Manik
Surtani
Sent: Tuesday, December 15, 2009 4:04 AM
To: infinispan -Dev List
Subject: Re: [infinispan-dev] ISPN-296 closed but not sure why

 

You can run the test from the src tree if you check it out, set it up
accordingly as per instructions here [1] and run the test in your IDE.

 

[1]
http://community.jboss.org/wiki/InfinispanQuickStartGuideforDevelopers

 

On 14 Dec 2009, at 20:07, Bryan Grunow wrote:






I've updated to CR3 and it appears this issue is still there.  Is there
a way to see the output of this test?  There should be exceptions being
thrown.

 

Bryan

 

From: infinispan-dev-bounces at lists.jboss.org
[mailto:infinispan-dev-bounces at lists.jboss.org] On Behalf Of Manik
Surtani
Sent: Friday, December 11, 2009 4:06 AM
To: infinispan -Dev List
Subject: Re: [infinispan-dev] ISPN-296 closed but not sure why

 

FYI, I've also added this as a unit test (modified to work with our test
fwk) and it works fine in trunk.

 

 
http://fisheye.jboss.org/browse/Infinispan/trunk/query/src/test/java/org
/infinispan/query/tx/TransactionalQueryTest.java?r=1287

 

Cheers

Manik

 

On 10 Dec 2009, at 19:35, Bryan Grunow wrote:







The issue has been closed but I can reproduce it.  I'm not sure if it
was closed because it could not be reproduced or because it not felt as
a bug.

 

https://jira.jboss.org/jira/browse/ISPN-296

 

I've attached a simple test to reproduce the problem.  Just a reminder.
When running the test make sure to add -Dinfinispan.query.enabled=true
-Dinfinispan.query.indexLocalOnly=true to enable query support. 

 

Bryan

 

--------------------------------------------------------------------- 
This transmission (including any attachments) may contain confidential
information, privileged material (including material protected by the
solicitor-client or other applicable privileges), or constitute
non-public information. Any use of this information by anyone other than
the intended recipient is prohibited. If you have received this
transmission in error, please immediately reply to the sender and delete
this information from your system. Use, dissemination, distribution, or
reproduction of this transmission by unintended recipients is not
authorized and may be unlawful.
<QueryTest.zip>_______________________________________________
infinispan-dev mailing list
infinispan-dev at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev

 

--

Manik Surtani

manik at jboss.org

Lead, Infinispan

Lead, JBoss Cache

http://www.infinispan.org

http://www.jbosscache.org

 







 

--------------------------------------------------------------------- 
This transmission (including any attachments) may contain confidential
information, privileged material (including material protected by the
solicitor-client or other applicable privileges), or constitute
non-public information. Any use of this information by anyone other than
the intended recipient is prohibited. If you have received this
transmission in error, please immediately reply to the sender and delete
this information from your system. Use, dissemination, distribution, or
reproduction of this transmission by unintended recipients is not
authorized and may be
unlawful._______________________________________________
infinispan-dev mailing list
infinispan-dev at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev

 

--

Manik Surtani

manik at jboss.org

Lead, Infinispan

Lead, JBoss Cache

http://www.infinispan.org

http://www.jbosscache.org

 






 

--------------------------------------------------------------------- 
This transmission (including any attachments) may contain confidential
information, privileged material (including material protected by the
solicitor-client or other applicable privileges), or constitute
non-public information. Any use of this information by anyone other than
the intended recipient is prohibited. If you have received this
transmission in error, please immediately reply to the sender and delete
this information from your system. Use, dissemination, distribution, or
reproduction of this transmission by unintended recipients is not
authorized and may be unlawful.
<infinispan.xml>_______________________________________________
infinispan-dev mailing list
infinispan-dev at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev

 

--

Manik Surtani

manik at jboss.org

Lead, Infinispan

Lead, JBoss Cache

http://www.infinispan.org

http://www.jbosscache.org

 





 


---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20091216/c42666d8/attachment-0002.html 


More information about the infinispan-dev mailing list