Multithreaded graphics applet gets NullPointerException

Hi!
This is a complex issue and the code's big, so i'll try
to explain the main part.
I have five classes.
AppletClass (this one extends Applet)
GraphicItem (just a little sprite which can draw itself)
Thread1 (draws a bunch of GraphicItems in background on a Graphics which is set by setg() in this class)
Thread2 (draw a random clolor text line in background
on a Graphics which is set by setg() in this class)
Drawer (a thread that draws an image set in
the constructor ona graphics which is set by setg() in this class)
What is it for: Well, this is a dubble buffering example,
where two threads draw into one image which works
as a buffer and then another thread draw that image
into the applet area.
The problem is that when Thread1 in run() calls
gitem.draw(g) where g is Graphics i sometimes
get NullPointerException, also, it happenes in some
other place but i cannot pinpoint it. Also,it happenes
always when i restart applet w/o reloading in
JBuilder (nor the browser).
The thing is that i do not use synchronized or
imageUpdate() in the Drawer (imageUpdates() does
nothing), so it is possible for two or more object to
have access to the same Graphics object at the same
time. Also, while Drawer draws the image, the other
thread are drawing onto the image. So, there might
be a conflict, i think. The other other is that when
i comment out all Thread.sleep() the image get
clobbered. That is, the GraphicItem is a cross of
random color, so i shoudl see thousands of crosses of
random color, but i thousands of crosses of pretty
much the same color as it seems like Random is not
working or drawing is broken.
Anyway, any idea how to properly implement such
thing? What precautions shoudl i take and which
conflicts and how should i resolve?
And, of course, in what cases NullPointerException is
generated? I mean, what exxctly does it mean and
when usually occurs?
PS: Don't you think it is weird to get such
exception in a language which officially
has no pointers? :)

Why it SOUNDS like is the Image you are drawing may not be completly loaded yet.. so the first few times it's blitted ( and possibly if it gets bumped out of memory ) attempting to draw it will throw a null pointer.
I solved that in my own code by using a MediaTracker on the image when it was created to make sure that it is loaded and ready to be draw immediatly.

