Handling error msg in JSPDynPage
Hello,
I am doing a replica of an SAP R3 std report in portal. I've converted the report pgm to a BAPI. My question is how to populate the BAPIRETURN table with the error messages raised from a std report? I mean how to capture these error messages? I am doing a SUBMIT to call this report from within the BAPI.
Thanks in advance.
Rgds,
Nathan.
Hi Vishal,
Please try following code :
*Code starts here
TYPES : BEGIN OF WA,
DATA(400) TYPE C,
END OF WA.
DATA : IT_FILE TYPE WA OCCURS 0,
WA1 TYPE WA.
<b>data : v_len type i.
CONSTANTS : v_txt(4) type c value '.txt'.</b>PARAMETERS : FNAME like rlgrap-filename.
at selection-screen.
<b>v_len = strlen( fname ).
v_len = v_len - 4.
if fname+v_len(4) <> v_txt.
concatenate fname v_txt into fname.
endif.</b>
if fname is initial.
MESSAGE E000 WITH 'Enter the file path'.
stop.
ELSE.
OPEN DATASET FNAME FOR INPUT IN TEXT MODE. " ENCODING DEFAULT.
IF SY-SUBRC NE 0.
MESSAGE E000 WITH 'File does not Exist'.
stop.
ENDIF.
CLOSE DATASET FNAME.
endif.
start-of-selection.
DO.
READ DATASET FNAME INTO WA1.
IF SY-SUBRC = 0.
APPEND WA1 TO IT_FILE.
ELSE.
EXIT.
ENDIF.
ENDDO.
CLOSE DATASET FNAME.
PERFORM DISPLAY_ALV.
*******Code ends here
You can check if there is an '.txt' extension in the filename given in the selection screen. If not, concatenate '.txt' extension else keep the filename as it is.
Cheers,
Vikram
Please reward for helpful replies!!
Similar Messages
-
How to handle error msgs in one system which are available only in another?
Hi Experts,
I have two SAP systems A and B. An ABAP program in system A calls Function module in System B.
System B returns any error with message id, class and variables in the event of any invalid data.
How to handle this returned error message in system A when the message class exists only in system B.
One way is to create a copy of this message class along with all the messages in system A.
But the function module in system B calls many BAPIs which in turn may return messages from many different message classes. So making a copy of so many message classes in System A means creating so many custom objects.
Is there any better way to handle this without creating the message classes in System A?
Thanks & Regards
Gopal
Edited by: gopalkrishna baliga on Apr 27, 2010 6:28 AMHi Gopal,
As per my understanding your function module can retrun any number of error messages and it may have varied descriptions.It would be difficult to handle each of these error individually.
One of the methods can be..use the raise exception otion whenever any error is encountered if you want to do in the shortedt way.
you can catch all th set of error in soem exceptions and then use the same.
Handling each error individually in the source system would be difficult if these errors do not exisit in the source system at all. -
I get the following msg's. This happening more often, and when I back out to restart it may take a couple of times so that I do not get the error msg's?
Exc in ev handl: TypeError: oSAPlg.oRoot.log is not a function
Exc in ev handl: Error: Bad NPObject as private data!This issue can be caused by the McAfee Site Advisor extension
*https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes
Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
*Don't make any changes on the Safe mode start window.
*https://support.mozilla.com/kb/Safe+Mode -
it is happening more and more often when I start Firefox, and it takes up to four times of restarting to stop getting the error msg's.
this does not do any good if it is not reviewed by a staff Tech.
-
Very simple- the following error message appears when I open a new tab, either with a web page or blank:
Exc in ev handl: Error: Bad NPObject as private data!Please see solution in http://kb.mozillazine.org/Problematic_extensions
for "McAfee Site Advisor".
(Windows): For best results you should uninstall '''McAfee Site Advisor''' from Control Panel > add/change programs (Programs and Features). Reboot the system. Then Reinstall from http://www.siteadvisor.com/ and reboot the system. When installing refuse other suggested (crapware) applications.
<br><small>Please mark "Solved" one answer that will best help others with a similar problem -- hope this was it.</small> -
Error upon ResolveCallbackMessage class for Failed to handle dispatch msg
Hello,
I'm using Oracle BPEL Manager on Windows XP,
the version of Eclipse is 3.0.0, build id 200406111814,
and j2sdk1.4.2_04.
I have deployed from the Developer Prompt the Seller and the Buyer processes, and from the Oracle BPEL console started 3 instances for the Buyer with values for the CID and Order respectively: 1,1; 2,2; 3,3.
After several seconds, I had 3 instances for the Seller with state 'completed' and 3 instances for the Buyer with state 'running'.
At the same time, appeared 3 error messages on the Start BPEL Process Manager Console with the same content:
<ERROR> <default.collaxa.cube.engine.dispatch> <BaseScheduledWorker::process> Failed to handle dispatch message ... exception Message handle error.
An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.delivery.ResolveCallbackMessage"; the exception is: Transaction was rolled back: java.lang.ClassCastException; nested exception is: java.lang.ClassCastException
These processes use correltation defined and it seems the the Oracle BPEL Server does not recognize when there is more then 1 running instances and is received message, to which instances to apply it according to the correlation property.
Need help if there is something else to be configured this to work,
Thank you in advance,
Best RegardsHi,
I've tested the Seller and buyer Samples by reproducing the upper situation - several running instance of Buyer process,
and everything works fine - no errors.
But, the situation if I'm using a new created process leads to the same error.
Here what I'm doing:
Process test1: (async. oracle bpel process)
=============================================
The test1.bpel file is:
<!-- test1 BPEL Process [Generated by the Oracle BPEL Designer] -->
<process name="test1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:cor="http://acm.org/samples" targetNamespace="http://acm.org/samples" suppressJoinFailure="yes" xmlns:tns="http://acm.org/samples" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:bpelx="http://schemas.oracle.com/bpel/extension" xmlns:ora="http://schemas.oracle.com/xpath/extension">
<partnerLinks>
<partnerLink name="client" partnerLinkType="tns:test1" myRole="testProvider" partnerRole="testRequester"/>
</partnerLinks>
<variables>
<variable name="input" messageType="tns:Order1RequestMessage"/>
<variable name="output" messageType="tns:echoResponseMessage"/>
<variable name="DeliveryS" messageType="tns:DeliveryRequestMessage"/>
<variable name="result" type="xsd:string"/>
</variables>
<correlationSets>
<correlationSet name="id123" properties="tns:id123"/>
</correlationSets>
<sequence name="main">
<receive name="receiveInput" partnerLink="client" portType="tns:test1" operation="order123" variable="input" createInstance="yes">
<correlations>
<correlation set="id123" initiate="yes"/>
</correlations>
</receive>
<assign>
<copy>
<from variable="input" part="payload" query="//onInitate123/rumiBegin"/>
<to variable="result"/>
</copy>
</assign>
<receive name="getDelivery" partnerLink="client" portType="tns:test1" operation="dlv" variable="DeliveryS" createInstance="no">
<correlations>
<correlation set="id123" initiate="no"/>
</correlations>
</receive>
<assign>
<copy>
<from variable="DeliveryS" part="payload" query="//onDelivery123/rumiEnd"/>
<to variable="result"/>
</copy>
</assign>
<invoke name="callbackClient" partnerLink="client" portType="tns:testCallback" operation="onResult" inputVariable="output"/>
</sequence>
</process>
==============================================
The test1.wsdl file is:
<?xml version="1.0"?>
<definitions name="test1"
targetNamespace="http://acm.org/samples"
xmlns:tns="http://acm.org/samples"
xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
>
<types>
<schema attributeFormDefault="qualified"
elementFormDefault="qualified"
targetNamespace="http://acm.org/samples"
xmlns="http://www.w3.org/2001/XMLSchema"
>
<element name="onInitate123" type="tns:Order" />
<complexType name="Order">
<sequence>
<element name="rumiBegin" type="string" />
</sequence>
</complexType>
<element name="onDelivery123" type="tns:Delivery" />
<complexType name="Delivery">
<sequence>
<element name="rumiEnd" type="string" />
</sequence>
</complexType>
<element name="echoResponse">
<complexType>
<sequence>
<element name="result" type="string"/>
</sequence>
</complexType>
</element>
</schema>
</types>
<message name="Order1RequestMessage">
<part name="payload" element="tns:onInitate123"/>
</message>
<message name="Order1ResponseMessage">
<part name="payload" element="tns:echoResponse"/>
</message>
<message name="DeliveryRequestMessage">
<part name="payload" element="tns:onDelivery123"/>
</message>
<message name="DeliveryResponseMessage">
<part name="payload" element="tns:echoResponse"/>
</message>
<message name="echoResponseMessage">
<part name="payload" element="tns:echoResponse"/>
</message>
<portType name="test1">
<operation name="order123">
<input message="tns:Order1RequestMessage"/>
</operation>
<operation name="dlv">
<input message="tns:DeliveryRequestMessage"/>
</operation>
</portType>
<portType name="testCallback">
<operation name="onResult">
<input message="tns:echoResponseMessage"/>
</operation>
</portType>
<plnk:partnerLinkType name="test1">
<plnk:role name="testProvider">
<plnk:portType name="tns:test1"/>
</plnk:role>
<plnk:role name="testRequester">
<plnk:portType name="tns:testCallback"/>
</plnk:role>
</plnk:partnerLinkType>
<bpws:property name="id123" type="xsd:string"/>
<bpws:propertyAlias propertyName="tns:id123"
messageType="tns:Order1RequestMessage" part="payload"
query="/onInitate123/rumiBegin"/>
<bpws:propertyAlias propertyName="tns:id123"
messageType="tns:DeliveryRequestMessage" part="payload"
query="/onDelivery123/rumiEnd"/>
</definitions>
================================================
From a different SOAP Server I'm sending message for the operation 'order123' to the Oracle Server
using as endpoint location http://leon:9700/orabpel/default/test1
and the message looks like this:
(the value for the correlation is 101)
<SOAP:Envelope
SOAP:encodingType='http://schemas.xmlsoap.org/soap/encoding/'
SOAP:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ref="http://schemas.xmlsoap.org/ws/2002/04/reference/"
xmlns:dt='urn:schemas-microsoft-com:datatypes'><SOAP:Body>
<order123><onInitate123><rumiBegin>101</rumiBegin></onInitate123></order123></SOAP:Body>
</SOAP:Envelope>
As a result there is an instance with state running for the process test1 on the Oracle BPEL Console.
After this, I'm sending again from the same SOAP Server message for the operation 'dlv' like this:
(the value for the correlation is 101)
<SOAP:Envelope
SOAP:encodingType='http://schemas.xmlsoap.org/soap/encoding/'
SOAP:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ref="http://schemas.xmlsoap.org/ws/2002/04/reference/"
xmlns:dt='urn:schemas-microsoft-com:datatypes'><SOAP:Body>
<dlv><onDelivery123><rumiEnd>101</rumiEnd></onDelivery123></dlv></SOAP:Body></SOAP:Env
elope>
AS a result the instance created before continues to have state 'running' (which is supposed to be 'completed' as by using the same correlation value)
and the error is given on the Oracle BPEL Server Console:
<2004-08-24 14:56:02,200> <ERROR> <default.collaxa.cube.engine.dispatch> <BaseScheduledWorker::process>
Failed to handle dispatch message ... exception Message handle error.
An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.delivery.ResolveCallbackMessage";
the exception is: Transaction was rolled back: java.lang.ClassCastException; nested exception is: java.lang.ClassCastException -
JVM CRASH with the error msg An unexpected error has been detected by HotS
Iam using Jboss 4.2.2 for my application
the JVM is crashing with the following msg when i call a function in a DLL (JNI)
the error msg :
# An unexpected error has been detected by HotSpot Virtual Machine:
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d963733, pid=3356, tid=3544
# Java VM: Java HotSpot(TM) Server VM (1.5.0_07-b03 mixed mode)
# Problematic frame:
# V [jvm.dll+0x93733]
# An error report file with more information is saved as hs_err_pid3356.log
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
Press any key to continue . . .
and the log file generated:
# An unexpected error has been detected by HotSpot Virtual Machine:
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d963733, pid=3356, tid=3544
# Java VM: Java HotSpot(TM) Server VM (1.5.0_07-b03 mixed mode)
# Problematic frame:
# V [jvm.dll+0x93733]
--------------- T H R E A D ---------------
Current thread (0x00991488): VMThread [id=3544]
siginfo: ExceptionCode=0xc0000005, reading address 0x00000440
Registers:
EAX=0x00000440, EBX=0x48284758, ECX=0x2cbefa5c, EDX=0x6dbcd170
ESP=0x2cbef9c4, EBP=0x000001c4, ESI=0x3800d3a4, EDI=0x2cbefa5c
EIP=0x6d963733, EFLAGS=0x00010283
Top of Stack: (sp=0x2cbef9c4)
0x2cbef9c4: 2cbefa5c 3800d3a0 6d982aab 3800d3a4
0x2cbef9d4: 2cbefa5c 2cbefa5c 0092a538 0092a538
0x2cbef9e4: 009449d0 6db4ff25 2cbefa5c 0092a7d0
0x2cbef9f4: 6d995c41 2cbefa5c 0092a538 0092a7d0
0x2cbefa04: 00000000 0092a538 6d964252 00000000
0x2cbefa14: 00000001 00000000 00000001 2cbefaa8
0x2cbefa24: 2cbefa5c 0092a538 0092a580 2cbefbfc
0x2cbefa34: 00990b70 0003f758 08bdef90 6dbcd110
Instructions: (pc=0x6d963733)
0x6d963723: 24 08 57 8b f9 8b 06 85 c0 74 3e 3b 47 1c 73 39
0x6d963733: 8b 08 83 e1 03 80 f9 03 75 06 8b 00 24 fc eb 0a
Stack: [0x2bcf0000,0x2cbf0000), sp=0x2cbef9c4, free space=15358k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0x93733]
[error occurred during error reporting, step 120, id 0xc0000005]
VM_Operation (0x65dbee54): generation collection for allocation, mode: safepoint, requested by thread 0x496f2dd0
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x35f27498 JavaThread "AWT-Windows" daemon [_thread_in_native, id=3508]
0x3178fde8 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=748]
0x496f2dd0 JavaThread "http-0.0.0.0-8080-3" daemon [_thread_blocked, id=3044]
0x356c4008 JavaThread "IdleRemover" daemon [_thread_blocked, id=2832]
0x496bdae0 JavaThread "http-0.0.0.0-8080-2" daemon [_thread_blocked, id=2452]
0x31713dc0 JavaThread "http-0.0.0.0-8080-1" daemon [_thread_blocked, id=2740]
0x49538008 JavaThread "Thread-6" [_thread_blocked, id=752]
0x485d4008 JavaThread "ajp-0.0.0.0-8009-Acceptor-0" daemon [_thread_in_native, id=1548]
0x498b6dd0 JavaThread "http-0.0.0.0-8080-Acceptor-0" daemon [_thread_blocked, id=3892]
0x493eb008 JavaThread "JBossLifeThread" [_thread_blocked, id=3392]
0x3827f260 JavaThread "UILServerILService Accept Thread" [_thread_in_native, id=1900]
0x388c9758 JavaThread "TimeoutFactory-0" daemon [_thread_blocked, id=1996]
0x35a187b0 JavaThread "JCA PoolFiller" [_thread_blocked, id=2460]
0x4948c448 JavaThread "Timer-2" daemon [_thread_blocked, id=3816]
0x48712e80 JavaThread "HSQLDB Timer @9db0ad" daemon [_thread_blocked, id=2456]
0x35706d30 JavaThread "DefaultQuartzScheduler_QuartzSchedulerThread" [_thread_blocked, id=3088]
0x385ed548 JavaThread "DefaultQuartzScheduler_Worker-9" [_thread_blocked, id=2876]
0x38282e60 JavaThread "DefaultQuartzScheduler_Worker-8" [_thread_blocked, id=2916]
0x38282708 JavaThread "DefaultQuartzScheduler_Worker-7" [_thread_blocked, id=2172]
0x36061c68 JavaThread "DefaultQuartzScheduler_Worker-6" [_thread_blocked, id=2680]
0x31865dd8 JavaThread "DefaultQuartzScheduler_Worker-5" [_thread_blocked, id=3868]
0x483a8d48 JavaThread "DefaultQuartzScheduler_Worker-4" [_thread_blocked, id=3208]
0x483a8a90 JavaThread "DefaultQuartzScheduler_Worker-3" [_thread_blocked, id=4000]
0x355bcd90 JavaThread "DefaultQuartzScheduler_Worker-2" [_thread_blocked, id=1056]
0x48998d38 JavaThread "DefaultQuartzScheduler_Worker-1" [_thread_blocked, id=1712]
0x383e7d58 JavaThread "DefaultQuartzScheduler_Worker-0" [_thread_blocked, id=3752]
0x485e6ed0 JavaThread "WorkManager(2)-1" daemon [_thread_blocked, id=3448]
0x488a0008 JavaThread "Thread-7" daemon [_thread_blocked, id=3620]
0x38410008 JavaThread "JBossMQ Cache Reference Softner" daemon [_thread_blocked, id=928]
0x382d1bf0 JavaThread "ContainerBackgroundProcessor[StandardEngine[jboss.web]]" daemon [_thread_blocked, id=3116]
0x37fb6de0 JavaThread "SubscriptionWatchDog" [_thread_blocked, id=3512]
0x357e78c8 JavaThread "ServerSocketRefresh" daemon [_thread_blocked, id=1128]
0x381fb310 JavaThread "AcceptorThread#0:3873" [_thread_in_native, id=3096]
0x381e33b0 JavaThread "ServerSocketRefresh" daemon [_thread_blocked, id=1076]
0x318e5d90 JavaThread "AcceptorThread#0:4446" [_thread_in_native, id=2340]
0x35d15b80 JavaThread "PooledInvokerAcceptor#0-4445" [_thread_in_native, id=2332]
0x35fa1c98 JavaThread "RMI TCP Accept-4444" daemon [_thread_in_native, id=164]
0x35d15df0 JavaThread "Listener:2365" daemon [_thread_in_native, id=3408]
0x35d13dc8 JavaThread "Thread-5" daemon [_thread_blocked, id=1928]
0x35f35c60 JavaThread "Thread-4" daemon [_thread_blocked, id=4032]
0x35d66db0 JavaThread "Listener:2361" daemon [_thread_in_native, id=2168]
0x3828dd90 JavaThread "JBoss System Threads(1)-2" daemon [_thread_in_native, id=3052]
0x35da8ab0 JavaThread "GC Daemon" daemon [_thread_blocked, id=2028]
0x35d390c8 JavaThread "RMI Reaper" [_thread_blocked, id=488]
0x35cedaa8 JavaThread "Timer-1" daemon [_thread_blocked, id=2900]
0x35ced920 JavaThread "RMI TCP Accept-1098" daemon [_thread_in_native, id=3908]
0x35dd35a0 JavaThread "JBoss System Threads(1)-1" daemon [_thread_in_native, id=872]
0x35e42e48 JavaThread "ScannerThread" daemon [_thread_blocked, id=168]
0x31895da8 JavaThread "Timer-0" daemon [_thread_blocked, id=3324]
0x00037aa0 JavaThread "DestroyJavaVM" [_thread_blocked, id=1244]
0x316f0c48 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3904]
0x0099f900 JavaThread "CompilerThread1" daemon [_thread_blocked, id=228]
0x0099ea98 JavaThread "CompilerThread0" daemon [_thread_blocked, id=2696]
0x0099dbf0 JavaThread "AdapterThread" daemon [_thread_blocked, id=3360]
0x0099cf10 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=892]
0x00993968 JavaThread "Finalizer" daemon [_thread_blocked, id=2776]
0x00993620 JavaThread "Reference Handler" daemon [_thread_blocked, id=1348]
Other Threads:
=>0x00991488 VMThread [id=3544]
0x316f1f58 WatcherThread [id=3288]
VM state:at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
[0x00037158/0x0000071c] Threads_lock - owner thread: 0x00991488
[0x000372d8/0x000006e0] Heap_lock - owner thread: 0x496f2dd0
Heap
def new generation total 20736K, used 17960K [0x03a60000, 0x050e0000, 0x07340000)
eden space 18432K, 97% used [0x03a60000, 0x04be8eb0, 0x04c60000)
from space 2304K, 0% used [0x04ea0000, 0x04ea1350, 0x050e0000)
to space 2304K, 0% used [0x04c60000, 0x04c605b0, 0x04ea0000)
tenured generation total 183196K, used 125267K [0x07340000, 0x12627000, 0x23a60000)
the space 183196K, 68% used [0x07340000, 0x0ed94d90, 0x0ed94e00, 0x12627000)
compacting perm gen total 131072K, used 39965K [0x23a60000, 0x2ba60000, 0x2ba60000)
the space 131072K, 30% used [0x23a60000, 0x261677a8, 0x26167800, 0x2ba60000)
No shared spaces configured.
Dynamic libraries:
0x00400000 - 0x0040d000 F:\Java\jdk1.5.0_07\bin\java.exe
0x7c900000 - 0x7c9b0000 C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c8f5000 C:\WINDOWS\system32\kernel32.dll
0x77dd0000 - 0x77e6b000 C:\WINDOWS\system32\ADVAPI32.dll
0x77e70000 - 0x77f01000 C:\WINDOWS\system32\RPCRT4.dll
0x77c10000 - 0x77c68000 C:\WINDOWS\system32\MSVCRT.dll
0x6d8d0000 - 0x6dc85000 F:\Java\jdk1.5.0_07\jre\bin\server\jvm.dll
0x7e410000 - 0x7e4a0000 C:\WINDOWS\system32\USER32.dll
0x77f10000 - 0x77f57000 C:\WINDOWS\system32\GDI32.dll
0x76b40000 - 0x76b6d000 C:\WINDOWS\system32\WINMM.dll
0x76390000 - 0x763ad000 C:\WINDOWS\system32\IMM32.DLL
0x6d2f0000 - 0x6d2f8000 F:\Java\jdk1.5.0_07\jre\bin\hpi.dll
0x76bf0000 - 0x76bfb000 C:\WINDOWS\system32\PSAPI.DLL
0x6d700000 - 0x6d70c000 F:\Java\jdk1.5.0_07\jre\bin\verify.dll
0x6d370000 - 0x6d38d000 F:\Java\jdk1.5.0_07\jre\bin\java.dll
0x6d720000 - 0x6d72f000 F:\Java\jdk1.5.0_07\jre\bin\zip.dll
0x6d530000 - 0x6d543000 F:\Java\jdk1.5.0_07\jre\bin\net.dll
0x71ab0000 - 0x71ac7000 C:\WINDOWS\system32\WS2_32.dll
0x71aa0000 - 0x71aa8000 C:\WINDOWS\system32\WS2HELP.dll
0x71a50000 - 0x71a8f000 C:\WINDOWS\System32\mswsock.dll
0x76f20000 - 0x76f47000 C:\WINDOWS\system32\DNSAPI.dll
0x76fb0000 - 0x76fb8000 C:\WINDOWS\System32\winrnr.dll
0x76f60000 - 0x76f8c000 C:\WINDOWS\system32\WLDAP32.dll
0x76fc0000 - 0x76fc6000 C:\WINDOWS\system32\rasadhlp.dll
0x6d520000 - 0x6d528000 F:\Java\jdk1.5.0_07\jre\bin\management.dll
0x662b0000 - 0x66308000 C:\WINDOWS\system32\hnetcfg.dll
0x71a90000 - 0x71a98000 C:\WINDOWS\System32\wshtcpip.dll
0x39e60000 - 0x39e88000 C:\WINDOWS\system32\rsaenh.dll
0x769c0000 - 0x76a73000 C:\WINDOWS\system32\USERENV.dll
0x5b860000 - 0x5b8b4000 C:\WINDOWS\system32\netapi32.dll
0x6d550000 - 0x6d559000 F:\Java\jdk1.5.0_07\jre\bin\nio.dll
0x6d070000 - 0x6d1d7000 F:\Java\jdk1.5.0_07\jre\bin\awt.dll
0x73000000 - 0x73026000 C:\WINDOWS\system32\WINSPOOL.DRV
0x774e0000 - 0x7761d000 C:\WINDOWS\system32\ole32.dll
0x462a0000 - 0x462d8000 C:\WINDOWS\system32\uxtheme.dll
0x73760000 - 0x737a9000 C:\WINDOWS\system32\ddraw.dll
0x73bc0000 - 0x73bc6000 C:\WINDOWS\system32\DCIMAN32.dll
0x73940000 - 0x73a10000 C:\WINDOWS\system32\D3DIM700.DLL
0x6d2b0000 - 0x6d2ef000 F:\Java\jdk1.5.0_07\jre\bin\fontmanager.dll
0x74720000 - 0x7476b000 C:\WINDOWS\system32\MSCTF.dll
0x755c0000 - 0x755ee000 C:\WINDOWS\system32\msctfime.ime
0x6d430000 - 0x6d44f000 F:\Java\jdk1.5.0_07\jre\bin\jpeg.dll
0x47290000 - 0x472a3000 F:\jboss-4.2.2.GA\bin\locateprintsdll.dll
0x73dd0000 - 0x73ece000 C:\WINDOWS\system32\MFC42.DLL
0x472b0000 - 0x472bd000 C:\WINDOWS\system32\MFC42LOC.DLL
VM Arguments:
jvm_args: -Dprogram.name=run.bat -Dreports.configDir=F:/jboss-4.2.2.GA/server/default/conf/ -XX:PermSize=128m -Xms128m -Xmx512m -Xss15m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.endorsed.dirs=F:\jboss-4.2.2.GA\lib\endorsed
java_command: org.jboss.Main -b 0.0.0.0
Launcher Type: SUN_STANDARD
Environment Variables:
JAVA_HOME=F:\Java\jdk1.5.0_07
CLASSPATH=F:\Tomcat 5.5\webapps\IWS\WEB-INF\lib\servlet-api.jar;.
PATH=D:\oracle\ora92\bin;C:\Program Files\PC Connectivity Solution\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI.ACE\;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\PROGRA~1\CA\SHARED~1\SCANEN~1;C:\PROGRA~1\CA\ETRUST~1;C:\Program Files\Rational\common;F:\Java\jdk1.5.0_07\bin;F:\Java\jre1.5.0_07\bin;F:\jboss-4.2.2.GA\DLLs;
USERNAME=Arun
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 15 Model 6 Stepping 5, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows XP Build 2600 Service Pack 2
CPU:total 2 family 15, cmov, cx8, fxsr, mmx, sse, sse2, ht
Memory: 4k page, physical 1013660k(193696k free), swap 2444544k(642724k free)
vm_info: Java HotSpot(TM) Server VM (1.5.0_07-b03) for windows-x86, built on May 3 2006 00:45:13 by "java_re" with MS VC++ 6.0
pls help me ...
thanks in advanceIam using Jboss 4.2.2 for my application
the JVM is crashing with the following msg when i call a function in a DLL (JNI)
the error msg :
# An unexpected error has been detected by HotSpot Virtual Machine:
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d963733, pid=3356, tid=3544
# Java VM: Java HotSpot(TM) Server VM (1.5.0_07-b03 mixed mode)
# Problematic frame:
# V [jvm.dll+0x93733]
# An error report file with more information is saved as hs_err_pid3356.log
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
Press any key to continue . . .
and the log file generated:
# An unexpected error has been detected by HotSpot Virtual Machine:
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d963733, pid=3356, tid=3544
# Java VM: Java HotSpot(TM) Server VM (1.5.0_07-b03 mixed mode)
# Problematic frame:
# V [jvm.dll+0x93733]
--------------- T H R E A D ---------------
Current thread (0x00991488): VMThread [id=3544]
siginfo: ExceptionCode=0xc0000005, reading address 0x00000440
Registers:
EAX=0x00000440, EBX=0x48284758, ECX=0x2cbefa5c, EDX=0x6dbcd170
ESP=0x2cbef9c4, EBP=0x000001c4, ESI=0x3800d3a4, EDI=0x2cbefa5c
EIP=0x6d963733, EFLAGS=0x00010283
Top of Stack: (sp=0x2cbef9c4)
0x2cbef9c4: 2cbefa5c 3800d3a0 6d982aab 3800d3a4
0x2cbef9d4: 2cbefa5c 2cbefa5c 0092a538 0092a538
0x2cbef9e4: 009449d0 6db4ff25 2cbefa5c 0092a7d0
0x2cbef9f4: 6d995c41 2cbefa5c 0092a538 0092a7d0
0x2cbefa04: 00000000 0092a538 6d964252 00000000
0x2cbefa14: 00000001 00000000 00000001 2cbefaa8
0x2cbefa24: 2cbefa5c 0092a538 0092a580 2cbefbfc
0x2cbefa34: 00990b70 0003f758 08bdef90 6dbcd110
Instructions: (pc=0x6d963733)
0x6d963723: 24 08 57 8b f9 8b 06 85 c0 74 3e 3b 47 1c 73 39
0x6d963733: 8b 08 83 e1 03 80 f9 03 75 06 8b 00 24 fc eb 0a
Stack: [0x2bcf0000,0x2cbf0000), sp=0x2cbef9c4, free space=15358k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0x93733]
[error occurred during error reporting, step 120, id 0xc0000005]
VM_Operation (0x65dbee54): generation collection for allocation, mode: safepoint, requested by thread 0x496f2dd0
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x35f27498 JavaThread "AWT-Windows" daemon [_thread_in_native, id=3508]
0x3178fde8 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=748]
0x496f2dd0 JavaThread "http-0.0.0.0-8080-3" daemon [_thread_blocked, id=3044]
0x356c4008 JavaThread "IdleRemover" daemon [_thread_blocked, id=2832]
0x496bdae0 JavaThread "http-0.0.0.0-8080-2" daemon [_thread_blocked, id=2452]
0x31713dc0 JavaThread "http-0.0.0.0-8080-1" daemon [_thread_blocked, id=2740]
0x49538008 JavaThread "Thread-6" [_thread_blocked, id=752]
0x485d4008 JavaThread "ajp-0.0.0.0-8009-Acceptor-0" daemon [_thread_in_native, id=1548]
0x498b6dd0 JavaThread "http-0.0.0.0-8080-Acceptor-0" daemon [_thread_blocked, id=3892]
0x493eb008 JavaThread "JBossLifeThread" [_thread_blocked, id=3392]
0x3827f260 JavaThread "UILServerILService Accept Thread" [_thread_in_native, id=1900]
0x388c9758 JavaThread "TimeoutFactory-0" daemon [_thread_blocked, id=1996]
0x35a187b0 JavaThread "JCA PoolFiller" [_thread_blocked, id=2460]
0x4948c448 JavaThread "Timer-2" daemon [_thread_blocked, id=3816]
0x48712e80 JavaThread "HSQLDB Timer @9db0ad" daemon [_thread_blocked, id=2456]
0x35706d30 JavaThread "DefaultQuartzScheduler_QuartzSchedulerThread" [_thread_blocked, id=3088]
0x385ed548 JavaThread "DefaultQuartzScheduler_Worker-9" [_thread_blocked, id=2876]
0x38282e60 JavaThread "DefaultQuartzScheduler_Worker-8" [_thread_blocked, id=2916]
0x38282708 JavaThread "DefaultQuartzScheduler_Worker-7" [_thread_blocked, id=2172]
0x36061c68 JavaThread "DefaultQuartzScheduler_Worker-6" [_thread_blocked, id=2680]
0x31865dd8 JavaThread "DefaultQuartzScheduler_Worker-5" [_thread_blocked, id=3868]
0x483a8d48 JavaThread "DefaultQuartzScheduler_Worker-4" [_thread_blocked, id=3208]
0x483a8a90 JavaThread "DefaultQuartzScheduler_Worker-3" [_thread_blocked, id=4000]
0x355bcd90 JavaThread "DefaultQuartzScheduler_Worker-2" [_thread_blocked, id=1056]
0x48998d38 JavaThread "DefaultQuartzScheduler_Worker-1" [_thread_blocked, id=1712]
0x383e7d58 JavaThread "DefaultQuartzScheduler_Worker-0" [_thread_blocked, id=3752]
0x485e6ed0 JavaThread "WorkManager(2)-1" daemon [_thread_blocked, id=3448]
0x488a0008 JavaThread "Thread-7" daemon [_thread_blocked, id=3620]
0x38410008 JavaThread "JBossMQ Cache Reference Softner" daemon [_thread_blocked, id=928]
0x382d1bf0 JavaThread "ContainerBackgroundProcessor[StandardEngine[jboss.web]]" daemon [_thread_blocked, id=3116]
0x37fb6de0 JavaThread "SubscriptionWatchDog" [_thread_blocked, id=3512]
0x357e78c8 JavaThread "ServerSocketRefresh" daemon [_thread_blocked, id=1128]
0x381fb310 JavaThread "AcceptorThread#0:3873" [_thread_in_native, id=3096]
0x381e33b0 JavaThread "ServerSocketRefresh" daemon [_thread_blocked, id=1076]
0x318e5d90 JavaThread "AcceptorThread#0:4446" [_thread_in_native, id=2340]
0x35d15b80 JavaThread "PooledInvokerAcceptor#0-4445" [_thread_in_native, id=2332]
0x35fa1c98 JavaThread "RMI TCP Accept-4444" daemon [_thread_in_native, id=164]
0x35d15df0 JavaThread "Listener:2365" daemon [_thread_in_native, id=3408]
0x35d13dc8 JavaThread "Thread-5" daemon [_thread_blocked, id=1928]
0x35f35c60 JavaThread "Thread-4" daemon [_thread_blocked, id=4032]
0x35d66db0 JavaThread "Listener:2361" daemon [_thread_in_native, id=2168]
0x3828dd90 JavaThread "JBoss System Threads(1)-2" daemon [_thread_in_native, id=3052]
0x35da8ab0 JavaThread "GC Daemon" daemon [_thread_blocked, id=2028]
0x35d390c8 JavaThread "RMI Reaper" [_thread_blocked, id=488]
0x35cedaa8 JavaThread "Timer-1" daemon [_thread_blocked, id=2900]
0x35ced920 JavaThread "RMI TCP Accept-1098" daemon [_thread_in_native, id=3908]
0x35dd35a0 JavaThread "JBoss System Threads(1)-1" daemon [_thread_in_native, id=872]
0x35e42e48 JavaThread "ScannerThread" daemon [_thread_blocked, id=168]
0x31895da8 JavaThread "Timer-0" daemon [_thread_blocked, id=3324]
0x00037aa0 JavaThread "DestroyJavaVM" [_thread_blocked, id=1244]
0x316f0c48 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3904]
0x0099f900 JavaThread "CompilerThread1" daemon [_thread_blocked, id=228]
0x0099ea98 JavaThread "CompilerThread0" daemon [_thread_blocked, id=2696]
0x0099dbf0 JavaThread "AdapterThread" daemon [_thread_blocked, id=3360]
0x0099cf10 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=892]
0x00993968 JavaThread "Finalizer" daemon [_thread_blocked, id=2776]
0x00993620 JavaThread "Reference Handler" daemon [_thread_blocked, id=1348]
Other Threads:
=>0x00991488 VMThread [id=3544]
0x316f1f58 WatcherThread [id=3288]
VM state:at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
[0x00037158/0x0000071c] Threads_lock - owner thread: 0x00991488
[0x000372d8/0x000006e0] Heap_lock - owner thread: 0x496f2dd0
Heap
def new generation total 20736K, used 17960K [0x03a60000, 0x050e0000, 0x07340000)
eden space 18432K, 97% used [0x03a60000, 0x04be8eb0, 0x04c60000)
from space 2304K, 0% used [0x04ea0000, 0x04ea1350, 0x050e0000)
to space 2304K, 0% used [0x04c60000, 0x04c605b0, 0x04ea0000)
tenured generation total 183196K, used 125267K [0x07340000, 0x12627000, 0x23a60000)
the space 183196K, 68% used [0x07340000, 0x0ed94d90, 0x0ed94e00, 0x12627000)
compacting perm gen total 131072K, used 39965K [0x23a60000, 0x2ba60000, 0x2ba60000)
the space 131072K, 30% used [0x23a60000, 0x261677a8, 0x26167800, 0x2ba60000)
No shared spaces configured.
Dynamic libraries:
0x00400000 - 0x0040d000 F:\Java\jdk1.5.0_07\bin\java.exe
0x7c900000 - 0x7c9b0000 C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c8f5000 C:\WINDOWS\system32\kernel32.dll
0x77dd0000 - 0x77e6b000 C:\WINDOWS\system32\ADVAPI32.dll
0x77e70000 - 0x77f01000 C:\WINDOWS\system32\RPCRT4.dll
0x77c10000 - 0x77c68000 C:\WINDOWS\system32\MSVCRT.dll
0x6d8d0000 - 0x6dc85000 F:\Java\jdk1.5.0_07\jre\bin\server\jvm.dll
0x7e410000 - 0x7e4a0000 C:\WINDOWS\system32\USER32.dll
0x77f10000 - 0x77f57000 C:\WINDOWS\system32\GDI32.dll
0x76b40000 - 0x76b6d000 C:\WINDOWS\system32\WINMM.dll
0x76390000 - 0x763ad000 C:\WINDOWS\system32\IMM32.DLL
0x6d2f0000 - 0x6d2f8000 F:\Java\jdk1.5.0_07\jre\bin\hpi.dll
0x76bf0000 - 0x76bfb000 C:\WINDOWS\system32\PSAPI.DLL
0x6d700000 - 0x6d70c000 F:\Java\jdk1.5.0_07\jre\bin\verify.dll
0x6d370000 - 0x6d38d000 F:\Java\jdk1.5.0_07\jre\bin\java.dll
0x6d720000 - 0x6d72f000 F:\Java\jdk1.5.0_07\jre\bin\zip.dll
0x6d530000 - 0x6d543000 F:\Java\jdk1.5.0_07\jre\bin\net.dll
0x71ab0000 - 0x71ac7000 C:\WINDOWS\system32\WS2_32.dll
0x71aa0000 - 0x71aa8000 C:\WINDOWS\system32\WS2HELP.dll
0x71a50000 - 0x71a8f000 C:\WINDOWS\System32\mswsock.dll
0x76f20000 - 0x76f47000 C:\WINDOWS\system32\DNSAPI.dll
0x76fb0000 - 0x76fb8000 C:\WINDOWS\System32\winrnr.dll
0x76f60000 - 0x76f8c000 C:\WINDOWS\system32\WLDAP32.dll
0x76fc0000 - 0x76fc6000 C:\WINDOWS\system32\rasadhlp.dll
0x6d520000 - 0x6d528000 F:\Java\jdk1.5.0_07\jre\bin\management.dll
0x662b0000 - 0x66308000 C:\WINDOWS\system32\hnetcfg.dll
0x71a90000 - 0x71a98000 C:\WINDOWS\System32\wshtcpip.dll
0x39e60000 - 0x39e88000 C:\WINDOWS\system32\rsaenh.dll
0x769c0000 - 0x76a73000 C:\WINDOWS\system32\USERENV.dll
0x5b860000 - 0x5b8b4000 C:\WINDOWS\system32\netapi32.dll
0x6d550000 - 0x6d559000 F:\Java\jdk1.5.0_07\jre\bin\nio.dll
0x6d070000 - 0x6d1d7000 F:\Java\jdk1.5.0_07\jre\bin\awt.dll
0x73000000 - 0x73026000 C:\WINDOWS\system32\WINSPOOL.DRV
0x774e0000 - 0x7761d000 C:\WINDOWS\system32\ole32.dll
0x462a0000 - 0x462d8000 C:\WINDOWS\system32\uxtheme.dll
0x73760000 - 0x737a9000 C:\WINDOWS\system32\ddraw.dll
0x73bc0000 - 0x73bc6000 C:\WINDOWS\system32\DCIMAN32.dll
0x73940000 - 0x73a10000 C:\WINDOWS\system32\D3DIM700.DLL
0x6d2b0000 - 0x6d2ef000 F:\Java\jdk1.5.0_07\jre\bin\fontmanager.dll
0x74720000 - 0x7476b000 C:\WINDOWS\system32\MSCTF.dll
0x755c0000 - 0x755ee000 C:\WINDOWS\system32\msctfime.ime
0x6d430000 - 0x6d44f000 F:\Java\jdk1.5.0_07\jre\bin\jpeg.dll
0x47290000 - 0x472a3000 F:\jboss-4.2.2.GA\bin\locateprintsdll.dll
0x73dd0000 - 0x73ece000 C:\WINDOWS\system32\MFC42.DLL
0x472b0000 - 0x472bd000 C:\WINDOWS\system32\MFC42LOC.DLL
VM Arguments:
jvm_args: -Dprogram.name=run.bat -Dreports.configDir=F:/jboss-4.2.2.GA/server/default/conf/ -XX:PermSize=128m -Xms128m -Xmx512m -Xss15m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.endorsed.dirs=F:\jboss-4.2.2.GA\lib\endorsed
java_command: org.jboss.Main -b 0.0.0.0
Launcher Type: SUN_STANDARD
Environment Variables:
JAVA_HOME=F:\Java\jdk1.5.0_07
CLASSPATH=F:\Tomcat 5.5\webapps\IWS\WEB-INF\lib\servlet-api.jar;.
PATH=D:\oracle\ora92\bin;C:\Program Files\PC Connectivity Solution\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI.ACE\;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\PROGRA~1\CA\SHARED~1\SCANEN~1;C:\PROGRA~1\CA\ETRUST~1;C:\Program Files\Rational\common;F:\Java\jdk1.5.0_07\bin;F:\Java\jre1.5.0_07\bin;F:\jboss-4.2.2.GA\DLLs;
USERNAME=Arun
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 15 Model 6 Stepping 5, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows XP Build 2600 Service Pack 2
CPU:total 2 family 15, cmov, cx8, fxsr, mmx, sse, sse2, ht
Memory: 4k page, physical 1013660k(193696k free), swap 2444544k(642724k free)
vm_info: Java HotSpot(TM) Server VM (1.5.0_07-b03) for windows-x86, built on May 3 2006 00:45:13 by "java_re" with MS VC++ 6.0
pls help me ...
thanks in advance -
Error msg pointing to nonexistent var (WARNING: LONG POST)
I'm sorry to have to post my entire program, but I keep getting an error msg that points to a variable that is NOWHERE in my code. The var is called PwChar. It's mentioned in the error msg, but is nowhere in my code. This is even after saving and recompiling it THREE TIMES. Please, someone, tell me where this error appears in my code, if you even can. Your help will be greatly appreciated. Here is the error msg:
C:\jdk1.2.1\bin>javac PwGenerator.java
PwGenerator.java:228: Incompatible type for =. Can't convert java.lang.Character
to char.
pwChar = new Character((char) (newAsciiRange));
^
PwGenerator.java:234: Incompatible type for =. Can't convert java.lang.Character
to char.
pwChar = new Character((char) (newAsciiRange[0]));
^
2 errors
Now here is my code (sorry for the length):
// My Javafied Password Generator
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
public class PwGenerator extends JApplet
private String pw;
private JPanel centerPanel, northPanel, southPanel;
private JComboBox numchars;
private JCheckBox lettersUpper, lettersLower, numbers, specialChars;
private JButton generate, reset;
private JTextField textfield;
private int asciiRange[], newAsciiRange[];
private String pwLength[] = {"6", "7", "8", "9", "10", "11", "12"};
private int lengthSelected;
private JLabel pwLabel, numCharLabel;
private boolean wantSpecialchars, wantNumbers, wantUppercase, wantLowercase;
public void init()
// instantiate widgets
asciiRange = new int[94];
numCharLabel = new JLabel("Number of characters for password");
numchars = new JComboBox(pwLength);
lettersUpper = new JCheckBox("Uppercase letters");
lettersLower = new JCheckBox("Lowercase letters");
numbers = new JCheckBox("Numbers");
specialChars = new JCheckBox("Special characters");
generate = new JButton("Generate password");
reset = new JButton("Clear");
textfield = new JTextField(12);
pwLabel = new JLabel("Your new password is: ");
// add widgets to the content pane
Container c = getContentPane();
c.setLayout(new BorderLayout());
centerPanel = new JPanel();
centerPanel.setLayout(new GridLayout(3, 2));
centerPanel.add(lettersUpper);
centerPanel.add(lettersLower);
centerPanel.add(numbers);
centerPanel.add(specialChars);
centerPanel.add(generate);
centerPanel.add(reset);
c.add(centerPanel, BorderLayout.CENTER);
northPanel = new JPanel();
northPanel.setLayout(new FlowLayout());
northPanel.add(numCharLabel);
northPanel.add(numchars);
c.add(northPanel, BorderLayout.NORTH);
southPanel = new JPanel();
southPanel.setLayout(new FlowLayout());
southPanel.add(pwLabel);
southPanel.add(textfield);
c.add(southPanel, BorderLayout.SOUTH);
} // end init
public void start()
// connect event handlers to the widgets
numchars.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e)
lengthSelected = Integer.parseInt(pwLength[numchars.getSelectedIndex()]);
CheckBoxHandler handler = new CheckBoxHandler();
lettersUpper.addItemListener(handler);
lettersLower.addItemListener(handler);
numbers.addItemListener(handler);
specialChars.addItemListener(handler);
generate.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
setAsciiRange();
trimAsciiRange();
reset.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
textfield.setText("");
} // end start
public void setAsciiRange()
int numRange[] = new int[10];
int uppercaseRange[] = new int[26];
int lowercaseRange[] = new int[26];
int specialcharRange[] = new int[32];
System.out.println("Welcome to setAsciiRange!");
if (!wantSpecialchars && !wantNumbers && !wantUppercase && !wantLowercase)
JOptionPane.showMessageDialog(this, "You must make a selection", "Error", JOptionPane.ERROR_MESSAGE);
if (wantNumbers)
for (int i=0, j=48; i<numRange.length; i++, j++)
numRange[i] = j;
System.out.println("Number " + i + " is " + j +"\n");
} // end for
} // end if
if (wantUppercase)
for (int i=0, j=65; i<uppercaseRange.length; i++, j++)
uppercaseRange[i] = j;
System.out.println("Uppercase letter " + i + " is " + j + "\n");
} // end for
} // end if
if (wantLowercase)
for (int i=0, j=97; i<lowercaseRange.length; i++, j++)
lowercaseRange[i] = j;
System.out.println("Lowercase letter " + i + " is " + j + "\n");
} // end for
} // end if
if (wantSpecialchars)
for (int i=0, j=33; i<15; i++, j++)
specialcharRange[i] = j;
System.out.println("Special char " + i + " is " + j + "\n");
for (int i=15, j=58; i<22; i++, j++)
specialcharRange[i] = j;
System.out.println("Special char " + i + " is " + j + "\n");
for (int i=22, j=91; i<28; i++, j++)
specialcharRange[i] = j;
System.out.println("Special char " + i + " is " + j + "\n");
for (int i=28, j=123; i<specialcharRange.length; i++, j++)
specialcharRange[i] = j;
System.out.println("Special char " + i + " is " + j + "\n");
} // end if
if (numRange != null)
System.arraycopy(numRange, 0, asciiRange, 0, numRange.length);
if (uppercaseRange != null)
System.arraycopy(uppercaseRange, 0, asciiRange, firstEmptyElement(), uppercaseRange.length);
if (lowercaseRange != null)
System.arraycopy(lowercaseRange, 0, asciiRange, firstEmptyElement(), lowercaseRange.length);
if (specialcharRange != null)
System.arraycopy(specialcharRange, 0, asciiRange, firstEmptyElement(), specialcharRange.length);
for (int i=0; i<asciiRange.length; i++)
System.out.println(asciiRange[i]);
private int firstEmptyElement()
int i;
for (i=0; i<asciiRange.length; i++)
if (asciiRange[i] == 0)
break;
return i;
private void trimAsciiRange()
newAsciiRange = new int[firstEmptyElement()];
for (int i=0; i<newAsciiRange.length; i++)
newAsciiRange[i] = asciiRange[i];
System.out.println("newAsciiRange element " + i + " is " + newAsciiRange[i]);
public void generatePw (int selectedLength)
int randomNum;
char pwChar;
pw = "";
for (int i=0; i<=lengthSelected; i++)
randomNum = 1 + (int) (Math.random() * newAsciiRange.length);
try {
pwChar = new Character((char) (newAsciiRange[i]));
pw += pwChar;
System.out.print(pwChar + " ");
catch(ArrayIndexOutOfBoundsException e) {
System.out.print("Setting out-of-bounds index to 0");
pwChar = new Character((char) (newAsciiRange[0]));
pw += pwChar;
System.out.print(pwChar + " ");
System.out.println(pw);
textfield.setText(pw);
private class CheckBoxHandler implements ItemListener
public void itemStateChanged(ItemEvent e)
if (e.getSource() == specialChars)
if (e.getStateChange() == ItemEvent.SELECTED)
wantSpecialchars = true;
else
wantSpecialchars = false;
} // end outer if
if (e.getSource() == numbers)
if (e.getStateChange() == ItemEvent.SELECTED)
wantNumbers = true;
} // end if
else
wantNumbers = false;
} // end else
} // end if
if (e.getSource() == lettersUpper)
if (e.getStateChange() == ItemEvent.SELECTED)
wantUppercase = true;
else
wantUppercase = false;
} // end if
if (e.getSource() == lettersLower)
if (e.getStateChange() == ItemEvent.SELECTED)
wantLowercase = true;
else
wantLowercase = false;
} // end ifI'm sorry to have to post my entire program, Ok - but next time please use code tags (even though it makes it easier this time, it makes it so much easier to read)
but I
keep getting an error msg that points to a variable
that is NOWHERE in my code. Does your editor have a "find" function? In Notepad it's CTL-F
The var is called
PwChar. no, it's called pwChar
It's mentioned in the error msg, but is
nowhere in my code. This is even after saving and
recompiling it THREE TIMES. Please, someone, tell me
where this error appears in my code, if you even can.
Your help will be greatly appreciated. Here is the
e error msg:
C:\jdk1.2.1\bin>javac PwGenerator.java
PwGenerator.java:228: Incompatible type for =. Can't
convert java.lang.Character
to char.
pwChar = new Character((char)
r((char) (newAsciiRange));
^
PwGenerator.java:234: Incompatible type for =. Can't
convert java.lang.Character
to char.
pwChar = new Character((char)
r((char) (newAsciiRange[0]));
^
2 errors
Now here is my code (sorry for the length):
// My Javafied Password Generator
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
public class PwGenerator extends JApplet
private String pw;
private JPanel centerPanel, northPanel,
l, southPanel;
private JComboBox numchars;
private JCheckBox lettersUpper, lettersLower,
r, numbers, specialChars;
private JButton generate, reset;
private JTextField textfield;
private int asciiRange[], newAsciiRange[];
private String pwLength[] = {"6", "7", "8", "9",
", "10", "11", "12"};
private int lengthSelected;
private JLabel pwLabel, numCharLabel;
private boolean wantSpecialchars, wantNumbers,
s, wantUppercase, wantLowercase;
public void init()
// instantiate widgets
asciiRange = new int[94];
numCharLabel = new JLabel("Number of characters
ters for password");
numchars = new JComboBox(pwLength);
lettersUpper = new JCheckBox("Uppercase
case letters");
lettersLower = new JCheckBox("Lowercase
case letters");
numbers = new JCheckBox("Numbers");
specialChars = new JCheckBox("Special
cial characters");
generate = new JButton("Generate password");
reset = new JButton("Clear");
textfield = new JTextField(12);
pwLabel = new JLabel("Your new password is: ");
// add widgets to the content pane
Container c = getContentPane();
c.setLayout(new BorderLayout());
centerPanel = new JPanel();
centerPanel.setLayout(new GridLayout(3, 2));
centerPanel.add(lettersUpper);
centerPanel.add(lettersLower);
centerPanel.add(numbers);
centerPanel.add(specialChars);
centerPanel.add(generate);
centerPanel.add(reset);
c.add(centerPanel, BorderLayout.CENTER);
northPanel = new JPanel();
northPanel.setLayout(new FlowLayout());
northPanel.add(numCharLabel);
northPanel.add(numchars);
c.add(northPanel, BorderLayout.NORTH);
southPanel = new JPanel();
southPanel.setLayout(new FlowLayout());
southPanel.add(pwLabel);
southPanel.add(textfield);
c.add(southPanel, BorderLayout.SOUTH);
} // end init
public void start()
// connect event handlers to the widgets
numchars.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e)
lengthSelected =
d =
Integer.parseInt(pwLength[numchars.getSelectedIndex()]
CheckBoxHandler handler = new CheckBoxHandler();
lettersUpper.addItemListener(handler);
lettersLower.addItemListener(handler);
numbers.addItemListener(handler);
specialChars.addItemListener(handler);
generate.addActionListener(new ActionListener()
er() {
public void actionPerformed(ActionEvent e)
setAsciiRange();
trimAsciiRange();
reset.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
textfield.setText("");
} // end start
public void setAsciiRange()
int numRange[] = new int[10];
int uppercaseRange[] = new int[26];
int lowercaseRange[] = new int[26];
int specialcharRange[] = new int[32];
System.out.println("Welcome to setAsciiRange!");
if (!wantSpecialchars && !wantNumbers &&
s && !wantUppercase && !wantLowercase)
JOptionPane.showMessageDialog(this, "You must
u must make a selection", "Error",
JOptionPane.ERROR_MESSAGE);
if (wantNumbers)
for (int i=0, j=48; i<numRange.length; i++,
; i++, j++)
numRange[i] = j;
System.out.println("Number " + i + " is " + j
is " + j +"\n");
} // end for
} // end if
if (wantUppercase)
for (int i=0, j=65; i<uppercaseRange.length;
ength; i++, j++)
uppercaseRange[i] = j;
System.out.println("Uppercase letter " + i + " is "
" + j + "\n");
} // end for
} // end if
if (wantLowercase)
for (int i=0, j=97; i<lowercaseRange.length;
ength; i++, j++)
lowercaseRange[i] = j;
System.out.println("Lowercase letter " + i +
" + i + " is " + j + "\n");
} // end for
} // end if
if (wantSpecialchars)
for (int i=0, j=33; i<15; i++, j++)
specialcharRange[i] = j;
System.out.println("Special char " + i + " is " + j
j + "\n");
for (int i=15, j=58; i<22; i++, j++)
specialcharRange[i] = j;
System.out.println("Special char " + i + " is
i + " is " + j + "\n");
for (int i=22, j=91; i<28; i++, j++)
specialcharRange[i] = j;
System.out.println("Special char " + i + " is " + j
j + "\n");
for (int i=28, j=123;
j=123; i<specialcharRange.length; i++, j++)
specialcharRange[i] = j;
System.out.println("Special char " + i + " is " + j
j + "\n");
} // end if
if (numRange != null)
System.arraycopy(numRange, 0, asciiRange, 0,
ge, 0, numRange.length);
if (uppercaseRange != null)
System.arraycopy(uppercaseRange, 0, asciiRange,
Range, firstEmptyElement(), uppercaseRange.length);
if (lowercaseRange != null)
System.arraycopy(lowercaseRange, 0, asciiRange,
Range, firstEmptyElement(), lowercaseRange.length);
if (specialcharRange != null)
System.arraycopy(specialcharRange, 0,
ge, 0, asciiRange, firstEmptyElement(),
specialcharRange.length);
for (int i=0; i<asciiRange.length; i++)
System.out.println(asciiRange[i]);
private int firstEmptyElement()
int i;
for (i=0; i<asciiRange.length; i++)
if (asciiRange[i] == 0)
break;
return i;
private void trimAsciiRange()
newAsciiRange = new int[firstEmptyElement()];
for (int i=0; i<newAsciiRange.length; i++)
newAsciiRange[i] = asciiRange[i];
System.out.println("newAsciiRange element " + i
" + i + " is " + newAsciiRange[i]);
public void generatePw (int selectedLength)
int randomNum;
char pwChar;
pw = "";
for (int i=0; i<=lengthSelected; i++)
randomNum = 1 + (int) (Math.random() *
om() * newAsciiRange.length);
try {
pwChar = new Character((char) (newAsciiRange));
[b]pw += pwChar;
System.out.print(pwChar + " ");
catch(ArrayIndexOutOfBoundsException e) {
System.out.print("Setting out-of-bounds index to
o 0");
pwChar = new Character((char) (newAsciiRange[0]));
pw += pwChar;
System.out.print(pwChar + " ");
System.out.println(pw);
textfield.setText(pw);
private class CheckBoxHandler implements
ts ItemListener
public void itemStateChanged(ItemEvent e)
if (e.getSource() == specialChars)
if (e.getStateChange() == ItemEvent.SELECTED)
wantSpecialchars = true;
else
wantSpecialchars = false;
} // end outer if
if (e.getSource() == numbers)
if (e.getStateChange() == ItemEvent.SELECTED)
wantNumbers = true;
} // end if
else
wantNumbers = false;
} // end else
} // end if
if (e.getSource() == lettersUpper)
if (e.getStateChange() == ItemEvent.SELECTED)
wantUppercase = true;
else
wantUppercase = false;
} // end if
if (e.getSource() == lettersLower)
if (e.getStateChange() == ItemEvent.SELECTED)
wantLowercase = true;
else
wantLowercase = false;
} // end if -
I´m trying to open an excel file in numbers not being successful. The error msg is unexpectedly error using plugin SFCompatibility can you help me? Already changed the extension of the excel document to xlsx an now gives an unknown import error.
In Excel have you tried saving directly to xls (not xlsx) and opening the xls in Numbers?
If you have a complicated workbook in Excel that uses lots of Excel's advanced features, Numbers may not be able to handle the import. It does pretty well on basic things, though.
If you're just trying to get data into Numbers, then often copy-paste from Excel is easier than trying to open xls files.
SG -
1102w gives print error msg, but prints
I had an hp p1102w for quite some time and it perfectly fits our needs on our home wifi network. One of the features I use on a regular basis is printing double sided. About two months ago I started to get an error message "HP P1102 could not print (document name)", but the document printed just fine. I didn't really worry about it until I tried to print double sided. Now the printer prints the even numbered sides, but I never get message to turn the paper and press continue. The printer and computer just sit there looking at each other and nothing happens. If I press the 'X' button the error message immediately pops up on the computer and the rest of the job is lost on the printer. I downloaded and installed the HP drivers, the HP printer doctor software, searched the forum for suggestions, tried a few suggestions that sounded vaguely like my problem, turned the firewall off and back on, and finally concluded that the printer was bad. So I bought another one. I get the same problem, tried the same remedies, and still am getting the error msg.
My conclusion is that there is a communication problem between the two devices that has probably been caused by some windows update at some point. Anybody got any bright ideas?
Peace,
V
This question was solved.
View Solution.Hi vneathery ,
Thanks for letting me know you were able to print two-sided by opening and closing the lid. But still the issue exists.
Most likely to resolve this issue, we would have to rip everything out for the printer in the registry and do a fresh install to fix this problem.
I can send you that information in a private message and you can decide whether to continue with more steps.
In the forum beside your handle name just click on the envelope to view it.
You can always restore your computer back to a earlier time when everything was working properly, but you mentioned this issue started 2 months ago. How to refresh, reset, or restore your PC on Windows 8.
How is the printer connected?
Thank You.
Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
Gemini02
I work on behalf of HP -
FacesContext can't display error msg !
Hi guys,
I got this problem. For this function:
public User saveUser(User user) throws DBException {
try {
User newUser = this.userDao.saveUser(user);
return newUser;
} catch (DataIntegrityViolationException di) {
String msg = "duplicate user id";
this.logger.error(msg, de);
throw new DuplicateUserIdException(msg);
=======================================
then the below function is to execute when user click the submit button
public String submitAction() {.....
catch (DuplicateUserIdException de) {
String msg = "Username already exists";
this.logger.info(msg);
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage( FacesMessage.SEVERITY_INFO, msg, msg));
return QueryResults.RETRY;
========================================
public class DuplicateUserIdException extends DBException {
private String username;
public DuplicateUserIdException(String newUsername) {
super("Username " + newUsername + " already exist");
this.username = newUsername;
public String getUsername() {
return this.username;
====================================
So when I click on the submit button after entering a duplicate username, it will just go back to the same page and no error message display. Username is a primary key and email address is set to UNIQUE in MySQL DB. I read the log file and indeed all the error messages can be catched. The registration.jsp page is like:
<h:inputText value="#{userBean.username}" id="username" required="true">
<f:validateLength maximum="20" minimum="5"/>
</h:inputText>
<h:message for="username"/>
but I got my login page also the same h:inputText as above.
I am using JSF + Spring + Hibernate.
I hv tried to fix it a few time but failed !
Appreciate any help here.K> then the below function is to execute when user click
K> the submit button
K>
K> public String submitAction() {.....
K>
K> catch (DuplicateUserIdException de) {
K> String msg = "Username already exists";
K> this.logger.info(msg);
K> FacesContext.getCurrentInstance().addMessage(null,
K> l, new FacesMessage( FacesMessage.SEVERITY_INFO,
K> msg, msg));
K> return QueryResults.RETRY;
K> }
K> }
K> So when I click on the submit button after entering a
K> duplicate username, it will just go back to the same
K> page and no error message display. Username is a
K> primary key and email address is set to UNIQUE in
K> MySQL DB. I read the log file and indeed all the
K> error messages can be catched. The registration.jsp
K> page is like:
K>
K> <h:inputText value="#{userBean.username}"
K> id="username" required="true">
K> <f:validateLength maximum="20" minimum="5"/>
K> </h:inputText>
K> <h:message for="username"/>
K>
K> but I got my login page also the same h:inputText as
K> above.
K>
K> I am using JSF + Spring + Hibernate.
K>
K> I hv tried to fix it a few time but failed !
K> Appreciate any help here.
Ok, we have to keep in mind the request processing lifecycle here. Your
submitAction() method is called after conversion and validation have
already occurred. Therefore, you can never queue an error from an
action handler. Here's why.
When your submitAction() is called, you queue a message into the faces
context. Whatever you return from submitAction(), it's ultimately going
to cause a requestDispatcher.forward() or
httpServletRespones.sendRedirect(). Both of these cause a new
FacesContext instance to be created, obliterating your carefully queued
message.
The best practice I've seen used is to handle the validation as close to
the component in which the validation error occured as possible. I
recommend creating a custom validator method binding, that does the
trick. This is really easy to do. Just add a method to your bean:
public void validate(FacesContext context,
UIComponent component,
Object value) throws ValidatorException {
// queue the message here, make sure to call component.setValid(false)
Then, in your inputText, you say:
<h:inputText value="#{userBean.username}" validator="#{userBean.validate}
id="username" required="true">
<f:validateLength maximum="20" minimum="5"/>
</h:inputText>
And you're done.
Ed (JSR-252 Spec co-lead) -
Hi all,
when i use the user exit - QQ00014 and send error msg,when i click Enter i got the msg IM258 - Object does not exist. and get out of the trans.
Does anybody handle with this problem?
Tks.
Davidhi,
try to use these exits for IW21.
Transaction Code - IW21 Create PM Notification - General
Enhancement/ Business Add-in Description
Enhancement
IWOC0004 Change single-level list editing PM/QM/SM ALV settings
IWOC0003 PM/SM authorization check of ref. object and planner group
IWOC0002 PM/SM notification: Check whether status change is allowed
IWOC0001 Create PM/SM notification: Determine reference object
IWO10027 User exit: Generate user-defined settlement rule
IWO10026 User check on setting status 'Do not perform'
Business Add-in
IQS0_STATUS_MAINTAIN Control of Changeability of User Status
IWO1_SUBSCREEN_0170 Display Additional Data on Object Screen 0170 PhysicalSample
IWOC_LIST_TUNING Performance Tuning for Lists in PM/CS
IWOC_OBJECTINFO_CHNG Changes to Data of Object Info Screen
WOC_FL_DETERMINE Determine Date for Determining Installation Loc. Equi.
NOTIF_AUTHORITY_01 Additional Authorization Checks for the Notification -
Hi, if tr r 100 records to be updated, if 3, 52 and 99 records are failed ,what happens in case of session and calltransaction method, how we can correct the errors in both cases and what happens they will update remaining fields or not.
hi,
if you use session u can check unprocessed records using SM35 tcode.In sm35 after processing the session you can check error log for unprocessed records depending up on the error message we can modify that particular record.
In the call transaction method we have to explicitly catch errors using BDCMSGCOLL and FORMAT_messages.
just check the below coding.
Handling errors in calltransaction using XK01 tcode.
REPORT ZSR_BDC_CT_ERROR1.
TABLES : RF02K,LFA1.
DATA: BEGIN OF ITAB OCCURS 0,
LIFNR LIKE RF02K-LIFNR,
KTOKK LIKE RF02K-KTOKK,
NAME1 LIKE LFA1-NAME1,
SORTL LIKE LFA1-SORTL,
LAND1 LIKE LFA1-LAND1,
SPRAS LIKE LFA1-SPRAS,
END OF ITAB.
DATA : BDCTAB LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
BDCMSG LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
INCLUDE BDCRECX1.
START-OF-SELECTION.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'z:\flatfiles\sr1.txt'
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB = ITAB
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*perform open_group.
LOOP AT ITAB.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0100'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RF02K-KTOKK'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'RF02K-LIFNR'
ITAB-LIFNR.
PERFORM BDC_FIELD USING 'RF02K-KTOKK'
ITAB-KTOKK.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0110'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'LFA1-SPRAS'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'LFA1-NAME1'
ITAB-NAME1.
PERFORM BDC_FIELD USING 'LFA1-SORTL'
ITAB-SORTL.
PERFORM BDC_FIELD USING 'LFA1-LAND1'
ITAB-LAND1.
PERFORM BDC_FIELD USING 'LFA1-SPRAS'
ITAB-SPRAS.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0120'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'LFA1-KUNNR'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0130'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'LFBK-BANKS(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=ENTR'.
PERFORM BDC_DYNPRO USING 'SAPLSPO1' '0300'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=YES'.
PERFORM BDC_TRANSACTION USING 'XK01'.
IF SY-SUBRC <> 0.
*LOOP AT bdcmsg.
*WRITE: bdcmsg-DYNAME,
bdcmsg-DYNUMB,
bdcmsg-MSGTYP,
bdcmsg-MSGSPRA,
bdcmsg-MSGID,
bdcmsg-MSGNR,
bdcmsg-MSGV1,
bdcmsg-MSGV2,
bdcmsg-MSGV3,
bdcmsg-MSGV4.
*ENDLOOP.
READ TABLE BDCMSG WITH KEY MSGTYP = 'E'.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = BDCMSG-MSGID
LANG = SY-LANGU
NO = BDCMSG-MSGNR
V1 = BDCMSG-MSGV1
V2 = BDCMSG-MSGV2
V3 = BDCMSG-MSGV3
V4 = BDCMSG-MSGV4
IMPORTING
MSG = BDCMSG-MSGV1
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
WRITE : / BDCMSG-MSGV1.
ENDIF.
ENDLOOP.
*perform close_group. -
Hi,
How to handle errors in bdc call transaction method.
what is the steps to download errors from bdcmsgcoll into flat file in call transaction method
udayHi friend,
Here is a beautiful example which explains how to trap erroreneous records ..if help full then please give me max reward point.
REPORT zgopi_report
NO STANDARD PAGE HEADING
LINE-SIZE 255
MESSAGE-ID ZRASH.
Internal Table Declarations *
*--Internal Table for Data Uploading.
DATA : BEGIN OF IT_FFCUST OCCURS 0,
KUNNR(10),
BUKRS(4),
KTOKD(4),
ANRED(15),
NAME1(35),
SORTL(10),
STRAS(35),
ORT01(35),
PSTLZ(10),
LAND1(3),
SPRAS(2),
AKONT(10),
END OF IT_FFCUST.
*--Internal Table to Store Error Records.
DATA : BEGIN OF IT_ERRCUST OCCURS 0,
KUNNR(10),
EMSG(255),
END OF IT_ERRCUST.
*--Internal Table to Store Successful Records.
DATA : BEGIN OF IT_SUCCUST OCCURS 0,
KUNNR(10),
SMSG(255),
END OF IT_SUCCUST.
*--Internal Table for Storing the BDC data.
DATA : IT_CUSTBDC LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
*--Internal Table for storing the messages.
DATA : IT_CUSTMSG LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
DATA : V_FLAG1(1) VALUE ' ',
"Flag used for opening session.
V_TLINES LIKE SY-TABIX,
"For storing total records processed.
V_ELINES LIKE SY-TABIX,
"For storing the no of error records.
V_SLINES LIKE SY-TABIX.
"For storing the no of success records.
Selection screen *
SELECTION-SCREEN BEGIN OF BLOCK B1.
PARAMETERS : V_FNAME LIKE RLGRAP-FILENAME,
V_SESNAM LIKE RLGRAP-FILENAME.
SELECTION-SCREEN END OF BLOCK B1.
Start-of-selection *
START-OF-SELECTION.
*-- Form to upload flatfile data into the internal table.
PERFORM FORM_UPLOADFF.
TOP-OF-PAGE *
TOP-OF-PAGE.
WRITE:/ 'Details of the error and success records for the transaction'
ULINE.
SKIP.
End of Selection *
END-OF-SELECTION.
*-- Form to Generate a BDC from the Uploaded Internal table
PERFORM FORM_BDCGENERATE.
*--To write the totals and the session name.
PERFORM FORM_WRITEOP.
*& Form form_uploadff
Form to upload flatfile data into the internal table.
FORM FORM_UPLOADFF .
*--Variable to change the type of the parameter file name.
DATA : LV_FILE TYPE STRING.
LV_FILE = V_FNAME.
*--Function to upload the flat file to the internal table.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = LV_FILE
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB = IT_FFCUST
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF SY-SUBRC = 0.
*--Deleting the headings from the internal table.
DELETE IT_FFCUST INDEX 1.
*--Getting the total number of records uploaded.
DESCRIBE TABLE IT_FFCUST LINES V_TLINES.
ENDIF.
ENDFORM. " form_uploadff
*& Form Form_bdcgenerate
Form to Generate a BDC from the Uploaded Internal table
FORM FORM_BDCGENERATE .
*--Generating the BDC table for the fields of the internal table.
LOOP AT IT_FFCUST.
PERFORM POPULATEBDC USING :
'X' 'SAPMF02D' '0105',
' ' 'BDC_OKCODE' '/00' ,
' ' 'RF02D-KUNNR' IT_FFCUST-KUNNR,
' ' 'RF02D-BUKRS' IT_FFCUST-BUKRS,
' ' 'RF02D-KTOKD' IT_FFCUST-KTOKD,
'X' 'SAPMF02D' '0110' ,
' ' 'BDC_OKCODE' '/00',
' ' 'KNA1-ANRED' IT_FFCUST-ANRED,
' ' 'KNA1-NAME1' IT_FFCUST-NAME1,
' ' 'KNA1-SORTL' IT_FFCUST-SORTL,
' ' 'KNA1-STRAS' IT_FFCUST-STRAS,
' ' 'KNA1-ORT01' IT_FFCUST-ORT01,
' ' 'KNA1-PSTLZ' IT_FFCUST-PSTLZ,
' ' 'KNA1-LAND1' IT_FFCUST-LAND1,
' ' 'KNA1-SPRAS' IT_FFCUST-SPRAS,
'X' 'SAPMFO2D' '0120',
' ' 'BDC_OKCODE' '/00',
'X' 'SAPMF02D' '0125',
' ' 'BDC_OKCODE' '/00',
'X' 'SAPMF02D' '0130',
' ' 'BDC_OKCODE' '=ENTR',
'X' 'SAPMF02D' '0340',
' ' 'BDC_OKCODE' '=ENTR',
'X' 'SAPMF02D' '0360',
' ' 'BDC_OKCODE' '=ENTR',
'X' 'SAPMF02D' '0210',
' ' 'KNB1-AKONT' IT_FFCUST-AKONT,
' ' 'BDC_OKCODE' '/00',
'X' 'SAPMF02D' '0215',
' ' 'BDC_OKCODE' '/00',
'X' 'SAPMF02D' '0220',
' ' 'BDC_OKCODE' '/00',
'X' 'SAPMF02D' '0230',
' ' 'BDC_OKCODE' '=UPDA'.
*--Calling the transaction 'fd01'.
CALL TRANSACTION 'FD01' USING IT_CUSTBDC MODE 'N' UPDATE 'S'
MESSAGES INTO IT_CUSTMSG.
IF SY-SUBRC <> 0.
*--Populating the error records internal table.
IT_ERRCUST-KUNNR = IT_FFCUST-KUNNR.
APPEND IT_ERRCUST.
CLEAR IT_ERRCUST.
*--Opening a session if there is an error record.
IF V_FLAG1 = ' '.
PERFORM FORM_OPENSESSION.
V_FLAG1 = 'X'.
ENDIF.
*--Inserting the error records into already open session.
IF V_FLAG1 = 'X'.
PERFORM FORM_INSERT.
ENDIF.
*--Populating the Success records internal table.
ELSE.
IT_SUCCUST-KUNNR = IT_FFCUST-KUNNR.
APPEND IT_SUCCUST.
CLEAR IT_SUCCUST.
ENDIF.
*--Displaying the messages.
IF NOT IT_CUSTMSG[] IS INITIAL.
PERFORM FORM_FORMATMSG.
ENDIF.
*--Clearing the message and bdc tables.
CLEAR : IT_CUSTBDC[],IT_CUSTMSG[].
ENDLOOP.
*--Getting the total no of error records.
DESCRIBE TABLE IT_ERRCUST LINES V_ELINES.
*--Getting the total no of successful records.
DESCRIBE TABLE IT_SUCCUST LINES V_SLINES.
*--Closing the session only if it is open.
IF V_FLAG1 = 'X'.
PERFORM FORM_CLOSESESS.
ENDIF.
ENDFORM. " Form_bdcgenerate
*& Form populatebdc
FOrm to Populate the BDC table.
FORM POPULATEBDC USING VALUE(P_0178)
VALUE(P_0179)
VALUE(P_0180).
IF P_0178 = 'X'.
IT_CUSTBDC-PROGRAM = P_0179.
IT_CUSTBDC-DYNPRO = P_0180.
IT_CUSTBDC-DYNBEGIN = 'X'.
ELSE.
IT_CUSTBDC-FNAM = P_0179.
IT_CUSTBDC-FVAL = P_0180.
ENDIF.
APPEND IT_CUSTBDC.
CLEAR IT_CUSTBDC.
ENDFORM. " populatebdc
*& Form FORM_OPENSESSION
Form to Open a session.
FORM FORM_OPENSESSION .
*--Variable to convert the given session name into reqd type.
DATA : LV_SESNAM(12).
LV_SESNAM = V_SESNAM.
*--Opening a session.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = LV_SESNAM
HOLDDATE = '20040805'
KEEP = 'X'
USER = SY-UNAME
PROG = SY-CPROG
IMPORTING
QID =
EXCEPTIONS
CLIENT_INVALID = 1
DESTINATION_INVALID = 2
GROUP_INVALID = 3
GROUP_IS_LOCKED = 4
HOLDDATE_INVALID = 5
INTERNAL_ERROR = 6
QUEUE_ERROR = 7
RUNNING = 8
SYSTEM_LOCK_ERROR = 9
USER_INVALID = 10
OTHERS = 11
IF SY-SUBRC <> 0.
WRITE :/ 'Session not open'.
ENDIF.
ENDFORM. " FORM_OPENSESSION
*& Form FORM_INSERT
fORM TO INSERT ERROR RECOED INTO A SESSION.
FORM FORM_INSERT .
*--Inserting the record into session.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'FD01'
POST_LOCAL = NOVBLOCAL
PRINTING = NOPRINT
SIMUBATCH = ' '
CTUPARAMS = ' '
TABLES
DYNPROTAB = IT_CUSTBDC
EXCEPTIONS
INTERNAL_ERROR = 1
NOT_OPEN = 2
QUEUE_ERROR = 3
TCODE_INVALID = 4
PRINTING_INVALID = 5
POSTING_INVALID = 6
OTHERS = 7
IF SY-SUBRC <> 0.
WRITE :/ 'Unable to insert the record'.
ENDIF.
ENDFORM. " FORM_INSERT
*& Form FORM_CLOSESESS
Form to Close the Open Session.
FORM FORM_CLOSESESS .
CALL FUNCTION 'BDC_CLOSE_GROUP'
EXCEPTIONS
NOT_OPEN = 1
QUEUE_ERROR = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
ENDIF.
ENDFORM. " FORM_CLOSESESS
*& Form FORM_FORMATMSG
Form to format messages.
FORM FORM_FORMATMSG .
*--Var to store the formatted msg.
DATA : LV_MSG(255).
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = SY-MSGID
LANG = SY-LANGU
NO = SY-MSGNO
V1 = SY-MSGV1
V2 = SY-MSGV2
V3 = SY-MSGV3
V4 = SY-MSGV4
IMPORTING
MSG = LV_MSG
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC = 0.
WRITE :/ LV_MSG.
ENDIF.
ULINE.
ENDFORM. " FORM_FORMATMSG
*& Form form_writeop
To write the totals and the session name.
FORM FORM_WRITEOP .
WRITE :/ 'Total Records Uploaded :',V_TLINES,
/ 'No of Error Records :',V_ELINES,
/ 'No of Success Records :',V_SLINES,
/ 'Name of the Session :',V_SESNAM.
ULINE.
ENDFORM. " form_writeop -
Photoshop CS2 (program error msg)... Help please!!
I have installed the full creative suite 2 on my new iMac. everything works fine except photoshop?!!?
Illustrator works great, In-Design works great, But when i try to open a file or create a new page in PS it tells me "Could not create document because of a program error"???? ***?
I had a previous version of CS and it worked fine for one day, then that started happening. I installed the CS2 trial version, and it would still give me the same error msg. I erased everything and installed the new CS2 (photoshop, illustrator , in-design and acrobat). It still gives me the same darn msg.???
Any help would be greatly appreciated!
thanksSee the Adobe Knowledge Base document"Error 'Could not complete your request...' or 'Could not create a new document...' (Photoshop CS2 on Mac OS X v10.4)"
I suggest whenever you have problems with third-party applications, the first place to start troubleshooting is with the application's documentation, then vendor's web site. Usually their sites have FAQs, lists of known bugs, or application-specific forums similar to these Discussions. Sometimes, unlike the Apple Discussions, the questions are even answered by employees of the vendor.
The document cited above was found in 10 seconds by searching the Adobe support site.
Good luck!
Dr. Smoke
Author: Troubleshooting Mac® OS X
Maybe you are looking for
-
How i can transport request created in R3AR2 from Quality to Production ?
Hi, Gurus ! I'm new in CRM 7.0, and need your help. Well, we made our implementation in 7.0 version, and the things will be fine, until the start of work..... Well, the initial download of CUSTOMER_MAIN (in transaction R3AR2) do'n't run OK, because a
-
Upload Directory Configuration Problem in jdev 10.1.3.2 adfbc
I am configuring a file upload utiltity. By default my files are created in /tmp directory i.e on c:\tmp folder. I intend to change this behaviour as i want this to be uplaoded into a drive other than c:\ When we define the upload directory i have sp
-
I feel like I am feeling with microsoft again
After 10 years of happily using a mac, they release LIon, this unbelievably Windows like failure. I am trying to save a file from my mail account, it opens up in acrobat, i go to file save as, then choose my destination folder which is documents/muta
-
Hi, I have defined couple text in the sale order header. Now i want to display it in the form, which table should i look for?? Any FM/BAPI available?? Regards, Kit
-
100% of CPU is taken by oracle service
Dear all, i have the followin specifications; oracle database enterprise edition 10g windows server 2003. 2 ghz processor 2gb RAM shared server configuration 41 user connected. my problem is this , oracle service has taken 100% of my CPU. why? how co