History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: UP-1071
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Brad Johnson
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
uPortal

provide helpful error message if JAXP is not installed on JDK 1.4

Created: 13/May/05 12:24 PM   Updated: 03/Jul/07 04:11 PM
Component/s: None
Affects Version/s: 2.5.0 RC1
Fix Version/s: 2.5.0 RC2

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
If you try to compile uPortal 2.5 with a stock JDK 1.4 you'll get a bunch of errors starting with:
==================
compile:
    [mkdir] Created dir: /home/jjohnson/ws2/portal_head/build/WEB-INF/classes
    [javac] Compiling 836 source files to /home/jjohnson/ws2/portal_head/build/WEB-INF/classes
    [javac] /home/jjohnson/ws2/portal_head/source/org/jasig/portal/ChannelRegistryManager.java:12: package javax.xml.xpath does not exist
    [javac] import javax.xml.xpath.XPath;
    [javac] ^
    [javac] /home/jjohnson/ws2/portal_head/source/org/jasig/portal/ChannelRegistryManager.java:13: package javax.xml.xpath does not exist
    [javac] import javax.xml.xpath.XPathConstants;
    [javac] ^
    [javac] /home/jjohnson/ws2/portal_head/source/org/jasig/portal/ChannelRegistryManager.java:14: package javax.xml.xpath does not exist
    [javac] import javax.xml.xpath.XPathExpressionException;

... they keep going...
==================

We need to give a helpful error message in this case. I think this will be a very common problem that users will have to email the mailing list and waste alot of time trying to diagnose.

We need our build.xml to run a small test to make sure the required JAXP libraries are avaliable, and if not print a very nice error message and a link to more information on the Ja-Sig Wiki.

 All   Comments   Work Log   Change History      Sort Order:
Brad Johnson [13/May/05 05:14 PM]
Here's the new helpful error message:

prepare:
[java] java.lang.ClassNotFoundException: javax.xml.xpath.XPathConstants
[java] The missing class is provided as part of JAXP.
[java] Check that you have the JAXP jars installed in your JDK.
[java] For more information see http://jasigch.princeton.edu:9000/display/UPC/2.5


Andrew Petro [16/May/05 10:10 PM]
This looks like is has been resolved for RC2. As noted on jasig-dev, we may have an opportunity here to consolidate the source that implements this into the core /source/ tree without compromising the solution's working even when the rest of the source won't compile (e.g., because of exactly the missing dependencies that the code is intended to detect and report upon). I don't think it's a huge issue. Perhaps worth a look before 2.5.0 final.

Brad Johnson [17/May/05 09:34 AM]
I didn't see a way to compile just this class and put it in /source. If you try to compile the whole thing you'd get many un-helpful error messages. Is there a way to just compile this one class yet have it reside in /source? Or am I missing something?

Andrew Petro [17/May/05 09:41 AM]
I think the Ant javac task allows compiling only one source file. The task would look something like:

<javac sourcepath="" srcdir="${src}"
destdir="${build}" >
<include name="org/jasig/portal/tools/LibCheck.java"/>
</javac>

What I think this says is "Yes, we're going to use the normal source directory, but no, don't use your default searching to find the Java files (sourcepath is empty). Rather, just include this one specific file.


Brad Johnson [17/May/05 10:06 AM]
Ah yeah. That'd be alot better than having to have the pretest folder.

Brad Johnson [17/May/05 10:15 AM]
Okay, I was able to do the include thing instead of using a folder pretest.