Rapha�l Luta wrote:

> Michael Steindl wrote:
>
>> hi there,
>>
>> having a tremendous problem with the actual cvs files:
>>
>> after building the jetspeed.war I'm receiving the following stack-trace:
>>
>> any idear??
>>
>> =====================================================>
>>
>> Horrible Exception: java.lang.ClassCastException: java.lang.String
>>     at
>
>
>
> I've setup a Solaris test box in order to reproduce this bug and it seems
> like there's a weird behavior difference in the Turbine API between Unix
> and Windows:
>
> The cast excpetion comes from the
> getProfile() method is DefaultJetspeedRunData
>
> getProfile()
> {
>     return (Profile)rundata.getUser().getTemp("profile");
> }
>
> On Windows, this method returns null when the profile property is not 
> set,
> on Unix, it looks like it returns an empty string instead of null for 
> some
> reasons.
> I've not yet had the time to investigate more thoroughly and I'd 
> appreciate
> if anybody with some time on his hand could track the precise bug.
>
> As an interim fix, you can modify the above method to:
>
>     public Profile getProfile()
>     {
>         Profile profile=null;
>         try
>         {
>             profile=(Profile)this.getUser().getTemp("profile");
>         }
>         catch (ClassCastException e)
>         {
>             profile=null;
>         }
>
>         return profile;
>     }
>
> This will get you to the next error but does not solve everything.

Better than this, (I got it), I'm committing a change to the 
CastorPsmlManagerService.

The problem was funny: "/WEB-INF/psml" is *not* absolute under Windows 
(as per java specification, an absolute path in Windows needs the drive 
letter), but it *is* absolute under Unix, so the test:

if( !rootDir.isAbsolute()) was giving different results in both platforms.
I have chaged it to if( !rootDir.exists() ) so that now, if the root 
does not exist, is taken as context-relative, else it is created.

I'll be commiting right now. It can take a while, as I'm using GPRS + my 
mobile phone from my parent's house in the beach, and the connection is 
flaky.

>
> -- 
> Raphael Luta - [EMAIL PROTECTED]
> Vivendi Universal Networks - Paris
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to