nourelhoudabenahmed / facebook-java-api

Automatically exported from code.google.com/p/facebook-java-api
0 stars 0 forks source link

javax.xml.bind.UnmarshalException Premature end of file with vs 3.0.2 #310

Open GoogleCodeExporter opened 8 years ago

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

String sessionIdStr =
request.getParameter(FacebookParam.SESSION_KEY.toString());

FacebookJaxbRestClient client = new FacebookJaxbRestClient(API_KEY,
SECRET_KEY, sessionIdStr);

long userId = client.users_getLoggedInUser();

out.println("<p>userId : " + userId + "</p>");

Collection<Long> eventIds = new ArrayList<Long> () ;
client.events_get(userId, eventIds, startTime, endTime);

What is the expected output? 

No Exception.

What do you see instead?

java.lang.RuntimeException: javax.xml.bind.UnmarshalException
 - with linked exception:
[org.xml.sax.SAXParseException: Premature end of file.]
    com.google.code.facebookapi.BasicClientHelper.runtimeException(BasicClientHelper.java:123)
    com.google.code.facebookapi.FacebookJaxbRestClientBase.getResponsePOJO(FacebookJaxbRestClientBase.java:151)
    com.google.code.facebookapi.FacebookJaxbRestClientBase.parseCallResult(FacebookJaxbRestClientBase.java:173)
    com.google.code.facebookapi.FacebookJaxbRestClient.events_get(FacebookJaxbRestClient.java:54)
    com.excession.main.HelloWorld.doGet(HelloWorld.java:86)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    com.excession.main.HelloFacebookFilter.doFilter(HelloFacebookFilter.java:105)

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

3.0.2, on Snow Leopard. Using Java 1.5

Please provide any additional information below.

<dependency>
   <groupId>com.google.code.facebookapi</groupId>
   <artifactId>facebook-java-api</artifactId>
   <version>3.0.2</version>
</dependency>
<dependency>
   <groupId>com.google.code.facebookapi</groupId>
   <artifactId>facebook-java-api-schema</artifactId>
   <version>3.0.2</version>
</dependency>
<dependency>
   <groupId>com.sun.xml.bind</groupId>
   <artifactId>jaxb-impl</artifactId>
   <version>2.1.9</version>
</dependency>

Original issue reported on code.google.com by j.cimb.b...@gmail.com on 7 Apr 2010 at 7:57