On Thu, Mar 6, 2008 at 1:06 PM, Jason Warner <[EMAIL PROTECTED]> wrote:
> Hello, > > I managed to get this deployed onto Geronimo, but the resolution is kind > of a hack. The issue seems to be with the way the web.xml file is > encoded. I think there are some special characters that are included when > this file is packaged into the war that aren't supposed to be picked up that > geronimo does. I think it's similar to the issue that arises with endline > characters from windows causing issues when the file is used on unix. The > only thing is that I also tried this on windows and it had the same issue. > If you're looking to just get past this issue and get started, you can > follow the steps I'm about to outline to get a workable war file. I did > these on a mac, but they should work just the same on ubuntu. (All steps > assume you have apache-solr-1.2.0.tgz unzipped in ~/apache-solr-1.2.0) > > 1. cd /apache-solr-1.2.0/dist/ This should be "cd ~/apache-solr-1.2.0/dist/ I also messed up the numbering. Oops. > 1. unzip apache-solr-1.2.0.war > 2. cd WEB-INF > 3. mv web.xml web.xml.bak > 4. Now you want to create a new blank web.xml file and open both web.xmland > web.xml.bak in your editor of choice (Gedit should work nicely). > Copy/paste the contents of web.xml.bak into web.xml and save the file. > 5. cd ~/apache-solr-1.2.0/dist/ > 6 rm apache-solr-1.2.0.war > 7 zip apache-solr-1.2.0.war WEB-INF/ META-INF/ admin/ index.html > > Now you can try deploying the war again. Please let me know if you have > any issues. I'm not sure if this is a geronimo specific issue or not. It > might be worth bringing up on the solr lists, though. > > This solution is far from elegant, and if anyone has a simpler solution > please speak up. This is just what I came up with on my first look at it. > > Hope this helps! > > > On Thu, Mar 6, 2008 at 11:05 AM, tglawles <[EMAIL PROTECTED]> wrote: > > > > > OS - Linux (Ubuntu 7.10) > > Java Version - Sun 1.5.0_13-b05 > > > > > > > > Jason Warner wrote: > > > > > > While I'm at it, how about some environment information. Specifically > > > java > > > version and OS. > > > > > > Thanks! > > > > > > On Thu, Mar 6, 2008 at 10:52 AM, Jason Warner <[EMAIL PROTECTED]> > > wrote: > > > > > >> I probably should have asked before, but what version of geronimo? > > Also, > > >> what version of Solr? > > >> > > >> > > >> On Thu, Mar 6, 2008 at 10:46 AM, tglawles <[EMAIL PROTECTED]> > > wrote: > > >> > > >> > > > >> > Here is the web.xml that came in the solr distribution..... > > >> > > > >> > <?xml version="1.0" encoding="UTF-8"?> > > >> > <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web > > >> Application > > >> > 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> > > >> > <!-- > > >> > 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. > > >> > --> > > >> > > > >> > <web-app> > > >> > > > >> > <!-- Uncomment if you are trying to use a Resin version before > > 3.0.19. > > >> > Their XML implementation isn't entirely compatible with Xerces. > > >> > Below are the implementations to use with Sun's JVM. > > >> > <system-property javax.xml.xpath.XPathFactory= > > >> > " > > com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl"/> > > >> > <system-property javax.xml.parsers.DocumentBuilderFactory= > > >> > > > >> > "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl > > "/> > > >> > <system-property javax.xml.parsers.SAXParserFactory= > > >> > > > >> > "com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl"/> > > >> > --> > > >> > > > >> > <!-- Any path (name) registered in solrconfig.xml will be sent to > > that > > >> > filter --> > > >> > <filter> > > >> > <filter-name>SolrRequestFilter</filter-name> > > >> > <filter-class>org.apache.solr.servlet.SolrDispatchFilter > > >> > </filter-class> > > >> > <!-- > > >> > <init-param> > > >> > <param-name>path-prefix</param-name> > > >> > <param-value>/xxx</param-value> > > >> > </init-param> > > >> > --> > > >> > </filter> > > >> > <filter-mapping> > > >> > <filter-name>SolrRequestFilter</filter-name> > > >> > <url-pattern>/*</url-pattern> > > >> > </filter-mapping> > > >> > > > >> > <!-- Otherwise it will continue to the old servlets --> > > >> > > > >> > <servlet> > > >> > <servlet-name>SolrServer</servlet-name> > > >> > <display-name>Solr</display-name> > > >> > <description>Solr Server</description> > > >> > <servlet-class>org.apache.solr.servlet.SolrServlet > > </servlet-class> > > >> > <load-on-startup>1</load-on-startup> > > >> > </servlet> > > >> > > > >> > <servlet> > > >> > <servlet-name>SolrUpdate</servlet-name> > > >> > <display-name>SolrUpdate</display-name> > > >> > <description>Solr Update Handler</description> > > >> > <servlet-class>org.apache.solr.servlet.SolrUpdateServlet > > >> > </servlet-class> > > >> > <load-on-startup>2</load-on-startup> > > >> > </servlet> > > >> > > > >> > <servlet> > > >> > <servlet-name>ping</servlet-name> > > >> > <jsp-file>/admin/ping.jsp</jsp-file> > > >> > </servlet> > > >> > > > >> > <servlet-mapping> > > >> > <servlet-name>SolrServer</servlet-name> > > >> > <url-pattern>/select/*</url-pattern> > > >> > </servlet-mapping> > > >> > > > >> > <servlet-mapping> > > >> > <servlet-name>SolrUpdate</servlet-name> > > >> > <url-pattern>/update/*</url-pattern> > > >> > </servlet-mapping> > > >> > > > >> > <servlet-mapping> > > >> > <servlet-name>ping</servlet-name> > > >> > <url-pattern>/admin/ping</url-pattern> > > >> > </servlet-mapping> > > >> > > > >> > <mime-mapping> > > >> > <extension>.xsl</extension> > > >> > <!-- per http://www.w3.org/TR/2006/PR-xslt20-20061121/ --> > > >> > <mime-type>application/xslt+xml</mime-type> > > >> > </mime-mapping> > > >> > > > >> > </web-app> > > >> > > > >> > > > >> > > > >> > > > >> > Jason Warner wrote: > > >> > > > > >> > > Hello, > > >> > > > > >> > > Based on the exception, it looks like your web.xml is either > > >> > improperly > > >> > > formatted or contains an invalid entry. Either way, deployment > > >> > doesn't > > >> > > know > > >> > > how to handle it. You could try fixing it yourself or you could > > post > > >> > the > > >> > > web.xml here and I could take a look at it (or anyone else that > > felt > > >> > like > > >> > > it > > >> > > for that matter). > > >> > > > > >> > > On Thu, Mar 6, 2008 at 9:22 AM, tglawles <[EMAIL PROTECTED]> > > wrote: > > >> > > > > >> > >> > > >> > >> I'm new to both Solr and Geronimo. When I attempt to install > > the > > >> > Solr > > >> > >> war > > >> > >> into Geronimo, I get the following exception. Has anyone else > > seen > > >> > this > > >> > >> problem and overcome it? > > >> > >> > > >> > >> Deployment failed: > > >> > >> Error parsing web.xml for . > > >> > >> Show full details > > >> > >> Error parsing web.xml for . > > >> > >> org.apache.geronimo.common.DeploymentException: Error parsing > > >> web.xmlfor > > >> > >> . > > >> > >> at > > >> > >> > > >> > > > org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.createModule( > > >> > >> TomcatModuleBuilder.java:161) > > >> > >> > > >> > >> at > > >> > >> > > >> > > > >> > > org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.createModule > > >> > >> (AbstractWebModuleBuilder.java:179) > > >> > >> > > >> > >> at > > >> > >> > > >> > >> > > >> > > > >> > > org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder$$FastClassByCGLIB$$8523248f.invoke > > >> > >> (<generated>) > > >> > >> > > >> > >> at > > >> net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java > > >> > :53) > > >> > >> at > > >> > >> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke( > > >> > >> FastMethodInvoker.java:38) > > >> > >> > > >> > >> at > > >> > >> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke( > > >> > >> GBeanOperation.java:124) > > >> > >> > > >> > >> at > > >> > >> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke( > > >> > GBeanInstance.java > > >> > >> :830) > > >> > >> > > >> > >> at > > >> > >> org.apache.geronimo.gbean.runtime.RawInvoker.invoke( > > RawInvoker.java > > >> > :57) > > >> > >> at > > >> > >> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke( > > >> > >> RawOperationInvoker.java:35) > > >> > >> > > >> > >> at > > >> > >> > > org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept( > > >> > >> ProxyMethodInterceptor.java:96) > > >> > >> > > >> > >> at > > >> > >> > > >> > >> > > >> > > > >> > > org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$b86e2c25.createModule > > >> > >> (<generated>) > > >> > >> > > >> > >> at > > >> > >> > > >> > > > >> > > org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.createModule( > > >> > >> SwitchingModuleBuilder.java:94) > > >> > >> > > >> > >> at > > >> > >> > > >> > >> > > >> > > > >> > > org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder$$FastClassByCGLIB$$d0c31844.invoke > > >> > >> (<generated>) > > >> > >> > > >> > >> at > > >> net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java > > >> > :53) > > >> > >> at > > >> > >> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke( > > >> > >> FastMethodInvoker.java:38) > > >> > >> > > >> > >> at > > >> > >> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke( > > >> > >> GBeanOperation.java:124) > > >> > >> > > >> > >> at > > >> > >> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke( > > >> > GBeanInstance.java > > >> > >> :830) > > >> > >> > > >> > >> at > > >> > >> org.apache.geronimo.gbean.runtime.RawInvoker.invoke( > > RawInvoker.java > > >> > :57) > > >> > >> at > > >> > >> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke( > > >> > >> RawOperationInvoker.java:35) > > >> > >> > > >> > >> at > > >> > >> > > org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept( > > >> > >> ProxyMethodInterceptor.java:96) > > >> > >> > > >> > >> at > > >> > >> > > >> > >> > > >> > > > >> > > org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$b86e2c25.createModule > > >> > >> (<generated>) > > >> > >> > > >> > >> at > > >> > >> > > >> > > > org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getDeploymentPlan( > > >> > >> EARConfigBuilder.java:289) > > >> > >> > > >> > >> at > > >> > >> > > >> > >> > > >> > > > >> > > org.apache.geronimo.j2ee.deployment.EARConfigBuilder$$FastClassByCGLIB$$38e56ec6.invoke > > >> > >> (<generated>) > > >> > >> > > >> > >> at > > >> net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java > > >> > :53) > > >> > >> at > > >> > >> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke( > > >> > >> FastMethodInvoker.java:38) > > >> > >> > > >> > >> at > > >> > >> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke( > > >> > >> GBeanOperation.java:124) > > >> > >> > > >> > >> at > > >> > >> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke( > > >> > GBeanInstance.java > > >> > >> :830) > > >> > >> > > >> > >> at > > >> > >> org.apache.geronimo.gbean.runtime.RawInvoker.invoke( > > RawInvoker.java > > >> > :57) > > >> > >> at > > >> > >> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke( > > >> > >> RawOperationInvoker.java:35) > > >> > >> > > >> > >> at > > >> > >> > > org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept( > > >> > >> ProxyMethodInterceptor.java:96) > > >> > >> > > >> > >> at > > >> > >> > > >> > >> > > >> > > > >> > > org.apache.geronimo.j2ee.deployment.CorbaGBeanNameSource$$EnhancerByCGLIB$$ef9ba63a.getDeploymentPlan > > >> > >> (<generated>) > > >> > >> > > >> > >> at > > >> > >> org.apache.geronimo.deployment.Deployer.deploy(Deployer.java > > :234) > > >> > >> at > > >> > >> org.apache.geronimo.deployment.Deployer.deploy(Deployer.java > > :126) > > >> > >> at > > >> > >> > > >> > > > >> > > org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.invoke > > >> > >> (<generated>) > > >> > >> > > >> > >> at > > >> net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java > > >> > :53) > > >> > >> at > > >> > >> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke( > > >> > >> FastMethodInvoker.java:38) > > >> > >> > > >> > >> at > > >> > >> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke( > > >> > >> GBeanOperation.java:124) > > >> > >> > > >> > >> at > > >> > >> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke( > > >> > GBeanInstance.java > > >> > >> :865) > > >> > >> > > >> > >> at > > >> > >> org.apache.geronimo.kernel.basic.BasicKernel.invoke( > > BasicKernel.java > > >> > :239) > > >> > >> at > > >> > >> > > >> > > > >> > > org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy > > >> > >> (AbstractDeployCommand.java:116) > > >> > >> > > >> > >> at > > >> > >> > > org.apache.geronimo.deployment.plugin.local.DistributeCommand.run( > > >> > >> DistributeCommand.java:61) > > >> > >> > > >> > >> at java.lang.Thread.run(Thread.java:595) > > >> > >> Caused by: org.apache.xmlbeans.XmlException: error: Unexpected > > >> > element: > > >> > >> CDATA > > >> > >> at > > >> > >> org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java > > >> > :3471) > > >> > >> at > > >> > >> org.apache.xmlbeans.impl.store.Locale.parse(Locale.java:706) > > >> > >> at > > >> > >> org.apache.xmlbeans.impl.store.Locale.parseToXmlObject( > > Locale.java > > >> > :690) > > >> > >> at > > >> > >> org.apache.xmlbeans.impl.store.Locale.parseToXmlObject( > > Locale.java > > >> > :677) > > >> > >> at > > >> > >> org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse( > > >> > >> SchemaTypeLoaderBase.java:208) > > >> > >> > > >> > >> at > > >> > >> org.apache.xmlbeans.XmlObject$Factory.parse(XmlObject.java:633) > > >> > >> at > > >> > >> org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil.parse( > > >> > >> XmlBeansUtil.java:133) > > >> > >> > > >> > >> at > > >> > >> > > >> > > > org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.createModule( > > >> > >> TomcatModuleBuilder.java:144) > > >> > >> > > >> > >> ... 41 more > > >> > >> Caused by: org.xml.sax.SAXParseException: Unexpected element: > > CDATA > > >> > >> at > > >> > >> org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportFatalError( > > >> > Piccolo.java > > >> > >> :1038) > > >> > >> > > >> > >> at > > >> > >> org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java > > :723) > > >> > >> at > > >> > >> org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java > > >> > :3439) > > >> > >> ... 48 more > > >> > >> > > >> > >> -- > > >> > >> View this message in context: > > >> > >> > > >> > > > >> > > http://www.nabble.com/Installing-Apache-Solr-into-Geronimo-tp15873149s134p15873149.html > > >> > >> Sent from the Apache Geronimo - Users mailing list archive at > > >> > Nabble.com. > > >> > >> > > >> > >> > > >> > > > > >> > > > > >> > > -- > > >> > > ~Jason Warner > > >> > > > > >> > > > > >> > > > >> > -- > > >> > View this message in context: > > >> > > > >> > > http://www.nabble.com/Installing-Apache-Solr-into-Geronimo-tp15873149s134p15875531.html > > >> > Sent from the Apache Geronimo - Users mailing list archive at > > >> Nabble.com > > >> > . > > >> > > > >> > > > >> > > >> > > >> -- > > >> ~Jason Warner > > > > > > > > > > > > > > > -- > > > ~Jason Warner > > > > > > > > > > -- > > View this message in context: > > http://www.nabble.com/Installing-Apache-Solr-into-Geronimo-tp15873149s134p15877010.html > > Sent from the Apache Geronimo - Users mailing list archive at Nabble.com > > . > > > > > > > -- > ~Jason Warner -- ~Jason Warner
