This is regarding "throw exceptions" in Java
Hi, I have Queue class and a Test drive for the Queue class called QueueDriver. After I run the program I see a number which I have set in the QueueDrive shown up in the terminal window. How can I throw an exception here along with a message? what kind of exception would it be? IOException......OR FileNotFound exception.....OR is there a generic type of exception?
Thanks.
Queue class;
public class Queue
private Object []items;
private int max_items;
private int next_free;
private int next_full;
public Queue(int _max_items)
max_items = _max_items;
items = new Object[max_items];
next_free = next_full = 0;
public void enqueue(Object it)
items[next_free] = it;
next_free = (next_free + 1) % max_items;
// throw exception....
public Object dequeue()
Object rtn = items[next_full];
next_full = (next_full + 1) % max_items;
return rtn;
// throw exception....
QueueDriver;
import Queue;
public class QueueDriver
public static void main(String[] args)throws Exception;
Queue int_queue = new Queue(50);
try
int_queue.enqueue(new Integer(12));
int_queue.enqueue(new Integer(5));
System.out.println((Integer) int_queue.dequeue());
catch(QueueException e)
System.out.println("Caught QueueException: " + e.getMessage());
}
Similar Messages
-
Throw exception in Java mapping and handle this in BPM
Hi,
I'll use a Java mapping in a BPM transform step. Is it possible to throw an exception inside this Java mapping and handle this in a BPM exception handler?
thanks and regards
VerenaHi Verena,
In a BPM transformation step, I think you can throw exceptions only for system errors.
Let me explain with an example, one of the ways to handle your scenario:
Lets assume your Java Mapping fails then you can trap that exception in your Java mapping and compose an XML message which indicates that an error has occurred.
say for e.g.
<intermediateStructure>
<SatusDocument>
<StatusCode>ERROR</StatusCode>
<ErrCode>123</ErrCode>
<ErrDesc><!populate the thrown exception details></ErrDesc>
</StatusDocument>
<Payload>
<!contains actual XML message with data>
</Payload>
</intermediateStructure>
if Java mapping is Successful, you can compose the XML message as follows:
<intermediateStructure>
<SatusDocument>
<StatusCode>SUCCESS</StatusCode>
<ErrCode>0</ErrCode>
<ErrDesc></ErrDesc>
</StatusDocument>
<Payload>
<!contains actual XML message with data>
</Payload>
</intermediateStructure>
You can use BPM switch operation to switch to different processing branches say for e.g. "error" branch or "success" branch by examining the value of <StatusCode> tag.
Hope it helps !
Regards,
Sridhar -
Throwing Exception in java embedding to BPEL
Hi,
My requirement is that all exceptions needs to be thrown to BPEL so that the BPEL exception handler can handle it.I am using some classes through BPEL's java embedding. So any exception in them, i wud like to be propagated to BPEL. The Exception is thrown to the java embedding activity but i am not able to throw it to BPEL after that. I have to catch and handle it there itself, else the BPEL gives a compilation error.
Can anybody please gimme a sol for this problem
Thanks
AshishHi,
My requirement is that all exceptions needs to be thrown to BPEL so that the BPEL exception handler can handle it.I am using some classes through BPEL's java embedding. So any exception in them, i wud like to be propagated to BPEL. The Exception is thrown to the java embedding activity but i am not able to throw it to BPEL after that. I have to catch and handle it there itself, else the BPEL gives a compilation error.
Can anybody please gimme a sol for this problem
Thanks
Ashish -
Jmap throws exception on java 1.4.2_12
I've been trying out the backported jmap and heap dump functionality on java 1.4.2_12 but I've run into a problem. Whenever I run jmap I get output similar to this:
alpine: /> /usr/j2se/bin/jmap -histo 1369
Attaching to process ID 1369, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 1.4.2_12-b03
Iterating over heap. This may take a while...
Exception in thread "main" sun.jvm.hotspot.types.WrongTypeException: No suitable match for type of address 0x00168e80
at sun.jvm.hotspot.runtime.VirtualConstructor.instantiateWrapperFor(VirtualConstructor.java:62)
at sun.jvm.hotspot.memory.GenerationFactory.newObject(GenerationFactory.java:41)
at sun.jvm.hotspot.memory.GenCollectedHeap.getGen(GenCollectedHeap.java:63)
at sun.jvm.hotspot.oops.ObjectHeap.collectLiveRegions(ObjectHeap.java:483)
at sun.jvm.hotspot.oops.ObjectHeap.iterate(ObjectHeap.java:223)
at sun.jvm.hotspot.tools.ObjectHistogram.run(ObjectHistogram.java:25)
at sun.jvm.hotspot.tools.JMap.run(JMap.java:85)
at sun.jvm.hotspot.tools.Tool.start(Tool.java:204)
at sun.jvm.hotspot.tools.JMap.main(JMap.java:126)
Am I doing something subtly wrong?I could get a heap dump by chaging the GC parameters, but when I tried to analyse the dump using jhat (from jdk 6) I get an exception:
# jhat heap.bin
Reading from heap.bin...
Dump file created Mon Sep 04 12:22:19 CEST 2006
Snapshot read, resolving...
Resolving 2345723 objects...
Exception in thread "main" java.lang.ClassCastException: java.lang.Integer cannot be cast to com.sun.tools.hat.internal.model.JavaClass
at com.sun.tools.hat.internal.model.JavaObjectArray.resolve(JavaObjectArray.java:68)
at com.sun.tools.hat.internal.model.Snapshot.resolve(Snapshot.java:237)
at com.sun.tools.hat.Main.main(Main.java:152)
Isn't it supposed to work with a dump from a 1.4.2_12 jmap? -
Throwing exceptions from Java Stored Procs
Hi,
We'd like to be able to define our own exceptions from our Java Stored Procedures (i'm going to call them JSP's even thought that's not PC). I am aware that the manual says "When a Java stored procedure executes a SQL statement, any exception thrown is materialized to the procedure as a subclass of java.sql.SQLexception. That class has the methods getErrorCode() and getMessage(), which return the Oracle error code and message, respectively."
Does this mean that we can't really extend the SQLException class and define our own set of methods for handling exceptions in JSP's? Is there a work around for handling exceptions in JSP's? Since exception handling is such a powerful component of Java, I figure someone has addressed the limitations of the above paragraph.
Thanks,
Kristi
nullUnfortunately, right now GCC's standard C++ runtime library is NOT threadsafe. You can find documentation supporting this on the GCC website. Since you're running a multithreaded Java/JNI application, you'll certainly hit this shortcoming.
<p>
Supposedly, this will all be fixed in GCC 3.0.
<p>
In the meantime, if you're using SPARC, the only option you have is either using SC4.2 or Forte 6 Update 2 (this particular version is VERY important for several reasons). -
Hi All,
I am reading notepads files and inserting data in sql tables from the notepad-
while performing sql bulk copy on this line it throws exception - "bulkcopy.WriteToServer(dt); -"data type related(mentioned in subject )".
Please go through my logic and tell me what to change to avoid this error -
public void Main()
Dts.TaskResult = (int)ScriptResults.Success;
string[] filePaths = Directory.GetFiles(@"C:\Users\jainruc\Desktop\Sudhanshu\master_db\Archive\test\content_insert\");
for (int k = 0; k < filePaths.Length; k++)
string[] lines = System.IO.File.ReadAllLines(filePaths[k]);
//table name needs to extract after = sign
string[] pathArr = filePaths[0].Split('\\');
string tablename = pathArr[9].Split('.')[0];
DataTable dt = new DataTable(tablename);
|
string[] arrColumns = lines[1].Split(new char[] { '|' });
foreach (string col in arrColumns)
dt.Columns.Add(col);
for (int i = 2; i < lines.Length; i++)
string[] columnsvals = lines[i].Split(new char[] { '|' });
DataRow dr = dt.NewRow();
for (int j = 0; j < columnsvals.Length; j++)
//Console.Write(columnsvals[j]);
if (string.IsNullOrEmpty(columnsvals[j]))
dr[j] = DBNull.Value;
else
dr[j] = columnsvals[j];
dt.Rows.Add(dr);
SqlConnection conn = new SqlConnection();
conn.ConnectionString = "Data Source=UI3DATS009X;" + "Initial Catalog=BHI_CSP_DB;" + "User Id=sa;" + "Password=3pp$erv1ce$4";
conn.Open();
SqlBulkCopy bulkcopy = new SqlBulkCopy(conn);
bulkcopy.DestinationTableName = dt.TableName;
bulkcopy.WriteToServer(dt);
conn.Close();
Issue 1:-
I am reading notepad: getting all column and values in my data table now while inserting for date and time or integer field i need to do explicit conversion how to write for specific column before bulkcopy.WriteToServer(dt);
Issue 2:- Notepad does not contains all columns nor in specific sequence in that case i can add few column ehich i am doing now but the issue is now data table will add my columns + notepad columns and while inserting how to assign in perticular colums?
sudhanshu sharma Do good and cast it into river :)Hi,
I think you'll have to do an explicit column mapping if they are not in exact sequence in both source and destination.
Have a look at this link:
https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlbulkcopycolumnmapping(v=vs.110).aspx
Good Luck!
Kaur.
Please mark as answer if this resolves your issue. -
** Throw Exception in BPM - Webservice to JDBC
Hi friends,
I am doing Webservice to JDBC scenario using BPM. I am doing insert data in backend system oracle table by passing inputs from WebService. After insert data in table, JBDC returns the response to web service thru response variable 'insert_count = 1' like this. When I try to insert the same record, that is, employee no as primary key in my table, XI throws an error 'ORA-00001 - unique constraint' in Addtional . We have to pass this information to Web Service. How will we achive this ?
Presently in our BPM design,
1) Exception property of the block as 'Error'.
2) Inside Block, in Sync Send Step (BPM -> JDBC) specified 'Exception/System Error' as 'Error'.
3) Inserted one Exception Handler Brach. In this Brach, inserted one control step. In this step, itself we put a Control Step, the action property of this step is 'Throw Exception'. Here , what we need to set for the 'Exception Property' ..?
Kindly help me friends.Hi Mahesh,
I refered those scenarios. But, our requirment is we want to take 'Additional Text' option from SXMB_MONI and map to WS source structure one element.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Call Adapter --> <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1"><SAP:Category>XIServer</SAP:Category><SAP:Code area="INTERNAL">PL_TIMEOUT</SAP:Code><SAP:P1/><SAP:P2/><SAP:P3/><SAP:P4/><SAP:AdditionalText>TIME OUT REACHED</SAP:AdditionalText><SAP:ApplicationFaultMessage namespace=""/><SAP:Stack>Timeout condition of pipeline reached
</SAP:Stack><SAP:Retry>N</SAP:Retry></SAP:Error>
Could you kindly help me ? -
AMA Dialog throws Exception : java.lang.NoSuchMethodError
Hi,
I am trying to create my own Search Rules for the Application Migration Assistant v1.0, I am following the online tutorial. I am using JDev 10.1.2.0.0 ( Build 1811 ).
If I try to specify the New Search Rules File, the dialog throws this error :-
Exception occurred during event dispatching:
java.lang.NoSuchMethodError: oracle.xml.parser.schema.XSDBuilder.build(Ljava/io/
InputStream;Ljava/net/URL;)Ljava/lang/Object;
at oracle.mtg.sqllocator.addin.analyzer.RulesValidator._buildXMLSchema(U
nknown Source)
at oracle.mtg.sqllocator.addin.analyzer.RulesValidator.validateXML(Unkno
wn Source)
at oracle.mtg.sqllocator.addin.project.ui.EditSearchRulesFilePanel._comm
it(Unknown Source)
at oracle.mtg.sqllocator.addin.project.ui.EditSearchRulesFilePanel.acces
s$000(Unknown Source)
at oracle.mtg.sqllocator.addin.project.ui.EditSearchRulesFilePanel$1.vet
oableChange(Unknown Source)
at java.beans.VetoableChangeSupport.fireVetoableChange(VetoableChangeSup
port.java:300)
at java.beans.VetoableChangeSupport.fireVetoableChange(VetoableChangeSup
port.java:217)
at oracle.bali.ewt.dialog.JEWTDialog.fireVetoableChange(Unknown Source)
at oracle.bali.ewt.dialog.JEWTDialog.dismissDialog(Unknown Source)
at oracle.bali.ewt.dialog.JEWTDialog$UIListener.actionPerformed(Unknown
Source)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:17
86)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
ctButton.java:1839)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
istener.java:245)
at java.awt.Component.processMouseEvent(Component.java:5100)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:151)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:141)
at java.awt.Dialog$1.run(Dialog.java:540)
at java.awt.Dialog.show(Dialog.java:561)
at java.awt.Component.show(Component.java:1133)
at java.awt.Component.setVisible(Component.java:1088)
at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
at oracle.ide.dialogs.WizardLauncher.runDialog(WizardLauncher.java:55)
at oracle.mtg.sqllocator.addin.project.ui.EditSearchRulesFilePanel._modi
fySearchRulesFile(Unknown Source)
at oracle.mtg.sqllocator.addin.project.ui.EditSearchRulesFilePanel.creat
eCOMBean(Unknown Source)
at oracle.mtg.sqllocator.addin.project.ui.SearchRulesListPanel._newCOMBe
an(Unknown Source)
at oracle.mtg.sqllocator.addin.project.ui.SearchRulesListPanel$UIObserve
r.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:17
86)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
ctButton.java:1839)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
istener.java:245)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:2
31)
at java.awt.Component.processMouseEvent(Component.java:5100)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:151)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:141)
at java.awt.Dialog$1.run(Dialog.java:540)
at java.awt.Dialog.show(Dialog.java:561)
at java.awt.Component.show(Component.java:1133)
at java.awt.Component.setVisible(Component.java:1088)
at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
at oracle.ide.dialogs.WizardLauncher.runDialog(WizardLauncher.java:55)
at oracle.ide.panels.TDialogLauncher.showDialog(TDialogLauncher.java:276
at oracle.jdeveloper.model.JProjectSettingsPanel.showDialog(JProjectSett
ingsPanel.java:185)
at oracle.jdeveloper.model.JProjectSettingsPanel.showDialog(JProjectSett
ingsPanel.java:110)
at oracle.jdeveloper.model.JProjectSettingsPanel.showDialog(JProjectSett
ingsPanel.java:101)
at oracle.jdeveloper.model.JProjectStructureController.handleEvent(JProj
ectStructureController.java:342)
at oracle.ide.IdeAction.performAction(IdeAction.java:649)
at oracle.ide.IdeAction$1.run(IdeAction.java:857)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)I am not sure what other relevant information is necessary to debug this. I found the procedure really straightforward, but it's just this naggin error which is stopping me from completing my work.
Can you please help me with this ?
Regards,
SandeepHi Donal,
Thanks for your response. I found an archived version of JDeveloper v 9.0.4.1.1 ( Build 1436 ). However, AMA refuses to show up in this versiontoo.
I even tried to add AMA as an "External Tool" , by trying to invoke the class oracle.mtg.sqllocator.addin.SQLLocatorExtension that is listed in jdev-ext.xml. I even tried with oracle.mtg.sqllocator.addin.sqlnav.SqlNavigatorAddin, but it still doesn't work.
If I try to call one of the two classes directly, I get this error :-
java.io.IOException: CreateProcess: D:\JDev9.0.4\jdev\lib\ext\ama.jar!\oracle\mtg\sqllocator\addin\SQLLocatorExtension.class error=3
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Win32Process.java:66)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:566)
at oracle.ide.runner.Starter.start(Starter.java:195)
at oracle.ide.runner.RunProcess.startTarget(RunProcess.java:524)
at oracle.ide.runner.RunProcess.start(RunProcess.java:477)
at oracle.ide.runner.SimpleProcess.exec(SimpleProcess.java:203)
at oracle.jdevimpl.toolmanager.Tool.invoke(Tool.java:355)
at oracle.jdevimpl.toolmanager.ToolManager.handleEvent(ToolManager.java:581)
at oracle.ide.IdeAction$1.run(IdeAction.java:634)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)We'll be soon engaged in a major effort to revamp a big Java Application & AMA will be of big help to us.
Regards,
Sandeep -
Java Does Not Throw Exception When Writing To Read-Only Files
I have noticed that when I try to write to a read-only file in a window environment, Java does not throw an IOExcpetion, it just dosn't write to the file.
I am writing an FTP server and here is the code:
public static long copyStream(InputStream in, OutputStream out)throws IOException
IOException exception = null;
long copied = 0;
try
byte buffer[] = new byte[1024];
int read;
while((read = in.read(buffer)) != -1)
out.write(buffer, 0, read);
copied += read;
catch(IOException e)
//ensures that the streams are closed.
exception = e;
try
in.close();//ensures output stream gets closed, even if there is an
//excption here.
catch(IOException e){exception = e;}
out.close();//try to close output.
if(exception != null)
//exception is not null, an exception has occured.
//rethrow exception.
throw exception;
return copied;//all ok, return bytes copied.
}Is this a bug in JAVA VM? Is so, how should I report it?I have noticed that when I try to write to a read-only file in a window environment,
Java does not throw an IOExcpetion, it just dosn't write to the file.C:\source\java\Markov>attrib readonly.out
A R C:\source\java\Markov\readonly.out
�C:\source\java\Markov>java b
java.io.FileNotFoundException: readonly.out (Access is denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at b.main(b.java:5)
import java.io.*;
public class b {
public static void main(String[] args) {
try {
OutputStream os = new FileOutputStream ( "readonly.out");
catch (Exception e) {
e.printStackTrace();
} -
Java embedding: throw exceptions
Hi all
How can I throw an exception from a Java Embedding activity?
I try this
throw e
but the compiler raise this error:
Exception java.lang.Exception must be caught, or it must be declared in the throws clause of this method.
There is no method signature (so no throws) in a Java Embedding snippet code, so how can I throw an exception to be caught by the process?Hi Clemens
Can you send me an example on how throw a BPELFault and populate a variable with the error message?
Now I´m just using
QName qName = new QName("http://mercurio.com","error");
throw new com.oracle.bpel.client.BPELFault(qName);
where "http://mercurio.com" is the qualified name and "error" is the part, but I´m confusing on where I put the error message.
There is no example on ..\orabpel\samples\tutorials or \orabpel\samples\demos...
Thanks for your help. -
How do i throw BPEL exception from java embedded activity
Hello everybody,
i want to use some embedded java code in my BPEL process (bpelx:exec). This code would sometimes throw exceptions. How can i deal with these exceptions to control my BPEL process? I would like, in a sense, to do some catching of java exceptions but at the BPEL level... for example, my java code would throw an exception, that my BPEL process would "catch" and react the way i want. Is it possible to do that?
Thanks for your help!Re: Embedded Java in BPEL and exception handling
-
This is regarding CBMA in single stack SAP PI 7.3.1. I have set up the alert mail using default java mail client.I do receive the alerts via mail. But my requirement is to direct all the alert mails to Business workplace inbox in ECC.
So I need to set up PI to redirect mails to ECC Business workplace user inbox (sbwp). From here rules are set up & routed per distribution list.
Please guide me how I can achieve this requirement.Hi,
yes, it is a little bit different. This is the issue.....
But I am not sure if your links will help:
1) /people/william.li/blog/2008/02/13/sap-pi-71-mapping-enhancements-series-using-graphical-variable
is about a different solution. I do not need to count the number of lines of the source message.
And the second variable is about concat line by line from unbound node to unbound node.
My issue is:
Souce:
Message line (0...unbound) ! ! ! ! ! ! ! !
. ResultLine (1..1)
Mapping:
=> ResultLine1
ResultLine2
ResultLine........ => into UDF to an element (1..1) in one mapping operation.
So that all "ResultLine"s are included.
The result is explained in the given link for Mail attachment with UDF.
So I am not sure how to use this thread for my issue.
In the comments of that blog Christoph Gerber writes that the new variable feature can only handle single values.
So it is not suitable for my purposes as I have a list of values here that needs to be moved into the target message field.
2) http://wiki.sdn.sap.com/wiki/display/Java/UsingEditJavaSectioninMessageMapping
shows where to find the button "Java section" which is not available here in 7.1
3) /people/sap.user72/blog/2005/10/01/xi-new-features-in-sp14
too is about the nice little button for Java Section that is no longer existing on PI 7.1 screen for mappings.
So my issue is: How to replace the Java section function with global variables in PI 7.1?
Best regards
Dirk -
How to throw exception in run() method of Runnable?
Hi, everyone:
I want to know how to throw exception in run() method of interface Runnable. Since there is no throwable exception declared in run() method of interface Runnable in Java API specification.
Thanks in advance,
GeorgeThanks, jfbriere.
I must add though that if your run() methodis
executed after a call to Thread.start(), then
it is not a good choice to throw anyRuntimeException
from the run() method.
The reason is that the thrown exception won't be
handled appropriately by a try-catch block.Why do you say that "the thrown exception won't be
handled appropriately by a try-catch block"? Can you
explain it in more detail?
regards,
George
Because the other thread runs concurrently with and independently of the parent thread, there's no way you can write a try/catch that will handle the new thread's exception: try {
myThread.start();
catch (TheExceptionYouWantToThrowFromRun exc) {
handle it
do the next thing This won't work because the parent thread just continues on after myThread.start(). Start() doesn't throw the exception--run() does. And our parent thread here has lost touch with the child thread--it just moves on to "do the next thing."
Now, you can do some exception handling with ThreadGroup and uncaughtException(), but make sure you understand why the above won't work, in case that was what you were planning to do. -
Custom XSLT Functions Throw Exception
Hi,
I have following requirement-
1. I have defined and configured some custom XSLT functions in Jdev and BPEL, which throw exception in case of an error.
2. Now I want to catch that exception in my BPEL process
3. In My BPEL process I have defined transformation step ( which is using those Custom XSLT functions) in a scope and added a catch branch to that
4. But even XSLT java function throw an exception , it is not being catch by catch branch.
Could you please help me regarding this and tell me any other way to catch an exception in BPEL process thrown by Custom XSLT function within transformation step?
Thanks.Hi,
Its the problem with the date. In the configuration file i used dateTime for java.util.Date, because of this i cant see "User Defined" option in Jdeveloper component pallete. I checked at XML data types i had seen dateTime for java.util.Date Class, but its not working.
Do anyone created a custom xslt function which has date as parameter or return type?, If so wht they had used as data type for xml and java.
Thanks,
RR -
Enterprise Portal - Create Task throws exception
Hi All,
I'm working on MDM 7.1, NW 7.01. Click on the 'Create Task' from Universal worklist page throws the following exception. Any thoughts what might be causing this.
500 Internal Server Error
SAP NetWeaver Application Server 7.00/Java AS 7.00
Failed to process request. Please contact your system administrator.
[Hide]
Error Summary
While processing the current request, an exception occured which could not be handled by the application or the framework.
If the information contained on this page doesn't help you to find and correct the cause of the problem, please contact your system administrator. To facilitate analysis of the problem, keep a copy of this error page. Hint: Most browsers allow to select all content, copy it and then paste it into an empty document (e.g. email or simple text file).
Root Cause
The initial exception that caused the request to fail, was:
java.lang.NullPointerException
at com.sap.ip.collaboration.core.impl.ume.manager.UMRepositoryManager.getResource(UMRepositoryManager.java:212)
at com.sapportals.wcm.repository.RMAdapter.getResource(RMAdapter.java:228)
at com.sapportals.wcm.repository.runtime.CmAdapter.findResource(CmAdapter.java:1349)
at com.sapportals.wcm.repository.runtime.CmAdapter.findManagerAndResource(CmAdapter.java:1322)
at com.sapportals.wcm.repository.runtime.CmAdapter.getResourceImpl(CmAdapter.java:979)
... 57 more
See full exception chain for details.
System Environment
Client
Web Dynpro Client Type HTML Client
User agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11
Version null
DOM version null
Client Type ns7
Client Type Profile nn7
ActiveX disabled
Cookies enabled
Frames enabled
Java Applets enabled
JavaScript enabled
Tables enabled
VB Script enabled
Server
Web Dynpro Runtime Vendor: SAP, build ID: 7.0103.20081111115141.0000 (release=NW701_03_REL, buildtime=2008-12-07:13:19:14[UTC], changelist=51958, host=pwdfm246), build date: Tue May 12 20:39:49 MDT 2009
J2EE Engine 7.01 PatchLevel 56102.
Java VM IBM J9 VM, version:2.3, vendor: IBM Corporation
Operating system Linux, version: 2.6.16.60-0.37_f594963d-xen, architecture: amd64
Session & Other
Session Locale en_US
Time of Failure Wed Jul 01 09:01:10 MDT 2009 (Java Time: 1246460470781)
Web Dynpro Code Generation Infos
sap.com/tceujwfuiwizardtask
SapDictionaryGenerationCore 7.0103.20071003090459.0000 (release=701_SP_REL, buildtime=2008-11-05:19:55:10[UTC], changelist=463950, host=PWDFM201.wdf.sap.corp)
SapDictionaryGenerationTemplates 7.0103.20071003090459.0000 (release=701_SP_REL, buildtime=2008-11-05:19:55:16[UTC], changelist=463950, host=PWDFM201.wdf.sap.corp)
SapGenerationFrameworkCore 7.0103.20071003090713.0000 (release=701_SP_REL, buildtime=2008-11-05:19:48:07[UTC], changelist=463957, host=PWDFM201.wdf.sap.corp)
SapIdeWebDynproCheckLayer 7.0103.20080730170941.0000 (release=701_SP_REL, buildtime=2008-11-05:20:00:15[UTC], changelist=494993, host=PWDFM201.wdf.sap.corp)
SapMetamodelCommon 7.0103.20071003091208.0000 (release=701_SP_REL, buildtime=2008-11-05:19:48:51[UTC], changelist=463971, host=PWDFM201.wdf.sap.corp)
SapMetamodelCore 7.0103.20071003091208.0000 (release=701_SP_REL, buildtime=2008-11-05:19:48:46[UTC], changelist=463971, host=PWDFM201.wdf.sap.corp)
SapMetamodelDictionary 7.0103.20071003090530.0000 (release=701_SP_REL, buildtime=2008-11-05:19:52:58[UTC], changelist=463951, host=PWDFM201.wdf.sap.corp)
SapMetamodelWebDynpro 7.0103.20080730170953.0000 (release=701_SP_REL, buildtime=2008-11-05:19:57:29[UTC], changelist=494995, host=PWDFM201.wdf.sap.corp)
SapWebDynproGenerationCTemplates 7.0103.20081105123737.0000 (release=701_SP_REL, buildtime=2008-11-05:20:06:40[UTC], changelist=507414, host=pwdfm201)
SapWebDynproGenerationCore 7.0103.20080730170941.0000 (release=701_SP_REL, buildtime=2008-11-05:20:00:20[UTC], changelist=494993, host=PWDFM201.wdf.sap.corp)
SapWebDynproGenerationTemplates 7.0103.20081105123737.0000 (release=701_SP_REL, buildtime=2008-11-05:20:06:40[UTC], changelist=507414, host=pwdfm201)
sap.com/tcwddispwda
No information available null
sap.com/tckmcbc.uwl.ui~wd_ui
SapDictionaryGenerationCore 7.0103.20071003090459.0000 (release=701_SP_REL, buildtime=2008-11-05:19:55:10[UTC], changelist=463950, host=PWDFM201.wdf.sap.corp)
SapDictionaryGenerationTemplates 7.0103.20071003090459.0000 (release=701_SP_REL, buildtime=2008-11-05:19:55:16[UTC], changelist=463950, host=PWDFM201.wdf.sap.corp)
SapGenerationFrameworkCore 7.0103.20071003090713.0000 (release=701_SP_REL, buildtime=2008-11-05:19:48:07[UTC], changelist=463957, host=PWDFM201.wdf.sap.corp)
SapIdeWebDynproCheckLayer 7.0103.20080730170941.0000 (release=701_SP_REL, buildtime=2008-11-05:20:00:15[UTC], changelist=494993, host=PWDFM201.wdf.sap.corp)
SapMetamodelCommon 7.0103.20071003091208.0000 (release=701_SP_REL, buildtime=2008-11-05:19:48:51[UTC], changelist=463971, host=PWDFM201.wdf.sap.corp)
SapMetamodelCore 7.0103.20071003091208.0000 (release=701_SP_REL, buildtime=2008-11-05:19:48:46[UTC], changelist=463971, host=PWDFM201.wdf.sap.corp)
SapMetamodelDictionary 7.0103.20071003090530.0000 (release=701_SP_REL, buildtime=2008-11-05:19:52:58[UTC], changelist=463951, host=PWDFM201.wdf.sap.corp)
SapMetamodelWebDynpro 7.0103.20080730170953.0000 (release=701_SP_REL, buildtime=2008-11-05:19:57:29[UTC], changelist=494995, host=PWDFM201.wdf.sap.corp)
SapWebDynproGenerationCTemplates 7.0103.20081105123737.0000 (release=701_SP_REL, buildtime=2008-11-05:20:06:40[UTC], changelist=507414, host=pwdfm201)
SapWebDynproGenerationCore 7.0103.20080730170941.0000 (release=701_SP_REL, buildtime=2008-11-05:20:00:20[UTC], changelist=494993, host=PWDFM201.wdf.sap.corp)
SapWebDynproGenerationTemplates 7.0103.20081105123737.0000 (release=701_SP_REL, buildtime=2008-11-05:20:06:40[UTC], changelist=507414, host=pwdfm201)
sap.com/tcwdcorecomp
No information available null
Detailed Error Information
Detailed Exception Chain
java.lang.NullPointerException
at com.sap.ip.collaboration.core.impl.ume.manager.UMRepositoryManager.getResource(UMRepositoryManager.java:212)
at com.sapportals.wcm.repository.RMAdapter.getResource(RMAdapter.java:228)
at com.sapportals.wcm.repository.runtime.CmAdapter.findResource(CmAdapter.java:1349)
at com.sapportals.wcm.repository.runtime.CmAdapter.findManagerAndResource(CmAdapter.java:1322)
at com.sapportals.wcm.repository.runtime.CmAdapter.getResourceImpl(CmAdapter.java:979)
at com.sapportals.wcm.repository.runtime.CmAdapter.getResource(CmAdapter.java:192)
at com.sap.ip.collaboration.core.impl.ume.so.SOUser.<init>(SOUser.java:86)
at com.sap.ip.collaboration.core.impl.ume.so.SOUserFactory.getSOUser(SOUserFactory.java:89)
at com.sap.ip.collaboration.core.impl.ume.so.SOPeopleFactory.getSOPeople(SOPeopleFactory.java:104)
at com.sap.ip.collaboration.coreui.api.people.util.State.identifyPeopleApplicationList(State.java:939)
at com.sap.netweaver.kmc.people.wdpicker.PeoplePickerView.initializePeopleSelection(PeoplePickerView.java:510)
at com.sap.netweaver.kmc.people.wdpicker.PeoplePickerView.wdDoInit(PeoplePickerView.java:145)
at com.sap.netweaver.kmc.people.wdpicker.wdp.InternalPeoplePickerView.wdDoInit(InternalPeoplePickerView.java:189)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doInit(DelegatingView.java:61)
at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
at com.sap.tc.webdynpro.progmodel.view.View.initController(View.java:445)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:709)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:579)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:155)
at com.sap.tc.webdynpro.progmodel.view.InterfaceView.initController(InterfaceView.java:43)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:709)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bind(ViewManager.java:555)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:724)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:579)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:155)
at com.sap.tc.webdynpro.progmodel.view.InterfaceView.initController(InterfaceView.java:43)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:709)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bind(ViewManager.java:555)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:724)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:579)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:155)
at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.doOpen(WebDynproWindow.java:295)
at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.show(ApplicationWindow.java:182)
at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.open(ApplicationWindow.java:177)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:364)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.initApplication(ApplicationSession.java:754)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:289)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
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(AccessController.java:219)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)
Appreciate all your help!
Regards,
VSingh
Edited by: VSingh on Jul 1, 2009 10:03 AMHi,
The error message tells you that something is referencing a NULL value in the code of the UMRepositoryManager class. This is generally a sign of poor error detection in the code and not checking for NULL's before trying to use them! If I were you I would try the following:
1. Check your User Management Engine (UME) configuration
2. Check the KM UM Repository Manager configuration
I would say that because the code is standard SAP code the problem is somewhere in the configuration of your system (i.e. the code is expecting something to be configured but it is not). I would also recommend checking SAP OSS notes for a possible solution.
Hope this gets you started towards finding the solution.
BRgds,
Simon
Maybe you are looking for
-
How do I transfer pictures, videos, and music from my Playbook to my desktop?
I have downloaded Blackberry to desktop. Now I can't tranfer photos...ect Please help!!!
-
Bridge not recognizing RAW files
How do get bridge in CS4 to recognize raw files from my Canon 5D Mk3?
-
Transfer Songs from Ipod to New Computer and New Itunes Installation
Hi, I want to transfer songs on my Ipod to a new installation of Itunes on a new computer. I get a message that my Ipod is synced to another library and that I can only be synced to one library and that my ipod will be erased and synced to the curren
-
3rd gen ipod click wheel.
My 3rd gen nano click wheel doesn't work. I have reset my ipod. I can't get the click wheel to respond to my touch. The center button works but it is REAL slow to respond. Any suggestions?
-
IWeb and graphics/Flash?
Ok, so i'm working on making a website for my company and i wanted to know if there was any way to put moving graphics on it. something like flash or along those lines. is there a program, or just easy steps to accomplish this?