You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by Scott Wilson <sc...@gmail.com> on 2010/12/01 16:26:20 UTC

Re: Problem running Wookie on Tomcat

Hi Claude,

Thanks for the report! It may be worth asking on the Tomcat list as well, as it seems to be more to do with Tomcat and APR than Wookie or Shindig?

(Its also a reminder that we need to make sure we test Shindig integration properly for the release, too)

On 30 Nov 2010, at 23:24, Claude Coulombe wrote:

> Greetings floks,
> 
> I have problem to run Wookie on a Tomcat servlet container (6.0.29),
> 
> I've followed the procedure about running Wookie with Tomcat and MySQL
> (modifying build.properties, creating widgetdb, adding
> mysql-connector-java-5.1.7.jar, etc). So I've got a BUILD SUCCESSFUL
> with ant clean-build deploy-webapp
> 
> But when I've started the Tomcat server (catalina.sh run), I've got an
> error (Error listenerStart).
> 
> You can check the catalina.out log below :
> 
> -----------------------------------------------------------------
> 
> Using CATALINA_BASE:   /usr/local/apache-tomcat-6.0.29
> Using CATALINA_HOME:   /usr/local/apache-tomcat-6.0.29
> Using CATALINA_TMPDIR: /usr/local/apache-tomcat-6.0.29/temp
> Using JRE_HOME:
> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/home
> Using CLASSPATH:       /usr/local/apache-tomcat-6.0.29/bin/bootstrap.jar
> Nov 30, 2010 5:48:43 PM org.apache.catalina.core.AprLifecycleListener init
> SEVERE: An incompatible version 1.1.14 of the APR based Apache Tomcat
> Native library is installed, while Tomcat requires version 1.1.17
> Nov 30, 2010 5:48:43 PM org.apache.coyote.http11.Http11Protocol init
> INFO: Initializing Coyote HTTP/1.1 on http-8080
> Nov 30, 2010 5:48:43 PM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 931 ms
> Nov 30, 2010 5:48:44 PM org.apache.catalina.core.StandardService start
> INFO: Starting service Catalina
> Nov 30, 2010 5:48:44 PM org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
> INFO: Deploying configuration descriptor host-manager.xml
> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
> INFO: Deploying configuration descriptor manager.xml
> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
> INFO: Deploying configuration descriptor wookie.xml
>  INFO [main] (ContextListener.java:76) - Using local widget server
> properties file:
> /usr/local/apache-tomcat-6.0.29/bin/local.widgetserver.properties
> 17:48:45,473  INFO ContextListener:76 - Using local widget server
> properties file:
> /usr/local/apache-tomcat-6.0.29/bin/local.widgetserver.properties
> Nov 30, 2010 5:48:45 PM org.apache.catalina.core.StandardContext start
> SEVERE: Error listenerStart
> Nov 30, 2010 5:48:45 PM org.apache.catalina.core.StandardContext start
> SEVERE: Context [/wookie] startup failed due to previous errors
> Nov 30, 2010 5:48:45 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesJdbc
> SEVERE: The web application [/wookie] registered the JBDC driver
> [org.apache.derby.jdbc.AutoloadedDriver] but failed to unregister it
> when the web application was stopped. To prevent a memory leak, the
> JDBC Driver has been forcibly unregistered.
> Nov 30, 2010 5:48:46 PM org.apache.catalina.startup.HostConfig deployWAR
> INFO: Deploying web application archive ROOT.war
> Nov 30, 2010 5:48:49 PM
> org.apache.shindig.config.JsonContainerConfigLoader loadContainers
> INFO: Loading resources from: containers/default/container.js
> Nov 30, 2010 5:48:49 PM
> org.apache.shindig.config.JsonContainerConfigLoader loadResources
> INFO: Reading container config: containers/default/container.js
> Nov 30, 2010 5:48:49 PM
> org.apache.shindig.gadgets.features.FeatureRegistry register
> INFO: Loading resources from: res:features-extras/features.txt
> Nov 30, 2010 5:48:49 PM org.apache.shindig.common.xml.XmlUtil <clinit>
> INFO: Not using secure XML processing.
> Nov 30, 2010 5:48:49 PM org.apache.shindig.common.xml.XmlUtil <clinit>
> INFO: Reusing document builders
> Nov 30, 2010 5:48:49 PM
> org.apache.shindig.gadgets.features.FeatureRegistry register
> INFO: Loading resources from: res:features/features.txt
> Nov 30, 2010 5:48:50 PM
> org.apache.shindig.gadgets.servlet.CajaContentRewriter <init>
> INFO: Cajoled cache
> createdorg.apache.shindig.common.cache.ehcache.EhConfiguredCache@468034b6
> Nov 30, 2010 5:48:50 PM
> org.apache.shindig.gadgets.servlet.CajaContentRewriter <init>
> INFO: Cajoled cache
> createdorg.apache.shindig.common.cache.ehcache.EhConfiguredCache@468034b6
> Nov 30, 2010 5:48:50 PM
> org.apache.shindig.gadgets.oauth.OAuthModule$OAuthStoreProvider
> loadDefaultKey
> WARNING: Couldn't load OAuth signing key.  To create a key, run:
>   openssl req -newkey rsa:1024 -days 365 -nodes -x509 -keyout testkey.pem \
>      -out testkey.pem -subj '/CN=mytestkey'
>   openssl pkcs8 -in testkey.pem -out oauthkey.pem -topk8 -nocrypt -outform PEM
> 
> Then edit shindig.properties and add these lines:
> shindig.signing.key-file=<path-to-oauthkey.pem>
> shindig.signing.key-name=mykey
> 
> Nov 30, 2010 5:48:50 PM
> org.apache.shindig.gadgets.oauth.OAuthModule$OAuthCrypterProvider
> <init>
> INFO: Using random key for OAuth client-side state encryption
> Nov 30, 2010 5:48:50 PM
> org.apache.shiro.config.IniSecurityManagerFactory isAutoApplyRealms
> INFO: Realms have been explicitly set on the SecurityManager instance
> - auto-setting of realms will not occur.
> Nov 30, 2010 5:48:50 PM org.apache.shiro.realm.AuthorizingRealm
> getAuthorizationCacheLazy
> INFO: No cache or cacheManager properties have been set.
> Authorization cache cannot be obtained.
> Nov 30, 2010 5:48:50 PM org.apache.catalina.startup.HostConfig deployDirectory
> INFO: Deploying web application directory docs
> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.HostConfig deployDirectory
> INFO: Deploying web application directory examples
> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.HostConfig deployDirectory
> INFO: Deploying web application directory ROOT-old
> Nov 30, 2010 5:48:51 PM org.apache.coyote.http11.Http11Protocol start
> INFO: Starting Coyote HTTP/1.1 on http-8080
> Nov 30, 2010 5:48:51 PM org.apache.jk.common.ChannelSocket init
> INFO: JK: ajp13 listening on /0.0.0.0:8009
> Nov 30, 2010 5:48:51 PM org.apache.jk.server.JkMain start
> INFO: Jk running ID=0 time=0/87  config=null
> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 7529 ms
> 
> -----------------------------------------------------------------
> 
> So I've suspected that the problem was related to the version of the
> APR (apache portable runtime) but I'm not sure because I think APR
> more an issue for performance than a show stopper.
> 
> Anyway, I've downloaded APR and compiled it, but I still did not find
> where to put the libraries in order to stop the APR incompability
> message. I just don't know where Tomcat has gotten the version 1.1.14
> of the APR  (apache portable runtime) ??? Maybe I can downgrade to
> Tomcat 5.5 but Shindig 2 seems not working with that version of Tomcat.
> 
> Just for your info, I'm developping on Mac OS X 10.6.4
> 
> Any help is welcome!
> 
> Claude Coulombe
> Université de Montréal


Re: Problem running Wookie on Tomcat

Posted by Scott Wilson <sc...@gmail.com>.
On 1 Dec 2010, at 18:40, Claude Coulombe wrote:

> Hi Scott,
> 
>> Actually it does.
>> 
>> Have you looked in your server log as well as catalina.out?
>> 
>> When I just tried to replicate it on Tomcat 6.0.20, I got the same error in catalina.out, plus this in my localhost log:
>> 
>> <openjpa-2.0.0-r422266:935683 fatal store error> org.apache.openjpa.util.StoreException: Cannot create JDBC driver of class '' for connect URL 'null'
>> 
>> ... which is a JPA configuration issue.
>> 
>> I think Paul and Kris have been testing on Tomcat - have you come across something similar?
> 
> 
> Yes, I have error messages related to persistance in the localhost log
> 
> Maybe, the database was not correctly initialized...

There are specific instructions for JPA setup with Tomcat here:

http://incubator.apache.org/wookie/downloading-and-installing-wookie.html#DownloadingandInstallingWookie-RunningWookiewithTomcatandMySQL

> 
> Caused by: java.lang.reflect.InvocationTargetException
> 	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:597)
> 	at org.apache.wookie.beans.util.PersistenceManagerFactory.initialize(PersistenceManagerFactory.java:70)
> 	... 25 more
> Caused by: java.lang.RuntimeException: Unable to initialize:
> java.lang.IllegalArgumentException: Unsupported database type:
> 	at org.apache.wookie.beans.jpa.JPAPersistenceManager.initialize(JPAPersistenceManager.java:276)
> 	... 30 more
> Caused by: java.lang.IllegalArgumentException: Unsupported database type:
> 	at org.apache.wookie.beans.jpa.JPAPersistenceManager.initialize(JPAPersistenceManager.java:201)
> 	... 30 more
> 1 d?c. 2010 13:25:35 org.apache.catalina.core.StandardContext listenerStop
> GRAVE: Exception lors de l'envoi de l'?v?nement contexte d?truit
> (context destroyed) ? l'instance de classe d'?coute
> org.apache.wookie.server.ContextListener
> java.lang.RuntimeException: PersistenceManagerFactory not initialized
> 	at org.apache.wookie.beans.util.PersistenceManagerFactory.terminate(PersistenceManagerFactory.java:350)
> 	at org.apache.wookie.server.ContextListener.contextDestroyed(ContextListener.java:262)
> 	at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4174)
> 	at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4778)
> 	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4675)
> 	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
> 	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
> 	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
> 	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
> 	at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
> 	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
> 	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
> 	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
> 	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
> 	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
> 	at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
> 	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
> 	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
> 	at org.apache.catalina.core.StandardService.start(StandardService.java:519)
> 	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
> 	at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
> 	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:597)
> 	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
> 	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
>> 
> 
> Thanks
> 
> Claude
> 
> 
> 
>>> 
>>> 
>>>> (Its also a reminder that we need to make sure we test Shindig integration properly for the release, too)
>>> 
>>> If you succeed to integrate Shindig and Tomcat, please share your
>>> findings : OS, Shindig version, Tomcat version.
>>> 
>>> For instance, which version of Shindig and Tomcat are you using now?
>>> 
>>> Thanks!
>>> 
>>> Claude
>>> 
>>>> 
>>>> On 30 Nov 2010, at 23:24, Claude Coulombe wrote:
>>>> 
>>>>> Greetings floks,
>>>>> 
>>>>> I have problem to run Wookie on a Tomcat servlet container (6.0.29),
>>>>> 
>>>>> I've followed the procedure about running Wookie with Tomcat and MySQL
>>>>> (modifying build.properties, creating widgetdb, adding
>>>>> mysql-connector-java-5.1.7.jar, etc). So I've got a BUILD SUCCESSFUL
>>>>> with ant clean-build deploy-webapp
>>>>> 
>>>>> But when I've started the Tomcat server (catalina.sh run), I've got an
>>>>> error (Error listenerStart).
>>>>> 
>>>>> You can check the catalina.out log below :
>>>>> 
>>>>> -----------------------------------------------------------------
>>>>> 
>>>>> Using CATALINA_BASE:   /usr/local/apache-tomcat-6.0.29
>>>>> Using CATALINA_HOME:   /usr/local/apache-tomcat-6.0.29
>>>>> Using CATALINA_TMPDIR: /usr/local/apache-tomcat-6.0.29/temp
>>>>> Using JRE_HOME:
>>>>> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/home
>>>>> Using CLASSPATH:       /usr/local/apache-tomcat-6.0.29/bin/bootstrap.jar
>>>>> Nov 30, 2010 5:48:43 PM org.apache.catalina.core.AprLifecycleListener init
>>>>> SEVERE: An incompatible version 1.1.14 of the APR based Apache Tomcat
>>>>> Native library is installed, while Tomcat requires version 1.1.17
>>>>> Nov 30, 2010 5:48:43 PM org.apache.coyote.http11.Http11Protocol init
>>>>> INFO: Initializing Coyote HTTP/1.1 on http-8080
>>>>> Nov 30, 2010 5:48:43 PM org.apache.catalina.startup.Catalina load
>>>>> INFO: Initialization processed in 931 ms
>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.core.StandardService start
>>>>> INFO: Starting service Catalina
>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.core.StandardEngine start
>>>>> INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>>>>> INFO: Deploying configuration descriptor host-manager.xml
>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>>>>> INFO: Deploying configuration descriptor manager.xml
>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>>>>> INFO: Deploying configuration descriptor wookie.xml
>>>>>  INFO [main] (ContextListener.java:76) - Using local widget server
>>>>> properties file:
>>>>> /usr/local/apache-tomcat-6.0.29/bin/local.widgetserver.properties
>>>>> 17:48:45,473  INFO ContextListener:76 - Using local widget server
>>>>> properties file:
>>>>> /usr/local/apache-tomcat-6.0.29/bin/local.widgetserver.properties
>>>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.core.StandardContext start
>>>>> SEVERE: Error listenerStart
>>>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.core.StandardContext start
>>>>> SEVERE: Context [/wookie] startup failed due to previous errors
>>>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.loader.WebappClassLoader
>>>>> clearReferencesJdbc
>>>>> SEVERE: The web application [/wookie] registered the JBDC driver
>>>>> [org.apache.derby.jdbc.AutoloadedDriver] but failed to unregister it
>>>>> when the web application was stopped. To prevent a memory leak, the
>>>>> JDBC Driver has been forcibly unregistered.
>>>>> Nov 30, 2010 5:48:46 PM org.apache.catalina.startup.HostConfig deployWAR
>>>>> INFO: Deploying web application archive ROOT.war
>>>>> Nov 30, 2010 5:48:49 PM
>>>>> org.apache.shindig.config.JsonContainerConfigLoader loadContainers
>>>>> INFO: Loading resources from: containers/default/container.js
>>>>> Nov 30, 2010 5:48:49 PM
>>>>> org.apache.shindig.config.JsonContainerConfigLoader loadResources
>>>>> INFO: Reading container config: containers/default/container.js
>>>>> Nov 30, 2010 5:48:49 PM
>>>>> org.apache.shindig.gadgets.features.FeatureRegistry register
>>>>> INFO: Loading resources from: res:features-extras/features.txt
>>>>> Nov 30, 2010 5:48:49 PM org.apache.shindig.common.xml.XmlUtil <clinit>
>>>>> INFO: Not using secure XML processing.
>>>>> Nov 30, 2010 5:48:49 PM org.apache.shindig.common.xml.XmlUtil <clinit>
>>>>> INFO: Reusing document builders
>>>>> Nov 30, 2010 5:48:49 PM
>>>>> org.apache.shindig.gadgets.features.FeatureRegistry register
>>>>> INFO: Loading resources from: res:features/features.txt
>>>>> Nov 30, 2010 5:48:50 PM
>>>>> org.apache.shindig.gadgets.servlet.CajaContentRewriter <init>
>>>>> INFO: Cajoled cache
>>>>> createdorg.apache.shindig.common.cache.ehcache.EhConfiguredCache@468034b6
>>>>> Nov 30, 2010 5:48:50 PM
>>>>> org.apache.shindig.gadgets.servlet.CajaContentRewriter <init>
>>>>> INFO: Cajoled cache
>>>>> createdorg.apache.shindig.common.cache.ehcache.EhConfiguredCache@468034b6
>>>>> Nov 30, 2010 5:48:50 PM
>>>>> org.apache.shindig.gadgets.oauth.OAuthModule$OAuthStoreProvider
>>>>> loadDefaultKey
>>>>> WARNING: Couldn't load OAuth signing key.  To create a key, run:
>>>>>   openssl req -newkey rsa:1024 -days 365 -nodes -x509 -keyout testkey.pem \
>>>>>      -out testkey.pem -subj '/CN=mytestkey'
>>>>>   openssl pkcs8 -in testkey.pem -out oauthkey.pem -topk8 -nocrypt -outform PEM
>>>>> 
>>>>> Then edit shindig.properties and add these lines:
>>>>> shindig.signing.key-file=<path-to-oauthkey.pem>
>>>>> shindig.signing.key-name=mykey
>>>>> 
>>>>> Nov 30, 2010 5:48:50 PM
>>>>> org.apache.shindig.gadgets.oauth.OAuthModule$OAuthCrypterProvider
>>>>> <init>
>>>>> INFO: Using random key for OAuth client-side state encryption
>>>>> Nov 30, 2010 5:48:50 PM
>>>>> org.apache.shiro.config.IniSecurityManagerFactory isAutoApplyRealms
>>>>> INFO: Realms have been explicitly set on the SecurityManager instance
>>>>> - auto-setting of realms will not occur.
>>>>> Nov 30, 2010 5:48:50 PM org.apache.shiro.realm.AuthorizingRealm
>>>>> getAuthorizationCacheLazy
>>>>> INFO: No cache or cacheManager properties have been set.
>>>>> Authorization cache cannot be obtained.
>>>>> Nov 30, 2010 5:48:50 PM org.apache.catalina.startup.HostConfig deployDirectory
>>>>> INFO: Deploying web application directory docs
>>>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.HostConfig deployDirectory
>>>>> INFO: Deploying web application directory examples
>>>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.HostConfig deployDirectory
>>>>> INFO: Deploying web application directory ROOT-old
>>>>> Nov 30, 2010 5:48:51 PM org.apache.coyote.http11.Http11Protocol start
>>>>> INFO: Starting Coyote HTTP/1.1 on http-8080
>>>>> Nov 30, 2010 5:48:51 PM org.apache.jk.common.ChannelSocket init
>>>>> INFO: JK: ajp13 listening on /0.0.0.0:8009
>>>>> Nov 30, 2010 5:48:51 PM org.apache.jk.server.JkMain start
>>>>> INFO: Jk running ID=0 time=0/87  config=null
>>>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.Catalina start
>>>>> INFO: Server startup in 7529 ms
>>>>> 
>>>>> -----------------------------------------------------------------
>>>>> 
>>>>> So I've suspected that the problem was related to the version of the
>>>>> APR (Apache Portable Runtime) but I'm not sure because I think APR
>>>>> more an issue for performance than a show stopper.
>>>>> 
>>>>> Anyway, I've downloaded APR and compiled it, but I still did not find
>>>>> where to put the libraries in order to stop the APR incompability
>>>>> message. I just don't know where Tomcat has gotten the version 1.1.14
>>>>> of the APR  (apache portable runtime) ??? Maybe I can downgrade to
>>>>> Tomcat 5.5 but Shindig 2 seems not working with that version of Tomcat.
>>>>> 
>>>>> Just for your info, I'm developping on Mac OS X 10.6.4
>>>>> 
>>>>> Any help is welcome!
>>>>> 
>>>>> Claude Coulombe
>>>>> Université de Montréal
>>>> 
>>>> 
>> 
>> 


