SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye

Welcome, Guest
Guest Settings
Help

Compass Support Forums » Compass » Compass Users

Thread: Compass + Glassfish +index search error

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


Permlink Replies: 7 - Pages: 1 - Last Post: Aug 23, 2007 5:02 PM Last Post By: msolnit
r_sudh

Posts: 22
Registered: 8/5/07
Compass + Glassfish +index search error
Posted: Aug 12, 2007 11:46 PM
 
  Click to reply to this thread Reply
I was able to successfully integrate Compass into a JPA application that I then deployed into Glassfish. I wrote some client side code to populate the database via the JPA application and Compass correctly created the index. I verified this using the Luke tool. I'm running into issues searching the index.

Here is my code to search the index.
public Collection search(final String searchTerms) {
CompassSession session = GlassfishCompassSingleton.getInstance()
.getCompass().openSession();

Collection<Owner> results = new ArrayList<Owner>();

CompassTransaction tx = null;
CompassHits hits;
try {
tx = session.beginTransaction();
hits = session.find(searchTerms);
for (int i = 0; i < hits.length(); i++) {
results.add((Owner) hits.data(i));
}

tx.commit();
} catch (CompassException ce) {
if (tx != null) {
tx.rollback();
}
} finally {
session.close();
}
return results;
}

Let me know if there is anything else I can provide that would be helpful.

And here is the resulting stacktrace:

[#|2007-08-12T23:39:40.896-0500|FINER|sun-appserver9.1|oracle.toplink.essentials.session.file:/E:/Java/glassfish/domains/domain1/applications/j2ee-modules/brazos.permit.ejb-1.0.0/-permitPU.transaction|_ThreadID=36;_ThreadName=p: thread-pool-1; w: 20;ClassName=null;MethodName=null;_RequestID=ba13081e-8d8b-4a50-b21a-74a2a4829eca;|end unit of work commit|#]

at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:413)
at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:371)
at com.sun.enterprise.distributedtx.UserTransactionImpl.commit(UserTransactionImpl.java:197)
at org.compass.core.transaction.AbstractJTATransaction.doCommit(AbstractJTATransaction.java:112)
... 8 more
|#]