Similar Messages

  • Very simple EJB 3.0 MDB but I get NullPointerException

    I tried to create a very simple EJB 3.0 Message Driven Bean in JDeveloper 10.1.3.2 as follows:
    Message Driven Bean Class:
    import javax.ejb.MessageDriven;
    import javax.jms.Message;
    import javax.jms.MessageListener;
    @MessageDriven(mappedName="MDBQueue")
    public class MDB implements MessageListener {
    public void onMessage(Message message) {
    System.out.println("Got message!");
    Application Client:
    import javax.annotation.Resource;
    import javax.jms.*;
    public class MDBAppClient {
    @Resource(mappedName="MDBQueueConnectionFactory")
    private static QueueConnectionFactory queueCF;
    @Resource(mappedName="MDBQueue")
    private static Queue mdbQueue;
    public static void main(String args[]) {
    try {
    QueueConnection queueCon = queueCF.createQueueConnection();
    QueueSession queueSession = queueCon.createQueueSession
    (false, Session.AUTO_ACKNOWLEDGE);
    QueueSender queueSender = queueSession.createSender(null);
    TextMessage msg = queueSession.createTextMessage("hello");
    queueSender.send(mdbQueue, msg);
    System.out.println("Sent message to MDB");
    queueCon.close();
    } catch(Exception e) {
    e.printStackTrace();
    But I get the following error:
    java.lang.NullPointerException
         at model.MDBAppClient.main(MDBAppClient.java:17)
    I read similar problem in the this thread:
    Re: message driven bean on ejb 3.0 does not work
    some one said that the version in ejb-jar.xml must be changed from 2.1 to 3.0
    but in this case there is no ejb-jar.xml.
    ( I have other cases with ejb-jar.xml file but I can't change the version in ejb-jar.xml)
    the version in web.xml is 2.4 but it not accept any value except 2.4 and an error occur when I tried to change it to 3.0
    please can you tell me why I get NullPointerException and how can I allow EJB 3.0 MDB and JMS to work in JDeveloper

    Note that you can't run MDBs in the embedded OC4J in JDeveloper - try deploying to a stand-alone install of OC4J and see if it works there.

  • Getting NullPointerException when trying to view wsdl on browser.

    I have an enterprise application which is basically a spring web service.
    I have used "org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition" for dynamic wsdl generation.
    I use the following spring libraries spring ,
    spring-jpa.jar
    spring-oxm-1.5.8.jar
    spring-oxm-tiger-1.5.8.jar
    spring-web-2.5.jar
    spring-webmvc.jar
    spring-ws-1.5.8-all.jar
    spring-ws-core-1.5.8.jar
    spring-ws-core-tiger-1.5.8.jar
    spring-ws-security-1.5.8.jar
    spring-ws-support-1.5.8.jar
    spring-xml-1.5.8.jar
    spring.jar
    And I use xmlparserv2.jar as xml library. Because If I don't use this library I get "oracle.xml.jaxp.JXDocumentBuilderFactory not found" exception.
    Other xml libraries I use are: xercesImpl.jar, xml-apis.jar, XmlSchema-1.3.2.jar, xalan-2.7.0.jar, xdb.jar, xml.jar, xschema.jar
    The issue is, application is deployed in weblogic 10.3.2 on a linux box.
    Application is deployed fine, it is working fine. Request and response all are working as expected. But when I want to see wsdl, I am getting NullPointerException.
    Application is deployed in the url: http://localhost:7001/springws-example
    The exception I am getting is at the url: http://localhost:7001/springws-example/springws.wsdl
    where springws.wsdl would be the wsdl name, with which it could be accessed.
    This exception is occuring only on linux boxes. I have tested in two linux boxes, it behaves the same way.
    In windows I have weblogic 10.3.3 , where everything is working fine. Wsdl is loaded on browser and soap end point address is updated with correct hostname, port and context root.
    The exception I am getting is as follows,
    Exception
    java.lang.NullPointerException
    at oracle.xml.parser.v2.XMLDocument.getDocumentURI(XMLDocument.java:2114)
    at org.springframework.ws.transport.http.LastModifiedHelper.getLastModified(LastModifiedHelper.java:50)
    at org.springframework.ws.transport.http.WsdlDefinitionHandlerAdapter.getLastModified(WsdlDefinitionHandlerAdapter.java:113)
    at org.springframework.ws.transport.http.MessageDispatcherServlet.getLastModified(MessageDispatcherServlet.java:245)
    Has anyone come across this issue?
    Even if not, people having knowledge on linux and weblogic.. please help.
    Thanks in advance.
    Edited by: 851334 on Apr 11, 2011 4:07 AM

    How did you map your spring-ws servlet?
    <servlet>
            <servlet-name>spring-ws</servlet-name>
            <servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class>
    </servlet>
    <servlet-mapping>
            <servlet-name>spring-ws</servlet-name>
            <url-pattern>*.wsdl</url-pattern>
    </servlet-mapping>and what properties did you configure?
    <bean id="something" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition">
        <property name="schema" ref="schema"/>
        <property name="portTypeName" value="MyPort"/>
        <property name="locationUri" value="http://localhost:7001/springws-example/service/"/>
        <property name="targetNamespace" value="http://middlewaremagic.com"/>
    </bean>In this case the WSDL could be reachable at http://localhost:7001/springws-example/service/something.wsdl

  • Getting NULLPointerException while merging pdf files using PDFDocMerger

    Hi,
    I am using BI Publisher 11.1.1.7 Version Jar Files to use PDFDocMerger Class in Jdeveloper and my requirement is,
    need to merge pdf files taking from the third party server.So, I am passing url as an input to PDFDocMerger(As per BIP documentation we can pass url as an input to PDFDocMerger using Object Class) but I am getting NULLPointerException.
    I am using below code:
    import java.io.File;
    import java.io.FileOutputStream;
    import oracle.xdo.common.pdf.util.PDFDocMerger;
    public class PDFMerger
    public PDFMerger() {
         public void pdfDocumentMerger() {
    try {
    System.out.println("Testing1");
                      Object[] f = new Object[2];
                f[0]= ("http://docs.mytxi.com/downloads/Invoices/OE/06082013/02599553.PDF");
                f[1]= ("http://docs.mytxi.com/downloads/Invoices/OE/06082013/02599553.PDF");
                FileOutputStream output;
                output = new FileOutputStream("c:\\docs\\OutputPDF.pdf");
         System.out.println("Testing3" + f[0]);
                PDFDocMerger pdfMerger;
                pdfMerger = new PDFDocMerger(f, output);
         System.out.println("Testing4");
          pdfMerger.process();
         System.out.println("Testing5");
    pdfMerger = null;
    output.close();
         }//try
          catch (Exception e)
          System.out.println(" Exception " + e.getMessage()) ;
          e.printStackTrace() ;
          System.out.println("End") ;
       public static void main(String[] argv) {
    PDFMerger xmlPublisher;
    xmlPublisher = new PDFMerger();
    xmlPublisher.pdfDocumentMerger();
    Error:
    Testing1
    Testing3http://docs.mytxi.com/downloads/Invoices/OE/06082013/02599553.PDF
    Testing4
    Jul 22, 2013 10:22:22 PM oracle.xdo.common.pdf.util.PDFDocMerger$PDFUtility <init>
    SEVERE: The first input to be merged has problem and caused stopping merging
    Jul 22, 2013 10:22:22 PM oracle.xdo.common.log.Logger log
    WARNING: java.lang.NullPointerException
    at oracle.xdo.template.pdf.util.PDFObjectDictionary.<init>(PDFObjectDictionary.java:36)
    at oracle.xdo.common.pdf.util.PDFDocMerger$PDFUtility.checkIfDupFields(PDFDocMerger.java:2438)
    at oracle.xdo.common.pdf.util.PDFDocMerger$PDFUtility.processWithNoOut(PDFDocMerger.java:2932)
    at oracle.xdo.common.pdf.util.PDFDocMerger.generateMergedPDF(PDFDocMerger.java:623)
    at oracle.xdo.common.pdf.util.PDFDocMerger.mergeDocs(PDFDocMerger.java:551)
    at oracle.xdo.common.pdf.util.PDFDocMerger.process(PDFDocMerger.java:506)
    at xxtxi.oracle.apps.ar.iex.server.PDFMerger.pdfDocumentMerger(PDFMerger.java:24)
    at xxtxi.oracle.apps.ar.iex.server.PDFMerger.main(PDFMerger.java:40)
    Exception java.lang.Exception: Document #2 looks corrupted.
    oracle.xdo.XDOException: java.lang.Exception: Document #2 looks corrupted.
    at oracle.xdo.common.pdf.util.PDFDocMerger.process(PDFDocMerger.java:510)
    at xxtxi.oracle.apps.ar.iex.server.PDFMerger.pdfDocumentMerger(PDFMerger.java:24)
    at xxtxi.oracle.apps.ar.iex.server.PDFMerger.main(PDFMerger.java:40)
    End
    Process exited with exit code 0.
    It would be great, if any one provide solution on this issue.
    Thanks,
    Irfan.

    One of the merged PDF was edited by using the "Adobe Lifecycle Assembler" tool and i was able to open that file successfully in my machine.
    Is bi publisher API compatible with such files?
    It would be great, if any one can throw some light on this issue.
    Thanks,
    Indira

  • Getting NullPointerException in ADF form using Custom Selection Listener

    Hi,
    I am getting NullPointerException from getRowKey() in GenericTableSelectionHandler.java while pressing "Page Down" key or continuous pressing of "Down Arrow" key in Read Only ADF form (Query, Sort Enabled) using Custom Selection Listener.
    I have used the custom selection listener as mentioned at http://www.oracle.com/technetwork/developer-tools/adf/learnmore/23-generic-table-selection-listener-169162.pdf
    The requirement to use custom Selection Listener to populate some fields from the selected row.
    J Developer Version: 11.1.1.4.0
    The error is as below
    +<LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5+
    javax.el.ELException: java.lang.NullPointerException
    +     at com.sun.el.parser.AstValue.invoke(Unknown Source)+
    +     at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)+
    +     at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1300)+
    +     at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:268)+
    +     at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:144)+
    +     at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:402)+
    +     at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:148)+
    +     at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:271)+
    +     at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:144)+
    +     at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:402)+
    +     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)+
    +     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)+
    +     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)+
    +     at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)+
    +     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)+
    +     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)+
    +     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)+
    +     at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)+
    +     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:879)+
    +     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:312)+
    +     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:185)+
    +     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)+
    +     at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)+
    +     at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)+
    +     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)+
    +     at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)+
    +     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)+
    +     at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)+
    +     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)+
    +     at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)+
    +     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)+
    +     at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)+
    +     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)+
    +     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)+
    +     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)+
    +     at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)+
    +     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)+
    +     at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:175)+
    +     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)+
    +     at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)+
    +     at java.security.AccessController.doPrivileged(Native Method)+
    +     at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)+
    +     at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)+
    +     at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)+
    +     at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)+
    +     at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)+
    +     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)+
    +     at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)+
    +     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)+
    +     at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)+
    +     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)+
    +     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)+
    +     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)+
    +     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)+
    +     at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)+
    +     at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)+
    +     at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)+
    +     at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)+
    +     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)+
    +     at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)+
    Caused by: java.lang.NullPointerException
    +     at ibm.view.GenericTableSelectionHandler.makeCurrent(GenericTableSelectionHandler.java:48)+
    +     at ibm.view.backing.Testpage.XxSelectListener(Testpage.java:207)+
    +     at sun.reflect.GeneratedMethodAccessor355.invoke(Unknown Source)+
    +     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)+
    +     at java.lang.reflect.Method.invoke(Method.java:597)+
    +     ... 60 more+
    The table structure is as below for your reference
    +<af:table value="#{bindings.TestTableAdfView1.collectionModel}"+
    var="row"
    +rows="#{bindings.TestTableAdfView1.rangeSize}"+
    +emptyText="#{bindings.TestTableAdfView1.viewable ? 'No data to display.' : 'Access Denied.'}"+
    +fetchSize="#{bindings.TestTableAdfView1.rangeSize}"+
    +rowBandingInterval="0"+
    +filterModel="#{bindings.TestTableAdfView1Query.queryDescriptor}"+
    +queryListener="#{bindings.TestTableAdfView1Query.processQuery}"+
    +filterVisible="true" varStatus="vs"+
    +rowSelection="single"+
    +binding="#{backingBeanScope.backing_testpage.t1}"+
    +id="t1"+
    +selectionListener="#{backingBeanScope.backing_testpage.XxSelectListener}">+
    Any help to resolve the issue is highly appreciated.
    Thanks,
    Arijit
    Edited by: user10570755 on Aug 2, 2011 11:19 PM

    //selection with the selection in the ADF model Object
    _selectedRowData = _table.getSelectedRowData();
    //cast to JUCtrlHierNodeBinding, which is the ADF object //that represents a row
    JUCtrlHierNodeBinding _nodeBinding = (JUCtrlHierNodeBinding) _selectedRowData;
    //get the row key from the node binding and set it //as the current row in the iterator
    Key _rwKey = _nodeBinding.getRowKey();i guess nodeBinding becoming null here.. _table.getSelectedRowData().. is not returnign anything                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Appletis getting refreshed

    I have an applet in .html file. when the applet link is clicked applet gets reloaded. If it's already opened it's get refreshed.
    Problem is, i do not want to refresh my applet once it's started. In my .html, i want to know if this applet window is already opened, if it is, then i do not want to refresh my applet.
    anyone knows how to do it.
    regards
    Srikant

    I have an applet in .html file. when the applet link
    is clicked applet gets reloaded. If it's already
    opened it's get refreshed.Lucky you. Many have the problem that it doesn't refresh.
    Problem is, i do not want to refresh my applet once
    it's started. In my .html, i want to know if this
    applet window is already opened, if it is, then i do
    not want to refresh my applet.
    anyone knows how to do it.Well, you could make it interact with some magic Javascript, turning the link off or on.

  • What permissions do signed applets get? And how can I tell?

    This could be a JNLP question, but it's really about signing versus not signing.
    I find that if I sign the applet's jar, I get permissions I don't get if I don't sign it, even though I haven't asked for any permissions. What's disturbing about this is that neither the JNLP spec (look under Launch) nor the Permissions spec (look here [http://download.oracle.com/javase/1.4.2/docs/guide/security/permissions.html#SecMgrChecks] -- I don't know if there's a more recent version) make any mention of signing. (Well, the JNLP spec says you need to sign if you ask for permissions, but I'm not asking for any permissions in the JNLP.)
    So, my question is: Where is the set if permissions that an applet gets solely by virtue of being signed documented? Failing that, is it possible to get the security manager to list out the permissions I have?

    bump
    having the same existential question about the secret mysteries of jnlp applets, I'd be highly interested by the answer :)

  • Applet getting closed autometically

    Hi,
    We are using fireFox 3.6.12.
    We are running a program which loads an Applet in an IFrame of a JSP.
    This works fine when a FireFox mozilla opens for the first time.
    If we refresh the page, and try the same action, the applet gets loaded but after 5 seconds it gets closed automatically.
    This is happening always...
    This works fine on FireFox 4 beta.
    have java 1.6.22
    Please help. this is a blocking issue.
    mail me if you can with your updates... [email protected]
    Nikhil

    A combination of the suggested solutions gives the Applet focus about 50% of the time. I guess this is the best result I can get, and I'm satisfied with it. Thanks!
    In start()
    setVisible(true);
    requestFocus();
    requestFocusInWindow();
    requestFocus();
    In paint()
    if (mFirstPaint)
    mFirstPaint = false;
    setVisible(true);
    requestFocus();
    requestFocusInWindow();
    requestFocus();
    }

  • SIMPLE APPLET GETTING RUNTIME ERRORS

    I can figure out why this applet will not work, here is the code:
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import javax.swing.*;
    public class Convert extends Applet {
    JTextField tCentigrade = new JTextField();
    JLabel lCentigrade = new JLabel();
    JLabel lEqual = new JLabel();
    String Fahrenheit;
    //Construct the applet
    public Convert() {
    tCentigrade.setText("45");
    //Component initialization
    private void jbInit() throws Exception {
    this.setLayout(null);
    tCentigrade.setText("");
    tCentigrade.setBounds(new Rectangle(94, 135, 56, 24));
    tCentigrade.addActionListener(new Convert_tCentigrade_actionAdapter(this));
    lCentigrade.setFont(new java.awt.Font("Serif", 0, 16));
    lCentigrade.setText("Centigrade");
    lCentigrade.setBounds(new Rectangle(22, 130, 71, 32));
    this.setVisible(true);
    lEqual.setFont(new java.awt.Font("Serif", 0, 24));
    lEqual.setText("=");
    lEqual.setBounds(new Rectangle(171, 139, 34, 15));
    this.add(lCentigrade, null);
    this.add(tCentigrade, null);
    this.add(lEqual, null);
    void tCentigrade_actionPerformed(ActionEvent e) {
    double F;
    double C = Double.parseDouble(tCentigrade.getText());
    F = ((9/5) * C) + 32;
    Fahrenheit = Double.toString(F);
    public void paint(Graphics g)
    g.drawString(Fahrenheit,50,50);
    class Convert_tCentigrade_actionAdapter implements java.awt.event.ActionListener {
    Convert adaptee;
    Convert_tCentigrade_actionAdapter(Convert adaptee) {
    this.adaptee = adaptee;
    public void actionPerformed(ActionEvent e) {
    adaptee.tCentigrade_actionPerformed(e);
    }

    the error message, if anyone wants to know, was:
    java.lang.NullPointerException: string is null
    at sun.java2d.SunGraphics2D.drawString(SunGraphics2D.java:2584)
    at Convert.paint(Convert.java:51)
    at sun.awt.RepaintArea.paint(RepaintArea.java:177)
    at sun.awt.motif.MComponentPeer.handleEvent(MComponentPeer.java:374)
    at java.awt.Component.dispatchEventImpl(Component.java:3658)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
    at jva.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
    you get it because the string you try to draw at Convert.paint(Convert.java:51) is null.

  • Refresh applet sqlj NullPointerException URGENT!

    I have the following sqlj code in an applet to retrive data from an oracle database. After this the code goes onto draw the data in the applet using AWT (that code isn't shown here). My trouble is that when I get to the following line Connection con = Oracle.connect("jdbc:oracle:thin:@ebalpha:1525:ORCL", "flowmanager", "xxxxx").getConnection(); I get a Null Pointer exception only after refreshing the page using F5.
    So to overcap I get a NullPointerException only when I refresh the applet. It runs perfectly the first time. The applet need to be refreshed because the data in the table get updated and the applet need to be refreshed to show the data changes.
    public void getFlowSpaceData() throws SQLException {
    // MyIter iter;
    String strUserName = getParameter("paramUserName");
    String strFlowName = new String();
    Connection con = Oracle.connect("jdbc:oracle:thin:@ebalpha:1525:ORCL", "flowmanager", "xxxxx").getConnection();
    strQuery = "select FLOWNAME FROM FLOWMANAGER.TMP_FLOWNAMES WHERE USERNAME ='" + strUserName +"'";
    PreparedStatement pstmt0 = con.prepareStatement(strQuery);
    ResultSet rs0 = pstmt0.executeQuery();
    while (rs0.next()) {
    strFlowName = rs0.getString(1);
    rs0.close();
    pstmt0.close();
    strQuery = "select FLOWNAME, USERNAME, PANELROW, PANELCOL, RELATEROW, RELATECOL, OBJTYPE, BASECODE, INDUSTRYID, PANELNUM, BUSINESSPROCESSID FROM flows WHERE flowname ='" + strFlowName + "' AND username ='" + strUserName +"' ORDER BY PANELNUM";
    PreparedStatement pstmt1 = con.prepareStatement(strQuery);
    ResultSet rs1 = pstmt1.executeQuery();
    int r = 0;
    int c = 0;
    while (rs1.next()) {
    intObjType[r][c]= rs1.getInt(7);
    strID[r][c] = rs1.getString(11);
    //strIDQuery = strIDQuery + 'or ID =' + strinID
    intRowRelation[r][c] = rs1.getInt(5);
    intColRelation[r][c] = rs1.getInt(6);
    c++;
    if(c > 4) {
    r++;
    c = 0;
    rs1.close();
    pstmt1.close();
    PreparedStatement pstmt2 = con.prepareStatement(strQuery);
    ResultSet rs2 = pstmt2.executeQuery();
    r = 0;
    c = 0;
    int i = 0;
    int intSTRLENGTH = 0;
    while(i < 24){
    strQuery = "select name, descr, role from BUSINESSPROCESS WHERE ID = '" + strID[r][c] + "'";
    pstmt2 = con.prepareStatement(strQuery);
    rs2 = pstmt2.executeQuery();
    rs2.next();
    intSTRLENGTH = rs2.getString(1).length();
    if (intSTRLENGTH > 17){
    strLabel1[r][c] = rs2.getString(1).substring(0,17);
    strLabel2[r][c] = rs2.getString(1).substring(18,intSTRLENGTH);
    }else {
    strLabel1[r][c] = rs2.getString(1).substring(0,intSTRLENGTH);
    strLabel2[r][c] = " ";
    intSTRLENGTH = rs2.getString(2).length();
    if (intSTRLENGTH > 17){
    strDescr1[r][c] = rs2.getString(2).substring(0, 17);
    strDescr2[r][c] = rs2.getString(2).substring(18,intSTRLENGTH);
    }else{
    strDescr1[r][c] = rs2.getString(1).substring(0,intSTRLENGTH);
    strDescr2[r][c] = " ";
    c++;
    i++;
    if(c > 4) {
    r++;
    c = 0;
    rs2.close();
    pstmt2.close();
    con.close();
    con = null;
    Thanks for you Assistance! It's greatly appreciated!
    Chris Wallace

    After further research I notice that if I Clear classload cache after every load before I refresh the applet it works fine. I can't have the user brining up the the consule windows and pressing x to clear classloader. Just thought I would give this futher information to help limit what the problem could be.

  • Applet - JNLP2Manager NullPointerException bail out

    All,
    when trying to run my applet I get the following error in the Java console.
    java.lang.NullPointerException
         at sun.plugin2.applet.JNLP2Manager.initialize(Unknown Source)
         at sun.plugin2.main.client.PluginMain$StartAppletRunner.run(Unknown Source)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Error while initializing manager: java.lang.NullPointerException, bail outAnyone knows what the problem is here?
    The applet is packaged within a war and deployed on a Weblogic AS.
    I use Java 1.6.0_14 to compile and launch the applet.
    The applet is started with the following code:
        <script src="http://www.java.com/js/deployJava.js"></script>
        <script>
            var attributes = { code:'test.MyApplet',  width:600, height:910} ;
            var parameters = {jnlp_href: '/jnlp/my-applet.jnlp'} ;
            deployJava.runApplet(attributes, parameters, '1.6');
        </script>Thanks in advance.

    All,
    when trying to run my applet I get the following error in the Java console.
    java.lang.NullPointerException
         at sun.plugin2.applet.JNLP2Manager.initialize(Unknown Source)
         at sun.plugin2.main.client.PluginMain$StartAppletRunner.run(Unknown Source)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Error while initializing manager: java.lang.NullPointerException, bail outAnyone knows what the problem is here?
    The applet is packaged within a war and deployed on a Weblogic AS.
    I use Java 1.6.0_14 to compile and launch the applet.
    The applet is started with the following code:
        <script src="http://www.java.com/js/deployJava.js"></script>
        <script>
            var attributes = { code:'test.MyApplet',  width:600, height:910} ;
            var parameters = {jnlp_href: '/jnlp/my-applet.jnlp'} ;
            deployJava.runApplet(attributes, parameters, '1.6');
        </script>Thanks in advance.

  • Graphics Giving me NullPointerException in my swings program

    hiii
    I have used Graphics to draw the histogram of an image on a blank file and then display it. I am getting a NullPointerException at the line where i call getGraphics().
    My code is as follows:-
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class hist extends JFrame
         JPanel panel = new JPanel(new BorderLayout());
         JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
        JScrollPane PictBox = new JScrollPane();
        JScrollPane HistBox = new JScrollPane();
         String ImageName = "pug.jpg"; //Enter Image to be opened here
         Image image = Toolkit.getDefaultToolkit().getImage(ImageName);
         Image histImage;     
         public hist()
              super("HISTOGRAM OF AN IMAGE");
              getContentPane().add(panel);
              panel.add(splitPane, BorderLayout.CENTER);
            splitPane.setResizeWeight(0.5); // Set the divider in the center
            JLabel originalImage = new JLabel(new ImageIcon(ImageName));
            histImage = createImage(240,320);
            splitPane.setLeftComponent(PictBox);     //this is the original image container
            splitPane.setRightComponent(HistBox);   //this is the Histogram image container
            PictBox.getViewport().add(originalImage);     //Image is added here
            getHistogram();
            displayNewImage();
         public void getHistogram()
              PixelGrabber grabber;
              int width=0,height=0;
              int i,j;
              int sizeofImage=0; //Original Dimensions
              int dataCopy[],data[];
              int ThreeDimImage[][][],ThreeDimImage1[][][];
    //STEP 1:- FETCH THE PIXELS TO WORK WITH      
            try
                  grabber = new PixelGrabber(image, 0, 0, -1, -1, true);
                  if (grabber.grabPixels())
                        width = grabber.getWidth();
                         height = grabber.getHeight();
                         sizeofImage = width * height;
                    data = (int[]) grabber.getPixels(); //Pixel values stored in array data
                    //Next I make a copy of array data[] as array dataCopy[]
                    dataCopy = new int[sizeofImage];
                    for(i=0; i<sizeofImage; i++)
                         dataCopy[i] = data;          
    //STEP 2:- CONVERT PIXELS FROM 1d ARRAY to 3d ARRAY
         //Create a 3d Array to store Alpha-Red-Green-Blue, storing a byte for each.
         //Remaining 24 bits of each integer set to zero.
         ThreeDimImage = new int[height][width][4];
    //      ThreeDimImage1 = new int[height][width][4];
         //Next we perform transfer of actual RGB data from the packed 1d array, to the 3d array.
         int element = 0;
         for(i=0; i<height; i++)
              for(j=0; j<width; j++)
                   ThreeDimImage[i][j][0] = (dataCopy[element] >> 24) & 0xFF; //ALPHA COMPONENT          
                   ThreeDimImage[i][j][1] = (dataCopy[element] >> 16) & 0xFF; //RED COMPONENT                    
                   ThreeDimImage[i][j][2] = (dataCopy[element] >> 8 ) & 0xFF; //GREEN COMPONENT                    
                   ThreeDimImage[i][j][3] = (dataCopy[element] ) & 0xFF;     //BLUE COMPONENT          
                   element++;
    //DRAWING THE HISTOGRAM
                   Graphics g = histImage.getGraphics();
                   g.setColor(Color.white);
                   g.fillRect(0,0,320,240);
                   g.setColor(Color.black);
                   g.drawRect(10,10,310,230);
                   g.setColor(Color.red);
                   int xCoord=230;
                   int yCoord=10;
                   int[] grayLevelImage = new int[height*width];
                   int histogram[] = new int[256];
                   element=0;
                   for(i=0; i<height; i++)
              for(j=0; j<width; j++)
                   grayLevelImage[element] = (int)(
                                                           (0.30 * ThreeDimImage[i][j][1]) +
                                                           (0.59 * ThreeDimImage[i][j][2]) +
                                                           (0.11 * ThreeDimImage[i][j][3])
                   element++;
         for(i=0;i<256;i++)
              histogram[i]=0;     
         int currentpixel=0;
         for(i=0;i<sizeofImage;i++)
              currentpixel = grayLevelImage[i];
              histogram[currentpixel]++;
         int valueToPlot=0;
         for(i=0;i<256;i++)
              if(histogram[i]==0)
                   valueToPlot=0;     //If ther is no pixel of the concernd intensity then print nothn on the histogrm
              else     
                   valueToPlot = (histogram[i]/334)+2;     //otherwise print atleast a 2 pixel tall line
              g.drawLine(xCoord,yCoord,xCoord,(yCoord - valueToPlot));     
              xCoord++;
         g.dispose();
         /*element=0;
         for(i=0; i<height; i++)
              for(j=0; j<width; j++)
                   ThreeDimImage1[i][j][0] = 255;
                   ThreeDimImage1[i][j][1] = grayLevelImage[element];
                   ThreeDimImage1[i][j][2] = grayLevelImage[element];
                   ThreeDimImage1[i][j][3] = grayLevelImage[element];
                   element++;
         //PART 4 - CONVERT PROCESSED 3d ARRAY BACK TO 1d ARRAY
                   element = 0;
                   for( i=0; i<height; i++)
                        for( j=0; j<width; j++)
                             dataCopy[element] = (
                                                      ((ThreeDimImage1[i][j][0] << 24) & 0xFF000000) |
                             ((ThreeDimImage1[i][j][1] << 16) & 0x00FF0000) |
                             ((ThreeDimImage1[i][j][2] << 8) & 0x0000FF00) |
                             ((ThreeDimImage1[i][j][3]) & 0x000000FF)
                             element++;     
    //PART 5:- REGENERATE A MODIFIED IMAGE
                   histImage = createImage( new MemoryImageSource(width,height,dataCopy,0,width) );
    catch (InterruptedException e1)
         e1.printStackTrace();
    //DISPLAY NEW IMAGE     
         public void displayNewImage()
              //FINALLY DISPLAY THE NEW IMAGE
              JLabel histogram = new JLabel(new ImageIcon(histImage));
              HistBox.getViewport().add(histogram);     //Inverted image is added here
         public static void main (String[] args)
              hist h1 = new hist();
              h1.setSize(1000,700);
              h1.setExtendedState(MAXIMIZED_BOTH);
              h1.setVisible(true);

    As I said! You do your drawing in the paintComponent(Graphics g) method of some component. Something along the lines of this example
    import javax.swing.*;
    import java.awt.*;
    import java.util.*;
    public class TestColors extends JFrame
        public TestColors()
            super("Colors");
            final JPanel panel = new JPanel()
                    setPreferredSize(new Dimension(640, 480));
                    setBackground(new Color(0xffffdf));
                public void paintComponent(Graphics g)
                    super.paintComponent(g);
                    final int r = 20;
                    final int r2 = r/4;
                    final int w = getWidth() - r - 1;
                    final int h = getHeight() - r - 1;
                    final Random random = new Random(12321);
                    for (int i = 0; i < 1000; i++)
                        g.setColor(new Color(random.nextFloat(), random.nextFloat(), random.nextFloat()));
                        final int x = random.nextInt(w);
                        final int y = random.nextInt(h);
                        for (int j = 0; j < r2; j++)
                            g.drawRect(x+j, y+j, r-j-j, r-j-j);
            getContentPane().add(new CompassPoint(), BorderLayout.NORTH);
            getContentPane().add(new CompassPoint(), BorderLayout.EAST);
            getContentPane().add(panel, BorderLayout.CENTER);
            getContentPane().add(new CompassPoint(), BorderLayout.WEST);
            getContentPane().add(new CompassPoint(), BorderLayout.SOUTH);
            pack();
        private static class CompassPoint extends JPanel
            private CompassPoint()
                setBackground(Color.WHITE);
                setPreferredSize(new Dimension(100,100));
            public void paintComponent(Graphics g)
                super.paintComponent(g);
                final int h = getHeight();
                final int w = getWidth();
                final double deltac = 1.0/w;
                for (int x = 0; x < w;)
                    final float color = (float)(1.0-deltac*x);
                    g.setColor(getColor(color));
                    for (int j = 0; j < 1; j++)
                        g.drawLine(x,0,x,h);
                        x++;
            protected Color getColor(float color)
                if (color < 0.5)
                    color = (float)(1.0-2.0*color);
                else
                    color = (float)(2.0*color-1.0);
                return new Color(color, color, 1.0f);
        public static void main(String[] args)
            TestColors test = new TestColors();
            test.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            test.setLocationRelativeTo(null);
            test.setVisible(true);
    }The point is that the paintComponent() method gets called whenever a repaint is required. For example, if you re-size the frame or de-iconize the application then the paintComponent() method gets called so that the content is re-drawn.

  • Unable to run a report as an Applet Getting error

    Crystal Report Server  8.5 version
    using "JavaPluginViewer.asp"  from ASP file.
    Here is the log on  Java Console.
    Java Plug-in 1.6.0_16
    Using JRE version 1.6.0_16-b01 Java HotSpot(TM) Client VM
    User home directory = C:\Users\xxxxxxx
    network: Loading user-defined proxy configuration ...
    network: Done.
    network: Loading proxy configuration from Netscape Navigator ...
    network: Error reading registry file: C:\Users\xxxxx\AppData\Roaming\Mozilla\registry.dat
    network: Done.
    network: Loading browser proxy configuration ...
    network: Done.
    network: Proxy Configuration: Browser Proxy Configuration
    basic: Referencing classloader: sun.plugin.ClassLoaderInfo@183f74d, refcount=1
    basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@540408
    basic: Loading applet ...
    basic: Initializing applet ...
    basic: Starting applet ...
    basic: completed perf rollup
    cache: Skip blacklist check as cached value is ok.
    network: Cache entry found [url: http://xxxxx.net/viewer/javaviewer/ReportViewer.jar, version: null]
    network: Connecting http://xxxxx.net/viewer/javaviewer/ReportViewer.jar with proxy=DIRECT
    network: Connecting socket://xxxxx.net:80 with proxy=DIRECT
    network: Connecting http://xxxxx.net/viewer/javaviewer/ReportViewer.jar with cookie "ASPSESSIONIDCQCRBTQR=INCJBNMACMKHENOPCJDECALI; JSESSIONID=ba30bd16d6aa371d3257"
    network: ResponseCode for http://xxxxx.net/viewer/javaviewer/ReportViewer.jar : 304
    network: Encoding for http://xxxxx.net/viewer/javaviewer/ReportViewer.jar : null
    network: Disconnect connection to http://xxxxx.net/viewer/javaviewer/ReportViewer.jar
    Reading certificates from 34102 http://xxxxx.net/viewer/javaviewer/ReportViewer.jar | C:\Users\xxxx\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\16\6fffea90-41b806c2.idx
    security: Accessing keys and certificate in Mozilla user profile: null
    security: Loading Root CA certificates from C:\PROGRA~2\Java\jre6\lib\security\cacerts
    security: Loaded Root CA certificates from C:\PROGRA~2\Java\jre6\lib\security\cacerts
    security: Loading Deployment certificates from C:\Users\xxxxx\AppData\LocalLow\Sun\Java\Deployment\security\trusted.certs
    security: Loaded Deployment certificates from C:\Users\xxxxx\AppData\LocalLow\Sun\Java\Deployment\security\trusted.certs
    security: Loading certificates from Deployment session certificate store
    security: Loaded certificates from Deployment session certificate store
    security: Validate the certificate chain using CertPath API
    security: Obtain certificate collection in Root CA certificate store
    security: Obtain certificate collection in Root CA certificate store
    security: No timestamping info available
    security: Cannot find jurisdiction list file
    security: The CRL support is disabled
    security: The OCSP support is disabled
    security: Checking if certificate is in Deployment denied certificate store
    security: Checking if certificate is in Deployment permanent certificate store
    security: Checking if certificate is in Deployment permanent certificate store
    Crystal Report Viewer 1.3.7
    java.vendor = Sun Microsystems Inc.
    java.version = 1.6.0_16
    os.arch = x86
    os.version = 6.1
    *URL = http://xxxxx.net/Report/rptserver.asp?viewer=java&vfmt=encp&vgen=414&language=en
    Parameters = cmd=get_pg&ttl_info=&page=1&incomplete_page=1&incomplete_page_count=1&pversion=3&promptOnRefresh=1
    network: Connecting http://xxxxx.net/Report/rptserver.asp?viewer=java&vfmt=encp&vgen=414&language=en with proxy=DIRECT
    Failed to connect to server.
    Any help is appreciated.

    Since the error is:
    network: Connecting http://xxxxx.net/Report/rptserver.asp?viewer=java&vfmt=encp&vgen=414&language=en
    what error message do you get when you try connecting to that URL in the browser outside of the Java Applet?
    Sincerely,
    Ted Ueda

  • 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

  • Since loading upgrade to Apple TV just shows graphic of Apple TV connecting cord and itunes graphic cannot get past

    Cannot get wifi or anything but graphic. Prior to this all was working fine.

    You need to grab a micro usb cable and connect to iTunes for restore
    http://support.apple.com/kb/HT4367

Maybe you are looking for

  • FM transmitter won't work with my iPhone

    I bought a Premier FM transmitter from Auto Zone the other day. It has a 30-pin connector with an led panel that lights up when you connect it to an apple device. It's suppose to work with all 30-pin devices but doesn't work with my iPhone 4 (iOS 7.1

  • Iphone 3G will not update - please help

    Dear all I am having repeated problems updating the software on my iPhone 3G and have not been able to do so for almost a year. I am using the latest version of iTunes and the software downloads fine. The problem occurs during the back up. iTunes tel

  • Real Player and Realdownloader are not downloading videos.

    These apps were working until 7/2/13. The popup does not appear on the top right of the video. They do work with IE. Now I've deleted them with Control Panel and reinstalled, but no luck. I'm running an XP box.

  • All my raw photos turn red.

    Yesterday, all my raw photos turn red, first in aperture and then also in the preview. The first photo was converted whith Nikon software (View NX2) the second whith preview, I get the same problem whith Aperture and iPhoto. This photo is from 2011 a

  • HP Sectre XT Pro Windows 8 USB 3.0 issue

    Hello, i need your help with hte following. i installed windows 8 on my spectre xt pro and the usb 3.0 drivers from windows are not working corectly. i tried different usb 3.0 drivers (including the intel one and still no luck). the port can read and