Shindig integration

Posted by Scott Wilson <sc...@gmail.com>.
So - and thanks to Claude for the prompt - I've had a go at re-running our integration tests for Shindig using Tomcat.

First up I got the latest Wookie build running on Tomcat 6.0.20. Everything seems to work fine when I copy the <Resource> tag from conf/wookie.xml into conf/context.xml - tomcat doesn't seem to pick up the JDBC resource defined in conf/wookie.xml. I don't know why that is - maybe someone who uses Tomcat more often has an idea about that?

Anyway, once that is sorted, and I installed Shindig 1.1b5 into ROOT, all went well. The integration tests are all green and I can play with some gadgets. There is a bit of a niggle in that Shindig returns a default height of 100pixels for gadgets that use the dynamic-height plugin, which is too small. We may want to have a workaround for this, or inject some sort of hook for the dynamic-height business.

However, next up I tried it with Shindig 2.0.0 and two tests fail, and some gadgets that worked fine before no longer work properly. I suspect the API has changed on the Shindig end and so we'll need to change the integration code.

I'll put an issue in the tracker to update our integration code and documentation to 2.0.0 - probably for Wokie version 0.9.1 rather than this release.

S

RE: Problem running Wookie on Tomcat

Posted by Steven Nisbet <s....@mmu.ac.uk>.
Evening folks
Re: the missing wookie.xml file - when I ploughed through an install of Tomcat, MySQL and Wookie about a year ago one particular gotcha that caught me out was that I was running all the Ant procedures as a user without write access credentials to the Tomcat areas where files got deployed. Late night sessions led to school boy errors where I redid everything as ROOT, so stuff got copied over, but then wasn't picked up by Tomcat properly because it didn't have credentials to use the files. All sorted in the end by doing the Ant stuff as ROOT and then chowning the files to whatever user your distro sets Tomcat up with. I think this cured a number of missing files in my installation.

Best
Steve Nisbet

Learning Resources Manager | LRT | http://lrt.mmu.ac.uk | LRIS | MMU | 0161 247 6753

> -----Original Message-----
> From: Scott Wilson [mailto:scott.bradley.wilson@gmail.com]
> Sent: 01 December 2010 19:04
> To: Claude Coulombe
> Cc: wookie-dev@incubator.apache.org
> Subject: Re: Problem running Wookie on Tomcat
>
>
> On 1 Dec 2010, at 18:56, Claude Coulombe wrote:
>
> > Hi Scott,
> >
> > Maybe it could help to know that the problem is there with Tomcat 5.5 too.
> >
> > Claude
>
> I just got it working on mine by following the instructions, using:
>
> Tomcat 6.0.20
> Latest wookie build from source
> MySQL 5.0.45
>
> However, I had to also copy the <Resource> definition in "wookie.xml" file in
> /conf into /conf/context.xml as it didn't seem to pick it up automatically. I
> think Tomcat 7 doesn't have that problem?
>
> >
> > 2010/12/1 Claude Coulombe <cl...@umontreal.ca>:
> >> Hi Scott,
> >>
> >>> Actually it does.
> >>>
> >>> Have you looked in your server log as well as catalina.out?
> >>>
> >>> When I just tried to replicate it on Tomcat 6.0.20, I got the same error in
> catalina.out, plus this in my localhost log:
> >>>
> >>> <openjpa-2.0.0-r422266:935683 fatal store error>
> org.apache.openjpa.util.StoreException: Cannot create JDBC driver of class ''
> for connect URL 'null'
> >>>
> >>> ... which is a JPA configuration issue.
> >>>
> >>> I think Paul and Kris have been testing on Tomcat - have you come across
> something similar?
> >>
> >>
> >> Yes, I have error messages related to persistance in the localhost log
> >>
> >> Maybe, the database was not correctly initialized...
> >>
> >> Caused by: java.lang.reflect.InvocationTargetException
> >>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
> ava:39)
> >>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> >>        at java.lang.reflect.Method.invoke(Method.java:597)
> >>        at
> org.apache.wookie.beans.util.PersistenceManagerFactory.initialize(Persiste
> nceManagerFactory.java:70)
> >>        ... 25 more
> >> Caused by: java.lang.RuntimeException: Unable to initialize:
> >> java.lang.IllegalArgumentException: Unsupported database type:
> >>        at
> org.apache.wookie.beans.jpa.JPAPersistenceManager.initialize(JPAPersisten
> ceManager.java:276)
> >>        ... 30 more
> >> Caused by: java.lang.IllegalArgumentException: Unsupported database
> type:
> >>        at
> org.apache.wookie.beans.jpa.JPAPersistenceManager.initialize(JPAPersisten
> ceManager.java:201)
> >>        ... 30 more
> >> 1 d?c. 2010 13:25:35 org.apache.catalina.core.StandardContext
> listenerStop
> >> GRAVE: Exception lors de l'envoi de l'?v?nement contexte d?truit
> >> (context destroyed) ? l'instance de classe d'?coute
> >> org.apache.wookie.server.ContextListener
> >> java.lang.RuntimeException: PersistenceManagerFactory not initialized
> >>        at
> org.apache.wookie.beans.util.PersistenceManagerFactory.terminate(Persist
> enceManagerFactory.java:350)
> >>        at
> org.apache.wookie.server.ContextListener.contextDestroyed(ContextListen
> er.java:262)
> >>        at
> org.apache.catalina.core.StandardContext.listenerStop(StandardContext.jav
> a:4174)
> >>        at
> org.apache.catalina.core.StandardContext.stop(StandardContext.java:4778)
> >>        at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4675)
> >>        at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java
> :791)
> >>        at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
> >>        at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
> >>        at
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:63
> 7)
> >>        at
> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:5
> 63)
> >>        at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
> >>        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
> >>        at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
> >>        at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.
> java:119)
> >>        at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
> >>        at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
> >>        at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
> >>        at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
> >>        at
> org.apache.catalina.core.StandardService.start(StandardService.java:519)
> >>        at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
> >>        at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
> >>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
> ava:39)
> >>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> >>        at java.lang.reflect.Method.invoke(Method.java:597)
> >>        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
> >>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
> >>>
> >>
> >> Thanks
> >>
> >> Claude
> >>
> >>
> >>
> >>>>
> >>>>
> >>>>> (Its also a reminder that we need to make sure we test Shindig
> integration properly for the release, too)
> >>>>
> >>>> If you succeed to integrate Shindig and Tomcat, please share your
> >>>> findings : OS, Shindig version, Tomcat version.
> >>>>
> >>>> For instance, which version of Shindig and Tomcat are you using now?
> >>>>
> >>>> Thanks!
> >>>>
> >>>> Claude
> >>>>
> >>>>>
> >>>>> On 30 Nov 2010, at 23:24, Claude Coulombe wrote:
> >>>>>
> >>>>>> Greetings floks,
> >>>>>>
> >>>>>> I have problem to run Wookie on a Tomcat servlet container (6.0.29),
> >>>>>>
> >>>>>> I've followed the procedure about running Wookie with Tomcat and
> MySQL
> >>>>>> (modifying build.properties, creating widgetdb, adding
> >>>>>> mysql-connector-java-5.1.7.jar, etc). So I've got a BUILD SUCCESSFUL
> >>>>>> with ant clean-build deploy-webapp
> >>>>>>
> >>>>>> But when I've started the Tomcat server (catalina.sh run), I've got an
> >>>>>> error (Error listenerStart).
> >>>>>>
> >>>>>> You can check the catalina.out log below :
> >>>>>>
> >>>>>> -----------------------------------------------------------------
> >>>>>>
> >>>>>> Using CATALINA_BASE:   /usr/local/apache-tomcat-6.0.29
> >>>>>> Using CATALINA_HOME:   /usr/local/apache-tomcat-6.0.29
> >>>>>> Using CATALINA_TMPDIR: /usr/local/apache-tomcat-6.0.29/temp
> >>>>>> Using JRE_HOME:
> >>>>>>
> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/home
> >>>>>> Using CLASSPATH:       /usr/local/apache-tomcat-
> 6.0.29/bin/bootstrap.jar
> >>>>>> Nov 30, 2010 5:48:43 PM
> org.apache.catalina.core.AprLifecycleListener init
> >>>>>> SEVERE: An incompatible version 1.1.14 of the APR based Apache
> Tomcat
> >>>>>> Native library is installed, while Tomcat requires version 1.1.17
> >>>>>> Nov 30, 2010 5:48:43 PM org.apache.coyote.http11.Http11Protocol
> init
> >>>>>> INFO: Initializing Coyote HTTP/1.1 on http-8080
> >>>>>> Nov 30, 2010 5:48:43 PM org.apache.catalina.startup.Catalina load
> >>>>>> INFO: Initialization processed in 931 ms
> >>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.core.StandardService
> start
> >>>>>> INFO: Starting service Catalina
> >>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.core.StandardEngine
> start
> >>>>>> INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
> >>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig
> deployDescriptor
> >>>>>> INFO: Deploying configuration descriptor host-manager.xml
> >>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig
> deployDescriptor
> >>>>>> INFO: Deploying configuration descriptor manager.xml
> >>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig
> deployDescriptor
> >>>>>> INFO: Deploying configuration descriptor wookie.xml
> >>>>>>  INFO [main] (ContextListener.java:76) - Using local widget server
> >>>>>> properties file:
> >>>>>> /usr/local/apache-tomcat-6.0.29/bin/local.widgetserver.properties
> >>>>>> 17:48:45,473  INFO ContextListener:76 - Using local widget server
> >>>>>> properties file:
> >>>>>> /usr/local/apache-tomcat-6.0.29/bin/local.widgetserver.properties
> >>>>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.core.StandardContext
> start
> >>>>>> SEVERE: Error listenerStart
> >>>>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.core.StandardContext
> start
> >>>>>> SEVERE: Context [/wookie] startup failed due to previous errors
> >>>>>> Nov 30, 2010 5:48:45 PM
> org.apache.catalina.loader.WebappClassLoader
> >>>>>> clearReferencesJdbc
> >>>>>> SEVERE: The web application [/wookie] registered the JBDC driver
> >>>>>> [org.apache.derby.jdbc.AutoloadedDriver] but failed to unregister it
> >>>>>> when the web application was stopped. To prevent a memory leak,
> the
> >>>>>> JDBC Driver has been forcibly unregistered.
> >>>>>> Nov 30, 2010 5:48:46 PM org.apache.catalina.startup.HostConfig
> deployWAR
> >>>>>> INFO: Deploying web application archive ROOT.war
> >>>>>> Nov 30, 2010 5:48:49 PM
> >>>>>> org.apache.shindig.config.JsonContainerConfigLoader
> loadContainers
> >>>>>> INFO: Loading resources from: containers/default/container.js
> >>>>>> Nov 30, 2010 5:48:49 PM
> >>>>>> org.apache.shindig.config.JsonContainerConfigLoader
> loadResources
> >>>>>> INFO: Reading container config: containers/default/container.js
> >>>>>> Nov 30, 2010 5:48:49 PM
> >>>>>> org.apache.shindig.gadgets.features.FeatureRegistry register
> >>>>>> INFO: Loading resources from: res:features-extras/features.txt
> >>>>>> Nov 30, 2010 5:48:49 PM org.apache.shindig.common.xml.XmlUtil
> <clinit>
> >>>>>> INFO: Not using secure XML processing.
> >>>>>> Nov 30, 2010 5:48:49 PM org.apache.shindig.common.xml.XmlUtil
> <clinit>
> >>>>>> INFO: Reusing document builders
> >>>>>> Nov 30, 2010 5:48:49 PM
> >>>>>> org.apache.shindig.gadgets.features.FeatureRegistry register
> >>>>>> INFO: Loading resources from: res:features/features.txt
> >>>>>> Nov 30, 2010 5:48:50 PM
> >>>>>> org.apache.shindig.gadgets.servlet.CajaContentRewriter <init>
> >>>>>> INFO: Cajoled cache
> >>>>>>
> createdorg.apache.shindig.common.cache.ehcache.EhConfiguredCache@46
> 8034b6
> >>>>>> Nov 30, 2010 5:48:50 PM
> >>>>>> org.apache.shindig.gadgets.servlet.CajaContentRewriter <init>
> >>>>>> INFO: Cajoled cache
> >>>>>>
> createdorg.apache.shindig.common.cache.ehcache.EhConfiguredCache@46
> 8034b6
> >>>>>> Nov 30, 2010 5:48:50 PM
> >>>>>>
> org.apache.shindig.gadgets.oauth.OAuthModule$OAuthStoreProvider
> >>>>>> loadDefaultKey
> >>>>>> WARNING: Couldn't load OAuth signing key.  To create a key, run:
> >>>>>>   openssl req -newkey rsa:1024 -days 365 -nodes -x509 -keyout
> testkey.pem \
> >>>>>>      -out testkey.pem -subj '/CN=mytestkey'
> >>>>>>   openssl pkcs8 -in testkey.pem -out oauthkey.pem -topk8 -nocrypt -
> outform PEM
> >>>>>>
> >>>>>> Then edit shindig.properties and add these lines:
> >>>>>> shindig.signing.key-file=<path-to-oauthkey.pem>
> >>>>>> shindig.signing.key-name=mykey
> >>>>>>
> >>>>>> Nov 30, 2010 5:48:50 PM
> >>>>>>
> org.apache.shindig.gadgets.oauth.OAuthModule$OAuthCrypterProvider
> >>>>>> <init>
> >>>>>> INFO: Using random key for OAuth client-side state encryption
> >>>>>> Nov 30, 2010 5:48:50 PM
> >>>>>> org.apache.shiro.config.IniSecurityManagerFactory
> isAutoApplyRealms
> >>>>>> INFO: Realms have been explicitly set on the SecurityManager
> instance
> >>>>>> - auto-setting of realms will not occur.
> >>>>>> Nov 30, 2010 5:48:50 PM org.apache.shiro.realm.AuthorizingRealm
> >>>>>> getAuthorizationCacheLazy
> >>>>>> INFO: No cache or cacheManager properties have been set.
> >>>>>> Authorization cache cannot be obtained.
> >>>>>> Nov 30, 2010 5:48:50 PM org.apache.catalina.startup.HostConfig
> deployDirectory
> >>>>>> INFO: Deploying web application directory docs
> >>>>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.HostConfig
> deployDirectory
> >>>>>> INFO: Deploying web application directory examples
> >>>>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.HostConfig
> deployDirectory
> >>>>>> INFO: Deploying web application directory ROOT-old
> >>>>>> Nov 30, 2010 5:48:51 PM org.apache.coyote.http11.Http11Protocol
> start
> >>>>>> INFO: Starting Coyote HTTP/1.1 on http-8080
> >>>>>> Nov 30, 2010 5:48:51 PM org.apache.jk.common.ChannelSocket init
> >>>>>> INFO: JK: ajp13 listening on /0.0.0.0:8009
> >>>>>> Nov 30, 2010 5:48:51 PM org.apache.jk.server.JkMain start
> >>>>>> INFO: Jk running ID=0 time=0/87  config=null
> >>>>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.Catalina start
> >>>>>> INFO: Server startup in 7529 ms
> >>>>>>
> >>>>>> -----------------------------------------------------------------
> >>>>>>
> >>>>>> So I've suspected that the problem was related to the version of the
> >>>>>> APR (Apache Portable Runtime) but I'm not sure because I think APR
> >>>>>> more an issue for performance than a show stopper.
> >>>>>>
> >>>>>> Anyway, I've downloaded APR and compiled it, but I still did not find
> >>>>>> where to put the libraries in order to stop the APR incompability
> >>>>>> message. I just don't know where Tomcat has gotten the version
> 1.1.14
> >>>>>> of the APR  (apache portable runtime) ??? Maybe I can downgrade
> to
> >>>>>> Tomcat 5.5 but Shindig 2 seems not working with that version of
> Tomcat.
> >>>>>>
> >>>>>> Just for your info, I'm developping on Mac OS X 10.6.4
> >>>>>>
> >>>>>> Any help is welcome!
> >>>>>>
> >>>>>> Claude Coulombe
> >>>>>> Université de Montréal
> >>>>>
> >>>>>
> >>>
> >>>
> >>

"Before acting on this email or opening any attachments you should read the Manchester Metropolitan University email disclaimer available on its website http://www.mmu.ac.uk/emaildisclaimer "

Re: Problem running Wookie on Tomcat

Posted by Scott Wilson <sc...@gmail.com>.
On 1 Dec 2010, at 20:21, Claude Coulombe wrote:

> Hi Scott,
> 
>> I just got it working on mine by following the instructions, using:
>> 
>> Tomcat 6.0.20
>> Latest wookie build from source
>> MySQL 5.0.45
> 
> Yessss!!!

It's even on Mac 10.6.4 ;-)

>> However, I had to also copy the <Resource> definition in "wookie.xml" file in /conf into /conf/context.xml as it didn't seem to pick it up automatically. I think Tomcat 7 doesn't have that problem?
> 
> Sorry but I did not find any wookie.xml file?
> I supposed it should be into the conf folder of Tomcat ? but there is
> no wookie.xml in that folder
> I thought that I saw one such wookie.xml file before, but it must be a
> « somewhat » generated file,  because I can no longer find a trace of
> it on my computer.
> 
> Please send me the appropriate context.xml file, a simple cut and
> paste will be convenient.

It is automatically generated as far as I know - if you run:

ant deploy-webapp

... then the script should put it in the "right" place. The actual location is set in build.properties, e.g:

# The location of your tomcat container webapp context configuration directory, (required
# for deployed non-standalone configurations; requires configuration of wookie.db.user,
# wookie.db.password, wookie.db.driver, wookie.db.uri, and jdbc.driver.path properties below
# for JPA JDBC configurations)
servletEngine.context.conf.dir=/usr/local/apache-tomcat-6.0.20/conf

(If you do change any settings you need to run "ant clean-build" before redeploying.)

For my settings, it generates this Resource configuration:

  <Resource name="jdbc/widgetdb"
            auth="Container"
            type="javax.sql.DataSource"
            maxActive="80"
            maxIdle="5"
            username="java"
            password="java"
            driverClassName="com.mysql.jdbc.Driver"
            url="jdbc:mysql://localhost:3306/widgetdb"/>

> 
> Claude
> 
>> 
>>> 
>>> 2010/12/1 Claude Coulombe <cl...@umontreal.ca>:
>>>> Hi Scott,
>>>> 
>>>>> Actually it does.
>>>>> 
>>>>> Have you looked in your server log as well as catalina.out?
>>>>> 
>>>>> When I just tried to replicate it on Tomcat 6.0.20, I got the same error in catalina.out, plus this in my localhost log:
>>>>> 
>>>>> <openjpa-2.0.0-r422266:935683 fatal store error> org.apache.openjpa.util.StoreException: Cannot create JDBC driver of class '' for connect URL 'null'
>>>>> 
>>>>> ... which is a JPA configuration issue.
>>>>> 
>>>>> I think Paul and Kris have been testing on Tomcat - have you come across something similar?
>>>> 
>>>> 
>>>> Yes, I have error messages related to persistance in the localhost log
>>>> 
>>>> Maybe, the database was not correctly initialized...
>>>> 
>>>> Caused by: java.lang.reflect.InvocationTargetException
>>>>        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:597)
>>>>        at org.apache.wookie.beans.util.PersistenceManagerFactory.initialize(PersistenceManagerFactory.java:70)
>>>>        ... 25 more
>>>> Caused by: java.lang.RuntimeException: Unable to initialize:
>>>> java.lang.IllegalArgumentException: Unsupported database type:
>>>>        at org.apache.wookie.beans.jpa.JPAPersistenceManager.initialize(JPAPersistenceManager.java:276)
>>>>        ... 30 more
>>>> Caused by: java.lang.IllegalArgumentException: Unsupported database type:
>>>>        at org.apache.wookie.beans.jpa.JPAPersistenceManager.initialize(JPAPersistenceManager.java:201)
>>>>        ... 30 more
>>>> 1 d?c. 2010 13:25:35 org.apache.catalina.core.StandardContext listenerStop
>>>> GRAVE: Exception lors de l'envoi de l'?v?nement contexte d?truit
>>>> (context destroyed) ? l'instance de classe d'?coute
>>>> org.apache.wookie.server.ContextListener
>>>> java.lang.RuntimeException: PersistenceManagerFactory not initialized
>>>>        at org.apache.wookie.beans.util.PersistenceManagerFactory.terminate(PersistenceManagerFactory.java:350)
>>>>        at org.apache.wookie.server.ContextListener.contextDestroyed(ContextListener.java:262)
>>>>        at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4174)
>>>>        at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4778)
>>>>        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4675)
>>>>        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
>>>>        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
>>>>        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
>>>>        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
>>>>        at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
>>>>        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
>>>>        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
>>>>        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
>>>>        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>>>>        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
>>>>        at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
>>>>        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>>>>        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
>>>>        at org.apache.catalina.core.StandardService.start(StandardService.java:519)
>>>>        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>>>>        at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
>>>>        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:597)
>>>>        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
>>>>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
>>>>> 
>>>> 
>>>> Thanks
>>>> 
>>>> Claude
>>>> 
>>>> 
>>>> 
>>>>>> 
>>>>>> 
>>>>>>> (Its also a reminder that we need to make sure we test Shindig integration properly for the release, too)
>>>>>> 
>>>>>> If you succeed to integrate Shindig and Tomcat, please share your
>>>>>> findings : OS, Shindig version, Tomcat version.
>>>>>> 
>>>>>> For instance, which version of Shindig and Tomcat are you using now?
>>>>>> 
>>>>>> Thanks!
>>>>>> 
>>>>>> Claude
>>>>>> 
>>>>>>> 
>>>>>>> On 30 Nov 2010, at 23:24, Claude Coulombe wrote:
>>>>>>> 
>>>>>>>> Greetings floks,
>>>>>>>> 
>>>>>>>> I have problem to run Wookie on a Tomcat servlet container (6.0.29),
>>>>>>>> 
>>>>>>>> I've followed the procedure about running Wookie with Tomcat and MySQL
>>>>>>>> (modifying build.properties, creating widgetdb, adding
>>>>>>>> mysql-connector-java-5.1.7.jar, etc). So I've got a BUILD SUCCESSFUL
>>>>>>>> with ant clean-build deploy-webapp
>>>>>>>> 
>>>>>>>> But when I've started the Tomcat server (catalina.sh run), I've got an
>>>>>>>> error (Error listenerStart).
>>>>>>>> 
>>>>>>>> You can check the catalina.out log below :
>>>>>>>> 
>>>>>>>> -----------------------------------------------------------------
>>>>>>>> 
>>>>>>>> Using CATALINA_BASE:   /usr/local/apache-tomcat-6.0.29
>>>>>>>> Using CATALINA_HOME:   /usr/local/apache-tomcat-6.0.29
>>>>>>>> Using CATALINA_TMPDIR: /usr/local/apache-tomcat-6.0.29/temp
>>>>>>>> Using JRE_HOME:
>>>>>>>> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/home
>>>>>>>> Using CLASSPATH:       /usr/local/apache-tomcat-6.0.29/bin/bootstrap.jar
>>>>>>>> Nov 30, 2010 5:48:43 PM org.apache.catalina.core.AprLifecycleListener init
>>>>>>>> SEVERE: An incompatible version 1.1.14 of the APR based Apache Tomcat
>>>>>>>> Native library is installed, while Tomcat requires version 1.1.17
>>>>>>>> Nov 30, 2010 5:48:43 PM org.apache.coyote.http11.Http11Protocol init
>>>>>>>> INFO: Initializing Coyote HTTP/1.1 on http-8080
>>>>>>>> Nov 30, 2010 5:48:43 PM org.apache.catalina.startup.Catalina load
>>>>>>>> INFO: Initialization processed in 931 ms
>>>>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.core.StandardService start
>>>>>>>> INFO: Starting service Catalina
>>>>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.core.StandardEngine start
>>>>>>>> INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
>>>>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>>>>>>>> INFO: Deploying configuration descriptor host-manager.xml
>>>>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>>>>>>>> INFO: Deploying configuration descriptor manager.xml
>>>>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>>>>>>>> INFO: Deploying configuration descriptor wookie.xml
>>>>>>>>  INFO [main] (ContextListener.java:76) - Using local widget server
>>>>>>>> properties file:
>>>>>>>> /usr/local/apache-tomcat-6.0.29/bin/local.widgetserver.properties
>>>>>>>> 17:48:45,473  INFO ContextListener:76 - Using local widget server
>>>>>>>> properties file:
>>>>>>>> /usr/local/apache-tomcat-6.0.29/bin/local.widgetserver.properties
>>>>>>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.core.StandardContext start
>>>>>>>> SEVERE: Error listenerStart
>>>>>>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.core.StandardContext start
>>>>>>>> SEVERE: Context [/wookie] startup failed due to previous errors
>>>>>>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.loader.WebappClassLoader
>>>>>>>> clearReferencesJdbc
>>>>>>>> SEVERE: The web application [/wookie] registered the JBDC driver
>>>>>>>> [org.apache.derby.jdbc.AutoloadedDriver] but failed to unregister it
>>>>>>>> when the web application was stopped. To prevent a memory leak, the
>>>>>>>> JDBC Driver has been forcibly unregistered.
>>>>>>>> Nov 30, 2010 5:48:46 PM org.apache.catalina.startup.HostConfig deployWAR
>>>>>>>> INFO: Deploying web application archive ROOT.war
>>>>>>>> Nov 30, 2010 5:48:49 PM
>>>>>>>> org.apache.shindig.config.JsonContainerConfigLoader loadContainers
>>>>>>>> INFO: Loading resources from: containers/default/container.js
>>>>>>>> Nov 30, 2010 5:48:49 PM
>>>>>>>> org.apache.shindig.config.JsonContainerConfigLoader loadResources
>>>>>>>> INFO: Reading container config: containers/default/container.js
>>>>>>>> Nov 30, 2010 5:48:49 PM
>>>>>>>> org.apache.shindig.gadgets.features.FeatureRegistry register
>>>>>>>> INFO: Loading resources from: res:features-extras/features.txt
>>>>>>>> Nov 30, 2010 5:48:49 PM org.apache.shindig.common.xml.XmlUtil <clinit>
>>>>>>>> INFO: Not using secure XML processing.
>>>>>>>> Nov 30, 2010 5:48:49 PM org.apache.shindig.common.xml.XmlUtil <clinit>
>>>>>>>> INFO: Reusing document builders
>>>>>>>> Nov 30, 2010 5:48:49 PM
>>>>>>>> org.apache.shindig.gadgets.features.FeatureRegistry register
>>>>>>>> INFO: Loading resources from: res:features/features.txt
>>>>>>>> Nov 30, 2010 5:48:50 PM
>>>>>>>> org.apache.shindig.gadgets.servlet.CajaContentRewriter <init>
>>>>>>>> INFO: Cajoled cache
>>>>>>>> createdorg.apache.shindig.common.cache.ehcache.EhConfiguredCache@468034b6
>>>>>>>> Nov 30, 2010 5:48:50 PM
>>>>>>>> org.apache.shindig.gadgets.servlet.CajaContentRewriter <init>
>>>>>>>> INFO: Cajoled cache
>>>>>>>> createdorg.apache.shindig.common.cache.ehcache.EhConfiguredCache@468034b6
>>>>>>>> Nov 30, 2010 5:48:50 PM
>>>>>>>> org.apache.shindig.gadgets.oauth.OAuthModule$OAuthStoreProvider
>>>>>>>> loadDefaultKey
>>>>>>>> WARNING: Couldn't load OAuth signing key.  To create a key, run:
>>>>>>>>   openssl req -newkey rsa:1024 -days 365 -nodes -x509 -keyout testkey.pem \
>>>>>>>>      -out testkey.pem -subj '/CN=mytestkey'
>>>>>>>>   openssl pkcs8 -in testkey.pem -out oauthkey.pem -topk8 -nocrypt -outform PEM
>>>>>>>> 
>>>>>>>> Then edit shindig.properties and add these lines:
>>>>>>>> shindig.signing.key-file=<path-to-oauthkey.pem>
>>>>>>>> shindig.signing.key-name=mykey
>>>>>>>> 
>>>>>>>> Nov 30, 2010 5:48:50 PM
>>>>>>>> org.apache.shindig.gadgets.oauth.OAuthModule$OAuthCrypterProvider
>>>>>>>> <init>
>>>>>>>> INFO: Using random key for OAuth client-side state encryption
>>>>>>>> Nov 30, 2010 5:48:50 PM
>>>>>>>> org.apache.shiro.config.IniSecurityManagerFactory isAutoApplyRealms
>>>>>>>> INFO: Realms have been explicitly set on the SecurityManager instance
>>>>>>>> - auto-setting of realms will not occur.
>>>>>>>> Nov 30, 2010 5:48:50 PM org.apache.shiro.realm.AuthorizingRealm
>>>>>>>> getAuthorizationCacheLazy
>>>>>>>> INFO: No cache or cacheManager properties have been set.
>>>>>>>> Authorization cache cannot be obtained.
>>>>>>>> Nov 30, 2010 5:48:50 PM org.apache.catalina.startup.HostConfig deployDirectory
>>>>>>>> INFO: Deploying web application directory docs
>>>>>>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.HostConfig deployDirectory
>>>>>>>> INFO: Deploying web application directory examples
>>>>>>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.HostConfig deployDirectory
>>>>>>>> INFO: Deploying web application directory ROOT-old
>>>>>>>> Nov 30, 2010 5:48:51 PM org.apache.coyote.http11.Http11Protocol start
>>>>>>>> INFO: Starting Coyote HTTP/1.1 on http-8080
>>>>>>>> Nov 30, 2010 5:48:51 PM org.apache.jk.common.ChannelSocket init
>>>>>>>> INFO: JK: ajp13 listening on /0.0.0.0:8009
>>>>>>>> Nov 30, 2010 5:48:51 PM org.apache.jk.server.JkMain start
>>>>>>>> INFO: Jk running ID=0 time=0/87  config=null
>>>>>>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.Catalina start
>>>>>>>> INFO: Server startup in 7529 ms
>>>>>>>> 
>>>>>>>> -----------------------------------------------------------------
>>>>>>>> 
>>>>>>>> So I've suspected that the problem was related to the version of the
>>>>>>>> APR (Apache Portable Runtime) but I'm not sure because I think APR
>>>>>>>> more an issue for performance than a show stopper.
>>>>>>>> 
>>>>>>>> Anyway, I've downloaded APR and compiled it, but I still did not find
>>>>>>>> where to put the libraries in order to stop the APR incompability
>>>>>>>> message. I just don't know where Tomcat has gotten the version 1.1.14
>>>>>>>> of the APR  (apache portable runtime) ??? Maybe I can downgrade to
>>>>>>>> Tomcat 5.5 but Shindig 2 seems not working with that version of Tomcat.
>>>>>>>> 
>>>>>>>> Just for your info, I'm developping on Mac OS X 10.6.4
>>>>>>>> 
>>>>>>>> Any help is welcome!
>>>>>>>> 
>>>>>>>> Claude Coulombe
>>>>>>>> Université de Montréal
>>>>>>> 
>>>>>>> 
>>>>> 
>>>>> 
>>>> 
>> 
>> 


Re: Problem running Wookie on Tomcat

Posted by Claude Coulombe <cl...@umontreal.ca>.
Greetings folks,

Finally, I succeeded to run Wookie on a Tomcat server (version 7.0.5)
on my mac (Mac OS X 10.6.4).  ;-)

What I have done :

1)  download and install Tomcat v 7.0.5
2) set the permission to apache-tomcat-7.0.5 folder (thank you Steven!)
3) change the build.properties file of Wookie
    (Note : including the property wookie.db.type=mysql5 previously
setted to mysql which caused another error...)
4) change the context.xml as discussed in my last post (than you Scott!)

So now, no more Error listenerStart and SEVERE: Context [/wookie]
startup failed due to previous errors

In fact, I have a Wookie server Up and Running under Tomcat ;-)

But, I'm still having the problem with the APR (apache portable runtime)

