[ A blank line here will cause the error ] <?xml version-"1.0"?>While installing the search engine "Nutch," I got this error as shown:
ellensmac:- ellen$ /Users/ellen/Sites/apache-nutch-1.1/bin/nutch inject crawl/crawldb urls
[Fatal Error] nutch-site.xml:7:6: The processing instruction target matching "[xX][mM][lL]" is not allowed.
Exception in thread "main" java.lang.RuntimeException: org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
at org.apache.hadoop.conf.Configuration.loadResource (Configuration.java:1168 )
at org.apache.hadoop.conf.Configuration.loadResources (Configuration.java:1040 )
at org.apache.hadoop.conf.Configuration.getProps (Configuration.java:980 )
at org.apache.hadoop.conf.Configuration.set (Configuration.java:405)
at org.apache.hadoop.conf.Configuration.setBoolean (Configuration.java:585)
at org.apache.hadoop.util.GenericOptionsParser.processGeneralOptions (GenericOptionsParser.java:290)
at org.apache.hadoop.util.GenericOptionsParser.parseGeneralOptions (GenericOptionsParser.java:375)
at org.apache.hadoop.util.GenericOptionsParser.<init>(GenericOptionsParser.java:153 )
at org.apache.hadoop.util.GenericOptionsParser.<init>(GenericOptionsParser.java:138 )
at org.apache.hadoop.util.ToolRunner.run (ToolRunner.java:59 )
at org.apache.nutch.crawl.injector.main (Injector.java:231 )
Caused by: org.xml.sax.SAXParseException: The processing instruction target matching" [xX ] [mM] [lL ]" is not allowed .
etc.

We are using an ASP script to create iCal files from a database, so another department can display the events on their web-based calendar.
Their calendar page is outside the corporate firewall. The ASP script needs to reside on and IIS server within the firewall. I needed a fool-proof way to transfer the ical file nightly out to an external web server so it could be accessed by any calendar applications that need to use it. The best way I've found so far is to create a batch file with command-line FTP instructions, and add it to a Windows scheduled task.
@echo off
echo user ftpusername> ftpcmd.dat
echo ftpuserpassword>> ftpcmd.dat
echo cd /pathto/destination/directory/>>ftpcmd.dat
echo bin>> ftpcmd.dat
echo put %1>> ftpcmd.dat
echo quit>> ftpcmd.dat
ftp -n -s:ftpcmd.dat ftp.umhscompliance.net
del ftpcmd.dat
E:\fileStorage\ftp>fileup E:\content\cbtlib\modules\test\rss\icalDemo.ics
Connected to external.server.com.
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 2 of 50 allowed.
220-Local time is now 12:40. Server port: 21.
220 You will be disconnected after 15 minutes of inactivity.
ftp> user ftpusername
331 User ftpusername OK. Password required230-User ftpusername has group access to: ftpusername
230 OK. Current restricted directory is /
ftp> cd /pathto/destination/directory/
250 OK. Current directory is /pathto/destination/directory/
ftp> bin
200 TYPE is now 8-bit binary
ftp> put E:\content\cbtlib\modules\test\rss\icalDemo.ics
200 PORT command successful
150 Connecting to port 4297
226-File successfully transferred
226 0.174 seconds (measured here), 331.30 Kbytes per second
ftp: 59172 bytes sent in 0.00Seconds 59172000.00Kbytes/sec.
ftp> quit
221-Goodbye. You uploaded 58 and downloaded 0 kbytes.
221 Logout. E:\fileStorage\ftp>
E:\fileStorage\ftp\fileup.bat E:\content\cbtlib\modules\test\rss\icalDemo.ics
Connection Error: (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.Or you may get an error like the one below:
"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connection.s (provider: Shared Memory Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)"

While setting up Nutch on a Mac, I kept getting this error in the terminal:
Error: JAVA_HOME is not set
To fix the error on OS X 10.6.x (Snow Leopard), enter the following at the command prompt:
export JAVA_HOME=$(/usr/libexec/java_home)
On 10.5 and above, the command line tool /usr/libexec/java_home dynamically finds the top Java version specified in Java Preferences for the current user. Using this method will allow the path to automatically change as software updates change Java versions.
So, if you try to run a command or script, and get the error (shown in red). . .
yourmac:~ username$ /Users/username/Sites/apache-nutch-1.1/bin/nutch inject crawl/crawldb /Users/username/Sites/apache-nutch-1.1/urls
Error: JAVA_HOME is not set.
. . .set the Java_Home environment variable, and then try to run the command again. This time the response is the correct output for the command (shown in green.)
yourmac:~ username$ export JAVA_HOME=$(/usr/libexec/java_home)
yourmac:~ username$ /Users/username/Sites/apache-nutch-1.1/bin/nutch inject crawl/crawldb /Users/username/Sites/apache-nutch-1.1/urls
Injector: starting
Injector: crawlDb: crawl/crawldb
Injector: urlDir: /Users/username/Sites/apache-nutch-1.1/urls
Injector: Converting injected urls to crawl db entries.
Injector: Merging injected urls into crawl db.
Injector: done
yourmac:~ username$
It only lasts for one session. To set it permanently, you can add:
JAVA_HOME=/usr/libexec/java_home
export JAVA_HOME;
to the file ~/.profile

To confirm you have java, enter this into the Terminal:
java -version
To determine the real path:
echo $JAVA_HOME





















A quick troubleshooting tip for Mac users:
If you are having problems with image icons in the Finder that look like generic jpeg icons instead of icon previews, try relaunching the Finder.
Select Force Quit from the Apple menu. Select Finder, then click the Relaunch button.
Or, delete the Finder preferences and then relaunch the Finder.
(~User/Library/Preferences/com.apple.finder.plist)