"identifier DBMS_FGA must be declared" When called from PL/SQL package...
Hi there,
I am trying to call dbms_fga dynamically (of sorts) from a package, and I am getting the error as per the title.
I have tried as many ways as i can think of calling this from another package, with similar results each time.
The user/owner of the package has DBA rights, so it doesn't appear to be a permissions issue.
Oracle Version is 11.1.0.6.0 on Suse.
any ideas on this anyone?
Cheers
CODE:
Attempt 1:
PROCEDURE enable_sql_auditing (on_off in boolean default false) is
v_ssql varchar2(900);
cursor c1 is
select table_name
from all_all_tables
where owner=gcv_pkg_owner;
begin
for rec in c1 loop
sys.dbms_fga.add_policy(object_schema =>''|| gcv_pkg_owner ||'',
object_name => ''|| rec.table_name ||'',
policy_name => ''|| rec.table_name || '_AUDIT''',
handler_schema => ''|| gcv_pkg_owner ||'',
handler_module => 'FGA_SQL',
enable => true);
end loop;
end enable_sql_auditing;
Attempt 2:
PROCEDURE enable_sql_auditing (on_off in boolean default false) is
v_ssql varchar2(900);
cursor c1 is
select table_name
from all_all_tables
where owner=gcv_pkg_owner;
begin
for rec in c1 loop
v_ssql := 'begin sys.dbms_fga.add_policy(object_schema =>''' ||gcv_pkg_owner|| ''', object_name => '''||rec.table_name||''', policy_name => '''||rec.table_name||'_AUDIT'', enable => true); end;';
execute immediate (v_ssql);
end loop;
end enable_sql_auditing;
Frenchwood wrote:
The user/owner of the package has DBA rights, so it doesn't appear to be a permissions issue.But it is.
DBA is a role.
permissions within PL/SQL have to be directly granted rather than through roles.
i.e. you need to directly grant execute permission on the package to the required user(s).
Similar Messages
-
Java works stand alone does not when called from PL/SQL
I have this piece of code, which works as a standalone program: It takes in the en_var and returns a path.
But it wont work when called from a store procedure the line of code p = rt.exec("echo "+envar); returns a path as a standalone program returns null when called from a Oracle store procedure.
Thanks for any help just going around and round in circles.
import java.util.*;
class translate
public static String translatePath(String envar)
Runtime rt = Runtime.getRuntime();
int bufSize = 4096;
byte buffer[] = new byte[bufSize];
String path = null;
Process p = null;
String os = null;
String name = null;
String home = null;
String dir = null;
SecurityManager sm = null;
int len = 0;
try
System.out.println("Calling echo "+envar);
os = System.getProperty("os.name");
name = System.getProperty("user.name");
home = System.getProperty("user.home");
dir = System.getProperty("user.dir");
sm = System.getSecurityManager();
p = rt.exec("echo "+envar);
BufferedInputStream bis = new BufferedInputStream(p.getInputStream());
while ((len = bis.read(buffer, 0, bufSize)) != -1)
System.out.write(buffer, 0, len);
path = new String(buffer);
//p.waitFor();
bis.close();
return path;
catch(Exception e)
System.out.println("Exception "+e);
return "ProcessProblem";
//path = "/rims/live/log";Still cant get it to work, it doesnt fall over anymore, but when I input $PATH, it will output $PATH instead of the path for $PATH i.e /rims/live: What does your program output please:
Here is my code:
import java.io.*;
import java.util.*;
class translate
public static String translatePath(String envar)
Runtime rt = Runtime.getRuntime();
Process p = null;
String echoOutput = null;
int len = 0;
try
System.out.println("Calling echo "+envar);
p = rt.exec(new String[]{"/bin/echo",envar});
InputStreamReader isr = new InputStreamReader(p.getInputStream());
BufferedReader br = new BufferedReader(isr);
echoOutput = br.readLine();
br.close();
isr.close();
return echoOutput;
catch(Exception e)
System.out.println("Exception "+e);
return "ProcessProblem";
//path = "/rims/live/log";
Thanks for all your help so far.
Tony -
Refcursor not returning rows when called from non SQL*Plus IDE or other
Hi all,
I have a very weird problem.
We have recently performed a minor upgrade to our oracle database and are now using:
SQL> select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
PL/SQL Release 10.2.0.5.0 - Production
CORE 10.2.0.5.0 Production
TNS for Linux: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 - Production
5 rows selected.We have a crystal report selecting data from a refcursor returned by a stored procedure.
The stored procedure updates data when called as well as returning the refcursor in question.
Observe the following test scenario executed in SQL*Plus:
SQL> create table testtab (teststr varchar2(100));
Table created.
Elapsed: 00:00:00.00
SQL> insert into testtab values ('X');
1 row created.
Elapsed: 00:00:00.00
SQL> create or replace procedure testtabproc (p_listcur in out sys_refcursor)
2 as
3 begin
4
5 open p_listcur for
6 select *
7 from testtab
8 where teststr = 'X';
9
10
11 update testtab
12 set teststr = 'Y';
13
14 commit;
15
16 end;
17 /
Procedure created.
Elapsed: 00:00:00.00
SQL> declare
2
3 v_list_cur sys_refcursor;
4
5 type t_out_rec is record (teststr varchar2(100) );
6
7
8
9 v_out_rec t_out_rec;
10
11 v_rec_count number := 0;
12 v_count_limit number := 10000;
13
14 begin
15
16 dbms_output.put_line('about to call proc');
17
18 testtabproc(v_list_cur);
19
20 dbms_output.put_line('about to fetch records');
21
22 fetch v_list_cur into v_out_rec;
23 while v_list_cur%found loop
24 v_rec_count := v_rec_count + 1;
25 if v_rec_count <= v_count_limit then
26 dbms_output.put_line(v_out_rec.teststr);
27 end if;
28 fetch v_list_cur into v_out_rec;
29 end loop;
30 dbms_output.put_line('complete. selected '||v_rec_count||' records.');
31
32
33 end;
34 /
about to call proc
about to fetch records
X
complete. selected 1 records.
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.00
SQL> select * from testtab;
TESTSTR
Y
1 row selected.
Elapsed: 00:00:00.00
SQL> as you can see, the cursor returns data and the table is updated.
now, our problem is with crystal and also when I use the same test case via another IDE like TOAD.
No data is returned from the list but the table is still updated.
We suspect that something is happening that is causing the table to be updated before the refcursor is opened, or at least before the predicates are applied.
has anyone else encountered this problem before?Tubby wrote:
WhiteHat wrote:
nope - it works from sqlplus itermitantly (i.e. we always get the debug output but the cursor only sometimes fetches the rows).
it is almost as if the commit is being executed before the cursor is opened.
I still havn't been able to reproduce it except with the actual scenario that I am working with...Is the code you are dealing with exactly the same as the skeleton you've posted in your original post? Do you perhaps have a generic exception catcher in there somewhere (perhaps catching and hiding an ORA-01555) when the cursor is being fetched?
Not that i expect it to make any difference, but i'm curious as to why you've declared your cursor as IN / OUT ?
p_listcur in out sys_refcursor
the code structure in the real example is almost identical to that test case I produced - the exception handler is only catering for no_data_found, all other errors should be raised as normal.
edit: sorry I forgot to add - it's in/out because apparently that's what crystal reports needs in order to use the refcursor..... I'm not a crystal guy so I can't be any more specific than that sorry......
Edited by: WhiteHat on Oct 11, 2010 9:34 AM -
Java class files works on middle tier but chokes when called from pl/sql
Hi,
I have 2 class files WorkOrder and xxWorkOrder. xxWorkOrder creates an instance of WorkOrder. Both classes are under the /classes directory. Both compile fine and I have used loadjava to upload/resolve both in the database. I can see them as valid under the user_objects table. I created a function using Pl/sql which calls a method in xxWorkOrder. If I remove the line in xxWorkOrder where it creates an instance of WorkOrder, the pl/sql function works fine via sql plus. If I add the line in, it gives me ORA-29532: Java call terminated by uncaught Java exception: java.lang.ExceptionInInitializerError if i run my test again I get a No classdef found error.
If i run the xxWorkOrder class file directly from the server using java, the code works fine with the instantiation of WorkOrder within it.
I'm not sure which step I am missing ? For some reason when the pl/sql function calls the java method in xxWorkOrder and it sees the line where the instance of WorkOrder is created, it chokes.
Please help!
PreetiExceptionInInitializerError means that whatever is being done at the time it occurs is trying to use some class for the first time so that an attempt to initialize that class is occurring and failing. Such a failure typically means that there is code in a static initializer, such as the foo(); in
static SomeType someVarName = foo();
or just any thing within
static { ... }
in the class being initialized which signals an uncaught exception. It's impossible to say why this would be happening in your particular case without seeing the code. Depending on the release you are using there may be more information (such as a backtrace of the original error) in the .trc file. An example of what I am describing in your case would be if the constructor for WorkOrder invoked a method on some class N, where N hadn't previously been used and where N contained
static Class loser = Class.forName('no/such/Class');
In this (admittedly goofy) case you might expect to see in the .trc file a backtrace for the ExceptionInInitializer error with a sub backtrace identified with "Caused by" that starts with a NoClassDefFound exception or the like. This might work outside the server if "no/such/Class" was present there but had not been loaded into the database. -
Why are Java SASLFactories missing when called via PL/SQL but not from JRE?
Hi
This may be quite a technical point about SASL and JCE Providers etc OR it may just be a question about how Oracle PL/SQL interfaces with Java.
The background is that I am trying to get a Java opensource library to run in Oracle DB - this is for specialized communication from Database to other servers.
The library uses a SASL mechanism to authenticate with the server and this (appears) to rely on JCE Providers installed and provided by the JRE.
I have some Java code working which uses the library - this runs OK in NetBeans/Windows environment and also using Linux/Oracle JRE directly such as:
+# $ORACLE_HOME/jdk/bin/java -classpath "./MyMain.jar:./OtherSupport.jar" package.TestClient+
However it refuses to work (throws a NullPointerException) when called from PL/SQL.
+FUNCTION send_a_message (iHost IN VARCHAR2,+
iPort IN NUMBER,
+iLogin IN VARCHAR2,+
+iPasswd IN VARCHAR2,+
iRecipient IN VARCHAR2,
iMessage IN VARCHAR2) RETURN NUMBER
AS LANGUAGE JAVA
NAME package.TestClient.sendATextMessage(java.lang.String, int, java.lang.String, java.lang.String, java.lang.String, java.lang.String) return int';
In the Java code this is:
public static int sendATextMessage(String iHost,
int iPort,
String iLogin,
String iPasswd
String iRecipient,
String iMessage)
I've tracked the issue down to there being no SaslClientFactories (via Sasl.getSaslClientFactories()) showing when called from PL/SQL whereas 3 are available when run from within Java directly. This via:
Enumeration<SaslClientFactory> facts = Sasl.getSaslClientFactories();
System.out.println("Found Sasl Factories [" & (facts != null) & "] size[" & Collections.list(facts).size() & "]");
So, is there some aspect of Java initialisation that I'm missing when calling from PL/SQL (which means SASL factories aren't getting loaded into JRE) or is there something different in SASL setup?
Any pointers appreciated.
Thanks
DaveOk, after a bit of reading and general hacking about I have got this working.
What I hadn't initially understood/remembered is that for a Stored Procedure the JVM installed on file system with Oracle isn't actually used - java code is loaded into the database and hence a different set of base functions are available. The following is a good explanation of this http://docs.oracle.com/cd/B14117_01/java.101/b12021/appover.htm#BGBIBDAJ
So "out of the box" the Oracle Database appears to come loaded with only two of the Sun security providers i.e. no com.sum.security.SASL
>
OBJECT_NAME OBJECT_TYPE STATUS TIMESTAMP
com/sun/security/auth/NTSid JAVA CLASS VALID 2013-02-14:14:08:57
com/sun/security/jgss/GSSUtil JAVA CLASS VALID 2013-02-14:14:08:57
>
This is from:
>
SELECT
object_name,
object_type,
status,
timestamp
FROM
user_objects
WHERE
(object_name NOT LIKE 'SYS_%' AND
object_name NOT LIKE 'CREATE$%' AND
object_name NOT LIKE 'JAVA$%' AND
object_name NOT LIKE 'LOADLOB%') AND
object_type LIKE 'JAVA %' AND
object_name LIKE 'com/sun/security%'
ORDER BY
object_type,
object_name;
>
My solution (which may well be a work-around) is the following:
1) Downloaded JDK Source and extracted "com.sun.security.sasl" java code to my project
2) Added following code to my Stored Procedure ()
>
Enumeration<SaslClientFactory> saslFacts = Sasl.getSaslClientFactories();
if (!saslFacts.hasMoreElements()) {
System.out.println("Sasl Provider not pre-loaded");
int added = Security.addProvider(new com.sun.security.sasl.Provider());
if (added == -1) {
System.out.println("Sasl Provider could not be loaded");
System.exit(added);
else {
System.out.println("Sasl Provider added");
>
3) Built my JAR file with the sasl package embedded (note: could only find Java 6 code, so had to comment out some GSS lines - but wasn't intending to use these)
4) Loaded JAR to oracle via "loadjava".
5) Add permissions (only found this out after a couple of failed runs)
>
call dbms_java.grant_permission('XMPP', 'SYS:java.security.SecurityPermission', 'putProviderProperty.SunSASL', '' );
call dbms_java.grant_permission('XMPP', 'SYS:java.security.SecurityPermission', 'insertProvider.SunSASL', '' );
>
6) Run gives the following:
>
Sasl Provider not pre-loaded
Sasl Provider added
...etc...
>
It works!. I confess I'm not sure of the implications of this for multiple calls/performance and if it will need to be added for each stored procedure call - may post back.
For completeness I should point out that after my load the Security providers look like this:
>
OBJECT_NAME OBJECT_TYPE STATUS TIMESTAMP
com/sun/security/auth/NTSid JAVA CLASS INVALID 2013-02-15:09:11:36
com/sun/security/jgss/GSSUtil JAVA CLASS INVALID 2013-02-15:09:11:37
com/sun/security/sasl/Provider JAVA CLASS VALID 2013-02-15:10:03:21
>
i.e. the original couple are "INVALID" !
Dave
Edited by: 946763 on Feb 26, 2013 2:35 AM -
I get the error message "PLS-00201: identifier 'JAVA_XA.XA_START_NEW' must
be declared" when I try to deploy a J2EE application which uses XA pools and
TX datasources.
I am not sure how to setup my system for running with XA. I have tried to
see what other people have done in this new group and copied from them.
My connection pools looks like this:
<JDBCConnectionPool
DriverName="oracle.jdbc.xa.client.OracleXADataSource"
MaxCapacity="5" Name="alba"
Properties="user=<user>;url=jdbc:oracle:thin:@haux01:1526:UTV8;password=<pas
sword>;dataSourceName=alba"
RefreshMinutes="60" Targets="myserver"
URL="jdbc:oracle:thin:@haux01:1526:UTV8"/>
My data sources look like this:
<JDBCTxDataSource JNDIName="alba_ora817_localsl"
Name="alba_ora817_localsl" PoolName="alba" Targets="myserver"/>
The database is oracle 8.1.7.2.0
The reason I started trying to use XA in the first place was when I tried to
connect to two databases in the same transaction. I then got an error
message saying: java.sql.SQLException: Connection has already been created
in this tx context for pool named <first pool name>. Illegal attempt to
create connection from another pool: <second pool name>. As I have
understood, XA pools should fix this problem.
/Eirik
Hi Eirik
Is your Oracle database Server setup for XA? Check Oracle Docs on how to do
that.
you need to make sure this script is run on the server, initjvm.sql (It
should be in your oracle installation rdbms scripts) and then grant select
permission on dba_pending_transactions.
hth
sree
"newsgroups.bea.com" <[email protected]> wrote in message
news:[email protected]...
> I get the error message "PLS-00201: identifier 'JAVA_XA.XA_START_NEW' must
> be declared" when I try to deploy a J2EE application which uses XA pools
and
> TX datasources.
> I am not sure how to setup my system for running with XA. I have tried to
> see what other people have done in this new group and copied from them.
> My connection pools looks like this:
> <JDBCConnectionPool
> DriverName="oracle.jdbc.xa.client.OracleXADataSource"
> MaxCapacity="5" Name="alba"
>
>
Properties="user=<user>;url=jdbc:oracle:thin:@haux01:1526:UTV8;password=<pas
> sword>;dataSourceName=alba"
> RefreshMinutes="60" Targets="myserver"
> URL="jdbc:oracle:thin:@haux01:1526:UTV8"/>
>
> My data sources look like this:
> <JDBCTxDataSource JNDIName="alba_ora817_localsl"
> Name="alba_ora817_localsl" PoolName="alba" Targets="myserver"/>
>
> The database is oracle 8.1.7.2.0
>
> The reason I started trying to use XA in the first place was when I tried
to
> connect to two databases in the same transaction. I then got an error
> message saying: java.sql.SQLException: Connection has already been created
> in this tx context for pool named <first pool name>. Illegal attempt to
> create connection from another pool: <second pool name>. As I have
> understood, XA pools should fix this problem.
>
>
> /Eirik
>
>
-
Cannot compile form on unix. identifier 'CHECK_COMMIT' must be declared
Hello
I am getting the following error when I try to compile a form on unix. Error identifier 'CHECK_COMMIT' must be declared
Compiling procedure DISPLAY_TAB...
Compilation error on procedure DISPLAY_TAB:
PL/SQL ERROR 201 at line 12, column 1
identifier 'CHECK_COMMIT' must be declared
PL/SQL ERROR 0 at line 12, column 1
Statement ignored
PL/SQL ERROR 201 at line 32, column 7
identifier 'CHECK_COMMIT' must be declared
PL/SQL ERROR 0 at line 32, column 7
Statement ignored
Compiling procedure SET_TAB_STATUS...
No compilation errors.
Compiling procedure SELECT_REQUESTOR...
No compilation errors.
Compiling procedure SELECT_ALT_REQUESTOR...
No compilation errors.
Form not created
It seems to only occur where a program unit is calling a procedure in an attached library. All the libraries exist.
my FORMS_PATH is set to
/famisapps/fmsd/msd:/famisapps/fmsd/libs/:/apps3/famis/dev/forms:/famisapps/fmsd/forms
All the libraries are in /famisapps/fmsd/libs/
The forms are in /famisapps/fmsd/forms
The library in question is called common.pll. I have renamed it COMMON.PLL, COMMON.pll and Common.pll
Any help ideas would be apprecaited.
Davidare you getting the same error when compiling from frmcmp.sh and from builder even after setting the FORMS_PATH ?
with this make any difference FORMS_PATH
changing
/famisapps/fmsd/msd:/famisapps/fmsd/libs/:/apps3/famis/dev/forms:/famisapps/fmsd/forms
to
/famisapps/fmsd/msd:/famisapps/fmsd/libs:/apps3/famis/dev/forms:/famisapps/fmsd/forms -
Identifier 'ORA_ASPNET_PROF_GETPROPERTIES' must be declared
Hello,
I'm using the OracleProfileProvider - my web.config looks like:
<profile enabled="true" defaultProvider="OraProvider">
<providers>
<add name="OraProvider"
type="Oracle.Web.Profile.OracleProfileProvider,
Oracle.Web, Version=2.111.5.10, Culture=neutral,
PublicKeyToken=89B483F429C47342"
connectionStringName="OraString"
applicationName="configurator"/>
</providers>
<properties>
<add name="GridViewPageSize" defaultValue="20" />
<add name="MyCompanies"
type="System.Collections.Specialized.StringCollection"
serializeAs="Xml" />
</properties>
</profile>
In my code, when I try to get (or set) the GridViewPageSize property using:
ProfileBase pb = httpContext.Current.Profile;
Response.Write(pb.GetPropertyValue("GridViewPageSize"));
I receive the following error:
PLS-00201: identifier 'ORA_ASPNET_PROF_GETPROPERTIES' must be declared
for the pb.GetPropertyValue call
Any help?
ThanksI suspect that the schema you are logging into doesn't have the ASP.NET provider schema. Did you run the SQL scripts to setup the DB schema? They should be located in the following directory (or a similar looking directory):
C:\oracle\product\11.1.0\client_1\ASP.NET\SQL
You should run these scripts to setup the schema. -
JTextField update problem when called from PropertyChangeEvent
Hi,
I'm trying to create forms that can be dynamically loaded with Class.forname(formName).
Those forms should always inherit some methods that make it easy to pass data to
them and receive data from them. The idea is that the data comes from a table which
sends a hashmap (String column/JTextField-name + String Value pairs) with firePropertyChanged
as soon as a new row is seleceted. The JTextFields in the form are marked with setName("FieldName") that has to correspond to the name of the columns of the table.
My problem is that I can't update the fields in my form when I'm calling getRow(HashMap)
from within propertyChangeEvent but that's necessary to keep the forms flexible.
JTextFieldName.setText(newText) just won't work. But it works when I call getRow(HashMap)
from the constructor. SwingWorker and threads to update the form didn't help.
I don't need to call pack() / update() / repaint() on the JFrame, do I ??
update() / validate() / repaint() etc. didn't work on the JTextField themselves.
Below is the code for one of the test-forms (just a JPanel that is inserted in a frame)
with all of it's methods. Does anybody have a solution to this problem ??
Thanks for taking time for that !!
Benjamin
* testTable.java
* Created on 15. April 2004, 16:12
package viewcontrol.GUI;
* @author gerbarmb
import javax.swing.*;
import java.awt.*;
import java.beans.*;
import java.util.*;
public class testTable extends javax.swing.JPanel
implements
java.awt.event.KeyListener,
java.beans.PropertyChangeListener {
* public static void main(String[] argv) { testTable tt = new testTable();
* JFrame jf = new JFrame(); jf.setContentPane(tt); jf.setVisible(true); }
/** Creates new customizer testTable */
public testTable() {
initComponents();
HashMap hm = new HashMap();
* Only for debugging, to see that the method getRow() works when
* called from the constructor.
hm.put("ttext", "TEst");
this.getRow(hm);
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the FormEditor.
private void initComponents() {//GEN-BEGIN:initComponents
java.awt.GridBagConstraints gridBagConstraints;
jLabel1 = new javax.swing.JLabel();
textIn = new javax.swing.JTextField();
jLabel2 = new javax.swing.JLabel();
intIn = new javax.swing.JTextField();
jLabel3 = new javax.swing.JLabel();
numIn = new javax.swing.JTextField();
jLabel4 = new javax.swing.JLabel();
dateIn = new javax.swing.JTextField();
jLabel5 = new javax.swing.JLabel();
dateTimeIn = new javax.swing.JTextField();
jLabel6 = new javax.swing.JLabel();
jCheckBox1 = new javax.swing.JCheckBox();
keepValues = new javax.swing.JCheckBox();
jButton1 = new javax.swing.JButton();
setLayout(new java.awt.GridBagLayout());
jLabel1.setText("Text");
add(jLabel1, new java.awt.GridBagConstraints());
textIn.setName("ttext");
textIn.setPreferredSize(new java.awt.Dimension(100, 21));
textIn.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
textInActionPerformed(evt);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridwidth = 2;
add(textIn, gridBagConstraints);
jLabel2.setText("Integer");
add(jLabel2, new java.awt.GridBagConstraints());
intIn.setName("tint");
intIn.setPreferredSize(new java.awt.Dimension(50, 21));
add(intIn, new java.awt.GridBagConstraints());
jLabel3.setText("Number");
add(jLabel3, new java.awt.GridBagConstraints());
numIn.setName("tnum");
numIn.setPreferredSize(new java.awt.Dimension(50, 21));
add(numIn, new java.awt.GridBagConstraints());
jLabel4.setText("Date");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 1;
add(jLabel4, gridBagConstraints);
dateIn.setName("tdate");
dateIn.setPreferredSize(new java.awt.Dimension(50, 21));
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 1;
add(dateIn, gridBagConstraints);
jLabel5.setText("DateTime");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 1;
add(jLabel5, gridBagConstraints);
dateTimeIn.setName("tidate");
dateTimeIn.setPreferredSize(new java.awt.Dimension(80, 21));
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridy = 1;
add(dateTimeIn, gridBagConstraints);
jLabel6.setText("Bit");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridy = 1;
add(jLabel6, gridBagConstraints);
jCheckBox1.setName("tbit");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridy = 1;
add(jCheckBox1, gridBagConstraints);
keepValues.setText("keep values");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 7;
gridBagConstraints.gridy = 3;
add(keepValues, gridBagConstraints);
jButton1.setText("Send");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 7;
gridBagConstraints.gridy = 2;
add(jButton1, gridBagConstraints);
}//GEN-END:initComponents
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
sendRow();
}//GEN-LAST:event_jButton1ActionPerformed
private boolean sendRow() {
java.util.HashMap hm = new java.util.HashMap();
Component[] cs = this.getComponents();
for (int i = 0; i < cs.length; i++) {
if (((Component) cs).getName() != null) {
if (cs[i] instanceof JCheckBox) {
String value = ((JCheckBox) cs[i]).isSelected() ? "1" : "0";
hm.put(cs[i].getName(), value);
} else if (cs[i] instanceof JCheckBox) {
hm.put(cs[i].getName(), ((JTextField) cs[i]).getText());
} // end for
firePropertyChange("rowChanged", null, hm);
return true;
private void getRow(java.util.HashMap hm) {
//if (! this.keepValues.isSelected()) {
Component[] cs = this.getComponents();
for (int i = 0; i < cs.length; i++) {
if (cs[i].getName() != null && hm.containsKey(cs[i].getName())) {
Component component = cs[i];
String componentName = cs[i].getName();
String componentValue = (String) hm.get(component.getName());
if (cs[i] instanceof JTextField) {
// output for debugging
System.out.println("Setting " + cs[i].getName() + " = "
+ componentValue);
((JTextField) component).setText(componentValue);
} else if (cs[i] instanceof JCheckBox) {
// output for debugging
System.out.println("JCheckBox found");
JCheckBox cb = (JCheckBox) component;
boolean selected = (componentValue == null ? false : (componentValue.equals("1")
? true
: false));
((JCheckBox) component).setSelected(selected);
} // end for
/* Uncomment this code snippet to retrieve the text that has been set
for the components (that means JTextFields)
This is just for debugging !
Component[] cs = this.getComponents(); for (int i = 0; i < cs.length;
i++) { if (cs[i].getName() != null) { if (cs[i] instanceof
JTextField) { System.out.println("Value of " +cs[i].getName() + " = " +
((JTextField) cs[i]).getText()); } } } // end for
private void textInActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textInActionPerformed
}//GEN-LAST:event_textInActionPerformed
public void keyPressed(java.awt.event.KeyEvent e) {
if (e.getKeyCode() == java.awt.event.KeyEvent.VK_ENTER) {
sendRow();
public void keyReleased(java.awt.event.KeyEvent e) {
public void keyTyped(java.awt.event.KeyEvent e) {
public void propertyChange(java.beans.PropertyChangeEvent evt) {
if (evt.getPropertyName().equals("newRow")) {
final PropertyChangeEvent finalEvt = evt;
Runnable makeChanges = new Runnable () {
public void run() {
getRow((java.util.HashMap) finalEvt.getNewValue());
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JTextField dateIn;
private javax.swing.JTextField dateTimeIn;
private javax.swing.JTextField intIn;
private javax.swing.JButton jButton1;
private javax.swing.JCheckBox jCheckBox1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JCheckBox keepValues;
private javax.swing.JTextField numIn;
private javax.swing.JTextField textIn;
// End of variables declaration//GEN-END:variablesThe problem of the change in the form not being comitted is that
I forgot SwingUtilities.invokeLater(makeChanges); in the bottom
part in public void propertyChange(java.beans.PropertyChangeEvent evt)
after having created a new Runnable.
Changes to the UI often have to be comitted by SwingUtitlities.invokeLater()
though I don't know that much about Swing yet.
Thanks to everybody who tried to solve that problem.
Benjamin -
PLS-00201: identifier 'DBMS_METADATA_DPBUILD' must be declared
Hi There,
Getting following error while executing prvtmetd.plb(Post patch install steps) script after upgrade 11.1.0.7 to 11.2.0.3.
SQL> @@prvtmetd.plb
Warning: Package Body created with compilation errors.
Errors for PACKAGE BODY DBMS_METADATA_DPBUILD:
LINE/COL ERROR
0/0 PL/SQL: Compilation unit analysis terminated
1/14 PLS-00201: identifier 'DBMS_METADATA_DPBUILD' must be declared
1/14 PLS-00304: cannot compile body of 'DBMS_METADATA_DPBUILD'
without its specification
please help me out in this regard.
Regards,What does the error message PLS-00304 tell you? It is self-explanatory, provided you looked it up prior to posting (in your post I see no sign you did).
Look up the error message online and work from there.
Sybrand Bakker
Senior Oracle DBA -
Crystal Reports 2008 fails when called from e Web Service under 64bit OS
I have discovered that Crystal Reports 2008 doesn't work when called from a Web Service running under 64bit Windows platforms (in my case Windows 2003 Server and Windows XP 64bit); practically no object is instantiated. I've tried several solutions without success.
Before creating a wrapper component to use under COM+, is there anybody who has a better and cheaper solution than creating another component to wrap CR 2008 ?Hi Sergio,
Before I mark this post as assumed answered I would just like to say and re-iterate that at this time there is no one answer and we fully understand your concerns. As you know in CR 6.0 it came in 16 and 32 bit versions because at the time 32 bit was relatively new but 16 bit was the norm. This is also true for 32 to 64 bit, 32 is the norm and 64 bit is relatively new. We know and are well aware 64 bit is the future and we are working as quickly as we can to move in that direction. Because of the complexity of the Product it's not simply a matter of re-compiling all of our dll's in 64 bit format. The core of our data connectivity with our database drivers which are dependant on third party clients must also need to support 64 bit modes. This as well as Printer drivers also need to be 64 compatable, there are a multitude of dependencies that we rely on that must add 64 bit support. As a programmer you are well aware of the issues around Thunking back and forth between 32 to 64 bits, it can cause delays and potentially loss of data which is a whole other issue. Not to mention also that we would have to ship both versions potentially doubling the size of the distribution packages or doubling the size of the dll's to have the ability to work in both modes. Relatively speaking of course, it would not be double the size but the variables would need to be able to allocate 32 or 64 memory blocks.
The other option is to produce 2 separate versions, this alone is a massive project. Any issue would need to be fixed in separate code streams.
So I'm sure you can see it's not simply a matter of saying yes we support 64 bit. It's a massive project that is going to take time to do and we have to wait for the third party drivers to commit also.
Visual Studio .NET 2005 and 2008 is the only option if you want true 64 bit but you will be limited on what DB's you can support and export formats you can export to. They are the only drivers we did convert to 64 bit.
Thank you for your understanding
Don -
Is it possible to call diff report queries when called from form
hello all
I want to know if it is possible to call different report queries when called from oracle 9i form .
i tried to use he
SET_REPORT_OBJECT_PROPERTY(REPORT_QUERY = 'q_diff' )
option and actualy called the report name
but it dint seem to work !!!
also is it possible to chng the title of the browser at runtimeSandeep,
this property is used with passing Record Groups as data parameters from Forms.
Passing the query name indicates that the values contained in the record group substitutes the result of the named query. This may work in client/server Reports, but it definitively doesn't work on teh Web because you can't pass a Record Group as a data parameter in this environment.
Te problem with changing a Reports query is that you must meet the same number of columns and column types as they exist in the Report. I didn't spend much time with XML based runtime customization in Reports. I think that you can change the Reports query through this feature. In Forms you would create the XML file using text_io and the merge it with an existing Reports. I never did this before. So it could be that all I am saying does not work in the end. Before following this idea, you may better ask in teh Reports forum on OTN if it is possible to use the runtime customization feature to modify the Reports query.
Fran -
Stored Procedure Does Not Run Properly When Called From Portlet
We have a simple Java portlet that calls a PL/SQL stored procedure which we wrote. The stored procedure sends a large number of emails to users in our corporation using the "utl_smtp" package. The stored procedure returns a count of the emails back to the Java portlet when it's finished. This number is displayed in the portlet.
Our problem:
The stored procedure functions as expected when run from a PL/SQL block in SQL*Plus, and the Java portlet calls the procedure properly when sending out a smaller number of emails (Less than 200 usually). When we get into a higher number of emails the procedure hangs when called from the portlet, but it STILL functions properly from SQL*Plus. It does not return the number of emails sent
and the Java portlet is unable to return a SQLException. Also, we have noticed that emails are sent at a much slower pace from the stored procedure when it's called from the portlet.Any Ideas?
-
HR_INFOTYPE_OPERATION not working when called from Dynamic action
Hi ,
Senario : I would like to execute a form from dynamic action which
creates a record in 0015 (Additional payment IT) .
I have writen the code as shown below am using FM HR_INFOTYPE_OPERATION
. When i execute the program from se38 it is creating a record, however it is
not created when it is called from dynamic action..when i debugged the code in
inside the FM HR_INFOTYPE_OPERATION there is a FM HR_MAINTAIN_MASTERDATA where
they are using call dialog (statement) and
sy-oncom = 'N' when called from Dynamic action and
sy-oncom = 'S' when called executed directly.
I tried to change the sy-oncom to S while run from Dynamic action it created
the record.
So Can anyone explain me abt sy-oncom and how can i resolve the issue..
code..
REPORT ZHRPYENH01 .
perFORM TERMIATION_9000.
INCLUDE DBPNPMAC.
FORM Termiation_9000 *
FORM TERMIATION_9000.
INFOTYPES : 0015.
*data : i .
*i ='c'.
*break-point.
*message i000(000) with i.
TABLES : PRELP.
DATA : P9000 TYPE PA9000." with header line.
DATA : P0000 TYPE STANDARD TABLE OF P0000 WITH HEADER LINE.
DATA : P0015 TYPE STANDARD TABLE OF P0015 WITH HEADER LINE.
DATA : HIRE_DATE LIKE SY-DATUM,
TERM_DATE LIKE SY-DATUM.
DATA : MOLGA LIKE T500L-MOLGA VALUE '25',
SEQNR LIKE PC261-SEQNR.
DATA : RGDIR TYPE STANDARD TABLE OF PC261 WITH HEADER LINE.
DATA : ACTUAL_PERIOD LIKE PA9000-RETENTION.
DATA : PNP-SW-FOUND TYPE SY-SUBRC ,
PNP-SY-TABIX TYPE SY-TABIX.
DATA : TER_PERNR LIKE PA0001-PERNR.
DATA : REF_PERNR LIKE PA0001-PERNR.
data : key type BAPIPAKEY.
data : payed_amount type p0015-BETRG.
data : future_payment_amount type p0015-BETRG.
data : p0002 like pa0002.
types : begin of t_deduction ,
deducation_date like p0015-begda,
future_payment_amount type p0015-BETRG.
types : end of t_deduction.
data : future_deduction type standard table of t_deduction with
*header line.
data : future_deduction type t_deduction .
data : RETURN type BAPIRETURN1.
*data : deduction_p0015 like standard table of p0015 with header line.
data : deduction_p0015 like p0015 .
xxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxx
****Prepare 0015 data for deduction
*deduction for payed amount
clear deduction_p0015.
*refresh deduction_p0015.
deduction_p0015-pernr = REF_PERNR.
*deduction_p0015-pernr = TER_PERNR.
deduction_p0015-lgart = 'M120'.
deduction_p0015-begda = sy-datum + 1 .
deduction_p0015-endda = sy-datum + 1 .
deduction_p0015-BETRG = payed_amount.
deduction_p0015-WAERS = 'SGD'.
deduction_p0015-ZUORD = TER_PERNR.
*append deduction_p0015.
**deduction for future payment amount
*loop at future_deduction.
*clear deduction_p0015.
*deduction_p0015-pernr = REF_PERNR.
**deduction_p0015-pernr = TER_PERNR.
*deduction_p0015-lgart = 'M120'.
*deduction_p0015-begda = FUTURE_DEDUCTION-DEDUCATION_DATE.
*deduction_p0015-endda = FUTURE_DEDUCTION-DEDUCATION_DATE.
*deduction_p0015-BETRG = future_deduction-future_payment_amount.
*deduction_p0015-WAERS = 'SGD'.
*deduction_p0015-ZUORD = TER_PERNR.
*append deduction_p0015.
*endloop.
Create a deduction wage type in 0015 for the employee
break-point.
CLEAR RETURN.
CALL FUNCTION 'BAPI_EMPLOYEET_ENQUEUE'
EXPORTING
NUMBER = REF_PERNR
VALIDITYBEGIN = '18000101'
IMPORTING
RETURN = return
if not return is initial.
message E000(000) with
'Referred Employee could not be locked for referal payment deducation,
please try after some time'.
endif.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '0015'
NUMBER = REF_PERNR
SUBTYPE = 'M120'
OBJECTID =
LOCKINDICATOR =
VALIDITYEND = SY-DATUM
VALIDITYBEGIN = SY-DATUM
RECORDNUMBER =
RECORD = deduction_p0015
OPERATION = 'COPY'
TCLAS = 'A'
DIALOG_MODE = '2'
NOCOMMIT =
VIEW_IDENTIFIER =
SECONDARY_RECORD =
IMPORTING
RETURN = return
KEY = key
break-point.
COMMIT WORK.
if not return is initial.
*return-TYPE
*ID
*NUMBER
*MESSAGE
message I000(000) with return-MESSAGE.
endif.
CALL FUNCTION 'BAPI_EMPLOYEET_DEQUEUE'
EXPORTING
NUMBER = REF_PERNR
VALIDITYBEGIN = '18000101'
IMPORTING
RETURN = return
xxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxx
Thanks and regards
-Senthil Bala
Message was edited by: senthil balaHi Senthil
Why at all U want a subroutine to create a record in IT0015 through Dynamic action.There are some standard codes available to update infotypes.
Let me give U an example
14 9CON BETRG 4 2 I INS,0015 This will create a record in IT0015 when IT0014 is updated with Wagetype 9CON
14 9CON BETRG 4 3 W P0015-LGART='5400' Set wagetype for IT0015(Here U can use a subroutine call to set the wagetype)
14 9CON BETRG 4 4 W P0015-BETRG=P0014-BETRG set amount for IT0015(Here U can use a subroutine call to get the amount)
14 9CON BETRG 4 5 W P0015-BEGDA=P0014-ENDDA set the dates(Here U can use a subroutine call to set the dates)
Hope this will help U.
Please award points if helpful -
Advanced table:not able to view more than 10 rows when called from workflow
Hi everyone,
I'm calling a page that contains advanced table and its controller class from two places.
First one is from a inquiry form, when this page is called it works fine. when there are more than 10 rows, first 10 are shown on page render and when we click on Next link, other rows are shown. This is becuase I have given the records displayed property on adavanced table = 10. I'm fine till here.
Second one is I'm calling this page again from a workflow notificaiton. There is a link called view more details on the workflow notification , click of this link will open the page with 10 records displayed. But when user tries to click on Next it doesn't work. It just doesn't refresh.
Its very wierd,. not able to understand what could be wrong when calling from wf notificiton. Its the same page and conroller code used in both the places.
Please help me!!
Thanks
SunnyThanks for your response Kristofer. You are correct, there was a difference in the parameters and the issue is resolved now.
Maybe you are looking for
-
Boot from DVD...doesn't recognize hard drive
Hello all, Hopefully someone can help me out. I just replaced my 160GB 7200rpm hard drive with a Hitachi 200GB 7200rpm hard drive, put it all back together, booted up from the DVD, went to select a destination for a clean install, but the hard drive
-
Cannot add media to music library
I am using Vista. I have properly loaded iTunes and registered. When I try and "add files to library" nothing happens. I have iTunes configured to manually manage music. I have tried dragging and dropping and that does not work either. I am stumped.
-
Sony Compatibility ? Ram problem?
I have a Sony DCR TRV30 dig camcorder, this particular camera is not listed in Imovie's supported camera list. The Imovie website says that any camera that suppports Fire Wire comm should have no problems in importing to Imovie. So my questions are:
-
SERIOUS IPOD PROBLEM! SCREEN! :(
My iPod has worked fine so far. 5G, 30GB iPod White. Until today the screen has froze. It has lines that appear on your laptop if you pushed it on the back. Colored lines stretched accross the screen. I tried to reset, but it is the actual screen tha
-
I received an iPad, my first Apple product. After figuring out that I need to enter a card to even download a free app, I purchased a prepaid card but now I cant get in. I it acct setup, it asks me my country, then it tells me that my session has tim