Invocation of init method failed

View: New views
14 Messages — Rating Filter:   Alert me  

Invocation of init method failed

by Johannes Hoechstaedter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello everybody,

My Webapp grows. :) Thank you all for all your help till now.

The next thing I am struggeling with is this:

Error creating bean with name 'de.memocomp.myBlock1.service': Invocation
of init method failed; nested exception is java.lang.NoSuchMethodError:

This error appears only in Tomcat 5.0 with JRE 1.4. Everything works
with Tomact 5.5 and JDK 1.5.

I managed to create a war file completely with JDK 1.4 as JAVA_HOME. The
manifest file looks good. Only Tomcat doesn't want to start the webapp.
Any suggestions?

Thank you in advance
Johannes

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Invocation of init method failed

by Johannes Hoechstaedter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

the log from localhost:

2008-07-04 15:25:38
StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter:
init(): ruleChain: [org.apache.webapp.balancer.RuleChain:
[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string:
News / Redirect URL: http://www.cnn.com],
[org.apache.webapp.balancer.rules.RequestParameterRule: Target param
name: paramName / Target param value: paramValue / Redirect URL:
http://www.yahoo.com],
[org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL:
http://jakarta.apache.org]]
2008-07-04 15:25:38 StandardContext[/myCocoonWebapp-1.0]Initializing
Spring root WebApplicationContext
2008-07-04 15:25:42 StandardContext[/myCocoonWebapp-1.0]Apache Cocoon
Spring Configurator v1.0.2 is running in mode 'prod'.
2008-07-04 15:25:43 StandardContext[/myCocoonWebapp-1.0]Exception
sending context initialized event to listener instance of class
org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'de.memocomp.myBlock1.service': Invocation of init method
failed; nested exception is java.lang.NoSuchMethodError:
org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar([Lorg/apache/xerces/xni/parser/XMLInputSource;)V
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1260)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:438)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:383)
    at java.security.AccessController.doPrivileged(Native Method)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:353)
    at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
    at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
    at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:394)
    at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:736)
    at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:369)
    at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261)
    at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
    at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
    at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
    at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4343)
    at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
    at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
    at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
    at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
    at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:617)
    at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:431)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:968)
    at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
    at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
    at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
    at
org.apache.catalina.core.StandardService.start(StandardService.java:480)
    at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)
Caused by: java.lang.NoSuchMethodError:
org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar([Lorg/apache/xerces/xni/parser/XMLInputSource;)V
    at
org.apache.xerces.jaxp.validation.XMLSchemaFactory.newSchema(Unknown Source)
    at javax.xml.validation.SchemaFactory.newSchema(Unknown Source)
    at
org.apache.cocoon.components.treeprocessor.TreeProcessor.<init>(TreeProcessor.java:122)
    at
org.apache.cocoon.sitemap.SitemapServlet$RequestProcessor.getProcessor(SitemapServlet.java:122)
    at
org.apache.cocoon.servlet.RequestProcessor.<init>(RequestProcessor.java:108)
    at
org.apache.cocoon.sitemap.SitemapServlet$RequestProcessor.<init>(SitemapServlet.java:100)
    at org.apache.cocoon.sitemap.SitemapServlet.init(SitemapServlet.java:75)
    at javax.servlet.GenericServlet.init(GenericServlet.java:211)
    at
org.apache.cocoon.servletservice.spring.ServletFactoryBean.init(ServletFactoryBean.java:156)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1325)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1294)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1257)
    ... 39 more

2008-07-04 15:25:43 StandardContext[/myCocoonWebapp-1.0]Closing Spring
root WebApplicationContext
2008-07-04 15:25:43 StandardContext[/jsp-examples]ContextListener:
contextInitialized()
2008-07-04 15:25:43 StandardContext[/jsp-examples]SessionListener:
contextInitialized()
2008-07-04 15:25:43 StandardContext[/servlets-examples]ContextListener:
contextInitialized()
2008-07-04 15:25:43 StandardContext[/servlets-examples]SessionListener:
contextInitialized()
2008-07-04 15:26:04 StandardContext[/manager]HTMLManager: init:
Associated with Deployer 'localhost'
2008-07-04 15:26:04 StandardContext[/manager]HTMLManager: init: Global
resources are available
2008-07-04 15:26:04 StandardContext[/manager]HTMLManager: list: Listing
contexts for virtual host 'localhost'

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Invocation of init method failed

