Return-Path: X-Original-To: apmail-tika-dev-archive@www.apache.org Delivered-To: apmail-tika-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 09BA6D225 for ; Thu, 2 Aug 2012 17:17:03 +0000 (UTC) Received: (qmail 75004 invoked by uid 500); 2 Aug 2012 17:17:02 -0000 Delivered-To: apmail-tika-dev-archive@tika.apache.org Received: (qmail 74925 invoked by uid 500); 2 Aug 2012 17:17:02 -0000 Mailing-List: contact dev-help@tika.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tika.apache.org Delivered-To: mailing list dev@tika.apache.org Received: (qmail 74917 invoked by uid 99); 2 Aug 2012 17:17:02 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Aug 2012 17:17:02 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id A875B142823 for ; Thu, 2 Aug 2012 17:17:02 +0000 (UTC) Date: Thu, 2 Aug 2012 17:17:02 +0000 (UTC) From: "Gary Karasiuk (JIRA)" To: dev@tika.apache.org Message-ID: <972277304.6364.1343927822691.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1107837960.121466.1343743775064.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (TIKA-966) org.apache.tika.Tika missing from tika-bundle-1.2.jar MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/TIKA-966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13427467#comment-13427467 ] Gary Karasiuk commented on TIKA-966: ------------------------------------ I think I am on to something here. Whether this works or not depends on the order that the bundles are activated. This order (at least in some environments is a race condition). In order to work, you must ensure that the tika-core bundle is started BEFORE the tika-bundle. This should be documented! There may be a better way to do this, but I added the following code to my bundle: Bundle[] bundles = context.getBundles(); Bundle tikaCore = null; Bundle tikaBundle = null; for (Bundle b : bundles){ if (tikaCore == null && "org.apache.tika.core".equals(b.getSymbolicName()))tikaCore = b; if (tikaBundle == null && "org.apache.tika.bundle".equals(b.getSymbolicName()))tikaBundle = b; } if (tikaCore != null)tikaCore.start(); if (tikaBundle != null)tikaBundle.start(); Now at least the right parser gets called. Unfortunately it is still one step forward one step backwards. The PDF parser is now being called, but it throws this error: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory > org.apache.tika.Tika missing from tika-bundle-1.2.jar > ----------------------------------------------------- > > Key: TIKA-966 > URL: https://issues.apache.org/jira/browse/TIKA-966 > Project: Tika > Issue Type: Bug > Components: packaging > Affects Versions: 1.2 > Reporter: Gary Karasiuk > > In version 0.9 I was able to use the org.apache.tika.Tika class in my OSGi application simply by including the tika-bundle. > I am now trying to move to version 1.2 and this class is missing from the tika-bundle-1.2.jar > The top level documentation says "Tika bundle. An OSGi bundle that includes everything you need to use all Tika functionality in an OSGi environment." so I think that this should be continued to included. > I tried including the tika-core-1.2.jar into my application, but even after fiddling with various start levels I can't get the Tika class to find the parsers in the tika-bundle. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira