Wednesday, April 30, 2008

'findstr' is not recognized as an internal or external command

I got this error starting JBoss from a dos prompt today :

'findstr' is not recognized as an internal or external command

I guess I had been using the ide more than usual since re-imaging my laptop.  The problem was pretty easily resolved thanks to this post on JBoss wiki.

I added C:\WINDOWS\system32 to my PATH variable and everything booted.
Blogged with the Flock Browser

Friday, April 25, 2008

Printing Arrays in Groovy

While working through the arrays page of the Getting Started Guide at the Groovy codehaus site, I stumbled upon some interesting behaviour. I was adding "print" statements to the following block of code :
assert a as List == ['a', 2, 'c', false] 
so that I ended up with :

print
"\na as List : " + a as List

The result wasn't what I expected :
["\n", "a", " ", "a", "s", " ", "L", "i", "s", "t", " ", ":", " ", "{", "\"", "a", "\"", ",", " ", "2", ",", " ", "\"", "f", "o", "o", "\"", ",", " ", "f", "a", "l", "s", "e", "}"] I added parentheses around the "a as List" and got what I expected : a as List : ["a", 2, "foo", false] Simple lesson : pay attention to precedence! That or drink coffee first thing in the morning.

Also, turning the whole string into a list that easily is cool.
Blogged with the Flock Browser

Friday, April 18, 2008

Netbeans Keyboard Shortcuts

I've been using Netbeans some recently after a the Sun Tech Days (Atlanta) and an AJUG presentation on Glassfish. Barry Hawkins' announcement at last night's (April) AJUG meeting about upcoming Python support really piqued my interest and made me decide to get comfortable using it.

My biggest annoyance when switching IDEs is not knowing the keyboard shortcuts. I despise the mouse and keep it on the left side of my desk (I'm right handed) - a Neal Ford suggestion. There is a pdf of shortcuts accessible from Netbeans' help menu, but there is a more complete list available on their wiki.
Blogged with the Flock Browser

Tuesday, April 8, 2008

Google AppEngine

New Google AppEngine!

Sweet, couldn't wait to use it. I started the tutorial during lunch. I downloaded and installed Python and the AppEngine. Then I created a work directory, "C:\google_workspace" and a helloworld folder, "C:\google_workspace\helloworld" just like the tutorial said to do, created the files "helloworld.py" and "app.yaml" just like in the tutorial, and fired up the dev_appserver with, "C:\google_workspace\helloworld>dev_appserver.py helloworld\". Instead of "Hello, world!" I got :

C:\google_workspace\helloworld>dev_appserver.py helloworld/
Traceback (most recent call last):
File "C:\Program Files\Google\google_appengine\dev_appserver.py", line 50, in
<module>
execfile(script_path, globals())
File "C:\Program Files\Google\google_appengine\google/appengine/tools/dev_apps
erver_main.py", line 338, in <module>
sys.exit(main(sys.argv))
File "C:\Program Files\Google\google_appengine\google/appengine/tools/dev_apps
erver_main.py", line 287, in main
config, matcher = dev_appserver.LoadAppConfig(root_path, {})
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_apps
erver.py", line 2415, in LoadAppConfig
raise AppConfigNotFoundError
google.appengine.tools.dev_appserver.AppConfigNotFoundError

Hmm. I ran through a mental checklist before diving into the code (I knew I was being lazy. I was also really looking forward to diving into the code, but I wanted to at least get the thing running first.)
  • Perhaps I should've installed somewhere other than "C:\Program Files" I don't usually put anything in there.
  • Apparently I had Tomcat running which would be blocking 80 (I usually set Tomcat to 80 and JBoss to 8080).
Neither of those made a difference. "I, d, ten, t" error - I was running the wrong file.

Running, "C:\google_workspace\helloworld>dev_appserver.py ./" started the server.

The first line was a prompt, "Allow dev_appserver to check for updates on startup? (Y/n):"
Naturally I said "Y", and I liked name of the config file which was conveniently printed out on the next line, "dev_appserver will check for updates on startup. To change this setting, edit C
:\Documents and Settings\jdavis/.appcfg_nag"

I saw "Hello, world!"

I can't wait to start using this. Now I can finally build a completely scalable side project to make myself rich without spending any money out of pocket! Actually, I can finally stop putting off learning Python.
Blogged with the Flock Browser