Offset in classes
hello all,
I am displaying the output by using the class CL_ABAP_LIST_UTILITIES.
The first row fieds is displaying in the correct order. but when comes to second row they are displaying in the correct allignment w r to first row. and the third row is also is displaying in the right allignment w r to first row.
I am using the methods
MEMORY_TO_DISPLAY
DISPLAY_TO_MEMORY
i have coded like this
CALL METHOD CL_ABAP_LIST_UTILITIES=>DISPLAY_TO_MEMORY
EXPORTING
DISPLAY_DATA = L_LINE
OFFSET_TAB = L_OFF_TAB
IMPORTING
MEMORY_DATA = L_LINE.
LOOP AT L_OFF_TAB INTO L_OFFSET.
IF L_LINE+L_OFFSET(1) = SPACE.
WRITE SY-VLINE TO L_LINE+L_OFFSET(1).
ENDIF.
ENDLOOP.
CALL METHOD CL_ABAP_LIST_UTILITIES=>MEMORY_TO_DISPLAY
EXPORTING
MEMORY_DATA = L_LINE
OFFSET_TAB = L_OFF_TAB
IMPORTING
DISPLAY_DATA = L_LINE.
Can any one explayn what to do.
Regards
InputStream is = getClass().getResourceAsStream("servlet.properties");BTW, the code posted above will load the properties file from the same package this class was loaded from. If your class is not in a package, the result will be the same. But say you have this setup:
WEB-INF/classes
- com
- mycorp
- package
- Servlet.classThen the code above will access:
WEB-INF/classes
- com
- mycorp
- package
- servlet.propertiesIf you use:
InputStream is = getClass().getResourceAsStream("/servlet.properties");Then it will look here:
WEB-INF/classes
- servlet.propertiesBTW 2 - the search algorithm above is simplified for brevity. See the javadocs for the full algorithm.
Similar Messages
-
Abstract class causes JNI GetByteArrayElements to crash
I'm having a problem with a subclass of an abstract class that is accessing a JNI function. I'm using Java 1.4.2.
I started out with a single class that reads data from a serial port (via a JNI call) and then parses the data. When I test this class, the read/parse works correctly.
Since I have to create multiple parsing protocols, I decided to create an abstract class that contained the reading functionality and a subclass that parses the data. When I did this, the 1st call to GetByteArrayElement never returns (nor do I get a stack dump trace).
I also tried making the super-class non-abstract and over-writing the prase method(s). I got a similar failure.
I can't imagine what the issue might be - why would splitting the original object into two (superclass/subclass) cause such a problem?
I've include relevent snippits of code.
Thanks for the help!
===== JNI Code =====
extern JNIEXPORT jint JNICALL Java_vp_jni_Serial_read (JNIEnv *env,
jclass class, jint fd, jbyteArray buf, jint cnt, jint offset)
jboolean iscopy = JNI_FALSE;
// FAILS ON CALL; NEVER RETURNS!!!!
const jbyte *data = GetByteArrayElements (env, buf, &iscopy);
const uchar *b;
int num,
rc;
b = (uchar *) &data[offset];
num = cnt;
do
rc = read (fd, (char *) b, num);
if (handleReadException (env, rc) != 0)
(*env)->ReleaseByteArrayElements (env, buf, (jbyte *) data, 0);
return rc;
num -= rc;
b += rc;
} while (num > 0);
(*env)->ReleaseByteArrayElements (env, buf, (jbyte *) data, 0);
return cnt;
}==== Java Native Calls ====
public class Serial
public int read (byte[] data, int length, int offset)
throws IOException
return read (fd, data, length, offset);
private static native int read (int fd, byte[] buf, int cnt, int offset)
throws IOException;
}==== Abstract super-class ====
package vp.parse;
import java.io.IOException;
import java.io.InterruptedIOException;
import java.io.SyncFailedException;
import vp.jni.Serial;
import vp.jni.Exec;
import vp.data.ControlData;
public abstract class Parse extends Thread
protected static final int ERROR = -1;
private static final int LOC_TIMEOUT = 3000;
private Serial link;
private int port;
private boolean running = false;
private int baud = Serial.B9600;
protected abstract void reset ();
protected abstract void parse ();
public Parse (int port, String id, int baud)
this.port = port;
this.baud = baud;
start ();
synchronized (this)
try
wait (5000);
} catch (Exception e)
System.out.println (id + " Thread failed to synchronize");
System.out.println ("Done");
public void run ()
link = new Serial(port);
try
link.open();
link.setBaud (baud);
link.setTimeout (LOC_TIMEOUT);
catch (Exception e )
link = null;
return;
running = true;
synchronized (this)
notify ();
while (running)
parse ();
protected int read (byte[] buf, int packetSize, int offset)
if (offset >= packetSize)
offset = 0;
if (offset > 0)
for (int i=0; i<packetSize - offset; i++)
buf[i] = buf[offset+i];
offset = packetSize - offset;
try
int cnt = link.read (buf, packetSize - offset, offset);
offset = 0; // all data is good
// ready to 'close down' executable
catch (Exception exp)
running = false;
return ERROR;
return offset;
}==== Sub-class to handle parsing ====
package vp.parse;
public class Eis extends Parse
private static final int PACKET_SIZE = 3 + 69 + 1; // hdr, data, csum
private byte[] buffer = new byte[PACKET_SIZE];
private int offset = 0;
public Eis (int port)
super (port, "GR EIS", Serial.B9600);
protected void reset ()
offset = 0;
protected void parse ()
do
offset = read (buffer, PACKET_SIZE, offset);
if (offset == ERROR)
offset = 0;
return;
// parse code here
} while (parse failed);
public static void main (String[] argv)
Eis e = new Eis (3);
try { Thread.sleep (10000); } catch (Exception x) {}
}The issue was the following:
I had declared a buffer in the sub-class;
private byte[] buffer = new byte[PACKET_SIZE];
And the assumption would be that by the time it got used, it would be initialized. But that's not the case. Why?
The sub-class called the super class constructor. At this point in time, buffer[] is not valid.
The super class constructor spawns the child thread and waits for the spawned thread to finish initialization.
The spawned thread creates the serial port, informs the constructor it's 'done' and starts to parse incoming data.
The parse() code is the sub-class passes the uninitialized buffer to the JNI code and GetByteArrayElements crashes because id doesn't like a null pointer.
Since the parent thread doesn't regain control to finish the construction, buffer[] never gets initialized.
So much for synchronized thread spawning in a constructor... -
Arranging data in excel by using any scripting language like VB, Java \
I need a help in arranging the data in first column into different columns according to equivalent row value.
for example.
Time
Name Class
Activity Subject
12 Feb 2014 10:00 AM Robert
5th School started
12 Feb 2014 10:30 AM Robert
5th Break
12 Feb 2014 11:00 AM Robert
5th Session Started
Science
12 Feb 2014 11:30 AM Edwin
5th School Started
12 Feb 2014 12:00 AM Edwin
5th Break
12 Feb 2014 01:00 PM Edwin
5th Session Started
Maths
Above Data to be arranged as mentioned below
Time A Time B
Time C
Name Class
Subject
12 Feb 2014 10:00 AM 12 Feb 2014 10:30 AM 12 Feb 2014 11:00 AM
Robert 5th
Science
12 Feb 2014 11:30 AM 12 Feb 2014 12:00 AM 12 Feb 2014 01:00 PM
Edwin 5th
Maths
As actual data is different and i cannot share the data here.. but i need to create a VB or Java or any language script for n number of above mentioned data to bring out the data into below format..
Please help me in finding out solutionData from A1
VVBA Code:
Sub lk()
Dim wks As Worksheet: Set wks = ActiveSheet
Dim x&, y&: y = 2 '1st data row
Dim max_row&: max_row = wks.Cells(wks.Rows.Count, "a").End(xlUp).Row
Dim n_wks As Worksheet: Set n_wks = ActiveWorkbook.Worksheets.Add
'Headers
With n_wks.Cells(1, 1)
.Value = "Time A"
.Offset(, 1) = "Time B"
.Offset(, 2) = "Time C"
.Offset(, 3) = "Name"
.Offset(, 4) = "Class"
.Offset(, 5) = "Subject"
End With
'Pull datas i step
For x = 2 To max_row Step 3 'rows 2|5|8...
n_wks.Cells(y, 1).Value = wks.Cells(x, 1).Value
n_wks.Cells(y, 2).Value = wks.Cells(x + 1, 1).Value
n_wks.Cells(y, 3).Value = wks.Cells(x + 2, 1).Value
n_wks.Cells(y, 4).Value = wks.Cells(x, 2).Value
n_wks.Cells(y, 5).Value = wks.Cells(x, 3).Value
n_wks.Cells(y, 6).Value = wks.Cells(x + 2, 5).Value
y = y + 1
Next
End Sub
p.s.
Gallery is not for that ;] - use OneDrv, Dropbox, Or other
Oskar Shon, Office System MVP - www.VBATools.pl
if Helpful; Answer when a problem solved -
Forte Fusion Process Management System
I am a newcomer to this product formerly known as Conductor. I am trying to run the example UCC client program and receiving the following error:
SYSTEM ERROR: Exception raised in user application.
Class: qqsp_ErrorDescriptor
Error Time: Fri Oct 14 09:48:52
Exception occurred (locally) on partition "Forte_cl0_Client", (partitionId
= 85E82390-A8C3-11D6-ADCA-409DD6FEAA77:0x7968:0x3, taskId =
[85E82390-A8C3-11D6-ADCA-409DD6FEAA77:0x7968:0x3.23]) in application
"FTLaunch_cl0", pid 3516 on node WS117V6226883 in environment CentralEnv.
SYSTEM ERROR: (This error was converted)
Unable to open the specified session. Look further in the error stack for the
reason.
Class: WFException
Class: qqsp_ErrorDescriptor
Detected at: WFSession.OpenSession
Error Time: Fri Oct 14 09:48:52
Exception occurred (locally) on partition "Forte_cl0_Client", (partitionId
= 85E82390-A8C3-11D6-ADCA-409DD6FEAA77:0x7968:0x3, taskId =
[85E82390-A8C3-11D6-ADCA-409DD6FEAA77:0x7968:0x3.23]) in application
"FTLaunch_cl0", pid 3516 on node WS117V6226883 in environment CentralEnv.
INFORMATION: Stack Trace for Exception:
Traceback:
ConductorClientClass.connect at line 18
ConductorClientClass.run at line 3
C++ Method(s)
UserApp.Run at offset 105
Class: qqsp_ErrorDescriptor
Error Time: Fri Oct 14 09:48:52
Exception occurred (locally) on partition "Forte_cl0_Client", (partitionId
= 85E82390-A8C3-11D6-ADCA-409DD6FEAA77:0x7968:0x3, taskId =
[85E82390-A8C3-11D6-ADCA-409DD6FEAA77:0x7968:0x3.23]) in application
"FTLaunch_cl0", pid 3516 on node WS117V6226883 in environment CentralEnv.
SYSTEM ERROR: Engine CentralEnv is not online.
Class: qqsp_UsageException with ReasonCode: SP_ER_INVALIDSTATE
Error #: [12, 101]
Detected at: WFSession.OpenSession
Last TOOL statement: method ConductorClientClass.connect, line 18
Error Time: Fri Oct 14 09:48:52
Exception occurred (locally) on partition "Forte_cl0_Client", (partitionId
= 85E82390-A8C3-11D6-ADCA-409DD6FEAA77:0x7968:0x3, taskId =
[85E82390-A8C3-11D6-ADCA-409DD6FEAA77:0x7968:0x3.23]) in application
"FTLaunch_cl0", pid 3516 on node WS117V6226883 in environment CentralEnv.
The exception sames to be due a an invalid state of the conductor. We are running iIS 3.0.1 and the client is 3.0.9. When I attempt to verify the state through the iIS Console I get a CheckVersion exception regarding the version differences.
I would appreciate any help.
ThanksThe OPMN process want to start, and it controls all other processes. Periodically it checks if all other process are still running. This is done via an heart beat mechanism. In the opmn.xml file you can see all the components managed by OPMN and their time-out. If the OPMN does not get a response within that time-out it will restart or stop the process. You can set the number of retries before stop/restart the process.
I suggest to increase the tim-out and number of retries. -
How can we generate a Traceback?
When raising an exception, it is often useful to know which line of code
executed before the exception was raised. i.e., the message-send stack,
the Forte equivalent to a Smalltalk "walkback" window. We know such a
thing is possible because Forte generates one when you send a message to
the NIL object (see attachment). However, in our own code, Forte merely
recounts the line of code which raised our exception - not necessarily
useful.
Does anyone know how to make Forte print the Traceback, in a clean way?
That is, other than intentionally generating a run-time error such as
sending a message to NIL? Setting the severity level on the exception
makes no difference. Nor does using one of Forte's "System" exceptions
seem to help.
Example of a Traceback:
Note: "CastingTest.Levels at line 1" is the actual "culprit" code
=============================================
EagleOperationsMgr:Security
SYSTEM ERROR: Trying to invoke a method on a NIL object (qqsp_String,
55).
Traceback:
CastingTest.AbstractInstantiationTest at line 2
CastingTest.Levels at line 1
C++ Method(s)
InterfaceManager.RunRunner at offset 102
Class: qqos_SystemException
Error #: [901, 60]
Detected at: qqin_Interpret at 10
Last TOOL statement: method CastingTest.AbstractInstantiationTest,
line 2
Error Time: Tue Feb 25 12:36:06
Exception occurred (locally) on partition "Forte_cl0_Client",
(partitionId
= 732D9D45-3D64-11D0-BC65-4A0594FDAA77:0x14dc:0x1, taskId =
[732D9D45-3D64-11D0-BC65-4A0594FDAA77:0x14dc:0x1.4]) in
application
"Forte_cl0", pid 155 on node W133637 in environment EagleDev.
Example of a User-Generated SystemException - no Traceback:
Note: CastingTest.Levels at line 1 is not mentioned - difficult to debug
=============================================
EagleOperationsMgr:Security
USER ERROR: abc
Class: qqos_SystemException
Last TOOL statement: method CastingTest.ExceptionTest, line 4
Error Time: Tue Feb 25 12:39:45
Exception occurred (locally) on partition "Forte_cl0_Client",
(partitionId
= 732D9D45-3D64-11D0-BC65-4A0594FDAA77:0x14dc:0x1, taskId =
[732D9D45-3D64-11D0-BC65-4A0594FDAA77:0x14dc:0x1.4]) in
application
"Forte_cl0", pid 155 on node W133637 in environment EagleDev.Why not
task.errormgr.showerrors(TRUE);
or am I missing something?
[email protected] writes:
> Francis Blesso/BOSTON/PART/CSC
> 02/25/97 08:01 PM
>
> In order to generate a traceback cleanly, I belive you'll have to wait
> until Forte release 3.
> The taskhandle class will have a method which returns a TextData object
> describing the
> stack trace.
>
> I've used the same trick of invoking a method on a nil object but only
> temporarily. Its ugly
> and makes it hard to handle the intended exception.
>
> If suppose you could also run your project from the debugger view the
> task's call
> stack once the exception is raised.
>
>
> Francis Blesso
>
> CSC Consulting and Systems Integration.
> [email protected]
>
> ///////////////////////////////////////////////////////////////////////////
> ///////////////
>
> When raising an exception, it is often useful to know which line of code
> executed before the exception was raised. i.e., the message-send stack,
> the Forte equivalent to a Smalltalk "walkback" window. We know such a
> thing is possible because Forte generates one when you send a message to
> the NIL object (see attachment). However, in our own code, Forte merely
> recounts the line of code which raised our exception - not necessarily
> useful.
>
> Does anyone know how to make Forte print the Traceback, in a clean way?
> That is, other than intentionally generating a run-time error such as
> sending a message to NIL? Setting the severity level on the exception
> makes no difference. Nor does using one of Forte's "System" exceptions
> seem to help.
>
>
>
> Example of a Traceback:
> Note: "CastingTest.Levels at line 1" is the actual "culprit" code
> =============================================
> EagleOperationsMgr:Security
> SYSTEM ERROR: Trying to invoke a method on a NIL object (qqsp_String,
> 55).
> Traceback:
> CastingTest.AbstractInstantiationTest at line 2
> CastingTest.Levels at line 1
> C++ Method(s)
> InterfaceManager.RunRunner at offset 102
>
> Class: qqos_SystemException
> Error #: [901, 60]
> Detected at: qqin_Interpret at 10
> Last TOOL statement: method CastingTest.AbstractInstantiationTest,
> line 2
> Error Time: Tue Feb 25 12:36:06
> Exception occurred (locally) on partition "Forte_cl0_Client",
> (partitionId
> = 732D9D45-3D64-11D0-BC65-4A0594FDAA77:0x14dc:0x1, taskId =
> [732D9D45-3D64-11D0-BC65-4A0594FDAA77:0x14dc:0x1.4]) in
> application
> "Forte_cl0", pid 155 on node W133637 in environment EagleDev.
>
>
> Example of a User-Generated SystemException - no Traceback:
> Note: CastingTest.Levels at line 1 is not mentioned - difficult to debug
> =============================================
> EagleOperationsMgr:Security
> USER ERROR: abc
> Class: qqos_SystemException
> Last TOOL statement: method CastingTest.ExceptionTest, line 4
> Error Time: Tue Feb 25 12:39:45
> Exception occurred (locally) on partition "Forte_cl0_Client",
> (partitionId
> = 732D9D45-3D64-11D0-BC65-4A0594FDAA77:0x14dc:0x1, taskId =
> [732D9D45-3D64-11D0-BC65-4A0594FDAA77:0x14dc:0x1.4]) in
> application
> "Forte_cl0", pid 155 on node W133637 in environment EagleDev.
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-= Thor (David Thor Collard) | Be the tree rooted.
-= [email protected] | http://www.alta-oh.com/~thor/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-= What no one seems to comprehend is that there is only one battle,
-= and that we are compelled by our nature and the nature of reality
-= to fight it again and again.
-= Rannulph Junah in "The Legend of Bagger Vance" by Steve Pressfield
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -
Re: Method name and/or line number available from withinForte?
To my knowledge there is no such capability with forte, and for sure it
would be nice. Short
of storing all that metadata at runtime, a compile-time substitution such
as is done with
most C preprocessors would work as well.
However, I believe the solution you've identified falls short in a deployed
fashion - I think
all that method name/line number stuff is only available from the workshop...
-J
At 02:54 PM 10/27/98 -0600, [email protected] wrote:
I'm sure this question has been asked many times, but I don't know that I've
ever heard the answer. Is there any way from Forte to access the method
name of the currently executing method? What about the current line number?
I'm sure you all know what I'm getting at by now -- when raising your own
custom exceptions or logging messages we'd like to be able to not hard-code
method names and line numbers into them. I know these are available with
log flags so this information is stored somewhere -- is there an API to
access it on an agent, the task, or the environment? The only way I can
think of doing this (which is not-so-elegant) is to force a Forte exception
to be raised (like access a method on a null TextData or something), then
immediately catch it and extract the method and line number from it. Is
there a more elegant way?
-J.C.
J.C. Hamlin, Senior Consultant, Forte National Practice
Born Information Services Group, Wayzata, MN
Ph: (612) 404-4000 Ph2: (612) 783-8270 FAX: (612) 404-4441
<[email protected]> <[email protected]>
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>**************************************
John L. Jamison
Vice President and Chief Technology Officer
Sage IT Partners, Inc.
415 392 7243 x 306
[email protected]
The Leaders in Internet Enabled Business Change
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>Method task.TraceBack () returns a string suitable for shoving on the error
stack, and representing a call trace. The method
method TomW_RaiseException.RaiseException
begin
ge : GenericException = New ();
ge.SetWithParams (SP_ER_USER, task.TraceBack ());
task.ErrorMgr.AddError (ge);
Raise ge;
end method;
produces the following when called from the display method of the window in
which it is embedded.
USER ERROR:
Traceback:
TomW_RaiseException.RaiseException at line 2
TomW_RaiseException.Display at line 4
TomW_RaiseException. at offset 13
C++ Method(s)
UserApp.Run at offset 96
Class: qqsp_Exception
Last TOOL statement: method TomW_RaiseException.RaiseException, line 3
Error Time: Wed Oct 28 08:28:34
Exception occurred (locally) on partition "TomW_Test_CL0_Client",
(partitionId = AA6475E0-3DD2-11D2-B582-04228BFFAA77:0x117f:0x6,
taskId =
[AA6475E0-3DD2-11D2-B582-04228BFFAA77:0x117f:0x6.34]) in application
"FTLaunch_cl0", pid 195 on node SPNMXSHOP7 in environment SFDEVL.
I suppose that a sufficiently determined person could parse the results of
TraceBack () and extract the
method and line from it. But I know of no method that explicitly returns
the name of the calling method.
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/> -
I would like to format a text field to accept a phone number eg (***) *** - ****
How do I create this mask?
I have seen JMaskField mentioned but I can not find any examples. Could anyone provide an example of how to use JMaskField or have you got any other suggestions?
Thank youhi soughtred,
Try the following code. I hope this is what you want.
import java.io.*;
import javax.swing.*;
import javax.swing.text.*;
import java.awt.*;
import java.awt.event.*;
class MaskedTextField extends JTextField {
public MaskedTextField (String mask, String initStr) {
super();
setDocument(new MaskedDocument(initStr, mask, this));
setText(initStr);
setColumns(mask.length()+1);
class MaskedDocument extends PlainDocument {
String mask;
String initStr;
JTextField tf;
public MaskedDocument(String initStr, String mask, JTextField container) {
this.mask = mask;
this.initStr = initStr;
tf = container;
void replace(int offset, char ch, AttributeSet a)
throws BadLocationException {
super.remove(offset,1);
super.insertString(offset,""+ch,a);
public void remove(int offs, int len) throws BadLocationException {
System.out.println("R:"+len+","+offs);
if (len==0)
return;
// Remove current contents
super.remove(offs, len);
// Replace the removed part by init string
super.insertString(offs,initStr.substring(offs,offs+len),
getAttributeContext().getEmptySet());
tf.setCaretPosition(offs);
public void insertString(int offset, String str, AttributeSet a)
throws BadLocationException {
if ((offset==0) && str.equals(initStr)) {
// Initialisation of text field
super.insertString(offset,str,a);
return;
if (str.length()==0) {
super.insertString(offset,str,a);
return;
for (int i=0;i<str.length();i++) {
while ((offset+i) < mask.length()) {
if (mask.charAt(offset+i)=='-')
// Skip fixed parts
offset++;
else {
// Check if character is allowed according to mask
switch (mask.charAt(offset+i)) {
case 'D': // Only digitis allowed
if (!Character.isDigit(str.charAt(i)))
return;
break;
case 'C': // Only alphabetic characters allowed
if (!Character.isLetter(str.charAt(i)))
return;
break;
case 'A': // Only letters or digits characters allowed
if (!Character.isLetterOrDigit(str.charAt(i)))
return;
break;
replace(offset+i, str.charAt(i),a);
break;
// Skip over "fixed" characters
offset += str.length();
while ((offset<mask.length()) && (mask.charAt(offset)=='- ')) {
offset++;
if (offset<mask.length())
tf.setCaretPosition(offset);
public class test {
public static void main(String[] args) {
final JFrame f = new JFrame("Textfield demo");
f.setDefaultCloseOperation(f.DISPOSE_ON_CLOSE);
f.addWindowListener(new WindowAdapter() {
public void windowClosed(WindowEvent e) {
System.exit(0);
f.setSize(250,70);
MaskedTextField tf=new MaskedTextField("DD-D-D-DDD-DDDD","..-
tf.setFont(new Font("Monospaced", Font.BOLD, 14));
JPanel panel = new JPanel();
panel.add(tf);
f.getContentPane().add(panel);
f.setVisible(true); -
LDAP library - UDS 5.0.3
Does anyone have experience using LDAP library (UDS 5.0.3)?
I am having a problem using method Ldapserver.Search
Following error occurs:
SYSTEM ERROR: Exception raised in user application.
Class: qqsp_ErrorDescriptor
Error Time: Thu Sep 05 14:20:06
Exception occurred (locally) on partition "Forte_cl0_Client", (partitionId
= D34510C0-4D31-11D6-9EED-7878B4C9AA77:0x1e7:0x1, taskId =
[D34510C0-4D31-11D6-9EED-7878B4C9AA77:0x1e7:0x1.8]) in application
"Forte_cl0", pid 2592 on node ACP3NTB-01822 in environment SvilUDS.
SYSTEM ERROR: (This error was converted)
(This error was converted)
ASN.1 Integer does not begin with 0x02 at offset 0
Class: LDAPException
Class: LDAPException
Class: qqsp_ErrorDescriptor
Last TOOL statement: method Ldapserver.Search, line 41
Error Time: Thu Sep 05 14:20:06
Exception occurred (locally) on partition "Forte_cl0_Client", (partitionId
= D34510C0-4D31-11D6-9EED-7878B4C9AA77:0x1e7:0x1, taskId =
[D34510C0-4D31-11D6-9EED-7878B4C9AA77:0x1e7:0x1.8]) in application
"Forte_cl0", pid 2592 on node ACP3NTB-01822 in environment SvilUDS.
Any suggestions?
Thanks in advance,
Filippo D'AmicoAs far as I know, UDS 5.0 reached EOSL on 16th January 2005.
-
Dealing with AffineTransform mouse driven rotation
Hi there,
I'm implementing the mouse control to navigate through an image representing a map. Pan and zoom where trivial operations, but I'm getting in trouble when trying to rotate the BufferedImage.
I actually can perform the rotation, but because the map coordinate system gets rotated too. I have applied a trigonometric correction when performing a pan after a rotation. This was the hard part... my problem is that I have inverted the axis when panning, so dragging the mouse to the bottom of the canvas becomes a horizontal translation if we had a rotation by PI rads.
Because original Java code is pretty big, I have coded a simple example that pans, zooms or rotates a square.
The magic happens here:
def performPan(self,diff):
xa = diff.x*lang.Math.cos(self.theta)+diff.y*lang.Math.sin(self.theta)
ya = -diff.x*lang.Math.sin(self.theta)+diff.y*lang.Math.cos(self.theta)
diff.x -= (diff.x - xa)
diff.y -= (diff.y - ya)
center = self.canvas.squareCenter()
# if self.theta != 0: self.transform.rotate(-self.theta, center.x, center.y)
self.transform.translate(diff.x, diff.y)
#if self.theta != 0: self.transform.rotate(self.theta, center.x, center.y)
def performZoom(self,diff):
zoomLevel = 1.0+0.01*diff.y;
if zoomLevel <= 0:
zoomLevel = 0
center = self.canvas.windowCenter()
self.transform.scale(zoomLevel, zoomLevel)
def performRotation(self,diff):
angleStep = diff.y * 0.1
self.theta += diff.y
self.theta %= 2*lang.Math.PI
center = self.canvas.squareCenter()
self.transform.rotate(angleStep, center.x, center.y)
def toWindowCoordinates(self,diff):
try:
self.transform.inverseTransform(diff,diff)
except:
print "error en window coordinates"I have already tried changing diff.x and diff.x sign, and commenting that trigonometric correction and uncommeting the lines concatenating two rotations surrounding the translation without sucess.
Please, I'd appreciate some feedback. Brainstorms are welcome. :-)
Thanks, Vicente.
The full code:
from javax import swing
from java import awt, lang;
class Listener(swing.event.MouseInputAdapter):
def __init__(self,subject):
self.offset = awt.geom.Point2D.Double()
self.anchor = awt.geom.Point2D.Double()
self.canvas = subject
self.transform = subject.transform
self.rectangle = subject.rectangle
self.theta = 0.0
def mousePressed(self,e):
self.anchor.x = e.getX()
self.anchor.y = e.getY()
self.offset.x = e.getX()
self.offset.y = e.getY()
def mouseDragged(self,e):
self.offset.x = e.getX()
self.offset.y = e.getY()
diff = awt.geom.Point2D.Double()
tx = self.offset.x - self.anchor.x
ty = self.offset.y - self.anchor.y
diff.x = tx
diff.y = ty
self.anchor.x = self.offset.x
self.anchor.y = self.offset.y
class Painter(lang.Runnable):
def __init__(self,canvas, listener):
self.canvas = canvas
self.listener = listener
def run(self):
if e.isControlDown():
self.listener.performRotation(diff)
elif swing.SwingUtilities.isLeftMouseButton(e):
self.listener.performPan(diff)
if swing.SwingUtilities.isRightMouseButton(e):
self.listener.performZoom(diff)
self.canvas.repaint()
work = Painter(self.canvas, self)
swing.SwingUtilities.invokeLater(work)
def mouseReleased(self,e):
self.color = awt.Color.red
self.canvas.repaint()
def performPan(self,diff):
xa = diff.x*lang.Math.cos(self.theta)+diff.y*lang.Math.sin(self.theta)
ya = -diff.x*lang.Math.sin(self.theta)+diff.y*lang.Math.cos(self.theta)
diff.x -= (diff.x - xa)
diff.y -= (diff.y - ya)
center = self.canvas.squareCenter()
if self.theta != 0: self.transform.rotate(-self.theta, center.x, center.y)
self.transform.translate(diff.x, diff.y)
if self.theta != 0: self.transform.rotate(self.theta, center.x, center.y)
def performZoom(self,diff):
zoomLevel = 1.0+0.01*diff.y;
if zoomLevel <= 0:
zoomLevel = 0
center = self.canvas.windowCenter()
self.transform.scale(zoomLevel, zoomLevel)
def performRotation(self,diff):
angleStep = diff.y * 0.1
self.theta += diff.y
self.theta %= 2*lang.Math.PI
center = self.canvas.squareCenter()
self.transform.rotate(angleStep, center.x, center.y)
def toWindowCoordinates(self,diff):
try:
self.transform.inverseTransform(diff,diff)
except:
print "error en window coordinates"
class Canvas(swing.JPanel):
def __init__(self):
self.rectangle = awt.geom.Rectangle2D.Double(0,0,50,50)
self.transform = awt.geom.AffineTransform()
self.wcenter = awt.geom.Point2D.Double()
self.rcenter = awt.geom.Point2D.Double()
listener = Listener(self)
swing.JPanel.addMouseMotionListener(self,listener)
swing.JPanel.addMouseListener(self,listener)
def paintComponent(self,g2d):
self.super__paintComponent(g2d)
g2d.setTransform(self.transform)
g2d.fill(self.rectangle)
def windowCenter(self):
if self.wcenter.x == 0 or self.wcenter.y == 0:
self.wcenter.x = self.getHeight()/2.0
self.wcenter.y = self.getWidth()/2.0
return self.wcenter
def squareCenter(self):
if self.rcenter.x == 0 or self.rcenter.y == 0:
self.rcenter.x = self.rectangle.getBounds2D().height/2.0
self.rcenter.y = self.rectangle.getBounds2D().width/2.0
return self.rcenter
frame = swing.JFrame( title="test",
visible=1,
defaultCloseOperation = swing.JFrame.EXIT_ON_CLOSE,
preferredSize = awt.Dimension(400,400),
maximumSize = awt.Dimension(800,600),
minimumSize = awt.Dimension(200,200),
size = awt.Dimension(500,500)
frame.add(Canvas(), awt.BorderLayout.CENTER)
frame.pack()I forgot to mention that the example is written in
Jython, because the Java was pretty big, but it is
legible bu a Java programmer. :-)It's legible, but most of us w/out a jython compiler would have to re-write the code if we wanted to try it out. That may hurt your chances of getting a useful response (as opposed to my useless responses). ... Or it might not.
Good luck!
/Pete -
Hi,
I'm facing a problem when I monitored the Forte Conductor engine from a
client machine (both client and server have the version 3L). The details of
the error are as attached. I'm having this error several times.
The error doesn't reflect any process instances error in the Conductor
engine.
What would cause the error?
Thanks in advance.
Best regards,
Chin
<--Error Attachment-->
SYSTEM ERROR: An error occurred whilst monitoring engine lmseng
Class: qqsp_ErrorDescriptor
Error Time: Sat May 27 12:06:39
Exception occurred (locally) on partition "WFConsole_cl1_Client",
(partitionId = 75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1, taskId
=
[75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1.14]) in application
"WFConsole_cl1", pid 4293177635 on node HLAILA in environment
centrale.
SYSTEM ERROR: Failed to connect or lost connection to the environment
manager
at FORTE_NS_ADDRESS = <Unknown>. Check that the environment manager is
installed at that location. If it is, then check to be sure that there
are
enough system resources available to support this partition.
Class: qqsp_SystemResourceException
Error #: [601, 201]
Detected at: qqdo_NsClient::FindObject at 1
Last TOOL statement: method EngineMonitor.GetEngineDetails
Error Time: Sat May 27 12:06:39
Exception occurred (locally) on partition "WFConsole_cl1_Client",
(partitionId = 75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1, taskId
=
[75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1.14]) in application
"WFConsole_cl1", pid 4293177635 on node HLAILA in environment
centrale.
INFORMATION: The connection to the partner was terminated by the
Communication
Manager for the reasons below.
Class: qqsp_DistAccessException
Detected at: qqdo_PartitionMgr::StopLocation at 1
Error Time: Sat May 27 12:06:39
Distributed method called: qqdo_NsServerProxy.FindObject (object name
Unnamed) from partition "Forte_Executor", (partitionId =
75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e, taskId =
[75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e.1281]) in application
"WFConsole_cl1", pid 4293177635 on node HLAILA in environment
centrale
Exception occurred (locally) on partition "WFConsole_cl1_Client",
(partitionId = 75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1, taskId
=
[75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1.14]) in application
"WFConsole_cl1", pid 4293177635 on node HLAILA in environment
centrale.
INFORMATION: Network partner closed connection. This usually means the
process at the other end of the wire failed. Please go look there and
find
out why.
Class: qqsp_DistAccessException
Detected at: qqcm_HoseFSM::ReceivedClose at 2
Error Time: Sat May 27 12:06:39
Exception occurred (locally) on partition "WFConsole_cl1_Client",
(partitionId = 75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1, taskId
=
[75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1.14]) in application
"WFConsole_cl1", pid 4293177635 on node HLAILA in environment
centrale.
INFORMATION: Received close: Connection reset (10054).
Class: qqsp_DistAccessException
Detected at: qqcm_HoseFSM::ReceivedClose at 1
Error Time: Sat May 27 12:06:39
Exception occurred (locally) on partition "WFConsole_cl1_Client",
(partitionId = 75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1, taskId
=
[75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1.14]) in application
"WFConsole_cl1", pid 4293177635 on node HLAILA in environment
centrale.
SYSTEM ERROR: Unable to complete a request on method GetAllEnvNames().
Class: ErrorException
Error #: [21, 102]
Detected at: WFEnvAccess.GetAllEnvNames()
Last TOOL statement: method WFEnvAccess.GetAllEnvNames
Error Time: Sat May 27 12:06:37
Exception occurred (locally) on partition "WFConsole_cl1_Client",
(partitionId = 75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1, taskId
=
[75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1.1267]) in application
"WFConsole_cl1", pid 4293177635 on node HLAILA in environment
centrale.
INFORMATION: Stack Trace for Exception:
Traceback:
WFEnvAccess.GetAllEnvNames at offset 164
EngineList.GetConfiguredEngines at offset 33
EngineList.Poll at offset 24
Class: qqsp_ErrorDescriptor
Error Time: Sat May 27 12:06:37
Exception occurred (locally) on partition "WFConsole_cl1_Client",
(partitionId = 75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1, taskId
=
[75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1.1267]) in application
"WFConsole_cl1", pid 4293177635 on node HLAILA in environment
centrale.
SYSTEM ERROR: Cannot find the Conductor environment service agent that
should
be running on the environment manager node.
Class: ErrorException
Error #: [21, 101]
Detected at: WFEnvAccess.GetAllEnvNames()
Last TOOL statement: method WFEnvAccess.GetAllEnvNames
Error Time: Sat May 27 12:06:37
Exception occurred (locally) on partition "WFConsole_cl1_Client",
(partitionId = 75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1, taskId
=
[75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1.1267]) in application
"WFConsole_cl1", pid 4293177635 on node HLAILA in environment
centrale.
INFORMATION: Stack Trace for Exception:
Traceback:
WFEnvAccess.GetAllEnvNames at offset 86
EngineList.GetConfiguredEngines at offset 33
EngineList.Poll at offset 24
Class: qqsp_ErrorDescriptor
Error Time: Sat May 27 12:06:37
Exception occurred (locally) on partition "WFConsole_cl1_Client",
(partitionId = 75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1, taskId
=
[75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1.1267]) in application
"WFConsole_cl1", pid 4293177635 on node HLAILA in environment
centrale.
INFORMATION: The connection to the partner was terminated by the
Communication
Manager for the reasons below.
Class: qqsp_DistAccessException
Detected at: qqdo_PartitionMgr::StopLocation at 1
Last TOOL statement: method WFEnvAccess.GetAllEnvNames
Error Time: Sat May 27 12:06:37
Distributed method called: EnvPointerProxy.GetObjAttr (object name
/wfenvserviceptr) from partition "Forte_Executor", (partitionId =
75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e, taskId =
[75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e.1277]) in application
"WFConsole_cl1", pid 4293177635 on node HLAILA in environment
centrale
Exception occurred (locally) on partition "WFConsole_cl1_Client",
(partitionId = 75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1, taskId
=
[75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1.1267]) in application
"WFConsole_cl1", pid 4293177635 on node HLAILA in environment
centrale.
INFORMATION: Network partner closed connection. This usually means the
process at the other end of the wire failed. Please go look there and
find
out why.
Class: qqsp_DistAccessException
Detected at: qqcm_HoseFSM::ReceivedClose at 2
Error Time: Sat May 27 12:06:37
Exception occurred (locally) on partition "WFConsole_cl1_Client",
(partitionId = 75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1, taskId
=
[75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1.1267]) in application
"WFConsole_cl1", pid 4293177635 on node HLAILA in environment
centrale.
INFORMATION: Received close: Connection reset (10054).
Class: qqsp_DistAccessException
Detected at: qqcm_HoseFSM::ReceivedClose at 1
Error Time: Sat May 27 12:06:37
Exception occurred (locally) on partition "WFConsole_cl1_Client",
(partitionId = 75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1, taskId
=
[75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1.1267]) in application
"WFConsole_cl1", pid 4293177635 on node HLAILA in environment
centrale.
-----Hi,
I'm facing a problem when I monitored the Forte Conductor engine from a
client machine (both client and server have the version 3L). The details of
the error are as attached. I'm having this error several times.
The error doesn't reflect any process instances error in the Conductor
engine.
What would cause the error?
Thanks in advance.
Best regards,
Chin
<--Error Attachment-->
SYSTEM ERROR: An error occurred whilst monitoring engine lmseng
Class: qqsp_ErrorDescriptor
Error Time: Sat May 27 12:06:39
Exception occurred (locally) on partition "WFConsole_cl1_Client",
(partitionId = 75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1, taskId
=
[75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1.14]) in application
"WFConsole_cl1", pid 4293177635 on node HLAILA in environment
centrale.
SYSTEM ERROR: Failed to connect or lost connection to the environment
manager
at FORTE_NS_ADDRESS = <Unknown>. Check that the environment manager is
installed at that location. If it is, then check to be sure that there
are
enough system resources available to support this partition.
Class: qqsp_SystemResourceException
Error #: [601, 201]
Detected at: qqdo_NsClient::FindObject at 1
Last TOOL statement: method EngineMonitor.GetEngineDetails
Error Time: Sat May 27 12:06:39
Exception occurred (locally) on partition "WFConsole_cl1_Client",
(partitionId = 75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1, taskId
=
[75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1.14]) in application
"WFConsole_cl1", pid 4293177635 on node HLAILA in environment
centrale.
INFORMATION: The connection to the partner was terminated by the
Communication
Manager for the reasons below.
Class: qqsp_DistAccessException
Detected at: qqdo_PartitionMgr::StopLocation at 1
Error Time: Sat May 27 12:06:39
Distributed method called: qqdo_NsServerProxy.FindObject (object name
Unnamed) from partition "Forte_Executor", (partitionId =
75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e, taskId =
[75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e.1281]) in application
"WFConsole_cl1", pid 4293177635 on node HLAILA in environment
centrale
Exception occurred (locally) on partition "WFConsole_cl1_Client",
(partitionId = 75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1, taskId
=
[75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1.14]) in application
"WFConsole_cl1", pid 4293177635 on node HLAILA in environment
centrale.
INFORMATION: Network partner closed connection. This usually means the
process at the other end of the wire failed. Please go look there and
find
out why.
Class: qqsp_DistAccessException
Detected at: qqcm_HoseFSM::ReceivedClose at 2
Error Time: Sat May 27 12:06:39
Exception occurred (locally) on partition "WFConsole_cl1_Client",
(partitionId = 75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1, taskId
=
[75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1.14]) in application
"WFConsole_cl1", pid 4293177635 on node HLAILA in environment
centrale.
INFORMATION: Received close: Connection reset (10054).
Class: qqsp_DistAccessException
Detected at: qqcm_HoseFSM::ReceivedClose at 1
Error Time: Sat May 27 12:06:39
Exception occurred (locally) on partition "WFConsole_cl1_Client",
(partitionId = 75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1, taskId
=
[75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1.14]) in application
"WFConsole_cl1", pid 4293177635 on node HLAILA in environment
centrale.
SYSTEM ERROR: Unable to complete a request on method GetAllEnvNames().
Class: ErrorException
Error #: [21, 102]
Detected at: WFEnvAccess.GetAllEnvNames()
Last TOOL statement: method WFEnvAccess.GetAllEnvNames
Error Time: Sat May 27 12:06:37
Exception occurred (locally) on partition "WFConsole_cl1_Client",
(partitionId = 75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1, taskId
=
[75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1.1267]) in application
"WFConsole_cl1", pid 4293177635 on node HLAILA in environment
centrale.
INFORMATION: Stack Trace for Exception:
Traceback:
WFEnvAccess.GetAllEnvNames at offset 164
EngineList.GetConfiguredEngines at offset 33
EngineList.Poll at offset 24
Class: qqsp_ErrorDescriptor
Error Time: Sat May 27 12:06:37
Exception occurred (locally) on partition "WFConsole_cl1_Client",
(partitionId = 75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1, taskId
=
[75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1.1267]) in application
"WFConsole_cl1", pid 4293177635 on node HLAILA in environment
centrale.
SYSTEM ERROR: Cannot find the Conductor environment service agent that
should
be running on the environment manager node.
Class: ErrorException
Error #: [21, 101]
Detected at: WFEnvAccess.GetAllEnvNames()
Last TOOL statement: method WFEnvAccess.GetAllEnvNames
Error Time: Sat May 27 12:06:37
Exception occurred (locally) on partition "WFConsole_cl1_Client",
(partitionId = 75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1, taskId
=
[75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1.1267]) in application
"WFConsole_cl1", pid 4293177635 on node HLAILA in environment
centrale.
INFORMATION: Stack Trace for Exception:
Traceback:
WFEnvAccess.GetAllEnvNames at offset 86
EngineList.GetConfiguredEngines at offset 33
EngineList.Poll at offset 24
Class: qqsp_ErrorDescriptor
Error Time: Sat May 27 12:06:37
Exception occurred (locally) on partition "WFConsole_cl1_Client",
(partitionId = 75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1, taskId
=
[75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1.1267]) in application
"WFConsole_cl1", pid 4293177635 on node HLAILA in environment
centrale.
INFORMATION: The connection to the partner was terminated by the
Communication
Manager for the reasons below.
Class: qqsp_DistAccessException
Detected at: qqdo_PartitionMgr::StopLocation at 1
Last TOOL statement: method WFEnvAccess.GetAllEnvNames
Error Time: Sat May 27 12:06:37
Distributed method called: EnvPointerProxy.GetObjAttr (object name
/wfenvserviceptr) from partition "Forte_Executor", (partitionId =
75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e, taskId =
[75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e.1277]) in application
"WFConsole_cl1", pid 4293177635 on node HLAILA in environment
centrale
Exception occurred (locally) on partition "WFConsole_cl1_Client",
(partitionId = 75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1, taskId
=
[75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1.1267]) in application
"WFConsole_cl1", pid 4293177635 on node HLAILA in environment
centrale.
INFORMATION: Network partner closed connection. This usually means the
process at the other end of the wire failed. Please go look there and
find
out why.
Class: qqsp_DistAccessException
Detected at: qqcm_HoseFSM::ReceivedClose at 2
Error Time: Sat May 27 12:06:37
Exception occurred (locally) on partition "WFConsole_cl1_Client",
(partitionId = 75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1, taskId
=
[75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1.1267]) in application
"WFConsole_cl1", pid 4293177635 on node HLAILA in environment
centrale.
INFORMATION: Received close: Connection reset (10054).
Class: qqsp_DistAccessException
Detected at: qqcm_HoseFSM::ReceivedClose at 1
Error Time: Sat May 27 12:06:37
Exception occurred (locally) on partition "WFConsole_cl1_Client",
(partitionId = 75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1, taskId
=
[75FD95E0-EA89-11D3-B030-C439D3CEAA77:0x61e:0x1.1267]) in application
"WFConsole_cl1", pid 4293177635 on node HLAILA in environment
centrale.
----- -
Hi everyone. I'm new at the forum, a begginer programmer and I'm apologize for my english cuz is not very good ;). I'm making a project using only JSTL, I can't use the JSP embedded code, only JSTL, and a postgreSQL DB. Writing the paging I made the next code using only the JSTL and submit buttons which works very good.
<form action="/Paginaciones03/Consultas" method="POST">
<table>
<tr>
<input type="hidden" value="${limite}"/>
<%--Three first pages case--%>
<c:if test="${offset == 1}">
<td><b><c:out value="${offset}" /></b></td>
<c:if test="${paginas >= 2}">
<td><input type="submit" name="offset" value="${offset + 1}" class="sbmt"></td>
</c:if>
<c:if test="${paginas >= 3}">
<td><input type="submit" name="offset" value="${offset + 2}" class="sbmt"></td>
</c:if>
<c:if test="${paginas >= 4}">
<td><input type="submit" name="offset" value="${offset + 3}" class="sbmt"></td>
</c:if>
<c:if test="${paginas >= 5}">
<td><input type="submit" name="offset" value="${offset + 4}" class="sbmt"></td>
</c:if>
<c:if test="${paginas >= 6}">
<td><input type="submit" name="offset" value="${offset + 5}" class="sbmt"></td>
</c:if>
<c:if test="${paginas >= 7}">
<td><input type="submit" name="offset" value="${offset + 6}" class="sbmt"></td>
</c:if>
<c:if test="${paginas > 3 && offset < paginas}">
<td>Ultima:<input type="submit" name="offset" value="${paginas}" class="sbmt"></td>
</c:if>
</c:if><%--Remainin pages--%>
<c:if test="${offset >= 2}">
<c:if test="${offset - 3 > 0 }">
<td><input type="submit" name="offset" value="${offset - 3}" class="sbmt"></td>
</c:if>
<c:if test="${offset - 2 > 0 && offset - 3 == 0}">
<td><input type="submit" name="offset" value="${offset - 2}" class="sbmt"></td>
</c:if>
<c:if test="${offset - 2 > 1 }">
<td><input type="submit" name="offset" value="${offset - 2}" class="sbmt"></td>
</c:if>
<td><input type="submit" name="offset" value="${offset - 1}" class="sbmt"></td>
<td><b><c:out value="${offset}" /></b></td>
<c:if test="${offset + 1 <= paginas}">
<td><input type="submit" name="offset" value="${offset + 1}" class="sbmt"></td>
</c:if>
<c:if test="${offset + 2 <= paginas}">
<td><input type="submit" name="offset" value="${offset + 2}" class="sbmt"></td>
</c:if>
<c:if test="${offset + 3 <= paginas}">
<td><input type="submit" name="offset" value="${offset + 3}" class="sbmt"></td>
</c:if>
<c:if test="${paginas > 3 && offset < paginas}">
<td>Ultima:<input type="submit" name="offset" value="${paginas}" class="sbmt"></td>
</c:if>
</c:if>
</tr>
<tr>
<td><br/></td>
</tr>
<tr><td>
Resultados por página: <select name="limite">
<option value="10">10</option>
<option value="20">20</option>
<option value="50">50</option>
</select>
</td>
</tr>
<tr><td>Mostrando: ${limite}</td>
</tr>
</table>
</form>The question now is how I can reload the page with the select, using JSTL, and remains the limit number. Thank you very much. If you ask me, I can post the servlet.
Edited by: jFausto on Dec 11, 2008 11:06 AM -
Class path fully qualified vs offset
I am invoking a JVM from a c++ application and I am having problems setting a fully qualified classpath. If I set the class path like the following, I get NoClassDefFoundError errors.
stringstream classPath;
classPath << "-Djava.class.path=/home/user1/application"
<< ":/home/user1/application/myjar1.jar"
<< ":/home/user1/application/myjar2.jar"
<< ":/home/user1/application/myjar3.jar"
<< ":/home/user1/application/myjar4.jar";
But, if I set the class path as an offset from the directory in which I launch my application, everything works correctly.
classPath << "-Djava.class.path=."
<< ":./myjar1.jar"
<< ":./myjar2.jar"
<< ":./myjar3.jar"
<< ":./myjar4.jar";
The remaining code to set up the JavaVMOptions:
JavaVMOption options[4];
options[0].optionString = "-Djava.compiler=NONE";
options[1].optionString = (char *)(classPath.str().c_str());
options[2].optionString = "-Djava.library.path=.";
options[3].optionString = "-Xmx1000m";
Anyone have any similar problems?Actually, what I did is to copy (sprintf) the string
stream's char * to a local char * variable. Then I
set the classpath optionString equal to the local char
*. Seems unecessary but it works.Not sure if that is a good idea but it depends on what you mean by "local char *".
If you want to do a dynamic classpath then use one of the following..
1. A global char array with a fixed (big) size.
2. A global char pointer that you initialize to the size needed.
With either of the above you can also use the string stream by passing in the array via the constructor. -
Positioning a Video Class - wrongly offset
I have compiled a SWF with Flex 3 from Actionscript3 that
calls a Video class ("video") and plays a FLV movie. My routine
sets video.x and video.y values to 0 and 0 (top left). Everything
looks fine when I play it in the Flash Player... however.;
When I embed this SWF into a webpage, the video appears about
60pixels from the left edge of the movie / embed area. Any idea why
this may be happening?
My embed tag looks like;
<object
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
type="application/x-oleobject" codebase="
http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7"
width="640" height="360"><param name="src"
value="Player.swf">
<embed type="application/x-shockwave-flash" pluginspage="
http://www.adobe.com/go/getflashplayer"
src="Player.swf" width="640" height="360">
</object>
Also; when I poll stage.stageHeight and stage.stageWidth from
my actionscript with trace() they output the correct values (640
and 360).
My Actionscript follows;"_brice_" <[email protected]> wrote in
message
news:gfkvlg$58b$[email protected]..
> I have compiled a SWF with Flex 3 from Actionscript3
that calls a Video
> class
> ("video") and plays a FLV movie. My routine sets video.x
and video.y
> values to
> 0 and 0 (top left). Everything looks fine when I play it
in the Flash
> Player...
> however.;
Is there any chance this is just the padding on the page? -
Problem getting arraylist from another class
I am trying to call information about an arraylist from another class. I am using this code to call the size of an arraylist:
import java.io.*;
public class Test
public static void main(String argv[]) throws IOException
Echo03 thing = new Echo03();
int y=thing.value();
System.out.println(y);
Echo03 thing2 = new Echo03();
int x=thing2.percent.size();
System.out.println(x);
}from another file which starts like this:
public class Echo03 extends DefaultHandler
static ArrayList<String> percent = new ArrayList<String>();
static ArrayList<String> text = new ArrayList<String>();
int a;
public int value(){
return percent.size();
public static void main(String argv[]) throws IOException
{The second file is based on an example piece of code from the Java website. I havent posted the whole thing, but if it is relevant then please ask.
Anyway when I run Echo03 by itself, the arraylist has a size of 2. But when I run it from the Test file, it says a size of 0. Is this because the data is not being transferred between the classes? Or is the Echo03 program not executing (and hence the arraylist is not filling up)?
How can I fix this? I have tried 2 ways of calling the data (As seen in my Test file). Neither work.I didnt post the full bit of the code for the second one. Here it is:
import java.io.*;
import org.xml.sax.*;
import org.xml.sax.helpers.DefaultHandler;
import javax.xml.parsers.SAXParserFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import java.util.ArrayList;
import java.awt.*;
import javax.swing.*;
public class Echo03 extends DefaultHandler
static ArrayList<String> percent = new ArrayList<String>();
static ArrayList<String> text = new ArrayList<String>();
int a;
public static void main(String argv[]) throws IOException
if (argv.length != 1) {
System.err.println("Usage: cmd filename");
System.exit(1);
// Use an instance of ourselves as the SAX event handler
DefaultHandler handler = new Echo03();
// Use the default (non-validating) parser
SAXParserFactory factory = SAXParserFactory.newInstance();
try {
// Set up output stream
out = new OutputStreamWriter(System.out, "UTF8");
// Parse the input
SAXParser saxParser = factory.newSAXParser();
saxParser.parse( new File(argv[0]), handler);
for (int b=0; b<percent.size();b++){
System.out.println(percent.get(b+1));
} catch (Throwable t) {
System.exit(0);
static private Writer out;
public void startElement(String namespaceURI,
String lName, // local name
String qName, // qualified name
Attributes attrs)
throws SAXException
if (attrs != null) {
StringBuffer sb = new StringBuffer (250);
for (int i = 0; i < attrs.getLength(); i++) {
nl();
emit(attrs.getValue(i));
sb.append (attrs.getValue(i));
String sf = sb.toString ();
percent.add(sf);
System.out.println(" String: "+sf); a++;
public void characters(char buf[], int offset, int len)
throws SAXException
emit(" ");
String s = new String(buf, offset, len);
if (!s.trim().equals("")) {text.add(s); emit(s);}
//===========================================================
// Utility Methods ...
//===========================================================
// Wrap I/O exceptions in SAX exceptions, to
// suit handler signature requirements
private void emit(String s)
throws SAXException
try {
out.write(s);
out.flush();
} catch (IOException e) {
throw new SAXException("I/O error", e);
// Start a new line
private void nl()
throws SAXException
String lineEnd = System.getProperty("line.separator");
try {
out.write(lineEnd);
} catch (IOException e) {
throw new SAXException("I/O error", e);
} -
How to fix 'class' or 'interface' expected for jsp
below is the stack trace
org.apache.jasper.JasperException: Unable to compile class for JSP
Generated servlet error:
/home/sherali/.netbeans/5.5/apache-tomcat-5.5.17_base/work/Catalina/localhost/UVSDataSearch/org/apache/jsp/pager_002ddemo_jsp.java:7: 'class' or 'interface' expected
import java.util.*;
^
Generated servlet error:
/home/sherali/.netbeans/5.5/apache-tomcat-5.5.17_base/work/Catalina/localhost/UVSDataSearch/org/apache/jsp/pager_002ddemo_jsp.java:8: 'class' or 'interface' expected
import java.io.*;
^
2 errors
thanks a lot in advance.
my jsp is
<%@ page session="false" %>
<%@ page import="tauvex.*;" %>
<%@ page import="java.util.*" %>
<%@ page import="java.io.*" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %>
<html>
<head>
<title>Tauvex Search Results</title>
<%
* Pager Tag Library
* Copyright (C) 2002 James Klicman <[email protected]>
* The latest release of this tag library can be found at
* http://jsptags.com/tags/navigation/pager/
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
%>
<style type="text/css">
A.nodec { text-decoration: none; }
</style>
</head>
<body bgcolor="#ffffff">
<%
String style = getParam(request, "style", "simple");
String position = getParam(request, "position", "top");
String index = getParam(request, "index", "center");
int maxPageItems = getParam(request, "maxPageItems", 3);
int maxIndexPages = getParam(request, "maxIndexPages", 3);
%>
<%
String query1=(String)request.getAttribute("query1");
String query=(String)request.getAttribute("query");
String ShowFile=(String)request.getAttribute("ShowFile");
String ShowRA=(String)request.getAttribute("ShowRA");
String ShowDEC=(String)request.getAttribute("ShowDEC");
String Telescope=(String)request.getAttribute("Telescope");
String ObservationDates=(String)request.getAttribute("ObservationDates");
String Filter=(String)request.getAttribute("Filter");
String RA=(String)request.getAttribute("RA");
String DEC=(String)request.getAttribute("DEC");
String DATE=(String)request.getAttribute("DATE");
String DATE1=(String)request.getAttribute("DATE1");
String Radious=(String)request.getAttribute("Radious");
String FILTER[]=(String[])request.getAttribute("FILTER");
String OrderBy1=(String)request.getAttribute("OrderBy1");
String OrderBy2=(String)request.getAttribute("OrderBy2");
String OrderBy3=(String)request.getAttribute("OrderBy3");
%>
<%
out.println("<form action=\"PlainSQLQuery\" method=POST>");
out.println("<textarea rows = 5 cols = 40 name=query id=\"query\">");
out.println(query);
out.println("</textarea>");
out.println("<input type = submit value = \"Submit\">");
out.println("<input type = reset value = \"Reset\">");
out.println("</form>");
%>
<center>
<table border="0" width="90%" cellpadding="4">
<tr>
<td colspan="2" align="left" valign="top">
<table border="0" cellspacing="2" cellpadding="0">
<tr><td>Max. Page Items </td>
<td><input type="text" size="4" name="maxPageItems" value="<%= maxPageItems %>" onChange="this.form.submit();"></td></tr>
<tr><td>Max. Index Pages </td>
<td><input type="text" size="4" name="maxIndexPages" value="<%= maxIndexPages %>" onChange="this.form.submit();"></td></tr>
</table>
</td>
</tr>
</table>
<pg:pager
index="<%= index %>"
maxPageItems="<%= maxPageItems %>"
maxIndexPages="<%= maxIndexPages %>"
url="TauvexDataServlet"
export="offset,currentPageNumber=pageNumber"
scope="request">
<%-- keep track of preference --%>
<pg:param name="style"/>
<pg:param name="position"/>
<pg:param name="index"/>
<pg:param name="maxPageItems"/>
<pg:param name="maxIndexPages"/>
<pg:param name="RA"/>
<pg:param name="DEC"/>
<pg:param name="DATE"/>
<pg:param name="DATE1"/>
<pg:param name="Radious"/>
<pg:param name="FILTER"/>
<pg:param name="ShowRA"/>
<pg:param name="ShowDEC"/>
<pg:param name="Telescope"/>
<pg:param name="ObservationDates"/>
<pg:param name="Filter"/>
<pg:param name="OrderBy1"/>
<pg:param name="OrderBy2"/>
<pg:param name="OrderBy3"/>
<%-- save pager offset during form changes --%>
<input type="hidden" name="pager.offset" value="<%= offset %>">
<%-- warn if offset is not a multiple of maxPageItems --%>
<% if (offset.intValue() % maxPageItems != 0 &&
("alltheweb".equals(style) || "lycos".equals(style)) )
%>
<p>Warning: The current page offset is not a multiple of Max. Page Items.
<br>Please
<pg:first><a href="<%= pageUrl %>">return to the first page</a></pg:first>
if any displayed range numbers appear incorrect.</p>
<% } %>
<%-- the pg:pager items attribute must be set to the total number of
items for index before items to work properly --%>
<% if ("top".equals(position) || "both".equals(position)) { %>
<br>
<pg:index>
<% if ("texticon".equals(style)) { %>
<jsp:include page="/WEB-INF/jsp/texticon.jsp" flush="true"/>
<% } else if ("jsptags".equals(style)) { %>
<jsp:include page="/WEB-INF/jsp/jsptags.jsp" flush="true"/>
<% } else if ("google".equals(style)) { %>
<jsp:include page="/WEB-INF/jsp/google.jsp" flush="true"/>
<% } else if ("altavista".equals(style)) { %>
<jsp:include page="/WEB-INF/jsp/altavista.jsp" flush="true"/>
<% } else if ("lycos".equals(style)) { %>
<jsp:include page="/WEB-INF/jsp/lycos.jsp" flush="true"/>
<% } else if ("yahoo".equals(style)) { %>
<jsp:include page="/WEB-INF/jsp/yahoo.jsp" flush="true"/>
<% } else if ("alltheweb".equals(style)) { %>
<jsp:include page="/WEB-INF/jsp/alltheweb.jsp" flush="true"/>
<% } else { %>
<jsp:include page="/WEB-INF/jsp/simple.jsp" flush="true"/>
<% } %>
</pg:index>
<% } %>
<hr>
<form action="ZipServlet" method="get" name="download" onsubmit="return Form1_Validator(this)">
<table id="output">
<CAPTION><EM>Fits file Search Results</EM></CAPTION><tr>
<%
out.println("<th>Check Box</th>");
out.println("<th>File Name</th>");
if(ShowRA != null && "on".equals(ShowRA))
out.println("<th>RA_START</th>");
if(ShowRA != null && "on".equals(ShowRA))
out.println("<th>RA_END</th>");
if(ShowDEC != null && "on".equals(ShowDEC))
out.println("<th>DEC_START</th>");
if(ShowDEC != null && "on".equals(ShowDEC))
out.println("<th>DEC_END</th>");
if(Telescope!=null && "on".equals(Telescope))
out.println("<th>Telescope</th>");
if(ObservationDates !=null && "on".equals(ObservationDates))
out.println("<th>STARTOBS</th>");
if(ObservationDates !=null && "on".equals(ObservationDates))
out.println("<th>ENDOBS</th>");
if(Filter!=null && "on".equals(Filter))
out.println("<th>FILTER</th>");
out.println("</tr>");
%>
<%--
<table width="90%" cellspacing="4" cellpadding="4">
Since the data source is static, it's easy to offset and limit the
loop for efficiency. If the data set size is not known or cannot
be easily offset, the pager tag library can count the items and display
the correct subset for you.
The following is an example using an enumeration data source of
unknown size. The pg:pager items and isOffset attributes must
not be set for this example:
--%>
<%
Enumeration myDataList1 = (Enumeration)request.getAttribute("myDataList1");
if (myDataList1 == null)
throw new RuntimeException("myDataList1 is null");
%>
<% while (myDataList1.hasMoreElements()) { %>
<% TauvexData elem = (TauvexData)myDataList1.nextElement(); %>
<pg:item> <%
out.println("<tr>");
%>
<td><input type= "checkbox" name="cb" value="<%=elem.getDownload()%>"></td>
<td><a href="<%= elem.getDownload() %>"><%= elem.Fitsfilename %></a></td>
<%
// out.println("<td> "+elem.Fitsfilename+" </td>");
if(ShowRA != null && "on".equals(ShowRA))
out.println("<td> "+elem.RA_START+" </td>");
if(ShowRA != null && "on".equals(ShowRA))
out.println("<td> "+elem.RA_END+"</td>");
if(ShowDEC != null && "on".equals(ShowDEC))
out.println("<td> "+elem.DEC_START+" </td>");
if(ShowDEC != null && "on".equals(ShowDEC))
out.println("<td> "+elem.DEC_END+" </td>");
if(Telescope!=null && "on".equals(Telescope))
out.println("<td> "+elem.telescope+" </td>");
if(ObservationDates !=null && "on".equals(ObservationDates))
out.println("<td> "+elem.STARTOBS+" </td>");
if(ObservationDates !=null && "on".equals(ObservationDates))
out.println(" <td> "+elem.ENDOBS+" </td>");
if(Filter!=null && "on".equals(Filter))
out.println("<td> "+elem.FILTER+" </td>");
out.println("</tr>");
%> </pg:item>
<% } %>
</table>
<input type="button" name="CheckAll" value="Check All Boxes" onclick="modify_boxes(true,3)">
<input type="button" name="UnCheckAll" value="UnCheck All Boxes" onclick="modify_boxes(false,3)">
<input type="submit" value="Download">
</form>
<hr>
<pg:pages>
<a href="<%= pageUrl %>"><%= pageNumber %></a>
</pg:pages>
<pg:last>
<a href="<%= pageUrl %>">[ Last >| (<%= pageNumber %>) ]</a>
</pg:last>
<% if ("bottom".equals(position) || "both".equals(position)) { %>
<pg:index>
<% if ("texticon".equals(style)) { %>
<jsp:include page="/WEB-INF/jsp/texticon.jsp" flush="true"/>
<% } else if ("jsptags".equals(style)) { %>
<jsp:include page="/WEB-INF/jsp/jsptags.jsp" flush="true"/>
<% } else if ("google".equals(style)) { %>
<jsp:include page="/WEB-INF/jsp/google.jsp" flush="true"/>
<% } else if ("altavista".equals(style)) { %>
<jsp:include page="/WEB-INF/jsp/altavista.jsp" flush="true"/>
<% } else if ("lycos".equals(style)) { %>
<jsp:include page="/WEB-INF/jsp/lycos.jsp" flush="true"/>
<% } else if ("yahoo".equals(style)) { %>
<jsp:include page="/WEB-INF/jsp/yahoo.jsp" flush="true"/>
<% } else if ("alltheweb".equals(style)) { %>
<jsp:include page="/WEB-INF/jsp/alltheweb.jsp" flush="true"/>
<% } else { %>
<jsp:include page="/WEB-INF/jsp/simple.jsp" flush="true"/>
<% } %>
</pg:index>
<% } %>
</pg:pager>
</center>
</body>
</html>
<%!
private static int num =1;
private static String getName(){
String str="cb";
str=str+num;
num++;
return str ;
private static final String getParam(ServletRequest request, String name,
String defval)
String param = request.getParameter(name);
return (param != null ? param : defval);
private static final int getParam(ServletRequest request, String name,
int defval)
String param = request.getParameter(name);
int value = defval;
if (param != null) {
try { value = Integer.parseInt(param); }
catch (NumberFormatException ignore) { }
return value;
private static void radio(PageContext pc, String name, String value,
boolean isDefault) throws java.io.IOException
JspWriter out = pc.getOut();
String param = pc.getRequest().getParameter(name);
out.write("<input type=\"radio\" name=\"");
out.write(name);
out.write("\" value=\"");
out.write(value);
out.write("\" onChange=\"this.form.submit();\"");
if (value.equals(param) || (isDefault && param == null))
out.write(" checked");
out.write('>');
%>Well, putting all that Java code into a JSP was a bad idea in the first place, just on general design principles. But you've done it in such a way that the result of compiling the JSP is malformed Java code. Frankly I would just throw it away and put the Java code into a servlet or some other Java class, where it belongs.
But if you're really working in a place where nobody has learned anything since 2003, and you're forced to support that old junk, then I would point out that the error occurs before the place which generates this line:
import java.util.*;You only need to look at two of the thousand lines of code you posted.
Maybe you are looking for
-
Music transfer from iPhone 4 to iPhone 4s?
I'm having trouble transferring my music from the iPhone 4 to the iPhone 4s. Here's what I tried. I backed up the iPhone 4 and then plugged in the newly activated iPhone 4s and restored it as a backup. When the iPhone 4s finished restoring, only p
-
Hello All, Do we have any report on which we can see the statistical WBS postings? Also is it possible to view along with WBS, the cost centre on which the actual costs are posted? The only way I could find is run any of standard reports and use dyna
-
Excel process does not end properly
Hello All. I am using excel in my program writing data into it an excel workbook and then later on reading data from it. I have written down the code of closing excel worlkbook and shutting down excel application hence releasing the handles for it. B
-
Is there a way to have it display along the bottom of the window as it did before? I can't seem to find where that particular setting can be enabled, or did Apple do away with it and now you have to either cmd+I (get info) or use a widget to find out
-
Hi Experts, I want to export all the tables from schema hr to a new user test in a same database. When i try to imp, it shows that object already exists and end up with error message. sql>impdp directory=dumplocation dumpfile=test.dmp Please advice m