Also I have now a new « Invalid gadget - Shindig error » but this new
challenge will be discussed in another thread. ;-(

Thanks everybody

Claude

2010/12/1 Claude Coulombe <cl...@umontreal.ca>:
> Hi folks,
>
>>> I just got it working on mine by following the instructions, using:
>>>
>>> Tomcat 6.0.20
>
> mine is 6.0.29
>
>>> Latest wookie build from source
>
> Yes
>
>>> MySQL 5.0.45
>
> mine is 5.1.45
>
>>> However, I had to also copy the <Resource> definition in "wookie.xml" file in /conf into /conf/context.xml as it didn't seem to pick it up automatically. I think Tomcat 7 doesn't have that problem?
>
>>
>> Sorry but I did not find any wookie.xml file?
>> I supposed it should be into the conf folder of Tomcat ? but there is
>> no wookie.xml in that folder
>> I thought that I saw one such wookie.xml file before, but it must be a
>> « somewhat » generated file,  because I can no longer find a trace of
>> it on my computer.
>>
>> Please send me the appropriate context.xml file, a simple cut and
>> paste will be convenient.
>
> I've finally found the wookie.xml under /conf/Catalina/localhost in my
> Tomcat home using unix shell with the find command.
>
> Is that location OK?
>
> I've copy and paste the definition of the resourcefrom wookie.xml to
> the context.xml file :
>
> <?xml version='1.0' encoding='utf-8'?>
> <!--
>  License...
> -->
> <!-- The contents of this file will be loaded for each web application -->
> <Context>
>
>    <!-- Default set of monitored resources -->
>    <WatchedResource>WEB-INF/web.xml</WatchedResource>
>
>    <Resource name="jdbc/widgetdb"
>                    auth="Container"
>                    type="javax.sql.DataSource"
>                    maxActive="80"
>                    maxIdle="5"
>                    username="java"
>                    password="java"
>                    driverClassName="com.mysql.jdbc.Driver"
>                    url="jdbc:mysql://localhost:3306/widgetdb"/>
>
> </Context>
>
> Ufortunately, I'm still have the error with the StandardContext
> listenerStart :-(
>
> SEVERE: Error listenerStart
> Dec 1, 2010 5:12:57 PM org.apache.catalina.core.StandardContext start
> SEVERE: Context [/wookie] startup failed due to previous errors
>
> and the localhost log indicates an error caused by a Unsupported
> database type (you can check the log below)
>
> Since Scott succeeded using MySQL 5.0.45, I will try by downgrading my
> version of MySQL and eventually with Tomcat 6.0.20.
>
> I will keep the dev-list informed...
>
> Thank a lot to Scott and Steven
>
> Claude
>
> -------------------------------------
>
> Dec 1, 2010 5:12:57 PM org.apache.catalina.core.StandardContext listenerStart
> SEVERE: Exception sending context initialized event to listener
> instance of class org.apache.wookie.server.ContextListener
> java.lang.RuntimeException: Unable to load or initialize
> PersistenceManager class: java.lang.reflect.InvocationTargetException
>        at org.apache.wookie.beans.util.PersistenceManagerFactory.initialize(PersistenceManagerFactory.java:74)
>        at org.apache.wookie.server.ContextListener.contextInitialized(ContextListener.java:106)
>        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
>        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
>        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
>        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
>        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
>        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
>        at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
>        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
>        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
>        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
>        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
>        at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
>        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
>        at org.apache.catalina.core.StandardService.start(StandardService.java:519)
>        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>        at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
>        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:597)
>        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
> Caused by: java.lang.reflect.InvocationTargetException
>        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:597)
>        at org.apache.wookie.beans.util.PersistenceManagerFactory.initialize(PersistenceManagerFactory.java:70)
>        ... 25 more
> Caused by: java.lang.RuntimeException: Unable to initialize:
> java.lang.IllegalArgumentException: Unsupported database type:
>        at org.apache.wookie.beans.jpa.JPAPersistenceManager.initialize(JPAPersistenceManager.java:271)
>        ... 30 more
> Caused by: java.lang.IllegalArgumentException: Unsupported database type:
>        at org.apache.wookie.beans.jpa.JPAPersistenceManager.initialize(JPAPersistenceManager.java:196)
>        ... 30 more
> Dec 1, 2010 5:12:57 PM org.apache.catalina.core.StandardContext listenerStop
> SEVERE: Exception sending context destroyed event to listener instance
> of class org.apache.wookie.server.ContextListener
> java.lang.RuntimeException: PersistenceManagerFactory not initialized
>        at org.apache.wookie.beans.util.PersistenceManagerFactory.terminate(PersistenceManagerFactory.java:350)
>        at org.apache.wookie.server.ContextListener.contextDestroyed(ContextListener.java:262)
>        at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4174)
>        at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4778)
>        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4675)
>        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
>        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
>        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
>        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
>        at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
>        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
>        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
>        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
>        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
>        at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
>        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
>        at org.apache.catalina.core.StandardService.start(StandardService.java:519)
>        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>        at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
>        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:597)
>        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
> Dec 1, 2010 5:13:02 PM org.apache.catalina.core.ApplicationContext log
> INFO: ContextListener: contextInitialized()
> Dec 1, 2010 5:13:02 PM org.apache.catalina.core.ApplicationContext log
> INFO: SessionListener: contextInitialized()
>
>
>>>> 2010/12/1 Claude Coulombe <cl...@umontreal.ca>:
>>>>> Hi Scott,
>>>>>
>>>>>> Actually it does.
>>>>>>
>>>>>> Have you looked in your server log as well as catalina.out?
>>>>>>
>>>>>> When I just tried to replicate it on Tomcat 6.0.20, I got the same error in catalina.out, plus this in my localhost log:
>>>>>>
>>>>>> <openjpa-2.0.0-r422266:935683 fatal store error> org.apache.openjpa.util.StoreException: Cannot create JDBC driver of class '' for connect URL 'null'
>>>>>>
>>>>>> ... which is a JPA configuration issue.
>>>>>>
>>>>>> I think Paul and Kris have been testing on Tomcat - have you come across something similar?
>>>>>
>>>>>
>>>>> Yes, I have error messages related to persistance in the localhost log
>>>>>
>>>>> Maybe, the database was not correctly initialized...
>>>>>
>>>>> Caused by: java.lang.reflect.InvocationTargetException
>>>>>        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:597)
>>>>>        at org.apache.wookie.beans.util.PersistenceManagerFactory.initialize(PersistenceManagerFactory.java:70)
>>>>>        ... 25 more
>>>>> Caused by: java.lang.RuntimeException: Unable to initialize:
>>>>> java.lang.IllegalArgumentException: Unsupported database type:
>>>>>        at org.apache.wookie.beans.jpa.JPAPersistenceManager.initialize(JPAPersistenceManager.java:276)
>>>>>        ... 30 more
>>>>> Caused by: java.lang.IllegalArgumentException: Unsupported database type:
>>>>>        at org.apache.wookie.beans.jpa.JPAPersistenceManager.initialize(JPAPersistenceManager.java:201)
>>>>>        ... 30 more
>>>>> 1 d?c. 2010 13:25:35 org.apache.catalina.core.StandardContext listenerStop
>>>>> GRAVE: Exception lors de l'envoi de l'?v?nement contexte d?truit
>>>>> (context destroyed) ? l'instance de classe d'?coute
>>>>> org.apache.wookie.server.ContextListener
>>>>> java.lang.RuntimeException: PersistenceManagerFactory not initialized
>>>>>        at org.apache.wookie.beans.util.PersistenceManagerFactory.terminate(PersistenceManagerFactory.java:350)
>>>>>        at org.apache.wookie.server.ContextListener.contextDestroyed(ContextListener.java:262)
>>>>>        at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4174)
>>>>>        at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4778)
>>>>>        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4675)
>>>>>        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
>>>>>        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
>>>>>        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
>>>>>        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
>>>>>        at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
>>>>>        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
>>>>>        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
>>>>>        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
>>>>>        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>>>>>        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
>>>>>        at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
>>>>>        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>>>>>        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
>>>>>        at org.apache.catalina.core.StandardService.start(StandardService.java:519)
>>>>>        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>>>>>        at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
>>>>>        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:597)
>>>>>        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
>>>>>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
>>>>>>
>>>>>
>>>>> Thanks
>>>>>
>>>>> Claude
>>>>>
>>>>>
>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> (Its also a reminder that we need to make sure we test Shindig integration properly for the release, too)
>>>>>>>
>>>>>>> If you succeed to integrate Shindig and Tomcat, please share your
>>>>>>> findings : OS, Shindig version, Tomcat version.
>>>>>>>
>>>>>>> For instance, which version of Shindig and Tomcat are you using now?
>>>>>>>
>>>>>>> Thanks!
>>>>>>>
>>>>>>> Claude
>>>>>>>
>>>>>>>>
>>>>>>>> On 30 Nov 2010, at 23:24, Claude Coulombe wrote:
>>>>>>>>
>>>>>>>>> Greetings floks,
>>>>>>>>>
>>>>>>>>> I have problem to run Wookie on a Tomcat servlet container (6.0.29),
>>>>>>>>>
>>>>>>>>> I've followed the procedure about running Wookie with Tomcat and MySQL
>>>>>>>>> (modifying build.properties, creating widgetdb, adding
>>>>>>>>> mysql-connector-java-5.1.7.jar, etc). So I've got a BUILD SUCCESSFUL
>>>>>>>>> with ant clean-build deploy-webapp
>>>>>>>>>
>>>>>>>>> But when I've started the Tomcat server (catalina.sh run), I've got an
>>>>>>>>> error (Error listenerStart).
>>>>>>>>>
>>>>>>>>> You can check the catalina.out log below :
>>>>>>>>>
>>>>>>>>> -----------------------------------------------------------------
>>>>>>>>>
>>>>>>>>> Using CATALINA_BASE:   /usr/local/apache-tomcat-6.0.29
>>>>>>>>> Using CATALINA_HOME:   /usr/local/apache-tomcat-6.0.29
>>>>>>>>> Using CATALINA_TMPDIR: /usr/local/apache-tomcat-6.0.29/temp
>>>>>>>>> Using JRE_HOME:
>>>>>>>>> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/home
>>>>>>>>> Using CLASSPATH:       /usr/local/apache-tomcat-6.0.29/bin/bootstrap.jar
>>>>>>>>> Nov 30, 2010 5:48:43 PM org.apache.catalina.core.AprLifecycleListener init
>>>>>>>>> SEVERE: An incompatible version 1.1.14 of the APR based Apache Tomcat
>>>>>>>>> Native library is installed, while Tomcat requires version 1.1.17
>>>>>>>>> Nov 30, 2010 5:48:43 PM org.apache.coyote.http11.Http11Protocol init
>>>>>>>>> INFO: Initializing Coyote HTTP/1.1 on http-8080
>>>>>>>>> Nov 30, 2010 5:48:43 PM org.apache.catalina.startup.Catalina load
>>>>>>>>> INFO: Initialization processed in 931 ms
>>>>>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.core.StandardService start
>>>>>>>>> INFO: Starting service Catalina
>>>>>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.core.StandardEngine start
>>>>>>>>> INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
>>>>>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>>>>>>>>> INFO: Deploying configuration descriptor host-manager.xml
>>>>>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>>>>>>>>> INFO: Deploying configuration descriptor manager.xml
>>>>>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>>>>>>>>> INFO: Deploying configuration descriptor wookie.xml
>>>>>>>>>  INFO [main] (ContextListener.java:76) - Using local widget server
>>>>>>>>> properties file:
>>>>>>>>> /usr/local/apache-tomcat-6.0.29/bin/local.widgetserver.properties
>>>>>>>>> 17:48:45,473  INFO ContextListener:76 - Using local widget server
>>>>>>>>> properties file:
>>>>>>>>> /usr/local/apache-tomcat-6.0.29/bin/local.widgetserver.properties
>>>>>>>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.core.StandardContext start
>>>>>>>>> SEVERE: Error listenerStart
>>>>>>>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.core.StandardContext start
>>>>>>>>> SEVERE: Context [/wookie] startup failed due to previous errors
>>>>>>>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.loader.WebappClassLoader
>>>>>>>>> clearReferencesJdbc
>>>>>>>>> SEVERE: The web application [/wookie] registered the JBDC driver
>>>>>>>>> [org.apache.derby.jdbc.AutoloadedDriver] but failed to unregister it
>>>>>>>>> when the web application was stopped. To prevent a memory leak, the
>>>>>>>>> JDBC Driver has been forcibly unregistered.
>>>>>>>>> Nov 30, 2010 5:48:46 PM org.apache.catalina.startup.HostConfig deployWAR
>>>>>>>>> INFO: Deploying web application archive ROOT.war
>>>>>>>>> Nov 30, 2010 5:48:49 PM
>>>>>>>>> org.apache.shindig.config.JsonContainerConfigLoader loadContainers
>>>>>>>>> INFO: Loading resources from: containers/default/container.js
>>>>>>>>> Nov 30, 2010 5:48:49 PM
>>>>>>>>> org.apache.shindig.config.JsonContainerConfigLoader loadResources
>>>>>>>>> INFO: Reading container config: containers/default/container.js
>>>>>>>>> Nov 30, 2010 5:48:49 PM
>>>>>>>>> org.apache.shindig.gadgets.features.FeatureRegistry register
>>>>>>>>> INFO: Loading resources from: res:features-extras/features.txt
>>>>>>>>> Nov 30, 2010 5:48:49 PM org.apache.shindig.common.xml.XmlUtil <clinit>
>>>>>>>>> INFO: Not using secure XML processing.
>>>>>>>>> Nov 30, 2010 5:48:49 PM org.apache.shindig.common.xml.XmlUtil <clinit>
>>>>>>>>> INFO: Reusing document builders
>>>>>>>>> Nov 30, 2010 5:48:49 PM
>>>>>>>>> org.apache.shindig.gadgets.features.FeatureRegistry register
>>>>>>>>> INFO: Loading resources from: res:features/features.txt
>>>>>>>>> Nov 30, 2010 5:48:50 PM
>>>>>>>>> org.apache.shindig.gadgets.servlet.CajaContentRewriter <init>
>>>>>>>>> INFO: Cajoled cache
>>>>>>>>> createdorg.apache.shindig.common.cache.ehcache.EhConfiguredCache@468034b6
>>>>>>>>> Nov 30, 2010 5:48:50 PM
>>>>>>>>> org.apache.shindig.gadgets.servlet.CajaContentRewriter <init>
>>>>>>>>> INFO: Cajoled cache
>>>>>>>>> createdorg.apache.shindig.common.cache.ehcache.EhConfiguredCache@468034b6
>>>>>>>>> Nov 30, 2010 5:48:50 PM
>>>>>>>>> org.apache.shindig.gadgets.oauth.OAuthModule$OAuthStoreProvider
>>>>>>>>> loadDefaultKey
>>>>>>>>> WARNING: Couldn't load OAuth signing key.  To create a key, run:
>>>>>>>>>   openssl req -newkey rsa:1024 -days 365 -nodes -x509 -keyout testkey.pem \
>>>>>>>>>      -out testkey.pem -subj '/CN=mytestkey'
>>>>>>>>>   openssl pkcs8 -in testkey.pem -out oauthkey.pem -topk8 -nocrypt -outform PEM
>>>>>>>>>
>>>>>>>>> Then edit shindig.properties and add these lines:
>>>>>>>>> shindig.signing.key-file=<path-to-oauthkey.pem>
>>>>>>>>> shindig.signing.key-name=mykey
>>>>>>>>>
>>>>>>>>> Nov 30, 2010 5:48:50 PM
>>>>>>>>> org.apache.shindig.gadgets.oauth.OAuthModule$OAuthCrypterProvider
>>>>>>>>> <init>
>>>>>>>>> INFO: Using random key for OAuth client-side state encryption
>>>>>>>>> Nov 30, 2010 5:48:50 PM
>>>>>>>>> org.apache.shiro.config.IniSecurityManagerFactory isAutoApplyRealms
>>>>>>>>> INFO: Realms have been explicitly set on the SecurityManager instance
>>>>>>>>> - auto-setting of realms will not occur.
>>>>>>>>> Nov 30, 2010 5:48:50 PM org.apache.shiro.realm.AuthorizingRealm
>>>>>>>>> getAuthorizationCacheLazy
>>>>>>>>> INFO: No cache or cacheManager properties have been set.
>>>>>>>>> Authorization cache cannot be obtained.
>>>>>>>>> Nov 30, 2010 5:48:50 PM org.apache.catalina.startup.HostConfig deployDirectory
>>>>>>>>> INFO: Deploying web application directory docs
>>>>>>>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.HostConfig deployDirectory
>>>>>>>>> INFO: Deploying web application directory examples
>>>>>>>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.HostConfig deployDirectory
>>>>>>>>> INFO: Deploying web application directory ROOT-old
>>>>>>>>> Nov 30, 2010 5:48:51 PM org.apache.coyote.http11.Http11Protocol start
>>>>>>>>> INFO: Starting Coyote HTTP/1.1 on http-8080
>>>>>>>>> Nov 30, 2010 5:48:51 PM org.apache.jk.common.ChannelSocket init
>>>>>>>>> INFO: JK: ajp13 listening on /0.0.0.0:8009
>>>>>>>>> Nov 30, 2010 5:48:51 PM org.apache.jk.server.JkMain start
>>>>>>>>> INFO: Jk running ID=0 time=0/87  config=null
>>>>>>>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.Catalina start
>>>>>>>>> INFO: Server startup in 7529 ms
>>>>>>>>>
>>>>>>>>> -----------------------------------------------------------------
>>>>>>>>>
>>>>>>>>> So I've suspected that the problem was related to the version of the
>>>>>>>>> APR (Apache Portable Runtime) but I'm not sure because I think APR
>>>>>>>>> more an issue for performance than a show stopper.
>>>>>>>>>
>>>>>>>>> Anyway, I've downloaded APR and compiled it, but I still did not find
>>>>>>>>> where to put the libraries in order to stop the APR incompability
>>>>>>>>> message. I just don't know where Tomcat has gotten the version 1.1.14
>>>>>>>>> of the APR  (apache portable runtime) ??? Maybe I can downgrade to
>>>>>>>>> Tomcat 5.5 but Shindig 2 seems not working with that version of Tomcat.
>>>>>>>>>
>>>>>>>>> Just for your info, I'm developping on Mac OS X 10.6.4
>>>>>>>>>
>>>>>>>>> Any help is welcome!
>>>>>>>>>
>>>>>>>>> Claude Coulombe
>>>>>>>>> Université de Montréal
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
>>>
>>
>

Re: Problem running Wookie on Tomcat

Posted by Claude Coulombe <cl...@umontreal.ca>.
Hi folks,

>> I just got it working on mine by following the instructions, using:
>>
>> Tomcat 6.0.20

mine is 6.0.29

>> Latest wookie build from source

Yes

>> MySQL 5.0.45

mine is 5.1.45

>> However, I had to also copy the <Resource> definition in "wookie.xml" file in /conf into /conf/context.xml as it didn't seem to pick it up automatically. I think Tomcat 7 doesn't have that problem?

>
> Sorry but I did not find any wookie.xml file?
> I supposed it should be into the conf folder of Tomcat ? but there is
> no wookie.xml in that folder
> I thought that I saw one such wookie.xml file before, but it must be a
> « somewhat » generated file,  because I can no longer find a trace of
> it on my computer.
>
> Please send me the appropriate context.xml file, a simple cut and
> paste will be convenient.

I've finally found the wookie.xml under /conf/Catalina/localhost in my
Tomcat home using unix shell with the find command.

Is that location OK?

I've copy and paste the definition of the resourcefrom wookie.xml to
the context.xml file :

<?xml version='1.0' encoding='utf-8'?>
<!--
  License...
-->
<!-- The contents of this file will be loaded for each web application -->
<Context>

    <!-- Default set of monitored resources -->
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
	
    <Resource name="jdbc/widgetdb"
	            auth="Container"
	            type="javax.sql.DataSource"
	            maxActive="80"
	            maxIdle="5"
	            username="java"
	            password="java"
	            driverClassName="com.mysql.jdbc.Driver"
	            url="jdbc:mysql://localhost:3306/widgetdb"/>

</Context>

Ufortunately, I'm still have the error with the StandardContext
listenerStart :-(

SEVERE: Error listenerStart
Dec 1, 2010 5:12:57 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/wookie] startup failed due to previous errors

and the localhost log indicates an error caused by a Unsupported
database type (you can check the log below)

Since Scott succeeded using MySQL 5.0.45, I will try by downgrading my
version of MySQL and eventually with Tomcat 6.0.20.

I will keep the dev-list informed...

Thank a lot to Scott and Steven

Claude

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

Dec 1, 2010 5:12:57 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener
instance of class org.apache.wookie.server.ContextListener
java.lang.RuntimeException: Unable to load or initialize
PersistenceManager class: java.lang.reflect.InvocationTargetException
	at org.apache.wookie.beans.util.PersistenceManagerFactory.initialize(PersistenceManagerFactory.java:74)
	at org.apache.wookie.server.ContextListener.contextInitialized(ContextListener.java:106)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
	at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
	at org.apache.catalina.core.StandardService.start(StandardService.java:519)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
	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:597)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.reflect.InvocationTargetException
	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:597)
	at org.apache.wookie.beans.util.PersistenceManagerFactory.initialize(PersistenceManagerFactory.java:70)
	... 25 more
Caused by: java.lang.RuntimeException: Unable to initialize:
java.lang.IllegalArgumentException: Unsupported database type:
	at org.apache.wookie.beans.jpa.JPAPersistenceManager.initialize(JPAPersistenceManager.java:271)
	... 30 more
Caused by: java.lang.IllegalArgumentException: Unsupported database type:
	at org.apache.wookie.beans.jpa.JPAPersistenceManager.initialize(JPAPersistenceManager.java:196)
	... 30 more
Dec 1, 2010 5:12:57 PM org.apache.catalina.core.StandardContext listenerStop
SEVERE: Exception sending context destroyed event to listener instance
of class org.apache.wookie.server.ContextListener
java.lang.RuntimeException: PersistenceManagerFactory not initialized
	at org.apache.wookie.beans.util.PersistenceManagerFactory.terminate(PersistenceManagerFactory.java:350)
	at org.apache.wookie.server.ContextListener.contextDestroyed(ContextListener.java:262)
	at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4174)
	at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4778)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4675)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
	at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
	at org.apache.catalina.core.StandardService.start(StandardService.java:519)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
	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:597)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Dec 1, 2010 5:13:02 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Dec 1, 2010 5:13:02 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()


>>> 2010/12/1 Claude Coulombe <cl...@umontreal.ca>:
>>>> Hi Scott,
>>>>
>>>>> Actually it does.
>>>>>
>>>>> Have you looked in your server log as well as catalina.out?
>>>>>
>>>>> When I just tried to replicate it on Tomcat 6.0.20, I got the same error in catalina.out, plus this in my localhost log:
>>>>>
>>>>> <openjpa-2.0.0-r422266:935683 fatal store error> org.apache.openjpa.util.StoreException: Cannot create JDBC driver of class '' for connect URL 'null'
>>>>>
>>>>> ... which is a JPA configuration issue.
>>>>>
>>>>> I think Paul and Kris have been testing on Tomcat - have you come across something similar?
>>>>
>>>>
>>>> Yes, I have error messages related to persistance in the localhost log
>>>>
>>>> Maybe, the database was not correctly initialized...
>>>>
>>>> Caused by: java.lang.reflect.InvocationTargetException
>>>>        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:597)
>>>>        at org.apache.wookie.beans.util.PersistenceManagerFactory.initialize(PersistenceManagerFactory.java:70)
>>>>        ... 25 more
>>>> Caused by: java.lang.RuntimeException: Unable to initialize:
>>>> java.lang.IllegalArgumentException: Unsupported database type:
>>>>        at org.apache.wookie.beans.jpa.JPAPersistenceManager.initialize(JPAPersistenceManager.java:276)
>>>>        ... 30 more
>>>> Caused by: java.lang.IllegalArgumentException: Unsupported database type:
>>>>        at org.apache.wookie.beans.jpa.JPAPersistenceManager.initialize(JPAPersistenceManager.java:201)
>>>>        ... 30 more
>>>> 1 d?c. 2010 13:25:35 org.apache.catalina.core.StandardContext listenerStop
>>>> GRAVE: Exception lors de l'envoi de l'?v?nement contexte d?truit
>>>> (context destroyed) ? l'instance de classe d'?coute
>>>> org.apache.wookie.server.ContextListener
>>>> java.lang.RuntimeException: PersistenceManagerFactory not initialized
>>>>        at org.apache.wookie.beans.util.PersistenceManagerFactory.terminate(PersistenceManagerFactory.java:350)
>>>>        at org.apache.wookie.server.ContextListener.contextDestroyed(ContextListener.java:262)
>>>>        at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4174)
>>>>        at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4778)
>>>>        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4675)
>>>>        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
>>>>        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
>>>>        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
>>>>        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
>>>>        at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
>>>>        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
>>>>        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
>>>>        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
>>>>        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>>>>        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
>>>>        at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
>>>>        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>>>>        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
>>>>        at org.apache.catalina.core.StandardService.start(StandardService.java:519)
>>>>        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>>>>        at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
>>>>        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:597)
>>>>        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
>>>>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
>>>>>
>>>>
>>>> Thanks
>>>>
>>>> Claude
>>>>
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>> (Its also a reminder that we need to make sure we test Shindig integration properly for the release, too)
>>>>>>
>>>>>> If you succeed to integrate Shindig and Tomcat, please share your
>>>>>> findings : OS, Shindig version, Tomcat version.
>>>>>>
>>>>>> For instance, which version of Shindig and Tomcat are you using now?
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>> Claude
>>>>>>
>>>>>>>
>>>>>>> On 30 Nov 2010, at 23:24, Claude Coulombe wrote:
>>>>>>>
>>>>>>>> Greetings floks,
>>>>>>>>
>>>>>>>> I have problem to run Wookie on a Tomcat servlet container (6.0.29),
>>>>>>>>
>>>>>>>> I've followed the procedure about running Wookie with Tomcat and MySQL
>>>>>>>> (modifying build.properties, creating widgetdb, adding
>>>>>>>> mysql-connector-java-5.1.7.jar, etc). So I've got a BUILD SUCCESSFUL
>>>>>>>> with ant clean-build deploy-webapp
>>>>>>>>
>>>>>>>> But when I've started the Tomcat server (catalina.sh run), I've got an
>>>>>>>> error (Error listenerStart).
>>>>>>>>
>>>>>>>> You can check the catalina.out log below :
>>>>>>>>
>>>>>>>> -----------------------------------------------------------------
>>>>>>>>
>>>>>>>> Using CATALINA_BASE:   /usr/local/apache-tomcat-6.0.29
>>>>>>>> Using CATALINA_HOME:   /usr/local/apache-tomcat-6.0.29
>>>>>>>> Using CATALINA_TMPDIR: /usr/local/apache-tomcat-6.0.29/temp
>>>>>>>> Using JRE_HOME:
>>>>>>>> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/home
>>>>>>>> Using CLASSPATH:       /usr/local/apache-tomcat-6.0.29/bin/bootstrap.jar
>>>>>>>> Nov 30, 2010 5:48:43 PM org.apache.catalina.core.AprLifecycleListener init
>>>>>>>> SEVERE: An incompatible version 1.1.14 of the APR based Apache Tomcat
>>>>>>>> Native library is installed, while Tomcat requires version 1.1.17
>>>>>>>> Nov 30, 2010 5:48:43 PM org.apache.coyote.http11.Http11Protocol init
>>>>>>>> INFO: Initializing Coyote HTTP/1.1 on http-8080
>>>>>>>> Nov 30, 2010 5:48:43 PM org.apache.catalina.startup.Catalina load
>>>>>>>> INFO: Initialization processed in 931 ms
>>>>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.core.StandardService start
>>>>>>>> INFO: Starting service Catalina
>>>>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.core.StandardEngine start
>>>>>>>> INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
>>>>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>>>>>>>> INFO: Deploying configuration descriptor host-manager.xml
>>>>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>>>>>>>> INFO: Deploying configuration descriptor manager.xml
>>>>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>>>>>>>> INFO: Deploying configuration descriptor wookie.xml
>>>>>>>>  INFO [main] (ContextListener.java:76) - Using local widget server
>>>>>>>> properties file:
>>>>>>>> /usr/local/apache-tomcat-6.0.29/bin/local.widgetserver.properties
>>>>>>>> 17:48:45,473  INFO ContextListener:76 - Using local widget server
>>>>>>>> properties file:
>>>>>>>> /usr/local/apache-tomcat-6.0.29/bin/local.widgetserver.properties
>>>>>>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.core.StandardContext start
>>>>>>>> SEVERE: Error listenerStart
>>>>>>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.core.StandardContext start
>>>>>>>> SEVERE: Context [/wookie] startup failed due to previous errors
>>>>>>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.loader.WebappClassLoader
>>>>>>>> clearReferencesJdbc
>>>>>>>> SEVERE: The web application [/wookie] registered the JBDC driver
>>>>>>>> [org.apache.derby.jdbc.AutoloadedDriver] but failed to unregister it
>>>>>>>> when the web application was stopped. To prevent a memory leak, the
>>>>>>>> JDBC Driver has been forcibly unregistered.
>>>>>>>> Nov 30, 2010 5:48:46 PM org.apache.catalina.startup.HostConfig deployWAR
>>>>>>>> INFO: Deploying web application archive ROOT.war
>>>>>>>> Nov 30, 2010 5:48:49 PM
>>>>>>>> org.apache.shindig.config.JsonContainerConfigLoader loadContainers
>>>>>>>> INFO: Loading resources from: containers/default/container.js
>>>>>>>> Nov 30, 2010 5:48:49 PM
>>>>>>>> org.apache.shindig.config.JsonContainerConfigLoader loadResources
>>>>>>>> INFO: Reading container config: containers/default/container.js
>>>>>>>> Nov 30, 2010 5:48:49 PM
>>>>>>>> org.apache.shindig.gadgets.features.FeatureRegistry register
>>>>>>>> INFO: Loading resources from: res:features-extras/features.txt
>>>>>>>> Nov 30, 2010 5:48:49 PM org.apache.shindig.common.xml.XmlUtil <clinit>
>>>>>>>> INFO: Not using secure XML processing.
>>>>>>>> Nov 30, 2010 5:48:49 PM org.apache.shindig.common.xml.XmlUtil <clinit>
>>>>>>>> INFO: Reusing document builders
>>>>>>>> Nov 30, 2010 5:48:49 PM
>>>>>>>> org.apache.shindig.gadgets.features.FeatureRegistry register
>>>>>>>> INFO: Loading resources from: res:features/features.txt
>>>>>>>> Nov 30, 2010 5:48:50 PM
>>>>>>>> org.apache.shindig.gadgets.servlet.CajaContentRewriter <init>
>>>>>>>> INFO: Cajoled cache
>>>>>>>> createdorg.apache.shindig.common.cache.ehcache.EhConfiguredCache@468034b6
>>>>>>>> Nov 30, 2010 5:48:50 PM
>>>>>>>> org.apache.shindig.gadgets.servlet.CajaContentRewriter <init>
>>>>>>>> INFO: Cajoled cache
>>>>>>>> createdorg.apache.shindig.common.cache.ehcache.EhConfiguredCache@468034b6
>>>>>>>> Nov 30, 2010 5:48:50 PM
>>>>>>>> org.apache.shindig.gadgets.oauth.OAuthModule$OAuthStoreProvider
>>>>>>>> loadDefaultKey
>>>>>>>> WARNING: Couldn't load OAuth signing key.  To create a key, run:
>>>>>>>>   openssl req -newkey rsa:1024 -days 365 -nodes -x509 -keyout testkey.pem \
>>>>>>>>      -out testkey.pem -subj '/CN=mytestkey'
>>>>>>>>   openssl pkcs8 -in testkey.pem -out oauthkey.pem -topk8 -nocrypt -outform PEM
>>>>>>>>
>>>>>>>> Then edit shindig.properties and add these lines:
>>>>>>>> shindig.signing.key-file=<path-to-oauthkey.pem>
>>>>>>>> shindig.signing.key-name=mykey
>>>>>>>>
>>>>>>>> Nov 30, 2010 5:48:50 PM
>>>>>>>> org.apache.shindig.gadgets.oauth.OAuthModule$OAuthCrypterProvider
>>>>>>>> <init>
>>>>>>>> INFO: Using random key for OAuth client-side state encryption
>>>>>>>> Nov 30, 2010 5:48:50 PM
>>>>>>>> org.apache.shiro.config.IniSecurityManagerFactory isAutoApplyRealms
>>>>>>>> INFO: Realms have been explicitly set on the SecurityManager instance
>>>>>>>> - auto-setting of realms will not occur.
>>>>>>>> Nov 30, 2010 5:48:50 PM org.apache.shiro.realm.AuthorizingRealm
>>>>>>>> getAuthorizationCacheLazy
>>>>>>>> INFO: No cache or cacheManager properties have been set.
>>>>>>>> Authorization cache cannot be obtained.
>>>>>>>> Nov 30, 2010 5:48:50 PM org.apache.catalina.startup.HostConfig deployDirectory
>>>>>>>> INFO: Deploying web application directory docs
>>>>>>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.HostConfig deployDirectory
>>>>>>>> INFO: Deploying web application directory examples
>>>>>>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.HostConfig deployDirectory
>>>>>>>> INFO: Deploying web application directory ROOT-old
>>>>>>>> Nov 30, 2010 5:48:51 PM org.apache.coyote.http11.Http11Protocol start
>>>>>>>> INFO: Starting Coyote HTTP/1.1 on http-8080
>>>>>>>> Nov 30, 2010 5:48:51 PM org.apache.jk.common.ChannelSocket init
>>>>>>>> INFO: JK: ajp13 listening on /0.0.0.0:8009
>>>>>>>> Nov 30, 2010 5:48:51 PM org.apache.jk.server.JkMain start
>>>>>>>> INFO: Jk running ID=0 time=0/87  config=null
>>>>>>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.Catalina start
>>>>>>>> INFO: Server startup in 7529 ms
>>>>>>>>
>>>>>>>> -----------------------------------------------------------------
>>>>>>>>
>>>>>>>> So I've suspected that the problem was related to the version of the
>>>>>>>> APR (Apache Portable Runtime) but I'm not sure because I think APR
>>>>>>>> more an issue for performance than a show stopper.
>>>>>>>>
>>>>>>>> Anyway, I've downloaded APR and compiled it, but I still did not find
>>>>>>>> where to put the libraries in order to stop the APR incompability
>>>>>>>> message. I just don't know where Tomcat has gotten the version 1.1.14
>>>>>>>> of the APR  (apache portable runtime) ??? Maybe I can downgrade to
>>>>>>>> Tomcat 5.5 but Shindig 2 seems not working with that version of Tomcat.
>>>>>>>>
>>>>>>>> Just for your info, I'm developping on Mac OS X 10.6.4
>>>>>>>>
>>>>>>>> Any help is welcome!
>>>>>>>>
>>>>>>>> Claude Coulombe
>>>>>>>> Université de Montréal
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>>
>>
>>
>

Re: Problem running Wookie on Tomcat

Posted by Claude Coulombe <cl...@umontreal.ca>.
Hi Scott,

> I just got it working on mine by following the instructions, using:
>
> Tomcat 6.0.20
> Latest wookie build from source
> MySQL 5.0.45

Yessss!!!

>
> However, I had to also copy the <Resource> definition in "wookie.xml" file in /conf into /conf/context.xml as it didn't seem to pick it up automatically. I think Tomcat 7 doesn't have that problem?

Sorry but I did not find any wookie.xml file?
I supposed it should be into the conf folder of Tomcat ? but there is
no wookie.xml in that folder
I thought that I saw one such wookie.xml file before, but it must be a
« somewhat » generated file,  because I can no longer find a trace of
it on my computer.

Please send me the appropriate context.xml file, a simple cut and
paste will be convenient.

Claude

>
>>
>> 2010/12/1 Claude Coulombe <cl...@umontreal.ca>:
>>> Hi Scott,
>>>
>>>> Actually it does.
>>>>
>>>> Have you looked in your server log as well as catalina.out?
>>>>
>>>> When I just tried to replicate it on Tomcat 6.0.20, I got the same error in catalina.out, plus this in my localhost log:
>>>>
>>>> <openjpa-2.0.0-r422266:935683 fatal store error> org.apache.openjpa.util.StoreException: Cannot create JDBC driver of class '' for connect URL 'null'
>>>>
>>>> ... which is a JPA configuration issue.
>>>>
>>>> I think Paul and Kris have been testing on Tomcat - have you come across something similar?
>>>
>>>
>>> Yes, I have error messages related to persistance in the localhost log
>>>
>>> Maybe, the database was not correctly initialized...
>>>
>>> Caused by: java.lang.reflect.InvocationTargetException
>>>        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:597)
>>>        at org.apache.wookie.beans.util.PersistenceManagerFactory.initialize(PersistenceManagerFactory.java:70)
>>>        ... 25 more
>>> Caused by: java.lang.RuntimeException: Unable to initialize:
>>> java.lang.IllegalArgumentException: Unsupported database type:
>>>        at org.apache.wookie.beans.jpa.JPAPersistenceManager.initialize(JPAPersistenceManager.java:276)
>>>        ... 30 more
>>> Caused by: java.lang.IllegalArgumentException: Unsupported database type:
>>>        at org.apache.wookie.beans.jpa.JPAPersistenceManager.initialize(JPAPersistenceManager.java:201)
>>>        ... 30 more
>>> 1 d?c. 2010 13:25:35 org.apache.catalina.core.StandardContext listenerStop
>>> GRAVE: Exception lors de l'envoi de l'?v?nement contexte d?truit
>>> (context destroyed) ? l'instance de classe d'?coute
>>> org.apache.wookie.server.ContextListener
>>> java.lang.RuntimeException: PersistenceManagerFactory not initialized
>>>        at org.apache.wookie.beans.util.PersistenceManagerFactory.terminate(PersistenceManagerFactory.java:350)
>>>        at org.apache.wookie.server.ContextListener.contextDestroyed(ContextListener.java:262)
>>>        at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4174)
>>>        at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4778)
>>>        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4675)
>>>        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
>>>        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
>>>        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
>>>        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
>>>        at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
>>>        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
>>>        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
>>>        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
>>>        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>>>        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
>>>        at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
>>>        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>>>        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
>>>        at org.apache.catalina.core.StandardService.start(StandardService.java:519)
>>>        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>>>        at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
>>>        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:597)
>>>        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
>>>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
>>>>
>>>
>>> Thanks
>>>
>>> Claude
>>>
>>>
>>>
>>>>>
>>>>>
>>>>>> (Its also a reminder that we need to make sure we test Shindig integration properly for the release, too)
>>>>>
>>>>> If you succeed to integrate Shindig and Tomcat, please share your
>>>>> findings : OS, Shindig version, Tomcat version.
>>>>>
>>>>> For instance, which version of Shindig and Tomcat are you using now?
>>>>>
>>>>> Thanks!
>>>>>
>>>>> Claude
>>>>>
>>>>>>
>>>>>> On 30 Nov 2010, at 23:24, Claude Coulombe wrote:
>>>>>>
>>>>>>> Greetings floks,
>>>>>>>
>>>>>>> I have problem to run Wookie on a Tomcat servlet container (6.0.29),
>>>>>>>
>>>>>>> I've followed the procedure about running Wookie with Tomcat and MySQL
>>>>>>> (modifying build.properties, creating widgetdb, adding
>>>>>>> mysql-connector-java-5.1.7.jar, etc). So I've got a BUILD SUCCESSFUL
>>>>>>> with ant clean-build deploy-webapp
>>>>>>>
>>>>>>> But when I've started the Tomcat server (catalina.sh run), I've got an
>>>>>>> error (Error listenerStart).
>>>>>>>
>>>>>>> You can check the catalina.out log below :
>>>>>>>
>>>>>>> -----------------------------------------------------------------
>>>>>>>
>>>>>>> Using CATALINA_BASE:   /usr/local/apache-tomcat-6.0.29
>>>>>>> Using CATALINA_HOME:   /usr/local/apache-tomcat-6.0.29
>>>>>>> Using CATALINA_TMPDIR: /usr/local/apache-tomcat-6.0.29/temp
>>>>>>> Using JRE_HOME:
>>>>>>> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/home
>>>>>>> Using CLASSPATH:       /usr/local/apache-tomcat-6.0.29/bin/bootstrap.jar
>>>>>>> Nov 30, 2010 5:48:43 PM org.apache.catalina.core.AprLifecycleListener init
>>>>>>> SEVERE: An incompatible version 1.1.14 of the APR based Apache Tomcat
>>>>>>> Native library is installed, while Tomcat requires version 1.1.17
>>>>>>> Nov 30, 2010 5:48:43 PM org.apache.coyote.http11.Http11Protocol init
>>>>>>> INFO: Initializing Coyote HTTP/1.1 on http-8080
>>>>>>> Nov 30, 2010 5:48:43 PM org.apache.catalina.startup.Catalina load
>>>>>>> INFO: Initialization processed in 931 ms
>>>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.core.StandardService start
>>>>>>> INFO: Starting service Catalina
>>>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.core.StandardEngine start
>>>>>>> INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
>>>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>>>>>>> INFO: Deploying configuration descriptor host-manager.xml
>>>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>>>>>>> INFO: Deploying configuration descriptor manager.xml
>>>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>>>>>>> INFO: Deploying configuration descriptor wookie.xml
>>>>>>>  INFO [main] (ContextListener.java:76) - Using local widget server
>>>>>>> properties file:
>>>>>>> /usr/local/apache-tomcat-6.0.29/bin/local.widgetserver.properties
>>>>>>> 17:48:45,473  INFO ContextListener:76 - Using local widget server
>>>>>>> properties file:
>>>>>>> /usr/local/apache-tomcat-6.0.29/bin/local.widgetserver.properties
>>>>>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.core.StandardContext start
>>>>>>> SEVERE: Error listenerStart
>>>>>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.core.StandardContext start
>>>>>>> SEVERE: Context [/wookie] startup failed due to previous errors
>>>>>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.loader.WebappClassLoader
>>>>>>> clearReferencesJdbc
>>>>>>> SEVERE: The web application [/wookie] registered the JBDC driver
>>>>>>> [org.apache.derby.jdbc.AutoloadedDriver] but failed to unregister it
>>>>>>> when the web application was stopped. To prevent a memory leak, the
>>>>>>> JDBC Driver has been forcibly unregistered.
>>>>>>> Nov 30, 2010 5:48:46 PM org.apache.catalina.startup.HostConfig deployWAR
>>>>>>> INFO: Deploying web application archive ROOT.war
>>>>>>> Nov 30, 2010 5:48:49 PM
>>>>>>> org.apache.shindig.config.JsonContainerConfigLoader loadContainers
>>>>>>> INFO: Loading resources from: containers/default/container.js
>>>>>>> Nov 30, 2010 5:48:49 PM
>>>>>>> org.apache.shindig.config.JsonContainerConfigLoader loadResources
>>>>>>> INFO: Reading container config: containers/default/container.js
>>>>>>> Nov 30, 2010 5:48:49 PM
>>>>>>> org.apache.shindig.gadgets.features.FeatureRegistry register
>>>>>>> INFO: Loading resources from: res:features-extras/features.txt
>>>>>>> Nov 30, 2010 5:48:49 PM org.apache.shindig.common.xml.XmlUtil <clinit>
>>>>>>> INFO: Not using secure XML processing.
>>>>>>> Nov 30, 2010 5:48:49 PM org.apache.shindig.common.xml.XmlUtil <clinit>
>>>>>>> INFO: Reusing document builders
>>>>>>> Nov 30, 2010 5:48:49 PM
>>>>>>> org.apache.shindig.gadgets.features.FeatureRegistry register
>>>>>>> INFO: Loading resources from: res:features/features.txt
>>>>>>> Nov 30, 2010 5:48:50 PM
>>>>>>> org.apache.shindig.gadgets.servlet.CajaContentRewriter <init>
>>>>>>> INFO: Cajoled cache
>>>>>>> createdorg.apache.shindig.common.cache.ehcache.EhConfiguredCache@468034b6
>>>>>>> Nov 30, 2010 5:48:50 PM
>>>>>>> org.apache.shindig.gadgets.servlet.CajaContentRewriter <init>
>>>>>>> INFO: Cajoled cache
>>>>>>> createdorg.apache.shindig.common.cache.ehcache.EhConfiguredCache@468034b6
>>>>>>> Nov 30, 2010 5:48:50 PM
>>>>>>> org.apache.shindig.gadgets.oauth.OAuthModule$OAuthStoreProvider
>>>>>>> loadDefaultKey
>>>>>>> WARNING: Couldn't load OAuth signing key.  To create a key, run:
>>>>>>>   openssl req -newkey rsa:1024 -days 365 -nodes -x509 -keyout testkey.pem \
>>>>>>>      -out testkey.pem -subj '/CN=mytestkey'
>>>>>>>   openssl pkcs8 -in testkey.pem -out oauthkey.pem -topk8 -nocrypt -outform PEM
>>>>>>>
>>>>>>> Then edit shindig.properties and add these lines:
>>>>>>> shindig.signing.key-file=<path-to-oauthkey.pem>
>>>>>>> shindig.signing.key-name=mykey
>>>>>>>
>>>>>>> Nov 30, 2010 5:48:50 PM
>>>>>>> org.apache.shindig.gadgets.oauth.OAuthModule$OAuthCrypterProvider
>>>>>>> <init>
>>>>>>> INFO: Using random key for OAuth client-side state encryption
>>>>>>> Nov 30, 2010 5:48:50 PM
>>>>>>> org.apache.shiro.config.IniSecurityManagerFactory isAutoApplyRealms
>>>>>>> INFO: Realms have been explicitly set on the SecurityManager instance
>>>>>>> - auto-setting of realms will not occur.
>>>>>>> Nov 30, 2010 5:48:50 PM org.apache.shiro.realm.AuthorizingRealm
>>>>>>> getAuthorizationCacheLazy
>>>>>>> INFO: No cache or cacheManager properties have been set.
>>>>>>> Authorization cache cannot be obtained.
>>>>>>> Nov 30, 2010 5:48:50 PM org.apache.catalina.startup.HostConfig deployDirectory
>>>>>>> INFO: Deploying web application directory docs
>>>>>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.HostConfig deployDirectory
>>>>>>> INFO: Deploying web application directory examples
>>>>>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.HostConfig deployDirectory
>>>>>>> INFO: Deploying web application directory ROOT-old
>>>>>>> Nov 30, 2010 5:48:51 PM org.apache.coyote.http11.Http11Protocol start
>>>>>>> INFO: Starting Coyote HTTP/1.1 on http-8080
>>>>>>> Nov 30, 2010 5:48:51 PM org.apache.jk.common.ChannelSocket init
>>>>>>> INFO: JK: ajp13 listening on /0.0.0.0:8009
>>>>>>> Nov 30, 2010 5:48:51 PM org.apache.jk.server.JkMain start
>>>>>>> INFO: Jk running ID=0 time=0/87  config=null
>>>>>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.Catalina start
>>>>>>> INFO: Server startup in 7529 ms
>>>>>>>
>>>>>>> -----------------------------------------------------------------
>>>>>>>
>>>>>>> So I've suspected that the problem was related to the version of the
>>>>>>> APR (Apache Portable Runtime) but I'm not sure because I think APR
>>>>>>> more an issue for performance than a show stopper.
>>>>>>>
>>>>>>> Anyway, I've downloaded APR and compiled it, but I still did not find
>>>>>>> where to put the libraries in order to stop the APR incompability
>>>>>>> message. I just don't know where Tomcat has gotten the version 1.1.14
>>>>>>> of the APR  (apache portable runtime) ??? Maybe I can downgrade to
>>>>>>> Tomcat 5.5 but Shindig 2 seems not working with that version of Tomcat.
>>>>>>>
>>>>>>> Just for your info, I'm developping on Mac OS X 10.6.4
>>>>>>>
>>>>>>> Any help is welcome!
>>>>>>>
>>>>>>> Claude Coulombe
>>>>>>> Université de Montréal
>>>>>>
>>>>>>
>>>>
>>>>
>>>
>
>

