• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Bear Bibeault
  • paul wheaton
Saloon Keepers:
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Mikalai Zaikin
  • Piet Souris
Bartenders:

java.util. Missing Resource Exception

 
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am getting the following error.Please let me what is getting wrong and how to resolve this error :

java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key com.citi.dts.dashboard.DshBrdWorker
<Aug 8, 2006 1:55:37 PM GMT+00:00> <Error> <HTTP> <[WebAppServletContext(597366,dtsApp,/dtsApp)] Servlet failed with Exception
java.lang.NoSuchMethodError
at com.citi.dts.dashboard.DshBrdWorker.<init>(Unknown Source)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at com.citi.dts.controller.DTSRequestHandler.doPost(DTSRequestHandler.java:111)
at com.citi.dts.controller.DTSRequestHandler.doGet(DTSRequestHandler.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:288)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:212)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2765)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2433)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:172)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:145)

[ August 08, 2006: Message edited by: Bear Bibeault ]
 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the source code for com.citi.dts.dashboard.DshBrdWorker Mainly the constructors.
 
Jignesh Gohel
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Thanks for the reply Carl,

The constructor is public DshbrdWorker() and there is only one constructor in my class.And i am using only one constructor for all the classes in the dashboard folder that is the no arg constructor.

Can you please tell me why this problem is occuring??

See actually I am getting the class names from a properties file.Like i am using name value pairs for accesing the class names that is ABC1001 = com.citi.dts.dashboard.DshBrdWorker.

And this properties file is in my classes folder of my Web application.

And for other packages in my application it is working fine .For e.g i have com.citi.dts.module1,com.citi.dts.module2,etc.They are working fine and for all the class names residing in these packages are being accessed through the same property file which i a using for getting com.citi.dts.dashboard.

There are classes in the dashboard folder.But the exception is saying MissingResource.

Please tell me why this is happening and how to reslove this??

Jignesh
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm more concerned with the part of the error that says:

Servlet failed with Exception
java.lang.NoSuchMethodError
at com.citi.dts.dashboard.DshBrdWorker.<init>(Unknown Source)

Also, insure you add debug to your build, if you are using ant add the attribute
debug="on" to the javac task, you'll get better stack trace information.

It looks like the class was found and an error is in the code for the constructor.
 
Jignesh Gohel
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
See Carl actually there is a method i am calling from the constructor but i am sure that it is there.Then also i will check that thing.

Also the same code is working in my Office environment(Windows,Weblogic Server).But it is not working on the Production environment(Unix,Weblogic Server).

Any more pinpoints i can check then please tell.If you can let me know each possibilty of this exception and how can i resolve the same then it would be great.

Thanks,
Jignesh
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jignesh Gohel:
See Carl actually there is a method i am calling from the constructor but i am sure that it is there...



Java can't find it, thats why the error.

I would need a meaningful stacktrace (Debug turned on so you don't get the message (Unknown Source)) and at least an exert of the code to be any more help.
 
Jignesh Gohel
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Carl,

The new stack trace with debug on:

<Aug 9, 2006 1:19:33 PM GMT+00:00> <Error> <HTTP> <[WebAppServletContext(7163142,dtsApp,/dtsApp)] Servlet failed with Exception
java.lang.NoSuchMethodError
at com.citi.dts.dashboard.DshBrdBranchUnitWorker.handleRequest(DshBrdBranchUnitWorker.java:52)
at com.citi.dts.controller.DTSRequestHandler.doPost(DTSRequestHandler.java:113)
at com.citi.dts.controller.DTSRequestHandler.doGet(DTSRequestHandler.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:288)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:212)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2765)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2433)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:172)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:145)
>



Some more details :

I have a abstract class(SampleAbstract) in which i have the only single method which is declared as abstract that is:

public abstract String handleRequest(HttpServletRequest request,HttpServletResponse response) throws Exception;

Now every class -- for e.g DshBrdBranchUnitWorker as in above stack trace --- is extending this abstract class and implementing the handleRequest() method.

I have checked the signature in every class.It is same as above that is :

public String handleRequest(HttpServletRequest request,HttpServletResponse) throws Exception
{

}

in the implementation.

The sample code i can provide you is :


In every class it is like this only.ErrorLogger is made by us for logging purpose.ErrorLogger is a class which is in a different package and that package i have imported correctly.
The ErrorLogger.info() ,ErrorLogger.error() etc are the static methods inside that class and are existing.

Can you please tell me where its is going wrong.

The constructor is getting called properly.This i have checked using System.out.println() inside Constructor.


One thing more:

See as i previously said the thing is working in the office environment.
But it is not working in Production environment.

And while working in office i compile the whole project everytime.

Also i am just integrating this newly made module in the Production not the whole project .

As the other module files are working correctly and only the module i have newly made is not working.And the DTSRequestHandler class is the old modules's file which was already there existing previously.I am just using it.

Is there a possibilty that DTSRequestHandler had been compiled in some other java version and this new module i have compiled in:

java version "1.3.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_05)
Java HotSpot(TM) Client VM (build 1.3.0_05, mixed mode)


and hence facing the error.I am guessing this because i read from the documentation that the java.lang.NoSuchMethodError occurs at runtime because the docs says:

Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed.


Thanks,
Jignesh
[ August 09, 2006: Message edited by: Jignesh Gohel ]
 
Get out of my mind! Look! A tiny ad!
Low Tech Laboratory
https://www.kickstarter.com/projects/paulwheaton/low-tech-0
reply
    Bookmark Topic Watch Topic
  • New Topic