Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with Java objects #401

Open
jlmills opened this issue Nov 13, 2020 · 0 comments
Open

Issues with Java objects #401

jlmills opened this issue Nov 13, 2020 · 0 comments

Comments

@jlmills
Copy link

jlmills commented Nov 13, 2020

On a shared CF hosting plan access to Java objects was not on by default. I got the error:

Element _TAFFY.SETTINGS.EXCEPTIONLOGADAPTER is undefined in APPLICATION.

In the ORIGINAL EXCEPTION part of the error dump:

access denied ("java.lang.RuntimePermission" "createClassLoader" ...

Taffy was trying to use a few Java objects, java.lang.String and java.lang.StringBuffer, and java.net.InetAddress. Once the hosting company granted the permissions everything worked fine.

The question is why was Java being used and therefore making installation more difficult in some environments.

cfreturn createObject( "java", "java.net.InetAddress" ).getLocalHost().getHostName() /> seems completely unnecessary. You can get anything you need from CGI.LOCAL_ADDR and such.

<cfset var s = createObject("java", "java.lang.StringBuffer").init("") /> is doing some string processing that CF can probably do just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant