[rules-users] RulesRepository usage - jar incompatibility issue
Praveen
praveen.sanju at gmail.com
Thu Nov 10 00:15:11 EST 2011
Hi,
I am trying to use RulesRepository to create a package and copy required
assets (by using their uuid) into the created package.
Below is the code snippet and the corresponding stack trace of the run-time
exception being thrown.
I would like to know the appropriate lucene-core jar to be used to get rid
of the below exception.
I have tried lucene-core 2.3, 2.4, 2.9 and 3.4 till now, none solved this.
static Repository repository;
/**
* @param args
* @throws RepositoryException
* @throws LoginException
*/
public static void main(String[] args) throws LoginException,
RepositoryException {
repository=getRepositoryHandle();
Session session=repository.login();
RulesRepository rulesRepository=new RulesRepository(session);
PackageItem packageItem=rulesRepository.createPackage("newPackage",
"newPackageDescription");
String
hello=rulesRepository.copyAsset("f51858e0-b9b2-44c7-863c-44e5680bb1b3",
"newPackage", "newPackage");
System.out.println(packageItem);
System.out.println(hello);
}
private static Repository getRepositoryHandle(){
if (repository == null)
repository = new
TransientRepository("classpath:repository.xml","praveen/repository");
return repository;
}
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/lucene/search/SortComparatorSource
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at
org.apache.jackrabbit.core.config.BeanConfig.newInstance(BeanConfig.java:177)
at
org.apache.jackrabbit.core.config.RepositoryConfigurationParser$1.getQueryHandler(RepositoryConfigurationParser.java:631)
at
org.apache.jackrabbit.core.config.RepositoryConfig.getQueryHandler(RepositoryConfig.java:1032)
at org.apache.jackrabbit.core.SearchManager.<init>(SearchManager.java:174)
at
org.apache.jackrabbit.core.RepositoryImpl.getSystemSearchManager(RepositoryImpl.java:630)
at
org.apache.jackrabbit.core.RepositoryImpl.access$100(RepositoryImpl.java:124)
at
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager(RepositoryImpl.java:1860)
at
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.doPostInitialize(RepositoryImpl.java:2095)
at
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.initialize(RepositoryImpl.java:2000)
at
org.apache.jackrabbit.core.RepositoryImpl.initStartupWorkspaces(RepositoryImpl.java:533)
at
org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:342)
at
org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:605)
at
org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:232)
at
org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:280)
at
org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:376)
at
org.apache.jackrabbit.commons.AbstractRepository.login(AbstractRepository.java:111)
at TestRepository.main(TestRepository.java:22)
Regards,
Praveen.
--
View this message in context: http://drools.46999.n3.nabble.com/Where-in-DB-does-Guvnor-store-description-of-rules-tp3489816p3495831.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
More information about the rules-users
mailing list