Bouncing off the wall: Problems with passing/using pointers to classes

I have a mostly completed "msPaint" (=assigment) program that is driving me nuts!!!
1. First shape you draw doesn't appear.
1.5 Draw a shape by clicking twice on Panel, can change shape, color, fill with what buttons you see.
2. Subsequently only the newest shape appears. Using System.println(); it appears to be drawing as many shapes as it has made, but it doesn't.
3. I owe much to anyone who helps me, here is complete code. Specifically will ask/reward you to reply to a diff link in which I have dukes, got no answer, and can't reallocate dukes. (=5)
Thank you very much.
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Prog4 extends JApplet implements ActionListener
     //private MainPanel drawingpanel;
     private JPanel top;
     private JPanel left;
     private JPanel bottom;
     private JPanel bottomleft,bottommiddletop,bottommiddle,bottomright;
     //top buttons created
     private JButton first,next,previous,last,help;
     //bottom buttons created
     private JButton custom;
     private JButton white,gray,red,purple,blue,green,yellow,orange;
     private JButton black,darkgray,darkred,darkpurple,darkblue,darkgreen,darkyellow,darkorange;
     private JButton rect,oval,line,solid,hollow,erase;
     private CardLayout drawingscreens;
     private MyShape [] shapes=new MyShape[10];
     private MyShape newshape=new MyShape();     
     private Data information;//=new Data(newshape, shapes);
     private MyPanel temp;//=new MyPanel(information);
     private int thiscard;
     public int x,y;
     //Holder Variable to hold info about shape to be drawn
     int shape;
     int fill;
     int draw;
     int tx,ty,bx,by;
     public void init()
          Container window=getContentPane();
               window.setLayout(new FlowLayout(0,0,FlowLayout.LEFT));
               //Top Button Setup
               first=new JButton("First");
               first.addActionListener(this);
               first.setPreferredSize(new Dimension(100,40));
               next=new JButton("Next");
               next.addActionListener(this);
               next.setPreferredSize(new Dimension(100,40));
               previous=new JButton("Previous");
               previous.addActionListener(this);
               previous.setPreferredSize(new Dimension(100,40));
               last=new JButton("Last");
               last.addActionListener(this);
               last.setPreferredSize(new Dimension(100,40));
               help=new JButton("Help");
               help.addActionListener(this);
               help.setPreferredSize(new Dimension(100,40));
               //TOP PANEL SETUP
               top=new JPanel();
               top.setLayout(new FlowLayout(0,0,FlowLayout.LEFT));
               top.setPreferredSize(new Dimension(800,40));
               top.setOpaque(true);
               top.setBackground(Color.white);
               top.add(first);
               top.add(next);
               top.add(previous);
               top.add(last);
               top.add(help);
               window.add(top);
               //Left Buttons Setup
               rect=new JButton("Rectangle");
               rect.setPreferredSize(new Dimension(100,40));
               rect.addActionListener(this);
               oval=new JButton("Oval");
               oval.setPreferredSize(new Dimension(100,40));
               oval.addActionListener(this);
               line=new JButton("Line");
               line.setPreferredSize(new Dimension(100,40));
               line.addActionListener(this);
               solid=new JButton("Solid");
               solid.setPreferredSize(new Dimension(100,40));
               solid.addActionListener(this);
               hollow=new JButton("Hollow");
               hollow.setPreferredSize(new Dimension(100,40));
               hollow.addActionListener(this);
               erase=new JButton("Erase");
               erase.setPreferredSize(new Dimension(100,40));
               erase.addActionListener(this);
               //Left Panel Setup
               left=new JPanel();
               left.setLayout(new FlowLayout(0,0,FlowLayout.LEFT));
               left.setPreferredSize(new Dimension(200,600));     
               left.add(rect);
               left.add(oval);
               left.add(line);
               left.add(solid);
               left.add(hollow);
               left.add(erase);
               window.add(left);// FlowLayout.LEFT);
               //Middle Setup
               temp=new panel();
               temp.setPreferredSize(new Dimension(600,600));
               temp.setOpaque(true);
               temp.setBackground(Color.red);
               temp.addMouseListener(this);
               window.add(temp);
               //Panel Listener Initailization
               for(int i=0; i<shapes.length; i++)
                    shapes=new MyShape();
               information=new Data(newshape, shapes);
               temp=new MyPanel(information);
               Listener panelListener=new Listener(temp, newshape, information);
               //shapes
               window.add(temp);
               temp.addMouseListener(panelListener);
               //Bottom Buttons Setup
               int bsize=20; //Int for horz/vert size of buttons
               //Left Setup, creates a JPanel which displays the current color
               bottomleft=new JPanel();
               bottomleft.setPreferredSize(new Dimension(2*bsize,2*bsize));
               bottomleft.setLayout(new FlowLayout(0,0, FlowLayout.LEFT));
               bottomleft.setOpaque(true);
               //Middle Setup creates buttons for each pregenerated color in the top row
               black=new JButton();
               black.setPreferredSize(new Dimension(bsize,bsize));
               black.setOpaque(true);
               black.setBackground(new Color(0,0,0));
               black.addActionListener(this);
               darkgray=new JButton();
               darkgray.setPreferredSize(new Dimension(bsize,bsize));
               darkgray.setOpaque(true);
               darkgray.setBackground(new Color(70,70,70));
               darkgray.addActionListener(this);
               darkred=new JButton();
               darkred.setPreferredSize(new Dimension(bsize,bsize));
               darkred.setOpaque(true);
               darkred.setBackground(new Color(180,0,0));
               darkred.addActionListener(this);
               darkpurple=new JButton();
               darkpurple.setPreferredSize(new Dimension(bsize,bsize));
               darkpurple.setOpaque(true);
               darkpurple.setBackground(new Color(185,0,185));
               darkpurple.addActionListener(this);
               darkblue=new JButton();
               darkblue.setPreferredSize(new Dimension(bsize,bsize));
               darkblue.setOpaque(true);
               darkblue.setBackground(new Color(0,0,150));
               darkblue.addActionListener(this);
               darkgreen=new JButton();
               darkgreen.setPreferredSize(new Dimension(bsize,bsize));
               darkgreen.setOpaque(true);
               darkgreen.setBackground(new Color(0,140,0));
               darkgreen.addActionListener(this);
               darkyellow=new JButton();
               darkyellow.setPreferredSize(new Dimension(bsize,bsize));
               darkyellow.setOpaque(true);
               darkyellow.setBackground(new Color(176,176,0));
               darkyellow.addActionListener(this);
               darkorange=new JButton();
               darkorange.setPreferredSize(new Dimension(bsize,bsize));
               darkorange.setOpaque(true);
               darkorange.setBackground(new Color(170,85,0));
               darkorange.addActionListener(this);
               //Adds each button to a Panel
               bottommiddletop=new JPanel();
               bottommiddletop.setLayout(new FlowLayout(0,0,FlowLayout.LEFT));
               bottommiddletop.setPreferredSize(new Dimension(8*bsize,bsize));
               bottommiddletop.add(black);
               bottommiddletop.add(darkgray);
               bottommiddletop.add(darkred);
               bottommiddletop.add(darkpurple);
               bottommiddletop.add(darkblue);
               bottommiddletop.add(darkgreen);
               bottommiddletop.add(darkyellow);
               bottommiddletop.add(darkorange);     
               //Bottom Middle Creates bottom row of colors like top
               white=new JButton();
               white.setPreferredSize(new Dimension(bsize,bsize));
               white.setOpaque(true);
               white.setBackground(new Color(255,255,255));
               white.addActionListener(this);
               gray=new JButton();
               gray.setPreferredSize(new Dimension(bsize,bsize));
               gray.setOpaque(true);
               gray.setBackground(new Color(192,192,192));
               gray.addActionListener(this);
               red=new JButton();
               red.setPreferredSize(new Dimension(bsize,bsize));
               red.setOpaque(true);
               red.setBackground(new Color(255,0,0));
               red.addActionListener(this);
               purple=new JButton();
               purple.setPreferredSize(new Dimension(bsize,bsize));
               purple.setOpaque(true);
               purple.setBackground(new Color(213,0,213));
               purple.addActionListener(this);
               blue=new JButton();
               blue.setPreferredSize(new Dimension(bsize,bsize));
               blue.setOpaque(true);
               blue.setBackground(new Color(0,0,255));
               blue.addActionListener(this);
               green=new JButton();
               green.setPreferredSize(new Dimension(bsize,bsize));
               green.setOpaque(true);
               green.setBackground(new Color(0,255,0));
               green.addActionListener(this);
               yellow=new JButton();
               yellow.setPreferredSize(new Dimension(bsize,bsize));
               yellow.setOpaque(true);
               yellow.setBackground(new Color(255,255,0));
               yellow.addActionListener(this);
               orange=new JButton();
               orange.setPreferredSize(new Dimension(bsize,bsize));
               orange.setOpaque(true);
               orange.setBackground(new Color(244,122,0));
               orange.addActionListener(this);
               //Attaches buttons to a panel
               bottommiddle=new JPanel();
               bottommiddle.setLayout(new FlowLayout(0,0,FlowLayout.LEFT));
               bottommiddle.setPreferredSize(new Dimension(8*bsize,bsize));
               bottommiddle.add(white);
               bottommiddle.add(gray);
               bottommiddle.add(     red);
               bottommiddle.add(purple);
               bottommiddle.add(blue);
               bottommiddle.add(green);
               bottommiddle.add(yellow);
               bottommiddle.add(orange);     
               //Creates middle panel for bottom
               bottom=new JPanel();
               bottom.setLayout(new FlowLayout(0,0,FlowLayout.LEFT));
               bottom.setPreferredSize(new Dimension(8*bsize,2*bsize));
               bottom.add(bottommiddletop);
               bottom.add(bottommiddle);               
               //This is for a button on buttom right to make custom colors.
               //Right Setup creates a button which allows you to make your own color
               custom=new JButton("More");
               custom.setPreferredSize(new Dimension(4*bsize,2*bsize));
               custom.setOpaque(true);
               bottomright=new JPanel();
               bottomright.setLayout(new FlowLayout(0,0,FlowLayout.LEFT));
               bottomright.setPreferredSize(new Dimension(4*bsize,2*bsize));
               bottomright.add(custom);
               //The Panel containing current color is added first
               //Then the two colors panels are added
               //Then the panel with a custom button is added
               window.add(bottomleft);
               window.add(bottom);
               window.add(bottomright);
     public void actionPerformed(ActionEvent e)
          //Buttons to change colors
          if(e.getSource()==black)
               bottomleft.setBackground(new Color(0,0,0));
               newshape.setColor(0,0,0);
          if(e.getSource()==darkgray)
               bottomleft.setBackground(new Color(70,70,70));
               newshape.setColor(70,70,70);
          if(e.getSource()==darkred)
               bottomleft.setBackground(new Color(180,0,0));
               newshape.setColor(180,0,0);
          if(e.getSource()==darkpurple)
               bottomleft.setBackground(new Color(185,0,185));
               newshape.setColor(185,0,185);
          if(e.getSource()==darkblue)
               bottomleft.setBackground(new Color(0,0,150));
               newshape.setColor(0,0,150);
          if(e.getSource()==darkgreen)
               bottomleft.setBackground(new Color(0,140,0));
               newshape.setColor(0,140,0);
          if(e.getSource()==darkyellow)
               bottomleft.setBackground(new Color(176,176,0));
               newshape.setColor(176,176,0);
          if(e.getSource()==darkorange)
               bottomleft.setBackground(new Color(170,85,0));
               newshape.setColor(170,85,0);
          if(e.getSource()==white)
               bottomleft.setBackground(new Color(255,255,255));
               newshape.setColor(255,255,255);
          if(e.getSource()==blue)
               bottomleft.setBackground(new Color(0,0,255));
               newshape.setColor(0,0,255);
          if(e.getSource()==red)
               bottomleft.setBackground(new Color(255,0,0));
               newshape.setColor(255,0,0);
          if(e.getSource()==green)
               bottomleft.setBackground(new Color(0,255,0));
               newshape.setColor(0,255,0);
          if(e.getSource()==purple)
               bottomleft.setBackground(new Color(213,0,213));
               newshape.setColor(213,0,213);
          if(e.getSource()==yellow)
               bottomleft.setBackground(new Color(255,255,0));
               newshape.setColor(255,255,0);
          if(e.getSource()==orange)
               bottomleft.setBackground(new Color(244,122,0));
               newshape.setColor(244,122,0);
          if(e.getSource()==gray)
               bottomleft.setBackground(new Color(192,192,192));
               newshape.setColor(192,192,192);
          //Code for setting shape to draw
          if(e.getSource()==rect)
               setShapes();
               rect.setBackground(Color.blue);               
               newshape.setShape(1);
          if(e.getSource()==line)
               setShapes();
               newshape.setShape(0);
               line.setBackground(Color.blue);
          if(e.getSource()==oval)
               setShapes();
               newshape.setShape(2);
               oval.setBackground(Color.blue);
          //Code for setting to fill or not
          if(e.getSource()==solid)
               solid.setBackground(Color.blue);
               hollow.setBackground(Color.gray);
               newshape.setFill(1);
          if(e.getSource()==hollow)
               hollow.setBackground(Color.blue);
               solid.setBackground(Color.gray);
               newshape.setFill(0);
     public void setShapes()
          rect.setBackground(Color.gray);
          oval.setBackground(Color.gray);
          line.setBackground(Color.gray);
class Data
     private MyShape newshape;
     private MyShape [] shapes;
     public Data(MyShape a, MyShape [] b)
          newshape=a;
          shapes=b;
     public void drawShapes(Graphics g)
          drawAllShapes(g);
     public void sortShapes()
          for(int t=8; t>=0; t--)
               shapes[t+1]=shapes[t];
          shapes[0]=newshape;
          System.out.println("Shapes Sorted");
     public void drawAllShapes(Graphics g)
          newshape.reset(true);
          for(int i=9; i>=0; i--)
               shapes[i].drawShape(g);
          System.out.println("Shapes Drawn??");
class MyPanel extends JPanel
     private Data information;
     public MyPanel(Data a)
          information=a;
          setPreferredSize(new Dimension(600,600));
          setBackground(Color.blue);
     public void paintComponent(Graphics g)
          super.paintComponent(g);
          information.drawShapes(g);
class Listener extends MouseAdapter
     int x,y;
     private int [] loc=new int[4];
     int horzL, vertL;
     private boolean clicked=false;
     private boolean sortonce;
     private MyPanel temp;
     private MyShape newshape;
     private Data information;
     private int xt,yt,xl,yl;
     public Listener(MyPanel d, MyShape b, Data c)
          temp=d;
          newshape=b;          
          information=c;
     public void mouseClicked(MouseEvent e)
          if(clicked==false)
               x=e.getX();
               y=e.getY();
               clicked=true;
          else
          if(clicked==true)
               mouseloc(x,y,e.getX(),e.getY());
               information.sortShapes();
               temp.repaint();
               clicked=false;
     public void mouseloc(int xt,int yt,int xl,int yl)
          loc[0]=xt;
          loc[1]=yt;
          loc[2]=xl;
          loc[3]=yl;
          newshape.setLoc(xt,yt,xl,yl);
          newshape.doDraw(true);
