Dropping java object from Oracle 8i
We areaable to load java methods and publish them to SQL in Oracle 8i using Jdev Deploy wizard, but we can not drop them thru
Open View As->Database Browser of the connection object, they drop menu is greyed out/disable. What kind privilege we need to drop java object from Oracle 8i? Or there is something wrong with the database setup.
Thank you very much
There are three options:
Normal
SysDBA
SysOper
I have tried the three of them, none of them works, is there third option SYS?
Thank you very much.
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Amit:
Log in as SYS.<HR></BLOCKQUOTE>
null
Similar Messages
-
How can I drop the java objects from a schema
hi..good afternoon all...
How can I drop the java objects from a database schema???
suppose the credentials are scott/tiger@db1
Another thing is that...I have to do this from cmd(command prompt) as there is no plsql developer or sqldeveloper installed in the machine.
plss help...thanks in advance...hi...i have already tried all the options..but it is showing the error..
ora:01435 - user does not exist
but when i have given the command...
select object type, object_name, status from user_objects where object_type like'%JAVA%';
then it is showing that the java_object is present....
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
SQL>
SQL>
SQL> set linesize 200
SQL>
SQL>
SQL>
SQL> select object_type, object_name, status from user_objects where object_type
like '%JAVA%';
OBJECT_TYPE OBJECT_NAME
STATUS
JAVA CLASS javaclass1
VALID
JAVA SOURCE javaclass1
VALID
SQL> drop java source javaclass1.java;
drop java source javaclass1.java
ERROR at line 1:
ORA-01435: user does not exist
SQL> -
How can i return object from oracle in my java code using pl/sql procedure?
How can i return object from oracle in my java code using pl/sql procedure?
And How can i returned varios rows fron a pl/sql store procedure
please send me a example....
Thank you
nullyes, i do
But i can't run this examples...
my problem is that i want recive a object from a PL/SQL
//procedure callObject(miObj out MyObject)
in my java code
public static EmployeeObj callObject(Connection lv_con,
String pv_idEmp)
EmployeeObj ret = new EmployeeObj();
try
CallableStatement cstmt =
lv_con.prepareCall("{call admin.callObject(?)}");
cstmt.registerOutParameter(1, OracleTypes.STRUCT); // line ocurr wrong
//registerOutParameter(int parameterIndex, int sqlType,String sql_name)
cstmt.execute();
ret = (EmployeeObj) cstmt.getObject(1);
}//try
catch (SQLException ex)
System.out.println("error SQL");
System.out.println ("\n*** SQLException caught ***\n");
while (ex != null)
System.out.println ("SQLState: " + ex.getSQLState ());
System.out.println ("Message: " + ex.getMessage ());
System.out.println ("Vendor: " + ex.getErrorCode ());
ex = ex.getNextException ();
System.out.println ("");
catch (java.lang.Exception ex)
System.out.println("error Lenguaje");
return ret;
Do you have any idea? -
2 TopLink Java Object from Table to be used in single selectOneChoice
Hello everyone, can I ask for help on how to solve my problem....
Here's my scenario, I have 2 tables namely tblCollege and tblCourse, they are related through tblCourse.CollegeCode = tblCollege.Code.
I use the jdeveloper wizard using TopLink -> Java Object from Table to add these table to my project. I created an EJB Data Control so that I can use them to my Userinterface using ADF Faces.
What I really want to do is that I need to have selectOneChoice component displaying:
tblCollege.Name + tblCourse.Name, and it should have a value of tblCollege.Code + tblCourse.Code,
so for example in my
tblCollege:
Code---------Name
1---------------Science
2---------------Music
tblCourse
Code-------Name-----------CollegeCode
1-------------Biology----------1
2-------------Computer-------1
3-------------Guitar------------2
what I want in my selectOneChoice is like this:
value----------display
1-1--------------Science-Biology
1-2--------------Science-Computer
2-3--------------Music-Guitar
I'm a little stuck on how I'm going to that. Thanks.Bawasi,
I see a couple of angles of attack, but this really depends on the technologies involved. If you are using ADF Bindings in combination with ADF Faces then you need to shape the data at the entity level. If ADF Bindings are no the in equation, you can take a less aggressive approach and shape the data in a managed bean. What is not clear to me is the end-to-end use-case. I see the read-only (i.e. how to get data to the drop box), but I am
not certain what attribute on an entity you are attempting to set. Are you trying to set the course for the current user or for a master schedule? Finally, notice that the final shape of your data set shows a unique combinations, you could increase the performance of your use-case and ease of development simply by denormalizing your schema.
--RiC -
How to reference multiple instances of the same Java object from PL/SQL?
Dear all,
I'm experimenting with calling Java from PL/SQL.
My simple attempts work, which is calling public static [java] methods through PL/SQL wrappers from SQL (and PL/SQL). (See my example code below).
However it is the limitation of the public static methods that puzzels me.
I would like to do the following:
- from PL/SQL (in essence it needs to become a forms app) create one or more objects in the java realm
- from PL/SQL alter properties of a java object
- from PL/SQL call methods on a java object
However I fail to see how I can create multiple instances of an object and reference one particular object in the java realm through public static methods.
My current solution is the singleton pattern: of said java object I have only 1 copy, so I do not need to know a reference to it.
I can just assume that there will only ever be 1 of said object.
But I should be able to make more then 1 instance of an object.
To make it more specific:
- suppose I have the object car in the java realm
- from PL/SQL I want to create a car in the java realm
- from PL/SQL I need to give it license plates
- I need to start the engine of a scpecific car
However if I want more then 1 car then I need to be able to refrence them. How is this done?
Somehow I need to be able to execute the following in PL/SQL:
DECLARE
vMyCar_Porsche CAR;
vMyCar_Fiat CAR;
BEGIN
vMyCar_Porsche = new CAR();
vMyCar_Fiat = new CAR();
vMyCar_Porsche.setLicensePlates('FAST');
vMyCar_Porsche.startEngine();
vMyCar_Fiat.killEngine();
END;
Thanks in advance.
Best Regards,
Ruben
My current example code is the following:
JAVA:
===
CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED CODAROUL."RMG/BO/RMG_OBJECT" as package RMG.BO;
public class RMG_OBJECT {
private static RMG_OBJECT instance = new RMGOBJECT();
private String rmgObjectNaam;
private RMG_OBJECT(){
this.rmgObjectNaam = "NonDetermined";
public static String GET_RMGOBJECT_NAAM () {
String toestand = null;
if (_instance == null) {toestand = "DOES NOT EXIST";} else { toestand = "EXISTS";};
System.out.println("instance : " + toestand);
System.out.println("object name is : " + _instance.rmgObjectNaam);
return _instance.rmgObjectNaam;
public static Integer SET_RMGOBJECT_NAAM (String IN)
try
_instance.rmgObjectNaam = IN;
return 1;
catch (Exception e)//catch
System.out.println("Other Exception: " + e.toString());
e.printStackTrace();
return 5;
} //catch
PL/SQL Wrapper:
==========
CREATE OR REPLACE FUNCTION CODAROUL.SET_RMGOBJECT_NAAM(NAAM IN VARCHAR2) return NUMBER AS
LANGUAGE JAVA NAME 'RMG.BO.RMG_OBJECT.SET_RMGOBJECT_NAAM (java.lang.String) return java.lang.Integer';
Calling from SQL:
==========
CALL dbms_java.set_output(2000);
select CODAROUL.GET_RMGOBJECT_NAAM() from dual;
Edited by: RubenS_BE on Apr 6, 2012 5:35 AM
Edited by: 925945 on Apr 6, 2012 5:41 AMYou can do this by manually creating a new iterator binding in your binding tab.
So instead of dragging the VO directly to the page, go to the binding tab, add a new executable iterator binding, and point to that one from your ELs in the page itself. -
Error: ORA-03113 while executing complex java code from Oracle PL/SQL
Hi,
I am trying to execute a complex java code from Oracle PL/SQL. The classes were resolved successfully. But in the middle of execution, I am getting the following error:
ERROR:
ORA-03114: not connected to ORACLE
begin
ERROR at line 1:
ORA-03113: end-of-file on communication channel
Process ID: 13685
Session ID: 21 Serial number: 20
Is there a way to debug the Java classes loaded into oracle? Or is there any utility to find out why the connection was lost?
Regards,
SaravanaHi Saravana:
You could use simply System.out.println(..) at your Java code and see the output at the .trc files generated for your Oracle session.
Or better than this adding Java Util Logging messages at your code, to see how to use JUL API at the OJVM please see this blog post [Using JUL API inside the OJVM|http://marceloochoa.blogspot.com/2007/11/getting-logging-entering-exiting-and.html].
Best regards, Marcelo.
PD: ora-0600 generally are associated with RDBMS bugs, but these bugs can be bypassed by replacing the code which throws the exception by other with a workaround. -
Accessing java objects from within javascript
Hello,
Anyone with an idea of a useful toolkit for accessing java objects from within javascript will be much appreciated.
Thanks in advance,
Antana.What do you mean by accessing Java objects? Do you mean interacting with an applet via JavaScript? Something else?
-
How can i return an object isn't java object from webservice????
Hi !
I have a problem in my Project. When i call method return a java object from webservice , it 's too easy. But when i create my own object (ex:ClientRequest.class) , it doesn't work exactly T_T . When i return that object (on client, doesn't have ClientRequest.class) , i cann't access its static variables.
How can i do it ??
Please help me !
Thanks a lot !!!!!
class ClientRequest {
public static int i;
public static String s;
public ClientRequest() {
}You can use REFCURSOR type for this. In java SQL TYPES this is available too. In your PLSQL use REFCURSOR for that array and then take the same from java code. Look in the servelet programming book for this SQLTYPE and see PLSQL for handling refcursors. We have done this way and it works.
-
Hi Guys,
I am calling java bean from oracle Forms6i (implementation
class property set to bean class). This java bean in turn
calling some JNI methods written in C. The application server
(Forms6i) is hanging at the point of calling the JNI method.
Is oracle Forms6i supports all java functionality (JNI here)
and if so how to solve the problem ?
Any pointers or tips in this regard is highly appreciated ?
Thanks & Regards
Chandra MohanTo call Java from forms:
look at the technical documents on Java integration at
http://otn.oracle.com/products/forms
and also look at the Javabeans and PJC samples in the sample
code section of Forms on OTN.
Creating a random number using a java class is an excelent
example of how to use Java with forms. -
Access Java object from Javascript
Hi
I'm trying to invoke a Java object from Javascript (scriptengine and all that).
I want to add scripting features to a GeneXus Java generated app... and I have very basic skills on java too. Sorry for that ;o).
This is the java code to pass "params" to the scriptengine:
engine.put("remoteHandle",remoteHandle);
engine.put("context", context); The remoteHandle (int) and context (com.genexus.ModelContext) pass trough all the gx-java generated programs.
This javascript works fine:
importClass(Packages.uftestjs);
new uftestjs(remoteHandle).execute( ) ;The remoteHandle conversion is ok (javascript-number to int). The context is optional.
But if I want to pass context:
importClass(Packages.uftestjs);
new uftestjs(remoteHandle, context).execute( ) ;Fails with this:
"javax.script.ScriptException: sun.org.mozilla.javascript.internal.EvaluatorException: Java constructor for 'uftestjs' with arguments 'number,javax.script.SimpleScriptContext' not found."
Obviously, no conversion is possible with context (javax.script.SimpleScriptContext to com.genexus.ModelContext).
There is some way to reference de original context, by the object Id??? or something like that???
Thanks in advance for any replies!!!
Greetings from Chile. (I hope you can understand my english!)Hi
Well, since this topic is about java programming I think the place is right here.
(I use some tricks to embed java statements in genexus objects...)
I will try to get some help at Artech (GX) on how to build something... to get the conversion needed.
But they are not focussed on support this kind of questions.
Anyway, I want to know: do I can to reference an object by the objId?
I want to code something like this:
com.genexus.ModelContext context =
(com.genexus.ModelContex)getTheObjectFromTheJVM(theObjectId);(powered by google translator, ha!) -
Java 2013-004 versus Java 7 from Oracle
Back when Apple annoucned it would no longer update Java, I followed suggestions to install Java directly from Oracle. (Not sure of the version then, but the installation is now current on version 7.x running on OS X 10.7.5.) However, software update continues to offer updates for Java from Apple, most recently Java 2013-004. Why? What should be done about this?
So it's fine to have them both installed?
Yes. They do different things.
Can you provide any links that go into this distinction further?
java.com and the Apple Support downloads page. -
32-bit JVM receiving Java objects from 64-bit JVM
Hi folks,
Question is: will there be problems for 32-bit JVM receiving Java objects from 64-bit JVM? and vice versa.
Our application client is running on 32-bit JVM, our server is running on 64-bit JVM. Client will send Java objects to server, and vice versa.
My past experience suggested when sending Java objects between client and server, both client and server needs to be compiled under the same JVM version. Any advice?
ChristyMy past experience suggested when sending Java
objects between client and server, both client and
server needs to be compiled under the same JVM
version. Any advice?This is only a case if you omit explicit serialVersionUID. My advice is to ALWAYS specify it for classes you want to serialize over the wire or put into persistent storage. It is way too tricky to rely on default one to fail half a year later when some new programmer adds one new public method to a class.
Unless you need to deserialize already existing resources, there is no need to put any magic number in serialVersionUID - just put 1 for every class you create and possibly increase it by 1 every time you want to make incompatible version (which is not happening so often, as in real world you often try to stay as compatible as possible) -
Trigger a Java method from Oracle
Does anyone know how I can trigger a java method from Oracle?
I have a certain Java method in my application which I want to be executed everytime a new record is added to a certain table.
In Oracle I could use a trigger on insert but what can I do if I want a Java method to be executed after a new record was inserted? Does anyone know that?
Thanks for your helpMy application is already running, it does not have
to get started, I just need a method to be called
from Oracle.well unless oracle is running some sort of java listener in your vm i can't see it being possible.
either poll for the change, or become incharge of the change, or using the external command system. -
Calling Java programs from Oracle Stored Procedure
Is it possible to call Java programs from Oracle stored procs? If possible Can this be used to exchange data from other applications? Is there a better method/feature in oracle for doing data exchange with other apps?
If what you mean by Oracle stored procedures is pl/sql then yes.
You can create a "wrapper" this way:
CREATE OR REPLACE FUNCTION xmlXform
in_mapUrl IN VARCHAR2,
in_inputUrl IN VARCHAR2
RETURN VARCHAR2
AS
LANGUAGE JAVA NAME
'com.yourcompany.xml2any.xform(java.lang.String,java.lang.String)
RETURN java.lang.String';
Then load the java as:
loadjava -user youruser/youruserpasswd -resolve -verbose lib/xmlparserv2.jar classes/com/yourcompany/xform.class classes/com/yourcompany/xml2any.class
The java, given the correct permissions, can do anything java can do including communicate with outside applications.
Is this the "best" way... depends on what you are trying to accomplish. -
Installing Java 7 from Oracle just made Applets not work, how to fix
Mac 10.7.4. I tried installing Java 7 from Oracle, but all it did was remove half the prefs from Java and make Applets not work. How do I revert/reinstall Java?
Here you go!
Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
I am employed by HP
Maybe you are looking for
-
Right click issues on Satellite P50T-B
I don't know how to change the setting so that I can have a traditional right click on the touch pad. I know that you can press with both fingers to do some functions like a right click, but when I am using Microsoft word or Facebook I cannot figure
-
How to get DocSet property values in a SharePoint library into a CSV file using Powershell
Hi, How to get DocSet property values in a SharePoint library into a CSV file using Powershell? Any help would be greatly appreciated. Thank you. AA.
-
Latex support in SharePoint 2013 wikipages
Hi, We have a requirement to support "latex" equation translation to look like a math equation in SharePoint wiki page. What is the best way to do this using Jquery without any third party libraries?
-
Hi to all, Any predefined report format is there for designing the EXCISE CHALLAN with CUSTOMER ACKNOWLEDGEMENT related to SD MODULE. Sales related people they are calling as PROFORMA INVOICE like that. Thanks, Sankar M
-
Hi All, We are invoking FinancialUtilService using oracle/wss_username_token_over_ssl_client_policy. But as per WSDL "https://<hostname>/finFunShared/FinancialUtilService?WSDL" wss11_saml_token_with_message_protection_client_policy policy is defined.