last day (14 days later) » 

9:00 AM
tell bro
 
hi
I am getting this error
HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet.init() for servlet Modoc threw exception
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
@Vicky any ideas>
 
sec lemme see
 
@Vicky ok
 
@JqueryLearner have you mapped everything properly
your paths?
 
@Vicky where exactly mapping will be done?
 
9:08 AM
your autowire annotation
 
@Vicky
where do I map?
 
mapping of packages in
In spring servlet .xml :
 
actually the project is almost completed and I am doing a small part
 
check whether that is done properly
 
so just doing by looking other examples
I have three xml files namely applicationcontext.xml,applicationcontext-security.xml and springmvc-config.xml
@Vicky out of these 3 which one
 
9:10 AM
check in 3rd one
and application context
check this out
8
Q: Injection of autowired dependencies failed;

achref05I am developing a small Java EE Hibernate Spring application and an error appeared: Error creating bean with name 'articleControleur': Injection of autowired dependencies failed; oct. 26, 2011 3:51:44 PM org.apache.catalina.core.ApplicationContext log Grave: StandardWrapper.Throwable org.springf...

 
this is sringmvc-config.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:security="http://www.springframework.org/schema/security"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
 
show me the application context
 
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:security="http://www.springframework.org/schema/security"
xmlns:mongo="http://www.springframework.org/schema/data/mongo"
@Vicky applicationcontext.xml
 
2 min
let me check it out
 
9:15 AM
newPatientController which package u created this ?
@JqueryLearner
 
its NewPatientController
not newPatientController
@Vicky
 
@JqueryLearner which package is this file in?
 
@Vicky package com.iconma.modoc.controllers;
 
was that a previously created package or u created it?
 
it created previously
 
9:24 AM
@JqueryLearner gimme lil time will check n tell
 
@Vicky sure
 
@JqueryLearner post me the controller coding
 
ok
@Vicky package com.iconma.modoc.controllers;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
@Vicky
@Vicky any ideas?
 
9:45 AM
<context:component-scan base-package="" />
in spring mvc config
have you added the package properly
pls chk that and tell
 
this <context:component-scan base-package="com.iconma.modoc" use-default-filters="false">
<context:include-filter expression="org.springframework.stereotype.Controller" type="annotation"/>
</context:component-scan>
@Vicky
 
is the files that you auto wire in those packages
cuz i think the problem is cuz spring when it scans its skippin it
 
@JqueryLearner some how i will crack it by today bro .... gimme some time ...... will finish ma work asap and get back ...
this room will be there right
 
@Vicky ok
yes
sure
 
9:54 AM
so that i can come and check later
 
ok done i am not sleeping without finding ur problem
 
No prblems
Thanks
@Vicky 1 small doubt
my controller class is NewPatientController
WHY HERE org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'newPatientController': Injection of autowired dependencies failed;
its showing newPatientController
@Vicky
 
10:43 AM
hi
 
@igniter can you guess what might the mistake?
 
@JqueryLearner what problem you are facing?
 
scroll to the top please
I have posted the error
@igniter
 
@JqueryLearner This one??
@JqueryLearner when did you recieved this error?
 
@igniter yes
when running the server
@igniter any sols?
 
10:50 AM
@Vicky : Hi vicky
 
@JqueryLearner remove use-default-filters="false" from component-scan
 
@igniter same problem
@igniter
my controller class is NewPatientController
WHY HERE org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'newPatientController': Injection of autowired dependencies failed;
its showing newPatientController
@igniter
 
11:14 AM
@JqueryLearner show me your newPatientController
 
dear its NewPatientController
not newPatientController
 
@JqueryLearner are you creating interface and its implementation?
 
yes
@igniter
 
@JqueryLearner Autowire interface not its implementation
if your interface is X and XImpl is your implementation
do this
private X obj;
@Autowire
@JqueryLearner is it working?
 
11:30 AM
@igniter see in my case
public class NewPatientServiceImpl implements PatientServiceInterface{
now in NewpatientController class I am doing
@Controller
public class NewPatientController {
@Autowired
NewPatientServiceImpl patientServiceImpl;
@igniter
 
ASR
11:43 AM
@vikky hi
 
@JqueryLearner Can you show me complete code of implementation and Interface with imports???
 
ok
package com.iconma.modoc.controllers;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
package com.iconma.modoc.service.implementations;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.StringTokenizer;
import java.util.TreeMap;

import net.sf.json.JSONObject;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.encoding.MessageDigestPasswordEncoder;
package com.iconma.modoc.service.interfaces;

import java.util.ArrayList;
import java.util.LinkedHashMap;

import org.springframework.web.multipart.MultipartFile;

import com.iconma.modoc.entity.Groupp;

public interface PatientServiceInterface {
public ArrayList<LinkedHashMap<String,Object>> getPatientList(String docid,String start);
public ArrayList<LinkedHashMap<String, Object>> getmPatientList(String docid);
public String chengeAppointment(String id,String starttime);
public String chengeConfirm(String id,String result);
@igniter
 
12:09 PM
@igniter are you there?
 
 
2 hours later…
1:52 PM
@Vicky you are so busy
 

last day (14 days later) »