Initializing Factory class with Digital Signature

Hi All,
I am trying to Initialize the Factory class using digital signature. These are the steps I fallowed.
1. Created a Java application "Application1" in Jdeveloper.
2. Copied config, ext, lib folder from the Design console directory to the Application1/Project1 folder.
3. added the lib and ext jars to the project properties.
4. Modified the run/debug profile in the project properties to point to the xlconfig file in config folder.
5. added the "-DXL.HomeDir=. -Djava.security.auth.login.config=config\authwl.conf" in the java options.
Java code:
public class SignatureLogin {
public static void main(String[] args) throws Exception {
Properties jndi =
ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer").getAllSettings();
tcSignatureMessage signedMsg = tcCryptoUtil.sign("xelsysadm", "PrivateKey");
tcUtilityFactory factory = new tcUtilityFactory(jndi, signedMsg);
tcUserOperationsIntf usrIntf = (tcUserOperationsIntf)factory.getUtility("Thor.API.Operations.tcUserOperationsIntf");
System.out.println("signature login complete");
// Do something with usrIntf here
Map filter = new HashMap();
filter.put("Users.Key", "7464");
tcResultSet rSet = usrIntf.findAllUsers(filter);
rSet.goToRow(0);
System.out.println(rSet.toString());
factory.close();
System.out.println("logout complete");
System.exit(0);
Then ran the java class. I am able to get the connection but when I am using findAllUsers(map) method to search the usr table I am get a nullpointer exception.
Exception in thread "main" java.lang.NullPointerException
     at Thor.API.Operations.tcUserOperationsClient.findAllUsers(Unknown Source)
     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:597)
     at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
     at weblogic.security.service.SecurityManager.runAs(Unknown Source)
     at weblogic.security.Security.runAs(Security.java:41)
     at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
     at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
     at $Proxy0.findAllUsers(Unknown Source)
     at com.ssi.utils.custom.code.SignatureLogin.main(SignatureLogin.java:26)
I need some help to fix this.
Thanks

Hi,
Were you able to resolve the issue as I am facing same issue.
I have a custom application deployed on same weblogic managed server where OIM is installed but when I try to find user in OIM it gives me null pointer exception.
I have even checked the username with which connection is established using ioUtilityFactory.getUserName() and it gives me the correct user.
Thanks
Edited by: user1105482 on 26-Apr-2011 04:38

Similar Messages

  • Mail not sending email with digital signature

    Hello helpers,
    What's the deal with Mail and digital signatures? I could never get the application to work with my Versign class 1 digital signature in Tiger and now in Leopard. Keep getting error 1035. That's what led mr to Thunderbird and I got Leopard hoping to resolve this issue. Keychain seems as if it's a weirdo in its simplicity and where I believe the problem lies. my digital certificate resides on the system but is not in the my certificate category. However, when I select it in system, afterwards it shows up in my certificate category. If I close Keychain and reopen it, my certificate is empty.
    I like Mail. However, it's important to me to use my digital certificate in signing my email. I believe I must have done something wrong in the installation of the certificate and I can't imaging what. Why can't Mail accept digital certificate directly like other email application rather than go through a third party...Keychain. Mail help did not help. Any workable solution would be appreciated. Thanks
    Ralston

    Just discovered that I have an icloud account and a .me account in my accounts inbox. Do I have a problem with migration to icloud?

  • Loading Invoice XML IDoc with digital signature via XI into R/3

    Hi,
    I received an Invoice XML IDoc with digital signature via Mail (for test purposes) and want to load it via XI into an R/3 systeme.
    My idea is to load the Invoice XML IDoc file via the File Sender Adapter into XI and send it to the R/3 system via the IDoc Inbound adapter.
    Due to the digital signature the file looks like this:
    0‚ S      *†H†÷
        ‚ D0‚ @   1 0       +      0‚ '      *†H†÷
        ‚   ‚   ‚ –0‚ ’0‚ û      etc.
    When I load the file like this with the File Sender Adapter, an error message occurs in the XI Monitoring as the XML Parser cannot read the file due to the digital signatur (as expected).
    Has anybody an idea how I can configure the File Sender Adapter Communication Channel to be able to load only the XML IDoc and ignore the digital Signature strings?
    Thanks in advance for your support.
    Alex