[#|2007-08-12T23:42:18.983-0500|INFO|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=37;_ThreadName=p: thread-pool-1; w: 23;PermitServiceBean;|EJB5018: An exception was thrown during an ejb invocation on [PermitServiceBean]|#]

[#|2007-08-12T23:42:18.983-0500|INFO|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=37;_ThreadName=p: thread-pool-1; w: 23;|
javax.ejb.EJBException
at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:3858)
at com.sun.ejb.containers.BaseContainer.checkExceptionNoTx(BaseContainer.java:3690)
at com.sun.ejb.containers.BaseContainer.checkExceptionBeanMgTx(BaseContainer.java:3624)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3524)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1343)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1305)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:205)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:127)
at $Proxy105.search(Unknown Source)
at brazos.permit.ejb.business.impl.PermitServiceBean.search(PermitServiceBean.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2884)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3975)
at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:203)
at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:117)
at $Proxy103.search(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:125)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:658)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:198)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1820)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1680)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1062)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:194)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:780)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:537)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2541)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:524)
Caused by: java.lang.ExceptionInInitializerError
at brazos.permit.ejb.search.impl.SearchBean.search(SearchBean.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2884)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3975)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:197)
... 29 more
Caused by: org.compass.gps.CompassGpsException: Failed to index, erxecution exception; nested exception is org.compass.core.util.backport.java.util.concurrent.ExecutionException: org.compass.core.transaction.TransactionException: Commit failed; nested exception is javax.transaction.RollbackException: Transaction marked for rollback.
at org.compass.gps.device.support.parallel.ConcurrentParallelIndexExecutor.performIndex(ConcurrentParallelIndexExecutor.java:123)
at org.compass.gps.device.support.parallel.AbstractParallelGpsDevice.index(AbstractParallelGpsDevice.java:82)
at org.compass.gps.impl.SingleCompassGps$1.buildIndexIfNeeded(SingleCompassGps.java:132)
at org.compass.core.lucene.engine.manager.DefaultLuceneSearchEngineIndexManager$1.firstStep(DefaultLuceneSearchEngineIndexManager.java:170)
at org.compass.core.lucene.engine.manager.DefaultLuceneSearchEngineIndexManager.operate(DefaultLuceneSearchEngineIndexManager.java:129)
at org.compass.core.lucene.engine.manager.DefaultLuceneSearchEngineIndexManager.replaceIndex(DefaultLuceneSearchEngineIndexManager.java:168)
at org.compass.core.impl.DefaultCompass$TransactionalSearchEngineIndexManager$6.doInCompassWithoutResult(DefaultCompass.java:325)
at org.compass.core.CompassCallbackWithoutResult.doInCompass(CompassCallbackWithoutResult.java:29)
at org.compass.core.CompassTemplate.execute(CompassTemplate.java:137)
at org.compass.core.CompassTemplate.execute(CompassTemplate.java:119)
at org.compass.core.impl.DefaultCompass$TransactionalSearchEngineIndexManager.replaceIndex(DefaultCompass.java:323)
at org.compass.core.lucene.engine.manager.ScheduledLuceneSearchEngineIndexManager.replaceIndex(ScheduledLuceneSearchEngineIndexManager.java:119)
at org.compass.gps.impl.SingleCompassGps.doIndex(SingleCompassGps.java:127)
at org.compass.gps.impl.AbstractCompassGps.index(AbstractCompassGps.java:157)
at brazos.permit.ejb.search.GlassfishCompassSingleton.<init>(GlassfishCompassSingleton.java:87)
at brazos.permit.ejb.search.GlassfishCompassSingleton.<clinit>(GlassfishCompassSingleton.java:28)
... 39 more
Caused by: org.compass.core.util.backport.java.util.concurrent.ExecutionException: org.compass.core.transaction.TransactionException: Commit failed; nested exception is javax.transaction.RollbackException: Transaction marked for rollback.
at org.compass.core.util.backport.java.util.concurrent.FutureTask.getResult(FutureTask.java:299)
at org.compass.core.util.backport.java.util.concurrent.FutureTask.get(FutureTask.java:118)
at org.compass.gps.device.support.parallel.ConcurrentParallelIndexExecutor.performIndex(ConcurrentParallelIndexExecutor.java:119)
... 54 more
Caused by: org.compass.core.transaction.TransactionException: Commit failed; nested exception is javax.transaction.RollbackException: Transaction marked for rollback.
at org.compass.core.transaction.AbstractJTATransaction.doCommit(AbstractJTATransaction.java:116)
at org.compass.core.transaction.AbstractTransaction.commit(AbstractTransaction.java:38)
at org.compass.core.CompassTemplate.execute(CompassTemplate.java:138)
at org.compass.gps.impl.SingleCompassGps.executeForIndex(SingleCompassGps.java:160)
at org.compass.gps.device.support.parallel.ConcurrentParallelIndexExecutor$1.call(ConcurrentParallelIndexExecutor.java:99)
at org.compass.core.util.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
at org.compass.core.util.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
at org.compass.core.util.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.transaction.RollbackException: Transaction marked for rollback.
at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:413)
at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:371)
at com.sun.enterprise.distributedtx.UserTransactionImpl.commit(UserTransactionImpl.java:197)
at org.compass.core.transaction.AbstractJTATransaction.doCommit(AbstractJTATransaction.java:112)
... 8 more
|#]

Shay Banon

Posts: 4,028
Registered: 9/6/05
Re: Compass + Glassfish +index search error
Posted: Aug 14, 2007 12:48 PM   in response to: r_sudh in response to: r_sudh
 
  Click to reply to this thread Reply
It is strange since the exception looks like happens due to a call to CompassGps#index operation and I don't see it in your code...
r_sudh

Posts: 22
Registered: 8/5/07
Re: Compass + Glassfish +index search error
Posted: Aug 14, 2007 1:44 PM   in response to: Shay Banon in response to: Shay Banon
 
  Click to reply to this thread Reply
The index() operation is being called in my GlassfishConfigurationSingleton class, which you'll notice is being called in my search method above.

public class GlassfishCompassSingleton {
private JpaGpsDevice jpaDevice = null;
private Compass compass = null;
private EntityManagerFactory emf = null;
static private GlassfishCompassSingleton theInstance = new GlassfishCompassSingleton();

/**
* The Singleton to establish the one and only instance of the compass
* object, and the associated JpaGpsDevice for the Glassfish Application
* Server Environment. The first call to getInstance should occur within a
* method governed by a BMT managed transction scope hack. A better approach
* would be to have a single instance, management bean associated with the
* application -- provided the bean had access to a valid transactional
* context. More to come, but this works for now.
*/
@SuppressWarnings("unchecked")
private GlassfishCompassSingleton() {

CompassConfiguration conf = new CompassAnnotationsConfiguration();

for (Class c : getSearchableClasses()) {
conf.addClass(c);
}

// File based index, can be changed to JDBC data source
conf.setConnection("index");

conf.setSetting("compass.transaction.managerLookup",
"brazos.permit.ejb.search.GlassfishTM");

conf.setSetting("compass.transaction.factory",
"org.compass.core.transaction.JTASyncTransactionFactory");
compass = conf.buildCompass();

// Hack to get the actual EntityManagerFactory, and not the wrapper.
InvocationManager invMgr = Switch.getSwitch().getInvocationManager();
ComponentInvocation inv = invMgr.getCurrentInvocation();

if (inv != null) {
Object descriptor = Switch.getSwitch().getDescriptorFor(
inv.getContainerContext());
emf = EntityManagerFactoryWrapper.lookupEntityManagerFactory(inv
.getInvocationType(), Settings.persistenceUnitName,
descriptor);
}

SingleCompassGps gps = new SingleCompassGps(compass);

jpaDevice = new JpaGpsDevice("jpa", emf);
jpaDevice.setInjectEntityLifecycleListener(true);
jpaDevice
.setLifecycleInjector(new TopLinkEssentialsJpaEntityLifecycleInjector());
gps.addGpsDevice(jpaDevice);
gps.start();

// Causes the device to synchronize with the existing application state
gps.index();
}

@SuppressWarnings("unchecked")
protected Class[] getSearchableClasses() {
return new Class[] { Owner.class, OwnerData.class };
}

/**
* @return
*/
public Compass getCompass() {
return compass;
}

/**
* @return
*/
public static GlassfishCompassSingleton getInstance() {
return theInstance;
}
}
Shay Banon

Posts: 4,028
Registered: 9/6/05
Re: Compass + Glassfish +index search error
Posted: Aug 17, 2007 4:50 AM   in response to: r_sudh in response to: r_sudh
 
  Click to reply to this thread Reply
I don't think that you should call the index operation within the singleton construction. Maybe extract it as a method (index) on the singleton and call it.
r_sudh

Posts: 22
Registered: 8/5/07
Re: Compass + Glassfish +index search error
Posted: Aug 17, 2007 1:18 PM   in response to: Shay Banon in response to: Shay Banon
 
  Click to reply to this thread Reply
I refactored the search() into it's own separate method. And I now get the following stacktrace. Also where can I get the jar file of the source for compass?

Caused by: java.lang.IllegalStateException: Operation not allowed.
at com.sun.enterprise.distributedtx.UserTransactionImpl.checkUserTransactionMethodAccess(UserTransactionImpl.java:135)
at com.sun.enterprise.distributedtx.UserTransactionImpl.getStatus(UserTransactionImpl.java:262)
at org.compass.core.transaction.AbstractJTATransactionFactory.getTransactionBoundSession(AbstractJTATransactionFactory.java:106)
at org.compass.core.impl.DefaultCompass.openSession(DefaultCompass.java:174)
at org.compass.core.impl.DefaultCompass.openSession(DefaultCompass.java:170)
at org.compass.core.CompassTemplate.execute(CompassTemplate.java:132)
at org.compass.core.CompassTemplate.execute(CompassTemplate.java:119)
at org.compass.core.impl.DefaultCompass$TransactionalSearchEngineIndexManager.verifyIndex(DefaultCompass.java:291)
at org.compass.core.lucene.engine.manager.ScheduledLuceneSearchEngineIndexManager.verifyIndex(ScheduledLuceneSearchEngineIndexManager.java:98)
at org.compass.core.impl.DefaultCompass.<init>(DefaultCompass.java:147)
at org.compass.core.impl.DefaultCompass.<init>(DefaultCompass.java:102)
at org.compass.core.impl.DefaultCompass.<init>(DefaultCompass.java:95)
at org.compass.core.config.CompassConfiguration.buildCompass(CompassConfiguration.java:192)
at brazos.permit.ejb.search.CompassSingleton.<init>(CompassSingleton.java:64)
at brazos.permit.ejb.search.CompassSingleton.<clinit>(CompassSingleton.java:29)
... 39 more
|#]

