Java Interop in Beta 3: TIBCO HAWK library import call order apparently impacting constructor call


#1

Hi everyone,

I managed to get two different behaviours for calling a constructor when I imported two prerequisite libraries in different order:

kewoo@AUD31304KZ C:\u\kotlin-compiler-1.0.0-beta-3594\kotlinc\bin
$ java -Xmx256M -Xms32M -noverify  -cp ..\lib\kotlin-preloader.jar org.jetbrains.kotlin.preloading.Preloader -cp ..\lib\kotlin-compiler.jar org.jetbrains.kotlin.cli.jvm.K2JVMCompiler -cp ..\lib\kotlin-reflect.jar;%HL%\console.jar;%HL%\talon.jar;%RVL%\tibrvj.jar;%HL%\util.jar;%EL%\tibjms.jar;%EL%\jms.jar;%EL%\tibrvjms.jar
Welcome to Kotlin version 1.0.0-beta-3594 (JRE 1.7.0_07-b10)
Type :help for help, :quit for quit
>>> import COM.TIBCO.hawk.console.hawkeye.TIBHawkConsole
>>> import COM.TIBCO.hawk.console.hawkeye.AgentManager
>>> var _console = TIBHawkConsole("QSLTIBPR", "tcp://clsemsapppr01:9220", "admin", "__redacted__", 1)
>>> :quit

kewoo@AUD31304KZ C:\u\kotlin-compiler-1.0.0-beta-3594\kotlinc\bin
$ java -Xmx256M -Xms32M -noverify  -cp ..\lib\kotlin-preloader.jar org.jetbrains.kotlin.preloading.Preloader -cp ..\lib\kotlin-compiler.jar org.jetbrains.kotlin.cli.jvm.K2JVMCompiler -cp ..\lib\kotlin-reflect.jar;%HL%\console.jar;%HL%\talon.jar;%RVL%\tibrvj.jar;%HL%\util.jar;%EL%\tibjms.jar;%EL%\jms.jar;%EL%\tibrvjms.jar
Welcome to Kotlin version 1.0.0-beta-3594 (JRE 1.7.0_07-b10)
Type :help for help, :quit for quit
>>> import COM.TIBCO.hawk.console.hawkeye.AgentManager
>>> import COM.TIBCO.hawk.console.hawkeye.TIBHawkConsole
>>> var _console = TIBHawkConsole("QSLTIBPR", "tcp://clsemsapppr01:9220", "admin", "__redacted__", 1)
error: unresolved reference: TIBHawkConsole
var _console = TIBHawkConsole("QSLTIBPR", "tcp://clsemsapppr01:9220", "admin", "__redacted__", 1)
           ^

>>>

Have I missed some other elementary thing in the above two examples? It appears that importing the COM.TIBCO.hawk.console.hawkeye.AgentManager and COM.TIBCO.hawk.console.hawkeye.TIBHawkConsole in differing orders has an influence on whether I can call the TIBHawkConsole constructor. Any light shed is appreciated.

For what it’s worth, I can workaround this by fully qualifying the TIBHawkConsole constructor call as follows:

kewoo@AUD31304KZ C:\u\kotlin-compiler-1.0.0-beta-3594\kotlinc\bin
$ java -Xmx256M -Xms32M -noverify  -cp ..\lib\kotlin-preloader.jar org.jetbrains.kotlin.preloading.Preloader -cp ..\lib\kotlin-compiler.jar org.jetbrains.kotlin.cli.jvm.K2JVMCompiler -cp ..\lib\kotlin-reflect.jar;%HL%\console.jar;%HL%\talon.jar;%RVL%\tibrvj.jar;%HL%\util.jar;%EL%\tibjms.jar;%EL%\jms.jar;%EL%\tibrvjms.jar
Welcome to Kotlin version 1.0.0-beta-3594 (JRE 1.7.0_07-b10)
Type :help for help, :quit for quit
>>> import COM.TIBCO.hawk.console.hawkeye.AgentManager
>>> import COM.TIBCO.hawk.console.hawkeye.TIBHawkConsole
>>> var _console = COM.TIBCO.hawk.console.hawkeye.TIBHawkConsole("QSLTIBPR", "tcp://clsemsapppr01:9220", "admin", "At1@nT1c", 1)
>>>

Regards,

Kevin


#2

Hi,

I revisited this incident with Kotlin 1.1 and can no longer replicate the symptoms. Consider this resolved by upgrading to Kotlin 1.1.

Regards,

Kevin