Re: Problem running Wookie on Tomcat

Posted by Scott Wilson <sc...@gmail.com>.
On 1 Dec 2010, at 18:56, Claude Coulombe wrote:

> Hi Scott,
> 
> Maybe it could help to know that the problem is there with Tomcat 5.5 too.
> 
> Claude

I just got it working on mine by following the instructions, using:

Tomcat 6.0.20
Latest wookie build from source
MySQL 5.0.45

However, I had to also copy the <Resource> definition in "wookie.xml" file in /conf into /conf/context.xml as it didn't seem to pick it up automatically. I think Tomcat 7 doesn't have that problem?

> 
> 2010/12/1 Claude Coulombe <cl...@umontreal.ca>:
>> Hi Scott,
>> 
>>> Actually it does.
>>> 
>>> Have you looked in your server log as well as catalina.out?
>>> 
>>> When I just tried to replicate it on Tomcat 6.0.20, I got the same error in catalina.out, plus this in my localhost log:
>>> 
>>> <openjpa-2.0.0-r422266:935683 fatal store error> org.apache.openjpa.util.StoreException: Cannot create JDBC driver of class '' for connect URL 'null'
>>> 
>>> ... which is a JPA configuration issue.
>>> 
>>> I think Paul and Kris have been testing on Tomcat - have you come across something similar?
>> 
>> 
>> Yes, I have error messages related to persistance in the localhost log
>> 
>> Maybe, the database was not correctly initialized...
>> 
>> Caused by: java.lang.reflect.InvocationTargetException
>>        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:597)
>>        at org.apache.wookie.beans.util.PersistenceManagerFactory.initialize(PersistenceManagerFactory.java:70)
>>        ... 25 more
>> Caused by: java.lang.RuntimeException: Unable to initialize:
>> java.lang.IllegalArgumentException: Unsupported database type:
>>        at org.apache.wookie.beans.jpa.JPAPersistenceManager.initialize(JPAPersistenceManager.java:276)
>>        ... 30 more
>> Caused by: java.lang.IllegalArgumentException: Unsupported database type:
>>        at org.apache.wookie.beans.jpa.JPAPersistenceManager.initialize(JPAPersistenceManager.java:201)
>>        ... 30 more
>> 1 d?c. 2010 13:25:35 org.apache.catalina.core.StandardContext listenerStop
>> GRAVE: Exception lors de l'envoi de l'?v?nement contexte d?truit
>> (context destroyed) ? l'instance de classe d'?coute
>> org.apache.wookie.server.ContextListener
>> java.lang.RuntimeException: PersistenceManagerFactory not initialized
>>        at org.apache.wookie.beans.util.PersistenceManagerFactory.terminate(PersistenceManagerFactory.java:350)
>>        at org.apache.wookie.server.ContextListener.contextDestroyed(ContextListener.java:262)
>>        at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4174)
>>        at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4778)
>>        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4675)
>>        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
>>        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
>>        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
>>        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
>>        at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
>>        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
>>        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
>>        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
>>        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>>        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
>>        at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
>>        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>>        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
>>        at org.apache.catalina.core.StandardService.start(StandardService.java:519)
>>        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>>        at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
>>        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:597)
>>        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
>>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
>>> 
>> 
>> Thanks
>> 
>> Claude
>> 
>> 
>> 
>>>> 
>>>> 
>>>>> (Its also a reminder that we need to make sure we test Shindig integration properly for the release, too)
>>>> 
>>>> If you succeed to integrate Shindig and Tomcat, please share your
>>>> findings : OS, Shindig version, Tomcat version.
>>>> 
>>>> For instance, which version of Shindig and Tomcat are you using now?
>>>> 
>>>> Thanks!
>>>> 
>>>> Claude
>>>> 
>>>>> 
>>>>> On 30 Nov 2010, at 23:24, Claude Coulombe wrote:
>>>>> 
>>>>>> Greetings floks,
>>>>>> 
>>>>>> I have problem to run Wookie on a Tomcat servlet container (6.0.29),
>>>>>> 
>>>>>> I've followed the procedure about running Wookie with Tomcat and MySQL
>>>>>> (modifying build.properties, creating widgetdb, adding
>>>>>> mysql-connector-java-5.1.7.jar, etc). So I've got a BUILD SUCCESSFUL
>>>>>> with ant clean-build deploy-webapp
>>>>>> 
>>>>>> But when I've started the Tomcat server (catalina.sh run), I've got an
>>>>>> error (Error listenerStart).
>>>>>> 
>>>>>> You can check the catalina.out log below :
>>>>>> 
>>>>>> -----------------------------------------------------------------
>>>>>> 
>>>>>> Using CATALINA_BASE:   /usr/local/apache-tomcat-6.0.29
>>>>>> Using CATALINA_HOME:   /usr/local/apache-tomcat-6.0.29
>>>>>> Using CATALINA_TMPDIR: /usr/local/apache-tomcat-6.0.29/temp
>>>>>> Using JRE_HOME:
>>>>>> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/home
>>>>>> Using CLASSPATH:       /usr/local/apache-tomcat-6.0.29/bin/bootstrap.jar
>>>>>> Nov 30, 2010 5:48:43 PM org.apache.catalina.core.AprLifecycleListener init
>>>>>> SEVERE: An incompatible version 1.1.14 of the APR based Apache Tomcat
>>>>>> Native library is installed, while Tomcat requires version 1.1.17
>>>>>> Nov 30, 2010 5:48:43 PM org.apache.coyote.http11.Http11Protocol init
>>>>>> INFO: Initializing Coyote HTTP/1.1 on http-8080
>>>>>> Nov 30, 2010 5:48:43 PM org.apache.catalina.startup.Catalina load
>>>>>> INFO: Initialization processed in 931 ms
>>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.core.StandardService start
>>>>>> INFO: Starting service Catalina
>>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.core.StandardEngine start
>>>>>> INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
>>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>>>>>> INFO: Deploying configuration descriptor host-manager.xml
>>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>>>>>> INFO: Deploying configuration descriptor manager.xml
>>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>>>>>> INFO: Deploying configuration descriptor wookie.xml
>>>>>>  INFO [main] (ContextListener.java:76) - Using local widget server
>>>>>> properties file:
>>>>>> /usr/local/apache-tomcat-6.0.29/bin/local.widgetserver.properties
>>>>>> 17:48:45,473  INFO ContextListener:76 - Using local widget server
>>>>>> properties file:
>>>>>> /usr/local/apache-tomcat-6.0.29/bin/local.widgetserver.properties
>>>>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.core.StandardContext start
>>>>>> SEVERE: Error listenerStart
>>>>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.core.StandardContext start
>>>>>> SEVERE: Context [/wookie] startup failed due to previous errors
>>>>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.loader.WebappClassLoader
>>>>>> clearReferencesJdbc
>>>>>> SEVERE: The web application [/wookie] registered the JBDC driver
>>>>>> [org.apache.derby.jdbc.AutoloadedDriver] but failed to unregister it
>>>>>> when the web application was stopped. To prevent a memory leak, the
>>>>>> JDBC Driver has been forcibly unregistered.
>>>>>> Nov 30, 2010 5:48:46 PM org.apache.catalina.startup.HostConfig deployWAR
>>>>>> INFO: Deploying web application archive ROOT.war
>>>>>> Nov 30, 2010 5:48:49 PM
>>>>>> org.apache.shindig.config.JsonContainerConfigLoader loadContainers
>>>>>> INFO: Loading resources from: containers/default/container.js
>>>>>> Nov 30, 2010 5:48:49 PM
>>>>>> org.apache.shindig.config.JsonContainerConfigLoader loadResources
>>>>>> INFO: Reading container config: containers/default/container.js
>>>>>> Nov 30, 2010 5:48:49 PM
>>>>>> org.apache.shindig.gadgets.features.FeatureRegistry register
>>>>>> INFO: Loading resources from: res:features-extras/features.txt
>>>>>> Nov 30, 2010 5:48:49 PM org.apache.shindig.common.xml.XmlUtil <clinit>
>>>>>> INFO: Not using secure XML processing.
>>>>>> Nov 30, 2010 5:48:49 PM org.apache.shindig.common.xml.XmlUtil <clinit>
>>>>>> INFO: Reusing document builders
>>>>>> Nov 30, 2010 5:48:49 PM
>>>>>> org.apache.shindig.gadgets.features.FeatureRegistry register
>>>>>> INFO: Loading resources from: res:features/features.txt
>>>>>> Nov 30, 2010 5:48:50 PM
>>>>>> org.apache.shindig.gadgets.servlet.CajaContentRewriter <init>
>>>>>> INFO: Cajoled cache
>>>>>> createdorg.apache.shindig.common.cache.ehcache.EhConfiguredCache@468034b6
>>>>>> Nov 30, 2010 5:48:50 PM
>>>>>> org.apache.shindig.gadgets.servlet.CajaContentRewriter <init>
>>>>>> INFO: Cajoled cache
>>>>>> createdorg.apache.shindig.common.cache.ehcache.EhConfiguredCache@468034b6
>>>>>> Nov 30, 2010 5:48:50 PM
>>>>>> org.apache.shindig.gadgets.oauth.OAuthModule$OAuthStoreProvider
>>>>>> loadDefaultKey
>>>>>> WARNING: Couldn't load OAuth signing key.  To create a key, run:
>>>>>>   openssl req -newkey rsa:1024 -days 365 -nodes -x509 -keyout testkey.pem \
>>>>>>      -out testkey.pem -subj '/CN=mytestkey'
>>>>>>   openssl pkcs8 -in testkey.pem -out oauthkey.pem -topk8 -nocrypt -outform PEM
>>>>>> 
>>>>>> Then edit shindig.properties and add these lines:
>>>>>> shindig.signing.key-file=<path-to-oauthkey.pem>
>>>>>> shindig.signing.key-name=mykey
>>>>>> 
>>>>>> Nov 30, 2010 5:48:50 PM
>>>>>> org.apache.shindig.gadgets.oauth.OAuthModule$OAuthCrypterProvider
>>>>>> <init>
>>>>>> INFO: Using random key for OAuth client-side state encryption
>>>>>> Nov 30, 2010 5:48:50 PM
>>>>>> org.apache.shiro.config.IniSecurityManagerFactory isAutoApplyRealms
>>>>>> INFO: Realms have been explicitly set on the SecurityManager instance
>>>>>> - auto-setting of realms will not occur.
>>>>>> Nov 30, 2010 5:48:50 PM org.apache.shiro.realm.AuthorizingRealm
>>>>>> getAuthorizationCacheLazy
>>>>>> INFO: No cache or cacheManager properties have been set.
>>>>>> Authorization cache cannot be obtained.
>>>>>> Nov 30, 2010 5:48:50 PM org.apache.catalina.startup.HostConfig deployDirectory
>>>>>> INFO: Deploying web application directory docs
>>>>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.HostConfig deployDirectory
>>>>>> INFO: Deploying web application directory examples
>>>>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.HostConfig deployDirectory
>>>>>> INFO: Deploying web application directory ROOT-old
>>>>>> Nov 30, 2010 5:48:51 PM org.apache.coyote.http11.Http11Protocol start
>>>>>> INFO: Starting Coyote HTTP/1.1 on http-8080
>>>>>> Nov 30, 2010 5:48:51 PM org.apache.jk.common.ChannelSocket init
>>>>>> INFO: JK: ajp13 listening on /0.0.0.0:8009
>>>>>> Nov 30, 2010 5:48:51 PM org.apache.jk.server.JkMain start
>>>>>> INFO: Jk running ID=0 time=0/87  config=null
>>>>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.Catalina start
>>>>>> INFO: Server startup in 7529 ms
>>>>>> 
>>>>>> -----------------------------------------------------------------
>>>>>> 
>>>>>> So I've suspected that the problem was related to the version of the
>>>>>> APR (Apache Portable Runtime) but I'm not sure because I think APR
>>>>>> more an issue for performance than a show stopper.
>>>>>> 
>>>>>> Anyway, I've downloaded APR and compiled it, but I still did not find
>>>>>> where to put the libraries in order to stop the APR incompability
>>>>>> message. I just don't know where Tomcat has gotten the version 1.1.14
>>>>>> of the APR  (apache portable runtime) ??? Maybe I can downgrade to
>>>>>> Tomcat 5.5 but Shindig 2 seems not working with that version of Tomcat.
>>>>>> 
>>>>>> Just for your info, I'm developping on Mac OS X 10.6.4
>>>>>> 
>>>>>> Any help is welcome!
>>>>>> 
>>>>>> Claude Coulombe
>>>>>> Université de Montréal
>>>>> 
>>>>> 
>>> 
>>> 
>> 


Re: Problem running Wookie on Tomcat

Posted by Claude Coulombe <cl...@umontreal.ca>.
Hi Scott,

Maybe it could help to know that the problem is there with Tomcat 5.5 too.

Claude

