Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / September 2007



Tip: Looking for answers? Try searching our database.

Java Class problem after replacing with new Class

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
CF_Yoda_MX - 06 Sep 2007 10:03 GMT
Hi,

I made a java class on an ColdFusion 7.02 server (linux red hat 3.2)
At first it worked perfectly.
Then I made a new version with some extra methods, replaced it, restarted the
service and clearing the cache. But still it doesn't find any of the new
methods, but it does find the old ones. What can I do?
GArlington - 06 Sep 2007 10:49 GMT
> Hi,
>
[quoted text clipped - 3 lines]
> service and clearing the cache. But still it doesn't find any of the new
> methods, but it does find the old ones. What can I do?

If you want to make sure that your new class gets loaded you better
restart your application (at least) or maybe even CF server (process,
not necessarily the machine).
Grizzly9279 - 06 Sep 2007 12:02 GMT
Is this a multie-server installation?  If so, have you tried re-starting all
JRun instances?  When all else fails, trying rebooting perhaps?  Also, you
might want to look into the "Save Class Files" setting in the CFadmin (under
caching) - not sure if its relevent to your situation or not.  In fact, you
might want to "play" with all of the cache settings.

Eventually you will narrow down the configuration setting that is causing
these headaches.
CF_Yoda_MX - 06 Sep 2007 13:40 GMT
All else did fail. They're going to reboor later this day. Tomorrow I will see if it worked.
CF_Yoda_MX - 06 Sep 2007 13:40 GMT
All else did fail. They're going to reboot later this day. Tomorrow I will see if it worked.
GArlington - 06 Sep 2007 13:58 GMT
> Hi,
>
[quoted text clipped - 3 lines]
> service and clearing the cache. But still it doesn't find any of the new
> methods, but it does find the old ones. What can I do?

1) Restart the application, objects are often cached on application or
session level.
2) Restart the CF server (process, not the machine)
CF_Yoda_MX - 07 Sep 2007 07:35 GMT
Even rebooting did not help.
What can be wrong?
GArlington - 07 Sep 2007 09:54 GMT
> Even rebooting did not help.
> What can be wrong?

If even rebooting did not help, then the only option is - you did not
save it in correct place.
Check and re-check that you saved the source and compiled the class to
correct destination. If the correct source and correct class are in
place it will work, I am talking about the source AND class because if
you saved the source in the wrong place you may be re-compiling old
source to generate new class, and equally you may be re-compiling new
source to generate new class in wrong location... Check both... De-
compile the class from correct location or use reflection to check
what it is.
Grizzly9279 - 07 Sep 2007 12:35 GMT
Is there any way you can verify the version of the .class file on the server?  Perhaps human error?

How are you accessing and using the class?  Care to post some code snippets?
PaulH **AdobeCommunityExpert** - 07 Sep 2007 13:15 GMT
>  Then I made a new version with some extra methods, replaced it, restarted the
> service and clearing the cache. But still it doesn't find any of the new
> methods, but it does find the old ones. What can I do?

don't know how linux handle things but under windows you'd have to stop the cf
server service in order to replace a jar/class like that. might this have
happened? are you sure you were able to physically replace the old class file?
CF_Yoda_MX - 10 Sep 2007 08:45 GMT
I solved the problem by making a complete new Class and calling that one with cfobject.
GArlington - 10 Sep 2007 13:20 GMT
> I solved the problem by making a complete new Class and calling that one with cfobject.

So, now you have two copies of the same object. Very useful for
further maintenance... And it did not solve the original problem...
Let us know when you forget why you did that in the first place and
start asking questions why your same object behaves differently in
different contents.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.