Error in cast to MULTIPART
Hi, I test the follow Jguru tutorial code for getting atacchements
Multipart multipart = (Multipart)message.getContent();
for (int i=0, n=multipart.getCount(); i<n; i++) {
Part part = multipart.getBodyPart(i));
String disposition = part.getDisposition();
if ((disposition != null) &&
((disposition.equals(Part.ATTACHMENT) ||
(disposition.equals(Part.INLINE))) {
saveFile(part.getFileName(), part.getInputStream());
But i have a problem of cast in this line
Multipart mp = (Multipart)message.getContent();
the error of CastClass is:
java.lang.String cannot be cast to javax.mail.Multipart
why????? Please help me
Thanks
Most likely you don't have a multipart message. See the msgshow.java
demo program that comes with JavaMail.
Similar Messages
-
Error during saving a multipart message
Hi All,
We are currently integrating third party system with SAP ECC as a part of our FICA implementation.
We have configured soap adapter initially at the sender side and IDoc adapter at the reciever intially. After looking at the performnace of the soap adapter, we thought of using HTTP sender instead of a soap sender, so that the webservice makes a direct call to PI integration engine instead of Adapter engine.
Now my scenario looks like.
Java/J2EE client -> webservice call > XI pipeline>SAP.
So here , i havent used http adapter at the source side.
My problem is when i call the XI pipleine url as suggested by the below blog
<a href="/people/stefan.grube/blog/2006/09/21/using-the-soap-inbound-channel-of-the-integration-engine Soap Inbound channel of the Integration engine</a>
I am getting the follwoing error as seen below
<b>May 31, 2007 6:05:50 PM com.sun.xml.messaging.saaj.soap.MessageImpl saveChanges
</b>
<b>SEVERE: SAAJ0540: Error during saving a multipart message</b>
But for my scenario, i havent used any soap with attachments to pass through PI.
My soap message is a simple soap envelope with soap part-message.(body).
Please do help me out in resolving this issue.
Thanks & Regards,
Dhana
nullHi Steve,
My Soap Action is already applied and I traced out few options after googling it up and added few jars (xalan.jar and saxon8.jar). Even now I am getting the same error.
Please do tell me what to do in this regard.
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Header>
</SOAP:Header>
<SOAP:Body>
<SOAP:Fault xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>SOAP:Client</faultcode><faultstring>Error during conversion of XI message</faultstring><faultactor>http://sap.com/xi/XI/Message/30</faultactor><detail><SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1"><SAP:Category>XIProtocol</SAP:Category><SAP:Code area="PARSER">UNEXPECTED_VALUE</SAP:Code><SAP:P1>Main/@versionMajor</SAP:P1><SAP:P2>000</SAP:P2><SAP:P3>003</SAP:P3><SAP:P4/><SAP:AdditionalText/><SAP:ApplicationFaultMessage namespace=""/><SAP:Stack>XML tag Main/@versionMajor has incorrect value 000; expected value is 003
</SAP:Stack></SAP:Error></detail></SOAP:Fault>
</SOAP:Body>
</SOAP:Envelope>
Soap Error message:Error during conversion of XI message
Thanks,
Dhana -
these are few lines from my long STORED PROCEDURE actually i am new to oracle 11g please
declare
v_s nvarchar2(10);
p_RN nvarchar2(10);
begin
v_s := v_s || cast(p_RN as nvarchar2(10)); - ERROR IS COMING IN THIS LINE
end;
error
ORA-06550: line 5, column 39:
PLS-00103: Encountered the symbol "(" when expecting one of the following:
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
please somebody help meJust a little explanation about the error message.
ORA-06550: line 5, column 39:
PLS-00103: Encountered the symbol "(" when expecting one of the following:
Line 5 column 39 is the starting parenthesis of the "(10)". For using cast you can't add a lenght to the datatype.
If you change that, then you get a different error message:
declare
v_s nvarchar2(10);
p_RN varchar2(10);
begin
v_s := v_s || cast(p_RN as nvarchar2); -- ERROR IS COMING IN THIS LINE
end;
Fehler beim Start in Zeile 13 in Befehl:
declare
v_s nvarchar2(10);
p_RN varchar2(10);
begin
v_s := v_s || cast(p_RN as nvarchar2); -- ERROR IS COMING IN THIS LINE
end;
Fehlerbericht:
ORA-06550: line 5, column 22:
PLS-00382: expression is of wrong type
ORA-06550: line 5, column 3:
PL/SQL: Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:ORA-06550: line 5, column 22:
PLS-00382: expression is of wrong type
This shows that you can't convert/cast a nvarchzar type into another nvarchar type.
It would work if you cast a number into a varchar2 type for example
declare
v_s nvarchar2(10);
p_RN number(10);
begin
v_s := v_s || cast(p_RN as nvarchar2); -- ERROR IS COMING IN THIS LINE
end;
anonymer Block abgeschlossen. -
Error in cast multiset in collections
DECLARE
TYPE emp_dept_rec IS RECORD (
v_sal emp.sal%TYPE,
v_name emp.ename%TYPE,
v_deptname dept.DEPTNAME%type
TYPE emp_dept_tab_type IS TABLE OF emp_dept_rec;
l_emp_dept_tab emp_dept_tab_type;
type emp_tab is table of emp%rowtype;
type l_emp_tab is table of emp%rowtype;
type dept_tab is table of dept%rowtype;
type l_dept_tab is table of dept%rowtype;
cursor e1 is
select * from emp;
cursor d1 is select * from dept;
begin
OPEN e1;
FETCH e1
BULK COLLECT INTO l_emp_tab;
open d1;
FETCH d1
BULK COLLECT INTO l_dept_tab;
select cast(multiset (select em.sal,em,ename ,dep.DEPTNAME
from table(l_emp_tab) em,table(l_dept_tab) dep
where em.deptno=dep.deptno)
as emp_dept_tab_type)
into l_emp_dept_tab ;
end;
it is giving error as
ORA-06550: line 43, column 25:
PL/SQL: ORA-00923: FROM keyword not found where expected
ORA-06550: line 39, column 5:
PL/SQL: SQL Statement ignoredHere is an example.
SQL> CREATE OR REPLACE TYPE emp_rec IS OBJECT (
2 v_sal NUMBER(7,2),
3 v_name VARCHAR2(35),
4 v_empno NUMBER(4),
5 v_deptno NUMBER(2)
6 )
7 ;
8 /
Type created.
SQL> CREATE OR REPLACE TYPE emp_tab IS TABLE OF emp_rec;
2 /
Type created.
SQL> CREATE OR REPLACE TYPE dept_rec IS OBJECT (
2 v_deptno NUMBER,
3 v_dname VARCHAR2(50)
4 )
5 ;
6 /
Type created.
SQL> CREATE OR REPLACE TYPE dept_tab IS TABLE OF dept_rec;
2 /
Type created.
SQL> CREATE OR REPLACE TYPE emp_dept_rec IS
2 OBJECT (
3 v_sal NUMBER,
4 v_name VARCHAR2(35),
5 v_deptname VARCHAR2(30)
6 );
7 /
Type created.
SQL> CREATE OR REPLACE TYPE emp_dept_tab_type IS TABLE OF emp_dept_rec;
2 /
Type created.
SQL> set serverout on
SQL> DECLARE
2 l_emp_dept_tab emp_dept_tab_type; --emp_dept_tab_type declared in database
3 l_emp_tab emp_tab; --emp_tab declared in database
4 l_dept_tab dept_tab; --dept_tab declared in database
5
6 CURSOR e1 IS
7 SELECT emp_rec(sal, ename, empno, deptno) FROM emp; --Note the type casting here
8
9 CURSOR d1 IS
10 SELECT dept_rec(deptno, dname) FROM dept; --Note the type casting here
11 BEGIN
12 OPEN e1;
13
14 FETCH e1 BULK COLLECT
15 INTO l_emp_tab;
16
17 OPEN d1;
18
19 FETCH d1 BULK COLLECT
20 INTO l_dept_tab;
21
22 SELECT CAST(MULTISET (SELECT em.v_sal, em.v_name, dep.v_dname
23 FROM TABLE(l_emp_tab) em, TABLE(l_dept_tab) dep
24 WHERE em.v_deptno = dep.v_deptno) AS emp_dept_tab_type)
25 INTO l_emp_dept_tab
26 FROM DUAL;
27 FOR i IN 1 .. l_emp_dept_tab.COUNT LOOP
28 dbms_output.put_line(l_emp_dept_tab(i)
29 .v_sal || '--' || l_emp_dept_tab(i)
30 .v_name || '--' || l_emp_dept_tab(i).v_deptname);
31 END LOOP;
32
33 END;
34 /
1300--MILLER--ACCOUNTING
5000--KING--ACCOUNTING
2450--CLARK--ACCOUNTING
3000--FORD--RESEARCH
1100--ADAMS--RESEARCH
3000--SCOTT--RESEARCH
2975--JONES--RESEARCH
800--SMITH--RESEARCH
950--JAMES--SALES
1500--TURNER--SALES
2850--BLAKE--SALES
1250--MARTIN--SALES
1250--WARD--SALES
1600--ALLEN--SALES
PL/SQL procedure successfully completed.It is just for educational purpose, because the thing you have achieved by so much programming can be done easily by simple join in the table itself.
user10447332 Newbie
Handle: user10447332
Status Level: Newbie
Registered: Oct 20, 2008
Total Posts: 227
Total Questions: 153 (152 unresolved) >
What a record! and most of the time you don't care to follow/revisit the thread also!. -
Hi there,
We were using the spring multipart for the purpose of uploading a file into our application running on Oracle Weblogic Server 10.3.2 using spring framework.
It was working fine until we upgraded our server to the version 10.3.6
After the upgrade, we started getting the below error while we try to submit the form after selecting the file to be uploaded.
2013-11-20 06:11:29,923 ERROR||[[ACTIVE] ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)']||[email protected]||org.springframework.web.portlet.DispatcherPortlet||Could not complete request
javax.portlet.PortletException: Error occured during request processing: javax/portlet/ActionRequest
at org.springframework.web.portlet.DispatcherPortlet.doActionService(DispatcherPortlet.java:668)[org.springframework.web.portlet-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.web.portlet.FrameworkPortlet.processRequest(FrameworkPortlet.java:519)[org.springframework.web.portlet-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.web.portlet.FrameworkPortlet.processAction(FrameworkPortlet.java:460)[org.springframework.web.portlet-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at com.bea.portlet.container.PortletStub.doAction(PortletStub.java:901)[portlet-container.jar:10.3.6 ]
at com.bea.portlet.container.FilterChainGenerator.runFilterChain(FilterChainGenerator.java:96)[portlet-container.jar:10.3.6 ]
at com.bea.portlet.container.PortletStub.processAction(PortletStub.java:314)[portlet-container.jar:10.3.6 ]
at com.bea.portlet.container.AppContainer.invokeProcessAction(AppContainer.java:679)[portlet-container.jar:10.3.6 ]
at com.bea.netuix.servlets.controls.content.JavaPortletContent.fireProcessAction(JavaPortletContent.java:209)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.servlets.controls.portlet.JavaPortlet.fireProcessAction(JavaPortlet.java:1299)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.servlets.controls.portlet.JavaPortlet.raiseChangeEvents(JavaPortlet.java:805)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.nf.ControlLifecycle$4.postVisitRoot(ControlLifecycle.java:316)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:341)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:130)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:399)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.nf.Lifecycle.runInbound(Lifecycle.java:184)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:159)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:465)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:291)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:219)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:275)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.servlets.manager.PortalServlet.service(PortalServlet.java:731)[netuix_servlet-full.jar:10.3.6 ]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)[javax.servlet_1.0.0.0_2-5.jar:2.5]
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)[weblogic.jar:10.3.6.0]
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)[weblogic.jar:10.3.6.0]
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)[weblogic.jar:10.3.6.0]
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)[weblogic.jar:10.3.6.0]
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)[weblogic.jar:10.3.6.0]
at com.bea.content.manager.servlets.ContentServletFilter.doFilter(ContentServletFilter.java:178)[content_servlet.jar:10.3.6 ]
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)[weblogic.jar:10.3.6.0]
at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:336)[p13n_ejb.jar:10.3.6 ]
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)[weblogic.jar:10.3.6.0]
at com.rogers.business.servlet.filter.GenericContentFilter.doFilter(GenericContentFilter.java:50)[GenericContentFilter.class:]
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)[weblogic.jar:10.3.6.0]
at com.rogers.business.servlet.filter.SessionExpiryFilter.doFilter(SessionExpiryFilter.java:82)[SessionExpiryFilter.class:]
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)[weblogic.jar:10.3.6.0]
at com.rogers.business.servlet.filter.ServletExceptionFilter.doFilter(ServletExceptionFilter.java:54)[ServletExceptionFilter.class:]
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)[weblogic.jar:10.3.6.0]
at com.rogers.business.servlet.seo.SEOUrlFilter.doFilter(SEOUrlFilter.java:87)[SEOUrlFilter.class:]
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)[weblogic.jar:10.3.6.0]
at com.rogers.business.servlet.filter.BusinessContextDetectionFilter.doFilter(BusinessContextDetectionFilter.java:75)[BusinessContextDetectionFilter.class:]
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)[weblogic.jar:10.3.6.0]
at com.rogers.business.servlet.filter.LanguageProvinceSelectionFilter.doFilter(LanguageProvinceSelectionFilter.java:160)[LanguageProvinceSelectionFilter.class:]
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)[weblogic.jar:10.3.6.0]
at com.bea.content.manager.servlets.ContentServletFilter.doFilter(ContentServletFilter.java:178)[content_servlet.jar:10.3.6 ]
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)[weblogic.jar:10.3.6.0]
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)[weblogic.jar:10.3.6.0]
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)[weblogic.jar:10.3.6.0]
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)[weblogic.jar:10.3.6.0]
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)[weblogic.jar:10.3.6.0]
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)[com.bea.core.weblogic.security.identity_1.2.0.0.jar:1.2.0.0]
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)[com.bea.core.weblogic.security.wls_1.0.0.0_6-2-0-0.jar:6.2.0.0]
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)[weblogic.jar:10.3.6.0]
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)[weblogic.jar:10.3.6.0]
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)[weblogic.jar:10.3.6.0]
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)[com.bea.core.weblogic.workmanager_1.11.0.0.jar:1.11.0.0]
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)[com.bea.core.weblogic.workmanager_1.11.0.0.jar:1.11.0.0]
We are using "ActionMapping" to call the action method in our controller from the JSP form.
Have anyone faced this error before?
Any help would be much appreciated.
Thanks,
LanHi Lan,
Did you get any resolution for the above issue ?
If yes can you share it as we also ran into this.
Regards
Manu -
Mapping Error: Cannot cast to float
Hello Everyone,
Has anyone seen this error in Message Mapping in XI? What did you do to resolve it?
13:59:10 Start of test
Compilation of JobPositionPublication2PositionOpening_M successful Runtime exception during processing target field mapping /ns1:PositionOpening/ns1:PositionProfile/ns1:PositionDetail. The message is: Exception:[java.lang.IllegalArgumentException: Cannot cast to float. ] in class com.sap.aii.mappingtool.flib3.Arithm method greater[, 0, com.sap.aii.mappingtool.tf3.rt.Context@8e6076] com.sap.aii.mappingtool.tf3.MessageMappingException: Runtime exception during processing target field mapping /ns1:PositionOpening/ns1:PositionProfile/ns1:PositionDetail. The message is: Exception:[java.lang.IllegalArgumentException: Cannot cast to float. ] in class com.sap.aii.mappingtool.flib3.Arithm method greater[, 0, com.sap.aii.mappingtool.tf3.rt.Context@8e6076] at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:284) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:238) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:238) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:352) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:60) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:105) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0.execute(MapServiceRemoteObjectImpl0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0p4_Skel.dispatch(MapServiceRemoteObjectImpl0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:309) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:194) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:122) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: com.sap.aii.utilxi.misc.api.BaseRuntimeException: Exception:[java.lang.IllegalArgumentException: Cannot cast to float. ] in class com.sap.aii.mappingtool.flib3.Arithm method greater[, 0, com.sap.aii.mappingtool.tf3.rt.Context@8e6076] at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.getValue(FunctionWrapper.java:56) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.getValue(FunctionWrapper.java:41) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.getValue(FunctionWrapper.java:41) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.getValue(FunctionWrapper.java:41) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:220) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:238) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:238) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:352) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:60) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:105) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0.execute(MapServiceRemoteObjectImpl0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0p4_Skel.dispatch(MapServiceRemoteObjectImpl0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:309) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:194) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:122) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor248.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.getValue(FunctionWrapper.java:47) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.getValue(FunctionWrapper.java:41) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.getValue(FunctionWrapper.java:41) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.getValue(FunctionWrapper.java:41) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:220) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:238) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:238) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:352) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:60) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:105) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0.execute(MapServiceRemoteObjectImpl0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0p4_Skel.dispatch(MapServiceRemoteObjectImpl0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:309) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:194) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:122) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Caused by: java.lang.IllegalArgumentException: Cannot cast to float. at com.sap.aii.mappingtool.flib3.Arithm.toFloat(Arithm.java:19) at com.sap.aii.mappingtool.flib3.Arithm.greater(Arithm.java:72) ... 27 more RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ns1:PositionOpening/ns1:PositionProfile/ns1:PositionDetail. The message is: Exception:[java.lang.IllegalArgumentException: Cannot cast to float. ] in class com.sap.aii.mappingtool.flib3.Arithm method greater[, 0, com.sap.aii.mappingtool.tf3.rt.Context@8e6076]
13:59:12 End of testIf you are using a UDF, then the input and the output from the UDF is in the form of a string.If a float value is passed to the UDF,and if there are some arithmetic operations done on that float value then you need to convert the string to float - something like the below.
String s = "100.00";
try {
float f = Float.valueOf(s.trim()).floatValue();
System.out.println("float f = " + f);
} catch (NumberFormatException nfe) {
System.out.println("NumberFormatException: " + nfe.getMessage());
Then before returning the value to the target field,convert the value back to string like this -
Float.toString(float f)
In case you are using some other standard functions,do let us know of that as well so that we can suggest resolutions to this error.
thanks\
Priyanka -
ClassCastException error when casting OAWebBean to OAQueryBean
I'm on OAF 11.5.10 2CU. I recevive ClassCastException error when the following statement is used:
OAQueryBean queryBean = (OAQueryBean) webBean;
Any idea?
Thanks
Muhammetpublic void processFormRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
super.processFormRequest(oapagecontext, oawebbean);
System.out.println("Here it will fail");
OAQueryBean queryBean = (OAQueryBean) oawebbean.findIndexedChildRecursive("SrchRN");
System.out.println("You cant see this message because of classcastexception error"); -
Error when casting to UserTransaction
Hi,
I encounter the error below which occur at the line 7 cos I dont' see the output of "33".
java.lang.ClassCastException: org.jboss.tm.usertx.client.ServerVMClientUserTransaction
1 UserTransaction userTransaction = null;
2 3 try {
4 System.out.println("11");
5 InitialContext ctx = new InitialContext();
6 System.out.println("22");
7 userTransaction = (UserTransaction) ctx.lookup("java:comp/UserTransaction");
8 System.out.println("33");
9 userTransaction.begin();
10 System.out.println("44");Any idea what's wrong?
I'm running the application in Jboss4.0.3SP1. Any setting that I need to specify or activate?
Thank you.We are getting the same error with JBoss 4.3. Were you able to resolve this issue?
-
Cannot cast java.io.serialiazable to int Error
Dear Members,
I have procedure in AM which is as follows:
public int countRecs(String headerID)
int count=0;
count= integer value assigned from SQL Query*
return count;
I am calling this procedure from the CO of the page as follows:
String headerID="123"
int count=0;
*Serialiazable para[]={headerID};*
count=(int)am.invokeMethod("countRecs",headerID);
When I am compiling my CO I am getting the below error:
Cannot cast java.io.serialiazable to int
Kindly please help me in resolving this error.
Many thanks in advance.
Best Regards,
Arun Reddy D.the signature of the method you are invoking is
public Serializable invokeMethod(String methodName,
Serializable[] methodParams)
so the return type is also serializable. so you should change your method signature accordingly
public int countRecs(String headerID)
int count=0;
count= integer value assigned from SQL Query*
return count;
public String countRecs(String headerID)
//just change last statement
return ""+count;}
your CO call should be
count=(int)am.invokeMethod("countRecs",headerID);count = Integer.parseInt(am.invokeMethod("countRecs",para));
so finally your count variable will hold an integer
you may need to keep the above statement in try catch block
Regards
Ravi -
Why alert casting error when module url changed?
Hi, everyone.
I occurred a stranger error when click the item in DataGrid
which is redirected by "ModuleLoader" url.
Error #1034: Cast Error:Cannot cast
mx.managers::DragManagerImpl@482f971 to
mx.managers.IDragManager。
at mx.managers::DragManager$/get
impl()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\DragManager.as:152]
at mx.managers::DragManager$/get
isDragging()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\DragManager.as:18 7]
at
mx.controls.listClasses::ListBase/dragScroll()[E:\dev\3.0.x\frameworks\projects\framework \src\mx\controls\listClasses\ListBase.as:7148]
at Function/
http://adobe.com/AS3/2006/builtin::apply()
at <anonymous>()
at SetIntervalTimer/onTimer()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
Actually I never modify about DragManagerImpl...
In my main.mxml there is a
<mx:ModuleLoader id="module"
url="modules/DeviceRegisterSelectWizardModule.swf"/>
this ModuleLoader control is to load a new swf module when
change the url.
Althought the first loaded module which included DataGrid is
OK, it popup the error when this module is the second time switched
by the url...
The error is the above when click the item in it.
Actually all cast operation is error as I tried:
And is there any solution for it? ModuleLoader has such a
bug?
Thank you very much.Hi,
Another way to "find" the URL for the oamconsole, that I use if I'm not familiar with the configuration I'm working on is to first log into the Adminserver WL Console, then go to "Deployments".
Then, find "oamconsole" in the Deployments listed (on the right).
Click on that, then on the next page, look for the "Testing" tab. Click on the "Testing" tab, which which show the /oamconsole app.
Click on the "+" to expand the tree, and you should see a bunch of different URLs on the right, e.g., if you have OAM console deployed to managed servers, etc., there'll be different URLs for those, etc., and you can just click on the links to open up OAM Console in your browser.
Jim -
How do I cast a String to an int ? HELP !
Dear Java People,
If I have a program that outputs a String of the time ie
09:25
How do I code in Java to check this String to see if it is greater than 12 o'clock and if so tack on a String of "PM'.....
I tried
if ((int) hours.getDisplayValue()> 12 )
to attempt to add "PM" at the end of the String
The error message says:
"ClockDisplay.java": Error cannot cast java.lang.String to int at line 88, column 12
below is the program
Thank you in advance
Stan
* The ClockDisplay class implements a digital clock display for a
* European-style 24 hour clock. The clock shows hours and minutes. The
* range of the clock is 00:00 (midnight) to 23:59 (one minute before
* midnight).
* The clock display receives "ticks" (via the timeTick method) every minute
* and reacts by incrementing the display. This is done in the usual clock
* fashion: the hour increments when the minutes roll over to zero.
* @author Michael Kolling and David J. Barnes
* @version 2001.05.26
public class ClockDisplay
private NumberDisplay hours;
private NumberDisplay minutes;
private String displayString; // simulates the actual display
* Constructor for ClockDisplay objects. This constructor
* creates a new clock set at 00:00.
public ClockDisplay()
hours = new NumberDisplay(24);
minutes = new NumberDisplay(60);
updateDisplay();
* Constructor for ClockDisplay objects. This constructor
* creates a new clock set at the time specified by the
* parameters.
public ClockDisplay(int hour, int minute)
hours = new NumberDisplay(24);
minutes = new NumberDisplay(60);
setTime(hour, minute);
* This method should get called once every minute - it makes
* the clock display go one minute forward.
public void timeTick()
minutes.increment();
if(minutes.getValue() == 0) { // it just rolled over!
hours.increment();
updateDisplay();
* Set the time of the display to the specified hour and
* minute.
public void setTime(int hour, int minute)
//Exercise 3.19 This condition will insure that it will be a 12 hour clock
if(hour > 12)
hour = hour - 12;
hours.setValue(hour);
minutes.setValue(minute);
updateDisplay();
* Return the current time of this display in the format HH:MM.
public String getTime()
return displayString;
* Update the internal string that represents the display.
private void updateDisplay()
if ((int) hours.getDisplayValue() > 12 )
displayString = hours.getDisplayValue() + ":" +
minutes.getDisplayValue() ;
* The NumberDisplay class represents a digital number display that can hold
* values from zero to a given limit. The limit can be specified when creating
* the display. The values range from zero (inclusive) to limit-1. If used,
* for example, for the seconds on a digital clock, the limit would be 60,
* resulting in display values from 0 to 59. When incremented, the display
* automatically rolls over to zero when reaching the limit.
* @author Michael Kolling and David J. Barnes
* @version 2001.05.26
public class NumberDisplay
private int limit;
private int value;
* Constructor for objects of class Display
public NumberDisplay(int rollOverLimit)
limit = rollOverLimit;
value = 0;
* Return the current value.
public int getValue()
return value;
* Return the display value (that is, the current value as a two-digit
* String. If the value is less than ten, it will be padded with a leading
* zero).
public String getDisplayValue()
if(value < 10)
return "0" + value;
else
return "" + value;
* Set the value of the display to the new specified value. If the new
* value is less than zero or over the limit, do nothing.
public void setValue(int replacementValue)
if((replacementValue >= 0) && (replacementValue < limit))
value = replacementValue;
* Increment the display value by one, rolling over to zero if the
* limit is reached.
public void increment()
value = (value + 1) % limit;
public class TryClockDisplay
public static void main(String[] args)
ClockDisplay clockDisplay_1 = new ClockDisplay();
clockDisplay_1.setTime(17,40);
System.out.println("\nThe time now is " + clockDisplay_1.getTime());
clockDisplay_1.timeTick();
clockDisplay_1.timeTick();
clockDisplay_1.timeTick();
clockDisplay_1.timeTick();
clockDisplay_1.timeTick();
clockDisplay_1.timeTick();
clockDisplay_1.timeTick();
System.out.println("\nThe time now is " + clockDisplay_1.getTime());String time = "09:25";
String hrs = time.substring(0,2);
int hrsInt = Integer.parseInt(hrs);
if(hrsInt>12){
time += "PM";
System.out.println(time); -
I am getting this error while file uploading
Hi!
I am getting this error while file uploading,I can't find any solution.
SRVE0026E: [Servlet Error]-[org.apache.commons.fileupload.FileUpload: method setSizeMax(I)V not found]: javax.servlet.ServletException: org.apache.commons.fileupload.FileUpload: method setSizeMax(I)V not found
at com.honeywell.sdm.base.controller.SDMActionServlet.service(SDMActionServlet.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:983)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:564)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:116)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)
Please help me.I have attached the bean,action ,jsp pages
uploadInfo.jsp
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<html:html>
<HEAD>
<script>
function submitting(){
document.uploadForm.operation.value = "uploadOrgAdj";
document.uploadForm.action = "/uploadRecAction.do";
document.uploadForm.submit();
</script>
</HEAD>
<body>
<html:form action="/uploadRecAction" method="post" enctype="multipart/form-data">
Select the .xls File to upload data
<html:file property="fileName"></html:file>
<html:hidden property="operation" value=""/>
<html:button property="btn" value="Submit" onclick="submitting()"></html:button>
</html:form>
</body>
</html:html>
uploadAdjForm :
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.upload.FormFile;
public class uploadAdjForm extends ActionForm{
private FormFile fileName;
* @return
public FormFile getFileName() {
System.out.println("getFileName"+fileName);
return fileName;
* @param string
public void setFileName(FormFile string) {
System.out.println("setileNmame"+string);
fileName = string;
Action:
public class uploadFinancialAdjAction extends DispatchAction{
public org.apache.struts.action.ActionForward uploadOrgAdj(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception {
String sForward = "UploadInfo";
HttpSession session = request.getSession();
String sStartIndex = null;
String sEndIndex = null;
try
uploadFinancialAdjForm UploadForm=(uploadFinancialAdjForm)form;
System.out.println(UploadForm.getFileName().getContentType().toString());
String file=UploadForm.getFileName().toString();
uploadFinancialAdjManager businessManager = new uploadFinancialAdjManager();
ArrayList fileName = new ArrayList(); fileName = businessManager.getOrgAdjDetails(file);
boolean isMultipart = FileUpload.isMultipartContent(request);
if(isMultipart){
// Create a new file upload handler
DiskFileUpload upload = new DiskFileUpload();
// Parse the request
List items = upload.parseRequest(request);
//Process the uploaded items
Iterator iter = items.iterator();
while (iter.hasNext()) {
FileItem item = (FileItem) iter.next();
if (item.isFormField()) {
//processFormField(item);
if(item.getFieldName().equalsIgnoreCase("txtStartIndex")){
sStartIndex = item.getString();
else if(item.getFieldName().equalsIgnoreCase("txtEndIndex")){
sEndIndex = item.getString();
uploadFinancialAdjForm UploadForm=(uploadFinancialAdjForm)form;
String file=UploadForm.getFileName().toString();
uploadFinancialAdjManager businessManager = new uploadFinancialAdjManager();
ArrayList fileName = new ArrayList();
fileName = businessManager.getOrgAdjDetails(file);
}else{
if(item.getName()!=null && !item.getName().toUpperCase().endsWith(".XLS")){
throw new Exception("Please browse an excel file and Upload");
session.setAttribute("fileItem",item);
}//end of while
session.setAttribute("startIndex",sStartIndex);
session.setAttribute("endIndex",sEndIndex);
request.setAttribute("FileUploadStatus","true");
else{
throw new Exception("Error:Form is not multipart");
catch(Exception e)
System.out.println(e);
return mapping.findForward(sForward);
}Plz answer for my question
-
Error in JAX-WS 2.0 & JDeveloper 10.1.3
Hi!!
I'm trying to generate a SOAP Message with this code:
MessageFactory factory =
MessageFactory.newInstance(SOAPConstants.SOAP_1_1_PROTOCOL);
response = factory.createMessage();
SOAPPart parte =
response.getSOAPPart();
parte.setContent(xmlSource);
response.saveChanges();
in line "response.saveChanges();" i have this error:
16-feb-2007 11:00:21 com.sun.xml.messaging.saaj.soap.EnvelopeFactory
createEnvelope
GRAVE: SAAJ0511: Unable to create envelope from given source
16-feb-2007 11:00:21 com.sun.xml.messaging.saaj.soap.SOAPPartImpl
getContentAsStream
GRAVE: SAAJ0547: Error while trying to externalize
16-feb-2007 11:00:21 com.sun.xml.messaging.saaj.soap.MessageImpl
saveChanges
GRAVE: SAAJ0539: Unable to get header stream in saveChanges
16-feb-2007 11:00:21 com.sun.xml.messaging.saaj.soap.MessageImpl
saveChanges
GRAVE: SAAJ0540: Error during saving a multipart message
It's a web application and i'm debugging with OC4J Standalone from
Jdeveloper. The Libraries are the libs of JAX-WS 2.0 and the orion-
web.xml file has:
<web-app-class-loader search-local-classes-first="true"
include-war-manifest-class-path="true"/>
the exception stack:
07/02/16 11:00:59 java.lang.Exception: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Error during saving a multipart message
07/02/16 11:00:59 at genws.MotorXML.getSOAPMessageFromSource(MotorXML.java:443)
07/02/16 11:00:59 at genws.MotorXML.executeWS(MotorXML.java:232)
07/02/16 11:00:59 at PDFController.process(PDFController.java:321)
07/02/16 11:00:59 at es.jcyl.pdf.PDFServletEngine.service(PDFServletEngine.java:114)
07/02/16 11:00:59 at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
07/02/16 11:00:59 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)
07/02/16 11:00:59 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
07/02/16 11:00:59 at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
07/02/16 11:00:59 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
07/02/16 11:00:59 at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
07/02/16 11:00:59 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
07/02/16 11:00:59 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
07/02/16 11:00:59 at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
07/02/16 11:00:59 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
07/02/16 11:00:59 at java.lang.Thread.run(Thread.java:595)
07/02/16 11:00:59 Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Error during saving a multipart message
07/02/16 11:00:59 at com.sun.xml.messaging.saaj.soap.MessageImpl.saveChanges(MessageImpl.java:1126)
07/02/16 11:00:59 at es.jcyl.genws.MotorXML.getSOAPMessageFromSource(MotorXML.java:437)
07/02/16 11:00:59 ... 14 more
07/02/16 11:00:59 Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to get header stream in saveChanges:
07/02/16 11:00:59 at com.sun.xml.messaging.saaj.soap.MessageImpl.saveChanges(MessageImpl.java:1096)
07/02/16 11:00:59 ... 15 more
07/02/16 11:00:59 Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: SOAP exception while trying to externalize:
Anybody can help me?
ThanksThe error was in the execution of OC4J embebbed. OC4J uses its own libraries for web services and xml.
You can deploy an application with JAX-WS 2.0 if you add this java option:
-Xbootclasspath/p:<dir_libs>\xml-apis.jar;<dir_libs>\xercesImpl.jar;<dir_libs>\xalan.jar;<dir_libs>\saaj.api.jar
And the jars of JAX-WS are added as libraries to the application.
With this solution you solve the problem: OC4J uses this libraries, not their owns, include the xml libraries. -
Getting error while file uploading in struts
Hi!
I am getting this error while file uploading,I can't find any solution.
SRVE0026E: [Servlet Error]-[org.apache.commons.fileupload.FileUpload: method setSizeMax(I)V not found]: javax.servlet.ServletException: org.apache.commons.fileupload.FileUpload: method setSizeMax(I)V not found
at com.honeywell.sdm.base.controller.SDMActionServlet.service(SDMActionServlet.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:983)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:564)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:116)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)
Please help me.I have attached the bean,action ,jsp pages
uploadInfo.jsp
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<html:html>
<HEAD>
<script>
function submitting(){
document.uploadForm.operation.value = "uploadOrgAdj";
document.uploadForm.action = "/uploadRecAction.do";
document.uploadForm.submit();
</script>
</HEAD>
<body>
<html:form action="/uploadRecAction" method="post" enctype="multipart/form-data">
<b>Select the .xls File to upload data </b>
<html:file property="fileName"></html:file>
<html:hidden property="operation" value=""/>
<html:button property="btn" value="Submit" onclick="submitting()"></html:button>
</html:form>
</body>
</html:html>
uploadAdjForm :
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.upload.FormFile;
public class uploadAdjForm extends ActionForm{
private FormFile fileName;
* @return
public FormFile getFileName() {
System.out.println("getFileName"+fileName);
return fileName;
* @param string
public void setFileName(FormFile string) {
System.out.println("setileNmame"+string);
fileName = string;
Action:
public class uploadFinancialAdjAction extends DispatchAction{
public org.apache.struts.action.ActionForward uploadOrgAdj(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception {
String sForward = "UploadInfo";
HttpSession session = request.getSession();
String sStartIndex = null;
String sEndIndex = null;
try
uploadFinancialAdjForm UploadForm=(uploadFinancialAdjForm)form;
System.out.println(UploadForm.getFileName().getContentType().toString());
String file=UploadForm.getFileName().toString();
uploadFinancialAdjManager businessManager = new uploadFinancialAdjManager();
ArrayList fileName = new ArrayList(); fileName = businessManager.getOrgAdjDetails(file);
boolean isMultipart = FileUpload.isMultipartContent(request);
if(isMultipart){
// Create a new file upload handler
DiskFileUpload upload = new DiskFileUpload();
// Parse the request
List items = upload.parseRequest(request);
//Process the uploaded items
Iterator iter = items.iterator();
while (iter.hasNext()) {
FileItem item = (FileItem) iter.next();
if (item.isFormField()) {
//processFormField(item);
if(item.getFieldName().equalsIgnoreCase("txtStartIndex")){
sStartIndex = item.getString();
else if(item.getFieldName().equalsIgnoreCase("txtEndIndex")){
sEndIndex = item.getString();
uploadFinancialAdjForm UploadForm=(uploadFinancialAdjForm)form;
String file=UploadForm.getFileName().toString();
uploadFinancialAdjManager businessManager = new uploadFinancialAdjManager();
ArrayList fileName = new ArrayList();
fileName = businessManager.getOrgAdjDetails(file);
}else{
if(item.getName()!=null && !item.getName().toUpperCase().endsWith(".XLS")){
throw new Exception("Please browse an excel file and Upload");
session.setAttribute("fileItem",item);
}//end of while
session.setAttribute("startIndex",sStartIndex);
session.setAttribute("endIndex",sEndIndex);
request.setAttribute("FileUploadStatus","true");
else{
throw new Exception("Error:Form is not multipart");
catch(Exception e)
System.out.println(e);
return mapping.findForward(sForward);
}ORA-06512: at "PREPRD.OIM_SP_RECONARCHIVAL", line 722
ORA-00942: table or view does not exist
ORA-01031: insufficient privileges
(1) Check whether the OIM_SP_RECONARCHIVAL table or view exists or not...
(2) If it exists, check whether the DEV_OIM user has enough privilege to view this table or not...
If not, give it all privilege by login as sys as sysdba
GRANT ALL PRIVILEGES TO DEV_OIM;
COMMIT; -
Class Cast Exception for Date Format .
Hi Friends ,
I am getting a error for casting type from Object to Date type .
Could you please some one help me . I am using a prepared statement in OAF for inserting a data .
All fields are inserting except Date format .
My code in controller as follows :
try { String StartDate=row.getAttribute("StartDate").toString();
// String StartDate="30-Apr-2011";
DateFormat formatter ;
Date StartDate1;
formatter = new SimpleDateFormat("dd-MMM-yy");
StartDate1 = (Date)formatter.parse(StartDate);
//System.out.println("Today is " +date );
pstmt.setDate(12,StartDate1);
} catch (ParseException e)
{System.out.println("Exception :"+e); }
Thanks in Advance ,
KeerthiThanks so Much for the quick response .
Exception Details.
oracle.apps.fnd.framework.OAException: java.lang.ClassCastException at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888) at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1145) at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1408) at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2637) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1659) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418) at OA.jspService(OA.jsp:40) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803) at java.lang.Thread.run(Thread.java:534) ## Detail 0 ## java.lang.ClassCastException at SONY.oracle.apps.inv.xx_slapg.webui.ServiceRequestCO.processFormRequest(ServiceRequestCO.java:153) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:799) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363) at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1118) at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363) at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363) at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363) at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2633) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1659) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418) at OA.jspService(OA.jsp:40) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803) at java.lang.Thread.run(Thread.java:534) java.lang.ClassCastException at SONY.oracle.apps.inv.xx_slapg.webui.ServiceRequestCO.processFormRequest(ServiceRequestCO.java:153) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:799) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363) at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1118) at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363) at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363) at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363) at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2633) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1659) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418) at OA.jspService(OA.jsp:40) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803) at java.lang.Thread.run(Thread.java:534)
Here is my code .
java.util.Date StartDate=(java.util.Date)row.getAttribute("StartDate");
------------------------------------------------------------------------------------------------
Maybe you are looking for
-
Why can't I purchase on the app store?
I have an early 2008 Macbook Pro that I had purchased the Snow Leopard for through the app store. I just paid the 20.00 bucks and downloaded it without any issues. I have now given the computer to my brother and in order to have all of my stuff erase
-
FM SPE_CALCULATE_PRICE - Java Call does not return Net Value of Sales Order
Dear Experts, we want to make a call of FM SPE_CALCULATE_PRICE from the SAP NetWeaver Developer Studio to achieve that we receive the Net Value of a Sales Order. When we try to test the Scenario in SAP CRM (Creation of a Sales Order) Itself all is wo
-
Has anyone with Windows successfully set up "Accounts" disk file sharing?
I bought an Airport Extreme basestation (the one with Wifi-N and gigabit ethernet)a few days ago and set it up on the network. So far the wifi part has been nice - the range and speed (and stability) are a lot better than the Belkin draft-N wifi I ha
-
Where are the ID and Password fields in End User Login ?
Hi: I need to modifiy the ID / Password labels of the end-user login. I searched it in the WPMessages.properties, but i only find the variable UI_PWD_LABEL, and if i change it, it saw in the Admin Login but not in the User Login. Any idea? Thanks, MJ
-
Love TM but need to backup files onto fat32 disk...?
Hi, I have loved using TM (so simple) but I need my backup disk to be readable on friends PC's = need fat32 disk. I guess TM just can't backup on fat32 disks. Do you know of any TM like option to backup mac files onto fat32 disks (without creating a