Null pointer exception in Search page with ADF
Hi,
I have an entity and view object for table1. I created one more viewobject for the same entity object. And the viewobject has the following query with a bind variable.
select * from table1 where table1.value = :bindVar
I added this view object into my application module. I dragged and dropped the 'ExecutewithParams' option into my jsp page. I was trying to run this page to atleast get the search field. But I am getting following exception.
javax.faces.el.EvaluationException: java.lang.NullPointerException at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:190) at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:143) at com.sun.faces.util.Util.evaluateVBExpression(Util.java:974) at com.sun.faces.taglib.jsf_core.ConvertNumberTag.evaluateExpressions(ConvertNumberTag.java:256) at com.sun.faces.taglib.jsf_core.ConvertNumberTag.createConverter(ConvertNumberTag.java:219) at javax.faces.webapp.ConverterTag.doStartTag(ConverterTag.java:130) at com.sun.faces.taglib.jsf_core.ConvertNumberTag.doStartTag(ConvertNumberTag.java:205) at resources.jsp._CRSCF001._jspService(_CRSCF001.java:149) [resources/jsp/CRSCF001.jsp]
I tried the same search page with a new workspace. But it worked well.
I am not able to figure out what went wrong with the application.
Could anyone please help me with this issue?
Thanks,
Priya.S
Hi,
drag it as a parameter form and it should work as you expect it.
Frank
Similar Messages
-
Null Pointer Exception in "Documents" page after creating a Coll. room
Hi,
I am new to KMC. we are on EP7 SP5.
I have created a collaboration room template.. and created a ROOM (say CommunityRoom) via this Room template...
I have referred the following document:
<a href="http://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/Collaboration%20with%20SAP%20NetWeaver%20Learn%20How%20to%20Create%20New%20Collaboration%20Room%20Templates%20Exercise">How to create a collaboration room template</a>
(Probably as this document was on EP6.. i didn't have all the properties and their parameters ..exactly as said in this document)
I have added the following pages in the Room template:
[code] --> com.sap.netweaver.coll.RoomDiscussionsPage
--> com.sap.netweaver.coll.RoomDocumentsPage
--> RoomMaintenance
--> Test page (my custom page.. )[/code]
After i enter into the room..i am able to see the discussions, room maintenance & test page .. pages...but, I am getting the following error in the 'Documents' page:
[code] java.lang.NullPointerException
at com.sap.ip.collaboration.core.impl.properties.resolver.ConfigFWKPropertyResolver.wrapConfigurable(ConfigFWKPropertyResolver.java:313)
at com.sap.ip.collaboration.core.impl.properties.resolver.ConfigFWKPropertyResolver.wrapValue(ConfigFWKPropertyResolver.java:331)
at com.sap.ip.collaboration.core.impl.properties.resolver.ConfigFWKPropertyResolver.wrapConfigurable(ConfigFWKPropertyResolver.java:320)
at com.sap.ip.collaboration.core.impl.properties.resolver.ConfigFWKPropertyResolver.getWrappedConfigurable(ConfigFWKPropertyResolver.java:287)
at com.sap.ip.collaboration.core.impl.properties.resolver.ConfigFWKPropertyResolver.resolveProperty(ConfigFWKPropertyResolver.java:86)
at com.sap.ip.collaboration.core.impl.properties.PropertyRegistry.getPropertyFromConfigFWK(PropertyRegistry.java:115)
at com.sap.ip.collaboration.core.impl.properties.PropertyRegistry.getProperty(PropertyRegistry.java:89)
at com.sap.ip.collaboration.core.impl.properties.portal.PropertyRegistryService.getProperty(PropertyRegistryService.java:50)
at com.sap.netweaver.coll.coreui.api.registry.PropertyRegistryReader.getContextMenus(PropertyRegistryReader.java:83)
at com.sap.netweaver.coll.coreui.api.generic.GenericUIBOGroupCommand.getResourceCommands(GenericUIBOGroupCommand.java:125)
at com.sapportals.wcm.rendering.uicommand.UIGroupCommand.getResourceGroupCommands(UIGroupCommand.java:131)
at com.sapportals.wcm.rendering.uicommand.UIGroupCommand.getResourceCommands(UIGroupCommand.java:101)
at com.sapportals.wcm.rendering.uicommand.UIGroupCommand.getListWithReplaceCommands(UIGroupCommand.java:191)
at com.sapportals.wcm.rendering.uicommand.UIMenuFactory.getRenderMenu(UIMenuFactory.java:217)
at com.sapportals.wcm.rendering.readymades.UICommandComponent.buildContentWithFactory(UICommandComponent.java:156)
at com.sapportals.wcm.rendering.readymades.UICommandComponent.buildContent(UICommandComponent.java:140)
at com.sapportals.wcm.control.util.components.base.BaseCompositeComponent.buildComposition(BaseCompositeComponent.java:190)
at com.sapportals.htmlb.AbstractCompositeComponent.preRender(AbstractCompositeComponent.java:33)
at com.sapportals.htmlb.Container.preRender(Container.java:118)
at com.sapportals.htmlb.Container.preRender(Container.java:118)
at com.sapportals.htmlb.Container.preRender(Container.java:118)
at com.sapportals.htmlb.Container.preRender(Container.java:118)
at com.sapportals.htmlb.Container.preRender(Container.java:118)
at com.sapportals.htmlb.Container.preRender(Container.java:118)
at com.sapportals.htmlb.Container.preRender(Container.java:118)
at com.sapportals.htmlb.Container.preRender(Container.java:118)
at com.sapportals.htmlb.AbstractCompositeComponent.preRender(AbstractCompositeComponent.java:34)
at com.sapportals.htmlb.Container.preRender(Container.java:118)
at com.sapportals.htmlb.Container.preRender(Container.java:118)
at com.sapportals.htmlb.Container.preRender(Container.java:118)
at com.sapportals.htmlb.AbstractCompositeComponent.preRender(AbstractCompositeComponent.java:34)
at com.sapportals.htmlb.Container.preRender(Container.java:118)
at com.sapportals.htmlb.Container.preRender(Container.java:118)
at com.sapportals.htmlb.Container.preRender(Container.java:118)
at com.sapportals.htmlb.rendering.PageContext.render(PageContext.java:944)
at com.sapportals.htmlb.page.DynPage.doOutput(DynPage.java:237)
at com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:129)
at com.sapportals.htmlb.page.PageProcessorServlet.handleRequest(PageProcessorServlet.java:62)
at com.sapportals.htmlb.page.PageProcessorServlet.doGet(PageProcessorServlet.java:29)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sapportals.wcm.app.servlet.WcmHtmlbBaseServlet.service(WcmHtmlbBaseServlet.java:104)
at com.sapportals.wcm.portal.proxy.PCProxyServlet.service(PCProxyServlet.java:332)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sapportals.portal.prt.core.broker.ServletComponentItem$ServletWrapperComponent.doContent(ServletComponentItem.java:110)
at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:646)
at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522)
at java.security.AccessController.doPrivileged(Native Method)
at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:95)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:160)[/code]
I guess, i have made some mistake in the mappings section of the 'Documents' page. I have given the following mappings:
<b>com.sap.netweaver.coll.RoomDocumentsPage</b> PAGE:
[code] 1) <i>com.sap.netweaver.coll.RoomInformation</i> iView
--> com_sap_netweaver_coll_information_roomid = roomid
2) <i>com.sap.netweaver.coll.RoomDocuments</i> iView
--> roomId = roomid
i couldnot map the properties <b>path</b> and <b>startUri</b> = <i>'private_store_cmStore'</i> (as I didn't have the option <i>'private_store_cmStore'</i> in the dropdown on the right hand side)
3) <i>com.sap.netweaver.coll.RoomMemberList</i> iView
--> path = room_allusersgroup_rid
--> roomRid = room_rid
--> startUri = room_allusersgroup_rid[/code]
What could be the issue?
Please help me...
Regards,
SK.Hi Devendra,
Did you get a chance to see the OA Framework FileUploadBean section in Dev guide. When you create a messageFileUpload bean, you might not require to write custom logic. Please see the dev guide section for details
Regards
Sumit -
Null pointer exception in jsp ,data missing in chat application
Hi all....
I have a chat application in jsp using ajax.I have opened a d/b connection in a jsp which is called each time I sent a message.But sometimes I get null pointer exception in this page when msgs are sent so fast...also I miss some of the msgs I sent....I can't avoid that connection ther..When I commented all those d/b connection statements...everything is working fine..Please suggest me any solution...
Thanks in advance.Hi,
Am not getting exception now.In the jsp wer I ve written connection,am taking some values using request.getParameter("msg") . I had opened the connection statement before getting these parameter values.Think I ws getting null pointer exception due to this.Now I have opened connection after getting these parameter values...anyway am not getting the exception now...
Thanks. -
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. -
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 -
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. -
Null pointer exception when running OAF page
Hi
I am getting null pointer exception when i execute the code below.
OAApplicationModule am = oapagecontext.getRootApplicationModule();
OAApplicationModuleImpl childam = (OAApplicationModuleImpl)am.findApplicationModule("QuestAnswerAM");
oapagecontext.putDialogMessage(new OAException("PER", "XXOM_APPR_OVR_NULL_MSG"+am+childam, null, OAException.ERROR, null));
OAViewObjectImpl VO= (OAViewObjectImpl)childam.findViewObject("QuestDetailsVO") ;
OAViewRowImpl Dff1Row = (OAViewRowImpl)VO.getCurrentRow();
quest = Dff1Row.getAttribute("LastUpdateDate");
I later commented out the last 3 lines and used the code below to track the application module name.
OAApplicationModule am = oapagecontext.getRootApplicationModule();
OAApplicationModuleImpl childam = (OAApplicationModuleImpl)am.findApplicationModule("QuestAnswerAM");
oapagecontext.putDialogMessage(new OAException("PER", "XXOM_APPR_OVR_NULL_MSG"+am+childam, null, OAException.ERROR, null));
When i run the page i am getting this error:
Message not found. Application: PER, Message Name: XXOM_APPR_OVR_NULL_MSGoracle.apps.per.selfservice.appraisals.server.AppraisalsAMImpl@2982bfnull.
the above error indicates that the Root application module is AppraisalsAMImpl.
But the view i need that is QuestDetailsVO exists in a child AM that is QuestAnswerAM. However in the above diag message as you can see it returns child AM to be null.
When i click on About this page it clearly says that the QuestDetailsVO exists in QuestAnswerAM
Please help
Thanks
AshishHi
Thanks for the quick response.
I am fine with the error message:
Message not found. Application: PER, Message Name: XXOM_APPR_OVR_NULL_MSGoracle.apps.per.selfservice.appraisals.server.AppraisalsAMImpl@2982bfnull.
I am getting message not found becos I have registered only XXOM_APPR_OVR_NULL_MSG and am displaying '+am+childam' also in the exception which is not associated with the registered message.
See below.
oapagecontext.putDialogMessage(new OAException("PER", "XXOM_APPR_OVR_NULL_MSG"+am+childam, null, OAException.ERROR, null));
I am fine with that. My concern is in the error above for 'am' part i am getting the root appl module name. but for childam i am getting null
Message not found. Application: PER, Message Name: XXOM_APPR_OVR_NULL_MSGoracle.apps.per.selfservice.appraisals.server.AppraisalsAMImpl@2982bf*null*.
See the high lighted.
I will look into the current row returning -1 issue and get back to you./
Thanks
Ashish -
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 -
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 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(); -
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 -
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 with iterator
Hi,
I'm trying to use an iterator on a collection bound to a jsf page fragment through datacontrol (data is retrieved from a web service).
Everything works fine except when this collection is null; I'm then getting a null pointer exception.
Is there an equivalent of <af:table emptytext="">? Or maybe, is there somewhere where I can configure my datacontrol to always return an empty collection instead of null?
Thanks.
Edit: my mistake; I made an error in the binding, which was pointing to another iterator already used.
Edited by: 965573 on 16 oct. 2012 02:17Hi,
You can try not to render the table when the length of the Collection is zero. This can be done by a JSTL function "length" available at:
http://java.sun.com/jsp/jstl/functions
Ex:#{fn:length(bindings.Collection)>0}"
Thanks,
Maybe you are looking for
-
Hi Gurus, I am facing issue on comp off validity. Validity is 15 days only and rule is if employee worked on sunday/public holiday then he will get comp off issues. 1st week is ok, next week comp off is validity is same as 1st week, some times 3rd we
-
Browser Alignment incompibilities
I am trying to center a form on my page using css, text-align:center. This works fine in internet explorer. In firefox, however, the form stays left. Here are two pictures: Internet Explorer: Firefox: =================================================
-
How can i use my helloworld servlet in apache-tomcat-mod_jk?
hi i copied helloworld.java helloworld.class to jakarta-tomcat-3.3.1/webapps/examples/WEB-INF/classes i can use example servlets in that directory by accessing localhost/examples/servlets and click links..(but if i type them in browser address bar, t
-
Hi, I`m having some problems with my Nokia n81. I can`t capture a VGA video/640x480px/, is it a firmware issue or just a setting? My phone is set to Video Quality-High, but it still captures a clip with resolution 320x240px. In the following specific
-
Has anyone experienced a flicker issue on the lock screen?
I recently bought a 32GB iPhone 4 on 4.3.3 installed and there's a flicker on the bottom lock screen. Right before it goes to the lockscreen there is a slight flicker. Has anyone experienced this. Or can anyone look to see if they have this problem.