Getting Error while calling Flex function from JavaScript
Hi,
I have an aspx page, which shows charts as per dropdown selection,
I am using flex charts for flex.In aspx page, i am calling an mxml function using javascript.below is the code for javascript in aspx.
Javascript code in aspx page:
<script type="text/javascript">
function callApp(formid) {
try {
var objectChart = document.getElementById("statisticsChart");
alert(objectChart.id);
objectChart.myFlexFunction(formid,get('<%=HiddenDashboardWS.ClientID %>').value);
catch (e) {
alert(e.message);
function getDropDownListvalue() {
var IndexValue = $get('<%=FormDropDownList.ClientID %>').selectedIndex;
var SelectedVal = $get('<%=FormDropDownList.ClientID %>').options[IndexValue].value;
// alert(SelectedVal);
callApp(SelectedVal);
</script>
Html code where dropdown control is placed
<asp:DropDownList CssClass="combo" ID="FormDropDownList" runat="server" AutoPostBack="false"></asp:DropDownList>
<object id="statisticsChart" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"
height="220" width="680">
<param name="src" value="../swf/DashboardStatisticChart.swf" />
<param name="flashVars" value="" />
<embed name="statisticsChart" src="../swf/DashboardStatisticChart.swf" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" height="220" width="680" flashvars=""></embed>
</object>
Mxml code:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundColor="white" creationComplete="initApp();" >
<mx:script>
public function initApp():void {
ExternalInterface.addCallback("myFlexFunction",myFunc);
public function myFunc(s:String,wsurl:String):void {
Formid.text = s;
webService.wsdl = wsurl;
Alert.show("webservice");
//Getdata calls webservice and gets xml data
GetData();
//showchart() will draw chart
ShowChart();
</mx:script>
</mx:Application>
Above code works perfect in ie, but in firefox, it gives An error saying “chartObject.MyFlexFunction is not a function”.
I am getting the object in javascript in all the browsers, but not the functions!
Does anyone has worked with this?
Any help will be highly appreciated.
Regards,
Nirav Patel
Found the solution from here... http://74.125.153.132/search?q=cache:4BC9BY04B5EJ:livedocs.adobe.com/flash/8/main/00002201 .html+externalinterface.addcallback+not+working&cd=1&hl=en&ct=clnk&gl=in
Hope it will help others...
Regards,
Similar Messages
-
Getting error while calling AME api from the page
Hi,
I am calling ame api ame_api2.getallapprovers7 from our custom page.I have written following code-
public void getapprovers(String transactionid)
String OutError = "";
ArrayList al = new ArrayList();
OADBTransaction trans = getOADBTransaction();
String insStmnt = "BEGIN " +
"ame_api2.getAllApprovers7(applicationIdIn => :1,transactionTypeIn =>:2,transactionIdIn =>:3,"+
"l_processYN =>:4,approversOut =>:5); " +
"END;";
OracleCallableStatement stmt = (OracleCallableStatement)trans.createCallableStatement(insStmnt, 1);
try
stmt.setString(1, "800");
stmt.setString(2, "XXXXCWKAPP");
stmt.setString(3, transactionid);
stmt.registerOutParameter(4, OracleTypes.VARCHAR);
stmt.registerOutParameter(5, OracleTypes.ARRAY,"XXXX_APPROVER_TABLE");
stmt.execute();
// OAExceptionUtils.checkErrors as per PLSQL API standards
OAExceptionUtils.checkErrors(trans);
ARRAY arrayError = stmt.getARRAY(5);
Datum[] arr = arrayError.getOracleArray();
for (int i = 0; i < arr.length; i++)
oracle.sql.STRUCT os = (oracle.sql.STRUCT)arr;
Object[] a = os.getAttributes();
System.out.println("Column:" + a[0] + " Value:" + a[1]);
//OutError = (String)a[1];
//al.add(new OAException(OutError, OAException.ERROR));
stmt.close();
catch(SQLException sqle){
try { stmt.close(); }
catch (Exception e) {;}
throw OAException.wrapperException(sqle);
if (OutError != null)
// OAException.raiseBundledOAException(al);
4 and 5th parameters are out parameters and 5th parameter provides the approver records and it should have the same data type as ame_util.approversTable2. I have created this table type explicitly in oracle by the name XXXX_APPROVER_TABLE but i am getting the error while running the page "java.sql.SQLException: Fail to construct descriptor: Unable to resolve type: "APPS.ETHR_APPROVER_TABLE"". I requirement is to take the 5th parameter in ame_util.approversTable2 data type.
Please help me urgently.
Thanks
AshishHi Kumar,
The ETHR_APPROVER_TABLE is custom pl sql indexed table that I have created.following are the parameters of api-
procedure getAllApprovers7(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
approvalProcessCompleteYNOut out varchar2,
approversOut out nocopy ame_util.approversTable2);
i need a out variable of type ame_util.approversTable2 so get the values.
I have changed the code and now getting the following error-
java.sql.SQLException: ORA-03115: unsupported network datatype or representation
I have only changed this statement.
stmt.registerOutParameter(5,OracleTypes.PLSQL_INDEX_TABLE);//,"XXXX_APPROVAL_TBL");
Edited by: user5756777 on Jul 13, 2009 4:17 AM -
Getting Error while Calling Java File from oblixpppcatalog.lst file
Hi,
We are trying to configure userservcenter_workflowCreateProfile in oblixpppcatalog.lst file to call a java class that returns an xml file as below
<?xml version="1.0" encoding="UTF-8"?>
<ObEventParams
xmlns="http://www.oblix.com/">
<ObParamList name="ObRequest">
<ObParam name="sn">
<ObValue>Smith</ObValue>
</ObParam>
</ObParamList>
</ObEventParams>
But when we try to run this code by clicking on "Create User Identity" we are getting "An error in Pre/Post Processing of the Page has Occured" or Some times we get "Parse error in XML document sent by event handler to identity server".
Can some please shed some light on this issue?
Thanks,
GaneshHi Ganesh,
That event xml looks rather incomplete - I would expect it to contain information about the workflow, and workflow step etc. For example, I have a Create User workflow that generates Event XML beginning:
<?xml version="1.0" encoding="utf-8"?>
<ObEventParams
xmlns="http://www.oblix.com/">
<ObParamList
name="WfInstance">
<ObParam
name="obwfinstanceid">
<ObValue>f92cab82ee4b43ccba42869bb2928d0c</ObValue>
</ObParam>
<ObParam
name="obworkflowdn">
<ObValue>obworkflowid=060efe6966674e54be63383290d81e63,obcontainerId=workflowDefinitions,o=Oblix,dc=example,dc=com</ObValue>
</ObParam>
<ObParam
name="obworkflowname">
<ObValue>Create User</ObValue>
etc etc...
You could look at the Event XML that is sent to the plugin from your workflow to a file by reading STDIN and dumping it to a file. There is an example of this in Note 843570.1 (happens to be for a password change event, but it should work for any ppp exec event). Then your code could change the Event XML as required, but keeping the basic structure of the data that is sent to it.
Regards,
Colin -
Operation not found error while calling AM methods from managed bean
Hi,
operation not found error while calling AM methods from managed bean.
written a method with two parameters in AM.
exposed the method in AM client interface
in the page bindings added the method in method action ..left empty in the value fields of the parameters.
calling the method from managed bean like below
String userNameVal = (String)userName.getValue();
String passwordVal = (String)password.getValue();
OperationBinding operationBinding =
ADFUtils.findOperation("verifyLogin");
operationBinding.getParamsMap().put("userName",userNameVal);
operationBinding.getParamsMap().put("password",passwordVal);
operationBinding.execute();
i am getting operation verifyLogin not found error.Please suggest me something to do.
Thanks
SatyaHi vlsn,
Can you try with the below code
// in your backing bean
OperationBinding operation = bindings.getOperationBinding("verifyLogin");
//Put your both parameters here
operation.getParamsMap().put("parameter_name1", parameterValue1);
operation.getParamsMap().put("parameter_name2", parameterValue2);
operation.execute();
if (operation.getResult() != null) {
Boolean result = (Boolean) operation.getResult();
and share the result.
regards,
Rajan -
Error while calling PI webservice from EJB
Hi Experts,
We are getting exception while calling PI webservice from EJB which is deployed in CE 7.2. Earlier we used to call the same webservice but from different PI system at that it worked fine. Now we have changed the consumer proxies required in CE and tried to call from CE and it is throwing error. We have checked usernames and passwords that we are using to call the service and that is working fine. PI team tested from their side and li is also fine. We have also restarted the CE system but invain. Can somebody help on this. The below is the trace that we got.
Location: com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding
Text: Connection IO Exception. Check nested exception for details. (Connection reset).
[EXCEPTION]
com.sap.engine.services.webservices.espbase.client.bindings.exceptions.TransportBindingException: Connection IO Exception. Check nested exception for details. (Connection reset).
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.outputSOAPMessage(SOAPTransportBinding.java:419)
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call_SOAP(SOAPTransportBinding.java:1364)
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.callWOLogging(SOAPTransportBinding.java:990)
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call(SOAPTransportBinding.java:944)
at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.processTransportBindingCall(WSInvocationHandler.java:168)
at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invokeSEISyncMethod(WSInvocationHandler.java:121)
at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invokeSEIMethod(WSInvocationHandler.java:84)
at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invoke(WSInvocationHandler.java:65)
at $Proxy780.mioaRDMDataDistribution(Unknown Source)
at com.MDMEventListener.callToPIWS(MDMEventListener.java:100)
at com.MDMEventListener.ListenerMethod(MDMEventListener.java:173)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:47)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_WS.invoke(Interceptors_WS.java:31)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:39)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:23)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:25)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:17)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:138)
at com.sap.engine.services.ejb3.webservice.impl.DefaultImplementationContainer.invokeMethod(DefaultImplementationContainer.java:203)
at com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.process0(RuntimeProcessingEnvironment.java:730)
at com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.preProcess(RuntimeProcessingEnvironment.java:682)
at com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.process(RuntimeProcessingEnvironment.java:324)
at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPostWOLogging(ServletDispatcherImpl.java:199)
at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:65)
at com.sap.engine.services.webservices.servlet.SoapServlet.doPost(SoapServlet.java:61)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:152)
at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:38)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:404)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:204)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:440)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:429)
at com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:38)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:82)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:268)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:81)
at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:54)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:42)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:447)
at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:264)
at com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:56)
at com.sap.engine.core.thread.execution.Executable.run(Executable.java:122)
at com.sap.engine.core.thread.execution.Executable.run(Executable.java:101)
at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:328)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.readLine(HTTPSocket.java:950)
at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.getInputStream(HTTPSocket.java:414)
at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.getResponseCode(HTTPSocket.java:319)
at com.sap.engine.services.webservices.espbase.client.bindings.ClientHTTPTransport.getResponseCode(ClientHTTPTransport.java:209)
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.outputSOAPMessage(SOAPTransportBinding.java:385)
... 78 more
Regards,
PradeepHi Pradeep,
this looks like if the server is not reachable. Have you checked if both server are able to communicate? Maybe firewall rules block the request.
Regards,
Tobias -
Help with calling java functions from javascript
I am using javax.script to interpret javascript from a java applet. it loads the js file into a string, and then does engine.eval(script_string). My question is, how would I make functions in the class file that are available to javascript?
Update: Instead of that, I am loading a js script that will contain all of the usable functions. Here it is:
//core.js for Javasphere 0.31
var pkgs = new JavaImporter(java.lang, java.lang.System, java.awt);
with(pkgs) {
function Abort(msg) {
var graph = new Graphics();
g = graph.getgraphics();
g.drawString(msg, 20, 20);
}When I do engine.eval("Abort(\"something\")"); it throws this error:
javax.script.ScriptException: sun.org.mozilla.javascript.internal.EvaluatorException: error instantiating (0): class java.awt.Graphics is interface or abstract (<Unknown source>#8) in <Unknown source> at line number 8Eggbertx, let's start from scratch if you don't mind. Say you have this Applet
pubic class MyApplet extends Applet
String message;
//CALL THIS METHOD FROM JAVASCRIPT
public void setMessage(String msg)
message = msg;
// this saves you from having
// to call getGraphics() from JavaScript
repaint();
public void paint(Graphics g)
g.drawString(message, 10, 30);
}Then in your HTML file you may have something like this:
<input type="text" id="msg" value=""></input>
<input type="button" value="Set Message" onclick="setAppletMessage()"></input>
<applet id="myApplet" code="MyApplet.class" width="400" height="100"></applet>And in the JavaScript file:function setAppletMessage()
var msg = document.getElementById("msg").value;
document.myApplet.setMessage(msg);
}This is about all you really need to do. See how the Graphics object is no longer in your .js file?
Note: You may run into other difficulties in getting this code to work because of browser, security, or some other pain-in-the-neck issues, but this is the idea.
Eggbertx, I see you added a star to my first post and I think you should take that off because:
1. <tt>Component</tt> is abstract... so you can not call the <tt>new</tt> operator.
2. The call <tt>component.getGraphics()</tt> is not going to work either, because <tt>component</tt> was never created. -
Error while calling stored procedure from Java
Hi Guys,
How are you everybody? I hope everything is goin fine on your side. I have one issue in PL/SQL while calling below stored procedures from Java.
Problem Description: We have a stored procedure PROCEDURE BULK_INSERTS (
V_SESSION_ID_TAB IN T_SESSION_ID_TAB_TYPE,
V_SERVICE_TYPE_TAB IN T_SERVICE_TYPE_TAB_TYPE,
V_SERVICE_LOCATION_TAB IN T_SERVICE_LOCATION_TAB_TYPE,
V_SERVICE_CALL_NAME_TAB IN T_SERVICE_CALL_NAME_TAB_TYPE,
V_SERVICE_CALL_START_TIME_TAB IN T_SERVICE_CALL_ST_TAB_TYPE,
V_SERVICE_CALL_END_TIME_TAB IN T_SERVICE_CALL_ET_TAB_TYPE,
V_SERVICE_CALL_DURATION_TAB IN T_SERVICE_CALL_DUR_TAB_TYPE,
V_STATUS_TAB IN T_STATUS_TAB_TYPE,
V_NOTES_TAB IN T_NOTES_TAB_TYPE
) and we are getting ora errors while calling this stored procedure from java.
All tab types are declared locally, at package level.
Here is error which occur while calling this sp:
{call BULK_PKG.BULK_INSERTS(?,?,?,?,?,?,?,?,?)}
And the parameter types we are using are:
SESSION_ID - NUM_TAB_TYPE
SERVICE_TYPE - VAR_TAB_TYPE
SERVICE_LOCATION - VAR_TAB_TYPE
SERVICE_CALL_NAME - VAR_TAB_TYPE
SERVICE_CALL_START_TIME - DATE_TIME_TAB_TYPE
SERVICE_CALL_END_TIME - DATE_TIME_TAB_TYPE
SERVICE_CALL_DURATION - NUM_TAB_TYPE
STATUS - VAR_TAB_TYPE
NOTES - VAR_TAB_TYPE
And the Exception stack trace is:
ERROR (com.att.retail.r2d2.persistence.dao.ExternalServiceCallDAO.saveExternalServiceCallInfo(ExternalServi
ceCallDAO.java:143)@ExecuteThread: '252' for queue: 'weblogic.kernel.Default') {Error attempting to save collected ESC data}
java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1030)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:191)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:944)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3381)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3482)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:3856)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1373)
at weblogic.jdbc.wrapper.PreparedStatement.execute(PreparedStatement.java:98)
at com.att.retail.r2d2.persistence.dao.ExternalServiceCallDAO.doBulkInsert(ExternalServiceCallDAO.java:220)
at com.att.retail.r2d2.persistence.dao.ExternalServiceCallDAO.saveExternalServiceCallInfo(ExternalServiceCallDAO.java:138)
Please help my guys out of this. I will really appreciate all suggestions and advices.
Thank you everybody.I am trying to pass parameter to test my procedure but it is giving this error : ORA-06531: Reference to uninitialized collection
ORA-06512: at line 12
Here is example for my test procedure:
declare
v_session_id_tab SESSION_ID_TAB_TYPE;
v_service_type_tab SERVICE_TYPE_TAB_TYPE ;
v_service_location_tab SERVICE_LOCATION_TAB_TYPE ;
v_service_call_name_tab SERVICE_CALL_NAME_TAB_TYPE;
v_service_call_start_time_tab SERVICE_CALL_ST_TAB_TYPE;
v_service_call_end_time_tab SERVICE_CALL_ET_TAB_TYPE;
v_service_call_duration_tab SERVICE_CALL_DUR_TAB_TYPE;
v_status_tab STATUS_TAB_TYPE;
v_notes_tab NOTES_TAB_TYPE;
begin
v_session_id_tab(1) := 1;
v_service_type_tab(1) := 'db';
v_service_location_tab(1) := 'local';
v_service_call_name_tab(1) := 'Name of call';
v_service_call_start_time_tab(1) := SYSDATE;
v_service_call_end_time_tab(1) := SYSDATE;
v_service_call_duration_tab(1) := 100;
v_status_tab(1) := 'Z';
v_notes_tab(1) := 'NOTES';
BULK_INSERTS (v_session_id_tab,v_service_type_tab, v_service_location_tab,v_service_call_name_tab,v_service_call_start_time_tab,v_service_call_end_time_tab,
v_service_call_duration_tab, v_status_tab, v_notes_tab);
end;
I declare all types at schema level.
Please give your comments.
Thank you -
Getting error while calling this BAPI:Field MATNR has been transferred inco
Hi,
I have a rquirement to upload material master data into sap for Plant 1251.(For plant 1251 we need to upload both Basi veiw and Extended View).
I am getting the following error while calling this BAPI.Field MATNR has been transferred inconsistently or is blank
the errror is :Field MATNR has been transferred inconsistently or is blank.
I have written the below logic in the program to upload material master data into SAP.
Please help me out to resolve this issue.
Thanks in advance.
Program logic which i have wriiten in the program is
LOOP AT it_rpt.
CLEAR lwa_return.
v_tabix = sy-tabix.
IF ( it_rpt-werks EQ p_werks AND
it_rpt-matnr IS INITIAL ).
retrieve internal number
PERFORM get_internal_number USING lc_mtart
lc_mbrsh
CHANGING it_rpt-matnr.
ENDIF.
IF NOT it_rpt-matnr IS INITIAL.
PERFORM convert_field_input CHANGING it_rpt-matnr.
ENDIF.
Header data
CLEAR lwa_headdata.
lwa_headdata-material = it_rpt-matnr.
lwa_headdata-ind_sector = lc_mbrsh.
lwa_headdata-matl_type = lc_mtart.
lwa_headdata-basic_view = 'X'.
IF NOT it_rpt-vkorg IS INITIAL.
lwa_headdata-sales_view = 'X'.
ENDIF.
lwa_headdata-purchase_view = 'X'.
lwa_headdata-mrp_view = 'X'.
lwa_headdata-storage_view = 'X'.
lwa_headdata-forecast_view = 'X'.
lwa_headdata-work_sched_view = 'X'.
lwa_headdata-account_view = 'X'.
lwa_headdata-cost_view = 'X'.
*Client data
CLEAR: lwa_clientdata, lwa_clientdatax.
IF it_rpt-werks EQ c_1251.
lwa_clientdata-matl_group = it_rpt-matkl.
lwa_clientdata-old_mat_no = it_rpt-bismt.
lwa_clientdata-base_uom = it_rpt-meins.
lwa_clientdata-manu_mat = it_rpt-mfrpn.
lwa_clientdata-mfr_no = it_rpt-mfrnr.
ENDIF.
lwa_clientdata-division = it_rpt-spart.
lwa_clientdata-unit_of_wt = lc_gewei.
lwa_clientdata-trans_grp = lc_tragr.
IF it_rpt-werks EQ c_1251.
lwa_clientdatax-matl_group = 'X'.
lwa_clientdatax-old_mat_no = 'X'.
lwa_clientdatax-base_uom = 'X'.
lwa_clientdatax-manu_mat = 'X'.
lwa_clientdatax-mfr_no = 'X'.
ENDIF.
lwa_clientdatax-unit_of_wt = 'X'.
lwa_clientdatax-trans_grp = 'X'.
lwa_clientdatax-division = 'X'.
Material Description
IF it_rpt-werks EQ c_1251.
lt_matdesc-langu = sy-langu.
lt_matdesc-matl_desc = it_rpt-maktx.
APPEND lt_matdesc.
ENDIF.
*Plant data
CLEAR lwa_plantdata.
lwa_plantdata-plant = it_rpt-werks.
lwa_plantdata-availcheck = lc_mtvfp.
lwa_plantdata-mrp_type = lc_dismm.
lwa_plantdata-mrp_group = lc_disgr.
lwa_plantdata-auto_p_ord = 'X'.
lwa_plantdata-proc_type = 'F'.
IF it_rpt-werks EQ c_1251.
it_rpt-prctr = lc_prctr. "1252
ELSEIF it_rpt-werks EQ c_1261.
it_rpt-prctr = lc_prctr1. "1262
ENDIF.
lwa_plantdata-profit_ctr = it_rpt-prctr.
lwa_plantdata-period_ind = lc_perkz.
lwa_plantdata-max_stock = it_rpt-stawn.
lwa_plantdata-countryori = it_rpt-herkl.
lwa_plantdata-sloc_exprc = it_rpt-lgfsb.
CLEAR lwa_plantdatax.
lwa_plantdatax-plant = it_rpt-werks.
lwa_plantdatax-availcheck = 'X'.
lwa_plantdatax-mrp_type = 'X'.
lwa_plantdatax-mrp_group = 'X'.
lwa_plantdatax-auto_p_ord = 'X'.
lwa_plantdatax-proc_type = 'X'.
lwa_plantdatax-profit_ctr = 'X'.
lwa_plantdata-period_ind = 'X'.
lwa_plantdatax-max_stock = 'X'.
lwa_plantdatax-countryori = 'X'.
lwa_plantdatax-sloc_exprc = 'X'.
*Valuation data
CLEAR lwa_valuationdata.
lwa_valuationdata-val_area = it_rpt-werks.
lwa_valuationdata-price_ctrl = lc_vprsv.
lwa_valuationdata-price_unit = lc_peinh.
lwa_valuationdata-val_class = it_rpt-bklas.
CLEAR lwa_valuationdatax.
lwa_valuationdatax-val_area = it_rpt-werks.
lwa_valuationdatax-price_ctrl = 'X'.
lwa_valuationdatax-price_unit = 'X'.
lwa_valuationdatax-val_class = 'X'.
*Storage location
CLEAR lwa_storagelocation.
lwa_storagelocation-plant = it_rpt-werks.
lwa_storagelocation-stge_loc = it_rpt-lgort.
CLEAR lwa_storagelocationx.
lwa_storagelocationx-plant = it_rpt-werks.
lwa_storagelocationx-stge_loc = it_rpt-lgort.
*Tax Classifications
IF it_rpt-werks EQ c_1251.
it_rpt-tatyp = lc_tatyp. "u2018MWSTu2019
ELSEIF it_rpt-werks EQ c_1261.
it_rpt-tatyp = lc_tatyp1. "u2018UTXJu2019
ENDIF.
lt_taxclass-tax_type_1 = it_rpt-tatyp.
lt_taxclass-taxclass_1 = lc_taxkm.
lt_taxclass-tax_ind = lc_taxim.
APPEND lt_taxclass.
*Sales data
CLEAR: lwa_salesdata, lwa_salesdatax.
IF it_rpt-werks EQ c_1251.
it_rpt-vkorg = lc_vkorg.
ELSEIF it_rpt-werks EQ c_1261.
it_rpt-vkorg = lc_vkorg1.
ENDIF.
lwa_salesdata-sales_org = it_rpt-vkorg.
lwa_salesdata-distr_chan = lc_vtweg.
lwa_salesdata-cash_disc = lc_sktof.
lwa_salesdata-item_cat = lc_mtpos.
lwa_salesdatax-sales_org = it_rpt-vkorg.
lwa_salesdatax-distr_chan = lc_vtweg.
lwa_salesdatax-cash_disc = 'X'.
lwa_salesdatax-item_cat = 'X'.
*Forecast parameters
CLEAR: lwa_forecast, lwa_forecastx.
lwa_forecast-plant = it_rpt-werks.
lwa_forecast-fore_model = lc_prmod.
lwa_forecast-fore_pds = lc_anzpr.
lwa_forecast-hist_vals = lc_peran.
lwa_forecastx-plant = it_rpt-werks.
lwa_forecastx-fore_model = 'X'.
lwa_forecastx-fore_pds = 'X'.
lwa_forecastx-hist_vals = 'X'.
Purchasing long text
IF it_rpt-werks EQ c_1251.
IF it_rpt-tdline1 <> ' '.
lv_tdobject = 'MATERIAL'.
lv_tdid = 'BEST'.
lv_tdname = it_rpt-matnr.
PERFORM fill_longtext TABLES lt_longtext
USING lv_tdobject
lv_tdname
lv_tdid
sy-langu
it_rpt-tdline1.
ENDIF.
Basic long text
IF it_rpt-tdline2 <> ' '.
lv_tdobject = 'MATERIAL'.
lv_tdid = 'GRUN'.
lv_tdname = it_rpt-matnr.
PERFORM fill_longtext TABLES lt_longtext
USING lv_tdobject
lv_tdname
lv_tdid
sy-langu
it_rpt-tdline2.
ENDIF.
*Units of measure
CLEAR : lt_uom,lt_uomx.
lt_uom-alt_unit = it_rpt-meins.
lt_uom-alt_unit_iso = it_rpt-meins.
lt_uom-unit_of_wt = it_rpt-gewei.
APPEND lt_uom.
lt_uomx-alt_unit = it_rpt-meins.
lt_uomx-alt_unit_iso = it_rpt-meins.
lt_uomx-unit_of_wt = 'X'.
APPEND lt_uomx.
ENDIF.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = lwa_headdata
clientdata = lwa_clientdata
clientdatax = lwa_clientdatax
plantdata = lwa_plantdata
plantdatax = lwa_plantdatax
forecastparameters = lwa_forecast
forecastparametersx = lwa_forecastx
storagelocationdata = lwa_storagelocation
storagelocationdatax = lwa_storagelocationx
valuationdata = lwa_valuationdata
valuationdatax = lwa_valuationdatax
salesdata = lwa_salesdata
salesdatax = lwa_salesdatax
IMPORTING
return = lwa_return
TABLES
materialdescription = lt_matdesc
unitsofmeasure = lt_uom
unitsofmeasurex = lt_uomx
materiallongtext = lt_longtext
taxclassifications = lt_taxclass
returnmessages = it_messages.
Regards,
ReddyCan you check with below code .
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
INPUT = it_rpt-matnr
IMPORTING
OUTPUT = it_rpt-matnr
EXCEPTIONS
LENGTH_ERROR = 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.
Move it_rpt-matnr to lwa_headdata-material .
Regard's
Smruti -
Getting error while opening Excel document from SharePoint site
Hello All,
I am getting following error while opening Excel document from SharePoint site.
This issue appears when we open Excel document from Windows>> Run using below mentioned command:
Excel.exe "{File Name}"
If once I go to Excel back stage and browse for the SharePoint location, then this problem disappears.
I have a work around for this issue but main problem is that i do not have any work around when i need to open Exel document using Excel COM interop in C#.
Thanks,
Amit Bansal
Amit Bansal http://www.oops4you.blogspot.com/Hi Amit Bansal,
Thanks for posting in MSDN forum.
This forum is for developers discussing developing issues involve Excel application.
According to the description, you got an error when you open the document form SharePoint site.
Based on my understanding, this issue maybe relative to the SharePoint, I would like move it to
SharePoint 2013 - General Discussions and Questions forum.
The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.
Thanks for your understanding.
Regards & Fei
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Getting Error while Execute SSIS Package from Console Application
Dear All,
SSIS package working fine directly.
I got following error while execute SSIS package from C# console application.
The connection "{79D920D4-9229-46CA-9018-235B711F04D9}" is not found. This error is thrown by Connections collection when the specific connection element is not found.
Cannot find the connection manager with ID "{79D920D4-9229-46CA-9018-235B711F04D9}" in the connection manager collection due to error code 0xC0010009. That connection manager is needed by "OLE DB Destination.Connections[OleDbConnection]"
in the connection manager collection of "OLE DB Destination". Verify that a connection manager in the connection manager collection, Connections, has been created with that ID.
OLE DB Destination failed validation and returned error code 0xC004800B.
One or more component failed validation.
There were errors during task validation.
Code :
public static string RunDTSPackage()
Package pkg;
Application app;
DTSExecResult pkgResults;
Variables vars;
app = new Application();
pkg = app.LoadPackage(@"D:\WORK\Package.dtsx", null);
Microsoft.SqlServer.Dts.Runtime.DTSExecResult results = pkg.Execute();
I have recreate the application with again new connection in SSIS.
Still not working, Please provide solution if any one have.
DB : SQL Server 2008 R2
Thanks and regards,
Hardik RamwaniThe connection "{79D920D4-9229-46CA-9018-235B711F04D9}" is not found. This error is thrown by Connections collection when the specific connection element is not found.
Cannot find the connection manager with ID "{79D920D4-9229-46CA-9018-235B711F04D9}" in the connection manager collection due to error code 0xC0010009. That connection manager is needed by "OLE DB Destination.Connections[OleDbConnection]"
in the connection manager collection of "OLE DB Destination". Verify that a connection manager in the connection manager collection, Connections, has been created with that ID.
Are you sure that you are running the same package via .NET which works fine from Visual Studio?
By reading error message, I can say that you have copied OLEDB task from another package OR you have deleted one OLEDB connection manager. Now when package is run this task tries to use the connection manager and not found thus throws error message.
Open all OLEDB destination tasks and you find connection manager missing. Connection Manager name should be provided there
Cheers,
Vaibhav Chaudhari
MCSA - SQL Server 2012 -
Getting error while calling procedure from remote database
When I am trying to call child procedure from remote database I am getting below error:
ORA-02064: distributed operation not supported
ORA-06512: at "NMUSER.NEW_CUST_UPLOAD", line 740
(P.S. on line no 740 I issued "commit;" )
I checked rights,synonym on all the objects they are fine.Oracle Error: ORA-02064
Error Description:
Distributed operation
not supported
Error Cause:
One of the following
unsupported operations was attempted:
1. array execute of a remote update with a subquery that references a dblink,
or
2. an update of a long column with bind variable and an update of a second
column with a subquery that both references a dblink and a bind variable, or
3. a commit is issued in a coordinated session from an RPC procedure call
with OUT parameters or function call.
Cheers,
Manik. -
Getting the error while calling the report from oaf page
Dear all
when i am calling the report from oaf page
if (pageContext.getParameter("PrintPDF") != null)
DataObject sessionDictionary =
(DataObject)pageContext.getNamedDataObject("_SessionParameters");
HttpServletResponse response =
(HttpServletResponse)sessionDictionary.selectValue("HttpServletResponse");
try
ServletOutputStream os = response.getOutputStream();
// Set the Output Report File Name and Content Type
String contentDisposition = "attachment;filename=EmpReport.pdf";
response.setHeader("Content-Disposition", contentDisposition);
response.setContentType("application/pdf");
// Get the Data XML File as the XMLNode
XMLNode xmlNode = (XMLNode)am.invokeMethod("getEmpDataXML");
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
xmlNode.print(outputStream);
ByteArrayInputStream inputStream =
new ByteArrayInputStream(outputStream.toByteArray());
ByteArrayOutputStream pdfFile = new ByteArrayOutputStream();
//Generate the PDF Report.
TemplateHelper.processTemplate(((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getAppsContext(),
"XXCRM", "XXCRM_EMP",
((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getUserLocale().getLanguage(),
((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getUserLocale().getCountry(),
inputStream,
TemplateHelper.OUTPUT_TYPE_PDF, null,
pdfFile);
// Write the PDF Report to the HttpServletResponse object and flush.
byte[] b = pdfFile.toByteArray();
response.setContentLength(b.length);
os.write(b, 0, b.length);
os.flush();
os.close();
} catch (Exception e)
response.setContentType("text/html");
throw new OAException(e.getMessage(), OAException.ERROR);
pageContext.setDocumentRendered(false);
i am getting the error java.classcastexception at this line
DataObject sessionDictionary =
(DataObject)pageContext.getNamedDataObject("_SessionParameters");
regards
Sreekanthcheck if you have import oracle.cabo.ui.data.DataObject; in your import statement.
--Prasanna -
Getting error while calling ejb business methods from servlet
Hi
Iam getting error when i try to call a ejb method from servlet.Error is
"com.netscape.server.eb.UncheckedException: unchecked exception nested exception is:java.lang.NullPointerException".
I build the application and deployed it successfully.Iam using IAS 6.O with windows NT 4.0.
This is just a method which takes values from database and return as an array of bean to servlet.
Any help on this.Thanks ShankHi
I was using the session bean.Your suggestion helped me a lot.Perfect.
I debug my program and found that from ejbCreate()exception is getting.
I was getting the datasource object thro ejb create() initialisation.
Somehow the look up jndi which i mentioned was not interpretting from ejb-jar.xml ias-ejb-jar.xml and datasource ref .Due to this iam getting jndi Namenotfound exception which in turns to null pointer as datasource is getting null.
when i hardcoded in the ejb the the jndi name for datasource it is working fine.Bit worried all the existing ejbs working with the xml referenced datasource and jndi,but when i added a new ejb with same properties it is failing to get the jndi name.
Piece of code from ias-ejb-jar.xml
<resource-ref>
<res-ref-name>myDataSource</res-ref-name>
<jndi-name>jdbc/nb/myData</jndi-name>
</resource-ref>
Piece of code from ejb-jar.xml
<resource-ref>
<res-ref-name>myDataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
Thanks a lot meka -
Problem while calling java function from html
when i tried to call a java function from html i'm getting an error
object don't support this property.
what could be the reason.
This is my html.
I got this from this forum only.
My applet is accessing the system property "user.home".
I ran it in IE
<DIV id="dvObjectHolder">Applet comes here</DIV>
<br><br>
<script>
if(window.navigator.appName.toLowerCase().indexOf("netscape")!=-1){ // set object for Netscape:
document.getElementById('dvObjectHolder').innerHTML = " <object ID='appletTest1' classid=\"java:test.class\"" +
"height=\"0\" width=\"0\" onError=\"changeObject();\"" +
">" +
"<param name=\"mayscript\" value=\"Y\">" +
"<param name=\"archive\" value=\"sTest.jar\">" +
"</object>";
}else if(window.navigator.appName.toLowerCase().indexOf('internet explorer')!=-1){ //set object for IE
document.getElementById('dvObjectHolder').innerHTML = "<object ID='appletTest1' classid=\"clsid:8AD9C840-044E-11D1-B3E9-00805F499D93\"" +
" height=\"0\" width=\"0\" >" +
" <param name=\"code\" value=\"test.class\" />" +
"<param name=\"archive\" value=\"sTest.jar\">" +
" </object>"
</script>
<LABEL id="lblOutputText">This text will be replaced by the applet</LABEL>
<BR>
<input value="Javascript to java" type=button onClick="document.appletTest1.fromJavaScript()">I tried this example using the repy given to an earlier post.
But its not working with me.
What i did in addition was adding plugin.jar to classpath to import netscape.javascript.*;
Let me add some more details
1) I'll add the stack trace
2) my java progrma
3) batch file to sign the applet.
1) This is the stack trace i don't know whether u will undertand this
load: class test.class not found.
java.lang.ClassNotFoundException: test.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: C:\FastranJava\AppletObject\bin\test\class.class (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source)
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more
Exception in thread "Thread-5" java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletException(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2) Java Program
import netscape.javascript.*;
import java.applet.*;
public class test extends Applet
private JSObject win;
private JSObject outputLabel;
private boolean buttonFromJavaClicked=false;
checkJavaScriptEvent evt=new checkJavaScriptEvent();
public void init()
try
evt.start();
win=JSObject.getWindow(this);
outputLabel=(JSObject)win.eval("document.getElementById('lblOutputText')");
outputLabel.setMember("innerHTML", "<center><h1>From Init<br>Your Home directory" + System.getProperty("user.home") + "</h1></center>");
catch(Exception e)
e.printStackTrace();
public void fromJavaScript()
buttonFromJavaClicked=true;
public void fromJavaScript2()
System.out.println("Started Form JavaScript2");
try
String strLbl="<center><h1>From JavaScript<br>Your Homedir:" + System.getProperty("user.home") + "</h1></center>";
outputLabel.setMember("innerHTML", strLbl);
catch(Exception e)
e.printStackTrace();
class checkJavaScriptEvent extends Thread
public void run()
while(true)
if(test.this.buttonFromJavaClicked)
System.out.println("OK buttonfromjava is true");
test.this.buttonFromJavaClicked=false;
fromJavaScript2();
try
Thread.sleep(3000);
catch(Exception e)
e.printStackTrace();
3) Batch file
del *.cer
del *.com
del *.jar
del *.class
javac -classpath ".;C:\Program Files\Java\jre1.5.0_06\lib\plugin.jar" test.java
keytool -genkey -keystore harm.com -keyalg rsa -dname "CN=Harm Meijer, OU=Technology, O=org, L=Amsterdam, ST=, C=NL" -alias harm -validity 3600 -keypass password -storepass password
jar cf0 test.jar *.class
jarsigner -keystore harm.com -storepass password -keypass password -signedjar sTest.jar test.jar harm
del *.class -
Invalid column type error while calling db function.
We are getting an exception while calling the database function which returns a Varray of objects. We are using jpub to generate the wrapper method, ran sqlj to generate the JDBC code. The environment is weblogic 5.1 EJB container with ORacle 8.1.6.0.0 database. The JDBC driver is 8.1.7 thin, sqlj version is 8.1.7. I am giving below the exception.
When the sqlj option profile=false is not set, the error is Classcast exception. Appraently the weblogic connection object can not be used to do oracle specific calls. If somebody has done similar things(creating a bean which calls the stored function with weblogic which returns the oracle object types) or know what the issue is, please let me know.
Thanks,
Vijay.
stackTrace:
java.sql.SQLException: Invalid column type
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.sql.SQLException.<init>(SQLException.java:43)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:273)
at oracle.jdbc.driver.OracleStatement.get_internal_type(OracleStatement.java:4560)
at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:225)
at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:350)
at weblogic.jdbcbase.pool.Statement.registerOutParameter(Statement.java:438)
at sqlj.runtime.profile.ref.RTStatementJDBCCallable.registerOutParameter(RTStatementJDBCCallable.java:135)
at sqlj.runtime.profile.ref.ParamRegProfile$ParamRegCachedStatement.registerParameters(Compiled Code)
at sqlj.runtime.profile.ref.ParamRegProfile$ParamRegCachedStatement.getStatement(ParamRegProfile.java:101)
at sqlj.runtime.profile.ref.CachedStatementProfileWrapper.getStatement(CachedStatementProfileWrapper.java:134)
at sqlj.runtime.ExecutionContext$StatementStack.setStatement(ExecutionContext.java:995)
at sqlj.runtime.ExecutionContext.registerStatement(ExecutionContext.java:523)
at com.xpede.calculator.processor.jdbc.NewPrdGroupPkg.maincalculator(NewPrdGroupPkg.java:341)
----------------------Weblogic essentially wrappers the Oracle JDBC driver - as you can see from the stack trace, it does not just wrapper the connection object, but also the statement object.
The SQLJ runtime does not recognize the JDBC layer anymore as an Oracle JDBC driver.
What is happening at runtime may be the following:
(1) The invalid column type likely results from SQLJ attempting to register the type as Types.OTHER (code 1111). This typecode is not supported by Oracle JDBC.
(2) The class cast exception when using Oracle objects may result from a getObject() call which returns the value in default format (such as oracle.sql.ARRAY) rather than the JPublisher-generated wrapper object.
Are you using JDK 1.2 / runtime12.zip?
In that case you can try the standard (java.sql.)SQLData interface (in JPub: -usertypes=jdbc). However, this interface will not support wrappers for VARRAYs.
Maybe you are looking for
-
All, Am trying to create a table after dropping it, But facing the error. How can I check this one. Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production SQL> drop table admin.TBL_TENANTSUBSCRIPTION; drop table admin.TBL_T
-
I don't know how to take them off my account without having their iPad please help I don't want them using my number
-
APP open item selection based on Day in Arrears
Dear Consultants, i am trying to select open item which are fall under 15 to 30 days in Arrears on free selection tab, but i could not get it. please advice. George
-
This is more of a wishful post that I hope an apple developer stumbles across and thinks is a good idea to put into a future OSX Lion update. My wish is that when I fullscreen a new app (like safari, chrome, mail, etc.) I can choose where it adds the
-
How to update msi 7800GT in a healthy way????
I apologise for my ignorance and I apreciate and kind of help. I got MSI 7800 GT 256DDR3, and I installed the vga-driver that came with it. Shall I wait for the updates from LIVE UPDATE or shall I check in nVidia site? IS there any drivers that assur