You aren't deep enough in the backtrace.

See
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ExceptionInInitializerError.html
.

You have somehow provoked some other exception from your static code, and we
don't know what from this email.


2009/1/28 Bhanu B <[email protected]>

> Hi All
> Could any one tell me about this ERROR
> It has accruing when saving data into DB table
>
> org.apache.cxf.phase.PhaseInterceptorChain doIntercept
> INFO: Application has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault
>        at
>
> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:119)
>        at
>
> org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJAXWSMethodInvoker.java:83)
>        at
>
> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:107)
>        at
> org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:54)
>        at
>
> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:68)
>        at
>
> org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:56)
>        at
>
> org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
>        at
>
> org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:92)
>        at
>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220)
>        at
>
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78)
>        at
>
> org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:92)
>        at
>
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:285)
>        at
>
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:168)
>        at
>
> org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:175)
>        at
>
> org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java:153)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>        at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>        at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>        at
>
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
>        at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>        at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>        at
>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
>        at
>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>        at
>
> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
>        at
>
> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
>        at
>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>        at
>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>        at
>
> org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
>        at
>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>        at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
>        at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>        at
>
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
>        at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
>        at java.lang.Thread.run(Thread.java:613)
> Caused by: java.lang.ExceptionInInitializerError
>        at
>
> com.company.auth.service.AuthServiceImpl.updateEmployee(AuthServiceImpl.java:33)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:585)
>        at
>
> org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:136)
>        at
>
> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:82)
>        ... 32 more
>
>
>
> Regards,
> B....
>
> 2009/1/28 Bhanu B <[email protected]>
>
> > Hi
> > Please find my source code here and let me know what is the wrong ,i
> think
> > something has wrong here
> >
> > Employee.java
> >
> > package com.company.auth.bean;
> >
> > import java.io.Serializable;
> >
> > public class Employee implements Serializable {
> >
> >     private static final long serialVersionUID = 1L;
> >     private Integer gid;
> >     private String lastname;
> >     private String firstname;
> >     private String privileges;
> >
> >     public Employee() {
> >
> >
> >     }
> >
> >     public Integer getGid() {
> >         return gid;
> >     }
> >     public void setGid(Integer gid) {
> >         this.gid = gid;
> >     }
> >     public String getLastname() {
> >         return lastname;
> >     }
> >     public void setLastname(String lastname) {
> >         this.lastname = lastname;
> >     }
> >     public String getFirstname() {
> >         return firstname;
> >     }
> >     public void setFirstname(String firstname) {
> >         this.firstname = firstname;
> >     }
> >     public String getPrivileges() {
> >         return privileges;
> >     }
> >     public void setPrivileges(String privileges) {
> >         this.privileges = privileges;
> >     }
> >
> > /*    public boolean isUserInRole(String role) {
> >         if(privileges == null) { return false; }
> >         else { return privileges.contains(role); }
> >     } */
> >
> > }
> >
> > -------------------------
> > Employee.hbm.xml
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping
> DTD//EN"
> >         "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd";>
> >
> > <hibernate-mapping auto-import="true" default-lazy="false">
> >
> > <class
> >     name="com.company.auth.bean.Employee"
> >     table="user"
> > >
> >
> >     <id
> >         name="gid"
> >         type="java.lang.String"
> >         column="gid"
> >     >
> >         <generator class="increment" />
> >     </id>
> >
> >     <property
> >         name="firstname"
> >         type="java.lang.String"
> >         column="firstname"
> >         not-null="true"
> >         length="10"
> >     />
> >     <property
> >         name="lastname"
> >         type="java.lang.String"
> >         column="lastname"
> >         not-null="true"
> >         length="10"
> >     />
> >
> >
> >     <property
> >         name="privileges"
> >         type="java.lang.String"
> >         column="privileges"
> >         not-null="false"
> >         length="20"
> >     />
> >
> >
> > </class>
> > </hibernate-mapping>
> >
> >
> > ---------------------------------------
> >
> > EmployeeDAO.java
> >
> > package com.company.auth.dao;
> >
> > import org.apache.cxf.service.invoker.SessionFactory;
> > import org.springframework.dao.DataAccessException;
> > import org.springframework.jdbc.core.JdbcTemplate;
> > //import org.springframework.orm.hibernate.HibernateTemplate;
> > import org.springframework.orm.hibernate3.HibernateTemplate;
> > import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
> >
> > import
> org.springframework.context.support.ClassPathXmlApplicationContext;
> > import org.springframework.orm.hibernate3.HibernateCallback;
> > import org.hibernate.*;
> > import org.hibernate.criterion.*;
> >
> > import com.company.auth.dao.HibernateFactory;
> > import com.company.auth.bean.Employee;
> > public class EmployeeDAO extends HibernateFactory{
> >
> >
> >     public void updateUser(com.company.auth.bean.Employee obj) throws
> > DataAccessException{
> >         getHibernateTemplate().saveOrUpdate(obj);
> >     }
> >
> >     public String updateEmployee(String firstname,String lastname,String
> > privileges) {
> >
> >     Employee employee = new Employee();
> >
> >         employee.setFirstname(firstname);
> >         employee.setLastname(lastname);
> >         employee.setPrivileges(privileges);
> >         System.out.println("Employe Table has been updated ------------"+
> > employee);
> >         System.out.println("FirstName------------"+
> > employee.getFirstname());
> >         System.out.println("LastName------------"+
> employee.getLastname());
> >         System.out.println("privileges------------"+
> > employee.getPrivileges());
> >         //getHibernateTemplate().saveOrUpdate(employee);//save(employee);
> >         EmployeeDAO dao = new EmployeeDAO() ;
> >         dao.updateUser(employee);
> >
> >         //return template.saveOrUpdate(employee);
> >         return employee.toString();
> >     }
> >
> >
> >
> > }
> >
> > ----------------------------------------------------------------
> >
> > AuthService.java
> >
> > package com.company.auth.service;
> >
> > import javax.jws.WebService;
> > import javax.jws.WebParam;
> > import com.company.auth.bean.Employee;
> >
> > @WebService
> > public interface AuthService {
> >     String updateEmployee(@WebParam(name="firstname") String firstname,
> >              @WebParam(name="lastname")String lastname,
> >              @WebParam(name="privileges")String privileges);
> > }
> >
> > ------------------------------------------
> >
> > AuthServiceImpl.java
> >
> > package com.company.auth.service;
> >
> > import javax.jws.WebService;
> >
> > import com.company.auth.bean.Employee;
> > import com.company.auth.dao.EmployeeDAO;
> >
> > @WebService(endpointInterface = "com.company.auth.service.AuthService",
> > serviceName = "corporateAuthService")
> > public class AuthServiceImpl implements AuthService {
> >
> >
> >
> >     public String updateEmployee(String firstname, String lastname,
> >             String privileges) {
> >         // TODO Auto-generated method stub
> >         EmployeeDAO dao = new EmployeeDAO();
> >         com.company.auth.bean.Employee obj = new
> > com.company.auth.bean.Employee();
> >         return dao.updateEmployee(firstname, lastname,
> > privileges).toString();
> >         //return dao.updateUser(obj);
> >
> >     }
> >
> > }
> >
> > ---------------------------------------------------------
> >
> > cxf.xml
> >
> > <beans xmlns="http://www.springframework.org/schema/beans";
> >     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:jaxws="
> > http://cxf.apache.org/jaxws";
> >     xsi:schemaLocation="
> >         http://www.springframework.org/schema/beans
> > http://www.springframework.org/schema/beans/spring-beans.xsd
> >         http://www.springframework.org/schema/beans
> >         http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
> >
> >         http://cxf.apache.org/jaxws
> > http://cxf.apache.org/schemas/jaxws.xsd";>
> >
> >     <import resource="classpath:META-INF/cxf/cxf.xml" />
> >     <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
> >     <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
> >
> >
> >   <bean id="propertyConfigurer"
> >
> >
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
> >         <property name="location">
> >             <value>/WEB-INF/jdbc.properties</value>
> >         </property>
> >     </bean>
> >
> >
> >     <bean id="dataSource"
> >
> > class="org.springframework.jdbc.datasource.DriverManagerDataSource">
> >         <property name="driverClassName">
> >             <value>${jdbc.driverClassName}</value>
> >         </property>
> >         <property name="url">
> >             <value>${jdbc.url}</value>
> >         </property>
> >         <property name="username">
> >             <value>${jdbc.username}</value>
> >         </property>
> >         <property name="password">
> >             <value>${jdbc.password}</value>
> >         </property>
> >
> >     </bean>
> >
> >
> >     <!-- JNDI DataSource for J2EE environments -->
> >
> >     <!-- Hibernate SessionFactory -->
> >     <bean id="sessionFactory"
> > class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
> >         <property name="dataSource"><ref local="dataSource"/></property>
> >         <property name="mappingResources">
> >         <list>
> >             <value>com/company/auth/bean/Employee.hbm.xml</value>
> >         </list>
> >         </property>
> >         <property name="hibernateProperties">
> >             <props>
> >                 <prop key="hibernate.dialect">${hibernate.dialect}</prop>
> >                 <prop key="hibernate.show_sql">true</prop>
> >             </props>
> >         </property>
> >     </bean>
> >
> > <bean id="transactionManager"
> >
> > class="org.springframework.orm.hibernate3.HibernateTransactionManager">
> >         <property name="sessionFactory">
> >             <ref local="sessionFactory" />
> >         </property>
> >     </bean>
> >
> >     <bean id="hibernateTemplate"
> > class="org.springframework.orm.hibernate3.HibernateTemplate">
> >         <property name="sessionFactory">
> >             <ref bean="sessionFactory" />
> >         </property>
> >     </bean>
> >
> >     <bean id="employeeDao" class="com.company.auth.dao.EmployeeDAO">
> >         <property name="hibernateTemplate">
> >             <ref bean="hibernateTemplate" />
> >         </property>
> >     </bean>
> >
> >   <jaxws:endpoint id="corporateAuthService"
> >                   implementor="com.company.auth.service.AuthServiceImpl"
> >                   address="/swAuth"/>
> > </beans>
> >
> >
> >
> > -------------------------------------------
> >
> > Please help me i cant able to save data into DB table using MySQL DB
> >
> > Thanks in advance,
> >
> > Regards,
> > Bhanu
> >
> >
> >
> >
> >
> > 2009/1/28 Mickael Istria <[email protected]>
> >
> > Hello Bhanu,
> >>
> >> Your problem may be related to a conflict on the "asm" dependency.
> Indeed,
> >> CXF uses a newer "cglib" version than hibernate, that itself uses a
> newer
> >> "asm", so that it sometimes cause issues when integrating them together
> >> (Exception such as NoSuchMethodError)
> >> The workaround I use is to replace the old cglib (and its dependency) by
> >> the cglib-nodep.jar in your classpath, that is OK for Hibernate and does
> not
> >> require an old "asm".
> >>
> >> If you use Maven, this sample should help you to understand how to
> resolve
> >> such conflict:
> >>       <dependency>
> >>            <!-- This artifacts adds hibernate as a dependency -->
> >>           <groupId>org.ow2.bonita</groupId>
> >>           <artifactId>bonita-server</artifactId>
> >>           <version>4.0.1</version>
> >>           <scope>test</scope>
> >>           <exclusions>
> >>               <exclusion> <!-- Then remove the dependency to cglib to
> >> avoid conflicts with CXF's asm -->
> >>                   <groupId>cglib</groupId>
> >>                   <artifactId>cglib</artifactId>
> >>               </exclusion>
> >>           </exclusions>
> >>       </dependency>
> >>            <!-- Replaced old cglib by cglib-nodep -->
> >>       <dependency>
> >>           <groupId>cglib</groupId>
> >>           <artifactId>cglib-nodep</artifactId>
> >>           <version>2.1_3</version>
> >>       </dependency>
> >>
> >> Hope that helps...
> >>
> >> Regards,
> >> Mickael
> >>
> >> Bhanu B a écrit :
> >>
> >>  Hi Mert,
> >>> I appreciate your response, here i am getting an error while running my
> >>> application ,i think it desn't put data into DB table
> >>> some hibernate problem,
> >>> my requirement is
> >>> 1-> get data from WebService through SOAP GUI
> >>> 2-> updated data in to the DB Table with all integration
> >>> Hibernate+Spring+CXF
> >>>
> >>> i couldn't get much information about your 'mesir' application.
> >>> if any more information is really great help to me.
> >>>
> >>> Thanks,
> >>> B....
> >>>
> >>> On Tue, Jan 27, 2009 at 2:27 PM, Mert Çalışkan <[email protected]>
> >>> wrote:
> >>>
> >>>
> >>>
> >>>> check out mesir..
> >>>> I did some work with that stack.
> >>>>
> >>>> http://code.google.com/p/mesir
> >>>>
> >>>> Cheers,
> >>>>
> >>>> Mert
> >>>>
> >>>> On Tue, Jan 27, 2009 at 10:15 PM, Bhanu B <[email protected]> wrote:
> >>>>
> >>>>
> >>>>
> >>>>> Hi
> >>>>> Any one could tell me how to integrate Hibernate+Spring+CXF to
> >>>>> developing
> >>>>> webservices
> >>>>> please help me ?!!
> >>>>> Regards,
> >>>>> Bhanu
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>>
> >>>
> >>
> >>
> >
>

Reply via email to