Java Applet in a HTML page: failing with PLS-00306: wrong number of args
We are trying to use a Java Applet in a HTML page. as our system needs to be able to retrieve a predefined set of data from a third party system that uses Dynamic Data Exchange Protocol (DDE) and are encountering errors from APEX and in IE itself.
We are using JavaDde from www.nevaobject.com that enables our Java applet to interact with Windows applications (Third Party System) using DDE.
This functionality is currently used in our Web Form 6i application and we are trying to use the same in the new ApEx application.
We are using ApEx version : 2.1 and actually aer encountering 2 problems:
Problem 1: ApEx failing with PLS-00306: wrong number or types of arguments in call to 'ACCEPT'
Problem 2: IE crashes if Applet used in a complex page with several regions (1 Context, 4 Report Regions, 2 level Tabs, Links)
This problem does not occur in the page where there is only applet and one region. In the case of complex page the IE crashes if the page is reloaded
Test scenario:
1- Create a simple page with the HTML region.
2- Define the Source of the above region as follows
<OBJECT CLASSID="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
CODEBASE="http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab#version=1,4,0,0"
WIDTH="1"
HEIGHT="1"
ID="simpleApplet"
NAME="simpleApplet">
<PARAM NAME="code" VALUE="simpleApplet.class" >
<PARAM NAME="archive" VALUE="simpleApplet.jar" />
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.4">
</OBJECT>
3- Create a simple Java applet "simpleApplet" - for the test its enough if the applet will have just the init method printing out the mesage to the console
4- Create a Submit Button (not redirect) in Region Header and create unconditional (do not set When Button Pressed property) Page Branch to navigate to another page (the page without the applet)
6- Run the page and Submit -
The error below is returned by the engine:
In our case our applet is called ddeApplet - I do not know why is ApEx passing the Applet's ID down to the wwv_flow.accept method as a parameter
Tue, 24 Jul 2007 08:15:39 GMT
ORA-06550: line 7, column 2:
PLS-00306: wrong number or types of arguments in call to 'ACCEPT'
ORA-06550: line 7, column 2:
PL/SQL: Statement ignored
DAD name: rbdev2_ax
PROCEDURE : wwv_flow.accept
URL : http://castor:7778/pls/rbdev2_ax/wwv_flow.accept
PARAMETERS :
============
P_FLOW_ID:
147
P_FLOW_STEP_ID:
500
P_INSTANCE:
6986070096861669560
P_PAGE_SUBMISSION_ID:
1005758
P_REQUEST:
CRASH
P_ARG_NAMES:
100380029717786501
P_T01:
147
P_T02:
101
P_T03:
5000044
P_T04:
1
P_T05:
S
DDEAPPLET:
Ddeapplet[panel0,0,0,1x1,layout=java.awt.BorderLayout,rootPane=javax.swing.JRootPane[,0,0,1x1,layout=javax.swing.JRootPane$RootLayout,alignmentX=null,alignmentY=null,border=,flags=385,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]
P_MD5_CHECKSUM:
ENVIRONMENT:
============
PLSQL_GATEWAY=WebDb
GATEWAY_IVERSION=2
SERVER_SOFTWARE=Oracle HTTP Server Powered by Apache/1.3.19 (Unix) mod_fastcgi/2.2.10 mod_perl/1.25 mod_oprocmgr/1.0
GATEWAY_INTERFACE=CGI/1.1
SERVER_PORT=7778
SERVER_NAME=castor
REQUEST_METHOD=POST
QUERY_STRING=
PATH_INFO=/pls/rbdev2_ax/wwv_flow.accept
SCRIPT_NAME=/pls
REMOTE_HOST=
REMOTE_ADDR=192.168.66.169
SERVER_PROTOCOL=HTTP/1.1
REQUEST_PROTOCOL=HTTP
REMOTE_USER=
HTTP_CONTENT_LENGTH=661
HTTP_CONTENT_TYPE=application/x-www-form-urlencoded
HTTP_USER_AGENT=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
HTTP_HOST=castor:7778
HTTP_ACCEPT=image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*
HTTP_ACCEPT_ENCODING=gzip, deflate
HTTP_ACCEPT_LANGUAGE=en-us
HTTP_ACCEPT_CHARSET=
HTTP_COOKIE=ISCOOKIE=true; LOGIN_USERNAME_COOKIE=rdanko; ORACLE_PLATFORM_REMEMBER_UN=RDANKO:ngrb; WWV_FLOW_USER2=70FBB00945FE46B9; V6_AUTHENTICATION_COOKIE=70FBB00945FE46B9
Authorization=
HTTP_IF_MODIFIED_SINCE=
HTTP_REFERER=http://castor:7778/pls/rbdev2_ax/f?p=147:500:6986070096861669560:::::
HTTP_SOAPACTION=
"theArrow",
It looks like whatever HTML you're including on your page is creating HTML input form elements inside the HTML form "wwv_flow". This form is posted to wwv_flow.accept, and of course, the PL/SQL procedure wwv_flow.accept doesn't know anything these additional arguments/form elements you're attempting to POST.
Joel
Similar Messages
-
Hi,
We currently run Crystal Reports v10 with ODBC (CR Oracle ODBC Driver 4.20) to Oracle 9i database (on solaris) and have some reports which gets data (ref cursors) from stored procedures. So far so good and now we are upgrading our oracle database to 10g on Linux server and during my testing these reports give the following error.
Error Description:
Failed to open rowset
Query Engine Error: HY000:[DataDirect][ODBC Oracle driver]ORA-06550:line 1, column 8:
PLS-00306: wrong number or types of arguments in call to 'MY_STORED_PROCEDURE'
ORA-06550: line1, column 35:
PLS-00363: expression 'MY_PARAM_VALUE' cannot be used as an assignment target
ORA-6550: lin1, column8:
PL/SQL: Stateme'
Any help would be greatly appreciated.
Thanks,
-Venkat GopalanDiscovered on another post that 4.2 is too old. You need to upgrade to a more current ODBC driver that runs on Solaris.
We have a newer one version 5.3 but it's only for windows. Go to Datadirect.com and see if they have one for that OS.
Otherwise you'll have to configure your reports to use the native Oracle driver.
Thank you
Don -
Using the "Open File" menu, file:///Users/234866H/Documents/atom/atomic1.html fails to open the java applet atomic1.class inside atomic.html. However, http://atom.curtin.edu.au/igor/atom/atomic1.html works just fine.
I suspect the problem arose following the recent java upgrade. It is also there on Safari.
Testing Java at http://www.java.com/en/download/testjava.jsp yields:
"Your Java is working. Your Java configuration is as follows: Vendor: Apple Inc. Version: Java SE 6 Update 51 Operating System: Mac OS X 10.6.8 Java Architecture: 64-bit"
However, this is an http test, and not an "Open File" test.
Any help would be appreciated.Hello, I don't know about this specifically but this is what I would try.
Instead of the string "\u7834\u70C2\u7269\u7A0B\u5E8F\u5458..."
Set the encoding type in the String constructor first...
ie:
new String( "\u7834\u70C2\u7269\u7A0B\u5E8F\u5458...","GB18030");
Here is a little class I whipped up to show the CharSets that are available to you..
public class ShowAllCharSets
ShowAllCharSets()
Map myMap = Charset.availableCharsets();
Iterator iterator = myMap.keySet().iterator();
while (iterator.hasNext())
System.out.println("Char set name = "+((String)it.next()));
public static void main(String args[])
new ShowAllCharSets();
}Then use the preset charset String with the specific encoding already set for your menu items.
GB18030 I picked arbitrarily because it is Chinese and you may have to try another.
Good Luck!
(T) -
Problem Running a java applet from an HTML page
I can run my applet at the command prompt with:
appletviewer coffee.html
But when I try and open the Coffee.html by opening
the page in Internet Explorer I get the following message:
Can't find Database driver class: java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver
Code: createcoffees.java
import java.applet.*;
import java.sql.*;
public class CreateCoffees extends Applet{
public void init() {
Statement stmt;
Connection con;
try {Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
} catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
try {con = DriverManager.getConnection("jdbc:odbc:hq","afm", "afm");
stmt = con.createStatement();
stmt.executeQuery("SELECT * FROM RM");
stmt.close();
con.close();
} catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
}Is your jdbc-odbc driver properly loaded? Its very clear that its a class not found exception which is thrown by this:
try {Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
} catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage()); -
Notification with user defined type results in PLS-00306: wrong number..
I created a user defined type TLogMessage:
CREATE OR REPLACE TYPE TLogMessage AS OBJECT
module VARCHAR2(4000),
severity NUMBER,
message VARCHAR2(4000)
I also created a multi-consumer queue using this type as payload.
My callback procedure in the package PK_SYST_LOGMESSAGE is defined as follows:
PROCEDURE DefaultLoggerCallback(
context RAW,
reginfo SYS.AQ$_REG_INFO,
descr SYS.AQ$_DESCRIPTOR,
payload RAW,
payload1 NUMBER
Finally, I registered the callback procedure as follows:
DBMS_AQADM.ADD_SUBSCRIBER(
queue_name => QUEUE_NAME,
subscriber => SYS.AQ$_AGENT(
name => 'default_logger',
address => NULL,
protocol => NULL
DBMS_AQ.REGISTER(
SYS.AQ$_REG_INFO_LIST(
SYS.AQ$_REG_INFO(
name => QUEUE_NAME || ':default_logger',
namespace => DBMS_AQ.NAMESPACE_AQ,
callback => 'plsql://MTDX.PK_SYST_LOGMESSAGE.DefaultLoggerCallback',
context => HEXTORAW('FF')
1
However, when I put a message in the queue using this procedure:
PROCEDURE LogMessage(
pModule VARCHAR2,
pSeverity NUMBER,
pMessage VARCHAR2
IS
vMessage TLogMessage;
vEnqueueOptions DBMS_AQ.ENQUEUE_OPTIONS_T;
vMsgProperties DBMS_AQ.MESSAGE_PROPERTIES_T;
vMessageHandle RAW(16);
BEGIN
vMessage := TLogMessage(module => pModule, severity => pSeverity, message => pMessage);
vEnqueueOptions.visibility := DBMS_AQ.IMMEDIATE;
vMsgProperties.correlation := pModule;
vMsgProperties.priority := -pSeverity;
-- Enqueue the message to all subscribers
DBMS_AQ.ENQUEUE(
queue_name => QUEUE_NAME,
enqueue_options => vEnqueueOptions,
message_properties => vMsgProperties,
payload => vMessage,
msgid => vMessageHandle
EXCEPTION
WHEN no_subscribers THEN
-- No subscribers on the queue; ignore
NULL;
END;
I can see the message in the queue, by querying the queue view. I can also see that Oracle tried to call my callback procedure, because in the trace file I see the following:
*** 2009-02-13 08:52:25.000
*** ACTION NAME:() 2009-02-13 08:52:24.984
*** MODULE NAME:() 2009-02-13 08:52:24.984
*** SERVICE NAME:(SYS$USERS) 2009-02-13 08:52:24.984
*** SESSION ID:(609.3387) 2009-02-13 08:52:24.984
Error in PLSQL notification of msgid:4F7962FEDD3B41FA8D9538F0B38FCDD1
Queue :"MTDX"."LOGMESSAGE_QUEUE"
Consumer Name :DEFAULT_LOGGER
PLSQL function :MTDX.PK_SYST_LOGMESSAGE.DefaultLoggerCallback
: Exception Occured, Error msg:
ORA-00604: Fout opgetreden bij recursief SQL-niveau 2.
ORA-06550: Regel 1, kolom 7:
PLS-00306: Onjuist aantal of type argumenten in aanroep naar 'DEFAULTLOGGERCALLBACK'..
ORA-06550: Regel 1, kolom 7:
PL/SQL: Statement ignored.
So.. how many parameters does Oracle expect, and of what type? Is there any way to find out? What is wrong with my code?Ok, found it... I had defined the last parameter of the callback procedure as 'payload1' (that is: 'payload-ONE') instead of 'payloadl' ('payload-ELL'). It all works like a charm now.
What a way to waste two whole days! -
FND_REQUEST.SUBMIT_REQUEST via forms erroring in CM with PLS-00306
Hello,
I have a form that needs to submit a custom concurrent program when a button is pressed on a form. The code is in the when-button-pressed trigger and is as follows:
declare
v_req_id NUMBER;
v_project_name VARCHAR2(32);
v_subject VARCHAR2(70);
v_message VARCHAR2(240);
v_email_from VARCHAR2(30):= 'PROJECT_EMAIL';
v_email_to VARCHAR2(30):= 'BONNI_SMITH';
v_yes_no VARCHAR2(1) := 'Y';
begin
select :TFN_PROJECT_DETAILS.project_num||' '||:tfn_project_details.project_desc
into v_project_name
from dual;
select 'PROJECT '||:tfn_project_details.project_num||' NOTIFICATION'
into v_subject
from dual;
select v_project_name||' project has been created in the project system'
into v_message
from dual;
FND_MESSAGE.DEBUG('proj name: '||V_PROJECT_NAME);
FND_MESSAGE.DEBUG('message: '||V_MESSAGE);
FND_MESSAGE.DEBUG('subject: '||V_SUBJECT);
v_req_id := FND_REQUEST.SUBMIT_REQUEST
('TALBOTS',
'TFNSENDEMAIL',
'TFN_PROJECT_DETAILS',
FALSE,
v_email_from,
v_email_to,
v_subject,
v_message,
v_yes_no,
FND_MESSAGE.DEBUG(v_req_id);
IF (v_req_id = 0) then
fnd_message.retrieve;
fnd_message.error;
Raise Form_Trigger_Failure;
ELSE
FND_MESSAGE.SET_STRING('Email Request submitted. Request ID '|| v_req_id);
fnd_message.show;
:tfn_project_details.last_email_date := sysdate;
APP_STANDARD.EVENT('KEY-COMMIT');
END IF;
end;
This code gives me an error in the request log of: PLS-00306: wrong number or types of arguments in call to 'SEND_EMAIL'
I have verified that the type of the arguments is correct, so I am assuming that it is upset over the number? I have recounted several times and come up with the 100 required. I have also changed the parameters from hard-coded to parameters and it has made no difference. I even put an 'x' in the last parameter to make sure that the entire string is being passed, and when I look in the request sable it is there in the table data as the 100th parm. I have made sure that the varaibles in the trigger match the lengths and types of the parameters in the CM program.
I have practically the same trigger submitting a different CM job and it works perfectly. Both CM requests are custom host scripts.
Can anyone offer help on this?I shortened the code and the error is:
"could not be evaluated because of error ORA-00923: FROM keyword not found where expected"
This isn't of much help to me.
Edited by: user11970177 on Mar 4, 2011 7:06 AM -
Embedded Java Applet NullPointerException in JSPX pages
We have a ADF web application programmed in JDeveloper 11g (11.1.2.4.0), which was migrated over from a 10g (10.1.3.5.0) project
Within the application, occasionally, we need to call a Java Applet which is placed in a public_html/applet folder. The jars show up in the Web-Content tab of the ViewController in the Application Navigator, just like it did in 10g.
The applet tag looks like this:
<applet height="100" width="100" code="applet.SetupApplet" archive="applet/SSetupApplet.jar">
<param name="debug" value="true"/>
</applet>
I've also tried calling the applet with the Java deploy applet script
<trh:script source="http://java.com/js/deployJava.js"></trh:script>
<trh:script>
var attributes = {code:'applet.SetupApplet',
archive:'applet/SSetupApplet.jar'};
var parameters = {} ;
var version = '1.6' ;
deployJava.runApplet(attributes, parameters, version);
</trh:script>
When I navigate to the login.jspx page that has this tag, it pops the Java Console open, but doesn't actually run the applet (or show the prompts to allow using the Applet). Instead, the applet is shown with an error and the error says "NullPointerException". I've double-checked the path and it's correct (with incorrect paths, I get a ClassNotFoundException). In the application server logs, I see the following error:
<Warning> <Socket> <BEA-000449> <Closing socket as no data read from it on IPADDRESS during the configured idle timeout of 5 secs>
I created a normal .jsp file that's outside the ADF Faces Context in the applet folder. Navigating to it with the same applet tags does have the Java applet run without the socket error. The same code in 10g works fine.
Is there anything I'm missing?
Thanks.Hi,
this is how I did it in 11g R1: http://www.oracle.com/technetwork/developer-tools/adf/learnmore/71-adf-to-applet-communication-307672.pdf
Frank -
The applet in my html page keep poping up
The applet I put on the HTML page keep poping up, how can have on the same web page without poping
<Html>
<Head>
<Title>Java Example</Title>
</Head>
<Body>
This is my page<br>
Below you see an applet<br>
<br>
<Applet Code="Ch6_PrExercise7.class" width=200 Height=100>
</Applet>
</Body>
</Html> here is the code
//This Java Program determines the amount on maturity.
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import static java.lang.Math.*;
public class Ch6_PrExercise7 extends JFrame
private JLabel amtL, yearL, interestL, valueL;
private JTextField amtTF, yearTF, interestTF, valueTF;
private JButton calculateB, exitB;
private CalculateButtonHandler cbHandler;
private ExitButtonHandler ebHandler;
private static final int WIDTH = 400;
private static final int HEIGHT = 300;
public Ch6_PrExercise7()
//create four labels
amtL = new JLabel("Amount deposited : ",
SwingConstants.RIGHT);
yearL = new JLabel("Duration in years : ",
SwingConstants.RIGHT);
interestL = new JLabel("Interest rate : ",
SwingConstants.RIGHT);
valueL = new JLabel("Value on maturity : ",
SwingConstants.RIGHT);
//create four textfields
amtTF = new JTextField(10);
yearTF = new JTextField(10);
interestTF = new JTextField(10);
valueTF = new JTextField(10);
//create Calculate Button
calculateB = new JButton("Calculate");
cbHandler = new CalculateButtonHandler();
calculateB.addActionListener(cbHandler);
//create Exit Button
exitB = new JButton("Exit");
ebHandler = new ExitButtonHandler();
exitB.addActionListener(ebHandler);
//set the title of the window
setTitle("Calculating Interest");
//get the container
Container pane = getContentPane();
//set the layout
pane.setLayout(new GridLayout(5, 2));
//place the components in the pane
pane.add(amtL);
pane.add(amtTF);
pane.add(yearL);
pane.add(yearTF);
pane.add(interestL);
pane.add(interestTF);
pane.add(valueL);
pane.add(valueTF);
pane.add(calculateB);
pane.add(exitB);
//set the size of the window and display it
setSize(WIDTH,HEIGHT);
setVisible(true);
setDefaultCloseOperation(EXIT_ON_CLOSE);
private class CalculateButtonHandler implements ActionListener
public void actionPerformed(ActionEvent e)
double year, amt, interest, value;
amt = Double.parseDouble(amtTF.getText());
year = Double.parseDouble(yearTF.getText());
interest = Double.parseDouble(interestTF.getText());
value = amt * pow((1.0 + (interest/100.0)), year);
valueTF.setText("" + String.format("%.2f", value));
private class ExitButtonHandler implements ActionListener
public void actionPerformed(ActionEvent e)
System.exit(0);
public static void main(String[] args)
Ch6_PrExercise7 interestProductObject = new Ch6_PrExercise7();
}ronisto wrote:
I dont know what u asking,Obviously. You try to have an applet without even knowing what it is.
Read this: [http://java.sun.com/docs/books/tutorial/deployment/applet/] -
How can we install the Java Plugin from the html page
Hi,
I am using java plugin 1.3.1_02 for my applet pages.
How can I install that plugin in the client machine without installing manually.
I used,
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width="600" height="400" align="middle"
codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,1,2">
<PARAM NAME="code" VALUE="SignedAppletDemo.class">
<PARAM NAME="archive" VALUE="SSignedApplet.jar">
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
</OBJECT>
But it is downloading java plugin 1.3.1_03.
Can anybody help me
Thanks & Regards
RajaUsing object tags is the correct way and only way to download the plugin and let the client decide whether he can download it r not. There is no way to install automatically
I dont think there is a way to install automatically without a user intervention coz, it can open the floodgates for potential hackers.
Can u cite an example about which programs can be installed automatically and why do u want the plugin to be installed automatically?
ciao -
Can Java Applet Call the ASP Page
Hi,
I would like to know whether the Java Applet can call the ASP page.
If it can be done, how does the Java Applet get the value from ASP page?
Please provide me some running example.
Thanks.I would like to know whether the Java Applet can
an call the ASP page.Something like:
AppletContext.showDocument(new URL("http://wherever/myPage.asp"), "_blank");
how does the Java Applet get the value from ASP page?What?
Please provide me some running example.Nope. -
Java Applet problem in Internet Explorer 7 with Tab Key
Hi
I am developing some web pages in which iam using a java applet. so far the intended user are supposed to be using Internet Explorer 7. the problem i am facing is that when i press the tab key within the applet. the control get transferred to new tab position in the web page outside the applet and i have to click back to the applet to get control again transferred to the applet.
i want to restrict the control of tab so that when tab is pressed within the applet the tab should not move to next tab position in the page and remain confined within the applet.
Can someone please help me how can i achieve this and whether i have to do coding for it in the applet or in the web page...so that within the applet the Internet Explorer tab control should remain disabled..Hello all,
I have the same problem, but I don't found a solution. Could you resolved the problem and who??
Thank you.
Jorge -
I have used php to write a socket server(text chat server),
then I use xmlsocket to write a client, I put this swf file in my html page, erverything of this client swf were ok: ervery clients could send or receive messages, but the other http request in this html page was unable to send(or receive) data from webserver,
webserver and chat server were on the same server,
and I have tried to use socket to instead if xmlsocket in my flash, but the new swf can only work in flash cs3, but it couldn't work in html page as the chat server can't send the security xml file to this swf, and I have also use Security.loadPolicyFile("http://192.168.139.128/crossdomain.xml"); to load security file, but it took none effect.
Is there anyone can suggest me ?
That's very kind of you!Hi Franco,
Yes, I solved that by reinstalling Java 6 Update 21.
There are three versions for Solaris namely, SPARC, x64 and x86. Our platform is SPARC and I think System admin has installed the wrong version instead of installing SPARC version of Java.
After installing SPARC version of Java this got resolved. And I confirmed everything is fine by running a small program as below. You can run this program from command line using the -d64 flag. If the installation is wrong you will get the same exception as I mentioned.
public class Analyzer {
public static void main(String args[]) throws Exception{
InputStream fin = new FileInputStream(args[0]);
int iSize = fin.available();
byte mvIn[] = new byte[iSize];
fin.read(mvIn,0,iSize);
fin.close();
String strText = new String(mvIn);
PrintStream fout = new PrintStream(new FileOutputStream(args[0]+".csv"));
fout.println("Before,After,Seconds");
Pattern p = Pattern.compile("\\[(?:Full |)GC (\\d*)K->(\\d*)K\\(\\d*K\\), ([\\d.]*) secs\\]");
Matcher m = p.matcher(strText);
while(m.find()){
fout.println(m.group(1)+ "," + m.group(2) + "," + m.group(3));
fout.close();
}Hope this helps.
Regards,
Prabhu -
Uploading edited html pages built with adobe muse
When I make changes to my muse site and FTP the html page those changes were made on, the published page looks out of whack - for example the text is too close to the edge of the text box no matter how much I offset it. Particularly if the changes were made inside a widget like the accordion or tabbed panel. Do I need to re-FTP the CSS folder and the scripts folder whenever I make a change to a page?
Your scripts file should be fine if you just made simple edits but yes, you should also upload the CSS files.
-
CLob update failing with PLS-00172: string literal too long
I have a clob column which needs to updated with a message on message_id
Table description
SQL> desc cl_message1
Name Null? Type
MSG_ID NOT NULL NUMBER(10)
DATA NOT NULL CLOB
Update statement:
variable data1 clob;
begin
:data1:='TESTHDR^Add^200812310374^2012-08-19 15:53:22.0^
TESTHDR^Add^200812310374^5652^C0000029^2012-08-19 15:46:49.0^
TESTDWN^ADD^200812310374^5652^G^03^00000999990000722444^
... ----------------------------------------------------------------------------------------- 2376 lines of text-------------------------
TESTDWN^ADD^200812310374^5674^G^10^00000999990000743289^
TESTEND^5674^';
UPDATE cl_message1
SET DATA=:data1
WHERE
msg_id = '989';
END;
When I run this statement it fails with
SQL> @test_clob_insert.sql
:data1:='WAVEHDR^Add^200812310374^2012-08-19 15:53:22.0^
ERROR at line 2:
ORA-06550: line 2, column 10:
PLS-00172: string literal too long
As per my understanding a bind variable can store maximum value of clob. Not sure why this is throwing this error. Please help
Regards
This column is stored in_row.
SQL> r
1* select owner,table_name,column_name,in_row from dba_lobs where table_name='CL_MESSAGE1'
OWNER TABLE_NAME COLUMN_NAME IN_
VEERA CL_MESSAGE1 DATA YES
Edited by: 953621 on Aug 19, 2012 10:34 PM
Edited by: 953621 on Aug 19, 2012 11:44 PM953621 wrote:
As per my understanding a bind variable can store maximum value of clob. Not sure why this is throwing this error. Please helpYes, if the bind variable is declared as a clob, then it can store the maximum size of the clob, but that's not your issue.
Your issue is that you are setting the clob data using a string literal i.e. a single string between quotes. There is a limit to the size of string literals, so you would have to build up the clob by appending many string literals together instead. -
Pages failing with Java Heap errors
We are running CF 8,0,0,176276 on a Windows 32 bit 2003
server, with IIS 6 and Java Runtime version 6 ( it's really version
1.06).
We started getting the java heap error messages two weeks
ago. Now we are also getting the 'GC overhead limit exceeded'
error, which is concerned with the Java garbage collection. I tried
to change the JVM heap size from 1GB to 2GB, but CF wouldn't start
up. I've since found out that Windows 32bit servers can't use 2GB
for Java.
One java article I found said to turn off the Java garbage
collection using -XX:-UseGCOverheadLimit (
http://forums.java.net/jive/message.jspa?messageID=228596).
It seems like turning off the garbage collection would be the
opposite of what I am trying to do. Are there any thoughts about
this?
Are there any hotfixes for CF8? and where are they located?
ScottScott, the error is a symptom, not the cause of your
problems. Turning off that option won't "solve" the problem, which
is that you're running out of memory. More on that option in a
moment.
Let's talk first about your observation of trying to change
the max memory from 1 to 2 gig. Since you're on Windows (32 bit),
as you say, you can't use more than 2g per process (it's not really
a Java limit, but rather a Windows one).
But as you found, you can't set CF to 2g because the JVM
won't start. Again, this is not a CF-specific issue. You can see
discussions of the same problem with plain old Java apps, as at
http://forums.java.net/jive/message.jspa?messageID=228596.
So, similar to what they say, the consensus seems to be that
you can set it to somewhere between1.3 and 1.7 gb, before the JVM
won't start. You have to try different values for yourself.
Now, that extra few hundred meg may be all you need to get
past your problem, but really that's often just forestalling the
inevitable. You need to find why CF is using so much memory. You
say you're using CF8 but don't say if it's Enterprise or Standard.
If the former, then you have the CF8 Server Monitor (accessible in
the CF Admin, and discussed in a multipart series I wrote for the
Adobe Dev Center, as discussed at
http://carehart.org/blog/client/index.cfm/2008/7/30/45page_server_monitor_guide).
That, as well as tools like FusionReactor and SeeFusion, can help
you to better see how CF is using memory.
All three offer a graphical interface to show how memory use
is trending. You may see if it grows steadily throughout the day,
or grows in spikes. People tend to say "I have a memory leak", when
in fact it may be just that they have either a few requests that
use too much memory (so you'll see a stair stepping rise in memory
use concurrent with their execution), or it may be that they're
sticking stuff into shared scopes (session, application, or server)
and those are living well beyond the live of each request.
The CF8 Server Monitor even has a memory tracking feature,
but it has to be used carefully. If you enable it, you may find it
brings your server to its knees.I'll do a blog entry soon on how to
use it most effectively (something I learned since writing the
articles last year).
One thing that the monitor can tell you, without any of the
"start" buttons enabled at the top of the monitor, is how many
sessions you have. That may be very enlightening. You may have
thousands of them, and not realize it, because of bots, spiders,
and other crap requests. See the "active sessions" page of the
Server Monitor, and its graph icon in particular (discussed in more
detail in one of my articles).
Sadly, neither FusionReactor nor SeeFusion can tell you how
many sessions are currently running, so if you're on CF8 Standard
(or if others reading this are on 6 or 7, where they can use FR or
SF), you can't easily see how many sessions there are. (There are
undocumented, unsupported methods, such as discussed at
http://rewindlife.com/2003/09/08/undocumented-application-scope-functions/.
Just be aware some techniques work differently depending on whether
J2EE sessions are enabled in th CF admin.)
Finally, about your observation of the usegcoverheadlimit
option, and the recommendation to turn it off: the article you
point to doesn't say doing so would disable GC. I'm curious how you
may have concluded that.But digging into things more, I see that
disabling it (using the - before it) will turn off a feature
(introduced in 6) which limits the proportion of the VM's time that
is spent in GC before an OutOfMemory error is thrown. That's the
error you're seeing, that the JVM has detected too much time is
being spent in doing GC.
So turning off the option doesn't "turn off the Java garbage
collection". It just changes whether an OOM error will be thrown
even before being really out of memory, simply because too much
time is being spent in GC.
And even then, how this option works (if enabled, which it is
by default) changes depending on whether you're using a parrallel
or concurrent collector (as discussed in two places in
http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html,
if you search for that switch).
Hope some of that helps.
Maybe you are looking for
-
Getting Error while trying to select SS function from Tab(HTMl Tab on OAF)
Hi All, I was trying to create a TAb navigation for the Self Service functions. There are 3 4 functions (Transactions) all other are working fine while I am trying to navigate via tabs. But there is a seeded SS function "Home Contac"(HR_PERINFO_SS) t
-
How to create object in sproxy--
Hi all i am new to XI how to create a new object in sproxy transction there is no such option called create in sproxy transction , i can only see a option called edit object kindly hepl me out , to create new object in spoxy.
-
Hi, I was wondering if there was a simple way to add an icon to the specific items in the menu bar. I see that there is a property in the portal file to select an active, inactive, and rollover image; but using them will replace the page/book title.
-
How can I email webpages in safari
how can I email webpages in safari
-
IPod not syncing: no help provided online
My iPod won't sync, and iTunes tells me to reset=, B UT get this: It says I am not con nected to the internet, which I obviously am. Now I'm stuck, with a non-syncable iPod, and a stupid error. Help?