    BTW
    do use the second way you need:
    Security Settings for the Sender Mail Adapter
    http://help.sap.com/saphelp_nw04/helpdata/en/27/c0524257a1b56be10000000a155106/content.htm
    and
    Key Storage Service
    http://help.sap.com/saphelp_webas630/helpdata/DE/e9/a1dd44d2c83c43afb5ec8a4292f3e0/content.htm
    apart from adapter module config
    Regards,
    michal

  • PDF File with Digital Signature

    I am opening a "PDF File with Digital Signature" using Adobe Acrobat Pro 9.
    File gets opened.
    Then i choose "Preflight: option for "Report PDF Syntax issues".
    The following message is displayed:
    "An error occured while parsing a contents stream. Unable  to analyze the PDF file."
    So whats the solution for this error?

    Hi,
    I have uploaded the file on the specified link:
    http://www.filefactory.com/file/b3g5h37/n/abc.pdf

  • How to create Web Service Client from wsdl with digital signature?

    Please, help me to create Web Service Client from wsdl with digital signature. I know create Web Service client from wsdl file and I know how to add digital signature to XML with jwsdp, but I don't know how to do it together.
    Thanks.

    I'm handling security wit JAX-WS handler. So I insert "manually" ws-security tag and I encrypt (and sign) message parts.
    On client side, all works fine, but on server side I obtain:
    ---Server Inbound SOAP message---|#]
    Decrypting message and rebuilding Valuees... |#]
    Starting decrypt|#]
    . dectypted.!
    --found following string: <ns1:addiziona><num1>80</num1><num2>22222</num2></ns1:addiziona>|#]
    ...MESSAGE Restored.|#]
    <?xml version="1.0" ?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:ns1="http://calculator.me.org/" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><soapenv:Body><ns1:addiziona><num1>80</num1><num2>22222</num2></ns1:addiziona></soapenv:Body></soapenv:Envelope>|#]
    Error in decoding SOAP Message
    Error in decoding SOAP Message
            at com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.toInternalMessage(SOAPXMLDecoder.java:89)
            at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.toMessageInfo(SOAPMessageDispatcher.java:187)
            at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher$SoapInvoker.invoke(SOAPMessageDispatcher.java:571)
            at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:145)
            at com.sun.xml.ws.server.Tie.handle(Tie.java:88)
            at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:160)
            at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:89)
            at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:178)
            at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:109)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:100)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:71)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
            at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    Caused by: javax.xml.ws.soap.SOAPFaultException: Cannot find the dispatch method
            at com.sun.xml.ws.encoding.soap.SOAPDecoder.raiseFault(SOAPDecoder.java:674)
            at com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.decodeDispatchMethod(SOAPXMLDecoder.java:152)
            at com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeBodyContent(SOAPDecoder.java:337)
            at com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeBody(SOAPDecoder.java:327)
            at com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeEnvelope(SOAPDecoder.java:250)
            at com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.toInternalMessage(SOAPXMLDecoder.java:81)
            ... 29 more
    |#]
    --->handleFault O_o<---|#]If you have any idea for solving my problem, then I can post my simple example :(
    Bye!

  • Doc size with digital signature

    i've got 2 questions, please help:
    1) why do .pdfs with digital signatures have such large file size? how can i reduce the size?
    2) why do .pdfs with digital signature become text non-searchable?
    thnx
    brg

    actually the same signature size isn't such a problem when using Adobe software, but when using pdfCreator, the size increases... pls don't give me lectures on using another software, i need A5 and Adobe doesn't provide it...
    so i guess it's the problem within that other pdf maker...
    why i need to pdf print the file? one reason is i can print it ( otherwise signatures don' show, protection i guess), the other reason to protect the signatures that for that specific reason only need to be seen.
    thnx.
    brg

  • Jar files with digital signature -pl help

    Hi there
    is there anybody who will help me guiding step by step how to create a jar file (executable) with digital signature?
    thanks in advance.

    Sorry, digital signatures have nothing to do with decompilation security. The short answer is, there's nothing you can do about it. Search the forum for 'obfuscator', a lot of people have asked the same question.
    -Ron

  • Form 16 With digital signature giving adobe document corrupted output

    Dear All,
    We have configured ads and implementing form 16 with digital signature,we have done the all configuration as per SAP Guide and dezso blogs,but when generating the form 16 with digital signature its giving
    "Adobe reader could not open _xxxxx.pdf because it is either not a supported file type or corrupted,
    we have done the same configuration in dev its working fine and prd its not working,request you to please provide the solution for the same.
    as per some check list i have cheked ads_https is working fine,but when executing the report fp_pdf_test_00  with rfc ads_https its asking for user name and password,we have maintained the same user name and password for abap and java for both adsuser and ads_agent still same issue,
    pelase suggest.
    please find attached screenshot for your reference.
    Regards,
    Basis

    This can be done but you must use the Document Form var to route the signed pdf. You must configure the FormGuide submit button to 'Submit from PDF' in Guide Builder.
    Also the button on the form must be configured to submit as 'PDF' (not XDP). This change is done when you open the form in designer.
    Note that after you have submitted the signed pdf you will be dealing with a pdf subsequently.
    Attached is a sample FormGuide.

  • PDF by email in 46C with digital signature

    Hi all,
    can anyone tell me if it is possible to send a PDF with digital signature from SAP in 4.6C?
    I'm converting a spool order into PDF document, and send it by email using FM SO_NEW_DOCUMENT_ATT_SEND_API1..
    Best Regards,
    Pedro

    Thanks for the reference to the digsig user guide. I've reviewed this documentation and the majority of it I had already tried however one TIP that is in this document that I hadn't seen before points to setting up a FDF file to import AD secure to easily import the ID's
    More specifically, I have configured LDAP and the Security settings in Adobe Pro and when attempting to connect to our LDAP server is when I run into the issue. I am not able to connect. Is there any additional information that you know of that can shed some light on LDAP configuration with Adobe PDF forms for digital id's?

  • Problem with Digital Signature strategy in Document Managment System

    Hello ALL,
    I am facing problem with Digital Signature strategy in DMS. If any help its greatly appreciated.
    I have senario where Approvers in DMS will review the document and approve the document and put on their digitial signature. if i have multiple approvers maintained in the characterstics it has to check weather it has been approved by all approvers otherwise it has to reset the status to for approval.
    My problem is i am able to reset the status back from approved to for approval using the badi document_status01 but when the next approver logs in to the document and change the status to approved he is not able to get the digital signature pop up which it comes only first user approves it.
    can any one help me out on whats going wrong in it.
    Thanks
    Srikanth Aduri.

    Hi,
    maybe the reason for this is that the status of the digital signature is not changed. Then the system thinks that the digital signature is still completed and therefore the user is not getting the pop-up again. The database table for the digital signature for documents is TC77. I hope this information is usefull for you.
    Best regards,
    Christoph

  • Issue with digital signature

    I am having a issue with digital signature in Adobe 7.
    I was able to sign the document, but my name does not appear on the signature block.  I am using a certificate that is assigned to me, but my name never appears in the “signed by” field.  I did notice that the certificate is assignedto my email address not my name; Could that be what is causing this issue?
    Thanks

    Thanks for the quick response.
    I have tried that I click on the box to show "name", but it still never shows the name......

  • Deploy war in jboss with digital signature

    Hi All,
    i have a war file for my Dynamic Web project, which i need to deploy in jboss running in Linux System.
    i need to add a digital signature to the war file.
    if the signature is incorrect, the war should not get deployed.
    Kindly help me out in achieving this.
    Thanks in advance.

    abhi8703 wrote:
    my requirement is:
    while deploying the war file in jboss, it should ask for a password or some security code.
    if someone enters the wrong code, the war shouldn't get deployed.
    You seem to be missing the point about signing. Signing signs each file in a jar/war and adds this signature information to the jar/war. It does not encrypt the content of the jar. It does not protect the jar from being tampered with. It just signs each class and file in the jar so that if one checks ALL the signatures using the appropriate certificate and ALL the signatures are correct then the owner of the certificate signed the jar/war file.
    'war' files have an additional complication in that if a war file contains a set of jar files then these may have to be signed if they are deployed as Applets or WebStart applications but these signatures do not have to use the same private key as was used to sign the 'war' file.
    If you want JBOSS to reject a tampered war file then it is up to JBOSS to check the signature so this then becomes a JBOSS problem.

  • Unusual use of interface defining static factory class with getInstance

    This question is prompted by a recent New to Java forum question ask about the differences between Interfaces and Abstract classes. Of course one of the standard things mentioned is that interfaces cannot actually implement a method.
    One of my past clients, one of the 500 group, uses interfaces as class factories. The interface defines a pubic static class with a public static method, getInstance, that is called to generate instances of a class that implements the interface.
    This architecture was very object-oriented, made good use of polymorphism and worked very well. But I haven't seen this architecture used anywhere else and it seemed a little convoluted.
    Here is a 'pseudo' version of the basic interface template and use
    -- interface that defines public static factory class and getInstance method
    public interface abc {
        public static class FactoryClass
            public static abc getInstance ()
                return (abc) FactoryGenerator(new abcImpl(), abc.class);
    -- call of interface factory to create an instance
    abc myABC = abc.Factory.getInstance();1. Each main functional area ('abc' in the above) has its own interface factory
    2. Each main functional area has its own implementation class for that interface
    3. There is one generator (FactoryGenerator) that uses the interface class ('abc.class') to determine which implementation class to instantiate and return. The generator class can be configured at startup to control the actual class to return for any given interface.
    I should mention that the people that designed this entire architecture were not novices. They wrote some very sophisticated multi-threaded code that rarely had problems, was high performance and was easy to extend to add new functionality (interfaces and implementing classes) - pretty much plug-n-play with few, if any, side-effects that affected existing modules.
    Is this a best-practices method of designing factory classes and methods? Please provide any comments about the use of an architecture like this.

    Thanks for the feedback.
    >
    I don't see how 'the generator class can be configured at startup to control the actual class to return for any given interface' can possibly be true given this pseudo-code.
    >
    I can see why that isn't clear just from what is posted.
    The way it was explained to me at the time is that the interface uses standard naming conventions and acts like a template to make it easy to clone for new modules: just change 'abc' to 'def' in three places and write a new 'defImpl' class that extends the interface and the new interface and class can just 'plug in' to the framework.
    The new 'defImpl' class established the baseline functionality that must be supported. This line
    return (abc) FactoryGenerator(new abcImpl(), abc.class);uses the initial version of the new class that was defined, 'abcImpl()', when calling the FactoryGenerator and it acted as a 'minimum version supported'. The generator class could use configuration information, if provided, to provide a newer class version that would extend this default class. Their reasoning was that this allowed the framework to use multiple versions of the class as needed when bugs got fixed or new functionality was introduced.
    So the initial objects would be an interface 'abc' and a class 'abcImpl'. Then the next version (bug fixes or enhancements) would be introduced by creating a new class, perhaps 'abcImpl_version2'. A configuration parameter could be passed giving 'abcImpl' as the base class to expect in the FactoryGenerator call and the generator would actually create an instance of 'abcImpl_version2' or any other class that extended 'abcImpl'.
    It certainly go the job done. You could use multiple versions of the class for different environments as you worked new functionality from DEV, TEST, QA and PRODUCTION environments without changing the basic framework.
    I've never seen any Java 'pattern' that looks like that or any pattern where an interface contained a class. It seemed really convoluted to me and seems like the 'versioning' aspect of it could have been accomplished in a more straightforward manner.
    Thanks for the feedback. If you wouldn't mind expanding a bit on one comment you made then I will mark this ANSWERED and put it to rest.
    >
    I don't mind interfaces containing classes per se when necessary
    >
    I have never seen this except at this one site. Would you relate any info about where you have seen or used this or when it might be necessary?

  • PDF files crashes with Digital Signature

    Hi,
    I'm using Acrobat 9.1 Pro.  My files are crashing any time I click on "sign document" to add a digital signature.  with the send error box"Adobe Acrobat 9.1 has encountered a problem and needs to close. We are sorry for the inconvenience."
    Tried several documents it is all the same. Clicking on any sub-function under the sign menue results in crashing of the file.
    Any idea what the problem is?
    Thanks,

    ...well I guess it was something wrong with my computer that caused this, had problems with my firewall/virus program also and when I got that fixed then the book download worked as it should also.
    Zevs

  • SRM 7.0 (PPS ) with Digital Signature & Payment Gateway

    Hi,
    I am workng for SRM 7.0 with Procurement for Public sector. I need to confugure the Digital Signature and
    Payment Gateway for Tender Fees. who are all the Third party vendors for Digital singature and Payment Gateway.
    What is the Procedure and SPRO SRM needed in SRM 7.0
    Regards
    Ganesh

    Hi Ganesh ,
    We are using SRM 7.0 with PPS. How to configure Tender Fee payment gateway ? For that I have implemented  Enancement  /SAPPSSRM/IF_BD_TF_ONLINE_PG. But after that I am not able to get any button / link from bidder side so that link redirect to banku2019s web site. Bidder didnu2019t get u201CCreate Responseu201D button because Tender fee is mandatory and I am not able to click on button / link .Where I am doing wrong? Which coding I have to mentioned in Enhancement /SAPPSSRM/IF_BD_TF_ONLINE_PG .
    Any special authorization needed for payment gateway? If anybody send me sample code then really it will be very helpful to me. Please suggest me.
    It will be great help if you give suggestions regarding payment gateway.
    I had already open thread for it. Please reply on following thread .
    RFx Tender Fee Payment Gateway
    Thanks & Regards,
    Abhijeet

Maybe you are looking for

  • Problem in creation of SOAP massage

    hi I am using JDeveloper (version 11.0) to create the proxy classes from WSDL but i am getting an exception as following SOAPFaultException this exception indicate that there is some problem in creation of SOAP massage internally so can anyone help m

  • Questions on OID and E-Business

    Hi all, What is the best way to migrate all the user accounts from instance said "A", and " B" that's using Oracle E-Busines, and 2 other instance said "C", "D" that's using older version of Oracle Internet Directory into the fresh Oracle Internet Di

  • Regarding internal daemon log rotation...

    I found a problem with internal daemon log rotation in iplanet webserver.it is not happening properly..........how to troble shoot this issue?

  • How can I host my full-bleed images (such as browser fill) on a CDN (such as Amazon3) for fast load?

    Hey, I was wondering if anyone know how to use a Contenct Delivery Network (such as Amazon S3) to host large images on my Muse site so that they upload faster? Thanks

  • Help to move photos from iphoto on imac back to sd card

    I always import my photos from sd card to iphoto and then delete them from sd card.  I bought a digital frame that can only be loaded using an sd card.  I have selected the pictures i want to put on the frame.  I put the pictures in a folder on my de