Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5609

[ERROR] org.apache.axis2.AxisFault: Mapping qname not fond for the package: oracle.sql

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Invalid
    • Affects Version/s: 1.6.2
    • Fix Version/s: None
    • Component/s: databinding, wsdl
    • Labels:
      None
    • Environment:
      Tomcat 7.0.42, Axis2 1.6.2, JDK 1.6, Oracle 11g

      Description

      I implemented a SOAP service using Axis2 webservices which talks with the database and retrieve the values. I have used JDBC PreparedStatement, POJO java classes to generate the service. And list of fields in the table are name, id, designation, email, image. I inserted the values in the table. WSDL generated perfectly and able to see the values when I hit the service without of image field value (image =null). When I add the BLOB object to image in the table, then its giving databinding error as shown below.

      [ERROR] org.apache.axis2.AxisFault: Mapping qname not fond for the package: oracle.sql
      java.lang.RuntimeException: org.apache.axis2.AxisFault: Mapping qname not fond for the package: oracle.sql
      at org.apache.axis2.databinding.utils.BeanUtil.getPropertyQnameList(BeanUtil.java:264)
      at org.apache.axis2.databinding.utils.BeanUtil.getPropertyQnameList(BeanUtil.java:117)
      at org.apache.axis2.databinding.utils.BeanUtil.getPropertyQnameList(BeanUtil.java:117)
      at org.apache.axis2.databinding.utils.BeanUtil.getPullParser(BeanUtil.java:72)
      at org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.processProperties(ADBXMLStreamReaderImpl.java:993)
      at org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.next(ADBXMLStreamReaderImpl.java:850)
      at org.apache.axis2.util.StreamWrapper.next(StreamWrapper.java:71)
      at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:668)
      at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214)
      at org.apache.axiom.om.impl.llom.OMSerializableImpl.build(OMSerializableImpl.java:75)
      at org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementImpl.java:776)
      at org.apache.axiom.om.impl.llom.OMElementImpl.detach(OMElementImpl.java:754)
      at org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:316)
      at org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:237)
      at org.apache.axis2.rpc.receivers.RPCUtil.processResponse(RPCUtil.java:105)
      at org.apache.axis2.rpc.receivers.RPCUtil.processResponseAsDocLitWrapped(RPCUtil.java:456)
      at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:155)
      at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
      at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114)
      at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
      at org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:144)
      at org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:139)
      at org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.processURLRequest(AxisServlet.java:837)
      at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:273)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      at java.lang.Thread.run(Thread.java:662)
      Caused by: org.apache.axis2.AxisFault: Mapping qname not fond for the package: oracle.sql
      at org.apache.axis2.databinding.utils.BeanUtil.getPropertyQnameList(BeanUtil.java:131)
      ... 41 more
      ============================================================================
      Below insert statement is working fine:

      insert into EMPINFO (EMP_NAME, EMP_ID, DESIGNATION, EMAIL_ID, IMAGE) values ('Ravi',1205,'Lead','ravivarma434@gmail.com',NULL);

      Below insert statement giving binding error:

      insert into EMPINFO (EMP_NAME, EMP_ID, DESIGNATION, EMAIL_ID, IMAGE) values ('Ravi',1205,'Lead','ravivarma434@gmail.com',to_blob(rawtohex('C:/Users/ravi.gandla/Desktop/EmpolyeeData/ravi.jpg')));

      ====================================================================
      Java code part of the service is here:

      public EmpData getEmpData(int empid) {
      Connection conn = (Connection) MessageContext.getCurrentMessageContext().getProperty(DBServiceLifeCycle.DB_CONNECTION);
      if(conn !=null) {
      String SQL = "SELECT EMP_NAME, EMP_ID, DESIGNATION,EMAIL_ID, IMAGE FROM EMPINFO WHERE EMP_ID=?";
      try {
      PreparedStatement statement = conn.prepareStatement(SQL);
      statement.setInt(1, empid);
      ResultSet result = statement.executeQuery();
      if (result.next())

      { EmpData empdata = new EmpData(); empdata.setEmpname(result.getString("EMP_NAME")); empdata.setEmpid((int)result.getInt("EMP_ID")); empdata.setDesignation(result.getString("DESIGNATION")); empdata.setImage(result.getBlob("EMP_IMAGE")); return empdata; }

      } catch (SQLException e)

      { e.printStackTrace(); }

      }
      return null;
      }

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ravivarma434 Ravivarma
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: