No ClassTag available for T
<pre><code>import org.apache.spark.api.java.JavaRDD
import org.apache.spark.rdd.RDD
import scala.reflect.ClassTag  

class TestRDD[T: ClassTag](rdd: RDD[T]) extends JavaRDD(rdd)
</code></pre>

<p>This statement is accepted from the console. However at compile time the following error is thrown:</p>

<pre><code>No ClassTag available for T
[error] class TestRDD[T: ClassTag](rdd: RDD[T]) extends JavaRDD(rdd)
[error]                ^
[error] one error found
[error] (jobs/it:compileIncremental) Compilation failed
</code></pre>