[#|2007-08-17T13:15:45.536-0500|INFO|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=40;_ThreadName=p: thread-pool-1; w: 632;PermitServiceBean;|EJB5018: An exception was thrown during an ejb invocation on [PermitServiceBean]|#]

[#|2007-08-17T13:15:45.536-0500|INFO|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=40;_ThreadName=p: thread-pool-1; w: 632;|
javax.ejb.EJBTransactionRolledbackException
at com.sun.ejb.containers.BaseContainer.mapBusinessInterfaceException(BaseContainer.java:1471)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1385)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1305)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:205)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:127)
at $Proxy127.search(Unknown Source)
at brazos.permit.ejb.business.impl.PermitServiceBean.search(PermitServiceBean.java:152)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2884)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3975)
at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:203)
at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:117)
at $Proxy125.search(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:125)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:658)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:198)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1820)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1680)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1062)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:194)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:780)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:537)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2541)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:524)
Caused by: javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean: java.lang.ExceptionInInitializerError
at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:3720)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3565)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1343)
... 31 more
Caused by: java.lang.ExceptionInInitializerError
at brazos.permit.ejb.search.impl.SearchBean.search(SearchBean.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2884)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3975)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:197)
... 29 more
Caused by: java.lang.IllegalStateException: Operation not allowed.
at com.sun.enterprise.distributedtx.UserTransactionImpl.checkUserTransactionMethodAccess(UserTransactionImpl.java:135)
at com.sun.enterprise.distributedtx.UserTransactionImpl.getStatus(UserTransactionImpl.java:262)
at org.compass.core.transaction.AbstractJTATransactionFactory.getTransactionBoundSession(AbstractJTATransactionFactory.java:106)
at org.compass.core.impl.DefaultCompass.openSession(DefaultCompass.java:174)
at org.compass.core.impl.DefaultCompass.openSession(DefaultCompass.java:170)
at org.compass.core.CompassTemplate.execute(CompassTemplate.java:132)
at org.compass.core.CompassTemplate.execute(CompassTemplate.java:119)
at org.compass.core.impl.DefaultCompass$TransactionalSearchEngineIndexManager.verifyIndex(DefaultCompass.java:291)
at org.compass.core.lucene.engine.manager.ScheduledLuceneSearchEngineIndexManager.verifyIndex(ScheduledLuceneSearchEngineIndexManager.java:98)
at org.compass.core.impl.DefaultCompass.<init>(DefaultCompass.java:147)
at org.compass.core.impl.DefaultCompass.<init>(DefaultCompass.java:102)
at org.compass.core.impl.DefaultCompass.<init>(DefaultCompass.java:95)
at org.compass.core.config.CompassConfiguration.buildCompass(CompassConfiguration.java:192)
at brazos.permit.ejb.search.CompassSingleton.<init>(CompassSingleton.java:64)
at brazos.permit.ejb.search.CompassSingleton.<clinit>(CompassSingleton.java:29)
... 39 more
|#]
Shay Banon

Posts: 4,028
Registered: 9/6/05
Re: Compass + Glassfish +index search error
Posted: Aug 18, 2007 7:14 AM   in response to: r_sudh in response to: r_sudh
 
  Click to reply to this thread Reply
Compass source comes as part of the download.
msolnit

Posts: 108
Registered: 10/12/06
Re: Compass + Glassfish +index search error
Posted: Aug 23, 2007 4:57 PM   in response to: Shay Banon in response to: Shay Banon
 
  Click to reply to this thread Reply
Hi r_sudh. Is it possible this is a Glassfish bug? See http://jira.jboss.com/jira/browse/JBSEAM-456.

-- Matt
msolnit

Posts: 108
Registered: 10/12/06
Re: Compass + Glassfish +index search error
Posted: Aug 23, 2007 5:02 PM   in response to: msolnit in response to: msolnit
 
  Click to reply to this thread Reply
To elaborate on my previous post: Compass does the same thing as Seam. It tries to look up the UserTransaction and catches NameNotFoundException, then handles it appropriately.

    private UserTransaction lookupUserTransaction() throws TransactionException {
        if (log.isDebugEnabled()) {
            log.debug("Looking for UserTransaction under \[" + utName + "]");
        }
        UserTransaction ut;
        try {
            ut = (UserTransaction) context.lookup(utName);
        } catch (NamingException ne) {
            ut = null;
        }
        if (ut == null) {
            if (log.isInfoEnabled()) {
                log.info("Failed to locate a UserTransaction under \[" + utName + "], creating UserTransactionAdapter in its place");
            }
            ut = new UserTransactionAdapter(transactionManager);
        }
        return ut;
    }

If the version of Glassfish you are using is not throwing the exception correctly (as described in the Seam bug last year), then this could be your problem.

-- Matt
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