Invoking the paint repaint methods in Java2D

Hi,
This is the case:
I have used the paint method to a JPanel like this:
public void paint (Graphics g){
Graphics2D g2 = (Graphics2D) g;
g2.setPaint(gradientColor);
g2.fill(rect);
g2.setPaint(Color.white);
g2.drawString( "My label");
Now once the JPanel been painted, after a while,i want to change the
context of g2.drawString("new label") with a new label, but i want to keep the background painted as before. how do i invoke/use the repaint
or another method to accomplish that? Please help.
/E

allredy solved, thanks any way.

Similar Messages

  • I have deploy an EJB in weblogic 6.1,but how to use jsp to invoke the EJB's method?

    i have deploy an EJB in weblogic 6.1,but how to use jsp to invoke the EJB's method?
    thanks!

    You'd do something like:
    <%
    //vvv this part can potentially be done in initialization
    Context ctx = getInitialContext();
    BeanHome home =
    (BeanHome)PortableRemoteObject.narrow(ctx.lookup("the.jndi.name"),
    BeanHome.class);
    Bean b = home.create();
    //^^^
    Result r = b.invokeMethod();
    %>
    "toxin" <[email protected]> wrote in message
    news:3d2e95e5$[email protected]..
    >
    i have deploy an EJB in weblogic 6.1,but how to use jsp to invoke theEJB's method?
    thanks!

  • When should i suppose to invoke the System.gc() method?

    As knew from the Java specifications, the method of System.gc() is used to reclaim space from all discarded objects. But when should I call it explicitly? Should I included it at the end of my methods? My destroy() segment with my servlet? Please advise.
    Thanks for your replies!

    Invoking System.gc() will instruct the garbage collector to run. However, you cannot control precisely when it runs, that's up to the VM to decide. If code is well written, and includes appropriate finalize() methods to dereference no longer needed objects, then the default garbage collection should be quite sufficient. Basically, until you get to very advanced Java projects, you should never have to explicitly invoke System.gc().

  • Stuck with the paint and repaint methods

    I am supposed to create a JApplet with a button and a background color. When the button is clicked the first time a word is supposed to appear (I got that part), when the button is clicked the second time the word is supposed to appear again in a different color and in a different location on the Applet (I got that part).
    The problem is that the first name is supposed to disappear when the second word appears. So I know I have to repaint the screen when the button is clicked the second time and draw the first string in the same color as the background color to make it invisible.
    My problem is I am not sure how I can code to apply different settings each time the button is clicked. Can anyone help? Please let me know if my explanation sucks. I will try to explain better. However here is the code I have so far. I added a counter for the button just for testing purposes.
    I just need some hints on what to do and if there is a easier way than using that if statement please let me know. I probably make it harder than it is.
    Thanks in advance and Merry Christmas.
    import javax.swing.*;
       import java.awt.*;
       import java.awt.event.*;
        public class DisplayMyName extends JApplet
        implements ActionListener
          String myName = "DOG";
          String myName1 = "DOG";
          JButton moveButton = new JButton("Move It");
          Font smallFont = new Font("Arial", Font.BOLD, 12);
          Font largeFont = new Font("Lucida Sans", Font.ITALIC, 20);
          int numClicks = 0;
          JLabel label = new JLabel("Number of button clicks:" + numClicks);
           public void init()
             Container con = getContentPane();
             con.setBackground(Color.RED);
             con.setLayout( new FlowLayout() );
             con.add(moveButton);
             con.add(label);
             moveButton.addActionListener(this);
           public void paint(Graphics g)
             numClicks++;
             label.setText("Number of button clicks: " + numClicks);
             if (numClicks == 2)
             { g.setFont(smallFont);
                g.setColor(Color.BLUE);
                g.drawString(myName, 50, 100);
                   else
             if (numClicks == 3)
             { g.setFont(largeFont);
                g.setColor(Color.YELLOW);
                g.drawString(myName, 100, 200);
           public void actionPerformed(ActionEvent move)
             repaint();
       }

    You're putting your program logic in the paint method, something you should not do. For instance, try resizing your applet and see what effect that has on number of button clicks displayed. This is all a side effect of the logic being in the paint method.
    1) Don't override paint, override paintComponent.
    2) Don't draw/paint directly in the JApplet. Do this in a JPanel or JComponent, and then add this to the JApplet. In fact I'd add the button, the and the label to the JPanel and add the label to the JApplet's contentPane (which usually uses BorderLayout, so it should fill the applet).
    3) Logic needs to be outside of paint/paintComponent. the only code in the paintComponent should be the drawing/painting itself. The if statements can remain within the paintComponent method though.
    4) When calling repaint() make sure you do so on the JPanel rather than the applet itself.
    For instance where should numClicks++ go? Where should the code to change the label go? in the paint/paintComponent method? or in the button's actionlistener? which makes more sense?
    Edited by: Encephalopathic on Dec 24, 2008 9:37 AM

  • Simple repaint() method doubt

    Hi Friends,
    I have a simple program in which I need to print 2 strings at the same time.So,I pass the string and the location to the paint method,but the second repaint() method erases the first
    string and only the second string is displayed.So,how can i make both the strings display at the same time.Here's a part of my code.
    doPaint("String one",200,200);
    validate();
    doPaint("String two",200,250);
    validate();
    public void doPaint(String str,width x,height y){
                                this.x = x;
                                this.y = y;
                this.str=str;
               repaint();
    public void paint(Graphics g){
                            super.paint(g);
            g.setColor(Color.BLUE);
            g.drawString(str,x,y);
         }Thanks

    repaint()clears the component and fills it from the scratch, so when you call your function for the second time it clears first string and draws only the second.
    I advise to use two variables if you want them painted together.
    And override paintComponent() not paint()

  • Component repaint() method changed?

    Did the Component repaint() method used to clear the Component pane as well as painting it again?
    I ask because I think my textbook is assuming that repaint() clears the pane and then paints again but when I implement the code that I've written, I see all previously painted objects.
    Thanks.

    The job of repaint is just to queue a request for the repainting of the object. It sounds like the problem is in your actual painting code. You also haven't said what framework you are using? AWT? Swing? SWT?
    In Swing, you typically override paintComponent like so:
    @Override protected void paintComponent(Graphics g) {
         super.paintComponent(g);
         //do you painting here:
    }The call to super.paintComponent is what clears the component.
    In future, Swing questions should go tot the Swing forum: [http://forums.sun.com/forum.jspa?forumID=57]

  • Regarding errors in client Application to invoke the webservices

    hi,
    i am using weblogic workshop to develop webservices on weblogic server8.1
    i develop webservice and wsdl file also
    but when i am writing dynamic client application to invoke the webservice( particular method)
    then it gives error like this
    javax.xml.rpc.JAXRPCException: failed to invoke operation 'requestContactList' due to an error in the soap layer (SAAJ); nested exception is: Message[ failed to serialize interface javax.xml.soap.SOAPElementweblogic.xml.schema.binding.SerializationException: mapping lookup failure. class=interface javax.xml.soap.SOAPElement class context=TypedClassContext{schemaType=['http://www.openuri.org/']:requestContactList}]StackTrace[
    javax.xml.soap.SOAPException: failed to serialize interface javax.xml.soap.SOAPElementweblogic.xml.schema.binding.SerializationException: mapping lookup failure. class=interface javax.xml.soap.SOAPElement class context=TypedClassContext{schemaType=['http://www.openuri.org/']:requestContactList}
         at weblogic.webservice.core.DefaultPart.invokeSerializer(DefaultPart.java:332)
         at weblogic.webservice.core.DefaultPart.toXML(DefaultPart.java:297)
         at weblogic.webservice.core.DefaultMessage.toXML(DefaultMessage.java:645)
         at weblogic.webservice.core.ClientDispatcher.send(ClientDispatcher.java:206)
         at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:143)
         at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:471)
         at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:457)
         at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:566)
         at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:419)
         at test.Client.main(Client.java:57)
    Caused by: weblogic.xml.schema.binding.SerializationException: mapping lookup failure. class=interface javax.xml.soap.SOAPElement class context=TypedClassContext{schemaType=['http://www.openuri.org/']:requestContactList}
         at weblogic.xml.schema.binding.RuntimeUtils.lookup_serializer(RuntimeUtils.java:151)
         at weblogic.xml.schema.binding.RuntimeUtils.invoke_serializer(RuntimeUtils.java:187)
         at weblogic.xml.schema.binding.RuntimeUtils.invoke_serializer(RuntimeUtils.java:174)
         at weblogic.webservice.core.DefaultPart.invokeSerializer(DefaultPart.java:328)
         ... 9 more
         at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:586)
         at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:419)
         at test.Client.main(Client.java:57)
    Debugging Finished
    Exception in thread "main"
    my client program is
    import java.net.URL;
    import javax.xml.rpc.ServiceFactory;
    import javax.xml.rpc.Service;
    import javax.xml.rpc.Call;
    import javax.xml.rpc.ParameterMode;
    import javax.xml.namespace.QName;
    * This class demonstrates a java client invoking a WebService.
    * @author Copyright (c) 2005 by BEA Systems, Inc. All Rights Reserved.
    public class Client {
    public static void main(String[] args) throws Exception {
    // Setup the global JAXM message factory
    System.setProperty("javax.xml.soap.MessageFactory",
    "weblogic.webservice.core.soap.MessageFactoryImpl");
    // Setup the global JAX-RPC service factory
    System.setProperty( "javax.xml.rpc.ServiceFactory",
    "weblogic.webservice.core.rpc.ServiceFactoryImpl");
    // create service factory
    ServiceFactory factory = ServiceFactory.newInstance();
    // define qnames
    String targetNamespace =
    "http://www.openuri.org/"
    + "wsdl/http://192.168.2.98:7001/ContactListWeb/ContactListJWS/ContactTest.jws";
    QName serviceName =
    new QName(targetNamespace,
    "ContactTest");
    QName portName =
    new QName(targetNamespace,
    "ContactTestSoap");
    QName operationName = new QName("targetNamespace",
    "requestContactList");
    URL wsdlLocation =
    new URL("http://192.168.2.98:7001/ContactListWeb/ContactListJWS/ContactTest.jws?WSDL");
    // create service
    Service service = factory.createService(wsdlLocation, serviceName);
    // create call
    Call call = service.createCall(portName, operationName);
    // invoke the remote web service
    String result =(String)call.invoke(new Object[] {
    "BEAS"
    System.out.println("\n");
    System.out.println("This example shows how to create a dynamic client application that invokes a non-WebLogic Web service.");
    System.out.println("The webservice used was: http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl");
    System.out.println("The quote for BEAS is: ");
    System.out.println(result);
    }

    Hi I am also facing the issue. If any one got the solutoin for this please post it
    Thanks
    Kaal

  • Invoking servlet's doGet() method on startup

    Hi Friends,
    Is there any way of invoking the servlets doGet method on server start -up.
    I am using Tomcat 4.1.18.
    I know that we can Invoke the servlet at stat-up i.e. it will invoke init() method osf servlet.But what if I want to invoke the doGet method on start - up?
    Regards
    Abhay

    The doGet will require an Request and Response object. It would be easier to remove what ever logic in the doGet you need to execute to seperate methods that can be called from both the init and doGet methods.

  • Repaint() method 's not work but paint(getGraphics()) does, why?

    I've just read the following code ( in the Core Java 2 advance features vol 2 book):
      import java.awt.*;
      import java.awt.event.*;
       import java.awt.geom.*;
       import java.util.*;
       import javax.swing.*;
          Shows an animated bouncing ball.
      public class Bounce
         public static void main(String[] args)
            JFrame frame = new BounceFrame();
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.show();
         The frame with canvas and buttons.
      class BounceFrame extends JFrame
            Constructs the frame with the canvas for showing the
            bouncing ball and Start and Close buttons
         public BounceFrame()
            setSize(WIDTH, HEIGHT);
            setTitle("Bounce");
            Container contentPane = getContentPane();
            canvas = new BallCanvas();
            contentPane.add(canvas, BorderLayout.CENTER);
            JPanel buttonPanel = new JPanel();
            addButton(buttonPanel, "Start",
               new ActionListener()
                     public void actionPerformed(ActionEvent evt)
                        addBall();
            addButton(buttonPanel, "Close",
               new ActionListener()
                     public void actionPerformed(ActionEvent evt)
                       System.exit(0);
            contentPane.add(buttonPanel, BorderLayout.SOUTH);
            Adds a button to a container.
            @param c the container
            @param title the button title
            @param listener the action listener for the button
         public void addButton(Container c, String title,
            ActionListener listener)
            JButton button = new JButton(title);
            c.add(button);
            button.addActionListener(listener);
            Adds a bouncing ball to the canvas and makes
            it bounce 1,000 times.
         public void addBall()
            try
               Ball b = new Ball(canvas);
               canvas.add(b);
               for (int i = 1; i <= 1000; i++)
                  b.move();
                  Thread.sleep(5);
            catch (InterruptedException exception)
         private BallCanvas canvas;
         public static final int WIDTH = 450;
         public static final int HEIGHT = 350;
        The canvas that draws the balls.
    class BallCanvas extends JPanel
            Add a ball to the canvas.
            @param b the ball to add
       public void add(Ball b)
           balls.add(b);
        public void update(Graphics g) {
             super.update(g);
             System.out.println("Test");
        public void paintComponent(Graphics g)
          super.paintComponent(g);
          Graphics2D g2 = (Graphics2D)g;
          for (int i = 0; i < balls.size(); i++)
             Ball b = (Ball)balls.get(i);
             b.draw(g2);
            // System.out.println("Test");
        private ArrayList balls = new ArrayList();
        A ball that moves and bounces off the edges of a
       component
    class Ball
            Constructs a ball in the upper left corner
            @c the component in which the ball bounces
        public Ball(Component c) { canvas = c; }
           Draws the ball at its current position
           @param g2 the graphics context
        public void draw(Graphics2D g2)
           g2.fill(new Ellipse2D.Double(x, y, XSIZE, YSIZE));
          Moves the ball to the next position, reversing direction
          if it hits one of the edges
       public void move()
          x += dx;
          y += dy;
           if (x < 0)
              x = 0;
              dx = -dx;
         if (x + XSIZE >= canvas.getWidth())
             x = canvas.getWidth() - XSIZE;
              dx = -dx;
           if (y < 0)
             y = 0;
              dy = -dy;
           if (y + YSIZE >= canvas.getHeight())
              y = canvas.getHeight() - YSIZE;
              dy = -dy;
           //canvas.paint(canvas.getGraphics());//this would OK.
           canvas.repaint();//This not work, please tell me why?
        private Component canvas;
        private static final int XSIZE = 15;
       private static final int YSIZE = 15;
       private int x = 0;
       private int y = 0;
       private int dx = 2;
       private int dy = 2;
    }this program create a GUI containing a "add ball" button to creat a ball and make it bounce inside the window. ( this seems to be stupid example but it is just an example of why we should use Thread for the purpose ).
    Note: in the move() method, if i use canvas.repaint() then the ball is not redrawn after each movement. but if i use canvas.paint(canvas.getGraphics()) then everythings seem to be OK.
    Another question: Still the above programe, but If I create the ball and let it bounce in a separate thread, then canvas.repaint() in the move method work OK.
    Any one can tell me why? Thanks alot !!!

    I don't know why the one method works. Based on my Swing knowledge neither method should work. Did you notice that the JButton wasn't repainted until after the ball stopped bouncing. That is because of the following code:
    for (int i = 1; i <= 1000; i++)
        b.move();
        Thread.sleep(5);
    }This code is attempting to move the ball and then sleep for 5 milliseconds. The problem with this code is that you are telling the Event Thread to sleep. Normally painting events are added to the end of the Event Thread to allow for multiple painting requests to be combined into one for painting efficiency. When you tell the Thread to sleep then the GUI doesn't get a chance to repaint itself.
    More details about the EventThread can be found in the Swing tutorial:
    http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html
    This explains why the button isn't repainted, but it doesn't explain why the ball bounces. I don't know the answer to this for sure, but I do know that there is a method called paintImmediately(...) which causes the painting to be performed immediately without being added to the end of the Event Thread. This means the painting can be done before the Thread sleeps. Maybe the canvas.paint(....) is somehow invoking this method.
    When you click on the button this code is executed in the EvWell in Swing, all GUI painting is done on the Event Thread

  • Why RichCommandButton doesn't invoke the actionListener method?

    I have a dynamically drop down list, it is refreshed when user changes something on the UI.
    And I add a “RichCommandButton” button and set its ActionListener is a method in the backend bean (for example, #{ctrlBean.onClick} ), the bean’s scope is Request.
    In the backend bean method, I want to do the commit.
    DCBindingContainer bindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    oracle.binding.OperationBinding operationBinding =
    bindings.getOperationBinding("Commit");
    operationBinding.execute();
    When I click the button on UI, the UI refreshes once and the dynamical entity type dropdown list becomes empty and the debugger doesn’t come into the breakpoint in the method.
    Can anybody explain the process when clicking the button?
    I don't know why the UI refreshes, but don't invoke my method.
    Thanks

    K. Konuri
    An Applet must implement at least one
    of the following methods: init, start, or paint. Unlike Java applications, applets do not need to implement a
    main method
    The init() method, which works much like a constructor, handles whatever
    initialization your applet requires. The browser or applet viewer automatically
    calls it to perform applet initialization each time the applet is loaded.
    Deepak

  • Repaint dont call the paint

    Hi all,
    I tried to make a little game loop and draw something to my screen. I have class which is a core of the application - GameScreen. The repaint() method in while loop was execute but the repaint() didn`t call the paint method. Is somebody there who knows where the bug is?
    thnx a lot
    here is the code of the GameScreen class:
    import javax.microedition.lcdui.Canvas;
    import javax.microedition.lcdui.Display;
    import javax.microedition.lcdui.Graphics;
    public class GameScreen extends Canvas implements Runnable
         private RoadRun theMidlet;
         private boolean running = true;
         public GameScreen(RoadRun midlet)
              theMidlet = midlet;
              Thread t = new Thread(this);
              t.run();
         protected void paint(Graphics graphics)
    //here i am drawing
    System.out.println("paint method was running");
         public void run()
              while(running)
                   repaint();
    System.out.println("writte something to screen for check");
    }

    You have to use repaint() with serviceRepaints() for immediate repaint and use t.start() instead of t.run().
    Edited by: Gericop on 2008.08.01. 0:29

  • What's the chain of methods called for painting components?

    Hi, I'm trying to find out at what point components are painted within a container, as in what methods are being called for that component to be rendered to the graphics context.
    I've tried watching for calls going to paint, paintAll and paintComponents, but if a component has been added to a container it seems that even if I override all of those methods of the container the components that have been added still get displayed.
    So I suppose I have two questions:
    * - What is the chain of methods called when a container is told to paint/repaint itself?
    * - What are the purpose of paintAll & paintComponents, I can't find anything that actually uses these calls.
    Thanks in advance,
    L

    Well it seems that the paint method of the component is being called from sun.awt.RepaintArea.paint(...) which itself is being kicked off from handling an event that's been thrown.
    That's clearer now....but has anyone seen when paintAll, paintComponents or the printXXX counterparts have actually been called by a part Sun's code? I can see how they (Sun) would advocate a practice lke this, but it would seem kinda lame for them to suggest it and then for them not to use it themselves.....that's why I think there's probably something in the JRE that does call these methods at sometime....can anyone cast some light on this?

  • Odata JDBC Service: getting NullPointerException: while trying to invoke the method

    Hi,
    I am testing OData, for that I followed the steps given in this tutorial:
    http://scn.sap.com/community/developer-center/mobility-platform/blog/2014/06/10/creating-an-odata-service-based-on-sap-gateway-soap-jdbc-and-jpa-data-sources-ba
    It wasn't working as it should, so to understand it better, I created a new project with Stock table only.
    Manually entered all it's properties and then deploy it.
    Issue1: when I create a JDBC connection to connect with derby database, The driver field has maximum limit and whole driver string is not copied. Attached is the screen shot.
    Where as I need to enter: org.apache.derby.jdbc.ClientDriver.
    Issue 2: I can't test the connection from here, weather it's working fine or not ?
    Issue 3:
    When I deploy the project and test the result, I get the Stock Service, But when I try to run this, I get nullpointer exception.
    URL: http://localhost:8080/gateway/odata/sap/WSTest1;v=1
    Response:
    <?xml version="1.0" encoding="utf-8"?>
    <service xml:base="http://localhost:8080/gateway/odata/sap/WSTest1;v=1/" xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom">
      <workspace>
       <atom:title>Default</atom:title>
       <collection href="StockSet">
       <atom:title>StockSet</atom:title>
       </collection>
      </workspace>
    </service>
    Now I need to run StockSet, so next url to access the stock list,
    to get stocks:
    http://localhost:8080/gateway/odata/sap/WSTest1;v=1/SAP/StockSet
    Now I get the following response:
        <?xml version="1.0" ?>
        <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
        <code>
        </code>
        <message xml:lang="en">java.lang.NullPointerException: while trying to invoke the method java.lang.Object.hashCode() of a null object loaded from local variable 'k'</message>
        </error>
    I am not able to figure out, why I am getting this error and how to fix it.
    All I want is to create a ODAta on ESPM_STOCK sample table given in example.
    Looking forward to hear from you.
    Thanks.

    Waqas Sadiq
    Issue1: when I create a JDBC connection to connect with derby database, The driver field has maximum limit and whole driver string is not copied. Attached is the screen shot.
    Are you working on SMP3.0 (lower version than SP03)?
    If yes, then there is character restriction in SMP3.0 (SP00, SP01), maximum length for a database driver is 25 characters.
    e.g. if driver name is oracle.jdbc.driver.OracleDriver but when you enter this, then you will see onlyoracle.jdbc.driver.Oracle
    Until unless we pass the correct driver value things will not work. there is a workaround for this. You create a desitnation with restricted character length.
    You would be seeing a property file for each created destination underC:\SAP\MobilePlatform3\Server\config_master\service.destinations\destinations
    Go there and open the created "OracleDB" and edit the "DriverName" to the full string:oracle.jdbc.driver.OracleDriver
    Please go through this blog for more understanding:
    http://scn.sap.com/community/developer-center/mobility-platform/blog/2014/01/09/how-to-connect-an-oracle-db-with-integration-gateway-in-smp3
    Note: seems this problem has been resolved in SMP3 SP03
    Issue 2: I can't test the connection from here, weather it's working fine or not ?
    I didnt find a way to test a destination. So you have to be sure about what all values you are entering.
    Once you are done with Destination creation, map it to the respective deployed service under "services" tab.
    Issue 3: When I deploy the project and test the result, I get the Stock Service, But when I try to run this, I get nullpointer exception
    Make sure you have corrected "Database driver" name manually. And then check if you are facing same issue.
    Does this URL expect any input parameters?
    http://localhost:8080/gateway/odata/sap/WSTest1;v=1/SAP/StockSet
    Regards,
    JK

  • RSSDK:300 while trying to invoke the method org.omg.cwm.reso urce.relationa

    Hi All,
    While trying to load data through an info package till PSA, the data load is getting failed with error message "RSSDK:300 while trying to invoke the method org.omg.cwm.reso urce.relational.Table.getName() of an object loade d from local v".
    The source system is UD Connect.
    Does anyone have any idea on this issue.

    Hi All,
    While trying to load data through an info package till PSA, the data load is getting failed with error message "RSSDK:300 while trying to invoke the method org.omg.cwm.reso urce.relational.Table.getName() of an object loade d from local v".
    The source system is UD Connect.
    Does anyone have any idea on this issue.

  • While trying to invoke the method java.lang.String.length() of an object loaded from local variable 'payload'

    Hi,
    Our PI is getting data from WebSphere MQ and pushing to SAP. So our sender CC is JMS and receiver is Proxy. Our PI version is 7.31.
    Our connectivity between the MQ is success but getting the following error while trying to read the payload.
    Text: TxManagerFilter received an error:
    [EXCEPTION]
    java.lang.NullPointerException: while trying to invoke the method java.lang.String.length() of an object loaded from local variable 'payload'
           at com.sap.aii.adapter.jms.core.channel.filter.ConvertJmsMessageToBinaryFilter.filter(ConvertJmsMessageToBinaryFilter.java:73)
           at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:204)
           at com.sap.aii.adapter.jms.core.channel.filter.InboundDuplicateCheckFilter.filter(InboundDuplicateCheckFilter.java:348)
           at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:204)
    I have searched SDN but couldn't fix it. Please provide your suggestion.
    With Regards
    Amarnath M

    Hi Amarnath,
    Where exactly you are getting this error?
    If you are getting at JMS Sender communication channel, try to stop and start the JMS communication channel and see the status, also use XPI Inspector to get the exact error log.
    for reference follow below blogs:
    Michal's PI tips: ActiveMQ - JMS - topics with SAP PI 7.3
    Michal's PI tips: XPI inspector - help OSS and yourself
    XPI Inspector

Maybe you are looking for

  • Motion 4 crashes on start after Lion upgrade

    Just upgraded from SL to the new Lion, upgraded FCS2 to FCS3 on my MBP 15 (relativley new, i7) and can't get Motion to start, it keeps crashing at the same Thread; Crashed Thread:  7  com.apple.CFSocket.private (All other FCS 3 start ok after the upg

  • How to remove files in "../work/localhost_8080" ?

    Hi all, I am using tomcat, there is one folder at work/localhost_8080 which always grow bigger and bigger everytime i accessed the page. Can anyone explain why is this so ? How to avoid it from growing too big in the future ? Coz currently I am runni

  • Convert bytearray into sound

    Hey.. I'm using blazeDs to comunicate with java classes, and i call a method that returns a sound file, that could either be wav or mp3, i recieve it as a ByteArray, and i need to convert it and play, i tried Loader.loadBytes, but i get an error sayi

  • Why do I get a lot of wakeups_resource_spin dumps on Console.app under 10.9.x on an old MacBook Pro ?

    I've noticed, under the "Console.app" utility under Mavericks 10.9.3 and 10.9.4 (on an old 15-inch Nov. (mid-)2007 MacBook Pro), that I get a lot of wakeups_resource_spin dumps & some cpu_resource_spin dumps . Why is that ?

  • Adobe Illustrator - "Not Enough Memory"

    Adobe Illustrator will not open."ADOBE ILLUSTRATOR HAS STOPPED WORKING""A PROBLEM CAUSED THE PROGRAM TO STOP WORKING CORRECTLY" "WINDOWS WILL CLOSE THE PROGRAM AND INFORM YOU IF THERE IS A SOLUTION" Is there anything I can do?