Hello Geoff, That works !!!, I looked for the dangling processes for HSQL and killed them. Next I had to restart my cocoon again, due to some reason it was killed too. This time I started my cocoon using "./cocoon.sh servlet" and it works.
I was having the same problem when I was trying to integrate MySQL with Cocoon, now thats working too. Thanks a lot Geoff. Life becomes so easy when guys like you come for help. I appreciate everything coming from your side. With Regards Sam On Sat, 08 May 2004 Geoff Howard wrote : >sameer nanda wrote: > >>Hello Geoff, >> >>When you say runs of cocoon, what do you mean by that??? >>Actually what I interpret is Cocoon is not running as a service, nor am I deplying >>the cocoon war file in the servlet engine, which in my case would ne Tomcat, so how >>do I find out where and how is cocoon running on my machine ??? > >I just meant the Cocoon process - i.e., if you started "./cocoon.sh servlet" did you >also shut it down. I suspect you did (or used the cli which stops running without >being shutdown), and hence the advice which followed. > >I just read your message more carefully and you said some things that didn't make >sense. You started Cocoon with "./cocoon.sh cli" but then reported that Cocoon was >available in your browser. Are you sure that is the case? CLI stands for "command >line interface" and is a non-servlet environment for Cocoon, though the version in >2.1.2 may have been less sophisticated than it is now and may have started the >servlet in the background. If you are trying to browse samples in your browser, >start "./cocoon.sh servlet" instead. > >Now, > >>Also when I look into the cocoon.xconf file searching for HSQL port , I see the >>following: >> >><!--+ >> | HSQLDB Server for samples: >> | >> | port : number port where the server is listening >> | silent : true/false display all queries >> | trace : true/false display JDBC trace messages >> +--> >> <hsqldb-server class="org.apache.cocoon.components.hsqldb.ServerImpl" >> logger="core.hsqldb-server" pool-max="1" pool-min="1"> >> <parameter name="port" value="9002"/> >> <parameter name="silent" value="true"/> >> <parameter name="trace" value="false"/> >> </hsqldb-server> >> >>Now do you know what do I have to change here ???? >>I have no clue what to do??? > >Don't change anything - use the port number 9002 to track down the stuck hsql pid and >kill it. On linux this would be netstat -pn | grep 9002 then note the pid number use >kill or kill -9 on it. Solaris makes it harder to find the pid IIRC. > >Geoff > >> >>On Sat, 08 May 2004 Geoff Howard wrote : >> >>>Actually, from the stack trace, it looks like the bind exception is happening >>>during HSQL startup which is historically the leading cause of this in cocoon >>>startups. Make sure that previous runs of Cocoon are shut down before restarting. >>>If you have otherwise ensured that Cocoon shut down (or were using the cli the >>>first run through) then it would seem that hsql did not shut down cleanly, which >>>was a bug at some point(s) in the past. >>> >>>My recommendation is to look into cocoon.xconf, find the hsql port (or search the >>>list archives - surely it's there) and see if you have a process attached to that >>>port and kill the pid. Please report back what happens so others can benefit from >>>your experience. >>> >>>Geoff >>> >>> >>>sameer nanda wrote: >>> >>> >>>>Hello Everybody, >>>> >>>>I am not sure how can I restart Cocoon2.1.2 (or rebuild coccon), after I add a new >>>>database or want to create a new table using the already existing HSQL script >>>>"cocoondb.script". >>>> >>>>I am trying to run the application from the book Cocoon: Building XML Application, >>>>chapter 7, which tell you how to add a new database or connect to the existing >>>>HSQL database. >>>> >>>>I have configured my Cocoon2.1.2 from source distribution, as shown below: >>>> >>>>-> downloaded the latest source version and installed using >>>>1) build cocoon using "build" >>>>2) run cocoon using "./cocoon.sh cli" >>>>3) http://ip-add:8888 points to the welcome page of cocoon >>>> >>>>I add the follwing lines to the cocoondb.script file : >>>> >>>>CREATE TABLE PORTALUSER_TABLE(ID VARCHAR,PASSWORD VARCHAR,COLOR VARCHAR,UNIQUE(ID)) >>>>CREATE TABLE MOREOVER_TABLE(ID INTEGER,NAME VARCHAR,NEWSFEED VARCHAR,UNIQUE(ID)) >>>> >>>>INSERT INTO PORTALUSER_TABLE VALUES('cocoon','magic','white') >>>>INSERT INTO PORTALUSER_TABLE VALUES('matthew','wizard','yellow') >>>>INSERT INTO MOREOVER_TABLE VALUES(1,'matthew','banking') >>>>INSERT INTO MOREOVER_TABLE VALUES(2,'cocoon','usa') >>>>INSERT INTO MOREOVER_TABLE VALUES(3,'cocoon','banking') >>>> >>>>========================================================= >>>> >>>>Now since I am trying to add a new table and insert some values into it, I have to >>>>restart my cocoon, this is how I try to restart cocoon using: >>>> >>>>shell> ./coccon.sh cli >>>> >>>>but get an error msg at the end .... >>>> >>>> >>>>-------------------- Executing ----------------- >>>>Main Class: org.apache.cocoon.Main >>>>------------------------------------------------------------------------ >>>>cocoon 2.1.2 >>>>Copyright (c) 1999-2003 Apache Software Foundation. All rights reserved. >>>>------------------------------------------------------------------------ >>>> >>>> >>>>ERROR 2004-05-07 14:44:35.412 [ ] (): Could not find the configuration >>>>file. >>>>Exception in thread "main" 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:324) >>>> at Loader.invokeMain(Unknown Source) >>>> at Loader.run(Unknown Source) >>>> at Loader.main(Unknown Source) >>>>Caused by: java.io.FileNotFoundException: The configuration file could not be >>>>found. >>>> at >>>> org.apache.cocoon.bean.CocoonWrapper.getConfigurationFile(CocoonWrapper.java:235) >>>> at org.apache.cocoon.bean.CocoonWrapper.initialize(CocoonWrapper.java:142) >>>> at org.apache.cocoon.bean.CocoonBean.initialize(CocoonBean.java:119) >>>> at org.apache.cocoon.Main.main(Main.java:400) >>>> ... 7 more >>>> >>>>===================================================================== >>>> >>>> >>>> >>>>Now question is that is this the proper way to restart cocoon in my case, or their >>>>is something else i need to do . I even tried with: >>>> >>>>shell> ./cocoon.sh servlet >>>> >>>>and this time I get BindException, which is true bcos its already bound to the >>>>port 8888. This is how the msg looks like: >>>> >>>>./cocoon.sh: using ./build/webapp as the webapp directory >>>>-------------------- Loading -------------------- >>>>Processing repository: ./tools/jetty/lib >>>>Adding jar: ./tools/jetty/lib/jetty-4.2.9.jar >>>>Adding jar: ./tools/jetty/lib/servlet-2.3.jar >>>>Processing repository: ./lib/endorsed >>>>Adding jar: ./lib/endorsed/xalan-2.5.1.jar >>>>Adding jar: ./lib/endorsed/xercesImpl-2.5.0.jar >>>>Adding jar: ./lib/endorsed/xml-apis.jar >>>>-------------------- Executing ----------------- >>>>Main Class: org.mortbay.jetty.Server >>>>14:47:54.865 EVENT Starting Jetty/4.2.9 >>>>14:47:55.846 EVENT Started WebApplicationContext[/,./build/webapp] >>>>server.properties not found, using command line or default properties >>>>Opening database: /home/g_snanda/cocoon-2.1.2/build/webapp/WEB-INF/db/cocoondb >>>>HSQLDB server 1.7.1 is running >>>>Use SHUTDOWN to close normally. Use [Ctrl]+[C] to abort abruptly >>>>Server.run/init: java.net.BindException: Address already in use >>>>java.net.BindException: Address already in use >>>> at java.net.PlainSocketImpl.socketBind(Native Method) >>>> at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:321) >>>> at java.net.ServerSocket.bind(ServerSocket.java:308) >>>> at java.net.ServerSocket.bind(ServerSocket.java:266) >>>> at java.net.ServerSocket.<init>(ServerSocket.java:182) >>>> at java.net.ServerSocket.<init>(ServerSocket.java:94) >>>> at org.hsqldb.Server.run(Unknown Source) >>>> at org.hsqldb.Server.main(Unknown Source) >>>> at org.apache.cocoon.components.hsqldb.ServerImpl.run(ServerImpl.java:199) >>>> at java.lang.Thread.run(Thread.java:536) >>>>INFO [main] (DirectSchedulerFactory.java:295) - Quartz scheduler 'Cocoon >>>>INFO [main] (DirectSchedulerFactory.java:298) - Quartz scheduler version: 1.2.3 >>>>INFO [main] (QuartzScheduler.java:327) - Scheduler >>>>Cocoon_$_Fri_May_07_14:48:09_EDT_2004 started. >>>>14:48:10.138 WARN!! Failed to start: [EMAIL PROTECTED]:8888 >>>>14:48:10.142 WARN!! >>>>org.mortbay.util.MultiException[java.net.BindException: Address already in use] >>>> at org.mortbay.http.HttpServer.start(HttpServer.java:624) >>>> at org.mortbay.jetty.Server.main(Server.java:429) >>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>> at >>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >>>> at >>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>>> at java.lang.reflect.Method.invoke(Method.java:324) >>>> at Loader.invokeMain(Unknown Source) >>>> at Loader.run(Unknown Source) >>>> at Loader.main(Unknown Source) >>>>[0]=java.net.BindException: Address already in use >>>> at java.net.PlainSocketImpl.socketBind(Native Method) >>>> at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:321) >>>> at java.net.ServerSocket.bind(ServerSocket.java:308) >>>> at java.net.ServerSocket.bind(ServerSocket.java:266) >>>> at java.net.ServerSocket.<init>(ServerSocket.java:182) >>>> at org.mortbay.util.ThreadedServer.newServerSocket(ThreadedServer.java:317) >>>> at org.mortbay.util.ThreadedServer.start(ThreadedServer.java:389) >>>> at org.mortbay.http.SocketListener.start(SocketListener.java:153) >>>> at org.mortbay.http.HttpServer.start(HttpServer.java:655) >>>> at org.mortbay.jetty.Server.main(Server.java:429) >>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>> at >>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >>>> at >>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>>> at java.lang.reflect.Method.invoke(Method.java:324) >>>> at Loader.invokeMain(Unknown Source) >>>> at Loader.run(Unknown Source) >>>> at Loader.main(Unknown Source) >>>>=================================================================== >>>> >>>>Could anybody let me know what is the proper way of restarting cocoon in my >>>>case... I am trying this for the last 3days ... >>>> >>>>Eagerly waiting for responses, all responses and suggestions accepted. >>>> >>>>Thanks in advance. >>>> >>>>Regards >>>>Sam >>> >>> >>>--------------------------------------------------------------------- >>>To unsubscribe, e-mail: [EMAIL PROTECTED] >>>For additional commands, e-mail: [EMAIL PROTECTED] >>> >> >> > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >
