I'm back to trying to run the ImageOp samples as a block in Jetty. I added this to cocoon-imageop-sample/pom.xml:

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.cocoon</groupId>
        <artifactId>cocoon-maven-plugin</artifactId>
        <version>1.0.0-RC1-SNAPSHOT</version>
        <executions>
          <execution>
            <id>prepare</id>
            <phase>compile</phase>
            <goals>
              <goal>prepare</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>maven-jetty-plugin</artifactId>
        <version>6.1.7</version>
        <configuration>
          <connectors>
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
              <port>8888</port>
              <maxIdleTime>30000</maxIdleTime>
            </connector>
          </connectors>
<webAppSourceDirectory>${project.build.directory}/rcl/ webapp</webAppSourceDirectory>
          <contextPath>/</contextPath>
          <systemProperties>
            <systemProperty>
              <name>org.apache.cocoon.mode</name>
              <value>dev</value>
            </systemProperty>
          </systemProperties>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.1</version>
        <configuration>
          <archive>
            <manifestEntries>
              <Cocoon-Block-Name>${pom.artifactId}</Cocoon-Block-Name>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-eclipse-plugin</artifactId>
        <version>2.5</version>
      </plugin>
    </plugins>
  </build>

Then I did "mvn jetty:run", and I get this exception:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cocoon.imageop.sample.servlet' defined in URL [file:/Users/ml/software/Cocoon/cocoon/git/dev/blocks/ cocoon-imageop/cocoon-imageop-sample/target/classes/META-INF/cocoon/ spring/cocoon-imageop-sample-blockServlet.xml]: Initialization of bean failed; nested exception is org.springframework.beans.InvalidPropertyException: Invalid property 'contextPath' of bean class [org.apache.cocoon.sitemap.SitemapServlet]: No property 'contextPath' found at org .springframework .beans .factory .support .AbstractAutowireCapableBeanFactory .doCreateBean(AbstractAutowireCapableBeanFactory.java:480)

However, the cocoon-imageop-sample-blockServlet.xml referenced by the exception message contains this:

<bean name="org.apache.cocoon.imageop.sample.servlet" class="org.apache.cocoon.sitemap.SitemapServlet"> <servlet:context mount-path="/cocoon-imageop-sample" context- path="blockcontext:/cocoon-imageop-sample/">
      <servlet:connections>
<entry key="style-default" value- ref="org.apache.cocoon.samples.style.default.servlet"/>
      </servlet:connections>
    </servlet:context>
  </bean>

Isn't it looking to convert that "context-path" attribute? If so, how come it's not working?

Thanks a lot for any help,
— Mark

Reply via email to