BigInteger.parseBigInteger : help

hi,
everybody.
i want to parse a string which is in number format to BigInteger.
but i was enable to find any method for it in the java api
so currently i am working on Long, and it is working fine.
but in future if i get a number which is beyond the limit of Long than there can be a problem, so i want to use BigInteger.
the number which i am getting is 68719478912.
my current coding for Long is:-
     case 5:
          if((Long.parseLong(functionlevel1[1].trim()) & Long.parseLong(tokenstring[4].trim())) > 0)
          privilegeclassdetailsobj.functionsmodel.addElement(functionlevel1[i][0]);
          else
          privilegeclassdetailsobj.functionsmodel1.addElement(functionlevel1[i][0]);
          break;
so now how can i do parsing on BigInteger.
please reply as i am stucked with this problem.
waiting for reply
thanks in advance

hi
sabre150
thanks for ur reply,
but the reply which u gave is static declaration.
i want it to make dynamic.
because in my program i can get any value from the
server
and the reply which u gave is only for a specified
value.
hope u got my point.
waiting for replyWhat am I missing?
new BigInteger(theStringFromTheServerContainingTheDigitsOfTheNumber);

Similar Messages

  • Help using BigInteger

    hi ,
    can any one explain with a program how to use biginteger.baically this is used for taking a verbig number,but i got struck in using it so please help me using with a program of using it.

    > can any one explain with a program how to use
    biginteger.baically this is used for taking a verbig
    number,but i got struck in using it so please help me
    using with a program of using it.
    My crystal boll tells me that this is your answer:
    boolean b = (new BigInteger("666")).isProbablePrime(66);Correct?

  • Need help with BigInteger

    Hi,
    I am facing a problem with the BugInteger(byte[] ) constructor, the api documentation of jdk1.3.1 says that the array byte[] array val should a twos complement binary representation of a number. So if I want to create the BigInteger for 2, I should ideally pass 254 in byte[0], but what happens here is if I pass byte[0] as 2 I get the BigInteger value as 2. It seems like the argument does not seem to be taking in twos complement but just the binary represntation of a number. Is this a known bug or am I going wrong somewhere?
    Please help,
    Regards,
    Madhu.

    In my view, the two's complement view of 2 is 2. The two's complement view of -2 is hex FE. Two's complement is a way to express negative and positive numbers using the most significant bit to represent how the rest of the bits should be interpreted.

  • Problem with BigInteger and MySql

    Hi !!
    I've a problem with BigInteger and MySql.
    I've a BigInteger object (suppose that value is 0.02270412445068359375).
    I must store that value in a database (MySql).
    The value of BigInteger object must be stored in a column of type Decimal.
    Stored value is 0.022704124450683594. Why ??
    My target is to store 0.02270412445068359375
    Can anyone help me?
    Thanks.

    Hi !!
    I've a problem with BigInteger and MySql.
    I've a BigInteger object (suppose that value is
    0.02270412445068359375).
    I must store that value in a database (MySql).
    The value of BigInteger object must be stored in a
    column of type Decimal.if this is the case I fear you are SOL. a decimal is the same size as a double but with a fixed max number of decimal places. if it isn't big enough then you have no real choice other than to VARCHAR it.
    Stored value is 0.022704124450683594. Why ??
    My target is to store 0.02270412445068359375
    Can anyone help me?
    Thanks.

  • I need help with Creating Key Pairs

    Hello,
    I need help with Creating Key Pairs, I generate key pais with aba provider, but the keys generated are not base 64.
    the class is :
    import java.io.*;
    import java.math.BigInteger;
    import java.security.*;
    import java.security.spec.*;
    import java.security.interfaces.*;
    import javax.crypto.*;
    import javax.crypto.spec.*;
    import au.net.aba.crypto.provider.ABAProvider;
    class CreateKeyPairs {
    private static KeyPair keyPair;
    private static KeyPairGenerator pairGenerator;
    private static PrivateKey privateKey;
    private static PublicKey publicKey;
    public static void main(String[] args) throws Exception {
    if (args.length != 2) {
    System.out.println("Usage: java CreateKeyParis public_key_file_name privete_key_file_name");
    return;
    createKeys();
    saveKey(args[0],publicKey);
    saveKey(args[1],privateKey);
    private static void createKeys() throws Exception {
    Security.addProvider(new ABAProvider());
    pairGenerator = KeyPairGenerator.getInstance("RSA","ABA");
    pairGenerator.initialize(1024, new SecureRandom());
    keyPair = pairGenerator.generateKeyPair();
    privateKey = keyPair.getPrivate();
    publicKey = keyPair.getPublic();
    private synchronized static void saveKey(String filename,PrivateKey key) throws Exception {
    ObjectOutputStream out= new ObjectOutputStream(new FileOutputStream(filename));
    out.writeObject(key);
    out.close();
    private synchronized static void saveKey(String filename,PublicKey key) throws Exception {
    ObjectOutputStream out= new ObjectOutputStream( new FileOutputStream(filename));
    out.writeObject(key);
    out.close();
    the public key is:
    �� sr com.sun.rsajca.JSA_RSAPublicKeyrC��� xr com.sun.rsajca.JS_PublicKey~5< ~��% L thePublicKeyt Lcom/sun/rsasign/p;xpsr com.sun.rsasign.anm����9�[ [ at [B[ bq ~ xr com.sun.rsasign.p��(!g�� L at Ljava/lang/String;[ bt [Ljava/lang/String;xr com.sun.rsasign.c�"dyU�|  xpt Javaur [Ljava.lang.String;��V��{G  xp   q ~ ur [B���T�  xp   ��ccR}o���[!#I����lo������
    ����^"`8�|���Z>������&
    d ����"B��
    ^5���a����jw9�����D���D�)�*3/h��7�|��I�d�$�4f�8_�|���yuq ~
    How i can generated the key pairs in base 64 or binary????
    Thanxs for help me
    Luis Navarro Nu�ez
    Santiago.
    Chile.
    South America.

    I don't use ABA but BouncyCastle
    this could help you :
    try
    java.security.Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
    java.security.KeyPairGenerator kg = java.security.KeyPairGenerator.getInstance("RSA","BC");
    java.security.KeyPair kp = kg.generateKeyPair();
    java.security.Key pub = kp.getPublic();
    java.security.Key pri = kp.getPrivate();
    System.out.println("pub: " + pub);
    System.out.println("pri: " + pri);
    byte[] pub_e = pub.getEncoded();
    byte[] pri_e = pri.getEncoded();
    java.io.PrintWriter o;
    java.io.DataInputStream i;
    java.io.File f;
    o = new java.io.PrintWriter(new java.io.FileOutputStream("d:/pub64"));
    o.println(new sun.misc.BASE64Encoder().encode(pub_e));
    o.close();
    o = new java.io.PrintWriter(new java.io.FileOutputStream("d:/pri64"));
    o.println(new sun.misc.BASE64Encoder().encode(pri_e));
    o.close();
    java.io.BufferedReader br = new java.io.BufferedReader(new java.io.FileReader("d:/pub64"));
    StringBuffer keyBase64 = new StringBuffer();
    String line = br.readLine ();
    while(line != null)
    keyBase64.append (line);
    line = br.readLine ();
    byte [] pubBytes = new sun.misc.BASE64Decoder().decodeBuffer(keyBase64.toString ());
    br = new java.io.BufferedReader(new java.io.FileReader("d:/pri64"));
    keyBase64 = new StringBuffer();
    line = br.readLine ();
    while(line != null)
    keyBase64.append (line);
    line = br.readLine ();
    byte [] priBytes = new sun.misc.BASE64Decoder().decodeBuffer(keyBase64.toString ());
    java.security.KeyFactory kf = java.security.KeyFactory.getInstance("RSA","BC");
    java.security.Key pubKey = kf.generatePublic(new java.security.spec.X509EncodedKeySpec(pubBytes));
    System.out.println("pub: " + pubKey);
    java.security.Key priKey = kf.generatePrivate(new java.security.spec.PKCS8EncodedKeySpec(priBytes));
    System.out.println("pri: " + priKey);
    catch(Exception e)
    e.printStackTrace ();
    }

  • Outputting BigInteger Results one line at a time

    hi all,
    im new to this. im havin problems with my code. i was to read into two Bigintegers and multi[ply them.. but with the multiplication i want to show each line as it is being done and send it to the screen. as u can see from the code i was hopin to do it in two parts. the first gettin the result and the second just workin it out line by line. is this a good way to do it?  i was tryin to read the last digit and work up to the work up to the first but i cant do it. here is a snippet of the calucatations.. i really hope someone can help cause im really stuck at this point
    thanks a million
    al.
    BigInteger num1 = new BigInteger(textAreaNum1.getText());
        BigInteger num2 = new BigInteger(textAreaNum2.getText());
        result = num1.multiply(num2);
        totalDigit = num2;
        currDigit= num2;
        for (BigInteger ix = BigInteger.ZERO; ix.compareTo(totalDigit) < 0; ix = currDigit.add(BigInteger.ONE))
          currResult = currDigit.multiply(num1);
          textAreaCalculation.setText("" + num1 + "" + zeroAdder);
    textAreaResult.setText(""+ result);
    // the resultin screen should look like
    // 234
    // *123
    // 702
    // 4680
    // 23400
    // 28782

    this is my program as it stands but with another class callin the frame.. so u want me to change the textfield to jtextfield?
    package Mulitply;
    import java.awt.*;
    import java.awt.event.*;
    import java.math.BigInteger;
    import javax.swing.JTextArea.*;
    * Title: Mulitplier of Large Numbers
    * Description: This class extends the application class and add all
    * all the data below to it. it basically sets up the frame
    * in terms of look,feel and action.
    * Copyright: Copyright (c) 2004
    * Company:
    * author
    * version 1.0
    class CalcFrame extends Frame implements ActionListener{
    Button btnMult;
    TextField textAreaNum1, textAreaNum2, textAreaCalculation, textAreaResult;
    public CalcFrame() {
    addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    setSize(1000, 300);
    setTitle("Mulitpler");
    setLayout(new FlowLayout());
    setBackground(Color.lightGray);
    Panel pnlNums = new Panel();
    Panel pnlBtns = new Panel();
    Panel pnlCalculation = new Panel();
    Panel pnlResult = new Panel();
    setLayout(new GridLayout(3, 1));
    textAreaNum1 = new TextField(50);
    textAreaNum2 = new TextField(50);
    pnlNums.add(textAreaNum1);
    pnlNums.add(textAreaNum2);
    btnMult = new Button("*");
    btnMult.addActionListener(this);
    pnlBtns.add(btnMult);
    textAreaCalculation = new TextField(50);
    textAreaResult = new TextField(50);
    pnlResult.add(textAreaResult);
    pnlCalculation.add(textAreaCalculation);
    add(pnlNums);
    add(pnlBtns);
    add(pnlCalculation);
    add(pnlResult);
    public void actionPerformed(ActionEvent e) {
    String str1 = textAreaNum1.getText().trim();
    String str2 = textAreaNum2.getText().trim();
    int len1 = str1.length();
    int len2 = str2.length();
    if ( (len1 == 0) || (len2 == 0))
    return;
    BigInteger num1 = new BigInteger(str1);
    BigInteger num2 = new BigInteger(str2);
    BigInteger result = num1.multiply(num2);
    String resultStr = result.toString();
    int resultLen = resultStr.length();
    textAreaCalculation.setText("");
    textAreaCalculation.append(str1 + "\n");
    textAreaCalculation.append("*" + str2 + "\n");
    textAreaCalculation.append(pad(resultLen, "--") + "\n");
    BigInteger ten = new BigInteger("10");
    for (int i = (len2 - 1); i >= 0; i--) {
    BigInteger curNum = new BigInteger(str2.substring(i, i + 1));
    BigInteger curRes = curNum.multiply(num1);
    for (int j = 0; j < len2 - 1 - i; j++)
    curRes = curRes.multiply(ten);
    String curResStr = curRes.toString();
    int curResLen = curResStr.length();
    textAreaCalculation.append(pad(resultLen - curResLen, "--") + curResStr + "\n");
    textAreaCalculation.append(pad(resultLen, "--") + "\n");
    textAreaCalculation.append(resultStr + "\n");
    String pad(int n, String s) {
    String ret = "";
    for (int i = 0; i < n; i++)
    ret += s;
    return ret;
    }

  • Binary addition,subtraction and modulus...plz help urgent

    plz help me on this query...
    i need to pass two 512 bit number as string,then convert them to binary and
    then perform binary addition,subtraction,modulus operations on those two numbers.finally convert result to integer.
    i designed a code which doesnt work correct.it is:
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package bytearrayopeations;
    import java.math.BigInteger;   
    * @author sheetalb
    public class binaryadding {
        public static void main(String[] args) {
            BigInteger a = new BigInteger("123456");
            BigInteger b = new BigInteger("5121");
            String bb1 = a.toString(2);
            String bb2 = b.toString(2);
            String ss1 = null;
            String ss2 = null;
            String result = "";
            String carry="0";
            System.out.println("first value=" +bb1);
            System.out.println("second value=" +bb2);
            int k=bb1.length();
            int h=bb2.length();
            System.out.println("length 1="+ k);
            System.out.println("length 2=" +h);
            int p=h-k;
            //System.out.println("difference=" +p);
            int q=k-h;
            //System.out.println("difference 2=" +q);
            if(h==k)
           else if(h>k)
                for(int i=0;i<p;i++)
                    bb1="0"+bb1;
                System.out.println("new value of first=" +bb1);   
        else if(h<k)
            for(int i=0;i<q;i++)
                bb2="0"+bb2;
            System.out.println("new value of second=" +bb2);
            StringBuffer sb1=new StringBuffer(bb1);
         StringBuffer sb2=new StringBuffer(bb2);
            bb1=sb1.reverse().toString();
         bb2=sb2.reverse().toString();
            //System.out.println("rev. buffer1=" +bb1);
            //System.out.println("rev. buffer2=" +bb2);
            for(int i=0;i<bb1.length();i++)
                ss1=bb1.substring(i,i+1);
                ss2=bb2.substring(i,i+1);
              System.out.println("value1=" + ss1 + "    " + "value2=" + ss2);
              if (ss1.equals("0") && ss2.equals("0")) 
                 if (carry.equals("0")) 
                     result+="0";
                        else
                            result+="1";
               else if (ss1.equals("1") && ss2.equals("1"))
                if (carry.equals("0")) 
                    result+="0";
              carry="1";
              else
                   result+="1";
                   carry="1";
        else if (ss1.equals("0") && ss2.equals("1"))
                     if (carry.equals("0")) 
                         result+="1";
                   carry="0";
                        else
                          result+="0";
                                    carry="1";
               else if (ss1.equals("1") && ss2.equals("0"))
                     if (carry.equals("0")) 
                        result+="1";
                        carry="0";
                   else
                                result+="0";
                                carry="1";
           System.out.println("sum=" +result + "         " + "carry" + carry);
                        result+=carry;
                        StringBuffer sb3=new StringBuffer(result);
                        result=sb3.reverse().toString();
                    System.out.println("result is " +result); 
                  System.out.println("Binary = "+ result + ", Decimal = "+Integer.parseInt(result,2));
    }plz provide me or email me if possible java coding for all three operations as soon.
    [email protected]

    One thread is enough. Continue here:[http://forums.sun.com/thread.jspa?threadID=5373720&messageID=10643157#10643157]

  • Javax.naming.NameNotFoundException  plz guys help

    hi am try to create simple ejb prj and i got this exception iam beginner so can u plz help me to knwow hats wrong
    this is my entity bean
    working on netbean 6 glassfish v2
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package doctor;
    import java.io.Serializable;
    import java.math.BigInteger;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.EntityManager;
    import javax.persistence.Id;
    import javax.persistence.NamedQueries;
    import javax.persistence.NamedQuery;
    import javax.persistence.Table;
    import javax.transaction.UserTransaction;
    * @author kriem
    @Entity
    @Table(name = "DOCTOR")
    @NamedQueries({@NamedQuery(name = "Doctor.findByDocFname", query = "SELECT d FROM Doctor d WHERE d.docFname = :docFname"), @NamedQuery(name = "Doctor.findByDocId", query = "SELECT d FROM Doctor d WHERE d.docId = :docId"), @NamedQuery(name = "Doctor.findByDocLname", query = "SELECT d FROM Doctor d WHERE d.docLname = :docLname"), @NamedQuery(name = "Doctor.findByDocPhone", query = "SELECT d FROM Doctor d WHERE d.docPhone = :docPhone"), @NamedQuery(name = "Doctor.findByDocAddress", query = "SELECT d FROM Doctor d WHERE d.docAddress = :docAddress"), @NamedQuery(name = "Doctor.findByDocMobileNo", query = "SELECT d FROM Doctor d WHERE d.docMobileNo = :docMobileNo"), @NamedQuery(name = "Doctor.findByDocSpecialty", query = "SELECT d FROM Doctor d WHERE d.docSpecialty = :docSpecialty"), @NamedQuery(name = "Doctor.findByDocTitle", query = "SELECT d FROM Doctor d WHERE d.docTitle = :docTitle")})
    public class Doctor implements Serializable {
        private static final long serialVersionUID = 1L;
        @Column(name = "DOC_FNAME", nullable = false)
        private String docFname;
        @Id
        @Column(name = "DOC_ID", nullable = false)
        private String docId;
        @Column(name = "DOC_LNAME", nullable = false)
        private String docLname;
        @Column(name = "DOC_PHONE")
        private BigInteger docPhone;
        @Column(name = "DOC_ADDRESS", nullable = false)
        private String docAddress;
        @Column(name = "DOC_MOBILE_NO")
        private BigInteger docMobileNo;
        @Column(name = "DOC_SPECIALTY", nullable = false)
        private String docSpecialty;
        @Column(name = "DOC_TITLE", nullable = false)
        private String docTitle;
        public Doctor() {
        public Doctor(String docId) {
            this.docId = docId;
        public Doctor(String docId, String docFname, String docLname, String docAddress, String docSpecialty, String docTitle) {
            this.docId = docId;
            this.docFname = docFname;
            this.docLname = docLname;
            this.docAddress = docAddress;
            this.docSpecialty = docSpecialty;
            this.docTitle = docTitle;
        public String getDocFname() {
            return docFname;
        public void setDocFname(String docFname) {
            this.docFname = docFname;
        public String getDocId() {
            return docId;
        public void setDocId(String docId) {
            this.docId = docId;
        public String getDocLname() {
            return docLname;
        public void setDocLname(String docLname) {
            this.docLname = docLname;
        public BigInteger getDocPhone() {
            return docPhone;
        public void setDocPhone(BigInteger docPhone) {
            this.docPhone = docPhone;
        public String getDocAddress() {
            return docAddress;
        public void setDocAddress(String docAddress) {
            this.docAddress = docAddress;
        public BigInteger getDocMobileNo() {
            return docMobileNo;
        public void setDocMobileNo(BigInteger docMobileNo) {
            this.docMobileNo = docMobileNo;
        public String getDocSpecialty() {
            return docSpecialty;
        public void setDocSpecialty(String docSpecialty) {
            this.docSpecialty = docSpecialty;
        public String getDocTitle() {
            return docTitle;
        public void setDocTitle(String docTitle) {
            this.docTitle = docTitle;
        @Override
        public int hashCode() {
            int hash = 0;
            hash += (docId != null ? docId.hashCode() : 0);
            return hash;
        @Override
        public boolean equals(Object object) {
            // TODO: Warning - this method won't work in the case the id fields are not set
            if (!(object instanceof Doctor)) {
                return false;
            Doctor other = (Doctor) object;
            if ((this.docId == null && other.docId != null) || (this.docId != null && !this.docId.equals(other.docId))) {
                return false;
            return true;
        @Override
        public String toString() {
            return "doctor.Doctor[docId=" + docId + "]";
        public void persist(Object object) {
            /* Add this to the deployment descriptor of this module (e.g. web.xml, ejb-jar.xml):
             * <persistence-context-ref>
             * <persistence-context-ref-name>persistence/LogicalName</persistence-context-ref-name>
             * <persistence-unit-name>simple-ejbPU</persistence-unit-name>
             * </persistence-context-ref>
             * <resource-ref>
             * <res-ref-name>UserTransaction</res-ref-name>
             * <res-type>javax.transaction.UserTransaction</res-type>
             * <res-auth>Container</res-auth>
             * </resource-ref> */
            try {
                Context ctx = new InitialContext();
                UserTransaction utx = (UserTransaction) ctx.lookup("java:comp/env/UserTransaction");
                utx.begin();
                EntityManager em = (EntityManager) ctx.lookup("java:comp/env/persistence/LogicalName");
                em.persist(object);
                utx.commit();
            } catch (Exception e) {
                java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE, "exception caught", e);
                throw new RuntimeException(e);
    }my session bean
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package doctor;
    import java.util.List;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    * @author kriem
    @Stateless
    public class DoctorFacade implements DoctorFacadeRemote {
        @PersistenceContext
        (unitName="simple-ejbPU")
        private EntityManager em;
        public void create(Doctor doctor) {
            em.persist(doctor);
        public void edit(Doctor doctor) {
            em.merge(doctor);
        public void remove(Doctor doctor) {
            em.remove(em.merge(doctor));
        public Doctor find(Object id) {
            return em.find(doctor.Doctor.class, id);
        public List<Doctor> findAll() {
            return em.createQuery("select object(o) from Doctor as o").getResultList();
        public void persist(Object object) {
            em.persist(object);
    }myremote interface
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package doctor;
    import java.util.List;
    import javax.ejb.Remote;
    * @author kriem
    @Remote
    public interface DoctorFacadeRemote {
        void create(Doctor doctor);
        void edit(Doctor doctor);
        void remove(Doctor doctor);
        Doctor find(Object id);
        List<Doctor> findAll();
    }and for the clinet side its simple java aplication
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package doctor;
    import java.util.Properties;
    import javax.naming.Context;
    import javax.rmi.PortableRemoteObject;
    * @author kriem
    public class client extends test  {
        public static void main(String [] args) {
        try {
           // NewServiceLocator obj=new NewServiceLocator();
            test simple=new test();
            simple.getDataSource("doctor");
            simple.getSession("DoctorFaca");
                Context jndiContext = getInitialContext( );
                Object ref = jndiContext.lookup("DoctorFacade/remote");
                DoctorFacadeRemote dao = (DoctorFacadeRemote)
                  PortableRemoteObject.narrow(ref,DoctorFacadeRemote.class);
         Doctor doc=new Doctor();
         doc.setDocFname("test");
         doc.setDocAddress("bla bla");
         doc.setDocId("D1005");
         doc.setDocLname("mohamedd");
        // doc.setDocMobileNo(121112223);
         doc.setDocTitle("MD");
         //doc.getDocPhone(2);
                dao.create(doc);
                Doctor doc2 = dao.find("D1002");
                System.out.println(doc2.getDocSpecialty());
                System.out.println(doc2.getDocFname());
                System.out.println(doc2.getDocLname());
                System.out.println(doc2.getDocAddress());
                System.out.println(doc2.getDocMobileNo());
                System.out.println(doc2.getDocPhone());
                System.out.println(doc2.getDocSpecialty());
                System.out.println(doc2.getDocTitle());
        catch (javax.naming.NamingException ne)
        {ne.printStackTrace( );
        public static Context getInitialContext( )
            throws javax.naming.NamingException {
            Properties p = new Properties( );
            // ... Specify the JNDI properties specific to the vendor.
            return new javax.naming.InitialContext(p);
        }and i got this exception knowing that am using entity bean from existing database that i had created
    javax.naming.NameNotFoundException:
            at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:216)
            at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:188)
            at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:74)
            at com.sun.enterprise.naming.RemoteSerialContextProviderImpl.lookup(RemoteSerialContextProviderImpl.java:129)
            at sun.reflect.GeneratedMethodAccessor121.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:154)
            at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:687)
            at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:227)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1846)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1706)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1088)
            at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:223)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:806)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:563)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2567)
            at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
    run-simple-app-client:guys anyhelp am really lost in this
    Edited by: marwacs on May 19, 2008 9:32 PM

    hey guys i made some updates on my sample and i figure out that as long as am creating enterprise application on netbeans 6 that contain both ejb module and client module i don`t need to write mapedName i only put the @ejb in the client side and it creates an instance of the remote interface
    here is what i have done in the client code /*
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package enterpriseapplication4;
    import ejb.Doctor;
    import ejb.DoctorFacadeRemote;
    import javax.ejb.EJB;
    import java.math.BigInteger;
    * @author kriem
    public class Main {
        @EJB
        private static DoctorFacadeRemote doctorFacade;
         * @param args the command line arguments
        public static void main(String[] args) {
            // TODO code application logic here
    //        Object id="D1002";
    //        Doctor find = doctorFacade.find(id);
    //        find.toString();
    //            System.out.println(find.getDocSpecialty());
    //            System.out.println(find.getDocFname());
    //            System.out.println(find.getDocLname());
    //            System.out.println(find.getDocAddress());
    //            System.out.println(find.getDocMobileNo());
    //            System.out.println(find.getDocPhone());
    //            System.out.println(find.getDocSpecialty());
    //            System.out.println(find.getDocTitle());
                    Doctor doc=new Doctor();
                    BigInteger bi = BigInteger.valueOf(123);
                    BigInteger bh = BigInteger.valueOf(111);
         doc.setDocFname("test");
         doc.setDocAddress("bla bla");
      System.err.print("doc Fname and address");
         doc.setDocId("D1005");
         doc.setDocLname("mohamedd");
    doc.setDocMobileNo(bh);
         doc.setDocTitle("MD");
    doc.setDocMobileNo (bi);
      doctorFacade.create(doc);
      System.err.print("doc was added");
    }but when i run i found this
    May 21, 2008 6:37:08 PM com.sun.enterprise.appclient.MainWithModuleSupport <init>
    WARNING: ACC003: Application threw an exception.
    javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
            java.rmi.RemoteException: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaction marked for rollback.; nested exception is:
            javax.transaction.RollbackException: Transaction marked for rollback.
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
            java.rmi.RemoteException: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaction marked for rollback.; nested exception is:
            javax.transaction.RollbackException: Transaction marked for rollback.
            at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:243)
            at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:205)
            at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
            at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:225)
            at ejb.__DoctorFacadeRemote_Remote_DynamicStub.create(ejb/__DoctorFacadeRemote_Remote_DynamicStub.java)
            at ejb._DoctorFacadeRemote_Wrapper.create(ejb/_DoctorFacadeRemote_Wrapper.java)
            at enterpriseapplication4.Main.main(Main.java:50)
            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 com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:266)
            at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:449)
            at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:259)
            at com.sun.enterprise.appclient.Main.main(Main.java:200)
    Caused by: java.rmi.RemoteException: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaction marked for rollback.; nested exception is:
            javax.transaction.RollbackException: Transaction marked for rollback.
            at com.sun.enterprise.iiop.POAProtocolMgr.mapException(POAProtocolMgr.java:251)
            at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1386)
            at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1316)
            at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:210)
            at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:117)
            at $Proxy82.create(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 com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:154)
            at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:687)
            at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:227)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1846)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1706)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1088)
            at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:223)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:806)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:563)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2567)
            at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
    Caused by: javax.transaction.RollbackException: Transaction marked for rollback.
            at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:440)
            at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:371)
            at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3792)
            at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3571)
            at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1354)
            ... 19 more
    javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
            java.rmi.RemoteException: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaction marked for rollback.; nested exception is:
            javax.transaction.RollbackException: Transaction marked for rollback.
            at ejb._DoctorFacadeRemote_Wrapper.create(ejb/_DoctorFacadeRemote_Wrapper.java)
            at enterpriseapplication4.Main.main(Main.java:50)
            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 com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:266)
            at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:449)
            at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:259)
            at com.sun.enterprise.appclient.Main.main(Main.java:200)
    Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
            at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:461)
            at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:259)
            at com.sun.enterprise.appclient.Main.main(Main.java:200)
    Caused by: java.lang.reflect.InvocationTargetException
            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 com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:266)
            at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:449)
            ... 2 more
    Caused by: javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
            java.rmi.RemoteException: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaction marked for rollback.; nested exception is:
            javax.transaction.RollbackException: Transaction marked for rollback.
            at ejb._DoctorFacadeRemote_Wrapper.create(ejb/_DoctorFacadeRemote_Wrapper.java)
            at enterpriseapplication4.Main.main(Main.java:50)
            ... 8 morethe thing is am connecting my sample with oracle db and i debuged my sample it breaks when i try to create(doc) last line in the client code ,i guess its about connecting with the database,i don`t know i also working on netbean 6
    so plaz me guys another question is it possible to create statfule web services and if its plz can u send me examples

  • Large numbers without BigInteger or BigDecimal

    I need to write a program that handles basic math operations on large ( 32k+ ) digit integers. I can't make use of the BigInteger or BigDecimal classes. Does anyone have any suggestions on where to start? I'm still relatively new to java programming, so when I tried to read through BigInteger to get an idea of how it's done, my head nearly exploded.
    I figured the easiest way to do it would be to convert the arguments to a string of binary, and go from there, but its circular logic, since I'd need to divide a number too big to do division on in order to convert to binary.
    Any help is much appreciated.

    JamesEarlLMU said:
    I need to write a program that handles basic math
    operations on large ( 32k+ ) digit integers. I can't
    make use of the BigInteger or BigDecimal classes.
    Does anyone have any suggestions on where to start?
    I'm still relatively new to java programming, so when
    I tried to read through BigInteger to get an idea of
    how it's done, my head nearly exploded.I guess this is a school assignment? Seems a little weird. It isn't exactly trivial, is it?
    Is it for a maths class or just a basic java class? If it's a math class, then I guess you're stuck trying to figure out the way BigInterger does it, and replicating it, but if it's a basic programming class then it seems like a really dumb assignment.
    If it's not even for assignments and possibly cause you are using a reduced JDK, then I'd try and find a 3rd party lib that will give you these features; I'm sure there are some around.
    -- watercolour...yes?

  • Accessing an ejb statful session from webserivce   problem need help

    hi guys am working on simple example here is creating an entity bean that reference to table on my database and then create my session bean from that entity bean and am when am trying to access this stateful session bean from web service at the beginning it runs and when i click on any of the function i got the same exception am sorry for my lack of knowledge but i just don`t know what wrong here are my code
    entity bean :/*
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package doc;
    import java.io.Serializable;
    import java.math.BigInteger;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.EntityManager;
    import javax.persistence.Id;
    import javax.persistence.NamedQueries;
    import javax.persistence.NamedQuery;
    import javax.persistence.Table;
    import javax.transaction.UserTransaction;
    * @author kriem
    @Entity
    @Table(name = "DOCTOR")
    @NamedQueries({@NamedQuery(name = "Doctor.findByDocFname",
    query = "SELECT d FROM Doctor d WHERE d.docFname = :docFname"),
            @NamedQuery(name = "Doctor.findByDocId",
            query = "SELECT d FROM Doctor d WHERE d.docId = :docId"),
            @NamedQuery(name = "Doctor.findByDocLname",
            query = "SELECT d FROM Doctor d WHERE d.docLname = :docLname"),
            @NamedQuery(name = "Doctor.findByDocPhone",
            query = "SELECT d FROM Doctor d WHERE d.docPhone = :docPhone"),
            @NamedQuery(name = "Doctor.findByDocAddress",
            query = "SELECT d FROM Doctor d WHERE d.docAddress = :docAddress"),
            @NamedQuery(name = "Doctor.findByDocMobileNo",
            query = "SELECT d FROM Doctor d WHERE d.docMobileNo = :docMobileNo"),
            @NamedQuery(name = "Doctor.findByDocSpecialty",
            query = "SELECT d FROM Doctor d WHERE d.docSpecialty = :docSpecialty"),
            @NamedQuery(name = "Doctor.findByDocTitle",
            query = "SELECT d FROM Doctor d WHERE d.docTitle = :docTitle")})
    public class Doctor implements Serializable {
        private static final long serialVersionUID = 1L;
        @Column(name = "DOC_FNAME", nullable = false)
        private String docFname;
        @Id
        @Column(name = "DOC_ID", nullable = false)
        private String docId;
        @Column(name = "DOC_LNAME", nullable = false)
        private String docLname;
        @Column(name = "DOC_PHONE", nullable = false)
        private BigInteger docPhone;
        @Column(name = "DOC_ADDRESS", nullable = false)
        private String docAddress;
        @Column(name = "DOC_MOBILE_NO", nullable = false)
        private BigInteger docMobileNo;
        @Column(name = "DOC_SPECIALTY", nullable = false)
        private String docSpecialty;
        @Column(name = "DOC_TITLE", nullable = false)
        private String docTitle;
        public Doctor() {
        public Doctor(String docId) {
            this.docId = docId;
        public Doctor(String docId, String docFname, String docLname, BigInteger docPhone, String docAddress, BigInteger docMobileNo, String docSpecialty, String docTitle) {
            this.docId = docId;
            this.docFname = docFname;
            this.docLname = docLname;
            this.docPhone = docPhone;
            this.docAddress = docAddress;
            this.docMobileNo = docMobileNo;
            this.docSpecialty = docSpecialty;
            this.docTitle = docTitle;
        public String getDocFname() {
            return docFname;
        public void setDocFname(String docFname) {
            this.docFname = docFname;
        public String getDocId() {
            return docId;
        public void setDocId(String docId) {
            this.docId = docId;
        public String getDocLname() {
            return docLname;
        public void setDocLname(String docLname) {
            this.docLname = docLname;
        public BigInteger getDocPhone() {
            return docPhone;
        public void setDocPhone(BigInteger docPhone) {
            this.docPhone = docPhone;
        public String getDocAddress() {
            return docAddress;
        public void setDocAddress(String docAddress) {
            this.docAddress = docAddress;
        public BigInteger getDocMobileNo() {
            return docMobileNo;
        public void setDocMobileNo(BigInteger docMobileNo) {
            this.docMobileNo = docMobileNo;
        public String getDocSpecialty() {
            return docSpecialty;
        public void setDocSpecialty(String docSpecialty) {
            this.docSpecialty = docSpecialty;
        public String getDocTitle() {
            return docTitle;
        public void setDocTitle(String docTitle) {
            this.docTitle = docTitle;
        @Override
        public int hashCode() {
            int hash = 0;
            hash += (docId != null ? docId.hashCode() : 0);
            return hash;
        @Override
        public boolean equals(Object object) {
            // TODO: Warning - this method won't work in the case the id fields are not set
            if (!(object instanceof Doctor)) {
                return false;
            Doctor other = (Doctor) object;
            if ((this.docId == null && other.docId != null) || (this.docId != null && !this.docId.equals(other.docId))) {
                return false;
            return true;
        @Override
        public String toString() {
            return "doc.Doctor[docId=" + docId + "]";
        public void persist(Object object) {
            /* Add this to the deployment descriptor of this module (e.g. web.xml, ejb-jar.xml):
             * <persistence-context-ref>
             * <persistence-context-ref-name>persistence/LogicalName</persistence-context-ref-name>
             * <persistence-unit-name>task-ejbPU</persistence-unit-name>
             * </persistence-context-ref>
             * <resource-ref>
             * <res-ref-name>UserTransaction</res-ref-name>
             * <res-type>javax.transaction.UserTransaction</res-type>
             * <res-auth>Container</res-auth>
             * </resource-ref> */
            try {
                Context ctx = new InitialContext();
                UserTransaction utx = (UserTransaction) ctx.lookup("java:comp/env/UserTransaction");
                utx.begin();
                EntityManager em = (EntityManager) ctx.lookup("java:comp/env/persistence/LogicalName");
                em.persist(object);
                utx.commit();
            } catch (Exception e) {
                java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE, "exception caught", e);
                throw new RuntimeException(e);
    }doctor session bean code
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package doc;
    import java.util.List;
    import javax.ejb.Stateful;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    * @author kriem
    @Stateful
    public class DoctorFacade implements DoctorFacadeRemote {
        @PersistenceContext
        private EntityManager em;
        public void create(Doctor doctor) {
            em.persist(doctor);
        public void edit(Doctor doctor) {
            em.merge(doctor);
        public void remove(Doctor doctor) {
            em.remove(em.merge(doctor));
        public Doctor find(Object id) {
            return em.find(doc.Doctor.class, id);
        public List<Doctor> findAll() {
        return em.createQuery("select object(o) from Doctor as o").getResultList();
        public void persist(Object object) {
            em.persist(object);
    }doctor remote interface :
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package doc;
    import java.util.List;
    import javax.ejb.Remote;
    * @author kriem
    @Remote
    public interface DoctorFacadeRemote {
        void create(Doctor doctor);
        void edit(Doctor doctor);
        void remove(Doctor doctor);
        Doctor find(Object id);
        List<Doctor> findAll();
        public void persist(java.lang.Object object);
    doctor web service code :
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package task;
    import doc.Doctor;
    import doc.DoctorFacadeRemote;
    import java.util.List;
    import javax.ejb.EJB;
    import javax.ejb.Stateful;
    import javax.jws.Oneway;
    import javax.jws.WebMethod;
    import javax.jws.WebService;
    * @author kriem
    @WebService(serviceName = "taskService")
    @Stateful()
    public class task {
        @EJB
        private DoctorFacadeRemote ejbRef;
        // Add business logic below. (Right-click in editor and choose
        // "Web Service > Add Operation"
        @WebMethod(operationName = "create")
        @Oneway
        public void create(Doctor doctor) {
            ejbRef.create(doctor);
        @WebMethod(operationName = "edit")
        @Oneway
        public void edit(Doctor doctor) {
            ejbRef.edit(doctor);
        @WebMethod(operationName = "remove")
        @Oneway
        public void remove(Doctor doctor) {
            ejbRef.remove(doctor);
        @WebMethod(operationName = "find")
        public Doctor find(Object id) {
            return ejbRef.find(id);
        @WebMethod(operationName = "findAll")
        public List<Doctor> findAll() {
            return ejbRef.findAll();
    .............................and when i try to run for example findall method i got this
    findAll  Method invocation
    Method parameter(s)
    Type     Value
    Service invocation threw an exception with message : null; Refer to the server log for more details
    Exceptions details : java.lang.reflect.InvocationTargetException
    javax.servlet.ServletException: java.lang.reflect.InvocationTargetException at com.sun.enterprise.webservice.monitoring.WebServiceTesterServlet.doPost(WebServiceTesterServlet.java:345) at com.sun.enterprise.webservice.monitoring.WebServiceTesterServlet.invoke(WebServiceTesterServlet.java:121) at com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:148) at javax.servlet.http.HttpServlet.service(HttpServlet.java:738) at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265) at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106) Caused by: java.lang.reflect.InvocationTargetException 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 com.sun.enterprise.webservice.monitoring.WebServiceTesterServlet.doPost(WebServiceTesterServlet.java:316) ... 35 more Caused by: javax.xml.ws.soap.SOAPFaultException: WSTX-SERVICE-5008: Ignoring exception raised while committing transaction at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:187) at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:116) at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:254) at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:224) at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:117) at $Proxy129.findAll(Unknown Source) ... 40 more Caused by: javax.xml.ws.WebServiceException: WSTX-SERVICE-5008: Ignoring exception raised while committing transaction at com.sun.xml.ws.tx.service.TxServerPipe.commitTransaction(TxServerPipe.java:440) at com.sun.xml.ws.tx.service.TxServerPipe.process(TxServerPipe.java:325) at com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:218) at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:129) at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115) at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595) at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554) at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539) at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436) at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243) at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444) at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244) at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135) at com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:159) at javax.servlet.http.HttpServlet.service(HttpServlet.java:738) at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214) at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380) ... 2 more Caused by: javax.transaction.RollbackException: Transaction marked for rollback. at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:413) at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:371) at com.sun.enterprise.distributedtx.UserTransactionImpl.commit(UserTransactionImpl.java:197) at com.sun.xml.ws.tx.service.TxServerPipe.commitTransaction(TxServerPipe.java:436) ... 47 more knowing that this error appears to me when i try any method
    am working on netbean6 and glassfishV2 for my db its oracle
    guys i need any kind of help plzz...........
    Edited by: marwacs on May 18, 2008 1:02 AM
    Edited by: marwacs on May 18, 2008 1:04 AM

    hi guys am working on simple example here is creating an entity bean that reference to table on my database and then create my session bean from that entity bean and am when am trying to access this stateful session bean from web service at the beginning it runs and when i click on any of the function i got the same exception am sorry for my lack of knowledge but i just don`t know what wrong here are my code
    entity bean :/*
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package doc;
    import java.io.Serializable;
    import java.math.BigInteger;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.EntityManager;
    import javax.persistence.Id;
    import javax.persistence.NamedQueries;
    import javax.persistence.NamedQuery;
    import javax.persistence.Table;
    import javax.transaction.UserTransaction;
    * @author kriem
    @Entity
    @Table(name = "DOCTOR")
    @NamedQueries({@NamedQuery(name = "Doctor.findByDocFname",
    query = "SELECT d FROM Doctor d WHERE d.docFname = :docFname"),
            @NamedQuery(name = "Doctor.findByDocId",
            query = "SELECT d FROM Doctor d WHERE d.docId = :docId"),
            @NamedQuery(name = "Doctor.findByDocLname",
            query = "SELECT d FROM Doctor d WHERE d.docLname = :docLname"),
            @NamedQuery(name = "Doctor.findByDocPhone",
            query = "SELECT d FROM Doctor d WHERE d.docPhone = :docPhone"),
            @NamedQuery(name = "Doctor.findByDocAddress",
            query = "SELECT d FROM Doctor d WHERE d.docAddress = :docAddress"),
            @NamedQuery(name = "Doctor.findByDocMobileNo",
            query = "SELECT d FROM Doctor d WHERE d.docMobileNo = :docMobileNo"),
            @NamedQuery(name = "Doctor.findByDocSpecialty",
            query = "SELECT d FROM Doctor d WHERE d.docSpecialty = :docSpecialty"),
            @NamedQuery(name = "Doctor.findByDocTitle",
            query = "SELECT d FROM Doctor d WHERE d.docTitle = :docTitle")})
    public class Doctor implements Serializable {
        private static final long serialVersionUID = 1L;
        @Column(name = "DOC_FNAME", nullable = false)
        private String docFname;
        @Id
        @Column(name = "DOC_ID", nullable = false)
        private String docId;
        @Column(name = "DOC_LNAME", nullable = false)
        private String docLname;
        @Column(name = "DOC_PHONE", nullable = false)
        private BigInteger docPhone;
        @Column(name = "DOC_ADDRESS", nullable = false)
        private String docAddress;
        @Column(name = "DOC_MOBILE_NO", nullable = false)
        private BigInteger docMobileNo;
        @Column(name = "DOC_SPECIALTY", nullable = false)
        private String docSpecialty;
        @Column(name = "DOC_TITLE", nullable = false)
        private String docTitle;
        public Doctor() {
        public Doctor(String docId) {
            this.docId = docId;
        public Doctor(String docId, String docFname, String docLname, BigInteger docPhone, String docAddress, BigInteger docMobileNo, String docSpecialty, String docTitle) {
            this.docId = docId;
            this.docFname = docFname;
            this.docLname = docLname;
            this.docPhone = docPhone;
            this.docAddress = docAddress;
            this.docMobileNo = docMobileNo;
            this.docSpecialty = docSpecialty;
            this.docTitle = docTitle;
        public String getDocFname() {
            return docFname;
        public void setDocFname(String docFname) {
            this.docFname = docFname;
        public String getDocId() {
            return docId;
        public void setDocId(String docId) {
            this.docId = docId;
        public String getDocLname() {
            return docLname;
        public void setDocLname(String docLname) {
            this.docLname = docLname;
        public BigInteger getDocPhone() {
            return docPhone;
        public void setDocPhone(BigInteger docPhone) {
            this.docPhone = docPhone;
        public String getDocAddress() {
            return docAddress;
        public void setDocAddress(String docAddress) {
            this.docAddress = docAddress;
        public BigInteger getDocMobileNo() {
            return docMobileNo;
        public void setDocMobileNo(BigInteger docMobileNo) {
            this.docMobileNo = docMobileNo;
        public String getDocSpecialty() {
            return docSpecialty;
        public void setDocSpecialty(String docSpecialty) {
            this.docSpecialty = docSpecialty;
        public String getDocTitle() {
            return docTitle;
        public void setDocTitle(String docTitle) {
            this.docTitle = docTitle;
        @Override
        public int hashCode() {
            int hash = 0;
            hash += (docId != null ? docId.hashCode() : 0);
            return hash;
        @Override
        public boolean equals(Object object) {
            // TODO: Warning - this method won't work in the case the id fields are not set
            if (!(object instanceof Doctor)) {
                return false;
            Doctor other = (Doctor) object;
            if ((this.docId == null && other.docId != null) || (this.docId != null && !this.docId.equals(other.docId))) {
                return false;
            return true;
        @Override
        public String toString() {
            return "doc.Doctor[docId=" + docId + "]";
        public void persist(Object object) {
            /* Add this to the deployment descriptor of this module (e.g. web.xml, ejb-jar.xml):
             * <persistence-context-ref>
             * <persistence-context-ref-name>persistence/LogicalName</persistence-context-ref-name>
             * <persistence-unit-name>task-ejbPU</persistence-unit-name>
             * </persistence-context-ref>
             * <resource-ref>
             * <res-ref-name>UserTransaction</res-ref-name>
             * <res-type>javax.transaction.UserTransaction</res-type>
             * <res-auth>Container</res-auth>
             * </resource-ref> */
            try {
                Context ctx = new InitialContext();
                UserTransaction utx = (UserTransaction) ctx.lookup("java:comp/env/UserTransaction");
                utx.begin();
                EntityManager em = (EntityManager) ctx.lookup("java:comp/env/persistence/LogicalName");
                em.persist(object);
                utx.commit();
            } catch (Exception e) {
                java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE, "exception caught", e);
                throw new RuntimeException(e);
    }doctor session bean code
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package doc;
    import java.util.List;
    import javax.ejb.Stateful;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    * @author kriem
    @Stateful
    public class DoctorFacade implements DoctorFacadeRemote {
        @PersistenceContext
        private EntityManager em;
        public void create(Doctor doctor) {
            em.persist(doctor);
        public void edit(Doctor doctor) {
            em.merge(doctor);
        public void remove(Doctor doctor) {
            em.remove(em.merge(doctor));
        public Doctor find(Object id) {
            return em.find(doc.Doctor.class, id);
        public List<Doctor> findAll() {
        return em.createQuery("select object(o) from Doctor as o").getResultList();
        public void persist(Object object) {
            em.persist(object);
    }doctor remote interface :
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package doc;
    import java.util.List;
    import javax.ejb.Remote;
    * @author kriem
    @Remote
    public interface DoctorFacadeRemote {
        void create(Doctor doctor);
        void edit(Doctor doctor);
        void remove(Doctor doctor);
        Doctor find(Object id);
        List<Doctor> findAll();
        public void persist(java.lang.Object object);
    doctor web service code :
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package task;
    import doc.Doctor;
    import doc.DoctorFacadeRemote;
    import java.util.List;
    import javax.ejb.EJB;
    import javax.ejb.Stateful;
    import javax.jws.Oneway;
    import javax.jws.WebMethod;
    import javax.jws.WebService;
    * @author kriem
    @WebService(serviceName = "taskService")
    @Stateful()
    public class task {
        @EJB
        private DoctorFacadeRemote ejbRef;
        // Add business logic below. (Right-click in editor and choose
        // "Web Service > Add Operation"
        @WebMethod(operationName = "create")
        @Oneway
        public void create(Doctor doctor) {
            ejbRef.create(doctor);
        @WebMethod(operationName = "edit")
        @Oneway
        public void edit(Doctor doctor) {
            ejbRef.edit(doctor);
        @WebMethod(operationName = "remove")
        @Oneway
        public void remove(Doctor doctor) {
            ejbRef.remove(doctor);
        @WebMethod(operationName = "find")
        public Doctor find(Object id) {
            return ejbRef.find(id);
        @WebMethod(operationName = "findAll")
        public List<Doctor> findAll() {
            return ejbRef.findAll();
    .............................and when i try to run for example findall method i got this
    findAll  Method invocation
    Method parameter(s)
    Type     Value
    Service invocation threw an exception with message : null; Refer to the server log for more details
    Exceptions details : java.lang.reflect.InvocationTargetException
    javax.servlet.ServletException: java.lang.reflect.InvocationTargetException at com.sun.enterprise.webservice.monitoring.WebServiceTesterServlet.doPost(WebServiceTesterServlet.java:345) at com.sun.enterprise.webservice.monitoring.WebServiceTesterServlet.invoke(WebServiceTesterServlet.java:121) at com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:148) at javax.servlet.http.HttpServlet.service(HttpServlet.java:738) at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265) at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106) Caused by: java.lang.reflect.InvocationTargetException 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 com.sun.enterprise.webservice.monitoring.WebServiceTesterServlet.doPost(WebServiceTesterServlet.java:316) ... 35 more Caused by: javax.xml.ws.soap.SOAPFaultException: WSTX-SERVICE-5008: Ignoring exception raised while committing transaction at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:187) at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:116) at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:254) at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:224) at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:117) at $Proxy129.findAll(Unknown Source) ... 40 more Caused by: javax.xml.ws.WebServiceException: WSTX-SERVICE-5008: Ignoring exception raised while committing transaction at com.sun.xml.ws.tx.service.TxServerPipe.commitTransaction(TxServerPipe.java:440) at com.sun.xml.ws.tx.service.TxServerPipe.process(TxServerPipe.java:325) at com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:218) at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:129) at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115) at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595) at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554) at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539) at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436) at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243) at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444) at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244) at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135) at com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:159) at javax.servlet.http.HttpServlet.service(HttpServlet.java:738) at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214) at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380) ... 2 more Caused by: javax.transaction.RollbackException: Transaction marked for rollback. at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:413) at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:371) at com.sun.enterprise.distributedtx.UserTransactionImpl.commit(UserTransactionImpl.java:197) at com.sun.xml.ws.tx.service.TxServerPipe.commitTransaction(TxServerPipe.java:436) ... 47 more knowing that this error appears to me when i try any method
    am working on netbean6 and glassfishV2 for my db its oracle
    guys i need any kind of help plzz...........
    Edited by: marwacs on May 18, 2008 1:02 AM
    Edited by: marwacs on May 18, 2008 1:04 AM

  • Options to insert a BigInteger in a file

    Good days,
    As the title says, this more than a doubt is a search of alternatives.
    I have a program that performs calculations whose result is a number of several dozens of thousands of digits saved in a variable of type BigInteger. At the moment of returning the result, I use a file to save it.
    The problem appears at the moment of handling the number to be able to insert it in the file, because it takes a lot of time. In the last execution that I have done, it took 8 minutes to compute, 19 minutes to transform the BigInteger to a String and barely a second to insert it into the file.
    The question is whether anyone knows any more efficient way to perform this step, perhaps with an alternative class to BufferedWriter that I have used to insert in the file and in which we need a char or String as a parameter.
    Is important that the file could be read directly by a human.
    Regards and thanks.

    I don't know how NIO API can help me.
    The only quick way I've found to insert the BigInteger in a file is using an ObjectOutputStream, but this creates a file unreadable to me and when I use the method toString() to insert as a String having it readable, it takes too time.
    Before opening this item, I've been looking all the types of buffers and OutpuStreams that I found on the API, several of them mentioned in the NIO API, and I've tested to see if some served me. At the end I haven't found any which allow me to avoid the method toString().
    Edited by: JaimeLG on Sep 8, 2008 12:35 PM

  • Desperate, help please Servlet.service() for servlet jsp threw exception

    Hi,
    I have completed 99.99% of project development, when I am about to deploy JSC throws "Servlet.service() for servlet jsp threw exception javax.faces.el.EvaluationException: java.lang.NullPointerException" I can't understand why.
    My application was working absolutely fine, I can't understand why its throwing exception now.
    I tried debuging, but i can't understand where exactly its throwing exception and whats the error.
    I would really appreciate your help, I have spent almost a day trying to figure out but din't get anywhere.
    here is my server.log
    Starting Sun Java System Application Server Platform Edition 8.0.0_01 (build b08-fcs) ...
    [#|2005-08-23T11:44:39.221+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=10;|CORE5076: Using [Java HotSpot(TM) Client VM, Version 1.4.2_06] from [Sun Microsystems Inc.]|#]
    [#|2005-08-23T11:44:42.025+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.tools.admin|_ThreadID=10;|ADM0020:Following is the information about the JMX MBeanServer used:|#]
    [#|2005-08-23T11:44:42.327+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.tools.admin|_ThreadID=10;|ADM0001:MBeanServer initialized successfully|#]
    [#|2005-08-23T11:44:44.572+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=10;|Creating virtual server server|#]
    [#|2005-08-23T11:44:44.598+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=10;|S1AS AVK Instrumentation disabled|#]
    [#|2005-08-23T11:44:44.616+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core.security|_ThreadID=10;|SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.|#]
    [#|2005-08-23T11:44:51.061+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core.transaction|_ThreadID=10;|JTS5014: Recoverable JTS instance, serverId = [100]|#]
    [#|2005-08-23T11:44:53.917+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=10;|Satisfying Optional Packages dependencies...|#]
    [#|2005-08-23T11:44:54.400+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=10;|RAR7008 : Initialized monitoring registry and listeners|#]
    [#|2005-08-23T11:44:56.346+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=10;|CORE5100:Loading system apps|#]
    [#|2005-08-23T11:44:58.494+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.ejb|_ThreadID=10;|EJB5109:EJB Timer Service started successfully for datasource [jdbc/__TimerPool]|#]
    [#|2005-08-23T11:44:58.494+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core.classloading|_ThreadID=10;|LDR5010: All ejb(s) of [__ejb_container_timer_app] loaded successfully!|#]
    [#|2005-08-23T11:44:59.954+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core.classloading|_ThreadID=10;|LDR5010: All ejb(s) of [MEjbApp] loaded successfully!|#]
    [#|2005-08-23T11:45:01.401+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core.classloading|_ThreadID=10;|LDR5010: All ejb(s) of [ConverterApp] loaded successfully!|#]
    [#|2005-08-23T11:45:01.407+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=10;|WEB0100: Loading web module [ConverterApp:war-ic.war] in virtual server [server] at [converter]|#]
    [#|2005-08-23T11:45:02.500+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core.classloading|_ThreadID=10;|LDR5010: All ejb(s) of [travelApp] loaded successfully!|#]
    [#|2005-08-23T11:45:02.792+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core.classloading|_ThreadID=10;|LDR5010: All ejb(s) of [HelloWorldApp] loaded successfully!|#]
    [#|2005-08-23T11:45:02.798+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=10;|WEB0302: Starting Tomcat.|#]
    [#|2005-08-23T11:45:03.281+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=10;|WEB0100: Loading web module [adminapp] in virtual server [server] at [web1]|#]
    [#|2005-08-23T11:45:03.335+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=10;|WEB0100: Loading web module [admingui] in virtual server [server] at [asadmin]|#]
    [#|2005-08-23T11:45:03.338+0100|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=10;|WEB0500: default-locale attribute of locale-charset-info element has been deprecated and is being ignored. Use default-charset attribute of parameter-encoding element instead|#]
    [#|2005-08-23T11:45:03.351+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=10;|WEB0100: Loading web module [com_sun_web_ui] in virtual server [server] at [com_sun_web_ui]|#]
    [#|2005-08-23T11:45:03.371+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=10;|WEB0100: Loading web module [jTravellerService] in virtual server [server] at [jTravellerService]|#]
    [#|2005-08-23T11:45:03.399+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=10;|WEB0100: Loading web module [hello-jaxrpc] in virtual server [server] at [hello-jaxrpc]|#]
    [#|2005-08-23T11:45:03.427+0100|INFO|sun-appserver-pe8.0.0_01|org.apache.catalina.startup.Embedded|_ThreadID=10;|Starting tomcat server|#]
    [#|2005-08-23T11:45:03.428+0100|INFO|sun-appserver-pe8.0.0_01|org.apache.catalina.startup.Embedded|_ThreadID=10;|Catalina naming disabled|#]
    [#|2005-08-23T11:45:03.637+0100|INFO|sun-appserver-pe8.0.0_01|org.apache.catalina.core.StandardEngine|_ThreadID=10;|Starting Servlet Engine: Sun-Java-System/Application-Server-PE-8.0|#]
    [#|2005-08-23T11:45:13.214+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.resource.webservices.rpc.server.http|_ThreadID=10;|JAXRPC.JAXRPCSERVLET.12: JAX-RPC context listener initializing|#]
    [#|2005-08-23T11:45:14.087+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.resource.webservices.rpc.server.http|_ThreadID=10;|JAXRPC.JAXRPCSERVLET.14: JAX-RPC servlet initializing|#]
    [#|2005-08-23T11:45:14.268+0100|INFO|sun-appserver-pe8.0.0_01|org.apache.catalina.startup.ContextConfig|_ThreadID=10;|Missing application web.xml, using defaults only StandardEngine[server].StandardHost[server].StandardContext[]|#]
    [#|2005-08-23T11:45:18.600+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.resource.webservices.rpc.server.http|_ThreadID=10;|JAXRPC.JAXRPCSERVLET.12: JAX-RPC context listener initializing|#]
    [#|2005-08-23T11:45:18.657+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.resource.webservices.rpc.server.http|_ThreadID=10;|JAXRPC.JAXRPCSERVLET.14: JAX-RPC servlet initializing|#]
    [#|2005-08-23T11:45:20.710+0100|INFO|sun-appserver-pe8.0.0_01|org.apache.coyote.http11.Http11Protocol|_ThreadID=10;|Initializing Coyote HTTP/1.1 on port 18080|#]
    [#|2005-08-23T11:45:20.790+0100|INFO|sun-appserver-pe8.0.0_01|org.apache.coyote.http11.Http11Protocol|_ThreadID=10;|Starting Coyote HTTP/1.1 on port 18080|#]
    [#|2005-08-23T11:45:21.125+0100|INFO|sun-appserver-pe8.0.0_01|org.apache.coyote.http11.Http11Protocol|_ThreadID=10;|Initializing Coyote HTTP/1.1 on port 11043|#]
    [#|2005-08-23T11:45:21.144+0100|INFO|sun-appserver-pe8.0.0_01|org.apache.coyote.http11.Http11Protocol|_ThreadID=10;|Starting Coyote HTTP/1.1 on port 11043|#]
    [#|2005-08-23T11:45:21.503+0100|INFO|sun-appserver-pe8.0.0_01|org.apache.coyote.http11.Http11Protocol|_ThreadID=10;|Initializing Coyote HTTP/1.1 on port 14848|#]
    [#|2005-08-23T11:45:21.537+0100|INFO|sun-appserver-pe8.0.0_01|org.apache.coyote.http11.Http11Protocol|_ThreadID=10;|Starting Coyote HTTP/1.1 on port 14848|#]
    [#|2005-08-23T11:45:21.989+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.resource.jms|_ThreadID=10;|JMS5023: JMS service successfully started. Instance Name = imqbroker, Home = [/opt/Creator/SunAppServer8/imq/bin].|#]
    [#|2005-08-23T11:45:22.003+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.tools.admin|_ThreadID=10;|[AutoDeploy] Enabling AutoDeployment service at :1124793922003|#]
    [#|2005-08-23T11:45:22.009+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=10;|CORE5053: Application onReady complete.|#]
    [#|2005-08-23T11:45:22.012+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=10;|Application server startup complete.|#]
    [#|2005-08-23T11:45:27.303+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.tools.admin|_ThreadID=11;|ADM1041:Sent the event to instance:[ResourceDeployEvent -- deploy jcp/RaveGenerated_1124793926_NFDBPool]|#]
    [#|2005-08-23T11:45:28.918+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=11;|CORE5004: Resource Deployed: [jcp:RaveGenerated_1124793926_NFDBPool].|#]
    [#|2005-08-23T11:45:29.169+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.tools.admin|_ThreadID=11;|ADM1041:Sent the event to instance:[ResourceDeployEvent -- deploy jdbc/jdbc/NFDB]|#]
    [#|2005-08-23T11:45:29.365+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=11;|CORE5004: Resource Deployed: [jdbc:jdbc/NFDB].|#]
    [#|2005-08-23T11:45:31.996+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.tools.deployment|_ThreadID=11;|DPL5109: EJBC - START of EJBC for [_linnfdb]|#]
    [#|2005-08-23T11:45:31.999+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.tools.deployment|_ThreadID=11;|Processing beans ...|#]
    [#|2005-08-23T11:45:32.032+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.tools.deployment|_ThreadID=11;|DPL5110: EJBC - END of EJBC for [_linnfdb]|#]
    [#|2005-08-23T11:45:32.915+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.tools.deployment|_ThreadID=11;|Total Deployment Time: 2082 msec, Total EJB Compiler Module Time: 37 msec, Portion spent EJB Compiling: 1%
    Breakdown of EJBC Module Time: Total Time for EJBC: 37 msec, CMP Generation: 0 msec (0%), Java Compilation: 0 msec (0%), RMI Compilation: 0 msec (0%), JAX-RPC Generation: 19 msec (51%),
    |#]
    [#|2005-08-23T11:45:32.928+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.tools.deployment|_ThreadID=11;|deployed with moduleid = _linnfdb|#]
    [#|2005-08-23T11:45:32.990+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.tools.admin|_ThreadID=11;|ADM1041:Sent the event to instance:[ModuleDeployEvent -- deploy web/_linnfdb]|#]
    [#|2005-08-23T11:45:33.275+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.tools.admin|_ThreadID=11;|ADM1041:Sent the event to instance:[ModuleDeployEvent -- enable web/_linnfdb]|#]
    [#|2005-08-23T11:45:33.352+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=11;|WEB0100: Loading web module [_linnfdb] in virtual server [server] at [linnfdb]|#]
    [#|2005-08-23T11:45:34.837+0100|WARNING|sun-appserver-pe8.0.0_01|org.apache.commons.beanutils.MethodUtils|_ThreadID=11;|Cannot use JVM pre-1.4 access bug workaround die to restrictive security manager.|#]
    [#|2005-08-23T11:45:35.346+0100|WARNING|sun-appserver-pe8.0.0_01|org.apache.commons.digester.Digester|_ThreadID=11;|[ConverterRule]{faces-config/converter} Merge(null,java.math.BigDecimal)|#]
    [#|2005-08-23T11:45:35.364+0100|WARNING|sun-appserver-pe8.0.0_01|org.apache.commons.digester.Digester|_ThreadID=11;|[ConverterRule]{faces-config/converter} Merge(null,java.math.BigInteger)|#]
    [#|2005-08-23T11:45:37.265+0100|INFO|sun-appserver-pe8.0.0_01|com.sun.faces.config.ConfigureListener|_ThreadID=11;|Application object verification completed successfully|#]
    [#|2005-08-23T11:45:37.396+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.tools.admin|_ThreadID=11;|ADM1042:Status of dynamic reconfiguration event processing:[success]|#]
    [#|2005-08-23T11:46:28.167+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.stream.out|_ThreadID=12;|login successfull145|#]
    [#|2005-08-23T11:46:28.961+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.stream.out|_ThreadID=12;|
    assigned to user query|#]
    [#|2005-08-23T11:46:34.715+0100|SEVERE|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=12;|ApplicationDispatcher[/linnfdb] Servlet.service() for servlet jsp threw exception
    javax.faces.el.EvaluationException: java.lang.NullPointerException      
    at
    com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:206)
         at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
         at javax.faces.component.UISelectItems.getValue(UISelectItems.java:110)
         at com.sun.faces.util.Util.getSelectItems(Util.java:602)
         at com.sun.faces.renderkit.html_basic.MenuRenderer.getOptionNumber(MenuRenderer.java:488)
         at com.sun.faces.renderkit.html_basic.MenuRenderer.renderSelect(MenuRenderer.java:465)
         at com.sun.faces.renderkit.html_basic.MenuRenderer.encodeEnd(MenuRenderer.java:430)
         at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:720)
         at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:443)
         at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:130)
         at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
         at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:435)
         at com.sun.faces.renderkit.html_basic.TableRenderer.encodeBegin(TableRenderer.java:113)
         at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:683)
         at javax.faces.component.UIData.encodeBegin(UIData.java:681)
         at javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:591)
         at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:543)
         at com.sun.faces.taglib.html_basic.DataTableTag.doEndTag(DataTableTag.java:491)
         at org.apache.jsp.NationalFaultsDataBase_jsp._jspx_meth_h_dataTable_0(NationalFaultsDataBase_jsp.java:581)
         at org.apache.jsp.NationalFaultsDataBase_jsp._jspx_meth_h_form_0(NationalFaultsDataBase_jsp.java:331)
         at org.apache.jsp.NationalFaultsDataBase_jsp._jspx_meth_f_view_0(NationalFaultsDataBase_jsp.java:291)
         at org.apache.jsp.NationalFaultsDataBase_jsp._jspService(NationalFaultsDataBase_jsp.java:182)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:102)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:282)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:263)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:210)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
         at sun.reflect.GeneratedMethodAccessor84.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:236)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:145)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:141)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:718)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:478)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:413)
         at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:77)
         at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:92)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:319)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
         at com.sun.jsfcl.app.ViewHandlerImpl.renderView(ViewHandlerImpl.java:181)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         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:324)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:236)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:145)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:141)
         at linnfdb.data.SecurityCheckFilter.doFilter(SecurityCheckFilter.java:102)
         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:324)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:218)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:188)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:145)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:141)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:214)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:168)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:133)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:539)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at com.sun.enterprise.webservice.EjbWebServiceValve.invoke(EjbWebServiceValve.java:134)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at com.sun.enterprise.security.web.SingleSignOn.invoke(SingleSignOn.java:254)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at com.sun.enterprise.web.VirtualServerValve.invoke(VirtualServerValve.java:209)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:114)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
         at com.sun.enterprise.web.VirtualServerMappingValve.invoke(VirtualServerMappingValve.java:166)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:936)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:165)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:683)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:604)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:542)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:647)
         at java.lang.Thread.run(Thread.java:534)
    Caused by: java.lang.NullPointerException
         at com.sun.jsfcl.data.ResultSetPropertyResolver$ColumnData.getSelectItems(ResultSetPropertyResolver.java:303)
         at com.sun.jsfcl.data.ResultSetPropertyResolver.getValue(ResultSetPropertyResolver.java:61)
         at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:167)
         at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:151)
         at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
         at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)
         ... 115 more
    |#]
    any help will be greatly appreciated. Pleaseeeeeeeeeeeeee can some get back to me.
    Cheers
    kumar

    hi,
    I just found that this exception is thrown from function
    public UIViewRoot createView(FacesContext context, String viewId) {
    UIViewRoot viewRoot = handler.createView(context, viewId);
    context.getExternalContext().getRequestMap().put(CREATED_VIEW, viewId);
    setupPageBean(context, viewRoot);
    return viewRoot;
    in viewHandlerImpl.java.
    Has anyone got ideas about this???
    Any help will be greatly appreciated.
    cheers
    kush

  • SUN TEAM Pl Help - Using EJB in JSC

    When I posted the following, as of now there are over 33 viewers who still haven't replied yet. Could you guys help me out? I'm your spokensman around here in Auckland, planning to make JSC as a part and parcel of our Java curriculum.
    The NetBeans 5.5 tutorial is out of sync with the IDE. However, with the IDE I created a simple sessionbean with one business method that returns a hardcoded value of type String. This was housed in a EJBModule called EJBModule1. I added this to Creator-2 and dragged the only method called m1() into the SessionBean of Creator-2. I included a button and a staticText and the code given below. Building the project was successful. When it was run, on clicking the button, the following error was displayed:
    com.sun.data.provider.DataProviderException: java.lang.reflect.InvocationTargetException
    The code:
    public String button1_action() {
    try {
    String name = (String) getSessionBean1().getMySessionRemoteM15().getResultObject();
    staticText1.setText(name);
    } catch (Exception e) {error(e.toString());}
    return null;
    }

    Thanx 4 responding Antonio, here comes what u hopefully required.
    Mary
    [#|2006-12-09T09:32:08.500+1300|INFO|sun-appserver-pe8.2|javax.enterprise.system.tools.admin|_ThreadID=14;|ADM1041:Sent the event to instance:[ModuleDeployEvent -- undeploy web/WebApplication2]|#]
    [#|2006-12-09T09:32:09.109+1300|INFO|sun-appserver-pe8.2|javax.enterprise.system.tools.admin|_ThreadID=14;|ADM1042:Status of dynamic reconfiguration event processing:[success]|#]
    [#|2006-12-09T09:32:09.125+1300|INFO|sun-appserver-pe8.2|javax.enterprise.system.tools.admin|_ThreadID=13;|ADM1041:Sent the event to instance:[ApplicationDeployEvent -- reference-removed WebApplication2]|#]
    [#|2006-12-09T09:32:09.156+1300|INFO|sun-appserver-pe8.2|javax.enterprise.system.tools.admin|_ThreadID=13;|ADM1042:Status of dynamic reconfiguration event processing:[success]|#]
    [#|2006-12-09T09:32:09.593+1300|INFO|sun-appserver-pe8.2|javax.enterprise.system.tools.deployment|_ThreadID=17;|DPL5109: EJBC - START of EJBC for [WebApplication2]|#]
    [#|2006-12-09T09:32:09.593+1300|INFO|sun-appserver-pe8.2|javax.enterprise.system.tools.deployment|_ThreadID=17;|Processing beans ...|#]
    [#|2006-12-09T09:32:09.593+1300|INFO|sun-appserver-pe8.2|javax.enterprise.system.tools.deployment|_ThreadID=17;|DPL5110: EJBC - END of EJBC for [WebApplication2]|#]
    [#|2006-12-09T09:32:09.687+1300|INFO|sun-appserver-pe8.2|javax.enterprise.system.tools.deployment|_ThreadID=17;|Total Deployment Time: 469 msec, Total EJB Compiler Module Time: 16 msec, Portion spent EJB Compiling: 3%
    Breakdown of EJBC Module Time: Total Time for EJBC: 16 msec, CMP Generation: 0 msec (0%), Java Compilation: 0 msec (0%), RMI Compilation: 0 msec (0%), JAX-RPC Generation: 0 msec (0%),
    |#]
    [#|2006-12-09T09:32:09.734+1300|INFO|sun-appserver-pe8.2|javax.enterprise.system.tools.deployment|_ThreadID=17;|deployed with moduleid = WebApplication2|#]
    [#|2006-12-09T09:32:09.906+1300|INFO|sun-appserver-pe8.2|javax.enterprise.system.tools.admin|_ThreadID=14;|ADM1041:Sent the event to instance:[ApplicationDeployEvent -- reference-added WebApplication2]|#]
    [#|2006-12-09T09:32:09.953+1300|INFO|sun-appserver-pe8.2|javax.enterprise.system.tools.admin|_ThreadID=14;|ADM1042:Status of dynamic reconfiguration event processing:[success]|#]
    [#|2006-12-09T09:32:09.968+1300|INFO|sun-appserver-pe8.2|javax.enterprise.system.tools.admin|_ThreadID=13;|ADM1041:Sent the event to instance:[ModuleDeployEvent -- deploy web/WebApplication2]|#]
    [#|2006-12-09T09:32:09.984+1300|INFO|sun-appserver-pe8.2|javax.enterprise.system.container.web|_ThreadID=13;|WEB0100: Loading web module [WebApplication2] in virtual server [server] at [WebApplication2]|#]
    [#|2006-12-09T09:32:10.812+1300|WARNING|sun-appserver-pe8.2|org.apache.commons.beanutils.MethodUtils|_ThreadID=13;|Cannot use JVM pre-1.4 access bug workaround die to restrictive security manager.|#]
    [#|2006-12-09T09:32:11.093+1300|WARNING|sun-appserver-pe8.2|org.apache.commons.digester.Digester|_ThreadID=13;|[ComponentRule]{faces-config/component} Merge(com.sun.rave.web.ui.Time)|#]
    [#|2006-12-09T09:32:11.265+1300|WARNING|sun-appserver-pe8.2|org.apache.commons.digester.Digester|_ThreadID=13;|[ConverterRule]{faces-config/converter} Merge(null,java.math.BigDecimal)|#]
    [#|2006-12-09T09:32:11.265+1300|WARNING|sun-appserver-pe8.2|org.apache.commons.digester.Digester|_ThreadID=13;|[ConverterRule]{faces-config/converter} Merge(null,java.math.BigInteger)|#]
    [#|2006-12-09T09:32:12.312+1300|INFO|sun-appserver-pe8.2|javax.enterprise.system.tools.admin|_ThreadID=13;|ADM1042:Status of dynamic reconfiguration event processing:[success]|#]
    [#|2006-12-09T09:32:34.468+1300|WARNING|sun-appserver-pe8.2|javax.enterprise.resource.corba.ee.S1AS-ORB.rpc.transport|_ThreadID=18;|"IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
    org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
         at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
         at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
         at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
         at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
         at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
         at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
         at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
         at org.omg.CosNaming.NamingContextExtHelper.narrow(NamingContextExtHelper.java:73)
         at com.sun.corba.ee.impl.resolver.INSURLOperationImpl.resolveCorbaname(INSURLOperationImpl.java:174)
         at com.sun.corba.ee.impl.resolver.INSURLOperationImpl.resolveINSURL(INSURLOperationImpl.java:127)
         at com.sun.corba.ee.impl.resolver.INSURLOperationImpl.operate(INSURLOperationImpl.java:117)
         at com.sun.corba.ee.impl.orb.ORBImpl.string_to_object(ORBImpl.java:883)
         at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:723)
         at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:132)
         at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:286)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at ejb.mysessionremote.MySessionRemoteClient.create(MySessionRemoteClient.java:30)
         at ejb.mysessionremote.MySessionRemoteClient.m1(MySessionRemoteClient.java:45)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.data.provider.impl.MethodResultTableDataProvider.invokeDataMethod(MethodResultTableDataProvider.java:236)
         at com.sun.data.provider.impl.MethodResultTableDataProvider.invokeDataMethod(MethodResultTableDataProvider.java:215)
         at com.sun.data.provider.impl.MethodResultTableDataProvider.testInvokeDataMethod(MethodResultTableDataProvider.java:267)
         at com.sun.data.provider.impl.MethodResultTableDataProvider.getResultObject(MethodResultTableDataProvider.java:123)
         at webapplication2.Page1.button1_action(Page1.java:239)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
         at com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListenerImpl.java:57)
         at javax.faces.component.UICommand.broadcast(UICommand.java:312)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:210)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:189)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:604)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:475)
         at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:371)
         at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:264)
         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:281)
         at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:83)
    Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
         at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
         ... 77 more
    Caused by: java.net.ConnectException: Connection refused: connect
         at sun.nio.ch.Net.connect(Native Method)
         at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:464)
         at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
         at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
         ... 78 more
    |#]
    [#|2006-12-09T09:32:35.562+1300|WARNING|sun-appserver-pe8.2|javax.enterprise.resource.corba.ee.S1AS-ORB.rpc.transport|_ThreadID=18;|"IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
    org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
         at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
         at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
         at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
         at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
         at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
         at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
         at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
         at org.omg.CosNaming.NamingContextExtHelper.narrow(NamingContextExtHelper.java:73)
         at com.sun.corba.ee.impl.resolver.INSURLOperationImpl.resolveCorbaname(INSURLOperationImpl.java:174)
         at com.sun.corba.ee.impl.resolver.INSURLOperationImpl.resolveINSURL(INSURLOperationImpl.java:127)
         at com.sun.corba.ee.impl.resolver.INSURLOperationImpl.operate(INSURLOperationImpl.java:117)
         at com.sun.corba.ee.impl.orb.ORBImpl.string_to_object(ORBImpl.java:883)
         at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:723)
         at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:132)
         at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:286)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at ejb.mysessionremote.MySessionRemoteClient.create(MySessionRemoteClient.java:30)
         at ejb.mysessionremote.MySessionRemoteClient.m1(MySessionRemoteClient.java:45)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.data.provider.impl.MethodResultTableDataProvider.invokeDataMethod(MethodResultTableDataProvider.java:236)
         at com.sun.data.provider.impl.MethodResultTableDataProvider.invokeDataMethod(MethodResultTableDataProvider.java:215)
         at com.sun.data.provider.impl.MethodResultTableDataProvider.testInvokeDataMethod(MethodResultTableDataProvider.java:267)
         at com.sun.data.provider.impl.MethodResultTableDataProvider.getResultObject(MethodResultTableDataProvider.java:123)
         at webapplication2.Page1.button1_action(Page1.java:239)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
         at com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListenerImpl.java:57)
         at javax.faces.component.UICommand.broadcast(UICommand.java:312)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:210)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:189)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:604)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:475)
         at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:371)
         at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:264)
         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:281)
         at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:83)
    Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
         at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
         ... 77 more
    Caused by: java.net.ConnectException: Connection refused: connect
         at sun.nio.ch.Net.connect(Native Method)
         at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:464)
         at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
         at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
         ... 78 more
    |#]

  • MD5 and RSA - Slow performance  - Help / Views Required

    Hi,
    I am facing a problem while signing a message.The
    scenario is:
    I have to create 20,000 messages to be sent to
    clients. I am encrypting the message using MD5 and
    RSA.
    But when i am encrypting via RSA it takes about 20
    mins to encrypt the 20k messages.I dont know why its
    taking so much time. I have max 4-5 mins to manipulate
    and send messages. The sample code is as follows:
    ur earliest help will be quite helpful.
    Thanks in advance
    Hassan
    ************** Source Code ****************
    import java.io.IOException;
    import java.math.BigInteger;
    import java.security.KeyFactory;
    import java.security.MessageDigest;
    import java.security.Signature;
    import java.security.PrivateKey;
    import java.security.spec.RSAPrivateKeySpec;
    import org.apache.log4j.Logger;
    public class Signer {
    ******************************************

    Hi Sabre,
    I have compiled the simple code from JCE tutorial for DES. The output text it is showing is different than input text.
    Is there any problem going on in tutorial's example ?
    Regards
    Hamid
    ******** output **************
    the original cleartext is: [B@13a328f
    the encrypted text is: [B@337838
    the final cleartext is: [B@119cca4
    ******** Code ************
    public class jCypher {
    private static Cipher desCipher = null;
    public static void main (String[] args) throws NoSuchAlgorithmException,
    InvalidKeyException, IllegalBlockSizeException, NoSuchProviderException,
    BadPaddingException, NoSuchPaddingException, Exception
    //Creating a Key Generator and Generating a Key
    //public static KeyGenerator getInstance(String algorithm);
    KeyGenerator keygen = KeyGenerator.getInstance("DES");
    SecretKey desKey = keygen.generateKey();
    // Creating a Cipher
    // Cipher.getInstance(Transformation);     
    // c1 = Cipher.getInstance("RSA/ECB/PKCS1Padding");     
    desCipher = Cipher.getInstance("DES/ECB/PKCS5Padding");
    // Cipher.init(int opmode, Key key);
    desCipher.init(Cipher.ENCRYPT_MODE, desKey );
    // Cleartext
    byte[] cleartext = "This is small Text for testing".getBytes();
    System.out.println("the original cleartext is: " + cleartext.toString());
    // Encrypt the cleartext
    // encrypted or decrypted data in one step (single-part operation)
    // public byte[] doFinal(byte[] input);
    byte[] ciphertext = desCipher.doFinal(cleartext);
    System.out.println("the encrypted text is: " + ciphertext.toString());
    // Initialize the same cipher for decryption
    desCipher.init(Cipher.DECRYPT_MODE, desKey );
    // Decrypt the ciphertext
    byte[] cleartext1 = desCipher.doFinal(ciphertext);
    System.out.println("the final cleartext is: " + cleartext1.toString());
    } // End main()
    }

  • Help in applet logic sought

    hello all,
    find below a simple applet which is supposed to print all permutations and combinations of the word entered in textfield irrespective of the length of the word eneterd.
    ur help sought here.
    import java.awt.event.*;
    import java.applet.*;
    import java.awt.*;
    public class kk202 extends Applet implements ActionListener
    String s=new String();
    String s1=new String();
    TextField t1;
    Button b1;
    TextArea tt1;
    public void init()
    add(new Label("Enter a word"));
    t1=new TextField(10);
    add(t1);
    b1=new Button("Result");
    b1.addActionListener(this);
    add(b1);
    tt1=new TextArea(" ",6,20,TextArea.SCROLLBARS_BOTH);
    add(tt1);
    public void actionPerformed(ActionEvent event)
    if(event.getSource()==b1)
    s=t1.getText();
    int n=s.length();
    for(int x=0;x<n;++x)
         for (int y=0;y<n;++y)
              s1=s.substring(y+x,n)+s.substring(x,y+x);
              if ( (x==0) && (y==0) )
                   {tt1.setText(s1);}
              else
                   {tt1.append("\n" +s1);}

    well, no answer. Must not have been that important. Anyway, in the future, it would help if you asked a specific question instead of just posting your code and saying it doesn't work. We know it doesn't work, or you wouldn't be posting. Additionally, some formating would be nice. Try clicking the "special tokens" link before you post next time. It tells how to do all sorts of neat stuff. Well, that said, try this...
    import java.awt.event.*;
    import java.applet.*;
    import java.awt.*;
    class permutation {
        private int[] a;
        private java.math.BigInteger remain;
        private java.math.BigInteger total;
        public permutation(int n) {
            a = new int[n];
            total = getFactorial(n);
            reset();
        public void reset() {
            for (int i = 0; i < a.length; i++) {
                a[i] = i;
            remain = new java.math.BigInteger(total.toString());
        public java.math.BigInteger getNumLeft() {
            return remain;
        public java.math.BigInteger getTotal() {
            return total;
        public boolean hasMore() {
            return remain.compareTo(java.math.BigInteger.ZERO) == 1;
        private static java.math.BigInteger getFactorial(int n) {
            java.math.BigInteger fact = java.math.BigInteger.ONE;
            for (int i = n; i > 1; i--) {
                fact = fact.multiply(new java.math.BigInteger(Integer.toString(i)));
            return fact;
        public int[] getNext() {
            if (remain.equals(total)) {
                remain = remain.subtract(java.math.BigInteger.ONE);
                return a;
            int temp;
            int j = a.length - 2;
            while (a[j] > a[j+1]) {
                j--;
            int k = a.length - 1;
            while (a[j] > a[k]) {
                k--;
            temp = a[k];
            a[k] = a[j];
            a[j] = temp;
            int r = a.length - 1;
            int s = j + 1;
            while (r > s) {
                temp = a[s];
                a[s] = a[r];
                a[r] = temp;
                r--;
                s++;
            remain = remain.subtract(java.math.BigInteger.ONE);
            return a;
    public class kk202 extends Applet implements ActionListener {
        String s=new String();
        String s1=new String();
        TextField t1;
        Button b1;
        TextArea tt1;
        public void init() {
            add(new Label("Enter a word"));
            t1=new TextField(10);
            add(t1);
            b1=new Button("Result");
            b1.addActionListener(this);
            add(b1);
            tt1=new TextArea(" ",6,20,TextArea.SCROLLBARS_BOTH);
            add(tt1);
        public void actionPerformed(ActionEvent event) {
            if(event.getSource()==b1) {
                tt1.setText("");
                s=t1.getText();
                int n=s.length();
                java.util.Vector elements = new java.util.Vector();
                for(int x=0;x<n;x++) {
                    elements.add(s.substring(x,x+1));
                int[] indices;
                permutation x = new permutation(elements.size());
                StringBuffer perm;
                while (x.hasMore()) {
                    perm = new StringBuffer();
                    indices = x.getNext();
                    for (int i = 0; i < indices.length; i++) {
                        perm.append((String)elements.elementAt(indices));
    tt1.append(perm.toString()+"\n");

Maybe you are looking for

  • BSOD (BAD_POOL_HEADER) when scanning for Inventory

    Hi All I've set up a small testsite here. It's a quite simple setup, with a few servers, a Zen10 CM server, and a few workstations. It's all working quite nicely, but one of the machines does a BSOD (BAD_POOL_HEADER) when I ask it to do inventory. Ta

  • Partial payment through app

    Hi experts I have a quirey, now I want to run the partial payment trough app, Previous we r running the partial payment manually Any bady can send  additional configuration steps Thanks madhu

  • Ipod touch crashes when in sleep mode... needs to be reset every time

    When my ipod goes into sleep ("slide to unlock") mode and has been left for more than five minutes, it won't come back to life without holding down both buttons to reset it. It also seems to kill the battery when it goes into the crash state. This on

  • Missing "config" command in CLI (Cisco 1140 AP)

    Hi All I am trying to chang IP configuraton for my Cisco 1140 AP, but in CLI I dont have a "config" command (i used en before to enable administrative mode) Bellow are the commands I can see: AP7081.0506.d54a#? Exec commands:   cd               Chang

  • How to achieve Page Navigation in af:table component

    I am using JDeveloper 11.1.1.3. I have a requirement for which i dont know how to proceed. Please guide me on the below requirement. I have an af:table component which displays a list of all the employees from the database. The total number of record