Standard web applications not running correctly under plugins directory

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Standard web applications not running correctly under plugins directory

IvanD

Hello,

 

I am using version 17.12.07 of OfBiz.

 

I have been unable to get standard web applications that run fine under standalone Tomcat to run under OfBiz.  I will give an example of a simple test using OpenCMS for illustration purposes.  This is not to start a debate about OpenCMS versus OfBiz CMS, but rather to show the problem.

 

Per OfBiz instructions I created a subdirectory under plugins and called it rscms.  I created a webapp subdirectory under rscms. 

Directory structure: /apache-ofbiz-17.12.07/plugins/rscms/webapp

 

I created the appropriate ofbiz-component.xml file in the rscms subdirectory.

 

Contents of ofbiz-component.xml file.

---------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>

<!--

Licensed to the Apache Software Foundation (ASF) under one

or more contributor license agreements.  See the NOTICE file

distributed with this work for additional information

regarding copyright ownership.  The ASF licenses this file

to you under the Apache License, Version 2.0 (the

"License"); you may not use this file except in compliance

with the License.  You may obtain a copy of the License at

 

http://www.apache.org/licenses/LICENSE-2.0

 

Unless required by applicable law or agreed to in writing,

software distributed under the License is distributed on an

"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

KIND, either express or implied.  See the License for the

specific language governing permissions and limitations

under the License.

-->

 

<ofbiz-component name="rscms"

        xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance

        xsi:noNamespaceSchemaLocation=http://ofbiz.apache.org/dtds/ofbiz-component.xsd>

   

    <webapp name="rscms"

        title="OpenCMS Test"

        server="default-server"

        location="webapp"

        mount-point="/rscms"/>

</ofbiz-component>

---------------------------------------------------------------------------------------------------------------------------------------------------------

When I run ofbiz and start the installation of OpenCMS I get the following error:

 

OpenCms WEB-INF path: "/apache-ofbiz-17.12.07/plugins/rscms/webapp/WEB-INF/".
OpenCms property file: "/apache-ofbiz-17.12.07/plugins/rscms/webapp/WEB-INF/config/opencms.properties".

com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: Could not initialize class org.apache.lucene.analysis.util.TokenizerFactory
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2212)
at com.google.common.cache.LocalCache.get(LocalCache.java:4053)
at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4899)
at org.apache.solr.core.ConfigSetService$SchemaCaching.createIndexSchema(ConfigSetService.java:227)
at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:91)
at org.apache.solr.core.CoreContainer.getConfigSet(CoreContainer.java:1238)
at org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1185)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:1099)
at org.opencms.search.CmsSearchManager.registerSolrIndex(CmsSearchManager.java:1824)
at org.opencms.search.solr.CmsSolrIndex.initialize(CmsSolrIndex.java:650)
at org.opencms.search.CmsSearchManager.initSearchIndexes(CmsSearchManager.java:2666)
at org.opencms.search.CmsSearchManager.initializeIndexes(CmsSearchManager.java:1525)
at org.opencms.search.CmsSearchManager.initialize(CmsSearchManager.java:1494)
at org.opencms.main.OpenCmsCore.initConfiguration(OpenCmsCore.java:2364)
at org.opencms.main.OpenCmsCore.upgradeRunlevel(OpenCmsCore.java:3096)
at org.opencms.main.CmsShell.<init>(CmsShell.java:564)
at org.opencms.setup.CmsVaadinSetupWorkplaceImportThread.run(CmsVaadinSetupWorkplaceImportThread.java:89)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.lucene.analysis.util.TokenizerFactory
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:528)
at org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:626)
at org.apache.solr.schema.FieldTypePluginLoader$2.create(FieldTypePluginLoader.java:299)
at org.apache.solr.schema.FieldTypePluginLoader$2.create(FieldTypePluginLoader.java:292)
at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:152)
at org.apache.solr.schema.FieldTypePluginLoader.readAnalyzer(FieldTypePluginLoader.java:319)
at org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:90)
at org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:48)
at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:152)
at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:480)
at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:179)
at org.apache.solr.schema.IndexSchemaFactory.create(IndexSchemaFactory.java:56)
at org.apache.solr.schema.IndexSchemaFactory.buildIndexSchema(IndexSchemaFactory.java:70)
at org.apache.solr.core.ConfigSetService$SchemaCaching.lambda$createIndexSchema$0(ConfigSetService.java:229)
at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4904)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3628)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2336)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2295)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2208)
... 16 more

 

This is because the library lucene-analyzers-common-8.0.0.jar that contains org.apache.lucene.analysis.util.TokenizerFactory  is seen as missing.  It is however under the /plugins/rscms/webapp/WEB-INF/lib directory where it should be.  So it appears that the embedded Tomcat with OfBiz does not process a standalone web application the same as standalone Tomcat when it comes to those libraries included with the standard web application.  Is there a way to fix this?  Perhaps a configuration change I need to make?

 

Thanks for your help.

 

To schedule a meeting with me click here.

 

Warm Regards,

 

 

Ivan Drinks Sr.
Executive Vice President

Locations:
Kansas City, Missouri          Phone: 816-929-8375   Fax:  816-265-2741
Denver, Colorado                Phone: 303-757-1107   Fax:  303-757-1108

Email: ivan.sr@...       Website: www.reality-technology.com

 

IMPORTANT NOTICES:
1.  This electronic communication, including the message above and any attached files, is  privileged and confidential.  It is intended for the named recipient only.  Anyone receiving this communication in error is NOT authorized to read, rely upon, copy or distribute the message or attached files, but must immediately notify Ivan Drinks Sr. at [hidden email].

2.  This e­mail message and any attached files are not encrypted and are subject to being deliberately intercepted or misrouted because of human or computer error, despite the exercise of the highest degree of care.  Failure of the recipient to safeguard their e­mail password can result in unintended disclosure of the confidential and privileged information contained in this  message and any attached files.

3.  Unauthorized interception of this e­mail is a violation of federal law, and is a crime under U.S. Code Title 18, sections 2510 et seq.