Problem in Creating Certificate in java

Dear all
I have problem in creating certificate using the java lang
I created the keystore as shown in my code:
but i still hasing problem with the code as u can see in the pics...
Please help me to create my digitale certificate because i have to verifying it later... and i am still having no idea how i am going to verify the certificate.....
Thanks in advance..
Mariah
Message was edited by:
screen83

i am sorry the picture can't be displayed
anywhy, this the the code:
1KeyStore ks = KeyStore.getInstance("JKS");
2               char[] password = getPassword();
3               java.io.FileInputStream fis =
4               new java.io.FileInputStream("keyStoreName");
5               ks.load(fis, password);
6               fis.close();
7               // get my private key
8               KeyStore.PrivateKeyEntry pkEntry = (KeyStore.PrivateKeyEntry)
9               ks.getEntry("privateKeyAlias", password);
10               PrivateKey myPrivateKey = pkEntry.getPrivateKey();
11
12               // save my secret key
13               javax.crypto.SecretKey mySecretKey;
14               KeyStore.SecretKeyEntry skEntry =
15               new KeyStore.SecretKeyEntry(mySecretKey);
16               ks.setEntry("secretKeyAlias", skEntry, password);
17
18               // store away the keystore
19               java.io.FileOutputStream fos =
20               new java.io.FileOutputStream("newKeyStoreName");
21               ks.store(fos, password);
22               fos.close();
and I have error at line 2 when I am calling rhe method getPassword();
and at line 9 when calling the method getEntry()
and at line 16 when calling the mthod setEntry
Thanks
Mariah
Message was edited by:
screen83

Similar Messages

  • Problem with creating a third party signed x509 certificate

    Dear all
    I'm working on pki project, in which i need to generate a key pair and and using it to create a self-signed x509 certificate, it will act as the CA and using it private key to sign all other x509 certificate, I have no problem on creating the self-signed cert, but when try to create other cert using CA private, I got the following exception
    Caught exception: java.security.InvalidKeyException: Public key presented not for certificate signature
    I'm using bouncycastle to do the cert generation, here is an example of my code
       Security.addProvider(new BouncyCastleProvider());
       //be sign key pair
       KeyPairGenerator keyGen=KeyPairGenerator.getInstance("DSA");
       keyGen.initialize(1024, new SecureRandom());
       KeyPair keypair=keyGen.generateKeyPair();
       PrivateKey prikey=keypair.getPrivate();
       PublicKey pubkey=keypair.getPublic();
       //ca key pair
       KeyPair cakeypair=keyGen.generateKeyPair();
       PrivateKey caprikey=cakeypair.getPrivate();
       PublicKey capubkey=cakeypair.getPublic();
       Hashtable attrs = new Hashtable();
       attrs.put(X509Principal.CN, "Test");
       //generate cert
       X509V3CertificateGenerator certGen=new X509V3CertificateGenerator();
       certGen.setSerialNumber(BigInteger.valueOf(1));
       certGen.setIssuerDN(new X509Principal(attrs ));
       certGen.setNotBefore(new Date(System.currentTimeMillis() - 50000));
       certGen.setNotAfter(new Date(System.currentTimeMillis() + 50000));
       certGen.setSubjectDN(new X509Principal(attrs));
       certGen.setPublicKey(pubkey);
       //certGen.setSignatureAlgorithm("MD5WithDSAEncryption");
       certGen.setSignatureAlgorithm("SHA1withDSA");
       X509Certificate cert=certGen.generateX509Certificate(caprikey);
       cert.checkValidity(new Date());
       cert.verify(pubkey);
       Set dummySet=cert.getNonCriticalExtensionOIDs();
       dummySet=cert.getNonCriticalExtensionOIDs();I have no idea what problem is
    I hope that bouncycastle supporter or anyone could help me or give some guidance and I'm much appreciate that.

    Hi tkfi
    your problem is you'er not using the ca public key to do the verification, replace the
    cert.verify(pubkey);
    to
    cert.verify(capubkey);
    and it should be work

  • How do we create self-signed certificate using java packages

    Hi All,
    I require some information on creating self-signed certificate using java packages.
    The java.security.cert.* package allows you to read Certificates from an existing store or a file etc. but there is no way to generate one afresh. See CertificateFactory and Certificate classes. Even after loading a certificate you cannot regenerate some of its fields to embed the new public key – and hence regenerate the fingerprints etc. – and mention a new DN. Essentially, I see no way from java to self-sign a certificate that embeds a public key that I have already generated.
    I want to do the equivalent of ‘keytool –selfcert’ from java code. Please note that I am not trying to do this by using the keytool command line option – it is always a bad choice to execute external process from the java code – but if no other ways are found then I have to fall back on it.
    Regards,
    Chandra

    I require some information on creating self-signed certificate using java packages. Its not possible because JCE/JCA doesn't have implementation of X509Certificate. For that you have to use any other JCE Provider e.g. BouncyCastle, IAIK, Assembla and etc.
    I'm giving you sample code for producing self-signed certificate using IAIK JCE. Note that IAIK JCE is not free. But you can use BouncyCastle its open source and free.
    **Generating and Initialising the Public and Private Keys*/
      public KeyPair generateKeys() throws Exception
          //1 - Key Pair Generated [Public and Private Key]
          m_objkeypairgen = KeyPairGenerator.getInstance("RSA");
          m_objkeypair = m_objkeypairgen.generateKeyPair();
          System.out.println("Key Pair Generated....");
          //Returns Both Keys [Public and Private]*/
          return m_objkeypair;
    /**Generating and Initialising the Self Signed Certificate*/
      public X509Certificate generateSSCert() throws Exception
        //Creates Instance of X509 Certificate
        m_objX509 = new X509Certificate();
        //Creatting Calender Instance
        GregorianCalendar obj_date = new GregorianCalendar();
        Name obj_issuer = new Name();
        obj_issuer.addRDN(ObjectID.country, "CountryName");
        obj_issuer.addRDN(ObjectID.organization ,"CompanyName");
        obj_issuer.addRDN(ObjectID.organizationalUnit ,"Deptt");
        obj_issuer.addRDN(ObjectID.commonName ,"Valid CA Name");
        //Self Signed Certificate
        m_objX509.setIssuerDN(obj_issuer); // Sets Issuer Info:
        m_objX509.setSubjectDN(obj_issuer); // Sets Subjects Info:
        m_objX509.setSerialNumber(BigInteger.valueOf(0x1234L));
        m_objX509.setPublicKey(m_objkeypair.getPublic());// Sets Public Key
        m_objX509.setValidNotBefore(obj_date.getTime()); //Sets Starting Date
        obj_date.add(Calendar.MONTH, 6); //Extending the Date [Cert Validation Period (6-Months)]
        m_objX509.setValidNotAfter(obj_date.getTime()); //Sets Ending Date [Expiration Date]
        //Signing Certificate With SHA-1 and RSA
        m_objX509.sign(AlgorithmID.sha1WithRSAEncryption, m_objkeypair.getPrivate()); // JCE doesn't have that specific implementation so that why we need any //other provider e.g. BouncyCastle, IAIK and etc.
        System.out.println("Start Certificate....................................");
        System.out.println(m_objX509.toString());
        System.out.println("End Certificate......................................");
        //Returns Self Signed Certificate.
        return m_objX509;
      //****************************************************************

  • Problem In creating Java stored procedure- Urgent

    Hi Guys,
    I try to create a simple Java stored procedure but I get the following error message. Can you help me to sort out the problem please?.
    SQL> create or replace and compile java source named "Hello"
    2 as
    3 public class Hello {
    4 public static String hello()
    5 {
    6 return "Hello Oracle World";
    7 }
    8 }
    9 /
    Warning: Java created with compilation errors.
    SQL> show error java source Hello;
    No errors.
    Thanks in advance
    anthony
    null

    I had a similar issue, the reason for that was picking the incorrect partner link.
    Make sure the name of the selected partner link in the invoke output variable is matching with the Assign, in you case lets say you mapped the
    Invoke
    output variable is invoke_1_CallStoredProcedure_OutputVariable ( not nvoke_1_CallStoredProcedure_OutputVariable_1)
    From
    <Invoke_1_CallStoredProcedure_OutputVariable>
    <LF_STATUS>
    To
    P_lf_status ( variable)
    most of the time multiple variables are created when we try to select the output variable s in the Invoke.

  • Problem in creating Java Web Service

    hi,
    i am trying to create a simple java webservice through eclipse and tomcat.
    this is my code: -----
    package com.test;
    public class addfunc {
         static StringBuffer sb = null;
         static String n3 = null;
         * @param args
         public void confunc(String n1, String n2, StringBuffer sb) {
              n3 = n1 + "~" + n2;
              sb = new StringBuffer(n3);
              System.out.println("inside confunc:" + sb);
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              String n1 = "test1";
              String n2 = "test2";
              addfunc c = new addfunc();
              c.confunc(n1, n2, sb);
              sb = new StringBuffer(n3);
              System.out.println("before split : " + sb);
    but i am not able to proceed through....while trying to create a web service i am getting the following error:---------------------------
    The service class "com.test.addfunc" does not comply to one or more requirements of the JAX-RPC 1.1 specification, and may not deploy or function correctly.
    The method "confunc" on the service class "com.test.addfunc" uses a data type, "java.lang.StringBuffer", that is not supported by the JAX-RPC specification. Instances of the type may not serialize or deserialize correctly. Loss of data or complete failure of the Web service may result.
    Kindly suggest me the steps......
    thanks!

    hi,
    i am trying to create a simple java webservice through eclipse and tomcat.
    this is my code: -----
    package com.test;
    public class addfunc {
         static StringBuffer sb = null;
         static String n3 = null;
         * @param args
         public void confunc(String n1, String n2, StringBuffer sb) {
              n3 = n1 + "~" + n2;
              sb = new StringBuffer(n3);
              System.out.println("inside confunc:" + sb);
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              String n1 = "test1";
              String n2 = "test2";
              addfunc c = new addfunc();
              c.confunc(n1, n2, sb);
              sb = new StringBuffer(n3);
              System.out.println("before split : " + sb);
    but i am not able to proceed through....while trying to create a web service i am getting the following error:---------------------------
    The service class "com.test.addfunc" does not comply to one or more requirements of the JAX-RPC 1.1 specification, and may not deploy or function correctly.
    The method "confunc" on the service class "com.test.addfunc" uses a data type, "java.lang.StringBuffer", that is not supported by the JAX-RPC specification. Instances of the type may not serialize or deserialize correctly. Loss of data or complete failure of the Web service may result.
    Kindly suggest me the steps......
    thanks!

  • Messaging Server: Problem Adding SSL Certificate

    We have a problem importing a CA certificate into Messaging Server 7 on Solaris 10 x86.
    Platform
    uname -a
    SunOS mail1 5.10 Generic_138889-03 i86pc i386 i86pcMessaging Server Version
    imsimta version
    Sun Java(tm) System Messaging Server 7.0-3.01 64bit (built Dec  9 2008)
    libimta.so 7.0-3.01 64bit (built 09:24:13, Dec  9 2008)We have created a certificate database and generated a certificate request, as follows:
    msgcert generate-certDB
    msgcert request-cert --name mail.domain.xxx  --org "University of XXX" --org-unit ITS --city XXX  --state "XXX" --country GB -F ascii -o /tmp/ssl.csrHowever, when we come to import the CA-supplied certificate we get the following error.
    msgcert add-cert Server-Cert /tmp/mail1.crt
    Enter the certificate database password:
    Unable to find private key for this certificate.
    Failed to add the certificate.I'm confused. What does the msgcert request-cert command use as a private key when generating the certificate request? Should I have used openssl to generate the certificate request with a known private key?
    Thanks
    Alan

    I solved the problem by converting certificate to pkcs#12 format and importing it.
    openssl pkcs12 -export -in cert.pem -inkey private.key -out cert.pkcs12 -name Server-Cert
    /opt/sun/comms/messaging64/bin/msgcert add-cert Server-Cert cert.pkcs12Alan

  • Help with creating an animated java applet...

    Hello, everyone! I'm working on a homework assignment for my Intro to Java class, and I'm having a problem I've never run into before. My assignment is to create a animated Java applet which displays an image of an alien spaceship which travels in diagonal lines across the applet area. My main problem is that when I try to compile my code, I get three "cannot find symbol" errors about my variable "alien." I can't figure out why declaring it as a class variable hasn't solved my problem. The errors pop up for the repaint() method, as well as the pane.add and the paintIcon. Here's my code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.Timer;
    class DrawAlien extends JPanel
    public class Alien extends JApplet implements ActionListener
      ImageIcon alien;
      public void init()
        Container pane = getContentPane();
        alien = new ImageIcon(getClass().getResource("alien.gif"));
        pane.setBackground(Color.black);
        pane.add(alien);
        Timer timer = new Timer(30, this);
        timer.start();
      public void actionPerformed(ActionEvent e)
        alien.repaint();
    }I've only posted the section which I think is relevant to my problem, but I can post the rest if anyone thinks it's necessary.
    I'm aware that the code isn't ready yet in several other ways, but I don't think I can move on until I figure out what's up with the "alien" variable. I don't need anyone to write code for me or anything like that, I just lack perspective here. A couple hints in the right direction would be invaluable. Thanks!
    Edited by: springer on Nov 25, 2007 10:46 PM

    You can?t add ImageIcon into pane, you can do like below.
    alien = new ImageIcon(getClass().getResource("alien.gif"));
        pane.setBackground(Color.black);
        JLabel label = new JLabel(alien);
        pane.add(label);

  • Problem In Creating a client

    Hello all
    I have a Url by using which i have to call another application,
    but it's not working....
    The Url like this...
    http://203.196.152.60:8080/moveoapp/Notify?MSISDN=919986861012&msgtxt=BAL%20P00169IN&shortcode=60066836&operator=hutch
    Then i am creating a method...
    GetMethod method=new GetMethod(Url);
    Then i am creates client ant getiing the Status...
    HttpClient client=new HttpClient();
    int statusCode=client.executeMethod(method);
    if(statusCode!=HttpStatus.SC_OK){                    return -1;
    }else{
    return 0;
    here i am getting the Status code 505 means the "HTTP/1.1 505 HTTP Version Not Supported"
    Can any one please tell me what is reason and where i made mistake
    Waiting for response.
    Thanks in advance

    Hi,
    what HTTPClient you have? Is it org.apache.commons.httpclient.HttpClient with org.apache.commons.httpclient.methods.GetMethod? If so, try
    method.getParams().setVersion(HttpVersion.HTTP_1_0);Btw. Is this the same problem as in http://forum.java.sun.com/thread.jspa?threadID=5212261&messageID=9857375#9857375?
    greetings
    Axel

  • Problem in creating a build.xml for weblogic portal application

    Team ,
    I am facing problem in creating the build.xml using weblogic.BuildXMLGEN tool .
    a) Below is the structure of my portal application
    SrcCode
    --- .metadata (eclipse plugins folder)
    --- B2BApp ( Ear Content)
    --- b2bPortal ( portal related file(controllers,jsp)
    --- b2bsrc     (java src)
    b) Now I executed below utility to generate the build.xml "
    java weblogic.BuildXMLGen -projectName B2BApp -username weblogic -file build.xml -password welcome1 F:\srcCode"
    c) Based on the above step , build.xml got generated .
    d) when I execute "ant compile" target from the command prompt , I see the below exception
    ant compile
    Buildfile: build.xml
    compile:
    +[wlcompile] [JAM] Warning: failed to resolve class AbstractJspBacking+
    +[wlcompile] [JAM] Error: unexpected exception thrown:+
    +[wlcompile] com.bea.util.jam.internal.javadoc.JavadocParsingException: Parsing failure in F:\b2bNew\b2bPortal\src\portlets\b2b\dmr\Picker\PickerController.java at line 58.+
    e) I suspect , the problem is bcoz of classpath issues , as I generated build.xml donot have the references to dependent lib's.As build.xml looks like below :
    +<target name="compile" description="Only compiles B2BApp application, no appc">+
    +<wlcompile srcdir="${src.dir}" destdir="${dest.dir}">+
    +<!-- These referenced libraries were not found -->+
    +<!-- <library file="p13n-core-web-lib" /> -->+
    +<!-- <library file="jersey-web-lib" /> -->+
    +.....+
    +....+
    Please help me to reslove these issues .
    PS: I able to deploy the application using 10.3.2 weblogic workshop ( i.e inbuilt eclipse )

    i JaySen ,
    thanks for your response. As mentioned we added all the necessary library within the -librarydir but still we see the same error :
    +[JAM] Error: unexpected exception thrown:+
    com.bea.util.jam.internal.javadoc.JavadocParsingException: Parsing failure in F:\b2bNew\b2bPortal\src\portlets\typeAhead\TypeAheadController.java at line 70.  Most likely, an annotation is declared whose type has not been imported.
    at com.bea.util.jam.internal.javadoc.JavadocTigerDelegateImpl_150.getAnnotationTypeFor(JavadocTigerDelegateImpl_150.java:410)
    at com.bea.util.jam.internal.javadoc.JavadocTigerDelegateImpl_150.extractAnnotations(JavadocTigerDelegateImpl_150.java:176)
    at com.bea.util.jam.internal.javadoc.JavadocTigerDelegateImpl_150.extractAnnotations(JavadocTigerDelegateImpl_150.java:152)
    at com.bea.util.jam.internal.javadoc.JavadocClassBuilder.addAnnotations(JavadocClassBuilder.java:404)
    at com.bea.util.jam.internal.javadoc.JavadocClassBuilder.populate(JavadocClassBuilder.java:359)
    ===================
    a) this is a upgrade project [ upgrading from wlp 8.1.4 to 10.3.2 ]
    i.e we are using weblogic portal 10.3.2 version.
    b) Searched some sites/forums regarding the above error, and it says something related to "jwsc" ant task [ i.e while compiling a webservice(JWS) ], but we see this error while compiling a normal controller(jpf) class :(
    c) we are using "ant compile" target which internally calls wlcompile task , while executing wlcompile this error is thrown .
    Help Appreciated
    Thx,
    Sarat

  • Hi all, i'm new and facing a problem while creating a new file for Xcode. I can't select the box "with XIB for user interface" if the subclass is "UIViewController".this problem happen after i upgrade Xcode to 4.6 version.Appreciate for any help rendered.

    Hi all, i'm new to Mac book & Xcode. I'm learning and facing problems while creating a new file for Xcode. Before i upgrade the software, i have no issue to create simple steps in apps. After upgrade Xcode to 4.6 version, i'm facing lot's of issue eg.
    1) "the identity "iphone developer" doesn't match any valid certificate/ private key pair",
    2) can't select the box "with XIB for user interface" if the subclass is "UIViewController"..
    Appreciate for any help rendered.

    Mikko777 wrote:So what is the best?
    I wouldn't judge. I've been to Arch for a week, you know? But as said, it's VERY close to it.
    What I dislike after a week is makepkg not handling dependencies automatically (which would be overhead, so probably not appropriate).
    Mikko777 wrote:Also theres KDEmod for modular kde, dunno if its for 64 bits tho.
    Don't actually need that as said ... I see no real benefit of having that other than not beeing a KDE user or having Gentoos useflags.
    Mikko777 wrote:PS:You produce a lot of text and welcome smile
    Yeah. Wonder why I'm still employed? So do I ...

  • PPoint OWA there was a problem verifying the certificate

    Hi, I installed Lync 2013 FE, edge and ARR. Recently, with your help, I finally made it work for web based meetings. People have A/V/Whiteboard/ but they are unable to use Share screens and PPoint. 
    I read that I need Office Web Application Server in order to make PPoint work so I followed online tutorial and installed it. As a certificate I at first used self signed but later as I added owa as SAN, I exported it from edge server and imported it in
    OWA Server. I am not sure if this is the way to do that.
    Error for share screen is that it is due to the network issues,
    Error for PPoint is "There was a problem verifying the certificate". Remote user use web browser in order to access meeting, upload the file without any problem, and it says Loading ..... , on the other side I have domain machine with lync client
    that receives notification to accept meeting content, after which error appears.
    Any ideas? 

    Hi all and thanks for your reply. 
    I used this command to create farm (didn't define internal fqdn)
    New-OfficeWebAppsFarm -ExternalURL https://lynweb.domain.com -CertificateName "ExternalCert"
    Everything went smoothly, I can access 
    https://owa.domain.local/hosting/discovery (but cert is shown as unsecured since url is not the same as in cert (Lyncweb.domain.com).
    Because I have split DNS, in my DNS I created lyncweb for the domain.com CNAME entry and I can successfully open https://lyncweb.domain.com/hosting/discovery form LAN.
    I found several mistakes in my config (at least I think so):
    1. In LyncFE I had under discoveryURL domain.local path, so this is why cert error was showing. It was able to access but because of the different URLs name that didn't match certificate name, I was getting an ssl error. - I changed it to lyncweb.domain.com/.....
    2. I didn't have external DNS name for lyncweb.domain.com. In fiddler I saw that it is trying to access to this URL and since it wasn't defined- therefor not able to access. - I created A host record.
    3. Firewall, since lyncweb was defined in ARR I needed to craete FW rule to let access OWA Server. - I added FW rule.
    Current situation is this:
    -- When I access through meeting.domain.com/Lync Client and start PPoint, on the remote client (teleworker where I started PPoint) presentation pops up on teleworker, I can go through the slides, but inside the LAN (second participant) on Lync Client or
    via meet.domain.com I am just getting "Loading ...." and nothing appears. (I tried disabling Firewall but didn't help - so it is not about firewall, especially since OWA and LyncCLient are in the same subnet)
    -- On the other hand when teleworker starts presentation and guest joins (both outside LAN), both can see  presentation.
    I thought that it is because I didn't have internal URL, so I added
    -InternalURL: https://lyncweb.domain.com
    Now I have both internal and external URL that is the same. But it didn't change the situation.
    Any suggestions?

  • Problem in sending messages using java mail api

    Hi All,
    I have a problem in sending messages via java mail api.
    MimeMessage message = new MimeMessage(session);
    String bodyContent = "ñSunJava";
    message.setText (bodyContent,"utf-8");using the above code its not possible for me to send the attachment. if i am using the below code means special characters like ñ gets removed or changed into some other characters.
    MimeBodyPart messagePart = new MimeBodyPart();
                messagePart.setText(bodyText);
                // Set the email attachment file
                MimeBodyPart attachmentPart = new MimeBodyPart();
                FileDataSource fileDataSource = new FileDataSource("C:/sunjava.txt") {
                    public String getContentType() {
                        return "application/octet-stream";
                attachmentPart.setDataHandler(new DataHandler(fileDataSource));
                attachmentPart.setFileName(filename);
                Multipart multipart = new MimeMultipart();
                multipart.addBodyPart(messagePart);
                multipart.addBodyPart(attachmentPart);
                message.setContent(multipart);
                Transport.send(message);is there any way to send the file attachment with the body message without using MultiPart java class.

    Taken pretty much straight out of the Javamail examples the following works for me (mail read using Thunderbird)        // Define message
            Message message = new MimeMessage(session);
            message.setFrom(new InternetAddress(from));
            // Set the 'to' address
            for (int i = 0; i < to.length; i++)
                message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
    // Set the 'cc' address
    for (int i = 0; i < cc.length; i++)
    message.addRecipient(Message.RecipientType.CC, new InternetAddress(cc[i]));
    // Set the 'bcc' address
    for (int i = 0; i < bcc.length; i++)
    message.addRecipient(Message.RecipientType.BCC, new InternetAddress(bcc[i]));
    message.setSubject("JavaMail With Attachment");
    // Create the message part
    BodyPart messageBodyPart = new MimeBodyPart();
    // Fill the message
    messageBodyPart.setText("Here's the file ñSunJava");
    // Create a Multipart
    Multipart multipart = new MimeMultipart();
    // Add part one
    multipart.addBodyPart(messageBodyPart);
    // Part two is attachment
    for (int count = 0; count < 5; count++)
    String filename = "hello" + count + ".txt";
    String fileContent = " ñSunJava - Now is the time for all good men to come to the aid of the party " + count + " \n";
    // Create another body part
    BodyPart attachementBodyPart = new MimeBodyPart();
    // Get the attachment
    DataSource source = new StringDataSource(fileContent, filename);
    // Set the data handler to this attachment
    attachementBodyPart.setDataHandler(new DataHandler(source));
    // Set the filename
    attachementBodyPart.setFileName(filename);
    // Add this part
    multipart.addBodyPart(attachementBodyPart);
    // Put parts in message
    message.setContent(multipart);
    // Send the message
    Transport.send(message);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Problem in creating workspaces..Please guide

    Hello All,
    Am facing a problem in creating workspaces in DTR. Am working on EP7 SR2 (SP9)
    Have read mostly all related posts on SDN but cannot catch the missing link...Please guide me for the same:
    <u><b>setvars.bat</b></u>
    @echo off
    rem Default properties definition for the DTR Client Commandline Tool:
    rem -
    rem (1) Mandatory: DTR configuration folder:
    set DTR_HOME=C:\Documents and Settings\RHunjan
    set CFG_DIR=%DTR_HOME%\.dtr
    rem Remark: How to find DTR_HOME folder?
    rem - In Release 6.40:
    rem          The default location is C:\Documents and Settings\<user>\.sapnetweaver.
    rem - In Release 7.1:
    rem      Start Netweaver Developer Studio and login to the configuration / client
    rem      where you would like to work, then choose the menu: 'file' -> 'Switch workspace'.
    rem      The upcoming dialog shows the currently used Eclipse workspace.
    rem      The DTR configuration folder is <currently used eclipse workspace>.jdi
    rem (2) Optional: Folder with the definition of logging properties:
    set LOGGING=%DTR_HOME%\logging.properties
    rem (3) Default properties:
    rem set DEFAULT_PROPERTIES=-Dvfs.configfolder=%CFG_DIR% -Dvfs.logging=%LOGGING%
    <u><b>dtrshell.bat</b></u>
    @echo off
    rem Run DTR Commandline Shell:
    rem -
    rem (1) Get it running:
    rem -
    rem - Adapt configuration settings in setvars.bat.
    rem - Uncomment the settings for the used archives
    rem       that fit to the currently used Netweaver Developer Studio.
    call setvars.bat
    set CLASS_PATH=
    rem (2) Used Archives Settings:
    rem -
    rem Used Archives in 6.40 and 7.00 Netweaver Developer Studio installation:
    rem -
    set CLASS_PATH=%CLASS_PATH%;com_tssap_dtr_client_vfs.jar
    set CLASS_PATH=%CLASS_PATH%;httpclient.jar
    set CLASS_PATH=%CLASS_PATH%;httpclientext.jar
    set CLASS_PATH=%CLASS_PATH%;com_tssap_dtr_client_commandline.jar
    rem Archives from foreign Plugins:
    set CLASS_PATH=%CLASS_PATH%;..\com.tssap.sap.libs.xmltoolkit\lib\sapxmltoolkit.jar
    set CLASS_PATH=%CLASS_PATH%;..\com.tssap.sap.libs.logging\lib\logging.jar
    set CLASS_PATH=%CLASS_PATH%;..\com.sap.tc.jarm\lib\jARM.jar
    rem The recommended value for maximum heap size for the JVM to run DTR Commandline client is 256M or higher.
    rem You can change the settings based on system resources available.
    set VM_PARAMS=-Xmx256m
    rem (3) Run DTR Commandline Shell:
    rem -
    java %VM_PARAMS% -classpath %CLASS_PATH% %DEFAULT_PROPERTIES% com.tssap.dtr.client.commandline.DTRShell %*
    ===================
    I get an error saying:
    <i><b>Exception in thread "main" java.lang.NoClassDefFoundError: com/sap/tc/logging/Lo
    cation
            at com.tssap.dtr.client.commandline.DTRShell.<clinit>(DTRShell.java:21)</b></i>
    Please guide......
    Awaiting Reply.
    Thanks & WArm Regards,
    Ritu
    Message was edited by:
            Ritu  Hunjan

    Hello Ritu,
    the problem is probably in these lines:
    rem Archives from foreign Plugins:
    set CLASS_PATH=%CLASS_PATH%;..com.tssap.sap.libs.xmltoolkitlibsapxmltoolkit.jar
    set CLASS_PATH=%CLASS_PATH%;..com.tssap.sap.libs.loggingliblogging.jar
    set CLASS_PATH=%CLASS_PATH%;..com.sap.tc.jarmlibjARM.jar
    For a NW04s studio these paths are not correct, the plugin directories have some version suffix.
    rem Archives from foreign Plugins:
    set CLASS_PATH=%CLASS_PATH%;..com.tssap.sap.libs.xmltoolkit_2.0.0libsapxmltoolkit.jar
    set CLASS_PATH=%CLASS_PATH%;..com.tssap.sap.libs.logging_2.0.0liblogging.jar
    set CLASS_PATH=%CLASS_PATH%;..com.sap.tc.jarm_2.0.0libjARM.jar
    Please check the folder names in the /eclipse/plugins/ directory to verify that this is correct for your installation.
    Regards,
    Marc

  • Problem when Creating Project (Composite Application Services) in NWDS

    I've seen a few posts regarding this but I don't feel as if any real solution was given.
    I just installed Netweaver Developer Studio (7.0.15) with the current JDK/JRE (1.6.0_07).  When trying to create a new Composite Application Services project within the Studio, using the new project wizard, I get an error: Problem when Creating Project.
    I get the EJB Module and Dictionary to create within my navigator with no problems, however, during the creation of the metadata, the error occurs.  I do have the metadata folder appear within the navigator, but nothing in it.  None of the other three items are created.
    I have tried the attempt at deleting the metadata folder within my workspace directory and trying again but the same exact result occurs.
    Is there any other solution out there for this problem besides attempting to find older versions of NWDS, etc. that are more "stable"?
    Thank you!

    Durga,
    Very simple but effective solution.
    I had tried uninstalling / re-installing NWDS with no effect but uninstalling / re-installing NWDS AND all java related products on my machine did work.
    Note: For anyone else with this issue in the future.  I installed the Java SDK / JRE 1.4.2_18 with NWDS 7.0.15 in case this is also a possible issue with versions.
    Thanks, Durga!

  • Workshop 8.1 beta - problem with creating Database control

    I am using Workshop 8.1 beta to create a webservice, which uses a database control
    to query the Db, as simpel as it comes. However, I get the following exception
    when I try to create the new DBControl:
    java.lang.AssertionError
         at workshop.pageflow.ui.dialogs.wizards.jbcx.db.util.DbControlWizardUtil.getTables(DbControlWizardUtil.java:268)
         at workshop.pageflow.ui.dialogs.wizards.jbcx.db.util.DbControlWizardUtil.getTablesAndViews(DbControlWizardUtil.java:223)
         at workshop.pageflow.ui.dialogs.wizards.jbcx.db.step.PickMethodsStep$4.run(PickMethodsStep.java:299)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:140)
         at java.awt.Dialog.show(Dialog.java:538)
         at com.bea.ide.ui.wizard.WizardDialog.show(WizardDialog.java:117)
         at workshop.pageflow.ui.dialogs.wizards.jbcx.db.DbControlWizard.runWizard(DbControlWizard.java:96)
         at workshop.pageflow.ui.dialogs.wizards.jbcx.db.FileNewDbControlWizardAction.doAction(FileNewDbControlWizardAction.java:58)
         at workshop.pageflow.ui.dialogs.wizards.jbcx.db.DbControlWizardDocHandler.launchWizard(DbControlWizardDocHandler.java:87)
         at workshop.pageflow.ui.dialogs.wizards.jbcx.db.DbControlWizardDocHandler.createNewFile(DbControlWizardDocHandler.java:72)
         at workshop.shell.wizards.NewFileWizard.getDisplayURI(NewFileWizard.java:232)
         at workshop.shell.actions.file.FileNewAction$1.run(FileNewAction.java:111)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
    What's interesting is that it works well for the default dbcontrols of cgDataSource
    and cgSampleDataSource. The connection pool and the datasources were created successfully
    in the server. Its the workshop that seems to be complaining.
    Anyone face this problem?

    Sanjeev,
    This newsgroup is for Workshop 7.0 issues, till WebLogic Platform 8.1 goes
    GA.
    Meanwhile, please post Workshop 8.1 beta issues on
    weblogic.developer.interest.81beta.workshop newsgroup.
    Regards,
    Anurag
    "Sanjeev Saha" <[email protected]> wrote in message
    news:[email protected]...
    >
    I am using Workshop 8.1 beta to create a webservice, which uses a databasecontrol
    to query the Db, as simpel as it comes. However, I get the followingexception
    when I try to create the new DBControl:
    java.lang.AssertionError
    atworkshop.pageflow.ui.dialogs.wizards.jbcx.db.util.DbControlWizardUtil.getTab
    les(DbControlWizardUtil.java:268)
    atworkshop.pageflow.ui.dialogs.wizards.jbcx.db.util.DbControlWizardUtil.getTab
    lesAndViews(DbControlWizardUtil.java:223)
    atworkshop.pageflow.ui.dialogs.wizards.jbcx.db.step.PickMethodsStep$4.run(Pick
    MethodsStep.java:299)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
    atjava.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.ja
    va:197)
    atjava.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java
    :150)
    atjava.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java
    :140)
    at java.awt.Dialog.show(Dialog.java:538)
    at com.bea.ide.ui.wizard.WizardDialog.show(WizardDialog.java:117)
    atworkshop.pageflow.ui.dialogs.wizards.jbcx.db.DbControlWizard.runWizard(DbCon
    trolWizard.java:96)
    atworkshop.pageflow.ui.dialogs.wizards.jbcx.db.FileNewDbControlWizardAction.do
    Action(FileNewDbControlWizardAction.java:58)
    atworkshop.pageflow.ui.dialogs.wizards.jbcx.db.DbControlWizardDocHandler.launc
    hWizard(DbControlWizardDocHandler.java:87)
    atworkshop.pageflow.ui.dialogs.wizards.jbcx.db.DbControlWizardDocHandler.creat
    eNewFile(DbControlWizardDocHandler.java:72)
    atworkshop.shell.wizards.NewFileWizard.getDisplayURI(NewFileWizard.java:232)
    at workshop.shell.actions.file.FileNewAction$1.run(FileNewAction.java:111)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
    atjava.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.ja
    va:197)
    atjava.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java
    :150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
    What's interesting is that it works well for the default dbcontrols ofcgDataSource
    and cgSampleDataSource. The connection pool and the datasources werecreated successfully
    in the server. Its the workshop that seems to be complaining.
    Anyone face this problem?

Maybe you are looking for