Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
shahzad #1
calling java object from cf
Hi there, I am trying to call a java object from cf script but its not
working. I know the class should be in web_root/WEB-INF/classes folder and i've
my class in C:\Program Files\Apache Group\Apache2\htdocs\WEB-INF\classes
folder. where C:\Program Files\Apache Group\Apache2\htdocs\ is the web-root.
thats wut web-root means in this case, doesnt it? so ya, i get the error
'Object Instantiation Exception. Class not found: extractor' I tried putting
this class in another folder and put that path in the classpath in the
administrator and that worked fine, but the problem with this method is that, i
would've to restart the cf server everytime i compile my java file. any
suggestions? thank you
shahzad Guest
-
PLJava - Perl embeded into Java (calling Perl from Java) - 1sr release - call for tests and review, please.
Recently on perlmonks.com I have posted a prototype of Perl embeded into Java (#372197="Embeding Perl into Java to use CPAN modules directly from... -
Calling JAVA service from .NET
Hi, I have a question, somebody with exposure please answer. I need to call a JAVA webservice from C# (VS.6 & SOAP tool kit or VS.net). The Java... -
Calling a Java Web Service From C#
Our client has a web service that we need to call to return us information about their customers. We pass in state and customer account number and... -
[newbie]Calling .net from Java
Hello, i'm using Axis for accessing a c# webservice and all works fine. Now i must use a much smaller library for accessing the ws from an applet... -
calling a Java class from ASP
I program java and asp, but my question is why do you want to call a java class from an ASP file and not just display it in an applet. Also can you... -
shahzad #2
Re: calling java object from cf
wow, doesn't anybody know anything about this either?
shahzad Guest
-
Adam Cameron #3
Re: calling java object from cf
> thats wut web-root means in this case, doesnt it? so ya, i get the error
And is that directory in the classpath?> 'Object Instantiation Exception. Class not found:
I'm not quite sure what you mean, here.> administrator and that worked fine, but the problem with this method is that, i
> would've to restart the cf server everytime i compile my java file.
But you can tell CF to reload class files every time, instead of caching
them in RAM. in your jrun-web.xml file, change the <reload /> node to be
true.
--
Adam
Adam Cameron Guest
-
shahzad #4
Re: calling java object from cf
Hi thanks for the direct Sarge, that worked fine :) I don't have <reload />
tag in jrun-web.xml file Adam. Would you mind telling me how i can put that tag
in the file? i really don't want to restart the cf server every single time I
do a new compile of my Java code. I don't know any XML. thank you very much
for your help guys
shahzad Guest
-
Adam Cameron #5
Re: calling java object from cf
Sarge:
Any idea why your posting never made it onto the NNTP feed? I got everything
else in the thread, just not your one. Odd.
Has anyone at Macromedia confessed to be responible for administration of
these forums yet?
Adam
Adam Cameron Guest
-
Adam Cameron #6
Re: calling java object from cf
> tag in jrun-web.xml file Adam. Would you mind telling me how i can put that tag
This is my jrun-web.xml file. Theonly change I have made from the one that> in the file? i really don't want to restart the cf server every single time I
> do a new compile of my Java code. I don't know any XML. thank you very much
> for your help guys
installs by default is uncommenting the <reload /> and <compile /> nodes.
Yours will be similar, I should have thought...
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE jrun-web-app PUBLIC "-//Macromedia, Inc.//DTD jrun-web 1.0//EN"
"http://www.macromedia.com/dtd/jrun-web.dtd">
<!-- ================================================== =========== -->
<!-- This XML file contains web application elements that are -->
<!-- specific to the JRun Application Server -->
<!-- ================================================== =========== -->
<jrun-web-app>
<!-- This setting is used in JRun SP to get CF to work correctly. -->
<!-- Without this line, CF on JRun SP1 doesn't work -->
<!-- If the server doesn't have the SP installed, JRun just ignores -->
<!-- this line -->
<enable-jrun-web-services>false</enable-jrun-web-services>
<!-- session persistence needs to be disabled due to our classloader
setup -->
<session-config>
<persistence-config>
<active>false</active>
</persistence-config>
</session-config>
<reload>TRUE</reload>
<compile>TRUE</compile>
<!--
<virtual-mapping>
<resource-path>/cfsuite</resource-path>
<system-path>q:/coretests</system-path>
</virtual-mapping>
-->
</jrun-web-app>
--
Adam
Adam Cameron Guest
-
shahzad #7
Re: calling java object from cf
nope, that didn't seem to do anything, I still had to restart cfserver to see
the new change. Following is my jrun-web.xml file
--------------------------------------------------------------------------------
---------------------------------------------- <?xml version='1.0'
encoding='ISO-8859-1'?> <!DOCTYPE jrun-web-app PUBLIC '-//Macromedia, Inc.//DTD
jrun-web 1.0//EN' 'http://www.macromedia.com/dtd/jrun-web.dtd'> <!--
================================================== =========== --> <!-- This XML
file contains web application elements that are --> <!-- specific to the
JRun Application Server --> <!--
================================================== =========== -->
<jrun-web-app> <!-- This setting is used in JRun SP to get CF to work
correctly. --> <!-- Without this line, CF on JRun SP1 doesn't work -->
<!-- If the server doesn't have the SP installed, JRun just ignores -->
<!-- this line -->
<enable-jrun-web-services>false</enable-jrun-web-services> <!--
================================================== ========= --> <!-- Virtual
path mappings allow a resource path to be mapped --> <!-- to a different
physical location (i.e. not necessarily --> <!-- within the web
application root). A resource-path can --> <!-- end with a wild card
'*' indicating that all resources --> <!-- paths that start with the
given path will be resolved using --> <!-- the system path.
--> <!--
================================================== ========= -->
<virtual-mapping> <resource-path>/WEB-INF</resource-path>
<system-path>C:/CFusionMX7/wwwroot/WEB-INF</system-path> </virtual-mapping>
<!-- session persistence needs to be disabled due to our classloader setup
--> <session-config> <persistence-config> <active>false</active>
</persistence-config> </session-config> <reload>TRUE</reload>
<compile>TRUE</compile> </jrun-web-app>
-------------------------------------------------------- thanks
shahzad Guest
-
bobo111 #8
Re: calling java object from cf
***BUMP***
I am having this exact same issue, both in Windows with CF 7.0 and Unix with CF 6.1.
Anyone have any more feedback on this issue?
bobo111 Guest



Reply With Quote

