The following classes have incomplete hierarchies


#1

When I try to build the Node.kt project, I get this error

 The following classes have incomplete hierarchies:
    node.express.Express.RequestHandler
    node.express.Express.PipelineFactory

general code layout looks like this

class Express() {

  private inner class RequestHandler(): SimpleChannelUpstreamHandler() {…}

  private inner class PipelineFactory(): ChannelPipelineFactory {…}
}


where ChannelPipelineFactory, for example, is just simple java interface.

public interface ChannelPipelineFactory {
    org.jboss.netty.channel.ChannelPipeline getPipeline() throws java.lang.Exception;
}

Question: how I can fix the problem?


#2

I hope https://github.com/jonninja is reading this forum


#3

I've seen that error before. Seems to be related to libraries that aren't exported or available. Are you building with IntelliJ or directly in Maven?


#4

thank you for your prompt reply. yes, sure  in IDEA, and maven have been downloaded all dependences, checked it twice.


#5

I did a clean clone and build, and everything compiled and built fine. Is there anyone else out there willing to give it a try? Just go to:

https://github.com/jonninja/node.kt

Clone the repo, and then go to the root and run ‘maven install’. You could also import the maven project into IntelliJ, and then run the maven or IntelliJ build.

Are you adding the POM to another project? I’ve seen cases where the compiles don’t work properly in that case, but the error message is cryptic. It appears as though some files aren’t properly exported, so you can try to add some of node.kt’s dependencies to your own project file to see if that resolves things.

If anyone else gives this a try, please let me know your findings. Thanks.


#6

I did a clean clone and built the source with Kotlin: Kotlin Compiler version 0.5.691

I encountered several cases where non nullable were expected so I fixed them. After that it compiles fine (with 19 warnings)

Btw, how do you actually run the examples? Is there any specific command line to execute them? A simple “Run” from the IDE returns the following errors

Exception in thread “main” java.lang.ClassNotFoundException: node.kt.examples.HelloWorld.HelloWorldPackage
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:186)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:113)

Process finished with exit code 1