So, I reached out to the JavaLoader mail list and Mark responded with the fix. It appears I've been using the classloader jar file incorrectly for years. As I mentioned before, I've been putting that jar file in a standard CF lib directory for loading. That is not the correct location for the file - I was supposed to have left it in the lib folder it came in, and keep that folder relative to the JavaLoader.cfc and other cfcs that ship with JavaLoader. When I did that, and restarted ColdFusion, I was able to use it successfully with CF 10. It's amazing that it ever worked for me in CF 7-9. I now have to continue to test with the latest version of POI, etc.

Thanks everybody for the help. I don't know when I decided I was supposed to put the jar in the standard CF locations, but it was sometime back in the CF 7 days. Hopefully this keeps somebody from making the same mistake. I will also try to use the new CF 10 method for loading java files and report back if I can make it work as I need.

On 9/23/12 1:11 AM, Charlie Arehart wrote:

Interesting, and bummer. Well, I'll say first that for sure, if you bring the question up on the JL discussion list, Mark or someone is sure to have an answer. They're great about that there. And surely others are considering using JL despite the new feature in CF 10, so others have either hit it and resolved it, or not hit it which means it should just work. :-)

That said, you mentioned in the earlier note about not wanting to use the CF feature because you didn't think it would avoid collisions with CF things. Well, if you've not tried it, you may find it just works. I'll say two thing: it changes the classpath search order so that whatever libraries you point to (in this.javasettings) are first. Second, there's an optional LoadColdFusionClassPath argument which may influence things. I've not been able to find much on it, but I see that JL has a similar feature, so maybe Mark or someone can help you decide if it may be helpful for your challenge.

Let us know what you find.

/charlie

*From:*[email protected] [mailto:[email protected]] *On Behalf Of *Mike Staver
*Sent:* Sunday, September 23, 2012 2:28 AM
*To:* [email protected]
*Subject:* Re: [ACFUG Discuss] CF 10 Dynamic Java Loading

Thanks Charlie and Jason for the info. I did move the classloader jar file to the wwwroot\WEB-INF\lib directory like you suggested. I then stopped, and then started CF. Even after doing so, line 211 of JavaLoader.cfc is throwing this exception:

java.lang.ClassNotFoundException: com.compoundtheory.classloader.NetworkClassLoader at java.net.URLClassLoader

I'm using JavaLoader 1.1, and this worked fine in CF 7, 8, and 9. I have verified that I'm not running CF 10 in sandbox security mode and I do not have the option checked under settings called "Disable access to internal ColdFusion Java components ". So, I'm curious to see how other people managed to get this working. I think I'm going to reach out to Mark Mandel on the JavaLoader mailing list. I found this and Ray Camden mentions the fact he's using the latest from the dev branch:

https://groups.google.com/forum/#!topic/javaloader-dev/8pq54Z0oN7U <https://groups.google.com/forum/#%21topic/javaloader-dev/8pq54Z0oN7U>

I did grab the latest JavaLoader.cfc, and it didn't help. Clearly, I'm doing something wrong - but nothing is jumping out at me yet.

Thanks again for the info.


-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink <http://www.fusionlink.com>
-------------------------------------------------------------




-------------------------------------------------------------
To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------

Reply via email to