Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Oracle 12c installation on Ubuntu 14.04

user3304371Mar 30 2017 — edited Sep 15 2017

I am getting the following error on Ubuntu 14.04 while installing Oracle 12.2:

error invoking target "install" of makefile ''/u01/app/oracle/product/12.2.0/dbhome_1/plsql/lib/ins_plsql.mk''. Consulte ''/u01/app/oraInventory/logs/installActions2017-03-29_06-56-36PM.log''

I am following this tutorial:https://gemsofprogramming.wordpress.com/2013/09/19/installing-oracle-12c-on-ubuntu-12-04-64-bit-a-hard-journey-but-its-w…

Someone know how to help?

The log follows:

kpue.c:(text.unlikely+0x775c): undefined reference to ons_init_wconfig_ctx' kpue.c:(text.unlikely+0x777b): undefined reference toons_thread_stacksize' kpue.c:(text.unlikely+0x7831): undefined reference to `ons_error_set'

INFORMAÇÕES: kpue.c:(text.unlikely+0x787f): undefined reference to ons_subscriber_create_wtimeout_ctx' kpue.c:(text.unlikely+0x78a0): undefined reference toons_subscriber_registercallback' kpue.c:(text.unlikely+0x78d5): undefined reference to ons_subscriber_close' /u01/app/oracle/product/12.2.0/dbhome_1/lib//libclient12.a(kpue.o): In functionkpueONSCallback': kpue.c:(text.unlikely+0x79d0): undefined reference to ons_notification_body' kpue.c:(text.unlikely+0x79e2): undefined reference toons_notification_getProp INFORMAÇÕES: erty' kpue.c:(text.unlikely+0x7a1f): undefined reference to ons_subscriber_relinquish' /u01/app/oracle/product/12.2.0/dbhome_1/lib//libclient12.a(kpue.o): In functionkpueONSUnRegister': kpue.c:(text.unlikely+0x7a7d): undefined reference to ons_subscriber_cancelcallback' kpue.c:(text.unlikely+0x7a8d): undefined reference toons_subscriber_close' kpue.c:(text.unlikely+0x7aae): undefined reference to ons_shutdown_wtimeout_ctx' /u01/app/oracle/product/12.2.0/dbhome_1/lib//libgeneric12.a(kgnfs.o): In funct INFORMAÇÕES: ionkgnfs_rpc_sec_init': kgnfs.c:(text.unlikely+0x2ec4): undefined reference to ztgss_nt_service_name' kgnfs.c:(text.unlikely+0x2edf): undefined reference toztgss_import_name' kgnfs.c:(text.unlikely+0x2f62): undefined reference to ztgss_init_sec_context' kgnfs.c:(text.unlikely+0x3079): undefined reference toztgss_delete_sec_context' kgnfs.c:(text.unlikely+0x30de): undefined reference to ztgss_release_buffer' /u01/app/oracle/product/12.2.0/dbhome_1/lib//libgeneric12.a(kgnfs.o): In functionkgnfs_gss

....

INFORMAÇÕES: Linking wrap

INFORMAÇÕES: /u01/app/oracle/product/12.2.0/dbhome_1/bin/orald -o wrap -m64 -z noexecstack -Wl,--disable-new-dtags -L/u01/app/oracle/product/12.2.0/dbhome_1/plsql/lib/ -L/u01/app/oracle/product/12.2.0/dbhome_1/lib/ -L/u01/app/oracle/product/12.2.0/dbhome_1/lib/stubs/ /u01/app/oracle/product/12.2.0/dbhome_1/plsql/lib/s0plsw.o -lclntsh -lclntshcore -lpsa12 -lpls12 -lrt -lplp12 -lplc12 -lslax12 cat /u01/app/oracle/product/12.2.0/dbhome_1/lib/ldflags -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lngsmshd12 -lnro12 cat INFORMAÇÕES: /u01/app/oracle/product/12.2.0/dbhome_1/lib/ldflags -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lngsmshd12 -lnnz12 -lzt12 -lztkg12 -lztkg12 -lclient12 -lnnetd12 -lvsn12 -lcommon12 -lgeneric12 -lmm -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 cat /u01/app/oracle/product/12.2.0/dbhome_1/lib/ldflags -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lngsmshd12 -lnro12 cat /u01/app/oracle/product/12.2.0/dbhome_1/lib/ldflagsINFORMAÇÕES: -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lngsmshd12 -lclient12 -lnnetd12 -lvsn12 -lcommon12 -lgeneric12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lclient12 -lnnetd12 -lvsn12 -lcommon12 -lgeneric12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lpls12 -lrt -lorazip -loraz -llzopro5 -lorabz2 -lipp_z -lipp_bz2 -lippdcemerged -lip INFORMAÇÕES: psemerged -lippdcmerged -lippsmerged -lippcore -lxml12cat /u01/app/oracle/product/12.2.0/dbhome_1/lib/sysliblist -Wl,-rpath,/u01/app/oracle/product/12.2.0/dbhome_1/lib -lm cat /u01/app/oracle/product/12.2.0/dbhome_1/lib/sysliblist -laio -lm -L/u01/app/oracle/product/12.2.0/dbhome_1/lib

INFORMAÇÕES: /u01/app/oracle/product/12.2.0/dbhome_1/lib//libclient12.a(kpue.o): In function kpueGetEventProperty': kpue.c:(text.unlikely+0x483c): undefined reference toons_notification_getProperty' /u01/app/oracle/product/12.2.0/dbhome_1/lib//libclient12.a(kpue.o): In function kpueONSRegister': kpue.c:(text.unlikely+0x775c): undefined reference toons_init_wconfig_ctx' kpue.c:(text.unlikely+0x777b): undefined reference to ons_thread_stacksize' kpue.c:(text.unlikely+0x7831): undefined reference toons_error_set'

INFORMAÇÕES: kpue.c:(text.unlikely+0x787f): undefined reference to ons_subscriber_create_wtimeout_ctx' kpue.c:(text.unlikely+0x78a0): undefined reference toons_subscriber_registercallback' kpue.c:(text.unlikely+0x78d5): undefined reference to ons_subscriber_close' /u01/app/oracle/product/12.2.0/dbhome_1/lib//libclient12.a(kpue.o): In functionkpueONSCallback': kpue.c:(text.unlikely+0x79d0): undefined reference to ons_notification_body' kpue.c:(text.unlikely+0x79e2): undefined reference toons_notification_getProp INFORMAÇÕES: erty' kpue.c:(text.unlikely+0x7a1f): undefined reference to ons_subscriber_relinquish' /u01/app/oracle/product/12.2.0/dbhome_1/lib//libclient12.a(kpue.o): In functionkpueONSUnRegister': kpue.c:(text.unlikely+0x7a7d): undefined reference to ons_subscriber_cancelcallback' kpue.c:(text.unlikely+0x7a8d): undefined reference toons_subscriber_close' kpue.c:(text.unlikely+0x7aae): undefined reference to ons_shutdown_wtimeout_ctx' /u01/app/oracle/product/12.2.0/dbhome_1/lib//libgeneric12.a(kgnfs.o): In funct INFORMAÇÕES: ionkgnfs_rpc_sec_init': kgnfs.c:(text.unlikely+0x2ec4): undefined reference to ztgss_nt_service_name' kgnfs.c:(text.unlikely+0x2edf): undefined reference toztgss_import_name' kgnfs.c:(text.unlikely+0x2f62): undefined reference to ztgss_init_sec_context' kgnfs.c:(text.unlikely+0x3079): undefined reference toztgss_delete_sec_context' kgnfs.c:(text.unlikely+0x30de): undefined reference to ztgss_release_buffer' /u01/app/oracle/product/12.2.0/dbhome_1/lib//libgeneric12.a(kgnfs.o): In functionkgnfs_gss INFORMAÇÕES: errorint': kgnfs.c:(text.unlikely+0x64cb): undefined reference to ztgss_display_status' kgnfs.c:(text.unlikely+0x67f1): undefined reference toztgss_release_buffer' /u01/app/oracle/product/12.2.0/dbhome_1/lib//libgeneric12.a(kgnfs.o): In function kgnfs_htoxdr_rpchdr': kgnfs.c:(text.unlikely+0x6cce): undefined reference toztgss_get_mic' kgnfs.c:(text.unlikely+0x6da7): undefined reference to ztgss_release_buffer' /u01/app/oracle/product/12.2.0/dbhome_1/lib//libgeneric12.a(kgnfs.o): In functionkgnfs_rp INFORMAÇÕES: c_sec_des': kgnfs.c:(text.unlikely+0x12d64): undefined reference to ztgss_delete_sec_context' /u01/app/oracle/product/12.2.0/dbhome_1/lib//libgeneric12.a(kgnfs.o): In functionkgnfs_serializesendmsg': kgnfs.c:(text.unlikely+0x1e331): undefined reference to ztgss_get_mic_iov_length' kgnfs.c:(text.unlikely+0x1e39e): undefined reference toztgss_get_mic_iov' kgnfs.c:(text.unlikely+0x1e4fd): undefined reference to ztgss_wrap_iov_length' kgnfs.c:(text.unlikely+0x1e64b): undefined reference toztgss_wrap_io INFORMAÇÕES: v' ... nae.c:(text.unlikely+0x9dc): undefined reference to naeeta' nae.c:(text.unlikely+0xa19): undefined reference tonaecta' nae.c:(text.unlikely+0xa45): undefined reference to naecta' nae.c:(text.unlikely+0xa84): undefined reference tonae INFORMAÇÕES: eta' /u01/app/oracle/product/12.2.0/dbhome_1/lib//libn12.a(nae.o): In function naeakfi': nae.c:(text.unlikely+0xdfd): undefined reference tonaecta' nae.c:(text.unlikely+0xe21): undefined reference to naeeta' /u01/app/oracle/product/12.2.0/dbhome_1/lib//libn12.a(nau.o): In functionnau_gettab': nau.c:(.text+0x395d): undefined reference to nautabnum' nau.c:(.text+0x3964): undefined reference tonautab' ... INFORMAÇÕES: ': naeu.c:(text.unlikely+0x22b2): undefined reference to naeetau' /u01/app/oracle/product/12.2.0/dbhome_1/lib//libn12.a(naeu.o):naeu.c:(text.unlikely+0x2523): more undefined references tonaeetau' follow /u01/app/oracle/product/12.2.0/dbhome_1/lib//libn12.a(naeu.o): In function naeucae_compute_checksum': naeu.c:(text.unlikely+0x3757): undefined reference tonaecta' naeu.c:(text.unlikely+0x3769): undefined reference to naecta' /u01/app/oracle/product/12.2.0/dbhome_1/lib//libn12.a(naeu.o): In functionn INFORMAÇÕES: aeucaf_check_checksum': naeu.c:(text.unlikely+0x3ea5): undefined reference to naecta' naeu.c:(text.unlikely+0x40cb): undefined reference tonaecta' /u01/app/oracle/product/12.2.0/dbhome_1/lib//libn12.a(naeu.o): In function naeueag_terminate_encryption': naeu.c:(text.unlikely+0x456d): undefined reference tonaeetau' /u01/app/oracle/product/12.2.0/dbhome_1/lib//libn12.a(naeu.o): In function naeucah_terminate_checksum': naeu.c:(text.unlikely+0x4bed): undefined reference tonaecta' /u01/app/oracle/product INFORMAÇÕES: /12.2.0/dbhome_1/lib//libn12.a(naeu.o): In function naeueai_delt': naeu.c:(text.unlikely+0x4fc6): undefined reference tonaeetau' /u01/app/oracle/product/12.2.0/dbhome_1/lib//libn12.a(naeu.o): In function naeucak_delt': naeu.c:(text.unlikely+0x5026): undefined reference tonaecta' collect2: error: ld returned 1 exit status make: *** [wrap] Error 1

INFORMAÇÕES: Finalizar saída do processo gerado. INFORMAÇÕES: ---------------------------------- INFORMAÇÕES: Exceção lançada de uma ação: make Nome da Exceção: MakefileException String de Exceção: Erro ao chamar o destino ''install'' do makefile ''/u01/app/oracle/product/12.2.0/dbhome_1/plsql/lib/ins_plsql.mk''. Consulte ''/u01/app/oraInventory/logs/installActions2017-03-29_06-56-36PM.log'' para obter detalhes. Severidade da Exceção: 1

Thanks in advance

Comments

843833
Hi!
I have the same problem, so if you find out, please post the solution.

Thnx in advance, tadey
843833
hi,

For sending attachments over the wire you will have to use SOAP. SOAP allows you to add any non-XML content as so called attachments to your SOAP message. The attachment mechanism works in both ways: client->server/ server->client.

The most obvious way would be to create a SOAPMessage, put the response String in the SOAPBody and later add an AttachmentPart to the SOAPMessage. Take a look at the SAAJ stuff that came with your axis package. The SAAJ API is quite informative!

Some more or less helpfull examples can be found in the axis samples directory. I've also spent a lot of time with them. In most cases you won't find exactly what you need, but they are better than nothing ;)

Good luck.
Cheerz ryner.
843833
hi,

Once again ;)
After a few trys'n'errors here a piece of code that would send a simple attachment back to where it came from. It simply returns the given String parameter 's' as text/plain attachment:
package wsclient;

import javax.xml.soap.AttachmentPart;
import org.apache.axis.MessageContext;

import org.apache.axis.Message;
import org.apache.axis.MessageContext;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2005</p>
 *
 * <p>Company: </p>
 *
 * @author 
 * @version 1.0
 */
public class SimpleTexter {
    public SimpleTexter() {
    }
    public void getSimpleText(String s) throws Exception
    {
        // the message context stores all the request/response specific stuff
        MessageContext msgContext= MessageContext.getCurrentContext();
        Message response = msgContext.getResponseMessage();
        
        // create an attachment and set its mime type
        AttachmentPart a = response.createAttachmentPart();
        a.setContent(s, "text/plain");
        response.addAttachmentPart(a);
        response.saveChanges();

        // when we leave the method, axis will do all the rest for you
    }
}
a request looking similar to something like:
POST /axis/services/SimpleTexter HTTP/1.0

Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.2RC2
Host: 127.0.0.1:999
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 364

<?xml version="1.0" encoding="UTF-8"?>
   <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:a0="http://wsclient"> 
      <soapenv:Body>  
         <a0:getSimpleText>   
            <a0:s>simpleText</a0:s>  
         </a0:getSimpleText> 
      </soapenv:Body>
   </soapenv:Envelope>
would return something like:
HTTP/1.1 200 OK

Content-Type: multipart/related; type="text/xml"; start="<FB0BA99519172A12CB27573B2292C73F>"; 	boundary="----=_Part_0_24522695.1118845671825"Date: Wed, 15 Jun 2005 14:27:52 GMTServer: Apache-Coyote/1.1Connection: close------=_Part_0_24522695.1118845671825Content-Type: text/xml; charset=UTF-8Content-Transfer-Encoding: binaryContent-Id: 
   <FB0BA99519172A12CB27573B2292C73F>
      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <soapenv:Body/>
      </soapenv:Envelope>

------=_Part_0_24522695.1118845671825

Content-Type: text/plain
Content-Transfer-Encoding: binary
Content-Id: 
      <9C2BE77871B9E5805BE6E46F43ABA33E>simpleText

------=_Part_0_24522695.1118845671825--
I hope that helps!

Cheerz, r.
843833
Hi!

Thanks, It really helps, but i still have a problem,
I tried your example and when I call the web service, I get after:
AttachmentPart a = response.createAttachmentPart();
NullPointerExeption, and I do not know what is wrong.

Can you please help me again.
Thnx in advance, tadey

Here is my code
package server;

import javax.xml.soap.AttachmentPart;
import org.apache.axis.Message;
import org.apache.axis.MessageContext;

public class wservice {
	
	public void getSimpleText(String s) throws Exception
    {
        // the message context stores all the request/response specific stuff
        MessageContext msgContext= MessageContext.getCurrentContext();
        Message response = msgContext.getResponseMessage();
        
        // create an attachment and set its mime type
        AttachmentPart a = response.createAttachmentPart();
        a.setContent(s, "text/plain");
        response.addAttachmentPart(a);
        response.saveChanges();
// 
        // when we leave the method, axis will do all the rest for you
    }

}
843833
hi,
I tried your example and when I call the web service,
I get after:
AttachmentPart a =
response.createAttachmentPart();

NullPointerExeption, and I do not know what is
s wrong.
jo, the example i showed above is really a quick hack! as you can see, the method 'getSimpleText' has return type 'void' indicating that this web service operation is a one-way-operation only. so, actually no response is expected. And due to this, i guess that the corresponsing MessageContext will not store a response message.I think this would explain your NullPointerException.

it worked over here, because i deployed it as wrapped rpc style service and axis created a 'dummy' response type in the wsdl (porttype/operation/output). Here is my deployment descriptor.
<!-- -->
<deployment name="testEnv_deploy"
            xmlns="http://xml.apache.org/axis/wsdd/"
            xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
  <service name="SimpleTexter" provider="java:RPC" style="wrapped">
    <parameter name="className" value="wsclient.SimpleTexter"/>
    <parameter name="allowedMethods" value="*"/>
  </service>
</deployment>
axis will create the following wsdl (excuse bad formatting):
<wsdl:definitions targetNamespace="http://localhost:8080/axis/services/SimpleTexter">
	<!--
WSDL created by Apache Axis version: 1.2RC2
Built on Nov 16, 2004 (12:19:44 EST)
-->
	<wsdl:types>
	<schema elementFormDefault="qualified" targetNamespace="http://wsclient">
	<element name="getSimpleText">
	<complexType>
	<sequence>
        <element name="tns1:s" type="xsd:string"/>
        </sequence>
        </complexType>
        </element>
	<element name="getSimpleTextResponse">
        <complexType/>
        </element>
</schema>
</wsdl:types>
	<wsdl:message name="getSimpleTextResponse">
<wsdl:part element="tns1:getSimpleTextResponse" name="parameters"/>
</wsdl:message>
	<wsdl:message name="getSimpleTextRequest">
<wsdl:part element="tns1:getSimpleText" name="parameters"/>
</wsdl:message>
	<wsdl:portType name="SimpleTexter">
	<wsdl:operation name="getSimpleText">
<wsdl:input message="impl:getSimpleTextRequest" name="getSimpleTextRequest"/>
<wsdl:output message="impl:getSimpleTextResponse" name="getSimpleTextResponse"/>
</wsdl:operation>
</wsdl:portType>
	<wsdl:binding name="SimpleTexterSoapBinding" type="impl:SimpleTexter">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
	<wsdl:operation name="getSimpleText">
<wsdlsoap:operation soapAction=""/>
	<wsdl:input name="getSimpleTextRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
	<wsdl:output name="getSimpleTextResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
	<wsdl:service name="SimpleTexterService">
	<wsdl:port binding="impl:SimpleTexterSoapBinding" name="SimpleTexter">
<wsdlsoap:address location="http://localhost:8080/axis/services/SimpleTexter"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
a somehow better solution would be to make the whole thing a message style service (take a look at the axis user guide for more info). in this case, your body is not bound to a single 'string' parameter, you can pass what ever you want as long as it is embodied in an element with name 'getSimpleText'. (i use a quite similar piece of code to simply echo requests)
package wsclient;

// imports

public class SimpleTexter
{
//constructor ...

// this is a valid signature for a message style operation
// in any case, that should make sure, you have a request/response operation.
// This signature is useless if you have to handle attachments. but good enough to
// process simple requests/responses without attachments
public SOAPEnvelope getSimpleText(SOAPEnvelope req, SOAPEnvelope resp)
{
        // the message context stores all the request/response specific stuff
        MessageContext msgContext= MessageContext.getCurrentContext();
        // to add an attachment, you need the response Message
        // resp is useless, because you cannot add attachtments to the envelope
        Message response = msgContext.getResponseMessage();
        
        // do something with the request, if you want....
        // you can either take 'req' or call msgContext.getRequestMessage().
        // use the latter call, if you expect attachments to be sent by the client,
        // because you can't acces them through the envelope :-(

        // ...

        // create an attachment
        AttachmentPart a = response.createAttachmentPart();
        // place the content. if you want to pass an image, you will need a
        // javax.activation.DataHandler. 
        // then you don't have to take care about mime types
        a.setContent(/*your attachment datahandler*/);
        response.addAttachmentPart(a);
        response.saveChanges();

        return response.getEnvelope();
}
}
i didn't test this piece of code. i hope it works in a somehow similar way ;)
don't forget to deploy this class as message style service:
<deployment name="testEnv_deploy"
            xmlns="http://xml.apache.org/axis/wsdd/"
            xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
  <service name="SimpleTexter" provider="java:MSG">
    <parameter name="className" value="wsclient.SimpleTexter"/>
    <parameter name="allowedMethods" value="*"/>
  </service>
</deployment>
i hope that helps you out again! good luck!
cheerz, r.
843833
Hi!
Thnx in your help.
I tested your advice , but I have still same problem, I use Eclipse 3.1.0 and Apache Tomcat 5.0., and j2sdk 1.4.2_07
I have tested even other examples, like:

I tried to make SOAP message with soapfactory in client, and then I caled:

AttachmentPart a = response.createAttachmentPart();

and also get null pointer exeption.

This is client-side code:
public static void main(String args[]) throws MalformedURLException, SOAPException {
	MessageFactory factory = MessageFactory.newInstance();
		SOAPMessage msg = factory.createMessage();
		SOAPConnectionFactory connectionFactory=   SOAPConnectionFactory.newInstance();
		SOAPConnection con = connectionFactory.createConnection();

AttachmentPart attachment = msg.createAttachmentPart(); // here i get NullPointException
	String stringContent = "Update address for Sunny Skies " + 
	  "Inc., to 10 Upbeat Street, Pleasant Grove, CA 95439";

		attachment.setContent(stringContent, "text/plain");
		attachment.setContentId("update_address");

		msg.addAttachmentPart(attachment); 
		
		msg.saveChanges();

		 create the endpoint and send the message
		 URL endpoint = new URL("http://localhost:9090/RKO/services/zmogljivost");
		 con.call.setOperationName(new QName(endpoint, "sayHelloTo"));
		 SOAPMessage response = con.call(message, endpoint);
}
I do not know what to do?
Can you help me again?Plese!
Is something wrong with my Eclipse, apache, or j2sdk?

Thnx in advance

tadey
843833
hi,
I tried to make SOAP message with soapfactory in
client, and then I caled:

AttachmentPart a = response.createAttachmentPart();
Hmm, I've also read the other thread, where you wrote about a NullPointerException. It seems that your factory always returns null instead of a valid SOAPMessage instance. Maybe something is wrong with your saaj or axis setup. Did you include all required packages in your project path... eg. the axis package instead of the saaj package only?

Try to take a look on the implementation of the javax.xml.soap.MessageFactory in the axis package. There you should find some path information, from where the factory actually takes the sources. I guess that the factory can't find an implementation and therefore returns null instead... !?

I wish you all the best :)
Cheerz, r.
843833
Hi,

I had exactly the same problem. I kept getting a NullPointerException when using the Factory to create an AttachementPart.

I was able to resolve the problem :-) You will need to make sure that you have added the mail.jar to your classpath. The createAttachmentPart uses javax.mail.* package to create the AttachmentPart

http://java.sun.com/products/javamail/

Good luck with it.
A+
843833
Hi,

I have created a service, which takes files uploaded from client and attaches files again, so that client can download it.

My method signature :
public void attachmentUtility()

I am able to access the files which are uploaded by client.

But getting java.io.IOException clientabortexception, socket exception at server side. I think this is because of my service method having signature void.

If so what should be the my method signature to send SOAPMessage to client?

Java2WSDL tool didn't created wsdl:types in my WSDL types.

Please send sample code, how can achive this?

Below is my service method,

public void attachmentUtility()
{
System.out.println("FileAttachmentAxisSAAJ::attachmentUtility");

MessageContext messageContext = null;

messageContext = MessageContext.getCurrentContext();

if( messageContext!=null )
{
System.out.println("Message context created.....");

Message requestMessage = messageContext.getRequestMessage();

if( requestMessage!=null )
{
System.out.println("Request has come.....service received it!");
System.out.println("Number of attachments sent by client: "+requestMessage.countAttachments());
}


Message responseMessage = messageContext.getResponseMessage();

if( responseMessage!=null )
{
System.out.println("Response message is not null in server****");

AttachmentPart attachPart = null;

DataHandler dh = new DataHandler( new FileDataSource("C:\\DSCN0705.JPG"));

attachPart = responseMessage.createAttachmentPart(dh);

attachPart.setContentId("attachment-1");

responseMessage.addAttachmentPart(attachPart);

System.out.println("***Attachemtn is successfully attached to response message***");

}
else
{
System.out.println("Response message is NULL in server****");
}

}
}


--------------------
My WSDL file

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="some:com.lmr.ems.tcs.services.attach" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="some:com.lmr.ems.tcs.services.attach" xmlns:intf="some:com.lmr.ems.tcs.services.attach" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.2.1
Built on Jun 14, 2005 (09:15:57 EDT)-->

<wsdl:message name="attachmentUtilityResponse">

</wsdl:message>

<wsdl:message name="attachmentUtilityRequest">

</wsdl:message>

<wsdl:portType name="FileAttachmentAxisSAAJ">

<wsdl:operation name="attachmentUtility">

<wsdl:input message="impl:attachmentUtilityRequest" name="attachmentUtilityRequest"/>

<wsdl:output message="impl:attachmentUtilityResponse" name="attachmentUtilityResponse"/>

</wsdl:operation>

</wsdl:portType>

<wsdl:binding name="FilwUploadDownload14SoapBinding" type="impl:FileAttachmentAxisSAAJ">

<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>

<wsdl:operation name="attachmentUtility">

<wsdlsoap:operation soapAction=""/>

<wsdl:input name="attachmentUtilityRequest">

<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="some:com.lmr.ems.tcs.services.attach" use="encoded"/>

</wsdl:input>

<wsdl:output name="attachmentUtilityResponse">

<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="some:com.lmr.ems.tcs.services.attach" use="encoded"/>

</wsdl:output>

</wsdl:operation>

</wsdl:binding>

<wsdl:service name="FileAttachmentAxisSAAJService">

<wsdl:port binding="impl:FilwUploadDownload14SoapBinding" name="FilwUploadDownload14">

<wsdlsoap:address location="http://venkats:8080/venkat/services/FilwUploadDownload14"/>

</wsdl:port>

</wsdl:service>

</wsdl:definitions>


Regards,
Venkat S
1 - 9
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 13 2017
Added on Mar 30 2017
15 comments
6,822 views