简体   繁体   English

在Lucee上安装Cassandra Java驱动程序

[英]Installing Cassandra Java Driver on Lucee

I'm not very seasoned on Java, but I'm trying to setup Cassandra as Datasource in Lucee using "Other OBDC," And I'm hitting some road blocks. 我不太熟悉Java,但是我尝试使用“其他OBDC”将Cassandra设置为Lucee中的数据源,而且遇到了一些障碍。 I believe I need to install this - https://github.com/datastax/java-driver on my server, but I'm assuming this has to be compiled as a Jar, which I have no idea how to do. 我相信我需要在我的服务器上安装它-https://github.com/datastax/java-driver ,但是我假设必须将其编译为Jar,我不知道该怎么做。 And then saved into the /opt/lucee/lib folder, which I do know how to do. 然后保存到/ opt / lucee / lib文件夹中,我确实知道该怎么做。

Also, I already tried the method explained in this post - Using Apache Cassandra In Coldfusion , but I think the jars are older, and don't seem to work with what I'm trying to do. 另外,我已经尝试过本文中介绍的方法- 在Coldfusion中使用Apache Cassandra ,但我认为这些罐子较旧,似乎与我想做的不兼容。

Any suggestions? 有什么建议么?

Thanks. 谢谢。

I downloaded the binary tarball from http://www.datastax.com/download-drivers and installed the jar files and dependencies (found in /lib ) in the Lucee web-context ( WEB-INF\\lucee\\lib ) and restarted Lucee. 我从http://www.datastax.com/download-drivers下载了二进制压缩文件,并在Lucee Web上下文WEB-INF\\lucee\\lib )中安装了jar文件和依赖项(位于/lib ),然后重新启动了Lucee。 。

<cfset ClusterInit = CreateObject("java", "com.datastax.driver.core.Cluster">
<!--- lists the methods in the Cluster class --->
<cfdump var="#ClusterInit#" abort="true">

This did not work when I put the jar files in the server folder ( lucee\\lib ) so maybe you want to try that. 当我将jar文件放在服务器文件夹( lucee\\lib )中时,此方法lucee\\lib因此您可能想尝试一下。

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM