The target is set when compiling with javac I believe like 'javac
-target 1.5'

Some other information is in a thread Derek previously posted on:
http://groups-beta.google.com/group/google-calendar-help-dataapi/browse_thread/thread/c67aff31183faee5/1ee9379d8115697c#1ee9379d8115697c

Sun's documentation does state that it should be target 1.5 by default,
however:
http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/javac.html

Is it possible that the JSP is being compiled using a different version
of the JDK, but resin is running under 1.5?

Resin has a config option that allows you to provide a path to your
java compiler as well as command-line arguments to it:
http://www.caucho.com/resin-2.1/ref/resin-config.xtp#java

Perhaps your ISP would have an answer, if you dont have access to read
the configuration?  Or in general, they may know how it's set up?

Cheers,
-Ryan

On Jan 5, 10:03 am, "ironb2" <[EMAIL PROTECTED]> wrote:
System.getProperty("java.version") returns 1.5.0_01 on my JSP page
causing the other errors.  What else can I check to ensure I my web
host is compatible with the GCal library?  How can I "set Java 5
compatibility"?

Granted, I am working with a web host here, so I do not have access to
command prompt, etc.

Thanks,

Mike

On Jan 5, 11:34 am, "Derek" <[EMAIL PROTECTED]> wrote:

> This is appearing very similar to an issue I had in my dev environment
> when I had not enabled Java 5 compatibility.  I suggest taking a deep
> look at the exact Java version running the code and any compatibility
> options.  I experienced the same difficulty getting an EventFeed object
> from a BaseFeed due to the underlying use of generics, setting Java 5
> compatiblity solved it straight off.

> Regards,
> Derek.www.calgoo.com

> ironb2 wrote:
> > Hi,

> > I am still experiencing the problem described in my first posting.  My
> > GData libraries are contained in the WEB-INF/lib folder and it appears
> > that the JSP files can see them, because if I remove the JAR files from
> > the lib folder, I get errors saying the classes are not found on
> > import.  I am uploading all production files to a web host's server,
> > which runs Resin 2.1.13 and JDK 1.5.0.  Because it is a web host I am
> > connecting to, I do not think I have access to the CLASSPATH or
> > container-wide library directories, which would lead me to believe that
> > there wouldn't be an issue there.  On my test server at home, I am
> > running the same version of Resin and Java and am experiencing no
> > errors.

> > I was going back to basics and was trying to run a simple script from
> > the Calendar API tutorial.  Here is the code I was running:

> > // Set up the URL and the object that will handle the connection:
> > URL feedUrl = new
> > URL("http://www.google.com/calendar/[EMAIL PROTECTED]/private/full");
> > GoogleService myService = new GoogleService("cl",
> > "exampleCo-exampleApp-1");
> >  myService.setUserCredentials("[EMAIL PROTECTED]", "mypassword");

> > // Mark the feed as an Event feed:
> > new EventFeed().declareExtensions(myService.getExtensionProfile());

> > // Send the request and receive the response:
> > EventFeed myFeed = myService.getFeed(feedUrl, EventFeed.class);

> > %><h3><%=myFeed.getTitle().getPlainText()%></h3>

> > And here is the response from the web server upon execution:

> > 500 Servlet Exception
> > Note: sun.tools.javac.Main has been deprecated.
> > /connect/calendar_test.jsp:59: Incompatible type for declaration.
> > Explicit
> > cast needed to convert com.google.gdata.data.BaseFeed to
> > com.google.gdata.data.extensions.EventFeed.
> > EventFeed myFeed = myService.getFeed(feedUrl, EventFeed.class);
> >                 ^
> > 1 error, 1 warning

> > I have been explicitly casting here on my other calendar JSP app, e.g.
> > CalendarEventFeed myFeed =
> > (CalendarEventFeed)myservice.getFeed(feedURL, EventFeed.class);  but I
> > should not have to do so according to the Calendar API tutorial example
> > above.  What does this error message mean?  I am not sure but perhaps
> > it is linked my main problem.

> > Any help is appreciated, as I am going CRAZY!

> > Thanks,

> > Mike- Hide quoted text -- Show quoted text -


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Google 
Calendar Data API" group.
To post to this group, send email to 
[email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to