by Reinhard Pötz-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Johannes Hoechstaedter wrote:

> Hello everybody,
>
> My Webapp grows. :) Thank you all for all your help till now.
>
> The next thing I am struggeling with is this:
>
> Error creating bean with name 'de.memocomp.myBlock1.service': Invocation
> of init method failed; nested exception is java.lang.NoSuchMethodError:
>
> This error appears only in Tomcat 5.0 with JRE 1.4. Everything works
> with Tomact 5.5 and JDK 1.5.
>
> I managed to create a war file completely with JDK 1.4 as JAVA_HOME. The
> manifest file looks good. Only Tomcat doesn't want to start the webapp.
> Any suggestions?

My guess is that you have a problem with your XML parser.


--
Reinhard Pötz                           Managing Director, {Indoqa} GmbH
                          http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member                  reinhard@...
________________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Invocation of init method failed

by Johannes Hoechstaedter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



Reinhard Pötz schrieb:

> Johannes Hoechstaedter wrote:
>> Hello everybody,
>>
>> My Webapp grows. :) Thank you all for all your help till now.
>>
>> The next thing I am struggeling with is this:
>>
>> Error creating bean with name 'de.memocomp.myBlock1.service':
>> Invocation of init method failed; nested exception is
>> java.lang.NoSuchMethodError:
>>
>> This error appears only in Tomcat 5.0 with JRE 1.4. Everything works
>> with Tomact 5.5 and JDK 1.5.
>>
>> I managed to create a war file completely with JDK 1.4 as JAVA_HOME.
>> The manifest file looks good. Only Tomcat doesn't want to start the
>> webapp. Any suggestions?
>
> My guess is that you have a problem with your XML parser.

But the parser is the default parser. I have not changed anything. Are
there compatibility problems?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Invocation of init method failed

by Reinhard Pötz-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Reinhard Pötz wrote:

> Johannes Hoechstaedter wrote:
>> Hello everybody,
>>
>> My Webapp grows. :) Thank you all for all your help till now.
>>
>> The next thing I am struggeling with is this:
>>
>> Error creating bean with name 'de.memocomp.myBlock1.service':
>> Invocation of init method failed; nested exception is
>> java.lang.NoSuchMethodError:
>>
>> This error appears only in Tomcat 5.0 with JRE 1.4. Everything works
>> with Tomact 5.5 and JDK 1.5.
>>
>> I managed to create a war file completely with JDK 1.4 as JAVA_HOME.
>> The manifest file looks good. Only Tomcat doesn't want to start the
>> webapp. Any suggestions?
>
> My guess is that you have a problem with your XML parser.

[uuups, the mail went out too fast.]

Make sure that you use a new(er) version of Xerces and Xalan. With JDK
1.4 you have to set the endorsed-lib directory correctly.

Another option is using the shielding classloader by utilizing the
Cocoon Maven plugin to build the web application:
http://cocoon.apache.org/2.2/maven-plugins/maven-plugin/1.0/1262_1_1.html 
and
http://cocoon.apache.org/2.2/maven-plugins/maven-plugin/1.0/deploy-mojo.html

--
Reinhard Pötz                           Managing Director, {Indoqa} GmbH
                          http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member                  reinhard@...
________________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Invocation of init method failed

by Johannes Hoechstaedter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yeah you are right. I copied the xml api and xalan jars from the
web-inf/lib into the edorsed dir of tomcat, and it works.

The shielded class loading did not what I expected. I set it to true and
false, but in both cases the same old error appears. Is the shielded
class loading the only mechanism by which I can make sure, that Tomcat
calls the newer jars from my webapp?

Reinhard Pötz schrieb:

> Reinhard Pötz wrote:
>> Johannes Hoechstaedter wrote:
>>> Hello everybody,
>>>
>>> My Webapp grows. :) Thank you all for all your help till now.
>>>
>>> The next thing I am struggeling with is this:
>>>
>>> Error creating bean with name 'de.memocomp.myBlock1.service':
>>> Invocation of init method failed; nested exception is
>>> java.lang.NoSuchMethodError:
>>>
>>> This error appears only in Tomcat 5.0 with JRE 1.4. Everything works
>>> with Tomact 5.5 and JDK 1.5.
>>>
>>> I managed to create a war file completely with JDK 1.4 as JAVA_HOME.
>>> The manifest file looks good. Only Tomcat doesn't want to start the
>>> webapp. Any suggestions?
>>
>> My guess is that you have a problem with your XML parser.
>
> [uuups, the mail went out too fast.]
>
> Make sure that you use a new(er) version of Xerces and Xalan. With JDK
> 1.4 you have to set the endorsed-lib directory correctly.
>
> Another option is using the shielding classloader by utilizing the
> Cocoon Maven plugin to build the web application:
> http://cocoon.apache.org/2.2/maven-plugins/maven-plugin/1.0/1262_1_1.html 
> and
> http://cocoon.apache.org/2.2/maven-plugins/maven-plugin/1.0/deploy-mojo.html 
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Invocation of init method failed

by Reinhard Pötz-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


In a web application a parent classloader has precedence over a child
classloader. This means that if you put a library into WEB-INF/lib and
it is already available in one of the parent classloaders (e.g. the
container classloader or the JVM application classloader), the latter
will be used.

The shielding classloader reverses this hierarchy. If it doesn't work
you might run into a bug :-(

Johannes Hoechstaedter wrote:

> Yeah you are right. I copied the xml api and xalan jars from the
> web-inf/lib into the edorsed dir of tomcat, and it works.
>
> The shielded class loading did not what I expected. I set it to true and
> false, but in both cases the same old error appears. Is the shielded
> class loading the only mechanism by which I can make sure, that Tomcat
> calls the newer jars from my webapp?
>
> Reinhard Pötz schrieb:
>> Reinhard Pötz wrote:
>>> Johannes Hoechstaedter wrote:
>>>> Hello everybody,
>>>>
>>>> My Webapp grows. :) Thank you all for all your help till now.
>>>>
>>>> The next thing I am struggeling with is this:
>>>>
>>>> Error creating bean with name 'de.memocomp.myBlock1.service':
>>>> Invocation of init method failed; nested exception is
>>>> java.lang.NoSuchMethodError:
>>>>
>>>> This error appears only in Tomcat 5.0 with JRE 1.4. Everything works
>>>> with Tomact 5.5 and JDK 1.5.
>>>>
>>>> I managed to create a war file completely with JDK 1.4 as JAVA_HOME.
>>>> The manifest file looks good. Only Tomcat doesn't want to start the
>>>> webapp. Any suggestions?
>>>
>>> My guess is that you have a problem with your XML parser.
>>
>> [uuups, the mail went out too fast.]
>>
>> Make sure that you use a new(er) version of Xerces and Xalan. With JDK
>> 1.4 you have to set the endorsed-lib directory correctly.
>>
>> Another option is using the shielding classloader by utilizing the
>> Cocoon Maven plugin to build the web application:
>> http://cocoon.apache.org/2.2/maven-plugins/maven-plugin/1.0/1262_1_1.html 
>> and
>> http://cocoon.apache.org/2.2/maven-plugins/maven-plugin/1.0/deploy-mojo.html 
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>


--
Reinhard Pötz                           Managing Director, {Indoqa} GmbH
                          http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member                  reinhard@...
________________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Invocation of init method failed

by Johannes Hoechstaedter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I will test it till I am stupid.

Reinhard Pötz schrieb:

>
> In a web application a parent classloader has precedence over a child
> classloader. This means that if you put a library into WEB-INF/lib and
> it is already available in one of the parent classloaders (e.g. the
> container classloader or the JVM application classloader), the latter
> will be used.
>
> The shielding classloader reverses this hierarchy. If it doesn't work
> you might run into a bug :-(
>
> Johannes Hoechstaedter wrote:
>> Yeah you are right. I copied the xml api and xalan jars from the
>> web-inf/lib into the edorsed dir of tomcat, and it works.
>>
>> The shielded class loading did not what I expected. I set it to true
>> and false, but in both cases the same old error appears. Is the
>> shielded class loading the only mechanism by which I can make sure,
>> that Tomcat calls the newer jars from my webapp?
>>
>> Reinhard Pötz schrieb:
>>> Reinhard Pötz wrote:
>>>> Johannes Hoechstaedter wrote:
>>>>> Hello everybody,
>>>>>
>>>>> My Webapp grows. :) Thank you all for all your help till now.
>>>>>
>>>>> The next thing I am struggeling with is this:
>>>>>
>>>>> Error creating bean with name 'de.memocomp.myBlock1.service':
>>>>> Invocation of init method failed; nested exception is
>>>>> java.lang.NoSuchMethodError:
>>>>>
>>>>> This error appears only in Tomcat 5.0 with JRE 1.4. Everything
>>>>> works with Tomact 5.5 and JDK 1.5.
>>>>>
>>>>> I managed to create a war file completely with JDK 1.4 as
>>>>> JAVA_HOME. The manifest file looks good. Only Tomcat doesn't want
>>>>> to start the webapp. Any suggestions?
>>>>
>>>> My guess is that you have a problem with your XML parser.
>>>
>>> [uuups, the mail went out too fast.]
>>>
>>> Make sure that you use a new(er) version of Xerces and Xalan. With
>>> JDK 1.4 you have to set the endorsed-lib directory correctly.
>>>
>>> Another option is using the shielding classloader by utilizing the
>>> Cocoon Maven plugin to build the web application:
>>> http://cocoon.apache.org/2.2/maven-plugins/maven-plugin/1.0/1262_1_1.html 
>>> and
>>> http://cocoon.apache.org/2.2/maven-plugins/maven-plugin/1.0/deploy-mojo.html 
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@...
>> For additional commands, e-mail: users-help@...
>>
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Invocation of init method failed

by Johannes Hoechstaedter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I think the plugin works now. I can deploy the webapp and the web.xml
shows additional entries about shielded class loading.

I do mvn cocoon:deploy-war and maven compiles. (I can't do mvn install
anymore)

When I load the war file by Tomcat 5.0 and JDK 1.4 I get:

2008-07-07 08:50:53
StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter:
init(): ruleChain: [org.apache.webapp.balancer.RuleChain:
[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string:
News / Redirect URL: http://www.cnn.com],
[org.apache.webapp.balancer.rules.RequestParameterRule: Target param
name: paramName / Target param value: paramValue / Redirect URL:
http://www.yahoo.com],
[org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL:
http://jakarta.apache.org]]
2008-07-07 08:51:00 StandardContext[/myCocoonWebapp-1.0]Exception
sending context initialized event to listener instance of class
org.apache.cocoon.maven.deployer.servlet.ShieldingListener
java.lang.StackOverflowError

2008-07-07 08:51:00 StandardContext[/jsp-examples]ContextListener:
contextInitialized()
2008-07-07 08:51:00 StandardContext[/jsp-examples]SessionListener:
contextInitialized()
2008-07-07 08:51:00 StandardContext[/servlets-examples]ContextListener:
contextInitialized()
2008-07-07 08:51:00 StandardContext[/servlets-examples]SessionListener:
contextInitialized()



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

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>
 
  <packaging>war</packaging>

  <name>myCocoonWebapp</name>
 
  <groupId>de.memocomp</groupId>
 
  <artifactId>myCocoonWebapp</artifactId>
 
  <version>1.0</version>
 

  <build>
 
    <plugins>
   
    <!-- default plugins -->
      <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}/${pom.artifactId}-${pom.version}</webAppSourceDirectory>
         
          <contextPath>/myCocoonWebapp-1.0-SNAPSHOT</contextPath>
         
        </configuration>
       
      </plugin>
     
      <!-- custom plugins -->
        <plugin>
        <groupId>org.apache.cocoon</groupId>
        <artifactId>cocoon-maven-plugin</artifactId>
        <version>1.0.0-M2</version>
        <configuration>
        <project>${project}</project>
        <warSourceDirectory>${basedir}/src/main/webapp</warSourceDirectory>
        <webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
        <useShieldingClassLoader>true</useShieldingClassLoader>
        </configuration>

      </plugin>

     
    </plugins>
   
  </build>


  <dependencies>
 
  <!-- custom dependencies -->
    <dependency>
   
        <groupId>de.memocomp</groupId>
       
        <artifactId>myBlock1</artifactId>
       
        <version>1.0</version>
       
      </dependency>
     
  </dependencies>

</project>

<?xml version="1.0" encoding="UTF-8"?>
<!--
  - This is the Cocoon web-app configurations file
  -
  - $Id$
  -->
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

  <!-- Servlet Filters ================================================ -->

  <!--
    - Declare a filter for multipart MIME handling
    -->
  <context-param>
<param-name>shieled-classloader-use-repository</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>org.apache.cocoon.maven.deployer.servlet.ShieldingListener</param-name>
<param-value>org.apache.cocoon.maven.deployer.servlet.ShieldingListener</param-value>
</context-param>



<filter>
 
    <description>Multipart MIME handling filter for Cocoon</description>
   
    <display-name>Cocoon multipart filter</display-name>
   
    <filter-name>CocoonMultipartFilter</filter-name>
   
    <filter-class>org.apache.cocoon.maven.deployer.servlet.ShieldingServletFilter</filter-class>
   
  <init-param>
<param-name>filter-class</param-name>
<param-value>org.apache.cocoon.servlet.multipart.MultipartFilter</param-value>
</init-param>
<init-param>
<param-name>filter-class</param-name>
<param-value>org.apache.cocoon.maven.deployer.servlet.ShieldingServletFilter</param-value>
</init-param>
<init-param>
<param-name>filter-class</param-name>
<param-value>org.apache.cocoon.maven.deployer.servlet.ShieldingServletFilter</param-value>
</init-param>
<init-param>
<param-name>filter-class</param-name>
<param-value>org.apache.cocoon.maven.deployer.servlet.ShieldingServletFilter</param-value>
</init-param>
</filter>


  <!--
    - Declare a filter for debugging incoming request
    -->
  <filter>
 
    <description>Log debug information about each request</description>
   
    <display-name>Cocoon debug filter</display-name>
   
    <filter-name>CocoonDebugFilter</filter-name>
   
    <filter-class>org.apache.cocoon.maven.deployer.servlet.ShieldingServletFilter</filter-class>
   
  <init-param>
<param-name>filter-class</param-name>
<param-value>org.apache.cocoon.servlet.DebugFilter</param-value>
</init-param>
<init-param>
<param-name>filter-class</param-name>
<param-value>org.apache.cocoon.maven.deployer.servlet.ShieldingServletFilter</param-value>
</init-param>
<init-param>
<param-name>filter-class</param-name>
<param-value>org.apache.cocoon.maven.deployer.servlet.ShieldingServletFilter</param-value>
</init-param>
<init-param>
<param-name>filter-class</param-name>
<param-value>org.apache.cocoon.maven.deployer.servlet.ShieldingServletFilter</param-value>
</init-param>
</filter>


  <!-- Filter mappings ================================================ -->

  <!--
    - Use the Cocoon multipart filter together with the Cocoon demo webapp
    -->
  <filter-mapping>
 
    <filter-name>CocoonMultipartFilter</filter-name>
   
    <servlet-name>Cocoon</servlet-name>
   
  </filter-mapping>
 
  <filter-mapping>
 
    <filter-name>CocoonMultipartFilter</filter-name>
   
    <servlet-name>DispatcherServlet</servlet-name>
   
  </filter-mapping>


  <!--
    - Use the Cocoon debug filter together with the Cocoon demo webapp
  <filter-mapping>
    <filter-name>CocoonDebugFilter</filter-name>
    <servlet-name>Cocoon</servlet-name>
  </filter-mapping>
    -->

  <!-- Servlet Context Listener ======================================= -->

  <!--
    - Declare Spring context listener which sets up the Spring Application Context
    - containing all Cocoon components (and user defined beans as well).
    -->
  <listener>
 
    <listener-class>org.apache.cocoon.maven.deployer.servlet.ShieldingListener</listener-class>
   
  </listener>

  <!--
    - Declare Spring request listener which sets up the required RequestAttributes
    - to support Springs and Cocoon custom bean scopes like the request scope or the
    - session scope.
    -->
 

  <!-- Servlet Configuration ========================================== -->

  <!--
    - Servlet that dispatches requests to the Spring managed block servlets
    -->
  <servlet>
 
    <description>Cocoon blocks dispatcher</description>
   
    <display-name>DispatcherServlet</display-name>
   
    <servlet-name>DispatcherServlet</servlet-name>
   
    <servlet-class>org.apache.cocoon.maven.deployer.servlet.ShieldingServlet</servlet-class>
   
    <init-param>
<param-name>servlet-class</param-name>
<param-value>org.apache.cocoon.servletservice.DispatcherServlet</param-value>
</init-param>
<init-param>
<param-name>servlet-class</param-name>
<param-value>org.apache.cocoon.maven.deployer.servlet.ShieldingServlet</param-value>
</init-param>
<init-param>
<param-name>servlet-class</param-name>
<param-value>org.apache.cocoon.maven.deployer.servlet.ShieldingServlet</param-value>
</init-param>
<init-param>
<param-name>servlet-class</param-name>
<param-value>org.apache.cocoon.maven.deployer.servlet.ShieldingServlet</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
   
  </servlet>

  <!-- URL space mappings ============================================= -->

  <!--
    - Cocoon handles all the URL space assigned to the webapp using its sitemap.
    - It is recommended to leave it unchanged. Under some circumstances though
    - (like integration with proprietary webapps or servlets) you might have
    - to change this parameter.
    -->
  <servlet-mapping>
 
    <servlet-name>DispatcherServlet</servlet-name>
   
    <url-pattern>/*</url-pattern>
   
  </servlet-mapping>


  <security-constraint>
 
    <display-name>mcDBAdmin Security</display-name>
   
    <web-resource-collection>
   
      <web-resource-name>Protected Area</web-resource-name>
     
      <!-- Define the context-relative URL(s) to be protected -->
      <url-pattern>/*</url-pattern>
 
      <!-- If you list http methods, only those methods are protected -->
      <http-method>DELETE</http-method>
     
      <http-method>GET</http-method>
     
      <http-method>POST</http-method>
     
      <http-method>PUT</http-method>
     
    </web-resource-collection>
   
    <auth-constraint>
   
      <!-- Anyone with one of the listed roles may access this area -->
      <role-name>user</role-name>
     
      <role-name>admin</role-name>
     
    </auth-constraint>
 
    <!--
      <user-data-constraint>
        <transport-guarantee>CONFIDENTIAL</transport-guarantee>
      </user-data-constraint>
    -->
  </security-constraint>
<!--
  <login-config>
 
    <auth-method>BASIC</auth-method>
   
    <realm-name>BASIC Authentication mcDBWebEditor</realm-name>
   
  </login-config>
   -->
  <!-- Default login configuration uses form-based authentication -->
 
    <login-config>
   
      <auth-method>FORM</auth-method>
     
      <realm-name>Example Form-Based Authentication Area</realm-name>
     
      <form-login-config>
     
        <form-login-page>/myBlock1/login</form-login-page>
       
        <form-error-page>/myBlock1/login</form-error-page>
       
      </form-login-config>
     
    </login-config>

    <!--filter and filter mapping were added because Tomcat has not allowed
        to access the login pattern before logged in-->
    <filter>
   
      <filter-name>springRequestContextFilter</filter-name>  
     
      <filter-class>org.apache.cocoon.maven.deployer.servlet.ShieldingServletFilter</filter-class>
     
    <init-param>
<param-name>filter-class</param-name>
<param-value>org.springframework.web.filter.RequestContextFilter</param-value>
</init-param>
<init-param>
<param-name>filter-class</param-name>
<param-value>org.apache.cocoon.maven.deployer.servlet.ShieldingServletFilter</param-value>
</init-param>
<init-param>
<param-name>filter-class</param-name>
<param-value>org.apache.cocoon.maven.deployer.servlet.ShieldingServletFilter</param-value>
</init-param>
<init-param>
<param-name>filter-class</param-name>
<param-value>org.apache.cocoon.maven.deployer.servlet.ShieldingServletFilter</param-value>
</init-param>
</filter>

    <filter-mapping>
   
      <filter-name>springRequestContextFilter</filter-name>
     
      <url-pattern>/*</url-pattern>
     
      <dispatcher>FORWARD</dispatcher>
     
      <dispatcher>REQUEST</dispatcher>
     
    </filter-mapping>
 
  <!-- Security roles referenced by this web application -->
  <security-role>
 
    <role-name>admin</role-name>
   
  </security-role>
 
  <security-role>
 
    <role-name>user</role-name>
   
  </security-role>
 
  <security-role>
 
    <role-name>guest</role-name>
   
  </security-role>

</web-app>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

Using replace() function with SQL Transformer

by Heather Rankin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Using SQL Transformer how do I get the result from a function - e.g.
replace() - to appear within a  specific <sql> tag in the XML results?
E.g.

I want:

SELECT COL1, COL2, REPLACE(COL3,'x','c'), COL4 FROM TABLE1 ...

to produce something like:

<sql:rowset>
<sql:row>
<sql:col1>a</sql:col1>
<sql:col2>b</sql:col2>
<sql:col3>c</sql:col3>
<sql:col4>d</sql:col4>
</sql:row>

But what I'm getting (on COL3) is something like:

<sql:rowset>
<sql:row>
<sql:col1>a</sql:col1>
<sql:col2>b</sql:col2>
<sql:replace(COL3,'x','c')>...</sql:replace>
...

Could I use <sql:out-parameter> here somehow?

http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
                                       

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Using replace() function with SQL Transformer

by Boris Goldowsky-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Have you tried putting an "as" clause in the SQL?
    SELECT COL1, COL2, REPLACE(COL3,'x','c') AS COL3, COL4 FROM
TABLE1 ...

Bng


On Mon, 2008-07-07 at 17:50 +0100, Heather Rankin wrote:

> Hi,
>
> Using SQL Transformer how do I get the result from a function - e.g.
> replace() - to appear within a  specific <sql> tag in the XML results?
> E.g.
>
> I want:
>
> SELECT COL1, COL2, REPLACE(COL3,'x','c'), COL4 FROM TABLE1 ...
>
> to produce something like:
>
> <sql:rowset>
> <sql:row>
> <sql:col1>a</sql:col1>
> <sql:col2>b</sql:col2>
> <sql:col3>c</sql:col3>
> <sql:col4>d</sql:col4>
> </sql:row>
>
> But what I'm getting (on COL3) is something like:
>
> <sql:rowset>
> <sql:row>
> <sql:col1>a</sql:col1>
> <sql:col2>b</sql:col2>
> <sql:replace(COL3,'x','c')>...</sql:replace>
> ...
>
> Could I use <sql:out-parameter> here somehow?
>
> http://www.bbc.co.uk/
> This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
> If you have received it in error, please delete it from your system.
> Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
> Please note that the BBC monitors e-mails sent or received.
> Further communication will signify your consent to this.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


RE: Using replace() function with SQL Transformer

by Heather Rankin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This would be so much easier if I actually *knew* SQL :-)

Thanks, that worked.

Heather

-----Original Message-----
From: Boris Goldowsky [mailto:bgoldowsky@...]
Sent: 07 July 2008 18:14
To: users@...
Subject: Re: Using replace() function with SQL Transformer

Have you tried putting an "as" clause in the SQL?
    SELECT COL1, COL2, REPLACE(COL3,'x','c') AS COL3, COL4 FROM
TABLE1 ...

Bng


On Mon, 2008-07-07 at 17:50 +0100, Heather Rankin wrote:

> Hi,
>
> Using SQL Transformer how do I get the result from a function - e.g.
> replace() - to appear within a  specific <sql> tag in the XML results?
> E.g.
>
> I want:
>
> SELECT COL1, COL2, REPLACE(COL3,'x','c'), COL4 FROM TABLE1 ...
>
> to produce something like:
>
> <sql:rowset>
> <sql:row>
> <sql:col1>a</sql:col1>
> <sql:col2>b</sql:col2>
> <sql:col3>c</sql:col3>
> <sql:col4>d</sql:col4>
> </sql:row>
>
> But what I'm getting (on COL3) is something like:
>
> <sql:rowset>
> <sql:row>
> <sql:col1>a</sql:col1>
> <sql:col2>b</sql:col2>
> <sql:replace(COL3,'x','c')>...</sql:replace>
> ...
>
> Could I use <sql:out-parameter> here somehow?
>
> http://www.bbc.co.uk/
> This e-mail (and any attachments) is confidential and may contain
personal views which are not the views of the BBC unless specifically
stated.
> If you have received it in error, please delete it from your system.
> Do not use, copy or disclose the information in any way nor act in
reliance on it and notify the sender immediately.
> Please note that the BBC monitors e-mails sent or received.
> Further communication will signify your consent to this.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
                                       

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Invocation of init method failed

by Johannes Hoechstaedter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Mail to fork this thread. I still have no answer.

Johannes Hoechstaedter schrieb:

> Hi,
>
> I think the plugin works now. I can deploy the webapp and the web.xml
>