dan6886 / gdata-java-client

Automatically exported from code.google.com/p/gdata-java-client
Apache License 2.0
0 stars 0 forks source link

Implementation of Contact API #225

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Execution

What is the expected output? What do you see instead?
We need to get a form where we can add the details for concern addition of 
contact, here we are getting following exception

HTTP ERROR: 500
com/google/gdata/data/TextConstruct
RequestURI=/sign

Caused by:
java.lang.NoClassDefFoundError: com/google/gdata/data/TextConstruct
    at 
addnewcontact.SignAddContactServlet.doPost(SignAddContactServlet.java:42)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
    at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
    at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandle
r.java:1093)
    at 
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(Trans
actionCleanupFilter.java:43)
    at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandle
r.java:1084)
    at 
com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFile
Filter.java:121)
    at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandle
r.java:1084)
    at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
    at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
    at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
    at 
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
    at 
com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEn
gineWebAppContext.java:54)
    at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
    at 
com.google.appengine.tools.development.JettyContainerService$ApiProxyHandle
r.handle(JettyContainerService.java:342)
    at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
    at org.mortbay.jetty.Server.handle(Server.java:313)
    at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
    at 
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java
:844)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
    at 
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396
)
    at 
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:
442)
Caused by: java.lang.ClassNotFoundException: 
com.google.gdata.data.TextConstruct
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at 
com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(Iso
latedAppClassLoader.java:151)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    ... 26 more

Caused by:
java.lang.ClassNotFoundException: com.google.gdata.data.TextConstruct
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at 
com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(Iso
latedAppClassLoader.java:151)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    at 
addnewcontact.SignAddContactServlet.doPost(SignAddContactServlet.java:42)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
    at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
    at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandle
r.java:1093)
    at 
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(Trans
actionCleanupFilter.java:43)
    at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandle
r.java:1084)
    at 
com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFile
Filter.java:121)
    at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandle
r.java:1084)
    at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
    at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
    at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
    at 
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
    at 
com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEn
gineWebAppContext.java:54)
    at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
    at 
com.google.appengine.tools.development.JettyContainerService$ApiProxyHandle
r.handle(JettyContainerService.java:342)
    at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
    at org.mortbay.jetty.Server.handle(Server.java:313)
    at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
    at 
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java
:844)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
    at 
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396
)
    at 
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:
442)

Powered by Jetty://

What version of the product are you using? On what operating system?

Using Galileo Packages (based on Eclipse 3.5 SR1)Eclipse IDE for Java EE 
Developers, with plugin for gdata of 1.0 version with these libraries
gdata-samples.java-1.38.0.zip

Please provide any additional information below.

Also tried with Picasa API there too find similar kind of errors
 My approach in implementing Contact API is as follows

Got Eclipse 3.5 galileo version for J2EE, got plugin for Google API of 1.0v  
created a Google API application by adding concern external jar files of 
gdata-samples.java-1.38.0.zip and tried implementing the code from here 
"http://code.google.com/apis/contacts/docs/3.0/developers_guide_java.html"
but its showing the above mentioned exception

Original issue reported on code.google.com by gmadan19 on 7 Jan 2010 at 4:50

GoogleCodeExporter commented 9 years ago
has similar problem with:
Eclipse 3.6 GWT 2.1 GAE 1.3.8.
Google Calendar API 2.0

javax.servlet.ServletContext log: Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public 
abstract java.lang.String com.xxxx.DoSomething() throws 
java.lang.IllegalArgumentException' threw an unexpected exception: 
java.lang.NoClassDefFoundError: com/google/gdata/data/TextConstruct
    at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:378)
    at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:581)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:207)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:243)
    at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
    at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:58)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:122)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
    at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:70)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:349)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
    at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: java.lang.NoClassDefFoundError: com/google/gdata/data/TextConstruct

Original comment by OnAustra...@gmail.com on 30 Nov 2010 at 5:46

GoogleCodeExporter commented 9 years ago
I am using NetBeans IDE 6.9.1 and trying to retrieve contact. find error
Exception in thread "main" java.lang.NoClassDefFoundError: 
com/google/common/collect/Maps
        at com.google.gdata.wireformats.AltRegistry.<init>(AltRegistry.java:118)
        at com.google.gdata.wireformats.AltRegistry.<init>(AltRegistry.java:100)
        at com.google.gdata.client.Service.<clinit>(Service.java:555)
        at javaapplication16.Contact.main(Contact.java:151)
Caused by: java.lang.ClassNotFoundException: com.google.common.collect.Maps
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        ... 4 more 

Original comment by soniajai...@gmail.com on 27 Apr 2011 at 10:56

GoogleCodeExporter commented 9 years ago
Hi here also same problem.I need to add event to google(user mention account) 
calendar,but here i got exception i.e class not found gdata.data.TextConstruct 
from Base class.

Please help me how to resolve it.

I Used code is 

URL postURL = new 
URL("http://www.google.com/calendar/feeds/root@gmail.com/private/full");
CalendarEventEntry myEvent = new CalendarEventEntry();

//Set the title and description
myEvent.setTitle(new PlainTextConstruct("Pi Day Party"));
myEvent.setContent(new PlainTextConstruct("I am throwing a Pi Day Party!"));

//Create DateTime events and create a When object to hold them, then add
//the When event to the event
DateTime startTime = DateTime.parseDateTime("2007-03-14T15:00:00-08:00");
DateTime endTime = DateTime.parseDateTime("2007-03-14T17:00:00-08:00");
When eventTimes = new When();
eventTimes.setStartTime(startTime);
eventTimes.setEndTime(endTime);
myEvent.addTime(eventTimes);

// POST the request and receive the response:
CalendarEventEntry insertedEntry = myService.insert(postURL, myEvent);

This Exception I got..

java.lang.ClassNotFoundException: com.google.gdata.data.TextConstruct from 
BaseClassLoader

at 
org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.
java:993)
at 
org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.
java:939)
at 
org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl
.java:873)
at 
org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkCompl
ete(MainDeployerAdapter.java:128)
at 
org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:3
69)
at 
org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:25
5)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(
ScheduledThreadPoolExecutor.java:98)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic
(ScheduledThreadPoolExecutor.java:180)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Schedul
edThreadPoolExecutor.java:204)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:8
86)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

Thanks.....

Original comment by siri.tal...@gmail.com on 6 Apr 2012 at 10:50