You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Leszek Gawron <lg...@mobilebox.pl> on 2006/11/03 11:51:47 UTC

Re: svn commit: r470754 - /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonPropertyOverrideConfigurer.java

lgawron@apache.org wrote:
> Author: lgawron
> Date: Fri Nov  3 02:47:52 2006
> New Revision: 470754
> 
> URL: http://svn.apache.org/viewvc?view=rev&rev=470754
> Log:
> invalid syntax
> 
> Modified:
>     cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonPropertyOverrideConfigurer.java
> 
> Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonPropertyOverrideConfigurer.java
> URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonPropertyOverrideConfigurer.java?view=diff&rev=470754&r1=470753&r2=470754
> ==============================================================================
> --- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonPropertyOverrideConfigurer.java (original)
> +++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonPropertyOverrideConfigurer.java Fri Nov  3 02:47:52 2006
> @@ -40,7 +40,7 @@
>      /** The location of the directory where the different property files are located. */
>      protected String location = Constants.DEFAULT_SPRING_CONFIGURATION_LOCATION;
>  
> -    /** The resource loader used to load the property files. 
> +    /** The resource loader used to load the property files.
>       * This loader is either resolving relative to the current sitemap or the
>       * root of the context.
>       */
> @@ -83,17 +83,17 @@
>          }
>          final String mode = (this.settings != null ? this.settings.getRunningMode() : SettingsDefaults.DEFAULT_RUNNING_MODE);
>          final Properties mergedProps = new Properties();
> -        ResourceUtils.readProperties("classpath:*/META-INF/cocoon/spring", mergedProps, this.resourceLoader, this.logger);
> -        ResourceUtils.readProperties("classpath:*/META-INF/cocoon/spring/" + mode, mergedProps, this.resourceLoader, this.logger);
> +        ResourceUtils.readProperties("classpath*:/META-INF/cocoon/spring", mergedProps, this.resourceLoader, this.logger);
> +        ResourceUtils.readProperties("classpath*:/META-INF/cocoon/spring/" + mode, mergedProps, this.resourceLoader, this.logger);

won't work anyway. ResourceUtils class is not handling wildcard 
resources properly. I am trying to fix it now.

-- 
Leszek Gawron                                    CTO at MobileBox Ltd.


Re: svn commit: r470754 - /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonPropertyOverrideConfigurer.java

Posted by Carsten Ziegeler <cz...@apache.org>.
Giacomo Pati wrote:
> 
> Can it be that your recent changes will prevent a block from starting
> with jetty6:run?
> 
> 1724 [main] INFO org.mortbay.log - Started SelectChannelConnector @
> 0.0.0.0:8888
> 1725 [main] WARN org.mortbay.log - failed Server@1057305
> [INFO] Jetty server exiting.
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Failure
> 
> Embedded error: Cannot invoke listener
> org.springframework.web.context.ContextLoaderListener@a1c582
> Unknow document 'cocoon' included at
> file:/home/giacomo/svn/apache/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/target/cocoon-webapp/WEB-INF/cocoon/cocoon.xconf:27:61
> 
> At mentioned location in
> target/cocoon-webapp/WEB-INF/cocoon/cocoon.xconf line 27 there is a
> 
>   <include src="resource://org/apache/cocoon/cocoon.xconf"/>
> 
> The cocoon-core.jar is in WEB-INF/cocoon/lib and it contains the
> org/apache/cocoon/cocoon.xconf resource.
> 
> Any idea?
> 
Ah, I think I saw this error message earlier today...at that moment I
did not know that the latest from trunk was used... :(
Anyways, yes, the include breaks now as the included file has not
"components" as the root element but "cocoon".

It's fixed now.

Carsten
-- 
Carsten Ziegeler - Chief Architect
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

Re: svn commit: r470754 - /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonPropertyOverrideConfigurer.java

Posted by Giacomo Pati <gi...@apache.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Carsten Ziegeler wrote:
> Leszek Gawron wrote:
>> won't work anyway. ResourceUtils class is not handling wildcard 
>> resources properly. 
> I guessed so :(
>> I am trying to fix it now.
> Great!! If you need help, let me know.

Can it be that your recent changes will prevent a block from starting
with jetty6:run?

1724 [main] INFO org.mortbay.log - Started SelectChannelConnector @
0.0.0.0:8888
1725 [main] WARN org.mortbay.log - failed Server@1057305
[INFO] Jetty server exiting.
[INFO]
- ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
- ------------------------------------------------------------------------
[INFO] Failure

Embedded error: Cannot invoke listener
org.springframework.web.context.ContextLoaderListener@a1c582
Unknow document 'cocoon' included at
file:/home/giacomo/svn/apache/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/target/cocoon-webapp/WEB-INF/cocoon/cocoon.xconf:27:61

At mentioned location in
target/cocoon-webapp/WEB-INF/cocoon/cocoon.xconf line 27 there is a

  <include src="resource://org/apache/cocoon/cocoon.xconf"/>

The cocoon-core.jar is in WEB-INF/cocoon/lib and it contains the
org/apache/cocoon/cocoon.xconf resource.

Any idea?

Ciao

- --
Giacomo Pati
Otego AG, Switzerland - http://www.otego.com
Orixo, the XML business alliance - http://www.orixo.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFSzGXLNdJvZjjVZARAvfEAJ9F7IQMBCT53Dd9gzjo/udml1UyTwCgn1I/
XSULjNS6U/rerCppoA5Dbfw=
=0Kt0
-----END PGP SIGNATURE-----

Re: svn commit: r470754 - /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonPropertyOverrideConfigurer.java

Posted by Giacomo Pati <gi...@apache.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Carsten Ziegeler wrote:
> This is strange - Am I the only one who has no jci 1.0-snapshot? I just
> installed this manually into my repository but of course this can't be
> the solution for our users.
> 
> Carsten
> 
> Giacomo Pati wrote:
>>
>> Carsten Ziegeler wrote:
>>>> I still can't build - if someone could provide me a download for the
>>>> missing artifacts (javaflow/jci) this would be wonderful!

I've removed my ~/.m2 and Cocoon rebuilds just fine.


>> My trunk builds just fine.
>>
>> --
>> Giacomo Pati
>> Otego AG, Switzerland - http://www.otego.com
>> Orixo, the XML business alliance - http://www.orixo.com
>>
> 

- --
Giacomo Pati
Otego AG, Switzerland - http://www.otego.com
Orixo, the XML business alliance - http://www.orixo.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFS87FLNdJvZjjVZARApiNAJ4rBMM2ccnddLi2AHeDVUS60Y6pywCgtiA8
0FJwbngdcfit1v2B6hH8ehA=
=Lle/
-----END PGP SIGNATURE-----

Re: svn commit: r470754 - /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonPropertyOverrideConfigurer.java

Posted by Carsten Ziegeler <cz...@apache.org>.
This is strange - Am I the only one who has no jci 1.0-snapshot? I just
installed this manually into my repository but of course this can't be
the solution for our users.

Carsten

Giacomo Pati wrote:
> 
> 
> Carsten Ziegeler wrote:
>>> I still can't build - if someone could provide me a download for the
>>> missing artifacts (javaflow/jci) this would be wonderful!
> 
> My trunk builds just fine.
> 
> --
> Giacomo Pati
> Otego AG, Switzerland - http://www.otego.com
> Orixo, the XML business alliance - http://www.orixo.com
> 

-- 
Carsten Ziegeler - Chief Architect
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

Re: svn commit: r470754 - /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonPropertyOverrideConfigurer.java

Posted by Giacomo Pati <gi...@apache.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Carsten Ziegeler wrote:
> I still can't build - if someone could provide me a download for the
> missing artifacts (javaflow/jci) this would be wonderful!

My trunk builds just fine.

- --
Giacomo Pati
Otego AG, Switzerland - http://www.otego.com
Orixo, the XML business alliance - http://www.orixo.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFS7yHLNdJvZjjVZARApJFAJ4ukCSHGjtx76YqIwR1zRZ5iwJm8ACgpYzx
4wfZZzUgbTLvpanKWDooY5w=
=8VXU
-----END PGP SIGNATURE-----

Re: svn commit: r470754 - /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonPropertyOverrideConfigurer.java

Posted by Leszek Gawron <lg...@mobilebox.pl>.
Carsten Ziegeler wrote:
> Leszek Gawron wrote:
> 
>>
>> why does cocoon property overrider use the same *.properties' files as 
>> placeholder ?
> It should not - the placeholder should use cocoon/properties/** and the
> property overrider cocoon/spring/*.properties.

Uh .. it's probably my fault then ...

-- 
Leszek Gawron                                    CTO at MobileBox Ltd.


Re: svn commit: r470754 - /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonPropertyOverrideConfigurer.java

Posted by Carsten Ziegeler <cz...@apache.org>.
Leszek Gawron wrote:

> 
> 
> why does cocoon property overrider use the same *.properties' files as 
> placeholder ?
It should not - the placeholder should use cocoon/properties/** and the
property overrider cocoon/spring/*.properties.

I'm currently trying to build trunk...

Carsten

-- 
Carsten Ziegeler - Chief Architect
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

Re: svn commit: r470754 - /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonPropertyOverrideConfigurer.java

Posted by Leszek Gawron <lg...@mobilebox.pl>.
Carsten Ziegeler wrote:
> Leszek Gawron wrote:
>> Carsten Ziegeler wrote:
>>> Leszek Gawron wrote:
>>>> won't work anyway. ResourceUtils class is not handling wildcard 
>>>> resources properly. 
>>> I guessed so :(
>>>> I am trying to fix it now.
>>> Great!! If you need help, let me know.
>> Heeelp :)
>>
>> I have converted the code to use classpath*: resources properly. But I 
>> cannot get them from classpath. Even this does not work:
>>
>> Thread.getCurrentThread().getContextClassLoader().getResource( 
>> "META-INF/cocoon/spring/cocoon-core-applicationcontext.xml" );
> The directory structure hasn't changed yet, so I guess the
> resource is in "META-INF/spring/...".


why does cocoon property overrider use the same *.properties' files as 
placeholder ?

After I fixed the prod/dev problem I get the following error:


This gives me the following error:

> [ERROR] org.springframework.web.context.ContextLoader - Context initialization failed <org.springframework.beans.factory.BeanInitializationException:
> Could not process key 'hibernate.connection.password' in PropertyOverrideConfigurer; nested exception is org.springframework.beans.factory.BeanInitial
> izationException: Invalid key 'hibernate.connection.password': expected 'beanName/property'>org.springframework.beans.factory.BeanInitializationExcept
> ion: Could not process key 'hibernate.connection.password' in PropertyOverrideConfigurer; nested exception is org.springframework.beans.factory.BeanIn
> itializationException: Invalid key 'hibernate.connection.password': expected 'beanName/property'

commenting out this.registerPropertyPlaceholderConfigurer(parserContext, 
springConfigLocation); makes the webapp start again (BTW, the name of 
the method is misleading)

-- 
Leszek Gawron                                    CTO at MobileBox Ltd.


Re: svn commit: r470754 - /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonPropertyOverrideConfigurer.java

Posted by Carsten Ziegeler <cz...@apache.org>.
Leszek Gawron wrote:
>> I still can't build - if someone could provide me a download for the
>> missing artifacts (javaflow/jci) this would be wonderful!
> my fresh trunk builds just fine...
> 
I get this error:
Missing:
----------
1) org.apache.commons:commons-jci-core:jar:1.0-SNAPSHOT

  Try downloading the file manually from the project website.

  Then, install it using the command:
      mvn install:install-file -DgroupId=org.apache.commons
-DartifactId=commons
-jci-core \
          -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file

  Path to dependency:
        1) org.apache.cocoon:cocoon-bootstrap:jar:1.0.0-M2-SNAPSHOT
        2) org.apache.commons:commons-jci-core:jar:1.0-SNAPSHOT

----------

Carsten

-- 
Carsten Ziegeler - Chief Architect
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

Re: svn commit: r470754 - /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonPropertyOverrideConfigurer.java

Posted by Leszek Gawron <lg...@mobilebox.pl>.
Carsten Ziegeler wrote:
> Leszek Gawron wrote:
>> Carsten Ziegeler wrote:
>>> Leszek Gawron wrote:
>>>> won't work anyway. ResourceUtils class is not handling wildcard 
>>>> resources properly. 
>>> I guessed so :(
>>>> I am trying to fix it now.
>>> Great!! If you need help, let me know.
>> Heeelp :)
>>
>> I have converted the code to use classpath*: resources properly. But I 
>> cannot get them from classpath. Even this does not work:
>>
>> Thread.getCurrentThread().getContextClassLoader().getResource( 
>> "META-INF/cocoon/spring/cocoon-core-applicationcontext.xml" );
> The directory structure hasn't changed yet, so I guess the
> resource is in "META-INF/spring/...".

Q#$%@#$^@()#$*%@)#$%*@#)$%(@#$)%(_@#$%@)#($*%@)#$%(@#$)%()@#$%(
There are a lot of nasty words hidden under the previous line. Gosh I am 
so stupid I did not see it for over an hour.

> 
> I still can't build - if someone could provide me a download for the
> missing artifacts (javaflow/jci) this would be wonderful!
my fresh trunk builds just fine...

-- 
Leszek Gawron                                    CTO at MobileBox Ltd.


Re: svn commit: r470754 - /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonPropertyOverrideConfigurer.java

Posted by Carsten Ziegeler <cz...@apache.org>.
Leszek Gawron wrote:
> Carsten Ziegeler wrote:
>> Leszek Gawron wrote:
>>> won't work anyway. ResourceUtils class is not handling wildcard 
>>> resources properly. 
>> I guessed so :(
>>> I am trying to fix it now.
>> Great!! If you need help, let me know.
> 
> Heeelp :)
> 
> I have converted the code to use classpath*: resources properly. But I 
> cannot get them from classpath. Even this does not work:
> 
> Thread.getCurrentThread().getContextClassLoader().getResource( 
> "META-INF/cocoon/spring/cocoon-core-applicationcontext.xml" );
The directory structure hasn't changed yet, so I guess the
resource is in "META-INF/spring/...".

I still can't build - if someone could provide me a download for the
missing artifacts (javaflow/jci) this would be wonderful!

Thanks
Carsten


-- 
Carsten Ziegeler - Chief Architect
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

Re: svn commit: r470754 - /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonPropertyOverrideConfigurer.java

Posted by Leszek Gawron <lg...@mobilebox.pl>.
Carsten Ziegeler wrote:
> Leszek Gawron wrote:
>> won't work anyway. ResourceUtils class is not handling wildcard 
>> resources properly. 
> I guessed so :(
>> I am trying to fix it now.
> Great!! If you need help, let me know.

Heeelp :)

I have converted the code to use classpath*: resources properly. But I 
cannot get them from classpath. Even this does not work:

Thread.getCurrentThread().getContextClassLoader().getResource( 
"META-INF/cocoon/spring/cocoon-core-applicationcontext.xml" );

-- 
Leszek Gawron                                    CTO at MobileBox Ltd.


Re: svn commit: r470754 - /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonPropertyOverrideConfigurer.java

Posted by Carsten Ziegeler <cz...@apache.org>.
Leszek Gawron wrote:
> won't work anyway. ResourceUtils class is not handling wildcard 
> resources properly. 
I guessed so :(
> I am trying to fix it now.
Great!! If you need help, let me know.

Carsten
-- 
Carsten Ziegeler - Chief Architect
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/