Here are some frequently encountered problems:
The pia
batch file won't run on
Windows. It has probably given you an error message involving
one of the environment variables. Create a directory and set that
variable to it.
Java can't find the PIA's classes. This usually
means that CLASSPATH
is set in your environment, and
doesn't have the PIA's classes in it. Either unset
CLASSPATH
(in which case the PIA's batch file or shell
script will set it correctly), or add
PIAHOME/src/java
to your CLASSPATH
environment variable.
How do I build the PIA on a Windows machine. For
now, you're somewhat on your own. Go into each subdirectory of
PIA/src/java/org/risource
, and each sub-subdirectory, and
issue the command:
javac -g *.java
There will be a few errors, but these should be due to ``dead code'' -- old or incomplete files that are not normally compiled. Try it anyway.
Instead of every subdirectory, it may be enough to compile
in: pia
, pia\handle
,
pia\site
, content
,
content\text
, dps
,
dps\handle
, and tf
The PIA doesn't seem to pay attention to changes in a file, or
doesn't read or write a file where expected. This usually
occurs because there are two parallel directory trees: PIA/
and .pia/
(or more formally, $PIA_HOME/
and
$PIA_ROOT/
), and .pia/
takes precedence. So
changes made in the PIA/
tree may (or may not) be used,
depending upon whether there is a corresponding file in the
.pia/
tree: the server always reads files in
.pia/
first if it can, and always writes them there.
The PIA doesn't seem to pay attention to newly-written tags, extensions, or configuration options. This usually occurs for one of two reasons.
.xh
or
.ts
file._subsite.xcf
file explicitly says
so. So make sure that the file-extension type and desired
tagsets are explicitly mentioned (look at Agents/
,
Samples/
, and Config/Site/
for
working examples.) When testing for equality, the PIA thinks two things (strings, numbers, entities) are different when they should be the same. The PIA keeps track of everything in an object or entity, including carriage returns and leading/trailing spaces. Unfortunately, when you follow proper indentation rules, all that invisible stuff becomes part of your object and changes it in subtle ways. Here's an example of the problem and one way to fix it (you can find other such example solutions in our applications, such as SimpleCalendar):
Bad: <set name="hometown">
SiliconValley
</set>
In this case, the entity hometown
contains leading and
trailing carriage returns and spaces, which will register as separate
text elements in a list and may disrupt tests like <test
match="SiliconValley">&hometown;</test>
Good: <set name="hometown"><text trim="yes">
SiliconValley
</text></set>
Lots of blank lines appear in the browser's "Page Source" window,
and/or lists which should be empty do not test as empty, even after
trimming. You may be using standard HTML-style comments
<!-- like this -->
<?-- like this --?>