Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion CalendarSample.java doesn't compile with latest jars, adding jars then gives a java.lang.NoClassDefFoundError : com/google/api/client/json/jac kson/JacksonFactory

Received: by 10.236.85.176 with SMTP id u36mr562644yhe.45.1352981550648;
        Thu, 15 Nov 2012 04:12:30 -0800 (PST)
X-BeenThere: google-api-java-client@googlegroups.com
Received: by 10.49.26.69 with SMTP id j5ls263927qeg.68.gmail; Thu, 15 Nov 2012
 04:12:30 -0800 (PST)
Received: by 10.224.111.140 with SMTP id s12mr794867qap.5.1352981550181;
        Thu, 15 Nov 2012 04:12:30 -0800 (PST)
Received: by 10.224.16.202 with SMTP id p10msqaa;
        Wed, 14 Nov 2012 22:50:10 -0800 (PST)
Received: by 10.49.34.135 with SMTP id z7mr98816qei.1.1352962210565;
        Wed, 14 Nov 2012 22:50:10 -0800 (PST)
Date: Wed, 14 Nov 2012 22:50:09 -0800 (PST)
From: Savo Balac <savoba...@yahoo.co.uk>
To: google-api-java-client@googlegroups.com
Message-Id: <dc5312dc-9990-4e79-8e0c-bf2b2bb99129@googlegroups.com>
Subject: CalendarSample.java doesn't compile with latest jars, adding jars
 then gives a java.lang.NoClassDefFoundError:
 com/google/api/client/json/jackson/JacksonFactory
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1525_1840579.1352962209623"

------=_Part_1525_1840579.1352962209623
Content-Type: multipart/alternative; 
	boundary="----=_Part_1526_30993313.1352962209623"

------=_Part_1526_30993313.1352962209623
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

Hi,
 
I'm trying to run my first calendar app using the calendar-cmdline-sample: 
CalendarSample.java.
This class didn't compile with the latest jars 
(google-api-java-client-1.12.0-beta) - I needed to add these jars as 
modules in IntelliJ:
 
google.-api-client-1.4.1-beta.jar
google-http-client-1.5.0-beta.jar 
(for com.google.api.client.json.jackson.JacksonFactory)
guava-jdk5-13.0.jar (no guava-11.0.1.jar in the zip file)
google-api-client-util-1.2.3-alpha.jar (for 
com.google.api.client.util.DateTime)
google-api-client-java6-1.12.0-beta.jar (to overcome 
ClassNotFoundException: calendar)
 
I added this as a library:
google-api-services-calendar-v3-rev20-java-1.12.0-beta (for 
com.google.api.services.calendar.*)
 
I'm just trying to list and add events to a calendar using this code:
 
// Set up the HTTP transport and JSON factory
            HttpTransport httpTransport = new NetHttpTransport();
            JacksonFactory jsonFactory = new JacksonFactory();
              HttpRequestInitializer httpRequestInitializer =
                new BasicAuthentication("my calendar ID", "my google 
password");
            Calendar cal = new Calendar(httpTransport, jsonFactory, 
httpRequestInitializer);   THE RUNTIME ERROR OCCURS HERE
 
// Sample code to quickly add an event
Calendar.Events.QuickAdd quickAdd = cal.events().quickAdd("my calendar ID", 
"{a calendar name}");
 
// Sample code to list the events
Events events = cal.events().list("{a calendar namet}").execute();
...
 
// Sample code to insert an event
...
Event createdEvent = cal.events().insert("{primary}", event).execute();
 
 
Please help. Thanks.

------=_Part_1526_30993313.1352962209623
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<div>Hi,</div><div>&nbsp;</div><div>I'm trying to run my first calendar app=
 using the calendar-cmdline-sample: CalendarSample.java.</div><div>This cla=
ss didn't compile with the latest jars (google-api-java-client-1.12.0-beta)=
 - I needed to add these jars as modules in IntelliJ:</div><div>&nbsp;</div=
><div>google.-api-client-1.4.1-beta.jar</div><div>google-http-client-1.5.0-=
beta.jar (for&nbsp;com.google.api.client.json.jackson.JacksonFactory)</div>=
<div>guava-jdk5-13.0.jar (no guava-11.0.1.jar in the zip file)</div><div>go=
ogle-api-client-util-1.2.3-alpha.jar (for com.google.api.client.util.DateTi=
me)</div><div>google-api-client-java6-1.12.0-beta.jar (to overcome ClassNot=
FoundException: calendar)</div><div>&nbsp;</div><div>I added this as a libr=
ary:</div><div>google-api-services-calendar-v3-rev20-java-1.12.0-beta (for =
com.google.api.services.calendar.*)</div><div>&nbsp;</div><div>I'm just try=
ing to list and add events to a calendar using this code:</div><div>&nbsp;<=
/div><div>// Set up the HTTP transport and JSON factory<br>&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HttpTransport httpTransp=
ort =3D new NetHttpTransport();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp; JacksonFactory jsonFactory =3D new JacksonFactor=
y();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp; HttpRequestInitializer httpRequestInitializer =3D<br>&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp; new BasicAuthentication("my calendar ID", "my google password");</div=
><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ca=
lendar cal =3D new Calendar(httpTransport, jsonFactory, httpRequestInitiali=
zer);&nbsp;&nbsp; THE RUNTIME ERROR OCCURS HERE</div><div>&nbsp;</div><div>=
// Sample code to quickly add an event</div><div>Calendar.Events.QuickAdd q=
uickAdd =3D cal.events().quickAdd("my calendar ID", "{a calendar name}");</=
div><div>&nbsp;</div><div>// Sample code to list the events</div><div>Event=
s events =3D cal.events().list("{a calendar namet}").execute();</div><div>.=
..</div><div>&nbsp;</div><div>// Sample code to insert an event</div><div>.=
..</div><div>Event createdEvent =3D cal.events().insert("{primary}", event)=
.execute();</div><div>&nbsp;</div><div>&nbsp;</div><div>Please help. Thanks=
.</div>
------=_Part_1526_30993313.1352962209623--

------=_Part_1525_1840579.1352962209623--