CPPSERV


Home Projects Jobs Clientele Contact

cppserv


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with starting CPPSERV



Attached cppserv.diff file generated with git.

> Yes, I confirmed that my engine.xml is parsed correctly, but I have
> difficulties with debugging the code flow since I'm not very familiar with
> it.
> The only file that was changed on CPPSERV is xmlserverconfig.cpp. Attached
> is .diff file per Ilya's request.
>
>> You've confirmed that your config is parsed now, haven't you? So, we're
>> talking about generally testing the code flow. Try to find out - which
>> parts
>> of codes are executed and what part is failing.
>>
>> 2007/3/12, sergey@total-knowledge.com <sergey@total-knowledge.com>:
>>>
>>> Thanks, but I'm afraid that result will be the same as with perl
>>> script.
>>> I'm still not sure if this problem related to my machine configuration
>>> or
>>> it's the downside of upgrading to new version of SPTK and changing the
>>> XML
>>> parsing code. My httpd.conf is exactly the same as before, I'm very
>>> confused.
>>> Any thoughts will be appreciated.
>>>
>>> > You can start using SPTK logs, CFileLog class, in particular. It's
>>> very
>>> > simple, and also supports database operations logging.
>>> >
>>> > 2007/3/12, sergey@total-knowledge.com <sergey@total-knowledge.com>:
>>> >>
>>> >> I do use Unix domain sockets:
>>> >>
>>> >> <listener protocol="unix" path="/tmp/cppserv.sock"/>
>>> >>
>>> >> I tried to create my own socket using perl script but it didn't help
>>> >> either.
>>> >>
>>> >> > Use unix domain sockets
>>> >> > -----Original Message-----
>>> >> > From: sergey@total-knowledge.com
>>> >> > Date: Sun, 11 Mar 2007 17:39:09
>>> >> > To:"C++ Servlet Engine Discussion" <cppserv@total-knowledge.com>
>>> >> > Subject: Re: Problem with starting CPPSERV
>>> >> >
>>> >> > I checked both Apache logs(/var/log/syslog and
>>> >> /var/log/httpd/error_log)
>>> >> > In /var/log/httpd/error_log I got
>>> >> >
>>> >> >  [error] [client 127.0.0.1] Cannot connect to CPPSERV
>>> >> > (/tmp/cppserv.sock):
>>> >> > Connection refused
>>> >> >
>>> >> > Also I tried to specify host="localhost" in <listener> with no
>>> luck.
>>> >> > I'm trying to find out if the parsed data actually loaded to
>>> >> > constructors,
>>> >> > but have trouble finding where this proccess takes place.
>>> >> > Can you give me some hints which classes I should check in order
>>> to
>>> do
>>> >> > it?
>>> >> >
>>> >> >
>>> >> >
>>> >> >> Connection properties are described in engine.xml
>>> >> >> If it isn't set up right, it won't be connecting. Look at
>>> >> >> apache logs.
>>> >> >>
>>> >> >> sergey@total-knowledge.com wrote:
>>> >> >>>> Which means you don't have apache connecting to your cppserv
>>> >> >>>> instance.
>>> >> >>>>
>>> >> >>>>
>>> >> >>>
>>> >> >>> Hmm.. why did it happen after recent changes to
>>> xmlserverconfig.cpp
>>> >> >>> then?
>>> >> >>> I don't think these things can be related, it worked well
>>> before.
>>> >> >>> How can I connect apache to my cppserv instance?
>>> >> >>>
>>> >> >>
>>> >> >> --
>>> >> >> Ilya A. Volynets-Evenbakh
>>> >> >> Total Knowledge. CTO
>>> >> >> http://www.total-knowledge.com
>>> >> >>
>>> >> >>
>>> >> >
>>> >> >
>>> >>
>>> >>
>>> >>
>>> >
>>> >
>>> > --
>>> > Alexey Parshin,
>>> > http://www.sptk.net
>>> >
>>>
>>>
>>>
>>
>>
>> --
>> Alexey Parshin,
>> http://www.sptk.net
>>
>
diff --git a/src/container/xmlserverconfig.cpp b/src/container/xmlserverconfig.cpp
index e258976..2c76ee1 100644
--- a/src/container/xmlserverconfig.cpp
+++ b/src/container/xmlserverconfig.cpp
@@ -20,7 +20,7 @@
 #include "xmlserverconfig.h"
 #include <sptk3/CBuffer.h>
 #include <sptk3/xml/CXmlDoc.h>
-#include <sptk3/xml/CXmlParser.h>
+#include <sptk3/cxml>
 #include <sptk3/CException.h>
 #include <unistd.h>
 #include <errno.h>
@@ -106,15 +106,11 @@ void container::XMLServerConfig::load()
 	container::XMLServerConfig::XMLConfigNode *r=new container::XMLServerConfig::XMLConfigNode("root","root",0);
 	root=r;
 	try {
-		CXmlDoc *doc=new CXmlDoc;
-		sptk::CBuffer buf;
-		CXmlLocator locator;
-		buf.loadFromFile(path.c_str());
-		CXmlParser::createDOM(*doc,buf,&locator,false);
-		addKids(doc,r);
-		delete doc;
-	} catch (CXmlException& exp) {
-		std::cerr<<"XML error: "<<exp.what()<<std::endl;
+	  CXmlDoc doc;
+	  CBuffer buffer;
+	  buffer.loadFromFile(path);
+	  doc.load(buffer);
+	  addKids(&doc,r);
 	} catch (CException& e) {
 		std::cerr<<"error: "<<e.message()<<std::endl;
 	} catch (...) {
diff --git a/src/cxxsp/parser/Makefile.adon b/src/cxxsp/parser/Makefile.adon
index 57caf16..deb7c4b 100644
--- a/src/cxxsp/parser/Makefile.adon
+++ b/src/cxxsp/parser/Makefile.adon
@@ -29,7 +29,7 @@ libcxxsp_parser_SOURCES:= \
 	csplex.cpp
 
 cxxsp_compile_SOURCES:= cxxsp_compile.cpp
-cxxsp_compile_LDFLAGS:= -lutil -lcxxsp_parser -ldl -lservlet
+cxxsp_compile_LDFLAGS:= -lutil -lcxxsp_parser -ldl -lservlet -lfl
 
 noinst_HEADERS:= \
 	dso_code.h \
diff --git a/src/cxxsp/parser/csplex.cpp b/src/cxxsp/parser/csplex.cpp
index 7d2c7a1..d388ae5 100644
--- a/src/cxxsp/parser/csplex.cpp
+++ b/src/cxxsp/parser/csplex.cpp
@@ -326,7 +326,7 @@ typedef unsigned char YY_CHAR;
 #define yytext_ptr yytext
 #define YY_INTERACTIVE
 
-#include <FlexLexer.h>
+#include "FlexLexer.h"
 int yyFlexLexer::yylex()
 	{
 	LexerError( "yyFlexLexer::yylex invoked but %option yyclass used" );

Authoright © Total Knowledge: 2001-2008