ClassCastException when all seeded java class is changed
Dear SirI'm working on some changes on iProcurement ShoppingCartPG.
I have the JDeveloper project into and can run the ShoppingHomePG and the CheckoutSummaryPG of JDeveloper.
The problem is - as soon as I include the controller for one of these pages, for example, CheckoutSummaryCO.java and make one more small change here, just add an empty line or put any System.out.println("***"); statement, I get an error
oracle.apps.fnd.framework.OAException: java.lang.ClassCastException
(full stack below). What's wrong?
Thank you.
Anatoliy
oracle.apps.fnd.framework.OAException: java.lang.ClassCastException
at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:865)
at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(OAException.java:988)
at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:211)
at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:133)
at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:784)
at oracle.apps.icx.por.common.webui.ClientUtil.getPorSystemInfo(ClientUtil.java:319)
at oracle.apps.icx.icatalog.shopping.webui.ShoppingHomeCO.processRequest(ShoppingHomeCO.java:158)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:587)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1136)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2335)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1734)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:508)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:429)
in OA. jspService(OA.jsp:34)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
to EDU.oswego.cs.dl.util.concurrent.PooledExecutor$ Worker.run (PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:534)
# # 0 in detail
java.lang.ClassCastException
at oracle.apps.icx.por.common.server.SystemInfoHelper.getPorSystemInfo(SystemInfoHelper.java:130)
at oracle.apps.icx.por.common.server.SystemInfoAMImpl.getPorSystemInfo(SystemInfoAMImpl.java:54)
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:324)
at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:190)
at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:133)
at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:784)
at oracle.apps.icx.por.common.webui.ClientUtil.getPorSystemInfo(ClientUtil.java:319)
at oracle.apps.icx.icatalog.shopping.webui.ShoppingHomeCO.processRequest(ShoppingHomeCO.java:158)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:587)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1136)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2335)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1734)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:508)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:429)
in OA. jspService(OA.jsp:34)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
to EDU.oswego.cs.dl.util.concurrent.PooledExecutor$ Worker.run (PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:534)
java.lang.ClassCastException
at oracle.apps.icx.por.common.server.SystemInfoHelper.getPorSystemInfo(SystemInfoHelper.java:130)
at oracle.apps.icx.por.common.server.SystemInfoAMImpl.getPorSystemInfo(SystemInfoAMImpl.java:54)
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:324)
at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:190)
at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:133)
at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:784)
at oracle.apps.icx.por.common.webui.ClientUtil.getPorSystemInfo(ClientUtil.java:319)
at oracle.apps.icx.icatalog.shopping.webui.ShoppingHomeCO.processRequest(ShoppingHomeCO.java:158)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:587)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1136)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2335)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1734)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:508)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:429)
in OA. jspService(OA.jsp:34)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
to EDU.oswego.cs.dl.util.concurrent.PooledExecutor$ Worker.run (PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:534)
Hi asmirnov,
If I'm not mistaken, I believe that this happens because all the controllers of iProcurement page extend a common controller 'base', and the call to super.processRequest () should make reference to something on ShoppingHomeCO... check the controller you change for a declaration of estate and follow the hierarchy to find the dependence.
Best thing to do, however, would be to create a POT with the flow of any iProcurement you change, for example, oracle.apps.icx.por.shopping (and everything underneath, including the server packages and webui), then you are more secure.
Concerning
Thiago
Tags: Oracle Applications
Similar Questions
-
java.lang.NoClassDefFoundError when calling a java class of BPEL
Hello
I'm calling a java class to convert JSON to XML using BPEL. I imported all the necessary jar files in the project and compile successfully done.
But while running, I get the java.lang.NoClassDefFoundError: net/sf/json/JSON error.
For this, I placed all the necessary pots under the path FUSION_HOME/Oracle_SOA1/soa/modules/oracle.soa.ext_11.1.1/ and restarted the server.
But still, I get the same error when running.
A I missed a step? Let me know the procedure to solve this problem.
I have to run ant or change the file manifests after placing the pot?
in a site I find that we must place the pots under < DOMAIN HOME > directory / lib. Is this correct?
We use SOA suite 11.1.1.6.
Thank you
Terry
Hello Terry,
I'm not quite sure of what exactly would be the problem. Please go through this link and see if it helps: integrating Java and Java EE Code in a BPEL process
Kind regards
Karan
-
How can I change the data stored with JDeveloper Java classes?
Hello!
First of all, I am experienced PL/SQL coder, but I'm quite beginner what comes to Java.
JDeveloper is also a new tool for me and the reason why I am interested, it's the good Java Editor.
With the good Java editor I can create classes and store them in the Oracle database and executing those inside PL/SQL code.
I am currently faced with a minor problem, and I'm not able to find the answer to this:
How can I change/edit/create stored with JDeveloper, Java classes to database (Toad for Oracle can do but it's not good editor Java)?
I can navigate to Java classes with database browser, but I can't change those. Just view and drop it.
[http://users.metropolia.fi/~jokkek/Oracle/jdeveloper.png]
Thanks to all helpers!
ARO
Jokke Heikkila
Published by: user10385021 on 2.6.2009 03:56JDeveloper is not a direct modification of the classes inside the database. Instead, you must change your java classes locally (including the management of versions, unit tests etc.) and then load them into the database. Load in the datab ase could be done using the Loadjava and the deployment profile stored procedure Java (file-> New-> General-> profiles of deployment-> Loadjava and Java Stored Procedures). I think it's even better let your build tool do the work. An example of task of Ant describing this is shown at http://davidmoten.blogspot.com/2007/11/oracle-loadjava-ant-task.html (I have not tried this, but have used a similar approach in a project)
Trygve
-
When the external program C and Java Class loaded in a schema
Hi all
I understand that both an external C program and a Java class are loaded after two of them are called in the PL/SQL environment, once they are published and loaded into shared libraries. Is this correct?
Best regards
ValAn external procedure is never loaded into a schema. Oracle calls the external program.
A Java class that is part of a Java stored procedure, however, is charged as a PL/SQL procedure is created - at compile time.
Justin
-
Why all my desktop icons have changed in PDF format when I installed the drive?
I just installed Adobe Reader and all my desktop icons have changed and nothing does not open. How can I fix?
Hey carolq123,
Could you please check the below mentioned KB doc for the same link:
Application, the icons of file change icon Acrobat/Reader
Let me know if it helps.
Kind regards
Ana Maria
-
Error on Java class calling in the Oracle database
I have a java class indicated below:
/*
* To change this license header, choose license headers in the project properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package oracletree1;
import java.sql.Connection;
to import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
/**
*
* @author oracle
*/
public class TREEUPDATER {}
int levels;
int NodeId;
int ParentId;
String FatherID;
int ChildBed_new;
int ChildBes_new;
int ChildMande_new;
int ChildBed_old;
int ChildBes_old;
int ChildMande_old;
int ParentBed;
int ParentBes;
int ParentMande;
Script string;
String ValueState;
String TreeState;
Public TREEUPDATER() throws SQLException {}
}
public void update (levels int, int NodeIds, int childBed_old, int childBes_old, int childMande_old) throws SQLException {}
This. ChildBed_old = childBed_old;
This. ChildBes_old = childBes_old;
This. ChildMande_old = childMande_old;
This. Levels = levels;
This. NodeId = NodeIds;
String [] array;
try {}
Class.forName ("oracle.jdbc.driver.OracleDriver");
} catch (ClassNotFoundException e) {}
System.out.println ("where is your Oracle JDBC Driver?');
return;
}
System.out.println ("Oracle JDBC Driver registered!");
Fitting out = null;
try {}
connection = DriverManager.getConnection)
"jdbc:oracle:thin:@192.168.1.12:1521:orcl", "tree1"
'oracle');
} catch (SQLException e) {}
System.out.println ("connection failed! Check the console output");
return;
}
If (connection! = null) {}
Statement stmt = connection.createStatement ();
Instruction stmt2 = connection.createStatement ();
stmt.executeUpdate ("insert into test.java_test (id) values (21)" ");
ResultSet rs = stmt.executeQuery ("SELECT * from value" + "where nodeid =" + NodeId);
ResultSet rs2 = stmt.executeQuery ("select * from tree where id =" + NodeId);
While (RS. Next {}
This. FatherID = rs2.getNString("FatherID");
This. ChildBed_new = rs2.getInt ("bed");
This. ChildBes_new = rs2.getInt ("bes");
This. ChildMande_new = rs2.getInt ("control");
table = new String [100000];
Table = FatherID.split ("_");
for (int i = 0; i < array.length; i ++) {}
ResultSet rs3 = stmt2.executeQuery ("SELECT * from tree" + "where id =" + array [i]);
This. ParentId = rs3.getInt ("id");
This. ParentBed = rs3.getInt ("bed");
This. ParentBes = rs3.getInt ("bes");
This. ParentMande = rs3.getInt ("control");
connection.setAutoCommit (false);
ParentBed = ChildBed_new - ChildBed_old;
ParentBes = ChildBes_new - ChildBes_old;
This. TreeState = rs2.getNString ("state");
If (TreeState.equalsIgnoreCase ("BED")) {}
This. ParentMande = ParentBed - ParentBes;
} else {}
This. ParentMande = ParentBes - ParentBed;
}
This. Script = ("update the bed = bed set value +" + ParentBed + "and bes = bes +" + ParentBes + "and control = control +"+ ParentMande ")
+ ' where id = "+ ParentId);»
stmt2. ExecuteUpdate ("" + Script);
}
}
}
}
}
I have a main class, which show below:
/*
* To change this license header, choose license headers in the project properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package oracletree1;
import java.sql.SQLException;
/**
*
* @author oracle
*/
public class OracleTree1 {}
/**
@param args command-line arguments
*/
Public Shared Sub main (String [] args) throws SQLException {}
TODO logical application of the code here
TREEUPDATER t = new TREEUPDATER();
}
}
I was responsible for these classes in oracle database 11 g 2 and I want to use a trigger to execute the updating() method. If I created a procedure like this:
CREATE OR REPLACE PROCEDURE REPORT4
(
LEVELS IN NUMBERS
NODEID NUMBER
CHILDBED_OLD NUMBER
CHILDBES_OLD NUMBER
CHILDMANDE_OLD NUMBER
) AS
Name of the java LANGUAGE "TREEUPDATER.updating (1,2,3,4,5);
But when I want to compile and run this procedure, I get this error:
Error: PL/SQL: analysis of completed Compilation unit
Error (9,16): PLS-00311: the declaration of 'TREEUPDATER.updating' (1,2,3,4,5) is incomplete or incorrect
Can any one solve this?
Thank you
The correct syntax for PORCEDURE4 is:
No it's not. I already gave the correct syntax, which apparently ignored you.
I don't know how can pass these parameters to this method.
My question is clear?
It is clear that you are interested in reading the documentation. All the answers are there.
You're mixing two things:
(1) creating the procedure (once), and I already told you how to do it
(2) the procedure call
For 1)-do you only once :
CREATE OR REPLACE PROCEDURE REPORT4)
LEVELS IN NUMBERS
NODEID NUMBER
CHILDBED_OLD NUMBER
CHILDBES_OLD NUMBER
CHILDMANDE_OLD NUMBER
)
AS
JAVA LANGUAGE
NAME of ' oracletree1. TREEUPDATER.updating (int, int, int, int, int)';
For 2)-procedure call:
...
BEGIN
... of the code
-you call proc with your real settings:
procedure4 (v_levels, v_nodeid, v_childbed_old, v_childbes_old, v_childmande_old);
... rest of your code
END;
Pay attention to remarks from other institutions.
-
oracle.apps.fnd.framework.OAException: could not create Java class
oracle.apps.fnd.framework.OAException: could not create Java class: (oracle.apps.pon.forms.jrad.webui.ExtendFormsDynamicJradCO) associated with the area: (ponJradContainerPG). This is probably because the class name is incorrect or not included in the project
I expanded the page seeded controller. It was working fine.
But when I made some changes more and yet once deployed on the server. his gicing me the above error. I didn't know where I was wrong.
Thanks in advance.Hello
Just check the name of the extended correctly controller and you have set the property category of the region controller.
Bounce Apache too...
Thank you
Gerard -
Hello
I tried to load java classes in the database using the loadjava tool, but I get a warning which causes an error when calling the java method of procedure PLSQL.
ERROR: ORA-29552: check warning: java.lang.VerifyError: (class: method com/mq/RIMSmqToolsIn,: mqRead signature: () Ljava/util/list ;) catch_type not a subclass of Throwable)
I think that it is a problem of dependencie for some missing java classes that need to be solved using loadjava tool but I could not understand what pot should be used and how is the correct command with laodjava?
NB: I tried to use a jar file that contains java.util.List.class, but I still get the warning when loading
Thank you very much
ANTHONY
Hello
This error occurs when the dependency jar files loading in the java command loads separate.
Load all the jar files in a command unique loadjava as below:
loadjava, sys/eu1 - r u - v-f--s-grant public - genmissing xyz.jar xyz1.jar
Before loading jar files drop them in the database.
Thanks and greetings
Vincent
-
pl/sql appellant java class member function obtains ora-00932 in 11g.
Call a member function of class of java from a pl/sql script, I get an error ora-00932.
ORA-00932: inconsistent data types: waiting for an IN argument in position 1 which is an instance of an O
convertible to an instance of a user defined class Java got a type of Oracle that could not be converted
The code works fine when the java function is declared static. However, since there could be thousands of users hitting the function at the same time and there is no instance of the object, I wasn't sure if it would be a matter of how oracle manages memory for each user in a session, if it would not be a problem, I can go forward with this approach. However, I have greatly simplified this for an example that reproduces the problem.
Create the oracle type:
CREATE OR REPLACE TYPE MyObject AS OBJECT
(
col1Data VARCHAR2 (10),
MEMBER FUNCTION createData
RETURN VARCHAR2 AS LANGUAGE JAVA
NAME "java.lang.String return MyObject.createData ().
);
Java code:
CREATE OR REPLACE AND FIX JAVA SOURCE NAMED 'MyObject' AS
import java. IO;
public class MyObject
{
private String col1Data;
public void createData)
{
System.out.println ("col1:" + col1Data);
}
}
Java function call vai pl/sql function:
FUNCTION to CREATE or REPLACE fn_myobject
(col1 IN varchar2)
RETURN VARCHAR2
AS
p_rc varchar2 (100);
myObj MyObject;
BEGIN
myObj: = new MyObject (col1);
p_rc: = myObj.createData (); -This line gets an error 00932
RETURN p_rc;
END;
/
And finally, the script from sqlplus to test:
Set serverout
call dbms_java.set_output (50);
Set line 120
declare
VARCHAR2 (64) RC: = ";
R1 varchar2 (64): = 'abc ';
Start
RC: = fn_myobject (r1);
end;
/
I tried all sorts of things without success. Any ideas on this would be most appreciated. It is once again, 11g.
Thank you.
MarkF says:
If you go back to the example code I posted, it is mapping a java class oracle object.
No, it isn't.
Your example simply sets an Oracle object type whose member createData function is implemented in Java.
The fact that the implementing class has the same name does not have a direct mapping between the class and the type of Oracle.
The important part to read and understand in the link I posted is:
A call specification outlines the top level of an Oracle database Java method entry point. So, you can publish only
public
static
methods.However, there is an exception. You can publish instance methods as members of an SQL object type methods.
You are in the first case.
To be in the exceptional cases and be able to publish instance methods, the Java class must implement SQLData.
See the latest example here:
https://docs.Oracle.com/database/121/JJDEV/chsix.htm#JJDEV13273
Adapted to your example:
CREATE OR REPLACE AND compile JAVA SOURCE NAMED "MyObject" AS import java.sql.*; public class MyClass implements SQLData { // Implement the attributes and operations for this type. private String col1Data; public String createData () { System.out.println ("col1: " + col1Data); return col1Data; } // Implement SQLData interface. String sql_type; public String getSQLTypeName() throws SQLException { return sql_type; } public void readSQL(SQLInput stream, String typeName) throws SQLException { sql_type = typeName; col1Data = stream.readString(); } public void writeSQL(SQLOutput stream) throws SQLException { stream.writeString(col1Data); } } /
CREATE OR REPLACE TYPE MyObject AS OBJECT ( col1Data VARCHAR2(10), MEMBER FUNCTION createData RETURN VARCHAR2 AS LANGUAGE JAVA NAME 'MyClass.createData() return java.lang.String' ); /
Test:
SQL> exec dbms_java.set_output(1000) PL/SQL procedure successfully completed. SQL> set serverout on SQL> SQL> select MyObject('ABC').createData() from dual; MYOBJECT('ABC').CREATEDATA() -------------------------------------------------------------------------------- ABC col1: ABC
-
Know Java classes and subclasses
I m working with Forms & Report 10 gr 2.
I m working with Forms & year Report 1,997. Normally, I flip between different application 8 or 9. My applications now appear a bit old-fashioned. Looking to solve this problem, I found an article by Grant Ronald, I think well know in this forum and it solved me a question that I post here. In this article Grant said:
Extend the user interface forms
So, how can you achieve the balance to give your
Application Forms of the makeover to match the 21
century without having to embark on an extensive program of
refurbishment or recycling of the user?
The answer lies in the architecture of Oracle Forms.
For a form that runs via a browser, application the
the user interface is rendered as a Java applet. This Java applet
includes a number of officials of the Java classes
each of the components of UI forms made. Magic
lies in the fact that, since each component of the interface user is, indeed,
a Java class, it can be subclassed. This means that you can
create your own component that does all the
component base, but with your own code to change
the functionality or appearance.
Really a piece of gold, in this regard, it will give you the key can change the forms look & feel.
But, now, come the questions, how can I do this? How do I know what forms of using classes to display a button for example, what I need to do for subclasses?
is there an example or documentation that can help me? If yes ¿where? One of the gurus can give me some links to explore this?
Thank you & considers everyone.Look at this.
http://fdtool.free.fr/LAF/doc/Oracle_Forms_Look_and_Feel_project.htm
It is not supported by Oracle, but is widely used. All support for its use will come from its web page.
-
Hi all
I have the location in my pages jspx with two PortalBundle.xlf & PortalBundle_fr.xlf files. It works very well. I use an ApplicationBean.java and a CustomPhaseListener.java of classes. To call them, I use this variable set in the jspx pages:
< c:set var = "portalBundle" value = "#{adfBundle [' portal.]}" {[PortalBundle']} "/ >"
and this line to have the correct text:
< af:outputLabel value = "#{portalBundle.LANGUAGE}" / >
In the project properties Panel, I put the ressourceBundle to the Portal. PortalBundle
But now I do the change on this label and I want to access the portalBundle java class. I tried with these solutions:
Res ResourceBundle = ResourceBundle.getBundle ("PortalBundle");
String textEmployee = res.getString ('LANGUAGE');
But the application is unable to locate the ressourceBundle... and there my locale by default rather than the ApplicationBean locale.
Thanks for your help!
PS: I used this tutorial video to locate my jspx pages: http://www.youtube.com/watch?v=ha6FzOkVc24Hi, Maxim.
To take your package of Java resource classes follow the next steps:
-Save in faces - config.xml your support and default locale. Remember that you must have a file with a suffix [local] yourPortalBundlePackage.PortalBundle_ that you saved.
es en en es_ES -Save a var that is pointing to your resource group: for example:
com.merchan.portal.PortalBundle portalBundle-Now from Java Code, you can access your packages with the following user mode:
public static String getStringFromBundle(String key, String varName) { FacesContext ctx = JSFUtils.getFacesContext(); ResourceBundle rb = ctx.getApplication().getResourceBundle(ctx, varName); return rb.getString(key); } // USE JSFUtils.getStringFromBundle("HOME","portalBundle"); // If you have a JSFUtils and ADFUtils register this static method there. These classes are very useful
Kind regards.
-
How to pass an argument to a standalone java class JDeveloper
For the experienced:
In JDeveloper when you write a java class with a main() method that takes no arguments, you just click with the right button on the java file and choose run to run the program. But suppose the main() method takes arguments, how to move your arguments to the program? This is especially a problem I use the studio version of JDeveloper (10.1.3.4 and 11.1.1.3 Versions) that each uses the version of the JDK included with, rather the JDK (which is yet another different version) installed at the level of the OS on the PC.
Thanks a lot for your help!
NewmanHello
If you mean how to pass arguments in JDeveloper:
Tools > Project Properties > run/debug > change the default run Configuration (or create a new) > settings start > program Arguments - here you can set argumentsKind regards
Branislav -
Failed to instantiate the java class for custom filter
I created a filter for the AAU and installed under Server, custom, AlterPrefix, classes. However, I got following error when checking in the file:
< Undefined > content item has not been verified successfully. Impossible to filter 'AlterPrefix.CustomFilter' of type 'validateStandard '. Failed to instantiate class code java to 'AlterPrefix.CustomFilter' to the 'AlterPrefix.CustomFilter' site with the default location to "AlterPrefix.CustomFilter".
I have to pass the classes for the classes of server /, then the filter works.
I would like to be in the server/custom. Is that all that I'm missing?
It had file looks like:
@ResultSet Filters 4 type location parameter loadOrder validateStandard AlterPrefix.CustomFilter null 1 @end
@jschultz is correct...
In your generation of component settings, you must click Advanced, and then add the classpath element. In your component definition file (MyComponent.hda), you should see a line like this:
classpath = $COMPONENT_DIR/classes
Then, you need to disable and re-enable your component. If you do this, you should see classpath you of the component in the file 'ucm/config/state.cfg '. Then you know that it is in the classpath during the launch of the Complutense University of MADRID.
Now... If you STILL have problems of not being able to instantiate the Java class, the most common problem is a misspelling of the Java class. Check everything, preferably with a new set of eyes.
Another problem is that despite assertions to the contrary, if you compile your Java classes with a version of the JVM and they instantiate by reflection with a different version of the JVM, then you get sometimes weird class not found"exception. Be sure to compile your code with the same EXACT of Java version that runs UCM.
-
Could not create Java class: associated with the region:
Hi all
I extend the gamepad standard oracle.apps.pos.supplier.webui.SuppSummCO
With a controller custom xxmycomp.oracle.apps.pos.supplier.webui.XXSuppSummCO
I built the project in my local JDEV
Updated the custom controller and place it under $JAVA_TOP
I even checked by ls-l $JAVA_TOP/xxmycomp/oracle/apps/pos/supplier/webui/XXSuppSummCO.class
I gave all the folder permissions of xxmycomp under $JAVA_TOP (chmod-r 777 xxmycomp)
I did the rebound in core OC4J
After you have set the controller custom level of personalization of the region site.
When I'm back to the application, I get the following error
oracle.apps.fnd.framework.OAException: could not create Java class: (xxmycomp.oracle.apps.pos.supplier.webui.XXSuppSummCO) associated with the area: (PageLayoutRN). It is probably because the class name is incorrect or not included in the project.
at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1247)
at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1435)
at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2559)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1894)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:538)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:426)
in OA. jspService(_OA.java:212)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:259)
in com.evermind.server.http.ServletRequestDispatcher.access$ 100 (ServletRequestDispatcher.java:51)
to com.evermind.server.http.ServletRequestDispatcher$ 2.oc4jRun(ServletRequestDispatcher.java:193)
at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:284)
at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198)
at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:395)
to the RFjspService(_RF.java:225)
The custom controller is for test and has only the following code
public void processRequest (OAPageContext oapagecontext,
OAWebBean oawebbean)
{
super.processRequest (oapagecontext, oawebbean);
}
public void processFormRequest (OAPageContext oapagecontext,
OAWebBean oawebbean)
{
super.processFormRequest (oapagecontext, oawebbean);
}
I created the directory xxmycomp under $JAVA_TOP
I have read only access to the other directories under $JAVA_TOP outside xxmycomp.
Can someone help me solve this error?
I do the same steps in another case where it works very well.
Kind regards
ChaoukiTwo things:
1. check that you have moved the code of the application server and database server
2. check the path (spaces, upper/lower case etc.)
3. check the permissions of the file.If all goes well, then make a backup of existing on the server controller and redeploy the file (compile the file in Jdeveloper, after removal of the myclasses directory). Bounce the server.
Concerning
Sumit -
Problem with a query object back to a Java class ColdFusion
Hello!
I need to return a ColdFusion query object from a Java class using a set of JDBC (java.sql.ResultSet) results;
I tried to move my result defined JDBC the constructor of the class coldfusion.sql.QueryTable with this code:
ColdFusion code
< cfset pra = createObject("java","QueryUtil").init () >
< cfset newQuery = CreateObject ("java", "coldfusion.sql.QueryTable") >
< cfset newQuery.init (pra.getColdFusionQuery ()) >
My java class executes a DB query and returns a QueryTable
Code Java (QueryUtil.java)
Import coldfusion.sql.QueryTable; (For the QueryTable class CFusion.jar)
import com.allaire.cfx //(cfx.jar for class Query used from QueryTable)
public class QueryUtil
{
public static coldfusion.sql.QueryTable getColdFusionQuery (rs java.sql.ResultSet)
{
return new coldfusion.sql.QueryTable (SR);
}
}
but when I run the cfm page and coldfusion server tries to run: '< cfset pra createObject("java","QueryUtil").init () = >' this error:
Object instantiation Exception.
An exception occurred when instantiating a java object. The cause of this exception was that: coldfusion/sql/QueryTable.
If I try to run QueryUtil.java with eclipse it all works.
Also, I tried to return a java.sql.ResultSet directly to coldfusion.sql.QueryTable.init () with failure.
Do you know another solution?Thank you cf_dev2
This is the solution:
If you are using another jar file in your java.class, you must write the path of the jar in the jvm classpath:
-Open C:\CFusionMX7\runtime\bin\jvm.config with a text editor;
-Add at the bottom of the path full fo your jar files
-Save
-coldfusion restarI thing you can also add the classpath in coldfusion administrator, but I do not know how;
I found only CF classpath.
Hi all.
Maybe you are looking for
-
I get this error in gmail, and also when I go to the download site.
-
I have, I have a Toshiba Portege P3500, and my computer is turned off only, what can we do this? TKS
-
No keybord tools (copy paste Cup
Hello... I use an iPad pro with cell phone LLE problem is that I don't see the keyboard like dough cutting tools copy (I can just use them by clicking on the textbost to use them It happened to me after I changed the Arabic keyboard in Arabic (PC) Pl
-
"Contact developer" on the world of the BB is broken.
One of my users I reported today that the button "Contact developer" for my application on BB world sends people to the Hompage URL instead of using e-mail as I put it. This used to work properly. I have my account set up to use the email for support
-
12 ELEMENTS HAS CHANGED HOW THE FILES IN A FOLDER ARE DISPLAYED WHEN OPENING A FOLDER
In the past, when I opened a file to select a file to process, the files I created were in order - first the RAW file, then the JPG file. I put the camera upwards in this way so that I could visually choose the RAW file in the process. Approximately