JnlpDownloadServlet with Weblogic 6.1 - Null Pointer Exception
Hi,
I am using Web Start with Weblogic 6.1 and I keep getting the exception
java.lang.NullPointerException
at java.io.File.<init>(File.java:181)
at com.sun.javaws.servlet.DownloadRequest.<init>(DownloadRequest.java:62)
at com.sun.javaws.servlet.JnlpDownloadServlet.handleRequest(JnlpDownloadServlet.java:94)
at com.sun.javaws.servlet.JnlpDownloadServlet.doGet(JnlpDownloadServlet.java:86)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:263)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2390)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1959)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Web start itself does not even startup !
If I don't use the JnlpDownloadServlet I can get a simple example to work.
The jnlp file I am using is
<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for SwingSet2 Demo Application -->
<jnlp
spec="1.0+"
codebase="$$codebase" href="$$name">
<information>
<title>Test Application</title>
<vendor>BD</vendor>
<description>Demo Application</description>
<offline-allowed/>
</information>
<!-- security>
<all-permissions/>
</security-->
<resources>
<j2se version="1.3"/>
<jar href="testWebStart.jar" main="true" download="eager" />
</resources>
<application-desc main-class="testMClient" />
</jnlp>
The web.xml file is;
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<welcome-file-list>
<welcome-file>
index.html
</welcome-file>
</welcome-file-list>
<!-- Used to do mime mapping but it is not needed
since we are now using the JNLP sdervlet ! -->
<servlet>
<servlet-name>JnlpDownloadServlet</servlet-name>
<servlet-class>com.sun.javaws.servlet.JnlpDownloadServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>JnlpDownloadServlet</servlet-name>
<url-pattern>*.jar</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>JnlpDownloadServlet</servlet-name>
<url-pattern>*.jnlp</url-pattern>
</servlet-mapping>
</web-app>
Any help would be greatly appreciated,
Thanks,
Brian
I have exactly the same problem running JBoss 3-Tomcat-4.0.1. After some investigation it seems that the problem is because of dependency on creating File objects using getRealPath()
The problem manifests itself on several places but for instance:
DownloadRequest Constructor:
if(_context != null && !_path.endsWith("/")) {
String s1 = context.getRealPath(path);
File file = new File(s1);
if(file != null && file.exists() && file.isDirectory())
_path += "/";
s1 is null so a nullpointer is thrown. Instead do something like:
if (_context != null && !_path.endsWith("/")) {
String s1 = context.getRealPath(path);
if (s1 != null) {
File file = new File(s1);
if (file.exists() && file.isDirectory())
_path += "/";
But it is harder to fix on other places such as
ResourceCatalog.scanDirectory(String path)
File file = new File(_servletContext.getRealPath(s));
This will faile since getRealPath returns null resulting in a nullpointer exception which will make it impossible to download versioned jars.
The documentation for ServletContext says that getRealPath will return null if the application is packaged in a war file but this is strange since it worked fine for me for running JBoss-2.4.0_Tomcat-3.2.3. Maybe this is new behaviour for the 2.3 servlet spec ( i assume WL 6.1 is also 2.3 compliant)?
Similar Messages
-
Java function with Dynamic config throws null pointer exception
hi Experts,
I am using dynamic config using java function in my message mapping.
The source message has a field called "fname".
The value of "fname" is the input to my java UDF.
The java UDF code is:
public String getDynamicFile(String fname, Container container) throws StreamTransformationException{
String str = fname + ".xml";
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey FileName = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","FileName");
conf.put(FileName, str);
return str;
When I test this message mapping I get the following exception:
Runtime Exception:[java.lang.NullPointerException: while trying to invoke the method com.sap.aii.mapping.api.DynamicConfiguration.put(com.sap.aii.mapping.api.DynamicConfigurationKey, java.lang.String) of an object loaded from local variable '<4>'] in class com.sap.xi.tf._<message mapping>_ method getDynamicFile[test, com.sap.aii.mappingtool.tf7.rt.Context@2e52cb31]
What am I doing wrong in this UDF?
Thanks
GopalHi,
Your UDF will run fine in an end to end execution,i.e, during runtime. However, if you want to test your message mapping test tab without the dynamic config UDF throwing an exception, encpasulate the code in a try catch block
public String getDynamicFile(String fname, Container container) throws StreamTransformationException{
String str = fname + ".xml";
try{
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey FileName = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","FileName");
conf.put(FileName, str);
}catch(Exception ex){}
return str;
The above code should run fine when you test in the message mapping test tab.
Regards -
Null Pointer Exception and Illegal Arguement when ran with Wireless Toolkit
The following code throws a null pointer exception after it tried to initialize the textBox. I am not sure if there is something I am not importing, or if it's just because I'm sick and my head is cloudy. :-}.
I am using Wireless Toolkit 2.2 and Java 5.0
Anyhelp would be appreicated. Thank You.
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class TacticalTestMain extends MIDlet implements CommandListener {
private Display display;
private Form formMain;
private TextBox tbHelp; //Text Box for help Command
private Command cmExit; //A button to exit midLet
private Command cmBack; //Go "back" to main form
private Command cmHelp; //Ask for help
public TacticalTestMain()
display = Display.getDisplay(this);
formMain = new Form("Tactical Survey Program");
cmExit = new Command("Exit", Command.SCREEN, 1);
cmBack = new Command("Back", Command.BACK, 1);
cmHelp = new Command("Help", Command.HELP, 1);
formMain.addCommand(cmExit);
formMain.addCommand(cmBack);
formMain.addCommand(cmHelp);
formMain.setCommandListener(this);
System.out.println("Before Create Text Box");
//Create the help textBox with a max of 25 charecters
tbHelp = new TextBox("HeLp", "You can press the back button", 25, 0);
tbHelp.addCommand(cmBack);
tbHelp.setCommandListener(this);
System.out.println("AfTER Create Text Box");
}//end constructor
public void startApp()
System.out.println("Inside StartApp()");
display.setCurrent(formMain);
}//end startApp()
public void pauseApp()
}//end pauseApp
public void destroyApp(boolean unconditional)
notifyDestroyed();
}//end destroyApp()
//Check to see if the exit button was selected
public void commandAction(Command c, Displayable d)
System.out.println("Inside commandAction()");
String sLabel = c.getLabel();
if(sLabel.equals("Exit"))
destroyApp(true);
Errors from the KToolbar:
Running with storage root DefaultColorPhone
Before Create Text Box
Unable to create MIDlet TacticalTestMain
java.lang.IllegalArgumentException
at javax.microedition.lcdui.TextField.setChars(+105)
at javax.microedition.lcdui.TextField.setString(+27)
at javax.microedition.lcdui.TextField.<init>(+134)
at javax.microedition.lcdui.TextBox.<init>(+74)
at TacticalTestMain.<init>(+134)
at java.lang.Class.runCustomCode(+0)
at com.sun.midp.midlet.MIDletState.createMIDlet(+19)
at com.sun.midp.midlet.Selector.run(+22)
Execution completed.
743701 bytecodes executed
23 thread switches
741 classes in the system (including system classes)
4071 dynamic objects allocated (120440 bytes)
2 garbage collections (91412 bytes collected)Hi zoya,
Here is the problem:
tbHelp = new TextBox("HeLp", "You can press the back button", 25, 0);
This line declares a maximum textbox size of 25 but in reality he is declaring a textbox of size 29.
Thats why it is throwing the illegal argument.
happy coding :) -
Null pointer Exception with Float.parseFloat
I need to assign a float value from a database to a variable recurrently throughout a while loop. but i am getting a null pointer exception error:
while ( rs.next() )
out.println("<TR>");
float corr = Float.parseFloat((String) request.getParameter("echo"));
out.println("<center><TD><b><font color = #990000>" + rs.getString("race_number") + "</b></TD>");
out.println("<center><TD><b><font color = #990000>" + rs.getString("sail_number") + "</b></TD>");
out.println("<center><TD><b><font color = #990000>" + rs.getString("finish_time_elapsed") + "</b></TD>");
out.println("<center><TD><b><font color = #990000>" + rs.getString("echo") + "</b></TD>");
out.println("</TR>");
I've also tried:
float corr = Float.parseFloat( String request.getParameter("echo"));
float corr = 0;
corr Float.parseFloat((String) request.getParameter("echo"));
corr = echo;
corr = request.getParameter("echo");
corr = rs.getString("echo");
corr = Float.parseFloat(request.getParameter("echo"));
temp = rs.getFloat("Problem_Description");
Any ideas Please!!!Null pointer exception means that the value you are trying to turn into a Float is null. Probably request.getParameter("echo") returns null.
Is "echo" a request parameter, or a field you want to get from the database?
request.getParameter() has nothing to do with a database query.
That is your http request coming from the form submission. It won't change.
If "echo" is meant to be a request parameter, then make sure the parameter is actually present.
If its a database field (stored as a number) then
float corr = rs.getFloat("echo");
should do the trick.
Can the value be null in the database?
Cheers,
evnafets -
Null pointer Exception with removeRowWithKey operation
Hii experts,,,
I am using JDevelepor 11.1.2.1.0 Version
I Am new in ADF ,
In My sample application i select row in iterator by findIterator() method
then get the specified row by getCurrentRow();
then i get the rowKey By row.getKey() method..
I put rowKey as parameter to removeRowWithKey operation
I have get null pointer Exception with removeRowWithKey operation
java.lang.NullPointerException
at oracle.jbo.server.ViewRowSetImpl.prepKeyForFind(ViewRowSetImpl.java:5352)
at oracle.jbo.server.ViewRowSetImpl.findByKey(ViewRowSetImpl.java:5394)
at oracle.jbo.server.ViewRowSetImpl.findByKey(ViewRowSetImpl.java:5296)
at oracle.jbo.server.ViewRowSetImpl.findByKey(ViewRowSetImpl.java:5290)
at oracle.jbo.server.ViewObjectImpl.findByKey(ViewObjectImpl.java:11536)
at oracle.adf.model.binding.DCIteratorBinding.removeRowWithKey(DCIteratorBinding.java:3748)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1598)
how can solve this???thanks Timo
through this URL i get possible deletion methods...
pls give more Information about the concept of removeRowWithKey, setCurrentRowWithKey, setCurrentRowWithKeyValue operation.... Just For Knowledge....
Edited by: NZL on Mar 2, 2012 9:37 AM
Edited by: NZL on Mar 2, 2012 9:42 AM -
Null pointer exception with Lists
Hi,
I have got a problem with java.util.List. It is giving Null pointer exception whenever I try to add after extracting from my XML file.I have written the code like this:
List year; //Global variable
List loaddatas; //Global variable
Element e1; //Global
loaddatas=root.getChild("Load").getChildren("LoadData");
int k=loaddatas.size();
for(int i=0;i<loaddatas.size();i++)
e1=(Element)loaddatas.get(i);
year.add(i,Integer.valueOf(e1.getChildText("Year"))); // I am getting exception here.....
root is root element in XML file.
I am able to display "Integer.valueOf(e1.getChildText("Year"))" correctly.
Anybody please tell me how to solve this.
Thanks,
Sai RamLooks like somebody forgot to learn to program before starting to write code....
List list = new ArrayList(); -
SAP Portal Display Documents is hanging with Null Pointer Exception
Hi I am having problems with an iview from the products section of SAP standard iviews
In my portal page I have the following three iviews, find documents, display master data and display documents both the find docs and display master data work great, but the display documents seems to hang and a java Null Pointer Exception shows in the data frame of IE. It hangs up the whole page and I have to keep hitting back button to close the window and open. I have the following in config for web front end
DOC_OBJ is mapped to DOKAR, DOKNR, DOKVR and DOKTL with default set.
DOC_REQ is set to DOKAR default checked
EQUI_REQ is set to EQUI-EQUNR default checked
This is under SIMG_SPORT -> products -> select data fields for web front end
Am I missing something?
Cheers,
DevlinThe following code is your problem:
//-------construct
public void MySlide()
contents = new Tile[ROWS][COLS];
reset();
}Constructors don't return anything including void. Therefore you really aren't calling the above method as you assume in your main method as it is not a constructor. Remove the void keyword and your initializing code will execute properly. -
Help with Null Pointer Exception
Hi, I am working on a simple menu program. It compiles and works correctly except for one item. I am having a problem with Greying out a menu item...... Specifically, When I press the EDIT / OPTIONS / READONLY is supposed to Greyout the Save and SaveAs options. But, when I do that it displays a Null Pointer Exception error message in the command window.
Your advice would be much appreciated!
Now for the code
/ FileName Menutest.java
// Sample Menu
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
public class MenuTest extends JFrame {
private Action saveAction;
private Action saveAsAction;
private JCheckBoxMenuItem readOnlyItem;
// set up GUI
public MenuTest()
super( "Menu Test" );
//* file menu and menu items
// set up File menu and its menu items
JMenu fileMenu = new JMenu( "File" );
// set up New menu item
JMenuItem newItem = fileMenu.add(new TestAction( "New" ));
// set up Open menu item
JMenuItem openItem = fileMenu.add(new TestAction( "Open" ));
// add seperator bar
fileMenu.addSeparator();
// set up Save menu item
JMenuItem saveItem = fileMenu.add(new TestAction( "Save" ));
// set up Save As menu item
JMenuItem saveAsItem = fileMenu.add(new TestAction( "Save As" ));
// add seperator bar
fileMenu.addSeparator();
// set up Exit menu item
JMenuItem exitItem = new JMenuItem( "Exit" );
exitItem.setMnemonic( 'x' );
fileMenu.add( exitItem );
exitItem.addActionListener(
new ActionListener() { // anonymous inner class
// terminate application when user clicks exitItem
public void actionPerformed( ActionEvent event )
System.exit( 0 );
} // end anonymous inner class
); // end call to addActionListener
//* Edit menu and menu items
// set up the Edit menu
JMenu editMenu = new JMenu( "Edit" );
//JMenuItem editMenu = new JMenu( "Edit" );
// set up Cut menu item
Action cutAction = new TestAction("Cut");
cutAction.putValue(Action.SMALL_ICON, new ImageIcon("cut.gif"));
// set up Copy menu item
Action copyAction = new TestAction("Copy");
copyAction.putValue(Action.SMALL_ICON, new ImageIcon("copy.gif") );
// set up Paste menu item
Action pasteAction = new TestAction("Paste");
pasteAction.putValue(Action.SMALL_ICON, new ImageIcon("paste.gif") );
editMenu.add(cutAction);
editMenu.add(copyAction);
editMenu.add(pasteAction);
// add seperator bar
editMenu.addSeparator();
// set up Options menu, and it submenus and items
JMenu optionsMenu = new JMenu("Options");
readOnlyItem = new JCheckBoxMenuItem("Read-only");
readOnlyItem.addActionListener(
new ActionListener()
{ // anonymous inner class
public void actionPerformed( ActionEvent event)
saveAction.setEnabled(!readOnlyItem.isSelected());
saveAsAction.setEnabled(!readOnlyItem.isSelected());
} // end anonymous inner class
); // end call to addActionListener
optionsMenu.add(readOnlyItem);
// add seperator bar
optionsMenu.addSeparator();
// Work on Radio Buttons
ButtonGroup textGroup = new ButtonGroup();
JRadioButtonMenuItem insertItem = new JRadioButtonMenuItem("Insert");
insertItem.setSelected(true);
JRadioButtonMenuItem overTypeItem = new JRadioButtonMenuItem("Overtype");
textGroup.add(insertItem);
textGroup.add(overTypeItem);
optionsMenu.add(insertItem);
optionsMenu.add(overTypeItem);
editMenu.add(optionsMenu);
//* Help menu and menu items
// set up the Help menu
JMenu helpMenu = new JMenu( "Help" );
helpMenu.setMnemonic( 'H' );
// set up index menu item
JMenuItem indexItem = helpMenu.add(new TestAction( "Index" ));
indexItem.setMnemonic( 'I' );
helpMenu.add( indexItem );
// set up About menu item
JMenuItem aboutItem = new JMenuItem( "About" );
aboutItem.setMnemonic( 'A' );
helpMenu.add( aboutItem );
aboutItem.addActionListener(
new ActionListener() { // anonymous inner class
// display message dialog when user selects Open
public void actionPerformed( ActionEvent event )
JOptionPane.showMessageDialog( MenuTest.this,
"This is MenuTest.java \nVersion 1.0 \nMarch 15, 2004",
"About", JOptionPane.PLAIN_MESSAGE );
} // end anonymous inner class
); // end call to addActionListener
// create menu bar and attach it to MenuTest window
JMenuBar bar = new JMenuBar();
setJMenuBar( bar );
bar.add( fileMenu );
bar.add( editMenu );
bar.add( helpMenu );
setSize( 500, 200 );
setVisible( true );
} // end constructor
public static void main( String args[] )
MenuTest application = new MenuTest();
application.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
// inner class to handle action events from menu items
private class ItemHandler implements ActionListener {
// process color and font selections
public void actionPerformed( ActionEvent event )
repaint();
} // end method actionPerformed
} // end class ItemHandler
// Prints to action name to System.out
class TestAction extends AbstractAction
public TestAction(String name) { super(name); }
public void actionPerformed( ActionEvent event )
System.out.println(getValue(Action.NAME) + " selected." );
} // end class TestAction
} // end class MenuTestalan, I've been trying to figure out a solution.
You can initialize it like this
private Action saveAction= new Action();
private Action saveAsAction=new Action();
THE ABOVE WILL NOT WORK.
because Action is an interface. An interface does not have constructors. However, interface references are used for polymorphic purposes.
Anyway, all you have to do is find some class that implemets Action interface.... I cant seem to find one. Or maybe this is not how its supposed to be done?
Hopefully, someone can shed some light on this issue.
FYI,
http://java.sun.com/products/jfc/swingdoc-api-1.1/javax/swing/Action.html -
OIM 11G, DSML integration failing with null pointer exception
Hi,
we are facing the similar probelm while sending a request from TIBCO BW to OIM 11G (Which is weblogic)
The below request from TIBCO is not working and thowing a NULL POINTER EXCEPTION
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header>
<ns:OIMUser xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns="http://xmlns.oracle.com/OIM/provisioning" xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/">
<ns:OIMUserId>xelsysadm</ns:OIMUserId>
<ns:OIMUserPassword>Welcome123</ns:OIMUserPassword>
</ns:OIMUser>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns0:processRequest xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://xmlns.oracle.com/OIM/provisioning">
<sOAPElement xmlns="">
<ns:modifyRequest xmlns:ns="urn:oasis:names:tc:SPML:2:0" xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" returnData="data">
<ns:psoID ID="Users:21"/>
<ns:modification name="Users.User ID" operation="add">
<ns:value>Richard1</ns:value>
</ns:modification>
</ns:modifyRequest>
</sOAPElement>
</ns0:processRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
But if we change the <sOAPElement xmlns=""> to <sOAPElement> (removing the empty namespace) we can able to fire this soap.
Could you please let me know are there any patch, workaround for this issue.
Thanks
MadhuI don't think OIM 11g supports DSML profile and may be that's the reason you are getting NPE.
See: http://docs.oracle.com/cd/E14571_01/doc.1111/e14309/spmlapi.htm#CHDCBJAI
It states:
"SPML has two profiles: the XSD profile and the DSML profile. This release of Oracle Identity Manager makes use of the XSD profile." -
Null Pointer Exception with Oracle Transformer
Hi all,
I'm getting a NullPointerException after building a DOM tree and feeding it to a stream via the Oracle JAXP transformer. I am trying to convert the data in DOMSource to PDF file. The following code:
TransformerFactory transFact = TransformerFactory.newInstance();
Transformer transForm = transFact.newTransformer();
ByteArrayOutputStream pdfOutStream = new ByteArrayOutputStream();
DOMSource pdfInput = new DOMSource(doc);
StreamResult pdfOutput = new StreamResult(pdfOutStream);
transForm.transform(pdfInput,pdfOutput);
int pdfByteSize = pdfOutStream.size();
System.out.println("Size of pdfByteSize : "+ pdfByteSize);
pdfByte = new byte[pdfByteSize];
pdfByte = pdfOutStream.toByteArray();
InputStream formInputStream = new ByteArrayInputStream(pdfByte);
Iam getting error at "transForm.transform(pdfInput,pdfOutput);".
Here the StackTrace :
07/05/24 10:59:40 XML-22900: (Fatal Error) An internal error condition occurred.
javax.xml.transform.TransformerException: XML-22900: (Fatal Error) An internal error condition occurred.
at oracle.xml.jaxp.JXTransformer.reportException(JXTransformer.java:775)
at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:374)
Caused by: java.lang.NullPointerException
at oracle.xml.parser.v2.XMLText.reportSAXEvents(XMLText.java:402)
at oracle.xml.parser.v2.XMLElement.reportChildSAXEvents(XMLElement.java:3072)
at oracle.xml.parser.v2.XMLElement.reportSAXEvents(XMLElement.java:3061)
at oracle.xml.parser.v2.XMLElement.reportChildSAXEvents(XMLElement.java:3072)
at oracle.xml.parser.v2.XMLElement.reportSAXEvents(XMLElement.java:3061)
at oracle.xml.parser.v2.XMLElement.reportChildSAXEvents(XMLElement.java:3072)
at oracle.xml.parser.v2.XMLElement.reportSAXEvents(XMLElement.java:2165)
at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:337)
Environment we are using is Sun JDK 1.4.2_06 on Windows, running JDeveloper 10 g with OC4j as Application Server.
Can any one please explain me in this regard?
Thanks
ManojThanks for the Reply.
Before Null Pointer Exception I am getting another Fatal error:
javax.xml.transform.TransformerException: XML-22900: (Fatal Error) An internal error condition occurred.
at oracle.xml.jaxp.JXTransformer.reportException(JXTransformer.java:775)
at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:374)
Please Help -
Null pointer Exception with Custom EventQueue
I created a simple class customEventQueue which is extended from EventQueue class and pushed it using
Toolkit.getDefaultToolkit().getSystemEventQueue().push(customEventQueue);
Now, whenever there are three modal dialogs on top of a frame and if I click on top dialog that closes all three dialog boxes, I get nullpointer exception in console. The custom event class does not have any method in it. It just extends from EventQueue.
I checked it in different JRE and it happens only in JRE1.3.1.
Has anybody tried the same thing with custom event queue? Any help is most welcome. Thanks...
java.lang.NullPointerException
at sun.awt.windows.WInputMethod.dispatchEvent(Unknown Source)
at sun.awt.im.InputContext.dispatchEvent(Unknown Source)
at sun.awt.im.InputMethodContext.dispatchEvent(Unknown Source)Hi Chandel me having the same problem
java.lang.NullPointerException
at sun.awt.windows.WInputMethod.dispatchEvent(Unknown Source)
at sun.awt.im.InputContext.dispatchEvent(Unknown Source)
at sun.awt.im.InputMethodContext.dispatchEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown
Source)
at
java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Sour
ce)
at
java.awt.DefaultKeyboardFocusManager.pumpApprovedKeyEvents(Unknown So
urce)
at
java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Sour
ce)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown
Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.SequencedEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(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)
Th bigger problem is that i don't know what is causing this exception, cause the stack trace doesn't mention the line of code where the exception occurred.
In earlier version of java we had pData null pointer exception. This bug manifests when the pull down menu doesn't fit completely into the frame's bounds and swing has to create a seaprate window for the pull-down.
The problem is that WInputMethod caches a reference to peer and that that reference becomes stale when peer is destroyed and recreated.
In this bug cached peer reference becomes stale as the Window for the menu is hidden (and its peer is destroyed) and shown again (with new peer this time).
WInputMethod have a cached reference to the old peer but that old peer is not connected to the underlying native window used to display the menu.
But it's been fixed. I want to know if our problem is in some way related to this pData bug.
Thanx. -
Null Pointer Exception when working with Custom Sql
I viewed the video on adding Custom Sql and everything seemed to work fine with regards to adding it to my report. However, I get a null pointer exception when I add a field from the Custom Sql table to the report and try to run the report including if I try to View Sql. There doesn't seem to be a stacktrace that I can show.
BTW... this was a work around for not being able to use Stored Procedures... I have killed 2 days now working on different ways to work around the Stored Procedure thing
Thanks,
SteveHi,
I'm trying to use a custom sql in my report. I could successfully create a custom SQL and add it to my report in the designer. But I'm getting NullPointer exception when I try to see the results in Preview. Can someone please help me resolve this issue.
Thanks! -
Help please I get Null Pointer Exception with my SQL query
The following statement gives me a null pointer exception when executed
from the doPost of my servlet.
rs=stmt.executeQuery(sqlQuery);
The error message reads:
java.lang.NullPointerException
at stockserv.Servlet1.doPost(Servlet1.java:142)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
===etc.
when I execute the same statement and query (same DB and table) from a standard java
program I do not get the error and get the propper result.
Any obvious thing I should check?
ThanksYes line 142 is as follows
rs=stmt.executeQuery(sqlQuery);
I also tried it with the folowing literal statement and get the same error.
rs=stmt.executeQuery("select * from table1 Where symbol= 'brt' ");
Does null pointer mean I am sending a null query or something else?
Again this same statment works from a regular java (non-server)program.
Thanks Again -
Crystal report (crystalReportsViewer) crash with null pointer exception
Hi,
My application are simple : m_crystalReportsViewer.ViewerCore.ReportSource = report; but in throw exception null pointer when I call showDialog.
I see in code, we have method ShowTabHeader.
private void ShowTabHeader(bool isShow)
Grid child = VisualTreeHelper.GetChild(this.tabViews, 0) as Grid;
TabPanel panel = child.FindName("HeaderPanel") as TabPanel;
if (!isShow)
panel.Visibility = Visibility.Collapsed;
else
panel.Visibility = Visibility.Visible;
My problem : child.FindName("HeaderPanel") as TabPanel return null
=> if (!isShow)
panel.Visibility = Visibility.Collapsed;
else
panel.Visibility = Visibility.Visible;
throws null pointer exception.
Do you have any idea about this?
Thanks.
Here is stack trace :
Unerwarteter Fehler im System ---> System.NullReferenceException: Object reference not set to an instance of an object.
at SAPBusinessObjects.WPF.Viewer.ReportAlbum.ShowTabHeader(Boolean isShow)
at SAPBusinessObjects.WPF.Viewer.ReportAlbum.ItemsChangedEventHandler(Object sender, ItemsChangedEventArgs e)
at System.Windows.Controls.Primitives.ItemsChangedEventHandler.Invoke(Object sender, ItemsChangedEventArgs e)
at System.Windows.Controls.ItemContainerGenerator.OnItemAdded(Object item, Int32 index)
at System.Windows.Controls.ItemContainerGenerator.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
at System.Windows.Controls.ItemContainerGenerator.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
at System.Windows.Controls.ItemCollection.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
at System.Windows.Data.ListCollectionView.ProcessCollectionChangedWithAdjustedIndex(NotifyCollectionChangedEventArgs args, Int32 adjustedOldIndex, Int32 adjustedNewIndex)
at System.Windows.Data.ListCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)
at System.Windows.Data.CollectionView.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
at System.Collections.ObjectModel.Collection`1.Add(T item)
at SAPBusinessObjects.WPF.Viewer.ReportAlbum.OnCreateNewDocumentViewComplete(CreateNewDocumentArgs args)
at SAPBusinessObjects.WPF.Viewer.DelegateMarshaler.<>c__DisplayClass6`1.<Invoke>b__4(Object )
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
--- End of inner exception stack trace ---
Edited by: duyhai707 on Jul 13, 2011 7:42 PM
Edited by: duyhai707 on Jul 13, 2011 8:09 PMA lot I don't understand in here... actually, I don't understand anything in your post:
When you call ShowDialog, what exactly are you trying to show? The code is the decompiled showtabheader method of the viewer. So, are you trying to override the viewer control and reportalbum? My guess is that the null reference is for the reportalbum's child object which is not the reportalbum object of the viewer. I don't understand why the code since its all handled internally to the viewer anyhow.
Perhaps searching the forum for code sample will help?
Also, see the [WPF Demo|http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/a09f7025-0629-2d10-d7ae-df006a51d1a8]
Other good WPF resources to consult:
http://www.redmondpie.com/incorporate-crystal-reports-in-a-c-wpf-application/
http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/a09f7025-0629-2d10-d7ae-df006a51d1a8
http://www.codeproject.com/Tips/74499/Crystal-Report-in-WPF.aspx
Re: Crystal Reports for Visual Studio 2010 - WPF Viewer for .Net 4.0
http://codegain.com/articles/crystalreports/howto/incorporate-crystal-reports-in-wpf-using-c-sharp.aspx
CRVS2010 Beta - WPF Viewer, how to hide the GroupTree control?
Re: CRVS2010 Beta - WPF Viewer, how to hide the GroupTree control?
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports] -
Null pointer exception while inserting a new row in ADF with jdev
Hi,
In ADF, I have retrieved some user information from LDAP server and I want to insert those values in to my table. But when I do this, I am getting a null pointer exception when I get the view object (ViewObject vo=getCRUIP002_1();). I am not sure why this happens.
Here is my code. It is urgent.
and please some one help me in fixing the issue.
ViewObject vo=getCRUIP002_1();
vo.clearCache();
vo.setMaxFetchSize(0);
vo.executeQuery();
Row newRow=vo.createRow();
vo.insertRow(newRow);
SearchResult res = (SearchResult)results.next();
Attributes attrs = res.getAttributes();
// Row newRow = vo.getCurrentRow();
newRow.setAttribute("LOGINNAME",(Object)attrs.get("sn").get().toString());
newRow.setAttribute("PASSWORDVALUE","x");
newRow.setAttribute("FIRSTNAME",(Object)attrs.get("sn").get().toString());
newRow.setAttribute("LASTNAME",(Object)attrs.get("sn").get().toString());
newRow.setAttribute("EMAIL",(Object)attrs.get("mail").get().toString());
Thanks,
Priya.Sassuming ur jdev version is 10.1.2
ViewObject vo=getCRUIP002_1();i dont think ur getting the view object hence null pointer expception.
ViewObject vo = findViewObject("MyView1");
if u r in the object class then first get the root application module and then access the View obejct from there.
In ADF if u assign a null value, u will always get the null pointer exception coz of java. Run the app in debug mode and check the values step by step, by the way there is not exception handling in ur code either, Do u know how to debug in Jdev ?
zaibi.
Maybe you are looking for
-
Using Time Capsule as External HD
How can I use my time capsule as an external HD? It works with time machine for backup but I can't drag and drop files onto it or make new folders...
-
My MacBook has charging problems
Last week, my MacBook (mid-2009 white Unibody) stopped charging for some reason and I didn't notice until it had pretty much ran out of charge completely. The wall adapter light didn't turn on, and the power indicator on screen didn't even say "Not C
-
Using translate function for one to many character translation
Hi friends! Can anybody tell me whether it is possible to use built in translate function for converting some text from a one alphabet to another one, if these alphabets are of different length. Something like SELECT TRANSLATE('текст', 'АБВГДЕЕЖЗИКЛМ
-
ORA-12545: Connect failed
Hi, I have configured Standby database for our 11.5.10.2 instance using Doc: 216212.1 Now, after completing all the steps, when I am trying to connect to apps schema from application tier it give me below error SQL*Plus: Release 8.0.6.0.0 - Productio
-
How to build back RAID 1 setting without formating the OS
Hello I was using Software base RAID 1 on window server 2012 std edition It was working fine but last day I found that my system is not booting the OS this due to power surge I am geting the error as Booting squence not found .When i change the RAID