ClassCastException at OAKeyFlexHelper.CreateFlex Error
Hi,
<br>
When iam trying to call KeyFlexField.. Iam getting this error...Can anyone look into this please...
<br><br><br><br>
oracle.apps.fnd.framework.OAException: java.lang.ClassCastException: java.lang.String <br>
at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
<br>at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1145)
<br>at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1408)
<br>at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2381)
<br>at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1734)
<br>at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:508)
<br>at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:429)
<br>at oa_html._OA._jspService(_OA.java:85)
<br>at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
<br>at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
<br>at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
<br>at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
<br>at oracle.jsp.JspServlet.service(JspServlet.java:156)
<br>at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
<br>at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
<br>at org.apache.jserv.JServConnection.run(JServConnection.java:294)
<br>at java.lang.Thread.run(Thread.java:595)
## Detail 0 ##
java.lang.ClassCastException: java.lang.String
<br>at oracle.apps.fnd.framework.webui.OAKeyFlexHelper.createFlex(OAKeyFlexHelper.java:1054)
<br>at oracle.apps.fnd.framework.webui.OAKeyFlexHelper.processFlex(OAKeyFlexHelper.java:756)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanFlexHelper.mergeSegmentsWithParent(OAWebBeanFlexHelper.java:303)
<br>at oracle.apps.fnd.framework.webui.beans.OAKeyFlexBean.mergeSegmentsWithParent(OAKeyFlexBean.java:87)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanBaseTableHelper.prepareFlexColumns(OAWebBeanBaseTableHelper.java:327)
<br>at oracle.apps.fnd.framework.webui.OAAdvancedTableHelper.processRequestAfterController(OAAdvancedTableHelper.java:606)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:645)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanTableHelper.processRequest(OAWebBeanTableHelper.java:2084)
<br>at oracle.apps.fnd.framework.webui.OAAdvancedTableHelper.processRequest(OAAdvancedTableHelper.java:569)
<br>at oracle.apps.fnd.framework.webui.beans.table.OAAdvancedTableBean.processRequest(OAAdvancedTableBean.java:732)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
<br>at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
<br>at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1136)
<br>at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
<br>at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
<br>at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
<br>at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2335)
<br>at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1734)
<br>at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:508)
<br>at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:429)
<br>at oa_html._OA._jspService(_OA.java:85)
<br>at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
<br>at oracle.jsp.app.JspApplication.dispatchRequest(JspApplic<br>ation.java:417)
<br>at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
<br>at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
<br>at oracle.jsp.JspServlet.service(JspServlet.java:156)
<br>at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
<br>at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
<br>at org.apache.jserv.JServConnection.run(JServConnection.java:294)
<br>at java.lang.Thread.run(Thread.java:595)
java.lang.ClassCastException: java.lang.String
<br>at oracle.apps.fnd.framework.webui.OAKeyFlexHelper.createFlex(OAKeyFlexHelper.java:1054)
<br>at oracle.apps.fnd.framework.webui.OAKeyFlexHelper.processFlex(OAKeyFlexHelper.java:756)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanFlexHelper.mergeSegmentsWithParent(OAWebBeanFlexHelper.java:303)
<br>at oracle.apps.fnd.framework.webui.beans.OAKeyFlexBean.mergeSegmentsWithParent(OAKeyFlexBean.java:87)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanBaseTableHelper.prepareFlexColumns(OAWebBeanBaseTableHelper.java:327)
<br>at oracle.apps.fnd.framework.webui.OAAdvancedTableHelper.processRequestAfterController(OAAdvancedTableHelper.java:606)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:645)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanTableHelper.processRequest(OAWebBeanTableHelper.java:2084)
<br>at oracle.apps.fnd.framework.webui.OAAdvancedTableHelper.processRequest(OAAdvancedTableHelper.java:569)
<br>at oracle.apps.fnd.framework.webui.beans.table.OAAdvancedTableBean.processRequest(OAAdvancedTableBean.java:732)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
<br>at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
<br>at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1136)
<br>at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
<br>at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
<br>at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
<br>at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
<br>at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2335)
<br>at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1734)
<br>at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:508)
<br>at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:429)
<br>at oa_html._OA._jspService(_OA.java:85)
<br>at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
<br>at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
<br>at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
<br>at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
<br>at oracle.jsp.JspServlet.service(JspServlet.java:156)
<br>at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
<br>at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
<br>at org.apache.jserv.JServConnection.run(JServConnection.java:294)
<br>at java.lang.Thread.run(Thread.java:595)
Soujanya,
This should definately work as http session is common for both jsp and oaf page. I am not sure how r u playing with session in ur code. The other idea is to pass as url param and correpondingly use:
pageContext.getParameter();
--Mukul
Similar Messages
-
Hi All,
Can any body tell me what are the reasons for this error.
Thanks
Vinod
Exception given below:
Wed Feb 14 07:05:44 GMT-03:00 2001:<E> <ServletContext-Servlets>
ServletRequestImpl: Exception creating new session
Wed Feb 14 07:05:44 GMT-03:00 2001:<E> <ServletContext-Servlets>
java.lang.ClassCastException: weblogic.jndi.WLContext_WLStub
at
weblogic.cluster.replication.ReplicationManager.getRepMan(ReplicationManager
.java:368)
at
weblogic.cluster.replication.ReplicationManager.createSecondary(Compiled
Code)
at
weblogic.cluster.replication.ReplicationManager.register(ReplicationManager.
java:621)
at
weblogic.servlet.internal.session.ReplicatedSession.<init>(ReplicatedSession
.java:112)
at
weblogic.servlet.internal.session.ReplicatedSessionContext.getNewSession(Rep
licatedSessionContext.java:46)
at
weblogic.servlet.internal.ServletRequestImpl.getNewSession(ServletRequestImp
l.java:1104)
at
weblogic.servlet.internal.ServletRequestImpl.getSession(ServletRequestImpl.j
ava:1002)
at com.bluemartini.html.HTMLContext.<init>(HTMLContext.java:197)
at com.bluemartini.html.HTMLBaseServlet.prepareRequest(Compiled
Code)
at
com.bluemartini.html.HTMLBaseServlet.serviceInternal(HTMLBaseServlet.java:42
8)
at
com.bluemartini.html.HTMLBaseServlet.service(HTMLBaseServlet.java:362)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:97)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:298)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:247)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:523)
at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
at weblogic.t3.srvr.ExecuteThread.run(Compiled Code)
1. What version/service pack of Weblogic?
2. It looks like you are configured for a cluster. Is that correct?
3. Have you followed the documentation for configuring classpaths and
starting Weblogic?
Cameron Purdy
Tangosol, Inc.
http://www.tangosol.com
+1.617.623.5782
WebLogic Consulting Available
"vinod" <[email protected]> wrote in message
news:[email protected]...
> Hi All,
>
> Can any body tell me what are the reasons for this error.
>
> Thanks
> Vinod
>
>
> **********************************************************
> Exception given below:
>
>
> Wed Feb 14 07:05:44 GMT-03:00 2001:<E> <ServletContext-Servlets>
> ServletRequestImpl: Exception creating new session
> Wed Feb 14 07:05:44 GMT-03:00 2001:<E> <ServletContext-Servlets>
> java.lang.ClassCastException: weblogic.jndi.WLContext_WLStub
> at
>
weblogic.cluster.replication.ReplicationManager.getRepMan(ReplicationManager
> .java:368)
> at
> weblogic.cluster.replication.ReplicationManager.createSecondary(Compiled
> Code)
> at
>
weblogic.cluster.replication.ReplicationManager.register(ReplicationManager.
> java:621)
> at
>
weblogic.servlet.internal.session.ReplicatedSession.<init>(ReplicatedSession
> .java:112)
> at
>
weblogic.servlet.internal.session.ReplicatedSessionContext.getNewSession(Rep
> licatedSessionContext.java:46)
> at
>
weblogic.servlet.internal.ServletRequestImpl.getNewSession(ServletRequestImp
> l.java:1104)
> at
>
weblogic.servlet.internal.ServletRequestImpl.getSession(ServletRequestImpl.j
> ava:1002)
> at com.bluemartini.html.HTMLContext.<init>(HTMLContext.java:197)
> at com.bluemartini.html.HTMLBaseServlet.prepareRequest(Compiled
> Code)
> at
>
com.bluemartini.html.HTMLBaseServlet.serviceInternal(HTMLBaseServlet.java:42
> 8)
> at
> com.bluemartini.html.HTMLBaseServlet.service(HTMLBaseServlet.java:362)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
> at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> :97)
> at
>
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
> l.java:298)
> at
>
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
> l.java:247)
> at
>
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:523)
> at
> weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
> at weblogic.t3.srvr.ExecuteThread.run(Compiled Code)
>
>
>
-
Migration from Oracle OC4J to Weblogic 10.3 and CLOB ClassCastException
I am migrating a web application from Oracle OC4J to Weblogic 10.0.3. In this application there are number of java files which uses the following piece of code and I can't change that:
oracle.sql.CLOB clob = (oracle.sql.CLOB)rs.getClob(columnNumber);
I have deployed the application on Weblogic Application Server. But when I run the application, it gives me the following exception:
*1. SEVERE: Standard exception info for exception of type: 'java.lang.ClassCastException' at level: 0 - Error Text: 'weblogic.jdbc.wrapper.Clob_oracle_sql_CLOB'*
*2. Apr 3, 2008 10:19:33 AM com.agencyport.menu.MenuController insert*
*3. SEVERE: java.lang.ClassCastException: weblogic.jdbc.wrapper.Clob_oracle_sql_CLOB*
*4.*
*5. at com.agencyport.database.OracleDatabaseAgent.updateLOB(OracleDatabaseA*
*6. gent.java:111)*
*7. at com.agencyport.menu.MenuController.insert(MenuController.java:815)*
[Post New]posted Today 11:09:13 AM private message
Quote [Up]
Dear Marcos,
I have tried using ojdbc5, ojdbc6 and classess12 but with the same result. I am stuck with the problem. I have googled a lot but in vein. In some posts I got the idea to use weblogic.jdbc.vendor.oracle.OracleThinClob. But there is no package or class like mentioned in bold, available in weblogic.jar that I get from WEBLOGIC_HOEM/lib. I have downloaded weblogic 10.3 two times but still got no solution. weblogic.jar does not contain weblogic.jdbc.vendor.oracle.OracleThinClob.
I have also read about using weblogic.jdbc.common.OracleClob to write unicode data but I do not find this package within the weblogic.jar
Any idea please......
Regards
Muhammad IjazHave you reviewed this set of documentation:
http://download.oracle.com/docs/cd/E12839_01/wls/docs103/jdbc/thirdparty.html#wp1043705
http://download.oracle.com/docs/cd/E12839_01/wls/docs103/jdbc/thirdparty.html#wp1045809
http://download.oracle.com/docs/cd/E12839_01/wls/docs103/jdbc/thirdparty.html#wp1043777
There is also a special forum for WebLogic JDBC related questions:
WebLogic Server - JDBC -
ClassCastException when I access an EJB from a remote EJB in WL 8.1
I am using WebLogic 8.1 and am trying to lookup the home interface for an EJB (_ejbRemote_)
from another EJB (_ejbCurrent_). They are deployed in seperate EARs. When I bundle
the home and remote interfaces for ejbRemote in the EAR file that ejbCurrent
is deployed in, everything works fine. But I need to be able to configure ejbRemote
at run time and my customers don't want to have to bundle their classes in my
EAR. So I invoke a custom classloader (of type java.net.URLClassLoader) that will
load the home and remote interface classes for ejbRemote from a configurable
location at runtime. This finds the classes no problem, and the InitialContext.lookup()
returns a stub, but I get a 'java.lang.ClassCastException: Cannot narrow remote
object' error when I call PortableRemoteObject.narrow(home, homeClass);
The code looks like:
// Assume EJBHomeStr = "com.foo.TestHome" in this case
// Load the home interface class. This works.
Class homeClass = urlClassLoader.loadClass(EJBHomeStr);
// Lookup the home interface. This works.
Object lookedUpHomeObject = initialContext.lookup(JNDIName);
// This fails.
Object homeObject = PortableRemoteObject.narrow(lookedUpHomeObject, homeClass);
And the weblogic error looks like
... ; nested exception is:
java.lang.ClassCastException: Cannot narrow remote object to com.foo.TestHome
at weblogic.iiop.PortableRemoteObjectDelegateImpl.narrow(PortableRemoteO
bjectDelegateImpl.java:219)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
at ...[the rest is just my application code stack...]
When I log the ClassLoaders for the affected objects, using getClass().getClassLoader(),
I get:
<snippet from log follows>
getClass().getClassLoader(): weblogic.utils.classloaders.GenericClassLoader@667da1
finder:
weblogic.utils.classloaders.MultiClassFinder@db9199 annotation: myEJBApp@
homeClass.getName(): com.foo.TestHome classloader = java.net.URLClassLoader@4f1707
lookedUpHomeObject.getClass().getName(): com.foo.Test_EJB_kx82zy_HomeImpl_810_WLStub
classloader = weblogic.utils.classloaders.GenericClassLoader@667da1
finder: weblogic.utils.classloaders.MultiClassFinder@db9199 annotation: myEJBApp@
<end snippet from log>
So it appears that since the looked up Stub was loaded by the WebLogic classloader
and the actual Home class was loaded by my URLClassLoader, the narrow() can't
reconcile the two. I have tried both rmic and the Weblogic appc command to pre-generate
the stubs, which I put in the same JAR as my home and remote interface classes
and load with my custom classloader. But the standard stub (generated by either
rmic or appc) is named TestHomeStub.class and Weblogic is ignoring those and
making a class with the name Test_EJB_kx82zy_HomeImpl_810_WLStub, as shown above.
I have also tried to put the remote interface classes and stubs in the System
classpath using the -classpath option when I start WebLogic, but same result.
The question is, Is there a way in WebLogic to communicate with a remote EJB in
a seperate EAR without bundling anything about that remote EAR in my EAR? Or is
there something I've missed? I need to keep my application J2EE compliant, meaning
I can't hardcode any AppServer-specific code in my application.
Thanks.Hi Jon,
Glad to hear that.
Regards,
Slava Imeshev
"Jon Sutula" <[email protected]> wrote in message news:[email protected]...
>
I fixed the problem. It turns out I didn't need to use a custom classloader at
all, I just use Reflection directly on the classes ruturned from my JNDI lookup.
So when I lookup the home class, I don't need to narrow or cast it, I just use
Reflection to invoke the "create" method. Then I use the object that I get from
create and directly invoke whatever method on it I need, again using Reflection.
And that works.
"Slava Imeshev" <[email protected]> wrote:
Hi Jon,
The problem is, this class is not available for the classloader
running your "main code".
You can try to hack the into the thread context class loader:
Thread thread = Thread.currentThread();
ContextClassLoader originalClassLoader = thread.getContextClassLoader();
try {
YourURLClassloader yourClassLoader = new
YourURLClassloader(originalClassLoader);
thread.setContextClassLoader(yourClassLoader );
// your code goes here
} finally {
// Don't forget to restore it !!!
thread.setContextClassLoader(originalClassLoader);
Be very cautious. If you fail to restore the original context class loader,
you will likely have to restart the server.
Hope this helps.
Regards,
Slava Imeshev
"Jon Sutula" <[email protected]> wrote in message news:[email protected]...
I am using WebLogic 8.1 and am trying to lookup the home interfacefor an EJB (_ejbRemote_)
from another EJB (_ejbCurrent_). They are deployed in seperate EARs.When I bundle
the home and remote interfaces for ejbRemote in the EAR file that
ejbCurrent
is deployed in, everything works fine. But I need to be able to configure
ejbRemote
at run time and my customers don't want to have to bundle their classesin my
EAR. So I invoke a custom classloader (of type java.net.URLClassLoader)that will
load the home and remote interface classes for ejbRemote from a configurable
location at runtime. This finds the classes no problem, and the InitialContext.lookup()
returns a stub, but I get a 'java.lang.ClassCastException: Cannot narrowremote
object' error when I call PortableRemoteObject.narrow(home, homeClass);
The code looks like:
// Assume EJBHomeStr = "com.foo.TestHome" in this case
// Load the home interface class. This works.
Class homeClass = urlClassLoader.loadClass(EJBHomeStr);
// Lookup the home interface. This works.
Object lookedUpHomeObject = initialContext.lookup(JNDIName);
// This fails.
Object homeObject = PortableRemoteObject.narrow(lookedUpHomeObject,homeClass);
And the weblogic error looks like
... ; nested exception is:
java.lang.ClassCastException: Cannot narrow remote object tocom.foo.TestHome
at weblogic.iiop.PortableRemoteObjectDelegateImpl.narrow(PortableRemoteO
bjectDelegateImpl.java:219)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
at ...[the rest is just my application code stack...]
When I log the ClassLoaders for the affected objects, using getClass().getClassLoader(),
I get:
<snippet from log follows>
getClass().getClassLoader(): weblogic.utils.classloaders.GenericClassLoader@667da1
finder:
weblogic.utils.classloaders.MultiClassFinder@db9199 annotation: myEJBApp@
homeClass.getName(): com.foo.TestHome classloader = java.net.URLClassLoader@4f1707
lookedUpHomeObject.getClass().getName(): com.foo.Test_EJB_kx82zy_HomeImpl_810_WLStub
classloader = weblogic.utils.classloaders.GenericClassLoader@667da1
finder: weblogic.utils.classloaders.MultiClassFinder@db9199 annotation:myEJBApp@
<end snippet from log>
So it appears that since the looked up Stub was loaded by the WebLogicclassloader
and the actual Home class was loaded by my URLClassLoader, the narrow()can't
reconcile the two. I have tried both rmic and the Weblogic appc commandto pre-generate
the stubs, which I put in the same JAR as my home and remote interfaceclasses
and load with my custom classloader. But the standard stub (generatedby either
rmic or appc) is named TestHomeStub.class and Weblogic is ignoringthose and
making a class with the name Test_EJB_kx82zy_HomeImpl_810_WLStub, asshown above.
I have also tried to put the remote interface classes and stubs inthe System
classpath using the -classpath option when I start WebLogic, but sameresult.
The question is, Is there a way in WebLogic to communicate with a remoteEJB in
a seperate EAR without bundling anything about that remote EAR in myEAR? Or is
there something I've missed? I need to keep my application J2EE compliant,meaning
I can't hardcode any AppServer-specific code in my application.
Thanks. -
ClassCastException on getObject()
I'm using the thin driver Oracle JDBC 8.1.5. When I execute the
following syntax:
callStmt.registerOutParameter (1, java.sql.Types.INTEGER);
callStmt.execute(); //correctly executed
Object value = callStmt.getObject(1);
Integer pk = (Integer) value; // Throws illegal cast exception
The callable statement is executed correctly however the cast
statement generates a "java.lang.ClassCastException:
java.math.BigDecimal" error. If I replace the (Integer) cast with
(java.math.BigDecimal) cast it works fine. What am I doing wrong?
Pam Ross
China Lake
nullThe solution was to delete every ".adf" directory and adf-config.xml and adfm.xml that is contained in the workspace directory.
-
Problem trying to update a table cell
Hello all,
I'm trying to implement a setValueAt method using an arrayList.....no success. Could anyone help?
When trying to change the a value in the table I get these errors:
"Exception occurred during event dispatching:
java.lang.ClassCastException: java.lang.String
at CachingResultSetTableModel.getValueAt(CachingResultSetTableModel.java:37)
at javax.swing.JTable.getValueAt(JTable.java:1711)
at javax.swing.JTable.prepareRenderer(JTable.java:3530)"
public void setValueAt(Object avalue, int r, int c){
if(r < cache.size()){
row[c] = (Object[])cache.set(r, avalue);
fireTableCellUpdated(r, c);
}//setValueAt
*********For reference here's the getValueAt method*************************
public Object getValueAt(int r, int c){
if(r < cache.size()){
row = (Object[])cache.get(r);
return row[c];
else
return null;
}//getValueAtHello,
I am new at implementing this a table model and JTable, so all I am working with is the mainApp, the model, and the JTable. I am not too sure if and what listeners I should setup.
I can compile the program. After the data is presented in the table, I try to change a value in one of the cells. Once I have clicked out of the cell I get the ClassCastException: java.lang.String error. I believe the exception is being created by the data I am entering. Do you know of any links that could help me figure how to properly update a cell.
Determen -
I'm trying to attach a piece of XML in an email. In 10.1.2 this works ok; I used orcl:get-content-as-string(bpws:getVariableData('OutputVariable','RELATIONS')) and put that into the ContentBody of an email.
In 10.1.3.1 this does not work anymore.
orcl:get-content-as-string is no longer available so I used ora:getContentAsString instead. So far so good.
I also had to use a mime type of text/html because with text/xml I get java.io.IOException: Unable to write XML attachment java.lang.String and java.lang.ClassCastException: java.lang.String errors allthough BPEL Console does not show an error.
With mime type text/html I get an email with an attachment but the content of the XML is not escaped; a tag like <NAME>John & Jack</NAME> should be <NAME>John &amp; Jack</NAME>
does anyone have a clue or a solution that works in 10.1.3.1Hi
There is a bug : 6083186 logged on the same issue.
"PROBLEMS WITH ESCAPED XML IN BPEL 10.1.3.1.0"
Cheers
Anirudh Pucha -
ShutDown problem in wls6.0
Hi
we are using wls6.0 sp1 on a unix machine. when trying to stop the server by the command
java weblogic.Admin -url <url> -username system -password <password> SHUTDOWN
we get the following exception even if the server is running, and are not able to stop the server from a different session.
Exception in thread "main" java.lang.ClassCastException: Expected RemoteException, RuntimeException, or Error but received: 'class java.rmi.ConnectException'
at weblogic.common.T3Client.sendRecv(T3Client.java:724)
at weblogic.common.AdminServicesImpl.shut(AdminServicesImpl.java:97)
at weblogic.Admin.main(Admin.java:425)
Can anyone give a pointer to the problem.
Thanx
AmitGenerally use kill -9 against the pid.
Peace,
Cameron Purdy
Tangosol Inc.
Tangosol Coherence: Clustered Coherent Cache for J2EE
Information at http://www.tangosol.com/
"Amit Chopra" <[email protected]> wrote in message
news:3c3b22b6$[email protected]..
Hi
we are using wls6.0 sp1 on a unix machine. when trying to stop the serverby the command
java weblogic.Admin -url <url> -username system -password <password>SHUTDOWN
>
we get the following exception even if the server is running, and are notable to stop the server from a different session.
>
Exception in thread "main" java.lang.ClassCastException: ExpectedRemoteException, RuntimeException, or Error but received: 'class
java.rmi.ConnectException'
at weblogic.common.T3Client.sendRecv(T3Client.java:724)
atweblogic.common.AdminServicesImpl.shut(AdminServicesImpl.java:97)
at weblogic.Admin.main(Admin.java:425)
Can anyone give a pointer to the problem.
Thanx
Amit -
Input Processor Exception Checking
When an Input Processor throws an exception I understand that the InputProcessor
processor performs checks for exceptions in the following order:
1/ InstantiationException, ClassNotFoundException, ClassCastException - logged
at the ERROR level with a stack trace and thrown back to the webflow
2/ RuntimeException - thrown back to the Webflow. Will be logged with a stack
trace
3/ Exception - thrown back to the webflow. Will be logged at the INFO level without
a stack trace
What I am unsure about is where in this hierarchy does the checking for the com.bea.p13n.appflow.exception.ProcessingException
fit?
Many Thanks
- Richard Coopertried with the following example
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
String sFilePath="C:\\Folder With Space\\test.xml";
String sResultFilePath="C:\\Folder With Space\\test1.xml";
File f1 = new File(sFilePath);
System.out.println("File exists " + f1.exists());
DocumentBuilderFactoryImpl factory = (DocumentBuilderFactoryImpl) DocumentBuilderFactory.newInstance();
DocumentBuilderImpl parser = (DocumentBuilderImpl) factory.newDocumentBuilder();
Document document = parser.parse(f1);
System.out.println(document.getChildNodes().getLength());
Transformer transformer = TransformerFactory.newInstance().newTransformer();
DOMSource xmlSource = new DOMSource(document);
StreamResult result;
File f = new File(sResultFilePath);
if (f.exists() == false) {
result = new StreamResult(f);
} else {
result = new StreamResult(sResultFilePath);
transformer.transform(xmlSource, result);
System.out.println(result);I couldn't see any error. It seems the error is with the Parsing API Saxon that you have used, is not able to treat the file path with blank spaces. I would suggest to check the API documentation. -
Multiple Values per Key - PLEASE HELP!!
hi. im trying to setup a TreeMap so it contains multiple values for each key using a List to store these values and a string as a key to reference them. however, although it compiles, i recieve a ClassCastException: java.util.ArrayList error when it runs. heres some of my code:
Map resultRelation = new TreeMap();
List list = new ArrayList();
list.add(value1);
list.add(value2);
resultRelation.put(Key, list);
i cant seem to find much useful information on this sort of thing. any help would be appreciated.well after hours of labouring, it turns out that the code i posted is working but the problem is actually to do with printing out the values stored in the array. it was rather stupid of me but before i had created a print method which printed the key and its value from the map, assuming the value was one string not a List, and i hadn't updated it =) so the ClassCastException error was occuring because i was trying to cast the value (which is really a List) to a string in order to print it.
heres my updated printRelation method code as follows:
private static void printRelation(Map relation) {
Iterator keyIter = relation.keySet().iterator();
Iterator valueIter = relation.values().iterator();
while(keyIter.hasNext() == true) {
String primaryKey = (String)keyIter.next();
List foreignKey = (List)valueIter.next();
ConsoleIO.out.print(primaryKey); // ignore the ConsoleIO stuff. the key prints no prob.
Iterator iter = foreignKey.iterator();
while(iter.hasNext() == true) {
String value = (String)iter.next();
ConsoleIO.out.print(value);
at the moment im only adding 1 value to the List as shown in my previous post. e.g.
list.add(foreignKey1);
all this works BUT im getting the wrong results. instead of printing out the key and only its values, its printing out the key and ALL the values from the text file im using. i think its either got something to do with my while loop or my casting of the List but this is all new ground for me =)
thanks. -
Studio Creator - Debugging - 'Source not available' - how to import
Hello i'm in SC and want to figure out how to import the source for a class that is in error, i tried Fast Insert to no avail, thanks much!
Exception Handler
Description: An unhandled exception occurred during the execution of the web application. Please review the following stack trace for more information regarding the error.
Exception Details: javax.faces.FacesException
javax.faces.FacesException: Can't instantiate class: 'insertupdatedelete.Page1'.. class insertupdatedelete.Page1 : javax.faces.FacesException: java.lang.ClassCastException
Possible Source of Error:
Class Name: com.sun.faces.application.ApplicationAssociate
File Name: ApplicationAssociate.java
Method Name: createAndMaybeStoreManagedBeans
Line Number: 308
Source not available. Information regarding the location of the exception can be identified using the exception stack trace below.
Stack Trace:
com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:308)
com.sun.faces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:78)
com.sun.faces.el.impl.NamedValue.evaluate(NamedValue.java:125)
com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)
com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
com.sun.jsfcl.app.ViewHandlerImpl.setupPageBean(ViewHandlerImpl.java:397)
com.sun.jsfcl.app.ViewHandlerImpl.createView(ViewHandlerImpl.java:252)
com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:164)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)Hi,
Are you working with "Performing Inserts, Updates, and Deletes" tutorial from
http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/inserts_updates_deletes.html
MJ -
Downloading problems in wls6.0
Hi all,
I'm having problems downloading wls 6.0. I've done a http download and even
though the file size is 45mb, I get only 8Mb after 30 minutes of downloading.
THen when I double click on the executable weblogic600sp1_win it just zips through
and nothing happenss. I look at the windows NT server task manager and there is
a process in memory weblogic600sp1_ Then it stays there for ages and nothing happens..
I would really like to check out the latest features of wls6.0. Any help would
be gratefully accepted..
Thanks in advance,
Surlu.Generally use kill -9 against the pid.
Peace,
Cameron Purdy
Tangosol Inc.
Tangosol Coherence: Clustered Coherent Cache for J2EE
Information at http://www.tangosol.com/
"Amit Chopra" <[email protected]> wrote in message
news:3c3b22b6$[email protected]..
Hi
we are using wls6.0 sp1 on a unix machine. when trying to stop the serverby the command
java weblogic.Admin -url <url> -username system -password <password>SHUTDOWN
>
we get the following exception even if the server is running, and are notable to stop the server from a different session.
>
Exception in thread "main" java.lang.ClassCastException: ExpectedRemoteException, RuntimeException, or Error but received: 'class
java.rmi.ConnectException'
at weblogic.common.T3Client.sendRecv(T3Client.java:724)
atweblogic.common.AdminServicesImpl.shut(AdminServicesImpl.java:97)
at weblogic.Admin.main(Admin.java:425)
Can anyone give a pointer to the problem.
Thanx
Amit -
Hi Gurus,
I have a java class to modify the usr_manager_key field.
When i use the code
public void updateManagerKey(String fieldUserKey,
String fieldManagerKey) throws Exception {
String str1 = "updateManagerKey";
this.logger.info(this.className, str1, "Enter at updateManagerKey ");
List<User> result = null;
SearchCriteria criteria =
new SearchCriteria("usr_key", fieldUserKey, SearchCriteria.Operator.EQUAL);
try {
result = service.search(criteria, null, null);
this.logger.info(this.className, str1, "getManagerKey "+result.get(0).getManagerKey());
result.get(0).setManagerKey(fieldManagerKey);
service.modify("usr_key",fieldUserKey, result.get(0));
} catch (AccessDeniedException e) {
e.printStackTrace();
} catch (Exception e) {
this.logger.info(this.className, str1, "Error at UpdateManager "+e.getMessage());
e.printStackTrace();
}I get the error
[2011-08-16T20:32:46.067-03:00] [oim_server1] [NOTIFICATION] [] [OIMCP.UPDATEMANAGERIDOU] [tid: OIMQuartzScheduler_Worker-5] [userId: oiminternal] [ecid: 0000J7J2JEHBt1NpyG1FiW1EIc5F000002,0] [APP: oim#11.1.1.3.0] br.com.xxx.idm.UpdateManagerIdOU : updateManagerKey : Error at UpdateManager IAM-3056148:usr_created is a System Attribute and cannot be set through API.:usr_createdI understand then i can't to update from java api?
Thanks in advancedI got any errors with this code, tried any forms, and with same code, worked fine.
public void updateManagerKey(String fieldUserKey, Object fieldManagerKey,
String fieldUserLogin,
String fieldEmail) throws Exception {
String str1 = "updateManagerKey";
this.logger.debug(this.className, str1, invoker+" Enter at updateManagerKey ");
UserManagerResult result = null;
HashMap<String, Object> atrrMap = new HashMap<String, Object>();
try {
atrrMap.put("usr_manager_key", fieldManagerKey);
atrrMap.put("POSSUI_LIDER", "1");
atrrMap.put("Email",
fieldEmail == null ? fieldUserLogin + "@mail.com" :
fieldEmail);
User user = new User(String.valueOf(fieldUserKey), atrrMap);
result =
service.modify("User Login", String.valueOf(fieldUserLogin), user);
} catch (AccessDeniedException e) {
this.logger.error(this.className, str1,
invoker+" Error at AccessDeniedException UpdateManager " +
e.toString());
} catch (ClassCastException e) {
this.logger.error(this.className, str1,
invoker+" Error at ClassCastException UpdateManager " + e.toString());
} catch (Exception e) {
this.logger.error(this.className, str1,
invoker+" Error at UpdateManager " + e.toString());
this.logger.error(this.className, str1,
invoker+" Error at UpdateManager " + e.toString());
throw new Exception(invoker+" Error at UpdateManager " + e.toString());
this.logger.debug(this.className, str1, invoker+" Exiting UpdateManager");
} -
I have this bit of code that looks like this:
<cfscript>
GetPageContext().include("login.jsp?OPEID=#OPEID#&Role=#Role#&APURL=#APURL#&SSN=#SSN#");
</cfscript>
this works on CFMX6 and requires 2 jar files in
C:\CFusionMX\wwwroot\WEB-INF\lib. I am building this new server and
all settings are exactly the same. I even put the jar files in the
MX7 path and restarted services but am now getting this error over
and over.
java.lang.ClassCastException null <br>The error
occurred on line 27.
this is the JSP code that's failing; the second line to be
exact
SecurityToken token = null;
token = new SecurityToken();
any help is appreciated. i'm thinking there is some small
setting in the new server that I'm overlooking but can't figure it
out. thanks>
GetPageContext().include("login.jsp?OPEID=#OPEID#&Role=#Role#&APURL=#APURL#&SSN=
> #SSN#");
It surprises me that an INCLUDE would accept a file name with
*URL
arguments*. An include is not a HTTP request, so what would
one expect the
URL arguments to achieve?
Are you sure you're not thinking of
getPageContext().forward()?
Adam -
Error in PPR ( java.lang.ClassCastException)
Hi All,
Iam using PPR.In the PPR event my code is as follows:
if ("PopulateLicenseEndDate".equals(pageContext.getParameter(EVENT_PARAM)))
String rowReference =pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
OARow row = (OARow)am.findRowByRef(rowReference);
String StartDate = (String)row.getAttribute("LicenseStartDate");
end if;
Here the attribute ("LicenseStartDate") is of type date and item style is "MessageTextInput".
When im selecting the date from the page,it is throwing the error at the code
" String StartDate = (String)row.getAttribute("LicenseStartDate")" ;
The exact error is : oracle.apps.fnd.framework.OAException: java.lang.ClassCastException
I tried using Date/MessageTextInput instead of string to type cast,but still the error is not resolved.
Can any body help me
Thanks,
SrinivasHi Srinivas,
String rowReference =pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
OARow row = (OARow)am.findRowByRef(rowReference);
String StartDate = *(String)row.getAttribute("LicenseStartDate").toString();*
}OR
String StartDate = row.getAttribute("LicenseStartDate")+"";
Thanks
--Anil
Maybe you are looking for
-
Add a new reconciliation account in OAMK
Hi, how to add a new reconciliation account in transaction code OAMK? Thanks for your feed back
-
PO type UB is pulling in a Purchase Info Record - should this happen?
Hi All, I've been looking around the net few a few days, off and on, but I can't find an answer. A colleague has created a Purchase Order type UB but it is bringing in a Purchase Info Records that relates to a different receiving plant. This is bring
-
When I initially open documents, I get this type of error messages. If I reload the page, then the PDF or document usually opens but will not allow me to print. I have uninstalled and reinstalled the application 30+ times at this point, have talked
-
Removing Non-Ascii Characters from a String
Hi Everyone, I would like to remove all NON-ASCII characters from a large string. For example, I am taking text from websites and would like to remove all the strange arabic and asian characters. How can I accomplish this? Thank you in advance.
-
No Work Schedule rule for Key 4 AH40ADPWSR
Hi Experts, Can someone help me in resolving IT7 error which I am getting while updating Workshcedule? I have check all possible config nodes to find out error but no luck. Generally this error occurs because of PS Grouping... Here are screenshots...