[ 
https://issues.apache.org/jira/browse/SPARK-8340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14584616#comment-14584616
 ] 

Shivaram Venkataraman commented on SPARK-8340:
----------------------------------------------

It looks like there must have been an earlier error in creating the 
SparkContext or SQLContext. Could you check the error logs to see if you see a 
stack trace before that ? 

Also are you launching this as `./bin/sparkR` or are you trying to include the 
package in RStudio ? If you want to use it from RStudio, the instructions at 
https://github.com/apache/spark/tree/master/R#using-sparkr-from-rstudio might 
be helpful

> Error creating sparkR dataframe: Error in writeJobj(ocn, object): invalid 
> jobj 2
> --------------------------------------------------------------------------------
>
>                 Key: SPARK-8340
>                 URL: https://issues.apache.org/jira/browse/SPARK-8340
>             Project: Spark
>          Issue Type: Bug
>          Components: SparkR
>    Affects Versions: 1.4.0
>         Environment: Windows 8.1, RRO R 3.2.0
>            Reporter: nevi_me
>
> I tried executing the following code:
> {code:title="extract from dataframe.R in examples"}
>   library(SparkR)
>   sc <- sparkR.init(appName="SparkR-DataFrame-example")
>   sqlContext <- sparkRSQL.init(sc)
>   localDF <- data.frame(name=c("John", "Smith", "Sarah"), age=c(19, 23, 18))
>   df <- createDataFrame(sqlContext, localDF)
> {code}
> I get the error:
> {code:title="error"}
>   Error in writeJobj(con, object) : invalid jobj 2
> {code}
> I also tried creating dataframes out of existing data.frames in my project, 
> but I get the same error.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to