2010/12/1 Claude Coulombe <cl...@umontreal.ca>:
> Hi Scott,
>
>> Actually it does.
>>
>> Have you looked in your server log as well as catalina.out?
>>
>> When I just tried to replicate it on Tomcat 6.0.20, I got the same error in catalina.out, plus this in my localhost log:
>>
>> <openjpa-2.0.0-r422266:935683 fatal store error> org.apache.openjpa.util.StoreException: Cannot create JDBC driver of class '' for connect URL 'null'
>>
>> ... which is a JPA configuration issue.
>>
>> I think Paul and Kris have been testing on Tomcat - have you come across something similar?
>
>
> Yes, I have error messages related to persistance in the localhost log
>
> Maybe, the database was not correctly initialized...
>
> Caused by: java.lang.reflect.InvocationTargetException
>        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:597)
>        at org.apache.wookie.beans.util.PersistenceManagerFactory.initialize(PersistenceManagerFactory.java:70)
>        ... 25 more
> Caused by: java.lang.RuntimeException: Unable to initialize:
> java.lang.IllegalArgumentException: Unsupported database type:
>        at org.apache.wookie.beans.jpa.JPAPersistenceManager.initialize(JPAPersistenceManager.java:276)
>        ... 30 more
> Caused by: java.lang.IllegalArgumentException: Unsupported database type:
>        at org.apache.wookie.beans.jpa.JPAPersistenceManager.initialize(JPAPersistenceManager.java:201)
>        ... 30 more
> 1 d?c. 2010 13:25:35 org.apache.catalina.core.StandardContext listenerStop
> GRAVE: Exception lors de l'envoi de l'?v?nement contexte d?truit
> (context destroyed) ? l'instance de classe d'?coute
> org.apache.wookie.server.ContextListener
> java.lang.RuntimeException: PersistenceManagerFactory not initialized
>        at org.apache.wookie.beans.util.PersistenceManagerFactory.terminate(PersistenceManagerFactory.java:350)
>        at org.apache.wookie.server.ContextListener.contextDestroyed(ContextListener.java:262)
>        at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4174)
>        at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4778)
>        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4675)
>        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
>        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
>        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
>        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
>        at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
>        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
>        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
>        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
>        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
>        at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
>        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
>        at org.apache.catalina.core.StandardService.start(StandardService.java:519)
>        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>        at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
>        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:597)
>        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
>>
>
> Thanks
>
> Claude
>
>
>
>>>
>>>
>>>> (Its also a reminder that we need to make sure we test Shindig integration properly for the release, too)
>>>
>>> If you succeed to integrate Shindig and Tomcat, please share your
>>> findings : OS, Shindig version, Tomcat version.
>>>
>>> For instance, which version of Shindig and Tomcat are you using now?
>>>
>>> Thanks!
>>>
>>> Claude
>>>
>>>>
>>>> On 30 Nov 2010, at 23:24, Claude Coulombe wrote:
>>>>
>>>>> Greetings floks,
>>>>>
>>>>> I have problem to run Wookie on a Tomcat servlet container (6.0.29),
>>>>>
>>>>> I've followed the procedure about running Wookie with Tomcat and MySQL
>>>>> (modifying build.properties, creating widgetdb, adding
>>>>> mysql-connector-java-5.1.7.jar, etc). So I've got a BUILD SUCCESSFUL
>>>>> with ant clean-build deploy-webapp
>>>>>
>>>>> But when I've started the Tomcat server (catalina.sh run), I've got an
>>>>> error (Error listenerStart).
>>>>>
>>>>> You can check the catalina.out log below :
>>>>>
>>>>> -----------------------------------------------------------------
>>>>>
>>>>> Using CATALINA_BASE:   /usr/local/apache-tomcat-6.0.29
>>>>> Using CATALINA_HOME:   /usr/local/apache-tomcat-6.0.29
>>>>> Using CATALINA_TMPDIR: /usr/local/apache-tomcat-6.0.29/temp
>>>>> Using JRE_HOME:
>>>>> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/home
>>>>> Using CLASSPATH:       /usr/local/apache-tomcat-6.0.29/bin/bootstrap.jar
>>>>> Nov 30, 2010 5:48:43 PM org.apache.catalina.core.AprLifecycleListener init
>>>>> SEVERE: An incompatible version 1.1.14 of the APR based Apache Tomcat
>>>>> Native library is installed, while Tomcat requires version 1.1.17
>>>>> Nov 30, 2010 5:48:43 PM org.apache.coyote.http11.Http11Protocol init
>>>>> INFO: Initializing Coyote HTTP/1.1 on http-8080
>>>>> Nov 30, 2010 5:48:43 PM org.apache.catalina.startup.Catalina load
>>>>> INFO: Initialization processed in 931 ms
>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.core.StandardService start
>>>>> INFO: Starting service Catalina
>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.core.StandardEngine start
>>>>> INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>>>>> INFO: Deploying configuration descriptor host-manager.xml
>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>>>>> INFO: Deploying configuration descriptor manager.xml
>>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>>>>> INFO: Deploying configuration descriptor wookie.xml
>>>>>  INFO [main] (ContextListener.java:76) - Using local widget server
>>>>> properties file:
>>>>> /usr/local/apache-tomcat-6.0.29/bin/local.widgetserver.properties
>>>>> 17:48:45,473  INFO ContextListener:76 - Using local widget server
>>>>> properties file:
>>>>> /usr/local/apache-tomcat-6.0.29/bin/local.widgetserver.properties
>>>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.core.StandardContext start
>>>>> SEVERE: Error listenerStart
>>>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.core.StandardContext start
>>>>> SEVERE: Context [/wookie] startup failed due to previous errors
>>>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.loader.WebappClassLoader
>>>>> clearReferencesJdbc
>>>>> SEVERE: The web application [/wookie] registered the JBDC driver
>>>>> [org.apache.derby.jdbc.AutoloadedDriver] but failed to unregister it
>>>>> when the web application was stopped. To prevent a memory leak, the
>>>>> JDBC Driver has been forcibly unregistered.
>>>>> Nov 30, 2010 5:48:46 PM org.apache.catalina.startup.HostConfig deployWAR
>>>>> INFO: Deploying web application archive ROOT.war
>>>>> Nov 30, 2010 5:48:49 PM
>>>>> org.apache.shindig.config.JsonContainerConfigLoader loadContainers
>>>>> INFO: Loading resources from: containers/default/container.js
>>>>> Nov 30, 2010 5:48:49 PM
>>>>> org.apache.shindig.config.JsonContainerConfigLoader loadResources
>>>>> INFO: Reading container config: containers/default/container.js
>>>>> Nov 30, 2010 5:48:49 PM
>>>>> org.apache.shindig.gadgets.features.FeatureRegistry register
>>>>> INFO: Loading resources from: res:features-extras/features.txt
>>>>> Nov 30, 2010 5:48:49 PM org.apache.shindig.common.xml.XmlUtil <clinit>
>>>>> INFO: Not using secure XML processing.
>>>>> Nov 30, 2010 5:48:49 PM org.apache.shindig.common.xml.XmlUtil <clinit>
>>>>> INFO: Reusing document builders
>>>>> Nov 30, 2010 5:48:49 PM
>>>>> org.apache.shindig.gadgets.features.FeatureRegistry register
>>>>> INFO: Loading resources from: res:features/features.txt
>>>>> Nov 30, 2010 5:48:50 PM
>>>>> org.apache.shindig.gadgets.servlet.CajaContentRewriter <init>
>>>>> INFO: Cajoled cache
>>>>> createdorg.apache.shindig.common.cache.ehcache.EhConfiguredCache@468034b6
>>>>> Nov 30, 2010 5:48:50 PM
>>>>> org.apache.shindig.gadgets.servlet.CajaContentRewriter <init>
>>>>> INFO: Cajoled cache
>>>>> createdorg.apache.shindig.common.cache.ehcache.EhConfiguredCache@468034b6
>>>>> Nov 30, 2010 5:48:50 PM
>>>>> org.apache.shindig.gadgets.oauth.OAuthModule$OAuthStoreProvider
>>>>> loadDefaultKey
>>>>> WARNING: Couldn't load OAuth signing key.  To create a key, run:
>>>>>   openssl req -newkey rsa:1024 -days 365 -nodes -x509 -keyout testkey.pem \
>>>>>      -out testkey.pem -subj '/CN=mytestkey'
>>>>>   openssl pkcs8 -in testkey.pem -out oauthkey.pem -topk8 -nocrypt -outform PEM
>>>>>
>>>>> Then edit shindig.properties and add these lines:
>>>>> shindig.signing.key-file=<path-to-oauthkey.pem>
>>>>> shindig.signing.key-name=mykey
>>>>>
>>>>> Nov 30, 2010 5:48:50 PM
>>>>> org.apache.shindig.gadgets.oauth.OAuthModule$OAuthCrypterProvider
>>>>> <init>
>>>>> INFO: Using random key for OAuth client-side state encryption
>>>>> Nov 30, 2010 5:48:50 PM
>>>>> org.apache.shiro.config.IniSecurityManagerFactory isAutoApplyRealms
>>>>> INFO: Realms have been explicitly set on the SecurityManager instance
>>>>> - auto-setting of realms will not occur.
>>>>> Nov 30, 2010 5:48:50 PM org.apache.shiro.realm.AuthorizingRealm
>>>>> getAuthorizationCacheLazy
>>>>> INFO: No cache or cacheManager properties have been set.
>>>>> Authorization cache cannot be obtained.
>>>>> Nov 30, 2010 5:48:50 PM org.apache.catalina.startup.HostConfig deployDirectory
>>>>> INFO: Deploying web application directory docs
>>>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.HostConfig deployDirectory
>>>>> INFO: Deploying web application directory examples
>>>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.HostConfig deployDirectory
>>>>> INFO: Deploying web application directory ROOT-old
>>>>> Nov 30, 2010 5:48:51 PM org.apache.coyote.http11.Http11Protocol start
>>>>> INFO: Starting Coyote HTTP/1.1 on http-8080
>>>>> Nov 30, 2010 5:48:51 PM org.apache.jk.common.ChannelSocket init
>>>>> INFO: JK: ajp13 listening on /0.0.0.0:8009
>>>>> Nov 30, 2010 5:48:51 PM org.apache.jk.server.JkMain start
>>>>> INFO: Jk running ID=0 time=0/87  config=null
>>>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.Catalina start
>>>>> INFO: Server startup in 7529 ms
>>>>>
>>>>> -----------------------------------------------------------------
>>>>>
>>>>> So I've suspected that the problem was related to the version of the
>>>>> APR (Apache Portable Runtime) but I'm not sure because I think APR
>>>>> more an issue for performance than a show stopper.
>>>>>
>>>>> Anyway, I've downloaded APR and compiled it, but I still did not find
>>>>> where to put the libraries in order to stop the APR incompability
>>>>> message. I just don't know where Tomcat has gotten the version 1.1.14
>>>>> of the APR  (apache portable runtime) ??? Maybe I can downgrade to
>>>>> Tomcat 5.5 but Shindig 2 seems not working with that version of Tomcat.
>>>>>
>>>>> Just for your info, I'm developping on Mac OS X 10.6.4
>>>>>
>>>>> Any help is welcome!
>>>>>
>>>>> Claude Coulombe
>>>>> Université de Montréal
>>>>
>>>>
>>
>>
>

Re: Problem running Wookie on Tomcat

Posted by Claude Coulombe <cl...@umontreal.ca>.
Hi Scott,

> Actually it does.
>
> Have you looked in your server log as well as catalina.out?
>
> When I just tried to replicate it on Tomcat 6.0.20, I got the same error in catalina.out, plus this in my localhost log:
>
> <openjpa-2.0.0-r422266:935683 fatal store error> org.apache.openjpa.util.StoreException: Cannot create JDBC driver of class '' for connect URL 'null'
>
> ... which is a JPA configuration issue.
>
> I think Paul and Kris have been testing on Tomcat - have you come across something similar?


Yes, I have error messages related to persistance in the localhost log

Maybe, the database was not correctly initialized...

Caused by: java.lang.reflect.InvocationTargetException
	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:597)
	at org.apache.wookie.beans.util.PersistenceManagerFactory.initialize(PersistenceManagerFactory.java:70)
	... 25 more
Caused by: java.lang.RuntimeException: Unable to initialize:
java.lang.IllegalArgumentException: Unsupported database type:
	at org.apache.wookie.beans.jpa.JPAPersistenceManager.initialize(JPAPersistenceManager.java:276)
	... 30 more
Caused by: java.lang.IllegalArgumentException: Unsupported database type:
	at org.apache.wookie.beans.jpa.JPAPersistenceManager.initialize(JPAPersistenceManager.java:201)
	... 30 more
1 d?c. 2010 13:25:35 org.apache.catalina.core.StandardContext listenerStop
GRAVE: Exception lors de l'envoi de l'?v?nement contexte d?truit
(context destroyed) ? l'instance de classe d'?coute
org.apache.wookie.server.ContextListener
java.lang.RuntimeException: PersistenceManagerFactory not initialized
	at org.apache.wookie.beans.util.PersistenceManagerFactory.terminate(PersistenceManagerFactory.java:350)
	at org.apache.wookie.server.ContextListener.contextDestroyed(ContextListener.java:262)
	at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4174)
	at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4778)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4675)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
	at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
	at org.apache.catalina.core.StandardService.start(StandardService.java:519)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
	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:597)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
>

Thanks

Claude



>>
>>
>>> (Its also a reminder that we need to make sure we test Shindig integration properly for the release, too)
>>
>> If you succeed to integrate Shindig and Tomcat, please share your
>> findings : OS, Shindig version, Tomcat version.
>>
>> For instance, which version of Shindig and Tomcat are you using now?
>>
>> Thanks!
>>
>> Claude
>>
>>>
>>> On 30 Nov 2010, at 23:24, Claude Coulombe wrote:
>>>
>>>> Greetings floks,
>>>>
>>>> I have problem to run Wookie on a Tomcat servlet container (6.0.29),
>>>>
>>>> I've followed the procedure about running Wookie with Tomcat and MySQL
>>>> (modifying build.properties, creating widgetdb, adding
>>>> mysql-connector-java-5.1.7.jar, etc). So I've got a BUILD SUCCESSFUL
>>>> with ant clean-build deploy-webapp
>>>>
>>>> But when I've started the Tomcat server (catalina.sh run), I've got an
>>>> error (Error listenerStart).
>>>>
>>>> You can check the catalina.out log below :
>>>>
>>>> -----------------------------------------------------------------
>>>>
>>>> Using CATALINA_BASE:   /usr/local/apache-tomcat-6.0.29
>>>> Using CATALINA_HOME:   /usr/local/apache-tomcat-6.0.29
>>>> Using CATALINA_TMPDIR: /usr/local/apache-tomcat-6.0.29/temp
>>>> Using JRE_HOME:
>>>> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/home
>>>> Using CLASSPATH:       /usr/local/apache-tomcat-6.0.29/bin/bootstrap.jar
>>>> Nov 30, 2010 5:48:43 PM org.apache.catalina.core.AprLifecycleListener init
>>>> SEVERE: An incompatible version 1.1.14 of the APR based Apache Tomcat
>>>> Native library is installed, while Tomcat requires version 1.1.17
>>>> Nov 30, 2010 5:48:43 PM org.apache.coyote.http11.Http11Protocol init
>>>> INFO: Initializing Coyote HTTP/1.1 on http-8080
>>>> Nov 30, 2010 5:48:43 PM org.apache.catalina.startup.Catalina load
>>>> INFO: Initialization processed in 931 ms
>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.core.StandardService start
>>>> INFO: Starting service Catalina
>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.core.StandardEngine start
>>>> INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>>>> INFO: Deploying configuration descriptor host-manager.xml
>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>>>> INFO: Deploying configuration descriptor manager.xml
>>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>>>> INFO: Deploying configuration descriptor wookie.xml
>>>>  INFO [main] (ContextListener.java:76) - Using local widget server
>>>> properties file:
>>>> /usr/local/apache-tomcat-6.0.29/bin/local.widgetserver.properties
>>>> 17:48:45,473  INFO ContextListener:76 - Using local widget server
>>>> properties file:
>>>> /usr/local/apache-tomcat-6.0.29/bin/local.widgetserver.properties
>>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.core.StandardContext start
>>>> SEVERE: Error listenerStart
>>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.core.StandardContext start
>>>> SEVERE: Context [/wookie] startup failed due to previous errors
>>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.loader.WebappClassLoader
>>>> clearReferencesJdbc
>>>> SEVERE: The web application [/wookie] registered the JBDC driver
>>>> [org.apache.derby.jdbc.AutoloadedDriver] but failed to unregister it
>>>> when the web application was stopped. To prevent a memory leak, the
>>>> JDBC Driver has been forcibly unregistered.
>>>> Nov 30, 2010 5:48:46 PM org.apache.catalina.startup.HostConfig deployWAR
>>>> INFO: Deploying web application archive ROOT.war
>>>> Nov 30, 2010 5:48:49 PM
>>>> org.apache.shindig.config.JsonContainerConfigLoader loadContainers
>>>> INFO: Loading resources from: containers/default/container.js
>>>> Nov 30, 2010 5:48:49 PM
>>>> org.apache.shindig.config.JsonContainerConfigLoader loadResources
>>>> INFO: Reading container config: containers/default/container.js
>>>> Nov 30, 2010 5:48:49 PM
>>>> org.apache.shindig.gadgets.features.FeatureRegistry register
>>>> INFO: Loading resources from: res:features-extras/features.txt
>>>> Nov 30, 2010 5:48:49 PM org.apache.shindig.common.xml.XmlUtil <clinit>
>>>> INFO: Not using secure XML processing.
>>>> Nov 30, 2010 5:48:49 PM org.apache.shindig.common.xml.XmlUtil <clinit>
>>>> INFO: Reusing document builders
>>>> Nov 30, 2010 5:48:49 PM
>>>> org.apache.shindig.gadgets.features.FeatureRegistry register
>>>> INFO: Loading resources from: res:features/features.txt
>>>> Nov 30, 2010 5:48:50 PM
>>>> org.apache.shindig.gadgets.servlet.CajaContentRewriter <init>
>>>> INFO: Cajoled cache
>>>> createdorg.apache.shindig.common.cache.ehcache.EhConfiguredCache@468034b6
>>>> Nov 30, 2010 5:48:50 PM
>>>> org.apache.shindig.gadgets.servlet.CajaContentRewriter <init>
>>>> INFO: Cajoled cache
>>>> createdorg.apache.shindig.common.cache.ehcache.EhConfiguredCache@468034b6
>>>> Nov 30, 2010 5:48:50 PM
>>>> org.apache.shindig.gadgets.oauth.OAuthModule$OAuthStoreProvider
>>>> loadDefaultKey
>>>> WARNING: Couldn't load OAuth signing key.  To create a key, run:
>>>>   openssl req -newkey rsa:1024 -days 365 -nodes -x509 -keyout testkey.pem \
>>>>      -out testkey.pem -subj '/CN=mytestkey'
>>>>   openssl pkcs8 -in testkey.pem -out oauthkey.pem -topk8 -nocrypt -outform PEM
>>>>
>>>> Then edit shindig.properties and add these lines:
>>>> shindig.signing.key-file=<path-to-oauthkey.pem>
>>>> shindig.signing.key-name=mykey
>>>>
>>>> Nov 30, 2010 5:48:50 PM
>>>> org.apache.shindig.gadgets.oauth.OAuthModule$OAuthCrypterProvider
>>>> <init>
>>>> INFO: Using random key for OAuth client-side state encryption
>>>> Nov 30, 2010 5:48:50 PM
>>>> org.apache.shiro.config.IniSecurityManagerFactory isAutoApplyRealms
>>>> INFO: Realms have been explicitly set on the SecurityManager instance
>>>> - auto-setting of realms will not occur.
>>>> Nov 30, 2010 5:48:50 PM org.apache.shiro.realm.AuthorizingRealm
>>>> getAuthorizationCacheLazy
>>>> INFO: No cache or cacheManager properties have been set.
>>>> Authorization cache cannot be obtained.
>>>> Nov 30, 2010 5:48:50 PM org.apache.catalina.startup.HostConfig deployDirectory
>>>> INFO: Deploying web application directory docs
>>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.HostConfig deployDirectory
>>>> INFO: Deploying web application directory examples
>>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.HostConfig deployDirectory
>>>> INFO: Deploying web application directory ROOT-old
>>>> Nov 30, 2010 5:48:51 PM org.apache.coyote.http11.Http11Protocol start
>>>> INFO: Starting Coyote HTTP/1.1 on http-8080
>>>> Nov 30, 2010 5:48:51 PM org.apache.jk.common.ChannelSocket init
>>>> INFO: JK: ajp13 listening on /0.0.0.0:8009
>>>> Nov 30, 2010 5:48:51 PM org.apache.jk.server.JkMain start
>>>> INFO: Jk running ID=0 time=0/87  config=null
>>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.Catalina start
>>>> INFO: Server startup in 7529 ms
>>>>
>>>> -----------------------------------------------------------------
>>>>
>>>> So I've suspected that the problem was related to the version of the
>>>> APR (Apache Portable Runtime) but I'm not sure because I think APR
>>>> more an issue for performance than a show stopper.
>>>>
>>>> Anyway, I've downloaded APR and compiled it, but I still did not find
>>>> where to put the libraries in order to stop the APR incompability
>>>> message. I just don't know where Tomcat has gotten the version 1.1.14
>>>> of the APR  (apache portable runtime) ??? Maybe I can downgrade to
>>>> Tomcat 5.5 but Shindig 2 seems not working with that version of Tomcat.
>>>>
>>>> Just for your info, I'm developping on Mac OS X 10.6.4
>>>>
>>>> Any help is welcome!
>>>>
>>>> Claude Coulombe
>>>> Université de Montréal
>>>
>>>
>
>

