| Author |
Message |
|
|
Is Smith CF Dead? I certainly hope not. But the lack of recent activity on the message boards, coupled with a release that is almost 6 months old, has me a bit concerned. Maybe I'm just being impatient.
Could somebody who is involved with the development/release coordination process post an update on the current status of the Smith project?
My Java knowledge is limited, but I'd like to assist the development effort in other ways (beta testing, user documentation, etc.) Please let me know if I can help in these areas.
Thanks!
Bob
On a related note:
http://www.infoaccelerator.net/blog/post.cfm/is-open-bluedragon-losing-momentum
Railo to release version 3.1 as open source:
http://www.railo-technologies.com/en/index.cfm?treeID=357
|
 |
|
|
Has anybody tried to get MXAJAX to work with SmithCF? The MXAJAX code works fine on CFMX 7, and Railo 2, but not on Smith. I don't see where it's using any unsupported tags. I'm not an expert with <CFSCRIPT> but based on the error message, it looks like a function is bombing out when trying to return some JSON-formatted data.
Some of the source code appears below, and the error I'm getting appears below that. For more info on mxajax, google mxajax, follow first link. Thanks for any help/input you can provide.
Source Code:
Code:
<!----
* Serialize native ColdFusion objects (simple values, arrays, structures, queries) into JSON format
* <a href="http://json.org/" target="_blank" rel="nofollow">http://json.org/</a>
*
* @param object Native data to be serialized
* @return Returns string with serialized data.
* @author Jehiah Czebotar (jehiah@gmail.com)
* @version 1.4, Janauary 10th 2006
---->
<cffunction name="jsonencode">
<cfargument name="arg" type="any">
<cfscript>
var i=0;
var o="";
var u="";
var v="";
var z="";
var r="";
if (isarray(arg))
{
o="";
for (i=1;i lte arraylen(arg);i=i+1){
try{
v = jsonencode(arg[i]);
if (o neq ""){
o = o & ',';
}
o = o & v;
}
catch(Any ex){
o=o;
}
}
<!--- THE ERROR IS REFERENCING THIS LINE --->
return '['& o &']'
}
if (isstruct(arg))
{
o = '';
if (structisempty(arg)){
return "{}";
}
z = StructKeyArray(arg);
for (i=1;i lte arrayLen(z);i=i+1){
try{
v = jsonencode(structfind(arg,z[i]));
}catch(Any err){WriteOutput("caught an error when trying to evaluate z[i] where i="& i &" it evals to " & z[i] );}
if (o neq ""){
o = o & ",";
}
o = o & '"'& lcase(z[i]) & '":' & v;
}
return '{' & o & '}';
}
if (isobject(arg)){
return "unknown-obj";
}
if (issimplevalue(arg) and isnumeric(arg)){
return ToString(arg);
}
if (issimplevalue(arg)){
return '"' & JSStringFormat(ToString(arg)) & '"';
}
if (IsQuery(arg)){
o = o & '"RECORDCOUNT":' & arg.recordcount;
o = o & ',"COLUMNLIST":'&jsonencode(arg.columnlist);
// do the data [].column
o = o & ',"DATA":{';
// loop through the columns
for (i=1;i lte listlen(arg.columnlist);i=i+1){
v = '';
// loop throw the records
for (z=1;z lte arg.recordcount;z=z+1){
if (v neq ""){
v =v & ",";
}
// encode this cell
v = v & jsonencode(evaluate("arg." & listgetat(arg.columnlist,i) & "["& z & "]"));
}
// put this column in the output
if (i neq 1){
o = o & ",";
}
o = o & '"' & listgetat(arg.columnlist,i) & '":[' & v & ']';
}
// close our data section
o = o & '}';
// put the query struct in the output
return '{' & o & '}';
}
return "unknown";
</cfscript>
</cffunction>
[list]
EXCEPTION INFO
Exception overview
Error message: com.youngculture.smith.engine.exception.CompilerException: Compiler encountered errors during parsing file C:\Documents and Settings\e0001544\Desktop\smith\wwwroot\mxajax\core\cf\mxAjax.cfc:
Encountered "return" at line 165, column 33.
Was expecting one of:
"}" ...
"{" ...
";" ...
...
"\'" ...
"\"" ...
...
...
"for" ...
"if" ...
"break" ...
"while" ...
"try" ...
"do" ...
"continue" ...
"switch" ...
Error type: any
Stack trace
[Error message: com.youngculture.smith.engine.exception.CompilerException: Compiler encountered errors during parsing file C:\Documents and Settings\e0001544\Desktop\smith\wwwroot\mxajax\core\cf\mxAjax.cfc: Encountered "return" at line 165, column 33. Was expecting one of: "}" ... "{" ... ";" ... ... "\'" ... "\"" ... ... ... "for" ... "if" ... "break" ... "while" ... "try" ... "do" ... "continue" ... "switch" ... ]
com.youngculture.smith.engine.pages.PageUtil.getCfcInstance(PageUtil.java:381)
com.youngculture.smith.engine.pages.PageUtil.getCfcInstance(PageUtil.java:38
com.youngculture.smith.engine.pages.PageUtil.getCfcInstance(PageUtil.java:35
com.youngculture.smith.engine.pages.PageUtil.runCfc(PageUtil.java:404)
com.youngculture.smith.engine.util.PageDispatcher.includePage(PageDispatcher.java:94)
com.youngculture.smith.engine.util.PageDispatcher.includePage(PageDispatcher.java:116)
com.youngculture.smith.engine.servlets.SmithServlet.serviceRequest(SmithServlet.java:167)
com.youngculture.smith.engine.servlets.SmithServlet.service(SmithServlet.java:112)
javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
org.mortbay.jetty.Server.handle(Server.java:313)
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)[/list]
|
 |
|
|
|
Deleted
|
 |
|
|
Tom,
Thanks for all of your help! You are an asset to this forum, and to this project.
|
 |
|
|
Tom,
Thanks for your input. I suspected a Tomcat problem as well, but ruled it out, given that my httpd.conf, virtual.conf, workers.properties, and server.xml files are exactly like those in the 'preinstallation' steps. Perhaps I fat-fingered something, but I've been through them so many times, and I can't spot any errors. The logs aren't reporting any errors related to configuration, and my smith setup otherwise seems to work okay. I retyped all of the aforementioned config files, and now CGI.SCRIPT_NAME returns the current filename, preceded by a single '/'.
Perhaps I'm just misunderstanding what the expected result should be. At your recommendation, I created the request.jsp file, and placed it in my webapps folder (results attached). From there, CGI.SCRIPT_NAME had a value of '/request.jsp'. I decided to move it to my Smith folder (one level down). I pointed my browser to 'http://localhost/smith-1.3b2/request.jsp' and the value of SCRIPT_NAME was still '/request.jsp'. I was expecting to see '/smith-1.3b2/request.jsp'.
On a related note, when smith is deployed in the webapps folder, should I be able to access the admin page like this: http://localhost/IDE/admin.html Currently, my URL has to include the smith folder, or none of my CF pages will work: http://localhost/smith-1.3b2/IDE/admin.html
More than likely my problem is a configuration issue. But if you or any other readers have a similar setup (CentOS, Tomcat5, Apache2.2) and would be willing to share your config files, it would be most appreciated.
Again, thanks for your help.
Bob
|
 |
|
|
I'm having a problem with the #CGI.SCRIPT_NAME# variable. It appears that the variable does not contain the highest level folder. For example, if I modify the Smith index.cfm file (webapps/smith-1.3b2/index.cfm) :
<h1>Welcome to Smith</h1>
<h1>Hello World!</h1>
<cfoutput>
Now is: #Now()#<br />
CGI.SCRIPT_NAME Value: #CGI.SCRIPT_NAME#
</cfoutput>
The output is:
Welcome to Smith
Hello World!
Now is: {ts '2007-07-17 09:10:56'}
CGI.SCRIPT_NAME Value: //index.cfm
I'm concerned about the double slashes in the output. Should not the output simply be /index.cfm ? Or possibly /smith-1.3b2/index.cfm ? Is this problem related to the CGI.Context_Path issue?
My server configuration is exactly as described in the preinstallation steps here on the SmithProject website (running CentOS, Tomcat, Apache, MySQL).
Any help would be greatly appreciated.
Thanks,
Bob
|
 |
|
|
Tom,
Thanks! I made the change yesterday, and tested this morning. My db connection was still alive after 24 hours of inactivity.
Bob
|
 |
|
|
Not sure if this thread is still alive or not. But I wanted to give an update to this problem.
I performed a clean install of XP Pro on my webserver, reinstalled Java 5, Tomcat 5.5, Apache 2.2, MySQL5, and the MySQL 5 jdbc connector (downloaded from this site.) I deployed the latest smith_1_3.war file, and found that the problem still exists. If the server receives no hits for a long time, (around 8 hours), the first hit after that gets the java.net. SocketException error. Refresh, and everything is fine. I have never seen this error when simply refreshing a page repeatedly, as Corpus reported.
Like Corpus mentioned above, I am using cftry/cfcatch to generate a more friendly error page. But that's not the ideal solution. I've also tried using cftry/catch to retry the failed query, but can't get that to work either. Has anybody figured out a CF solution/workaround to this problem?
Thanks for your input!
|
 |
|
|
This morning (24-May-2007), I downloaded and deployed Smith_1_3.war on my Tomcat 5.5 server (Windows XP/Java1.6). I found that I am unable to modify the Admin password. The 'Save' function does not save (although the response message indicates that the PW change was successful.) Also, when entering an invalid PW, no "friendly" invalid PW message is displayed anymore. Instead, a Tomcat error page is received.
Just for kicks, I went back and deployed the Smith_1_2_5.war file, and was able to modify the admin PW without any problems. (Also the 'invalid PW error' message is properly displayed when accessing the admin screen with an invalid PW.)
I should mention that all other areas of my 1.3 admin screen appear to work correctly: I can turn on debug, create and test datasources, etc...
Do you think this is a bug, or a configuration problem on my part?
Thanks for your input!
|
 |
|
|
I am using Smith to dynamically build a page with data from a MySQL 5 db. If the site has been inactive for a prolonged period, or if the web server has been rebooted, the first page that attempts to query the database errors out with the following:
EXCEPTION INFO
Exception overview
Error message: Error executing "blogs" query!
Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.SocketException
MESSAGE: Software caused connection abort: socket write error
However, simply refreshing the page in my browser results in a successful db connection and the retrieval of data. (And every page request after that works fine.) The query is a simple Select * From TableX with no Where clause. I'm using the latest JDBC connector for MySQL 5, and I've deployed the smith.war file on Apache Tomcat.
Is there some setting that will start and keep the db connection alive? I have tried the 'Keep DB connection alive...' option, but that doesn't seem to help. Any ideas?
Thanks for your help!
|
 |
|
|
|
|