简体   繁体   中英

Coldfusion is not finding Java classes

Currently I am trying to deploy my coldfusion application from my test server to a production server. The application works fine on the test server, but Coldfusion cannot seem to find my java classes on the production server.

Looking at my coldfusion settings on the test server, I added a java classpath entry so that Coldfusion would (and does) find my java compiled classes used in my judging application:

D:\inetpub\wwwroot\extensionInterviewJudging\javaLib\build

On the production server, this path is set to:

D:\classes

I copy/paste my java compiled classes from the test server to the production server into the above folder and in the same folder structure as in the test server, but my application still isn't finding the java classes.

Are there Coldfusion server settings that I might be forgetting to copy from my test server to production? Why else would java classes be working on a test server but not on a separate installation on a production server?

Thanks in advance for any help!

Have you restarted your CF services since changing the path on the production server to D:\classes? If not, I believe you have to restart them in order for this setting to take effect.

In addition to making sure you restart the CF server, here are a couple of other things to check:

1) Does the ColdFusion App server have the right filesystem permissions to read your Java files?

2) Did you package your Java classes in a jar file? I've sometimes had difficulty getting CF to pick up on bare.class files since ColdFusion is expecting everything on that path to be jar file or a folder containing class files. It's really easy to generate a Jar file from Eclipse or with Ant.

Finally, I highly recommend looking at JavaLoader from RIAForge[1]. It lets you manage Java class loading for your ColdFusion application without restarting the app server. It also will let you compile Java files dynamically on the server. It's well worth the day or so to get used to working with it.

[1] http://javaloader.riaforge.org/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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