This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Glassfish and the fly likes classNotFound Exception on glassfish server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Products » Glassfish
Bookmark "classNotFound Exception on glassfish server" Watch "classNotFound Exception on glassfish server" New topic

classNotFound Exception on glassfish server

Kabita Sahoo

Joined: Oct 04, 2010
Posts: 3
I have created a simple java class and my server is glassfish server 4.0. I am getting Classnotfound exception on server start.
I am using java jdk1.7.0_60. My classpath is set to C:\Program Files (x86)\Java\jdk1.7.0_60\bin and also my JAVA_HOME set to C:\Program Files (x86)\Java\jdk1.7.0_60\bin.

Here is my java code

K. Tsang

Joined: Sep 13, 2007
Posts: 2985

How are you packaging the war file? Is the ProductCatalog class under the folder "java/kabita"?

Is your productCategories() method the method to call in the web service? If so add the @WebMethod annotation for it. For web methods, the operationName attribute should be present.

Similarly for @WebService annotation there is a serviceName attribute.

Let say I have a Hello web service:

K. Tsang JavaRanch SCJP5 SCJD OCPJP7 OCPWCD5 OCPBCD5 OCPWSD5 OCMJEA5 part 1 part 2/3
Kabita Sahoo

Joined: Oct 04, 2010
Posts: 3
Yes, my ProductCatalog class is under the folder"java/kabita". I am learning webservices, and this is my first webservice class:-). I change my code as per your suggestion but still have the same error.
Have you checked out Aspose?
subject: classNotFound Exception on glassfish server
It's not a secret anymore!