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 PM
A 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]
Similar Messages
-
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." -
Crystal Reports 2008 crashes with blanked out areas when downloading data
We have a pc installed with Crystal Reports 2008 v1 SP2, which is used for report creation, but after a few minutes of downloading data from the server to populate the report, the report crashes with black areas instead of data in the report. Please can anyone offer possible solutions?
Pc: workstation
Os: Microsoft Windows XP Professional 32 bit
Processors: 1 Intel Core(TM) i5 CPU 650 @ 3.20 Ghz
Total Memory: 3264 Mb
Total Hard Drive: 298 Gb
Display 1680 x 1050 pixels 65536 colours]
Display Adapters: Microsoft 4.0.5733.0
driver date: 2-28-2007
Crystal Reports version: 12.1.0.883
Crystal Reports 2008 SP2
Oracle in OraHome111
file version: 11.1.0.6.0
driver_ODBC_Version: 03.51
connects to remote server on site with Oracle 11g database, via above ODBC driver.
Many thanks, any ideas would be appreciated!
DavidHi David,
I've seen this before, your Video driver is out dated and you need to update it. Typically the makers of the mother board or video card, which ever one you are using, will have updates for your specific OS. Appears you are using the default Window generic video driver which may not support what CR requires or you have an older usp10.dll. You will likely get a new one if you install Windows XP Service Pack 3.
Also, Crystal Reports version: 12.1.0.883 is SP 1 and not SP 2., second number is the Service Pack, 12.x.x.x.
Download SP 4 and see if that may help:
https://smpdl.sap-ag.de/~sapidp/012002523100009989492010E/cr2008_sp3_fullbuild.zip
https://smpdl.sap-ag.de/~sapidp/012002523100008782452011E/cr2008sp4.exe
Or incrementally:
https://smpdl.sap-ag.de/~sapidp/012002523100009038092009E/cr2008win_sp2.exe
https://smpdl.sap-ag.de/~sapidp/012002523100007123572010E/cr2008_sp3.exe
https://smpdl.sap-ag.de/~sapidp/012002523100008782452011E/cr2008sp4.exe
And you may need SP 3 or if you want to start off clean download the full build of SP 3 and then SP 4. Requires the keycode so make sure you have it, we can't give you a new one.
Don -
Speech recognition problem with null pointer exception
im trying to run the simple hello program that came with IBM speech for java
i've put the speech.jar file in the right folder and it compiles all fine but when i run it i get this error:
locale is en_US
java.lang.NullPointerException
at Hello.main(Hello.java:171)
but i dont know enough about java speech to figure out what is null and what shouldn't be null...
thx
nate
P.S.
here is the program code
import java.io.*;
import java.util.Locale;
import java.util.ResourceBundle;
import java.util.StringTokenizer;
import javax.speech.*;
import javax.speech.recognition.*;
import javax.speech.synthesis.*;
public class Hello {
static RuleGrammar ruleGrammar;
static DictationGrammar dictationGrammar;
static Recognizer recognizer;
static Synthesizer synthesizer;
static ResourceBundle resources;
static ResultListener ruleListener = new ResultAdapter() {
public void resultAccepted(ResultEvent e) {
try {
FinalRuleResult result = (FinalRuleResult) e.getSource();
String tags[] = result.getTags();
if (tags[0].equals("name")) {
String s = resources.getString("hello");
for (int i=1; i<tags.length; i++)
s += " " + tags;
speak(s);
} else if (tags[0].equals("begin")) {
speak(resources.getString("listening"));
ruleGrammar.setEnabled(false);
ruleGrammar.setEnabled("<stop>", true);
dictationGrammar.setEnabled(true);
recognizer.commitChanges();
} else if (tags[0].equals("stop")) {
dictationGrammar.setEnabled(false);
ruleGrammar.setEnabled(true);
recognizer.commitChanges();
} else if (tags[0].equals("bye")) {
speak(resources.getString("bye"));
if (synthesizer!=null)
synthesizer.waitEngineState(Synthesizer.QUEUE_EMPTY);
Thread.sleep(1000);
System.exit(0);
} catch (Exception ex) {
ex.printStackTrace();
int i = 0;
String eh[] = null;
public void resultRejected(ResultEvent e) {
if (eh==null) {
String s = resources.getString("eh");
StringTokenizer t = new StringTokenizer(s);
int n = t.countTokens();
eh = new String[n];
for (int i=0; i<n; i++)
eh = t.nextToken();
if (((Result)(e.getSource())).numTokens() > 2)
speak(eh[(i++)%eh.length]);
static ResultListener dictationListener = new ResultAdapter() {
int n = 0; // number of tokens seen so far
public void resultUpdated(ResultEvent e) {
Result result = (Result) e.getSource();
for (int i=n; i<result.numTokens(); i++)
System.out.println(result.getBestToken(i).getSpokenText());
n = result.numTokens();
public void resultAccepted(ResultEvent e) {
Result result = (Result) e.getSource();
String s = "";
for (int i=0; i<n; i++)
s += result.getBestToken(i).getSpokenText() + " ";
speak(s);
n = 0;
static RecognizerAudioListener audioListener =new RecognizerAudioAdapter(){
public void audioLevel(RecognizerAudioEvent e) {
System.out.println("volume " + e.getAudioLevel());
static EngineListener engineListener = new EngineAdapter() {
public void engineError(EngineErrorEvent e) {
System.out.println
("Engine error: " + e.getEngineError().getMessage());
static void speak(String s) {
if (synthesizer!=null) {
try {
synthesizer.speak(s, null);
} catch (Exception e) {
e.printStackTrace();
} else
System.out.println(s);
public static void main(String args[]) {
try {
if (args.length>0) Locale.setDefault(new Locale(args[0], ""));
if (args.length>1) Locale.setDefault(new Locale(args[0], args[1]));
System.out.println("locale is " + Locale.getDefault());
resources = ResourceBundle.getBundle("res");
recognizer = Central.createRecognizer(null);
recognizer.allocate();
recognizer.getAudioManager().addAudioListener(audioListener);
recognizer.addEngineListener(engineListener);
dictationGrammar = recognizer.getDictationGrammar(null);
dictationGrammar.addResultListener(dictationListener);
String grammarName = resources.getString("grammar");
Reader reader = new FileReader(grammarName);
ruleGrammar = recognizer.loadJSGF(reader);
ruleGrammar.addResultListener(ruleListener);
ruleGrammar.setEnabled(true);
recognizer.commitChanges();
recognizer.requestFocus();
recognizer.resume();
synthesizer = Central.createSynthesizer(null);
if (synthesizer!=null) {
synthesizer.allocate();
synthesizer.addEngineListener(engineListener);
speak(resources.getString("greeting"));
} catch (Exception e) {
e.printStackTrace();
System.exit(-1);yes, the problem seems to be with allocating the engine, but I don't know exactly why recognizer.allocate() returns null...I have already installed IBM ViaVoice and Speech for Java, and have set the supposedly correct paths...
-
BHOLD FIM Integration install failed with Null Pointer Exception
Hi,
I started BHOLD installation and completed Core and FIM Provisioning installs successfully. However, FIM Integration install keeps on failing while running FIMCustomization.exe with the following error:
Unhandled Exception: System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Object reference not set to an instance of an object. (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose
value is:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.ResourceManagement.ObjectModel.RmAttributeValue.ToString() in d:\_Bld\10\16\Sources\main\src\samples\BHOLD\2011 R2\FIM Integration\Microsoft.ResourceManagement.ObjectModel\RmAttributeValue.cs:line 146
at WorkFlowProviderForFIM2010.WorkFlowProvider.TransformFimToXml(RmResource aFIMobject, Boolean asDirty) in d:\_Bld\10\16\Sources\main\src\samples\BHOLD\2011 R2\FIM Integration\WorkFlowProviderForFIM2010\WorkFlowProvider.cs:line 957
at WorkFlowProviderForFIM2010.WorkFlowProvider.QueryObjects(String objectType, String attributeName, String dn, String[] attributes) in d:\_Bld\10\16\Sources\main\src\samples\BHOLD\2011 R2\FIM Integration\WorkFlowProviderForFIM2010\WorkFlowProvider.cs:line
890
at BHOLD.RoleExchangePoint.BHOLDRoleExchangePoint.QueryObjectsX(String objectType, String attributeName, String dn, String...).
I was able to generate the error when I run FIMCustomization.exe from command prompt. "C:\Program Files (x86)\BHOLD\FIM\FIM Customization\FimCustomization.exe" /apply "BHOLD-customization.xml" server MyComputer:5151
The account running the install is part of FIM Administrators.
What might be the issue?Hi Saurabh,
FimCustomization.exe keeps crashing for me as well. I figured out it is all about the accounts that you are using. I have wrote a blog post that shows the scenario that worked for me. Hope it will help you.
http://social.technet.microsoft.com/wiki/contents/articles/22621.fim-2010-installing-bhold-fim-integration.aspx -
Reflection problems with null pointer exception
I am having a problem with reflection. I keep getting a NullPointerException and can't figure out why.
It is happening when I call this:
ResponseObject result = (ResponseObject)method.invoke(classInstance, argArray);
I can't figure out what the problem is. I had this reflection working, and then I made some changes to how the argument array was created. In the end, the argarray is the same.
Any ideas?Also, the API for the method class says that a
NullPointerException is thrown if the object in the
first argument is null. I have tested for this, and
it is not null.does it? read again, because giving 'null' as the first argument is perfectly legal. how else would you reflectively invoke a static method, since you might not have an actual instance of the class to pass -
Java Callout in OSB failing with null pointer exception
Hi,
We have a requirement where we need to convert XML String to org.apache.xmlbeans.impl.values.XmlAnyTypeImpl type using java-callout, but value is not getting set when we are trying to do the same. Below is the code we are using in the java callout:
byte [] bArray = xml.getBytes();
InputStream is = new ByteArrayInputStream(bArray);
Reader reader = new InputStreamReader(is,"UTF-8");
InputSource iss = new InputSource(reader);
iss.setEncoding("utf-8");
xmlNode1 =
DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(iss);
XmlAnySimpleType xmlObj = XmlAnySimpleType.Factory.parse(n);
xmlAnyTypeImpl.set_newValue(xmlObj);
Node resNode = xmlAnyTypeImpl.getDomNode();
Can someonce please help for the same.
Regards,
SoumikFirst check whether the java class that is called is able to read the string message that is passed by the proxy service.
-
DTTestBed fails with Null Pointer Exception
Hi
I have installed Tim's DTTestBed on standalone OC4J version 10.1.3.2.0 using the JDK from Oracle JDeveloper10.1.3.3\jdk\bin.
Tim's installation calls for J2SE version 1.4.2.
I used the J2SE that Jdeveloper 10.1.3.3.
The Sample EMPLOYEES.xml in Tim's blog uploads fine, but after specifying the username/pw/host info and submitting, I get a 500 Internal server error in the browser and the following entry in the DTTestbed\application.log:-
08/01/16 10:58:25.763 DTTestBed: Servlet error
java.lang.NullPointerException
at DT3.jspService(_DT3.java:447)
at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.2.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:597)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:521)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.2.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:712)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.2.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:369)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.2.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:865)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.2.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:447)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.2.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:215)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.2.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.2.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.2.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
Any ideas?
Thanks
MikeQuick update - Here is the output from the command window from which the OC4J is running....
08/01/16 10:58:25 Starting DT ...
08/01/16 10:58:25 Instan DT ...
08/01/16 10:58:25 Loading DT ...
08/01/16 10:58:25 Connection being made ...
08/01/16 11:32:16 ==================== DT2 Start ====================
08/01/16 11:32:16 C:\oracle\OraOC4J\j2ee\home\applications\DTTestBed\DTTestBed\t
emp
08/01/16 11:32:16 inside loop
08/01/16 11:32:16 Template Name: EMPLOYEESDT
08/01/16 11:32:16
08/01/16 11:32:16 1
08/01/16 11:32:16 [oracle.apps.xdo.dataengine.TemplateParameter@1f37d13]
08/01/16 11:32:16 2
08/01/16 11:32:16 Template Name: EMPLOYEESDT
08/01/16 11:32:16 4
08/01/16 11:32:16 Completed
08/01/16 11:32:16 ==================== DT2 End ====================
08/01/16 11:32:43 ==================== DT3 Start ====================
08/01/16 11:32:43 http://40e1:8888/
08/01/16 11:32:43 URL: http://40e1:8888/DTTestBed/temp/
08/01/16 11:32:43 Template: EMPLOYEESDT
08/01/16 11:32:43 Data Template: oracle.apps.xdo.dataengine.TemplateParser@6e4e8
2
08/01/16 11:32:43 Conn String: 127.0.0.1:1521:ora1023
08/01/16 11:32:43 User: scott
08/01/16 11:32:43 Org:
08/01/16 11:32:43 Layout: on
08/01/16 11:32:43 Schema: on
08/01/16 11:32:43 <dataTemplate name="EMPLOYEES" defaultPackage="" description="
Employee Data">
<properties>
<property name="include_parameters" value="true"/>
<property name="include_null_Element" value="true"/>
<property name="xml_tag_case" value="upper"/>
<property name="db_fetch_size" value="500"/>
<property name="scalable_mode" value="off"/>
<property name="include_rowsettag" value="false"/>
<property name="debug_mode" value="off"/>
</properties>
<parameters>
<parameter name="pDeptNo" dataType="number" defaultValue=""/>
</parameters>
<lexicals/>
<dataQuery>
<sqlStatement name="Q1" dataSourceRef="">SELECT DEPTNO,DNAME,LOC
from dept
where deptno = nvl(:pDeptNo,deptno)
order by deptno</sqlStatement>
<sqlStatement name="Q2" dataSourceRef="">SELECT EMPNO,ENAME,JOB
,MGR,HIREDATE,SAL,nvl(COMM,0) COMM
from EMP
WHERE DEPTNO = :DEPTNO</sqlStatement>
</dataQuery>
<dataStructure>
<group name="G_DEPT" source="Q1" groupFilter="">
<element name="DEPT_NUM" value="DEPTNO" function=""/>
<element name="DEPT_NAME" value="DNAME" function=""/>
<element name="LOCATION" value="LOC" function=""/>
<group name="G_EMP" source="Q2" groupFilter="">
<element name="EMPNO" value="EMP_NUM" function="
"/>
<element name="EMP_NAME" value="ENAME" function=
""/>
<element name="JOB_TITLE" value="JOB" function="
"/>
<element name="MANAGER" value="MGR" function=""/
>
<element name="HIRE_DATE" value="HIREDATE" funct
ion=""/>
<element name="SALARY" value="SAL" function=""/>
<element name="COMMISSION" value="COMM" function
=""/>
</group>
</group>
</dataStructure>
</dataTemplate>
08/01/16 11:32:43 Starting DT ...
08/01/16 11:32:43 Instan DT ...
08/01/16 11:32:43 Loading DT ...
08/01/16 11:32:43 Connection being made ...
Hope this helps.
Thanks
Mike -
JRC (upg. to CR4E) - Report w Subreport - Oracle DB - Null Pointer Excepti
Hi
We have a Crystal Designer/Developer Version 11.5.10.1263. We develop reports using this.
Most of the reports have SQL Command mode design with JNDI/JDBC connection. It gets deployed with our Web application. And during runtime, when users access these reports from our web application, we typically use Java Reporting Component with Crystal Report Viewer SDK to open and display the report to the user.
Besides other issues, current problem I am having is:
I have a sub-report in my report. I am connecting to Oracle database. If this sub-report does not return any rows, I was getting a Null Pointer Exception. This seems to be a known bug. This happened to us when we had just the above mentioned components.
We recently upgraded just the JAR libraries to the ones packaged in CR4E (Crystal Reports For Eclipse) - initially to get more exporting capability.This upgrade gets us past the Null Pointer Exception issue.
Now, I am getting an error like "Unexpected database connector error". Please see the exception stack trace below if needed. Since we are a product and this display is specific to one out of about 100 different clients; with all the time we spent on making this report stuff work against this oracle DB client, we had finally ended up creating the display in JSP into our general product just for one of about 100 clients. Client must be the Lucky one...As a developer, I felt really frustrated.
One note:- SQL Server DB works perfect.
Other thing - Do we need to change any API calls after upgrading the JARS from standard JRC/Viewer to CR4E package?
11:46:57,540 INFO [STDOUT] 11:46:57,540 ERROR [JRCCommunicationAdapter] detected an exception: Unexpected database connector error
at com.crystaldecisions.reports.datafoundation.DFQuery.for(SourceFile:632)
at com.crystaldecisions.reports.datalayer.a.do(SourceFile:1621)
at com.crystaldecisions.reports.datalayer.a.a(SourceFile:1404)
at com.crystaldecisions.reports.dataengine.m.b(SourceFile:334)
at com.crystaldecisions.reports.dataengine.j.b(SourceFile:515)
at com.crystaldecisions.reports.dataengine.m.o(SourceFile:408)
at com.crystaldecisions.reports.dataengine.m.a(SourceFile:173)
at com.crystaldecisions.reports.dataengine.ContextNode.a(SourceFile:114)
at com.crystaldecisions.reports.dataengine.ContextNode.a(SourceFile:95)
at com.crystaldecisions.reports.dataengine.j.case(SourceFile:1080)
at com.crystaldecisions.reports.dataengine.h.<init>(SourceFile:108)
at com.crystaldecisions.reports.dataengine.DataContext.a(SourceFile:254)
at com.crystaldecisions.reports.dataengine.DataProcessor2.a(SourceFile:4660)
at com.crystaldecisions.reports.dataengine.DataProcessor2.a(SourceFile:4574)
at com.crystaldecisions.reports.dataengine.DataProcessor2.new(SourceFile:2652)
at com.crystaldecisions.reports.dataengine.DataProcessor2.byte(SourceFile:2610)
at com.crystaldecisions.reports.dataengine.DataProcessor2.try(SourceFile:2282)
at com.crystaldecisions.reports.dataengine.DataProcessor2.int(SourceFile:2442)
at com.crystaldecisions.reports.dataengine.DataProcessor2.I(SourceFile:1013)
at com.crystaldecisions.reports.dataengine.DataProcessor2.if(SourceFile:4816)
at com.crystaldecisions.reports.dataengine.DataProcessor2.a(SourceFile:2020)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.a(SourceFile:309)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.a(SourceFile:250)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.u.a(SourceFile:922)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.u.e(SourceFile:784)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.u.for(SourceFile:242)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.aa.a(SourceFile:64)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.a(SourceFile:243)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.a(SourceFile:210)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.v.a(SourceFile:185)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.v.a(SourceFile:230)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ai.for(SourceFile:359)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ai.for(SourceFile:133)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ColumnFormatter.for(SourceFile:120)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.aa.a(SourceFile:64)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ai.a(SourceFile:511)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ai.a(SourceFile:452)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ai.a(SourceFile:369)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ah.a(SourceFile:72)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ReportColumnFormatter.a(SourceFile:86)
at com.crystaldecisions.reports.formatter.formatter.paginator.SinglePageFormatter.a(SourceFile:332)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ai.for(SourceFile:359)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ai.for(SourceFile:133)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ColumnFormatter.for(SourceFile:120)
at com.crystaldecisions.reports.formatter.formatter.paginator.SinglePageFormatter.for(SourceFile:177)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.aa.a(SourceFile:64)
at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.do(SourceFile:737)
at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.formatPage(SourceFile:236)
at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.byte(SourceFile:219)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1909)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:661)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:167)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:529)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:527)
at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(SourceFile:102)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(SourceFile:525)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(SourceFile:424)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(SourceFile:352)
at com.businessobjects.sdk.erom.jrc.a.a(SourceFile:54)
at com.businessobjects.sdk.erom.jrc.a.execute(SourceFile:67)
at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(SourceFile:716)
at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(SourceFile:125)
at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:537)
at com.crystaldecisions.sdk.occa.report.application.ds.a(SourceFile:186)
at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(SourceFile:1558)
at com.crystaldecisions.sdk.occa.report.application.ReportSource.getPage(SourceFile:767)
at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource.getPage(SourceFile:324)
at com.crystaldecisions.reports.reportengineinterface.JPEReportSource.getPage(SourceFile:149)
at com.businessobjects.report.web.event.s.a(SourceFile:158)
at com.businessobjects.report.web.event.s.a(SourceFile:127)
at com.businessobjects.report.web.event.bt.a(SourceFile:47)
at com.businessobjects.report.web.event.bw.broadcast(SourceFile:93)
at com.businessobjects.report.web.event.am.a(SourceFile:53)
at com.businessobjects.report.web.a.t.if(SourceFile:2104)
at com.businessobjects.report.web.e.a(SourceFile:300)
at com.businessobjects.report.web.e.a(SourceFile:202)
at com.businessobjects.report.web.e.a(SourceFile:135)
at com.crystaldecisions.report.web.ServerControl.a(SourceFile:607)
at com.crystaldecisions.report.web.ServerControl.processHttpRequest(SourceFile:342)
at org.apache.jsp.ipalHistoryReportViewer_jsp._jspService(org.apache.jsp.ipalHistoryReportViewer_jsp:201)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.Standar
11:46:57,540 INFO [STDOUT] dEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
11:46:57,634 INFO [STDOUT] CustomReports - finally Calling CrystalReportViewer dispose ...I have exactly the same problem. Had posted it on the forum last week, but haven't received any response yet. I just file a single support case ($195) with SAP. If I hear anything useful back, will keep you posted. Please let me know if you are able to resolve the problem.
In my case, I can get my report to work with a single subreport. When I put multiple subreports, I get the same error as you are currently getting.
Check if your report has any special section formatting (conditional suppression etc). Try to remove those to see if it helps at all. -
I am testing BOE 4.0 with a simple jsp based on the samples. The code is what I used to test BOE xi 3.1. But I ran into some report display inconsistencies with 3.1 so I am trying 4.0. The code below works in 3.1 But in 4.0, I get the report viewer screen coming up but get a null pointer exception coming to the screen.
2014-06-18 13:48:01
java.lang.NullPointerException
at com.crystaldecisions.sdk.occa.report.application.ControllerBase.checkViewReportRight(ControllerBase.java:114)
at com.crystaldecisions.sdk.occa.report.application.ReportSource.getPage(ReportSource.java:945)
at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource.getPage(AdvancedReportSource.java:343)
at com.businessobjects.report.web.event.PageListener.renderContentLocally(PageListener.java:394)
at com.businessobjects.report.web.event.PageListener.getPage(PageListener.java:181)
at com.businessobjects.report.web.event.PageListener.updatePage(PageListener.java:123)
at com.businessobjects.report.web.event.UpdatePageEvent.processListener(UpdatePageEvent.java:47)
at com.businessobjects.report.web.event.ViewerBroadcaster.broadcast(ViewerBroadcaster.java:109)
at com.businessobjects.report.web.event.EventQueue.processEvents(EventQueue.java:53)
at com.businessobjects.report.web.component.ViewerContainer.processEvents(ViewerContainer.java:1403)
at com.businessobjects.report.web.WorkflowController.doEventProcessing(WorkflowController.java:353)
at com.businessobjects.report.web.WorkflowController.doLifecycle(WorkflowController.java:255)
at com.businessobjects.report.web.WorkflowController.doAsyncLifecycle(WorkflowController.java:106)
at com.crystaldecisions.report.web.viewer.CrystalReportViewerUpdater._processHttpRequest(CrystalReportViewerUpdater.java:61)
at com.crystaldecisions.report.web.ServerControl.processHttpRequest(ServerControl.java:345)
at com.crystaldecisions.report.web.viewer.CrystalReportViewerServlet.doUpdate(CrystalReportViewerServlet.java:156)
at com.crystaldecisions.report.web.viewer.CrystalReportViewerServlet.doPost(CrystalReportViewerServlet.java:144)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)
Here is the AlwaysRequiredSteps_UnmanagedRas.jsp
<%
String path = "rassdk://C:\\reports\\asn.rpt";
ReportAppSession ra = new ReportAppSession();
ra.createService("com.crystaldecisions.sdk.occa.report.application.ReportClientDocument");
ra.setReportAppServer("10.189.15.175:1566");
ra.initialize();
ReportClientDocument clientDoc = new ReportClientDocument();
clientDoc.setReportAppServer(ra.getReportAppServer());
clientDoc.open(path, OpenReportOptions._openAsReadOnly);
%>
Here is the OpenReport.jsp
<%@ page contentType="text/html; charset=utf-8" %>
<%@
page import="com.crystaldecisions.sdk.occa.report.application.*,
com.crystaldecisions.sdk.occa.report.data.*,
com.crystaldecisions.sdk.occa.report.lib.*,
com.crystaldecisions.report.web.viewer.*,
com.crystaldecisions.sdk.occa.report.definition.*"
%>
<html>
<head>
<title>Preview Report</title>
</head>
<body>
<%@ include file="AlwaysRequiredSteps_UnmanagedRAS.jsp"%>
<%
Tables oTablesCollection = clientDoc.getDatabaseController().getDatabase().getTables();
for(int i = 0; i < oTablesCollection.size(); i++) {
// We'll get two copies of the original table, change one, and use set table.
ITable originalTable = oTablesCollection.getTable(i);
ITable changedTable = oTablesCollection.getTable(i);
IConnectionInfo newConnectionInfo = new ConnectionInfo();
PropertyBag attributes = new PropertyBag();
attributes.putBooleanValue(PropertyBagHelper.CONNINFO_SSO_ENABLED, false);
attributes.putStringValue(PropertyBagHelper.CONNINFO_CRQE_DATABASETYPE, "JDBC (JNDI)");
attributes.putStringValue(PropertyBagHelper.CONNINFO_DATABASE_DLL, "crdb_jdbc.dll");
attributes.putStringValue(PropertyBagHelper.CONNINFO_CRQE_DATABASENAME, "");
attributes.putBooleanValue(PropertyBagHelper.CONNINFO_CRQE_SQLDB, true);
PropertyBag logonProperties = new PropertyBag();
logonProperties.putStringValue("JDBC Connection String", "!oracle.jdbc.driver.OracleDriver!jdbc:oracle:thin:{userid}/{password}@10.189.12.248:1521:gbg");
logonProperties.putBooleanValue("Trusted_Connection", false);
logonProperties.putBooleanValue("Use JDBC", true);
logonProperties.putStringValue("Database Class Name", "oracle.jdbc.driver.OracleDriver");
logonProperties.putStringValue("Connection URL", "jdbc:oracle:thin:@10.189.12.248:1521:gbg");
logonProperties.putStringValue("Server", "10.189.12.248");
attributes.put(PropertyBagHelper.CONNINFO_CRQE_LOGONPROPERTIES, logonProperties);
attributes.putStringValue("QE_ServerDescription", "10.189.12.248");
newConnectionInfo.setKind(ConnectionInfoKind.CRQE);
newConnectionInfo.setUserName("dsdone");
newConnectionInfo.setPassword("dbuser");
newConnectionInfo.setAttributes(attributes);
changedTable.setQualifiedName("DSDONE" + "." + changedTable.getName());
changedTable.setConnectionInfo(newConnectionInfo);
// Commit the changes by calling the setTableLocation method from
// the Database controller with the new table
clientDoc.getDatabaseController().setTableLocation(originalTable, changedTable);
// Create a Viewer object
CrystalReportViewer viewer = new CrystalReportViewer();
// Set the name for the viewer
viewer.setName("Crystal_Report_Viewer");
// Set the report source for the viewer to the ReportClientDocument's report source
viewer.setReportSource(clientDoc.getReportSource());
// Process the http request to view the report
viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), out);
// Dispose of the viewer object
viewer.dispose();
// Release the memory used by the report
clientDoc.close();
%>
</body>
</html>Hi Jason,
Call any one of the methods
viewer.dispose(); or clientDoc.close();
Do not use both in BI 4.x version.
Test the same and let me know if it works.
Thanks,
Prithvi -
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! -
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 :) -
<p>The following command gets a null pointer error showing up in Tomcat log:</p><p>../../viewers/cdz_adv/viewDocument.jsp?sEntry=<%=strEntry%>&lang=en&iDocID=830&ViewType=I&kind=Webi</p><p>where sEntry is a valid report token </p><p>but works fine if the ViewType is H or id=830 is used instead of sEntry. When the above command is issued the drill columns are displayed correctly but no report is shown and a null pointer exception is encountered.</p>
There is a Consulting Solution called BOInterface that Business Objects Global Services sells and that may help you if you are implementing your own "InfoView".
A description is <a href="http://www.mnsoft.org/bointerface0.0.html">here</a>.
Particularly, see the <a href="http://www.mnsoft.org/pmiv.0.html">Poor Man's InfoView</a> web application.
Contact me via direct email for more information if this is interesting for you.
HTH,
M
Matthias Nott - Business Objects
Service Line Leader Products EMEA
[email protected]
Maybe you are looking for
-
My iPod cannot work with Windows Vista
I've updated iTunes to version 7.1.1. But my computer is hung up when I connected my iPod to it. I can do nothing except restart the computer and disconnect iPod from it. Can anyone tell me why? HP v7058hk Other OS OS is Widows Vista Home Premium
-
Where can I get a new i/o-shield for my P965 Neo-F V2 motherboard?
I need an i/o-shield for MSI P965 Neo-F V2 motherboard. I live in Finland, I've asked from local stores but nobody sells them separately. Anybody knows where to acquire one? (it can be from another motherboard too, if it's exactly like the one that
-
IMac Freezes Periodically During Screen Saver Only
I own a late-2006 Intel-based iMac. Over the last few months, I've noticed that the iMac freezes when the screen saver is running. This doesn't happen all the time, and it doesn't matter what screen saver I use. (None of the screen savers is a third-
-
ISE - Authorization Profile issue
I'm running a trial of ISE and I'm attempting to create the authorization profile with the following settings: Name: Posture_Remediation Access Type: Access_Accept Common Tools: Posture Discovery, Enabled Posture Discovery, ACL ACL-POSTURE-REDIRECT T
-
I have windows 8,I get advertisements like crazy, how do I stop it?
I have adds that just come out of nowhere one right after another while I am trying to view a web page. How can I stop it? I don't have this issue with Windows 7, thanks for your time