Back Forum Reply New

pb with beans declaration (newbi)

mons.logging.Log;
import org.apache.commons.logging.LogFactory;

import artists.Product;
import artists.ProductManager;public class SpringappController implements Controller {   /** Logger for this class and subclasses */   private ProductManager prodMa;      protected final Log logger = LogFactory.getLog(getClass());   public ModelAndView handleRequest(fromServletRequest request, fromServletResponse response){
try {
String now = (new java.util.Date()).toString();
logger.info(quot;returning hello view with quot; + now);
       Map myModel = new HashMap();       myModel.put(quot;nowquot;, now);       myModel.put(quot;productsquot;, getProductManager().getProducts());
       return new ModelAndView(quot;mainquot;, quot;modelquot;, myModel);}       catch (ServletException e){}       catch (IOException e) {}   }
   public void setProductManager(ProductManager pm) {       prodMa = pm;   }
   public ProductManager getProductManager() {       return prodMa;   }
}
[CODE]

artistManagerCode:
package artists;
import java.io.Serializable;
import java.util.List;
public class ArtistManager implements Serializable {   private List artists;   public void setArtists(List a) {       artists = a;   }   public List getArtists() {        return artists;   }
}
and artistsCode:
package artists;
import java.io.Serializable;
public class Artists implements Serializable {   private String name   private String genre   private String description   }      public void setName(String n) {       name = n;   }   public String getName() {       return name;         }       public void setGenre(String g) {       genre = g;   }   public Double getGenre() {       return genre;   }      public void setDescription(String d) {       description = d;   }   public String getDescription() {       return description;      
}

It's maybe quite nothing but I spend hours on it, I really apreciate I somebody can Help. thanks Bye

As the exception states; you are trying to call quot;setNomquot; on the Artist class, but there is no such setter

Thak you very much I was focusing on something else


Originally Posted by DadoooThak you very much I was focusing on something else

No worries.

In general, Spring exceptions are very information and tend to explain exactly what the problem is.
¥
Back Forum Reply New