You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by VJ <vj...@sankia.com> on 2015/10/07 18:02:09 UTC

DataFrame with bean class

I have a bean class defined as follows:

class result {
private String name;

public result() { };

public String getname () {return name;}
public void setname (String s) {name = s;)
}

I then define 
DataFrame x = SqlContext.createDataFrame(myrdd, result.class);
x.show()

When I run this job, I am getting the exception: illegalAccessException,
class sqlContex....apply cannot access a member or result with modifier
public. 

I have defined the bean class in the same package as where I am accessing
from. But this is in a different file. 
Any thoughts? I guess, it is an issue with java reflection?? any approach to
solve this?

VJ






--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/DataFrame-with-bean-class-tp24970.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org