Re: Problem running Wookie on Tomcat

Posted by Scott Wilson <sc...@gmail.com>.
On 1 Dec 2010, at 17:37, Claude Coulombe wrote:

> Hi Scott,
> 
>> Thanks for the report! It may be worth asking on the Tomcat list as well, as it seems to be more to do with
>> Tomcat and APR than Wookie or Shindig?
> 
> Good suggestion!
> But I still have doubts about the origin of the problem, I think APR
> is another issue.
> As you can see into the Tomcat log file, Shindig is working well as
> Root webapp (ROOT.war).
> It's the Wookie app that failed!
> 
>>> SEVERE: Error listenerStart
>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.core.StandardContext start
>>> SEVERE: Context [/wookie] startup failed due to previous errors
> 
> It seems to be related to the Wookie Context Listener
> (org.apache.wookie.server.ContextListener).
> Doesn't sound something familiar to you?


Actually it does.

Have you looked in your server log as well as catalina.out?

When I just tried to replicate it on Tomcat 6.0.20, I got the same error in catalina.out, plus this in my localhost log:

<openjpa-2.0.0-r422266:935683 fatal store error> org.apache.openjpa.util.StoreException: Cannot create JDBC driver of class '' for connect URL 'null'

... which is a JPA configuration issue.

I think Paul and Kris have been testing on Tomcat - have you come across something similar?

> 
> 
>> (Its also a reminder that we need to make sure we test Shindig integration properly for the release, too)
> 
> If you succeed to integrate Shindig and Tomcat, please share your
> findings : OS, Shindig version, Tomcat version.
> 
> For instance, which version of Shindig and Tomcat are you using now?
> 
> Thanks!
> 
> Claude
> 
>> 
>> On 30 Nov 2010, at 23:24, Claude Coulombe wrote:
>> 
>>> Greetings floks,
>>> 
>>> I have problem to run Wookie on a Tomcat servlet container (6.0.29),
>>> 
>>> I've followed the procedure about running Wookie with Tomcat and MySQL
>>> (modifying build.properties, creating widgetdb, adding
>>> mysql-connector-java-5.1.7.jar, etc). So I've got a BUILD SUCCESSFUL
>>> with ant clean-build deploy-webapp
>>> 
>>> But when I've started the Tomcat server (catalina.sh run), I've got an
>>> error (Error listenerStart).
>>> 
>>> You can check the catalina.out log below :
>>> 
>>> -----------------------------------------------------------------
>>> 
>>> Using CATALINA_BASE:   /usr/local/apache-tomcat-6.0.29
>>> Using CATALINA_HOME:   /usr/local/apache-tomcat-6.0.29
>>> Using CATALINA_TMPDIR: /usr/local/apache-tomcat-6.0.29/temp
>>> Using JRE_HOME:
>>> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/home
>>> Using CLASSPATH:       /usr/local/apache-tomcat-6.0.29/bin/bootstrap.jar
>>> Nov 30, 2010 5:48:43 PM org.apache.catalina.core.AprLifecycleListener init
>>> SEVERE: An incompatible version 1.1.14 of the APR based Apache Tomcat
>>> Native library is installed, while Tomcat requires version 1.1.17
>>> Nov 30, 2010 5:48:43 PM org.apache.coyote.http11.Http11Protocol init
>>> INFO: Initializing Coyote HTTP/1.1 on http-8080
>>> Nov 30, 2010 5:48:43 PM org.apache.catalina.startup.Catalina load
>>> INFO: Initialization processed in 931 ms
>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.core.StandardService start
>>> INFO: Starting service Catalina
>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.core.StandardEngine start
>>> INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>>> INFO: Deploying configuration descriptor host-manager.xml
>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>>> INFO: Deploying configuration descriptor manager.xml
>>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>>> INFO: Deploying configuration descriptor wookie.xml
>>>  INFO [main] (ContextListener.java:76) - Using local widget server
>>> properties file:
>>> /usr/local/apache-tomcat-6.0.29/bin/local.widgetserver.properties
>>> 17:48:45,473  INFO ContextListener:76 - Using local widget server
>>> properties file:
>>> /usr/local/apache-tomcat-6.0.29/bin/local.widgetserver.properties
>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.core.StandardContext start
>>> SEVERE: Error listenerStart
>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.core.StandardContext start
>>> SEVERE: Context [/wookie] startup failed due to previous errors
>>> Nov 30, 2010 5:48:45 PM org.apache.catalina.loader.WebappClassLoader
>>> clearReferencesJdbc
>>> SEVERE: The web application [/wookie] registered the JBDC driver
>>> [org.apache.derby.jdbc.AutoloadedDriver] but failed to unregister it
>>> when the web application was stopped. To prevent a memory leak, the
>>> JDBC Driver has been forcibly unregistered.
>>> Nov 30, 2010 5:48:46 PM org.apache.catalina.startup.HostConfig deployWAR
>>> INFO: Deploying web application archive ROOT.war
>>> Nov 30, 2010 5:48:49 PM
>>> org.apache.shindig.config.JsonContainerConfigLoader loadContainers
>>> INFO: Loading resources from: containers/default/container.js
>>> Nov 30, 2010 5:48:49 PM
>>> org.apache.shindig.config.JsonContainerConfigLoader loadResources
>>> INFO: Reading container config: containers/default/container.js
>>> Nov 30, 2010 5:48:49 PM
>>> org.apache.shindig.gadgets.features.FeatureRegistry register
>>> INFO: Loading resources from: res:features-extras/features.txt
>>> Nov 30, 2010 5:48:49 PM org.apache.shindig.common.xml.XmlUtil <clinit>
>>> INFO: Not using secure XML processing.
>>> Nov 30, 2010 5:48:49 PM org.apache.shindig.common.xml.XmlUtil <clinit>
>>> INFO: Reusing document builders
>>> Nov 30, 2010 5:48:49 PM
>>> org.apache.shindig.gadgets.features.FeatureRegistry register
>>> INFO: Loading resources from: res:features/features.txt
>>> Nov 30, 2010 5:48:50 PM
>>> org.apache.shindig.gadgets.servlet.CajaContentRewriter <init>
>>> INFO: Cajoled cache
>>> createdorg.apache.shindig.common.cache.ehcache.EhConfiguredCache@468034b6
>>> Nov 30, 2010 5:48:50 PM
>>> org.apache.shindig.gadgets.servlet.CajaContentRewriter <init>
>>> INFO: Cajoled cache
>>> createdorg.apache.shindig.common.cache.ehcache.EhConfiguredCache@468034b6
>>> Nov 30, 2010 5:48:50 PM
>>> org.apache.shindig.gadgets.oauth.OAuthModule$OAuthStoreProvider
>>> loadDefaultKey
>>> WARNING: Couldn't load OAuth signing key.  To create a key, run:
>>>   openssl req -newkey rsa:1024 -days 365 -nodes -x509 -keyout testkey.pem \
>>>      -out testkey.pem -subj '/CN=mytestkey'
>>>   openssl pkcs8 -in testkey.pem -out oauthkey.pem -topk8 -nocrypt -outform PEM
>>> 
>>> Then edit shindig.properties and add these lines:
>>> shindig.signing.key-file=<path-to-oauthkey.pem>
>>> shindig.signing.key-name=mykey
>>> 
>>> Nov 30, 2010 5:48:50 PM
>>> org.apache.shindig.gadgets.oauth.OAuthModule$OAuthCrypterProvider
>>> <init>
>>> INFO: Using random key for OAuth client-side state encryption
>>> Nov 30, 2010 5:48:50 PM
>>> org.apache.shiro.config.IniSecurityManagerFactory isAutoApplyRealms
>>> INFO: Realms have been explicitly set on the SecurityManager instance
>>> - auto-setting of realms will not occur.
>>> Nov 30, 2010 5:48:50 PM org.apache.shiro.realm.AuthorizingRealm
>>> getAuthorizationCacheLazy
>>> INFO: No cache or cacheManager properties have been set.
>>> Authorization cache cannot be obtained.
>>> Nov 30, 2010 5:48:50 PM org.apache.catalina.startup.HostConfig deployDirectory
>>> INFO: Deploying web application directory docs
>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.HostConfig deployDirectory
>>> INFO: Deploying web application directory examples
>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.HostConfig deployDirectory
>>> INFO: Deploying web application directory ROOT-old
>>> Nov 30, 2010 5:48:51 PM org.apache.coyote.http11.Http11Protocol start
>>> INFO: Starting Coyote HTTP/1.1 on http-8080
>>> Nov 30, 2010 5:48:51 PM org.apache.jk.common.ChannelSocket init
>>> INFO: JK: ajp13 listening on /0.0.0.0:8009
>>> Nov 30, 2010 5:48:51 PM org.apache.jk.server.JkMain start
>>> INFO: Jk running ID=0 time=0/87  config=null
>>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.Catalina start
>>> INFO: Server startup in 7529 ms
>>> 
>>> -----------------------------------------------------------------
>>> 
>>> So I've suspected that the problem was related to the version of the
>>> APR (Apache Portable Runtime) but I'm not sure because I think APR
>>> more an issue for performance than a show stopper.
>>> 
>>> Anyway, I've downloaded APR and compiled it, but I still did not find
>>> where to put the libraries in order to stop the APR incompability
>>> message. I just don't know where Tomcat has gotten the version 1.1.14
>>> of the APR  (apache portable runtime) ??? Maybe I can downgrade to
>>> Tomcat 5.5 but Shindig 2 seems not working with that version of Tomcat.
>>> 
>>> Just for your info, I'm developping on Mac OS X 10.6.4
>>> 
>>> Any help is welcome!
>>> 
>>> Claude Coulombe
>>> Université de Montréal
>> 
>> 


Re: Problem running Wookie on Tomcat

Posted by Claude Coulombe <cl...@umontreal.ca>.
Hi Scott,

> Thanks for the report! It may be worth asking on the Tomcat list as well, as it seems to be more to do with
> Tomcat and APR than Wookie or Shindig?

Good suggestion!
But I still have doubts about the origin of the problem, I think APR
is another issue.
As you can see into the Tomcat log file, Shindig is working well as
Root webapp (ROOT.war).
It's the Wookie app that failed!

>> SEVERE: Error listenerStart
>> Nov 30, 2010 5:48:45 PM org.apache.catalina.core.StandardContext start
>> SEVERE: Context [/wookie] startup failed due to previous errors

It seems to be related to the Wookie Context Listener
(org.apache.wookie.server.ContextListener).
Doesn't sound something familiar to you?


> (Its also a reminder that we need to make sure we test Shindig integration properly for the release, too)

If you succeed to integrate Shindig and Tomcat, please share your
findings : OS, Shindig version, Tomcat version.

For instance, which version of Shindig and Tomcat are you using now?

Thanks!

Claude

>
> On 30 Nov 2010, at 23:24, Claude Coulombe wrote:
>
>> Greetings floks,
>>
>> I have problem to run Wookie on a Tomcat servlet container (6.0.29),
>>
>> I've followed the procedure about running Wookie with Tomcat and MySQL
>> (modifying build.properties, creating widgetdb, adding
>> mysql-connector-java-5.1.7.jar, etc). So I've got a BUILD SUCCESSFUL
>> with ant clean-build deploy-webapp
>>
>> But when I've started the Tomcat server (catalina.sh run), I've got an
>> error (Error listenerStart).
>>
>> You can check the catalina.out log below :
>>
>> -----------------------------------------------------------------
>>
>> Using CATALINA_BASE:   /usr/local/apache-tomcat-6.0.29
>> Using CATALINA_HOME:   /usr/local/apache-tomcat-6.0.29
>> Using CATALINA_TMPDIR: /usr/local/apache-tomcat-6.0.29/temp
>> Using JRE_HOME:
>> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/home
>> Using CLASSPATH:       /usr/local/apache-tomcat-6.0.29/bin/bootstrap.jar
>> Nov 30, 2010 5:48:43 PM org.apache.catalina.core.AprLifecycleListener init
>> SEVERE: An incompatible version 1.1.14 of the APR based Apache Tomcat
>> Native library is installed, while Tomcat requires version 1.1.17
>> Nov 30, 2010 5:48:43 PM org.apache.coyote.http11.Http11Protocol init
>> INFO: Initializing Coyote HTTP/1.1 on http-8080
>> Nov 30, 2010 5:48:43 PM org.apache.catalina.startup.Catalina load
>> INFO: Initialization processed in 931 ms
>> Nov 30, 2010 5:48:44 PM org.apache.catalina.core.StandardService start
>> INFO: Starting service Catalina
>> Nov 30, 2010 5:48:44 PM org.apache.catalina.core.StandardEngine start
>> INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>> INFO: Deploying configuration descriptor host-manager.xml
>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>> INFO: Deploying configuration descriptor manager.xml
>> Nov 30, 2010 5:48:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
>> INFO: Deploying configuration descriptor wookie.xml
>>  INFO [main] (ContextListener.java:76) - Using local widget server
>> properties file:
>> /usr/local/apache-tomcat-6.0.29/bin/local.widgetserver.properties
>> 17:48:45,473  INFO ContextListener:76 - Using local widget server
>> properties file:
>> /usr/local/apache-tomcat-6.0.29/bin/local.widgetserver.properties
>> Nov 30, 2010 5:48:45 PM org.apache.catalina.core.StandardContext start
>> SEVERE: Error listenerStart
>> Nov 30, 2010 5:48:45 PM org.apache.catalina.core.StandardContext start
>> SEVERE: Context [/wookie] startup failed due to previous errors
>> Nov 30, 2010 5:48:45 PM org.apache.catalina.loader.WebappClassLoader
>> clearReferencesJdbc
>> SEVERE: The web application [/wookie] registered the JBDC driver
>> [org.apache.derby.jdbc.AutoloadedDriver] but failed to unregister it
>> when the web application was stopped. To prevent a memory leak, the
>> JDBC Driver has been forcibly unregistered.
>> Nov 30, 2010 5:48:46 PM org.apache.catalina.startup.HostConfig deployWAR
>> INFO: Deploying web application archive ROOT.war
>> Nov 30, 2010 5:48:49 PM
>> org.apache.shindig.config.JsonContainerConfigLoader loadContainers
>> INFO: Loading resources from: containers/default/container.js
>> Nov 30, 2010 5:48:49 PM
>> org.apache.shindig.config.JsonContainerConfigLoader loadResources
>> INFO: Reading container config: containers/default/container.js
>> Nov 30, 2010 5:48:49 PM
>> org.apache.shindig.gadgets.features.FeatureRegistry register
>> INFO: Loading resources from: res:features-extras/features.txt
>> Nov 30, 2010 5:48:49 PM org.apache.shindig.common.xml.XmlUtil <clinit>
>> INFO: Not using secure XML processing.
>> Nov 30, 2010 5:48:49 PM org.apache.shindig.common.xml.XmlUtil <clinit>
>> INFO: Reusing document builders
>> Nov 30, 2010 5:48:49 PM
>> org.apache.shindig.gadgets.features.FeatureRegistry register
>> INFO: Loading resources from: res:features/features.txt
>> Nov 30, 2010 5:48:50 PM
>> org.apache.shindig.gadgets.servlet.CajaContentRewriter <init>
>> INFO: Cajoled cache
>> createdorg.apache.shindig.common.cache.ehcache.EhConfiguredCache@468034b6
>> Nov 30, 2010 5:48:50 PM
>> org.apache.shindig.gadgets.servlet.CajaContentRewriter <init>
>> INFO: Cajoled cache
>> createdorg.apache.shindig.common.cache.ehcache.EhConfiguredCache@468034b6
>> Nov 30, 2010 5:48:50 PM
>> org.apache.shindig.gadgets.oauth.OAuthModule$OAuthStoreProvider
>> loadDefaultKey
>> WARNING: Couldn't load OAuth signing key.  To create a key, run:
>>   openssl req -newkey rsa:1024 -days 365 -nodes -x509 -keyout testkey.pem \
>>      -out testkey.pem -subj '/CN=mytestkey'
>>   openssl pkcs8 -in testkey.pem -out oauthkey.pem -topk8 -nocrypt -outform PEM
>>
>> Then edit shindig.properties and add these lines:
>> shindig.signing.key-file=<path-to-oauthkey.pem>
>> shindig.signing.key-name=mykey
>>
>> Nov 30, 2010 5:48:50 PM
>> org.apache.shindig.gadgets.oauth.OAuthModule$OAuthCrypterProvider
>> <init>
>> INFO: Using random key for OAuth client-side state encryption
>> Nov 30, 2010 5:48:50 PM
>> org.apache.shiro.config.IniSecurityManagerFactory isAutoApplyRealms
>> INFO: Realms have been explicitly set on the SecurityManager instance
>> - auto-setting of realms will not occur.
>> Nov 30, 2010 5:48:50 PM org.apache.shiro.realm.AuthorizingRealm
>> getAuthorizationCacheLazy
>> INFO: No cache or cacheManager properties have been set.
>> Authorization cache cannot be obtained.
>> Nov 30, 2010 5:48:50 PM org.apache.catalina.startup.HostConfig deployDirectory
>> INFO: Deploying web application directory docs
>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.HostConfig deployDirectory
>> INFO: Deploying web application directory examples
>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.HostConfig deployDirectory
>> INFO: Deploying web application directory ROOT-old
>> Nov 30, 2010 5:48:51 PM org.apache.coyote.http11.Http11Protocol start
>> INFO: Starting Coyote HTTP/1.1 on http-8080
>> Nov 30, 2010 5:48:51 PM org.apache.jk.common.ChannelSocket init
>> INFO: JK: ajp13 listening on /0.0.0.0:8009
>> Nov 30, 2010 5:48:51 PM org.apache.jk.server.JkMain start
>> INFO: Jk running ID=0 time=0/87  config=null
>> Nov 30, 2010 5:48:51 PM org.apache.catalina.startup.Catalina start
>> INFO: Server startup in 7529 ms
>>
>> -----------------------------------------------------------------
>>
>> So I've suspected that the problem was related to the version of the
>> APR (Apache Portable Runtime) but I'm not sure because I think APR
>> more an issue for performance than a show stopper.
>>
>> Anyway, I've downloaded APR and compiled it, but I still did not find
>> where to put the libraries in order to stop the APR incompability
>> message. I just don't know where Tomcat has gotten the version 1.1.14
>> of the APR  (apache portable runtime) ??? Maybe I can downgrade to
>> Tomcat 5.5 but Shindig 2 seems not working with that version of Tomcat.
>>
>> Just for your info, I'm developping on Mac OS X 10.6.4
>>
>> Any help is welcome!
>>
>> Claude Coulombe
>> Université de Montréal
>
>