class MyShape
     private int xL, yL, xR, yR; //Local location ints for this class;
     private int red, blue, green; //Local ints defining this color;
     private int shape,fill; //Local info about shape
     private boolean draw=false; // Determines if Shape will draw
     private boolean setupshape=true;
     public void MyShape()
     public void doDraw(boolean a)
          draw=a;
     public void setLoc(int xt,int yt,int xb,int yb)
          xL=xt;
          yL=yt;
          xR=xb;
          yR=yb;
     public void setColor(int r,int b,int g)
          red=r;
          blue=b;
          green=g;
     public void setShape(int thisshape)
          shape=thisshape;
     public void setFill(int fil)
          fill=fil;
     public void drawShape(Graphics g)
          if(draw==true && setupshape==true)
               System.out.println("This shape setup");
               g.setColor(new Color(red,blue,green));
               switch(shape)
                    case 0: makeLine(g);break;
                    case 1: makeRect(g);break;
                    case 2: makeOval(g);break;
               setupshape=false;
          else if(draw==true)
               System.out.println("This shape redrawn");
               switch(shape)
                    case 0: drawLine(g);break;
                    case 1: drawRect(g);break;
                    case 2: drawOval(g);break;
     public void reset(boolean a)
          setupshape=a;
     public void drawLine(Graphics g)
          g.drawLine(xL,yL,xR,yR);
     public void drawRect(Graphics g)
          if(fill==0)
               g.drawRect(xL,yL,xR,yR);
          else
               g.fillRect(xL,yL,xR,yR);
     public void drawOval(Graphics g)
          if(fill==0)
               g.drawOval(xL,yL,xR,yR);
          else
               g.fillOval(xL,yL,xR,yR);
     public void makeLine(Graphics g)
          g.drawLine(xL,yL,xR,yR);
     public void makeRect(Graphics g)
          sortvalue();
          if(fill==0)
               g.drawRect(xL,yL,xR,yR);
          else
               g.fillRect(xL,yL,xR,yR);
     public void makeOval(Graphics g)
          sortvalue();
          if(fill==0)
               g.drawOval(xL,yL,xR,yR);
          else
               g.fillOval(xL,yL,xR,yR);
     public void sortvalue()
               if(xR<xL)
               int temp=xR;
               xR=xL;
               xL=temp;
          if(yR<yL)
               int temp=yR;
               yR=yL;
               yL=temp;
          yR=(yR-yL);
          xR=(xR-xL);     

Sorry mate but you need a lot of work....
I like what you've done but (in my humble opinion) it needs a lot of reworking.
Your problem is you're not storing the shapes. You've set up an array but you never assign the shapes to it. I would reccomend using a vector. Heres a quick bit of pseudo code.
Listener class
mouseClicked method
if first click
get mouse x/y
if second click
get mouse x/y
create new MyShape(x1, y1, x2, y2)
call data.addShape(new MyShape)
Data class
constructor
this.myVector = new Vector()
addShape(MyShape shape) method
this.myVector.addElement(shape) -- add new shape
this.myVector.remove(0) -- remove bottom shape
drawAllShapes method
Enumeration enum= this.myVector.elements()
while(enum.hasMoreElements())
MyShape shape = (MyShape)enum.nextElement()
shape.draw()
Feel free to ask any questions.
Rob.

Similar Messages

  • How do I remove a portrait shadow off the wall?

    how do I remove a portrait shadow off the wall?

    With whatever technique works, presumably cloning?! Sorry, but this is one of those "Can I fly to Mars?" questions. Anything is possible, but you have not provided nearly enough info, most importantly the actual image for reference and then info about your system, your version of PS, your experience level and whatnot.
    Mylenium

  • I have an iPhone 4S-whenever I take a picture using the flash, all I get is a white blob-pictures without the flash are fine.  I tried using different cases, thinking a bounce off the case might be the problem, but the same thing happens.  Any suggestions

    I have an iphone 4s - whenever I take a picture using the flash, all I get is a white "blob".  Pictures without the flash are fine.  I thought the flash bouncing off the case might be the problem, but when I used different cases I still had the same problem.  Any suggestions?

    I have an iphone 4s - whenever I take a picture using the flash, all I get is a white "blob".  Pictures without the flash are fine.  I thought the flash bouncing off the case might be the problem, but when I used different cases I still had the same problem.  Any suggestions?

  • Frustratingly, since I upgraded to Yosemite 10.10, I too am having the worst problems with WiFi dropping out. I've never had this problem before on my iMac 27-inch mid 2011 model. Turning WiFi off and then back on again sometimes works. Help please.

    Frustratingly, since I upgraded to Yosemite 10.10, I too am having the worst problems with WiFi dropping out. I've never had this problem before on my iMac 27-inch mid 2011 model. Turning WiFi off and then back on again sometimes works. Help please. I've already tried a lot of your suggested fixes, but without success. Why hasn't Apple Fixed this?

    Please test after taking each of the following steps that you haven't already tried. Stop when the problem is resolved. Back up all data before making any changes.
    Step 1
    Take the applicable steps in this support article. The Wireless Diagnostics program generates a large file of information about your system, which would be used by Apple Engineering in case of a support incident. Don't post the contents here.
    Step 2
    Disconnect all USB 3 devices. If you don't know which are USB 3, disconnect all USB devices except keyboard and mouse.
    Step 3
    If you're not using a wireless keyboard or trackpad, disable Bluetooth by selecting Turn Bluetooth Off from the menu with the Bluetooth icon. If you don't have that menu, open the Bluetooth preference pane in System Preferences and check the box marked Show Bluetooth in menu bar. Test. If you find that Wi-Fi works better with Bluetooth disabled, you should use the 5 GHz Wi-Fi band. Your router may not support it; in that case, you need a new router.
    Step 4
    Open the Energy Saver pane in System Preferences and unlock the settings, if necessary. Select the Power Adapter  tab, if there is one. Uncheck the box marked
              Wake for Wi-Fi network access
    if it's checked.
    Step 5
    Open the Network pane in System Preferences and make a note of your settings in the Wi-Fi service. It may be helpful to take screenshots of the various tabs in the preference pane. If the preference pane is locked, unlock it by clicking the padlock icon and entering your administrator password. Delete Wi-Fi from the service list on the left by selecting it and clicking the minus-sign button at the bottom. Then recreate the service by clicking the plus-sign button and following the prompts.
    Step 6
    In the Wi-Fi settings, select
              Advanced... ▹ TCP/IP ▹ Configure IPv6: Link-local
    Click OK and then Apply.
    Step 7
    Reset the System Management Controller.
    Step 8
    Reset the PRAM.
    Step 9
    Launch the Keychain Access application. Search for and delete all AirPort network password items that refer to the network. Make a note of the password first.
    Step 10
    Make a "Genius" appointment at an Apple Store, or go to another authorized service center.

  • HT204380 i have an iphone 4 which i purchased from dubai. this handset has facetime blocked on it . now i use the handset in india and want to use facetime on it . how can i activate facetime on my handset. i am having the same problem with my 4s i got fr

    The query i have is that ,, i have an iphone which i purchased from dubai . facetime was blocked on it when i purchased it . however now i use the phone in india and i want to use facetime on it .
    i wanted to know if there is any way i can activate facetime on it .
    i am having the same problem with the 4s i purchased from riyadh .

    You can't. FaceTime has been permanently removed from your phone, there is no way to add it back. Next time, buy your phone in India.
    BTW: Your warranty & support will only be valid in the UAE.

  • Is there a fix for the WIFI problem with Lion? How can I get Lion off of my Mac?

    Is there a fix for the WIFI problem with Lion? How can I get Lion off of my Mac?

    gmiller0 wrote:
    My mac has 10.7.3 and will not connect to wifi after it wakes up. Have contacted AppleCare but the problem cannot seem to be resolved.. I guess this is a major issue with Lion:(
    What model of Mac?  I have a MBP running 10.7.3 and do not have that issue.  From the other couple of posts I've seen about it, it seems to be maybe an issue with some iMacs?  Have your tried searching the Lion or iMac forums for similar issues, just to see if anyone has hit on why it is happening?

  • Why is my 4th generation ipod touch not charge? I plug it into the computer and the wall and with 2 different usb cables and its not charging. When its plugged in it shows the icon for charging but the battery never increases and it dies once i disconnect

    I have a 4th generation Ipod Touch. It has been working for months when yesterday the battery started acting werid. I was driving and it was connected with the usb charger cable to my car stereo when all the sudden my music stopped and the stereo could not recognize my ipod at all. When I got back home, I tried to charge it so it wouldnt die but even while on the charger in the wall the battery continued to die. I charged it over night (the first time I have ever charged it over night) desperately to have battery for a 4 o clock plane flight so I would have entertianment. The ipod died over night while on the charger. When I unplugged it from the usb charging cable I noticed that the icon telling me the ipod needed to be charged came up. So I plugged it back in. The charging thunder bolt symbol popped up next to the very small red strip on the left side of the battery indicating that the ipod had no charge to turn its self on. I tried plugging it in on the computer, the wall ac charger and a stereo system made just for the ipod that also pluggs into the wall. I have used 2 different cables, the result being the same that the ipod held no charge, and it wouldnt charge at all while on the charger, and it would imediately die once i take it off the charger.
    I have not idea what has happened ....
    Please help
    THanks!

    - While charging try resetting the iPod:
    Reset iPod touch:  Press and hold the On/Off Sleep/Wake button and the Home
    button at the same time for at least ten seconds, until the Apple logo appears.
    - Next try restoring the iPod via iTunes.  First from backup and if still problem restore to factory defaults/new iPod.
    - However, I really think that the iPod has a hardware problem and an appointment at the Genius Bar of an Apple store is in order.  If defective Apple should give you a refurbished iPod.

  • Problem with passing exception with declarative security

    I am having a problem with passing exceptions with message security bunding enables. I have a JAXWS EJB 3.0 web service, The service defines methods which throw exceptions. The exceptions are passed correclty when there is no message security enabled. once the security is enabled and an exception is thrown, I get the stack trace below. Furthermore, the service with security enabled works fine as long as methods do not throw an exception. I am thinking that the JAXWS generated wrapped exception is not correctly handled by the message security provider in the server. Just a thought. Any help would be greatly appreciated.
    Stack trace:
    [#|2007-03-23T00:49:06.333-0600|WARNING|sun-appserver-pe9.0|javax.enterprise.sys
    tem.stream.err|_ThreadID=11;_ThreadName=httpWorkerThread-8080-0;_RequestID=64417
    ac0-ded8-474d-9066-5a97c8559b67;|
    ERROR: 'NAMESPACE_ERR: An attempt is made to create or change an object in a wa
    y which is incorrect with regard to namespaces.'|#]
    [#|2007-03-23T00:49:06.334-0600|SEVERE|sun-appserver-pe9.0|javax.xml.messaging.s
    aaj.soap|_ThreadID=11;_ThreadName=httpWorkerThread-8080-0;_RequestID=64417ac0-de
    d8-474d-9066-5a97c8559b67;|SAAJ0511: Unable to create envelope from given source
    |#]
    [#|2007-03-23T00:49:06.334-0600|INFO|sun-appserver-pe9.0|javax.enterprise.system
    .core.security|_ThreadID=11;_ThreadName=httpWorkerThread-8080-0;|SEC2003: Contai
    ner-auth: wss: Error securing response
    com.sun.enterprise.security.jauth.AuthException: Unable to create envelope from
    given source:
    at com.sun.xml.wss.provider.ServerSecurityAuthModule.secureResponse(Serv
    erSecurityAuthModule.java:129)
    at sun.reflect.GeneratedMethodAccessor237.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.enterprise.security.jauth.AuthContext.invokePriv(AuthContext.
    java:128)
    at com.sun.enterprise.security.jauth.AuthContext$1.run(AuthContext.java:
    78)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.enterprise.security.jauth.AuthContext.invoke(AuthContext.java
    :75)
    at com.sun.enterprise.security.jauth.ConfigFile$ConfigServer.secureRespo
    nse(ConfigFile.java:662)
    at com.sun.enterprise.security.wss.WebServiceSecurity.secureResponse(Web
    ServiceSecurity.java:220)
    at com.sun.enterprise.security.wss.WebServiceSecurity.secureResponse(Web
    ServiceSecurity.java:197)
    at com.sun.enterprise.webservice.JAXWSSystemHandlerDelegateFactory$Servl
    etDelegate.processResponse(JAXWSSystemHandlerDelegateFactory.java:540)
    at com.sun.enterprise.webservice.monitoring.JAXWSEndpointImpl.processRes
    ponse(JAXWSEndpointImpl.java:121)
    at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.receive(SOA
    PMessageDispatcher.java:148)
    at com.sun.xml.ws.server.Tie.handle(Tie.java:88)
    at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3Me
    ssageDispatcher.java:160)
    at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3Messag
    eDispatcher.java:89)
    at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpo
    int(EjbWebServiceServlet.java:178)
    at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServ
    iceServlet.java:109)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.jav
    a:100)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j
    ava:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:536)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:71)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
    ava:182)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j
    ava:566)
    at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipe
    line.java:120)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
    ve.java:137)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j
    ava:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:536)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:23
    1)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(
    ProcessorTask.java:667)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBloc
    ked(ProcessorTask.java:574)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(Proces
    sorTask.java:844)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTas
    k(ReadTask.java:287)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.jav
    a:212)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:2
    52)
    at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThrea
    d.java:75)
    |#]
    [#|2007-03-23T00:49:06.335-0600|WARNING|sun-appserver-pe9.0|javax.enterprise.sys
    tem.core|_ThreadID=11;_ThreadName=httpWorkerThread-8080-0;_RequestID=64417ac0-de
    d8-474d-9066-5a97c8559b67;|Exception while tracing response : Unable to create e
    nvelope from given source: |#]
    [#|2007-03-23T00:49:06.336-0600|WARNING|sun-appserver-pe9.0|javax.enterprise.sys
    tem.stream.err|_ThreadID=11;_ThreadName=httpWorkerThread-8080-0;_RequestID=64417
    ac0-ded8-474d-9066-5a97c8559b67;|
    com.sun.enterprise.security.jauth.AuthException: Unable to create envelope from
    given source:
    at com.sun.xml.wss.provider.ServerSecurityAuthModule.secureResponse(Serv
    erSecurityAuthModule.java:129)
    at sun.reflect.GeneratedMethodAccessor237.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.enterprise.security.jauth.AuthContext.invokePriv(AuthContext.
    java:128)
    at com.sun.enterprise.security.jauth.AuthContext$1.run(AuthContext.java:
    78)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.enterprise.security.jauth.AuthContext.invoke(AuthContext.java
    :75)
    at com.sun.enterprise.security.jauth.ConfigFile$ConfigServer.secureRespo
    nse(ConfigFile.java:662)
    at com.sun.enterprise.security.wss.WebServiceSecurity.secureResponse(Web
    ServiceSecurity.java:220)
    at com.sun.enterprise.security.wss.WebServiceSecurity.secureResponse(Web
    ServiceSecurity.java:197)
    at com.sun.enterprise.webservice.JAXWSSystemHandlerDelegateFactory$Servl
    etDelegate.processResponse(JAXWSSystemHandlerDelegateFactory.java:540)
    at com.sun.enterprise.webservice.monitoring.JAXWSEndpointImpl.processRes
    ponse(JAXWSEndpointImpl.java:121)
    at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.receive(SOA
    PMessageDispatcher.java:148)
    at com.sun.xml.ws.server.Tie.handle(Tie.java:88)
    at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3Me
    ssageDispatcher.java:160)
    at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3Messag
    eDispatcher.java:89)
    at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpo
    int(EjbWebServiceServlet.java:178)
    at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServ
    iceServlet.java:109)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.jav
    a:100)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j
    ava:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:536)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:71)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
    ava:182)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j
    ava:566)
    at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipe
    line.java:120)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
    ve.java:137)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j
    ava:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:536)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:23
    1)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(
    ProcessorTask.java:667)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBloc
    ked(ProcessorTask.java:574)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(Proces
    sorTask.java:844)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTas
    k(ReadTask.java:287)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.jav
    a:212)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:2
    52)
    at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThrea
    d.java:75)
    |#]
    [#|2007-03-23T00:49:06.336-0600|SEVERE|sun-appserver-pe9.0|javax.enterprise.reso
    urce.webservices.jaxws.server.soapmd|_ThreadID=11;_ThreadName=httpWorkerThread-8
    080-0;_RequestID=64417ac0-ded8-474d-9066-5a97c8559b67;|Unable to create envelope
    from given source:
    com.sun.enterprise.security.jauth.AuthException: Unable to create envelope from
    given source:
    at com.sun.xml.wss.provider.ServerSecurityAuthModule.secureResponse(Serv
    erSecurityAuthModule.java:129)
    at sun.reflect.GeneratedMethodAccessor237.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.enterprise.security.jauth.AuthContext.invokePriv(AuthContext.
    java:128)
    at com.sun.enterprise.security.jauth.AuthContext$1.run(AuthContext.java:
    78)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.enterprise.security.jauth.AuthContext.invoke(AuthContext.java
    :75)
    at com.sun.enterprise.security.jauth.ConfigFile$ConfigServer.secureRespo
    nse(ConfigFile.java:662)
    at com.sun.enterprise.security.wss.WebServiceSecurity.secureResponse(Web
    ServiceSecurity.java:220)
    at com.sun.enterprise.security.wss.WebServiceSecurity.secureResponse(Web
    ServiceSecurity.java:197)
    at com.sun.enterprise.webservice.JAXWSSystemHandlerDelegateFactory$Servl
    etDelegate.processResponse(JAXWSSystemHandlerDelegateFactory.java:540)
    at com.sun.enterprise.webservice.monitoring.JAXWSEndpointImpl.processRes
    ponse(JAXWSEndpointImpl.java:121)
    at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.receive(SOA
    PMessageDispatcher.java:148)
    at com.sun.xml.ws.server.Tie.handle(Tie.java:88)
    at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3Me
    ssageDispatcher.java:160)
    at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3Messag
    eDispatcher.java:89)
    at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpo
    int(EjbWebServiceServlet.java:178)
    at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServ
    iceServlet.java:109)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.jav
    a:100)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j
    ava:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:536)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:71)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
    ava:182)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j
    ava:566)
    at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipe
    line.java:120)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
    ve.java:137)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j
    ava:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:536)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:23
    1)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(
    ProcessorTask.java:667)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBloc
    ked(ProcessorTask.java:574)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(Proces
    sorTask.java:844)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTas
    k(ReadTask.java:287)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.jav
    a:212)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:2
    52)
    at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThrea
    d.java:75)
    |#]
    [#|2007-03-23T00:49:06.338-0600|WARNING|sun-appserver-pe9.0|javax.enterprise.sys
    tem.stream.err|_ThreadID=11;_ThreadName=httpWorkerThread-8080-0;_RequestID=64417
    ac0-ded8-474d-9066-5a97c8559b67;|
    com.sun.enterprise.security.jauth.AuthException: Unable to create envelope from
    given source:
    at com.sun.xml.wss.provider.ServerSecurityAuthModule.secureResponse(Serv
    erSecurityAuthModule.java:129)
    at sun.reflect.GeneratedMethodAccessor237.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.enterprise.security.jauth.AuthContext.invokePriv(AuthContext.
    java:128)
    at com.sun.enterprise.security.jauth.AuthContext$1.run(AuthContext.java:
    78)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.enterprise.security.jauth.AuthContext.invoke(AuthContext.java
    :75)
    at com.sun.enterprise.security.jauth.ConfigFile$ConfigServer.secureRespo
    nse(ConfigFile.java:662)
    at com.sun.enterprise.security.wss.WebServiceSecurity.secureResponse(Web
    ServiceSecurity.java:220)
    at com.sun.enterprise.security.wss.WebServiceSecurity.secureResponse(Web
    ServiceSecurity.java:197)
    at com.sun.enterprise.webservice.JAXWSSystemHandlerDelegateFactory$Servl
    etDelegate.processResponse(JAXWSSystemHandlerDelegateFactory.java:540)
    at com.sun.enterprise.webservice.monitoring.JAXWSEndpointImpl.processRes
    ponse(JAXWSEndpointImpl.java:121)
    at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.receive(SOA
    PMessageDispatcher.java:148)
    at com.sun.xml.ws.server.Tie.handle(Tie.java:88)
    at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3Me
    ssageDispatcher.java:160)
    at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3Messag
    eDispatcher.java:89)
    at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpo
    int(EjbWebServiceServlet.java:178)
    at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServ
    iceServlet.java:109)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.jav
    a:100)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j
    ava:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:536)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:71)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
    ava:182)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j
    ava:566)
    at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipe
    line.java:120)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
    ve.java:137)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j
    ava:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:536)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:23
    1)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(
    ProcessorTask.java:667)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBloc
    ked(ProcessorTask.java:574)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(Proces
    sorTask.java:844)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTas
    k(ReadTask.java:287)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.jav
    a:212)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:2
    52)
    at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThrea
    d.java:75)
    |#]

    Hi,
    Thanks for the reply. I read the weblog and posted a reply to it already.
    History:
    I actually have a web service where I have message level security enabled and it works great. I had some issues early on with descriptor but those are worked out. As I was testing, I created a test case that throws an exception. That is when I get the NAMESPACE_ERROR, jauth exceptions , etc.
    Attempt to find issue:
    Glassfish: V1 (glassfish-installer-9.0-b48.jar), jdk1.5.0_11
    Code: EJB tech tip EJB30 web service
    Security: message security, specified almost verbatim to how it is done in the link you mention.
    Sample works fine until I modify the web service to throw an exception. Once I do that, I get the NAMESPACE_ERROR stack trace I posted in original message. The sample in the tech tip uses the embedded app-client.
    Thanks for helping with this.

  • Problems with passing arguments to app

    Hi.
    I have a litle problem with passing arguments. I create a dynamic jnlp file using jsp. This is my code:
    <%
    response.setContentType("application/x-java-jnlp-file");
    String l = request.getParameter("login");
    String p = request.getParameter("pass");
    out.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
    out.println("<jnlp spec=\"1.0+\" codebase=\"http://212.244.104.27:8080/PzP_INSTALL/\" href=\"pzp.jsp\">");
    out.println("<information>");
    out.println("<title>xxx</title>");
    out.println("<vendor>xxxx</vendor>");
    out.println("<homepage href=\"main.jsp\"/>");
    out.println("<description>text</description>");
    out.println("<offline-allowed/>");
    out.println("</information>");
    out.println("<security>");
    out.println("<all-permissions/>");
    out.println("</security>");
    out.println("<resources>");
    out.println("<j2se version=\"1.4+\"/>");
    out.println("<jar href=\"jars/pzp.jar\" main=\"true\" download=\"eager\"/>");
    out.println("<jar href=\"jars/config.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/commons-beanutils.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/commons-collections.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/commons-digester.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/commons-logging.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/commons-validator.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/easclient.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/easj2ee.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/jakarta-oro-2.0.7.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/jbcl.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/log4j-1.2.7.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/jdom.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/xercesImpl.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<property name =\"javaws.login \"  " + "value=" + "\"" + l + "\"" + "/>");
    out.println("<property name =\"javaws.pass \"  " + "value=" + "\"" + p + "\"" + "/>");
    out.println("</resources>");
    out.println("<application-desc main-class=\"aaa.bbb.ccc.MyClass\"/>");
    out.println("</jnlp>");
    %>My problem is when i have the href tag filled, the arguments that i passed equlas null, when i remove the href everything is ok besides that the app doesnt show in application manager and doesnt create an icon on the desktop.
    out.println("<jnlp spec=\"1.0+\" codebase=\"http://62.89.104.27:8080/PzP_INSTALL/\" href=\"pzp.jsp\">");
    Any help would be appreciated.

    Hello again.
    Thanks for your replay but unfortunetly it doesnt work too :-(
    I've tried to use the out.println statemants in the servlet instead of using a jsp page but the error is the same. Please look at my code and tell me if you can what could be wrong.
    This is the error message:
    An error occurred while launching/running the application.
    Title: PZP
    Vendor: SPEED
    Category: Download Error
    Unable to load resource: http://212.89.104.27:8080/PzP_INSTALL/ServletPZP
    Servlet code.
    package pzp_install;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    import pzp_install.LoginBean;
    import javax.swing.JOptionPane;
    public class ServletPZP extends HttpServlet {
      public void init(ServletConfig config) throws ServletException {
      super.init(config);
      config.getServletContext().setAttribute("ServletPZP", this);
      public void doPost(HttpServletRequest request, HttpServletResponse resp)
      throws IOException {
      PrintWriter out = resp.getWriter();
    // Get the value of the request parameter
      String login = request.getParameter("login");
      String pass = request.getParameter("pass");
    resp.setContentType("application/x-java-jnlp-file");
    out.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
    out.println("<jnlp spec=\"1.0+\" codebase=\"http://212.89.104.27:8080/PzP_INSTALL/\" href=\"/servletpzp\">");
    out.println("<information>");
    out.println("<title>PZP</title>");
    out.println("<vendor>SPEED</vendor>");
    out.println("<homepage href=\"main.jsp\"/>");
    out.println("<description>Aplikacja wspomagajaca zarzadzanie zleceniami</description>");
    out.println("<offline-allowed/>");
    out.println("</information>");
    out.println("<security>");
    out.println("<all-permissions/>");
    out.println("</security>");
    out.println("<resources>");
    out.println("<j2se version=\"1.4+\"/>");
    out.println("<jar href=\"pzp.jar\" main=\"true\" download=\"eager\"/>");
    out.println("<jar href=\"config.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"commons-beanutils.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"commons-collections.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"commons-digester.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"commons-logging.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"commons-validator.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"easclient.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"easj2ee.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jakarta-oro-2.0.7.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jbcl.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"log4j-1.2.7.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jdom.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"xercesImpl.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<property name =\"javaws.login \"  " + "value=" + "\"" + login + "\"" + "/>");
    out.println("<property name =\"javaws.pass \"  " + "value=" + "\"" + pass + "\"" + "/>");
    out.println("</resources>");
    out.println("<application-desc main-class=\"pl.speednet.pzp.PzP\"/>");
    out.println("</jnlp>");
      public void destroy() {
      super.destroy();
    This is the brief of code which starts the servlet
    <form action="http://212.89.104.27:8080/PzP_INSTALL/servletpzp" method="post">
      <input type="hide" name="login" value=<%=l%>>
      <input type="hide" name="pass" value=<%=p%>>
      <input type=submit value=Start PZP>
    </form>
    This is the web.xml file code.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
      <servlet>
        <servlet-name>ServletPZP</servlet-name>
        <servlet-class>pzp_install.ServletPZP</servlet-class>
      </servlet>
      <servlet-mapping>
        <servlet-name>ServletPZP</servlet-name>
        <url-pattern>/servletpzp</url-pattern>
      </servlet-mapping>
      <mime-mapping>
        <extension>jar</extension>
        <mime-type>application/x-java-archive</mime-type>
      </mime-mapping>
      <mime-mapping>
        <extension>jnlp</extension>
        <mime-type>application/x-java-jnlp-file</mime-type>
      </mime-mapping>
    </web-app>

  • What is the exact problem with this file?

    Hi all,
    There is an old form , which was not in use from many days.
    Now when we tried to run the form, i got the error saying "FRM-40734:Internal Error:Pl/SQL error occured.", in the login form.
    When i tried to open the fmb file in Oracle Forms Builder 6i, i got the following error:
    FRM-10102: Cannot attach PL/SQL library d2kwutil. This library attachment will be lost if the module is saved., but the fmb file got open.
    The login button has the following code:
    DECLARE
      UNAME VARCHAR2(30);
      --USER_ID PARAMLIST;
      V_USER APUSERMA.USER_NAME%TYPE;
      V_PASSWED APUSERMA.USER_PASSWD%TYPE;
    BEGIN
    select user_CD INTO :GLOBAL.USER_ID from apuserma 
    where user_CD = :TI_USER_NAME AND user_PASSWD = :IT_USER_PASSWD
    AND SYSDATE BETWEEN USER_VALID_FRM AND USER_VALID_TO;
    :global.user_id  := substr(win_api_environment.read_registry('HKEY_LOCAL_MACHINE\system\currentcontrolset\control\computername\computername','computername'),1,10);
    :global.compname := :compname;
    compnm(:compname);
    --USER_ID := CREATE_PARAMETER_LIST('USER_id_NAME');
    call_form('Forms\MAIN_SCREEN',hide,DO_REPLACE);
    exception
      when no_data_found then
      MESSAGE('Incorrect Username or Password.  Please Re-Enter');
      message(' ');
      RAISE FORM_TRIGGER_FAILURE;
    END;
    EXIT_FORM;
    When i tried to compile, i got error saying ,
    Error 201 at line 10, column 28
    identifier 'WIN_API_ENVIRONMENT.READ_REGISTRY' must be declared.
    I am not getting to know What is the exact problem with this file?
    Help me with this please.
    Thank You.
    Oracle forms builder 6i.
    Oracle 9i.

    Vijetha wrote:
    I also want to know what is the use of  win_api_environment.read_registry('HKEY_LOCAL_MACHINE\system\currentcontrolset\control\computername\computername','computername') ??
    What does it do??
    If i comment the following line , will it be a problem??
    :global.user_id  := substr(win_api_environment.read_registry('HKEY_LOCAL_MACHINE\system\currentcontrolset\control\computername\computername','computername'),1,10);
    Because i commented the above line & compiled, so it is not giving any error now.
    So please tell me what win_api_environment.read_registry does??
    it's read windows registry value. So, no problem if you comment it.
    Thanks

  • I have a problem with iphoto (have a mac book pro): the icon in the dock appears with a question mark, and the application is gone!!! Can someone tell what's going on? Yesterday I had the same problem with itunes

    I have a problem with iphoto (have a mac book pro): the icon in the dock appears with a question mark, and the application is gone!!! Can someone tell what's going on? Yesterday I had the same problem with itunes: I downloaded the last version (it's free), but I cannot do the same with iphoto, and more important: I need to know what is happening!!! Please help me!

    Applications should not disappear all by themselves.
    If they are then that coud indicate serious problems with your hard drive.
    Backup everything up as quickly as possible.
    Using Disk Utility verify your system disk.
    Allan

  • Problem with BAPI_CUSTOMER_CREATEFROMDATA1 using JCo on IDES

    sorry, wrong board - i opened a new post
    Problem with BAPI_CUSTOMER_CREATEFROMDATA1 using JCo on IDES
    Hello everyone,
    we are working on a student project and would like to create customers (debtors) in an SAP IDES system.
    Using the ref-customer to copy from, and some personal-data below, we get the error message
    'Internal error: External no.assignment for reference customer/customer'
    We also tried with BAPI_CUSTOMER_GETINTNUMBER, and ACCOUNTGROUP ZINT (New Internet Customer, others won't work?). But CREATEFROMDATA1 takes no CustomerNo created this way, nor it wants to create one 'internal'?
    Any suggestions? Thanks a lot for your help,
    Greetings,
    Tobias Schmidbauer
              inParams = function.getImportParameterList().getStructure(
                   "PI_COPYREFERENCE");
              inParams.setValue("0000001000", "REF_CUSTMR");
              inParams.setValue("1000", "SALESORG");
              inParams.setValue("10", "DISTR_CHAN");
              inParams.setValue("00", "DIVISION");
              inParams =function.getImportParameterList().getStructure(
                   "PI_PERSONALDATA");
              inParams.setValue("Simpson", "LASTNAME");
              inParams.setValue("Homer", "FIRSTNAME");
              inParams.setValue("Jay","MIDDLENAME");
              inParams.setValue("Springfield", "CITY");
              inParams.setValue("DE", "LANGU_P");
              inParams.setValue("DE", "LANGUP_ISO");
              inParams.setValue("DE", "COUNTRY");
              inParams.setValue("EUR", "CURRENCY");
              inParams.setValue("12345", "POSTL_COD1");
    Message was edited by: Tobias Schmidbauer

    Hello Brian,
    Thanks for your pointer. Actually The customer's reference number i was providing in the PI_COPYREFERENCE structure was a sold-to party customer and it uses external customer number assignment. When i used "New Internet Customer" (that doesnt use external assignment by default) as customer's account group, the customer was created successfully and assigned customer number was returned.
    I want to ask now how could we give a customer number in the BAPI as i am unable to find any such column in any of the tables. (Customer number is an "out" parameter so it can only return the number of created customer). Secondly, how to chnage the external assignment property of a particular account group (like sold-to party). i.e, how could we change the account group configurations through SAP GUI??
    - Umair

  • Problem with passing dashboard prompts

    Hi All,
    I have a problem with passing dashboard prompts.
    Scenario:
    I have a report with country(column interaction),amount sold and two prompts.when the user selects the particular country, i need to navigate to other detailed dasboard with 2 prompts and country.
    with the column interaction, am able to navigate to other dashboard with all the prompts only when the target dashboard prompts, defaults to presentation variable.
    but when the user directly opens the target dashboard, i have to display the report with the default values which am not able to achieve.
    All the prompts are customized prompts.
    Any suggestions would be greatly helpful.
    Thnx in Advance

    Hi,
    When you drill down, corresponding filter values get added to your report. So next time when you change the prompt values It does not give you proper data.
    So before you change the prompt values, you comeback to the default report. and try changing the prompt values.
    Otherwise you can do one thing, Do not enable drill in place for the report section. So when you try to drill down in the report, it takes you to the new page.
    And in the main page even if you change prompt values, It will work perfectly.
    Regards,
    TKB

  • Can't get CF11 to download free trial for students.  Anyone having the same problem with Adobe's site?

    Can't get CF11 to download free trial for students.  Anyone having the same problem with Adobe's site?

    Hi,
    Please download it from http://www.adobe.com/cfusion/tdrc/index.cfm?product=coldfusion&promoid=DJDUK use your Adobe ID and password to login and download CF11.
    Let me know in case you face any issue while downloading it, if you get any error try another browser.
    Thanks,
    Priyank

  • After updating my 4s to ios6, I'm having the same problems with wi-fi switching to cellular on it's own and running up my data usage.....anyone else having this problem?

    After updating my 4s to ios6, I'm having the same problems with wi-fi switching to cellular on it's own and running up my data usage.....anyone else having this problem?

    The iPhone is DESIGNED to switch to cellular data when asleep, unless it's connected to a power source, in which case it will stay logged onto the WiFi network.  iPhones have ALWAYS behaved this way.
    Either turn cellular data off at night, or leave your phone connected to a power source to continue the WiFI.

Maybe you are looking for

  • Data validation for Date Field in Web Dynpro ABAP

    Hi , In my WDA i want to perform data validation for date filed. (i.e. While creating a new record i have to check the Start Date should be always lesser than End Date.) If u ll enter the wrong date it should validate the Date and throw an error mess

  • Video Fade out not audio

    I'm trying to make the video fade out while the music continues to the end. I also want to fade in with the video while the music is playing.

  • Most Recent Document data of the query

    Hi all, We have document data attached to a infoprovider,So in the query level, it should display the most recent updated document.But it is showing the previous document data. can anyone tell me if any setting is avaialble for this or how to achieve

  • Help with setting up Sagepay as a payment gateway

    Hello, i am trying to setup Sagepay as the payment gateway on a clients eCommerce site, here is a link to the test transaction product which is priced at 0.01 http://dandeliongiftshop.worldsecuresystems.com/shop-categories/birthday-presents/white-wa

  • How to find table name in ebs

    Hello, ebs r12 12.1.1 os oul5x64 i am looking for a table name in the database to compare the setup between 2 systems. when connect as sysadmin --->Concurrent --->manager --->define-- select Standard manager -->select Specialization Rules-- in this f