Issue with java.lang.ClassCastException: oracle.sql.StructDescriptor
Hi ,
I'm creating a dbadapter for a custom API written in APPS schema -
TYPE MISIPM_LOB IS RECORD (
FILE_ID IPM_LOBS.FILE_ID%TYPE,
FILE_NAME IPM_LOBS.LOB_NAME%TYPE );
TYPE MISIPM_LOB_LIST IS TABLE OF MISIPM_LOB;
PROCEDURE GET_FILE_ID_DETAILS(
P_SOURCE_SYSTEM IN VARCHAR2,
p_entity_value IN VARCHAR2,
p_entity_code IN VARCHAR2,
P_ORG_ID IN NUMBER,
P_MISIPM_FILES_LIST OUT MISIPM_LOB_LIST,
P_ERRCODE OUT VARCHAR2,
P_ERRMESSAGE OUT VARCHAR2);
From JDeveloper, there is a wrapper package is getting created and the compilation/deployment of this composite is also without any error.
But when I run the composite, I'm surprisingly getting the below error -
Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'GetAttachmentMetaData' failed due to: Interaction processing error. Error while processing the execution of the APPS.BPEL_GETATTACHMENTMETADATA1.XX_DELIVER_BLOB$GET_FILE_ API interaction. An error occurred while processing the interaction for invoking the APPS.BPEL_GETATTACHMENTMETADATA1.XX_DELIVER_BLOB$GET_FILE_ API. Cause: java.lang.ClassCastException: oracle.sql.StructDescriptor Check to ensure that the XML containing parameter data matches the parameter definitions in the XSD. This exception is considered not retriable, likely due to a modelling mistake. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.
I recreated the adapter multiple times within the composite and also tried to create a separate composite and all the cases the error message received was same. There two more similar procedure call's in the composite and all rest of them are working fine.
I can call the wrapper from sql script separately.
Verified that the XSD generated and the wrapper package parameters are matching as well.
Did anyone face the same issue or any explanation/help is much appreciated.
Regards,
Debanjan
Hi Vijay,
I have checked the number of parameters as well.
<element name="InputParameters">
<complexType>
<sequence>
<element name="P_SOURCE_SYSTEM" type="string" db:index="1" db:type="VARCHAR2" minOccurs="0" nillable="true"/>
<element name="P_ENTITY_VALUE" type="string" db:index="2" db:type="VARCHAR2" minOccurs="0" nillable="true"/>
<element name="P_ENTITY_CODE" type="string" db:index="3" db:type="VARCHAR2" minOccurs="0" nillable="true"/>
<element name="P_ORG_ID" type="decimal" db:index="4" db:type="NUMBER" minOccurs="0" nillable="true"/>
</sequence>
</complexType>
</element>
<element name="OutputParameters">
<complexType>
<sequence>
<element name="P_MISIPM_FILES_LIST" type="db:APPS.XX_DELIVER_X35784324X1X5" db:index="5" db:type="Array" minOccurs="0" nillable="true"/>
<element name="P_ERRCODE" type="string" db:index="6" db:type="VARCHAR2" minOccurs="0" nillable="true"/>
<element name="P_ERRMESSAGE" type="string" db:index="7" db:type="VARCHAR2" minOccurs="0" nillable="true"/>
</sequence>
</complexType>
</element>
<complexType name="APPS.XX_DELIVER_X35784324X1X6">
<sequence>
<element name="FILE_ID" type="decimal" db:type="NUMBER" minOccurs="0" nillable="true"/>
<element name="FILE_NAME" db:type="VARCHAR2" minOccurs="0" nillable="true">
<simpleType>
<restriction base="string">
<maxLength value="2000"/>
</restriction>
</simpleType>
</element>
</sequence>
</complexType>
<complexType name="APPS.XX_DELIVER_X35784324X1X5">
<sequence>
<element name="P_MISIPM_FILES_LIST_ITEM" type="db:APPS.XX_DELIVER_X35784324X1X6" db:type="Struct" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
</sequence>
</complexType>
Regards,
Debanjan
Similar Messages
-
Hello
I am getting java.lang.ClassCastException: oracle.xml.parser.v2.XMLText cannot be cast to org.w3c.dom.Element error. This code is in java which is present in java embedding.
The SOA is parsing the xml in java code using oracle.xml.parser.v2 . This wont be a problem if the SOA uses default w3c DOM parser. How do i force SOA to use w3c DOM parser.
Is there any thing i can do with class loading?
Kindly help.
Regards
SharatCan you paste your java code here ? I assume, you must have tried type-casting.
-
Hi Gurus,
Trying to pass an OAG XML 9.0 payload to a remote trading Partner, over an AS2 channel -- message is both Signed and Encrypted, Cert has been imported.
I get the B2B-50014: General Error.
B2B is able to identify the Agreement correctly.
LOGS:
[2011-05-12T12:27:03.292+00:00] [soa_ms_1] [ERROR] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@243d15ed] [userId: <anonymous>] [ecid: bb3e7e8ee8316823:74cad781:12fc9c42815:-7ff5-0000000000172f4e,0] [APP: soa-infra] Error -: B2B-50014: General Error: java.lang.ClassCastException: oracle.xml.parser.v2.XMLParseException cannot be cast to oracle.tip.b2b.system.B2BDomainException[[
at oracle.tip.b2b.engine.Engine.processOutgoingMessageImpl(Engine.java:1571)
at oracle.tip.b2b.engine.Engine.processOutgoingMessage(Engine.java:800)
at oracle.tip.b2b.engine.Engine.handleMessageEvent(Engine.java:3785)
at oracle.tip.b2b.engine.Engine.processEvents(Engine.java:3127)
at oracle.tip.b2b.engine.ThreadWorkExecutor.processEvent(ThreadWorkExecutor.java:619)
at oracle.tip.b2b.engine.ThreadWorkExecutor.run(ThreadWorkExecutor.java:220)
at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:120)
at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:183)
at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
Caused by: java.lang.ClassCastException: oracle.xml.parser.v2.XMLParseException cannot be cast to oracle.tip.b2b.system.B2BDomainException
at oracle.tip.b2b.document.oag.OagDocumentPlugin.validateXMLDocument(OagDocumentPlugin.java:1237)
at oracle.tip.b2b.document.oag.OagDocumentPlugin.processOutgoingDocument(OagDocumentPlugin.java:819)
at oracle.tip.b2b.msgproc.Request.outgoingRequestPostColab(Request.java:1483)
at oracle.tip.b2b.msgproc.Request.outgoingRequest(Request.java:990)
at oracle.tip.b2b.engine.Engine.processOutgoingMessageImpl(Engine.java:1511)
... 8 more
java.lang.ClassCastException: oracle.xml.parser.v2.XMLParseException cannot be cast to oracle.tip.b2b.system.B2BDomainException
at oracle.tip.b2b.document.oag.OagDocumentPlugin.validateXMLDocument(OagDocumentPlugin.java:1237)
at oracle.tip.b2b.document.oag.OagDocumentPlugin.processOutgoingDocument(OagDocumentPlugin.java:819)
at oracle.tip.b2b.msgproc.Request.outgoingRequestPostColab(Request.java:1483)
at oracle.tip.b2b.msgproc.Request.outgoingRequest(Request.java:990)
at oracle.tip.b2b.engine.Engine.processOutgoingMessageImpl(Engine.java:1511)
at oracle.tip.b2b.engine.Engine.processOutgoingMessage(Engine.java:800)
at oracle.tip.b2b.engine.Engine.handleMessageEvent(Engine.java:3785)
at oracle.tip.b2b.engine.Engine.processEvents(Engine.java:3127)
at oracle.tip.b2b.engine.ThreadWorkExecutor.processEvent(ThreadWorkExecutor.java:619)
at oracle.tip.b2b.engine.ThreadWorkExecutor.run(ThreadWorkExecutor.java:220)
at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:120)
at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:183)
at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
Error -: B2B-50014: General Error: java.lang.ClassCastException: oracle.xml.parser.v2.XMLParseException cannot be cast to oracle.tip.b2b.system.B2BDomainException
at oracle.tip.b2b.engine.Engine.processOutgoingMessageImpl(Engine.java:1571)
at oracle.tip.b2b.engine.Engine.processOutgoingMessage(Engine.java:800)
at oracle.tip.b2b.engine.Engine.handleMessageEvent(Engine.java:3785)
at oracle.tip.b2b.engine.Engine.processEvents(Engine.java:3127)
at oracle.tip.b2b.engine.ThreadWorkExecutor.processEvent(ThreadWorkExecutor.java:619)
at oracle.tip.b2b.engine.ThreadWorkExecutor.run(ThreadWorkExecutor.java:220)
at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:120)
at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:183)
at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
Caused by: java.lang.ClassCastException: oracle.xml.parser.v2.XMLParseException cannot be cast to oracle.tip.b2b.system.B2BDomainException
at oracle.tip.b2b.document.oag.OagDocumentPlugin.validateXMLDocument(OagDocumentPlugin.java:1237)
at oracle.tip.b2b.document.oag.OagDocumentPlugin.processOutgoingDocument(OagDocumentPlugin.java:819)
at oracle.tip.b2b.msgproc.Request.outgoingRequestPostColab(Request.java:1483)
at oracle.tip.b2b.msgproc.Request.outgoingRequest(Request.java:990)
at oracle.tip.b2b.engine.Engine.processOutgoingMessageImpl(Engine.java:1511)
... 8 more
Kindly advise.
Regards,
Sambhav.Hi Anuj,
Thanks, i disabled the agreement validation, ran the file through. It worked.
Also, tried to validate the XML instance with the XSD, and it threw no errors, so the payload conforms to the XSD, but will validate.
Other thing being, this is an OAG-XML PO, so had the XSD, not the Guideline file.
Regards,
Sambhav. -
Hi I am new Jdeveloper and java
I am getiing the following error when I try to run the project
500 Internal Server Error
java.lang.IllegalAccessError: javax/naming/InitialContext at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473) at javax.servlet.GenericServlet.init(GenericServlet.java:259) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.HttpApplication.loadServlet(HttpApplication.java:2365) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.HttpApplication.findServlet(HttpApplication.java:4807) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.HttpApplication.getRequestDispatcher(HttpApplication.java:2833) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:680) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186) at java.lang.Thread.run(Thread.java:534)
and the OC4j server log show as java.lang.ClassCastException: oracle.jsp.runtimev2.JspServlet
Can any one help me resolving the issue
Thanks,
KrishHi I am new Jdeveloper and java
I am getiing the following error when I try to run the project
500 Internal Server Error
java.lang.IllegalAccessError: javax/naming/InitialContext at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473) at javax.servlet.GenericServlet.init(GenericServlet.java:259) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.HttpApplication.loadServlet(HttpApplication.java:2365) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.HttpApplication.findServlet(HttpApplication.java:4807) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.HttpApplication.getRequestDispatcher(HttpApplication.java:2833) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:680) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186) at java.lang.Thread.run(Thread.java:534)
and the OC4j server log show as java.lang.ClassCastException: oracle.jsp.runtimev2.JspServlet
Can any one help me resolving the issue
Thanks,
Krish -
Tomcat: java.lang.NoClassDefFoundError: oracle/sql/NUMBER
hi,
i have managed to come this far with my "simple" webapplication under tomcat.
the exception is:
java.lang.NoClassDefFoundError: oracle/sql/NUMBER
since i have tried to put the classes12.jar in every reasonable directory without effect, i have to bother this forum. does anyone know "where the dog is burried"(german saying)?
greetz
Selim KeserHi yves,
This class is in the jdev_home/jdbc.lib/ojdbc14.jar.
But prior to deploying your ADF application, did you install the ADF runtime libraries to Tomact as explained here?:
http://www.oracle.com/webapps/online-help/jdeveloper/10.1.3?topic=j2ee_ptomcatdeploy_html
Thanks
Prasanth -
We have recently upgraded all of our servers from:
Java 1.6.31 to 1.6.32
and
Glassfish 3.1.1 to 3.1.2
We upgraded our development server from Oracle 10g to 11g.
Our live servers are working fine. Our development server now is spewing out a java.lang.NoClassDefFoundError: oracle/sql/STRUCT error whenever it encounters a servlet or page which uses this class.
ojdbc14.jar and sdopai.jar were included within the WAR file, and I have tried with them excluded from the WAR file to no avail. We have tried reverting the version of ojdbc.jar on the server to the earlier version, this has made no different.
Any ideas? The full stack trace is below:
[#|2012-05-28T16:15:34.950+0100|WARNING|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=80;_ThreadName=Thread-2;|StandardWrapperValve[EnterDataSS]: PWC1406: Servlet.service() for servlet EnterDataSS threw exception
java.lang.NoClassDefFoundError: oracle/sql/STRUCT
at oracle.spatial.geometry.JGeometry.load(JGeometry.java:3097)
at Bto.Location.LocatorUtils.JavaScriptifySDO(LocatorUtils.java:97)
at Bto.Chats.Controllers.EnterDataModuleMain.<init>(EnterDataModuleMain.java:136)
at Bto.Chats.SessionBean.initialiseEdm2(SessionBean.java:348)
at Bto.Chats.Servlets.Enter.EnterDataSS.processRequest(EnterDataSS.java:36)
at Bto.Chats.Servlets.ChatsServlet.doGet(ChatsServlet.java:90)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
at com.sun.grizzly.http.ajp.AjpProcessorTask.invokeAdapter(AjpProcessorTask.java:135)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ClassNotFoundException: oracle.sql.STRUCT
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 33 more
|#]>
Our live servers are working fine. Our development server now is spewing out a java.lang.NoClassDefFoundError: oracle/sql/STRUCT error whenever it encounters a servlet or page which uses this class.
ojdbc14.jar and sdopai.jar were included within the WAR file, and I have tried with them excluded from the WAR file to no avail. We have tried reverting the version of ojdbc.jar on the server to the earlier version, this has made no different.
>
If your code can't find the class then you have the classic NoClassDefFoundError problem you get when any other referenced class can't be located.
The oracle/sql/STRUCT class is in the ojdbc14.jar, ojdbc5.jar and ojdbc6.jar so if it can't be found then that class is missing from the jar you are using (which you can tell by examining the jar contents) or the jar is missing from the classpath being used.
As already mentioned you need the Oracle 11 JDBC files to support Java 1.6
Here is the official Oracle JDBC page that shows the Oracle DB versions supported for each of the JDBC drivers available and also describes the JDBC jars and what JDK versions they support.
http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#02_01
>
Which JDBC drivers support which versions of Javasoft's JDK?
pre-8i OCI and THIN Drivers - JDK 1.0.x and JDK 1.1.x
8.1.5 OCI and THIN Drivers - JDK 1.0.x and JDK 1.1.x
8.1.6SDK THIN Driver - JDK 1.1.x and JDK 1.2.x (aka Java2)
8.1.6SDK OCI Driver - Only JDK 1.1.x
8.1.6 OCI and THIN Driver - JDK 1.1.x and JDK 1.2.x
8.1.7 OCI and THIN Driver - JDK 1.1.x and JDK 1.2.x
9.0.1 OCI and THIN Driver - JDK 1.1.x, JDK 1.2.x and JDK 1.3.x
9.2.0 OCI and THIN Driver - JDK 1.1.x, JDK 1.2.x, JDK 1.3.x, and JDK 1.4.x
10.1.0 OCI and THIN Driver - JDK 1.2.x, JDK 1.3.x, and JDK 1.4.x
10.2.0 OCI and THIN Driver - JDK 1.2.x, JDK 1.3.x, JDK 1.4.x, and JDK 5.0.x
11.1.0 OCI and THIN Driver - JDK 1.5.x and JDK 1.6.x
11.2.0 OCI and THIN Driver - JDK 1.5.x and JDK 1.6.x
Please note that JDK 1.4 is not supported by the 11 drivers. -
Java.lang.AbstractMethodError: oracle.sql.BLOB.setBytes
Hi ,
When I deployed an application ( In Oracle 10g )that uses oracleresultset i am getting an error as follows java.lang.AbstractMethodError: oracle.sql.BLOB.setBytes
anybody has a clue ?
VishnuHi Vishnu,
I got the same error, and also when trying blob.setBinaryStream(1L);
By me the DB is an 8.1.6 and the JDBC Driver I tried are both the new 10.1 and older ones.
Did you solve your problem ? In which case I would be interested in a solution. A work around seems to be the blob.getBinaryOutputStream() method, but this is a problem for me since it is not portable.
Regards
Michele -
Help with java.lang.ClassCastException in JSSE
I need an urgent help.
i am writing code in JSSE for getting Server certificater(through SSL)
i wrote
public class url
public static void main(String[] args)
try
System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
Security.addProvider(new Provider());
URL url=new URL("https://localhost:8443");
HttpsURLConenction urlc=(HttpsURLConnection) url.openConnection();
catch(Exception e)
System.out.println(e);
when i am executing this programing, i am getting the following run time error
java.lang.ClassCastException
I think i am getting error for the following line of code
" HttpsURLConenction urlc=(HttpsURLConnection)url.openConnection(); "
Please help me out to overcome this run time error.
I would be grateful to you if you can solve my errorHi all
I have the same error:
java.lang.ClassCastException: com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl
MY CODE IS:
// Set the system and security properties
System.setProperty("javax.net.ssl.trustStore",
"C:\\certificados\\cacerts");
System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
// Keystore location and password
System.setProperty("javax.net.ssl.keyStore",
"C:\\certificados\\keystore");
System.setProperty("javax.net.ssl.keyStorePassword", "changeit");
//Set the request
String url_ = "https://195.235.160.165";
//Creamos la petici�n html
StringBuffer buffer = new StringBuffer();
buffer.append(url_);
buffer.append("/GPP/WLServer?Method=M_FINDIT&CLIENT=");
buffer.append(client);
buffer.append("&CLI_PASSWD=");
buffer.append(cli_passwd);
buffer.append("&USER=");
buffer.append(user_login);
buffer.append("&USER_PASSWD=");
buffer.append(user_passwd);
buffer.append("&TUSERID=");
buffer.append(MSISDN);
buffer.append("&TUSERID_TYPE=MSISDN");
buffer.append("&GROUP=");
buffer.append(group_id);
buffer.append("&SRS=GPP:UTM28");
url_ = buffer.toString();
URL url = new URL(url_);
HttpsURLConnection conn = (HttpsURLConnection)url.openConnection();
conn.setHostnameVerifier(new HostnameVerifier() {
public boolean verify(String hostname, SSLSession session)
// I don't care if the certificate doesn't match host name
return true;
BufferedReader in = new BufferedReader(
new InputStreamReader(
conn.getInputStream()));
//Creates a writer with the encoding parameter as "UTF-8"
Writer out_ = new OutputStreamWriter(response.getOutputStream(), "UTF-8" );
String inputLine;
String fichero_in = "";
while ((inputLine = in.readLine()) != null){
if(inputLine.length()!=0){
System.out.println(inputLine);
fichero_in = inputLine;
out_.write(inputLine);
in.close();
//Sets the Content-Type header
response.setContentType("application/xml; charset=utf-8");
//response.setContentType("text/html; charset=UTF-8");
//Sends the response XML to the client
out_.write(url_);
//out_.write(fichero_in);
out_.flush();
response.sendRedirect(response.encodeRedirectURL("out_"));
Anyone can hel me??
Thanks in advance -
Java.lang.NoClassDefFoundError: oracle/sql/CharacterSet
Okay, I give!
I keep getting this runtime error when running this program I wrote.
the oracle directory (where all the classes are stored) resides in the directory where my Class files live. I even added: ./
to my classpath, but that didn't help at all.
I navigated to: oracle/sql and did find CharacterSet.class
What's even stranger is that I developed this application on a Sun/Solaris machine using Java 1.2.2 then I deployed it on a Sun/Solaris machine with Java 1.3 (but I am not using any of JDK's 1.2 stuff... its all just plain java).
Very strange. Any input as to what this problem may be I would appreciate some guidance.
thank you!If you are using the OCI driver, you may need to include the NLS classes:
nls_charset12.zip
In the classpath. -
Java.lang.NoClassDefFoundError: oracle/sql/Datum
Greetings -
When using the Oracle XML SQL Utilities is there some sort of restriction as to where the two jar files (oraclexmlsql.jar xmlparser.jar) are referenced from.
The reason I ask is that when I deployed my servlet based application under WebSphere - I received the above class not found error and had to change my setup to specify the two jar files as part of the command line options for the WebSphere program itself.
Now I am using JRun and have the same error - unfortunately JRun doesn't like me overriding the classpath on the command line - so I have been unable to come up with a workaround.
I would appreciate any comments or suggestions.
Gary Bartlett
Emory Healthcare
nullThanks - I realize that App Servers have places to specify classpaths, and JRUN uses the standard JSDK 2.2 Web Application setup with the WEB-INF directory structure. All of my other jar files are there and work fine - the problem is with the xml/sql and xmlparser jar files from Oracle - they only seem to be found when I specify them as a -cp arg to the JRun executable. Which is causing problems for JRUN. I was wondering if there was any other solution to this problem.
Thanks - Gary -
Error while calling data service: ClassCastException: oracle.sql.TIMESTAMP
I created a data service out of an Oracle datastore (table) which has a number of TIMESTAMP columns and deployed it in Axis2
When testing the Web Service in Designer, I get this error and can't find any solution:
com.sunopsis.wsinvocation.SnpsWSInvocationException: oracle.sql.TIMESTAMP cannot be cast to java.util.Date
at com.sunopsis.wsinvocation.client.a.a.d.requestReply(d.java)
at com.sunopsis.graphical.wsclient.f.b(f.java)
at com.sunopsis.graphical.tools.utils.swingworker.v.call(v.java)
at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
at com.sunopsis.graphical.tools.utils.swingworker.l.run(l.java)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
at java.lang.Thread.run(Thread.java:534)
Caused by: oracle.sql.TIMESTAMP cannot be cast to java.util.Date
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)
at org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:1550)
at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1149)
at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:1792)
at com.sunopsis.wsinvocation.client.a.a.d.a(d.java)
... 8 more
Caused by:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
faultSubcode:
faultString: oracle.sql.TIMESTAMP cannot be cast to java.util.Date
faultActor:
faultNode:
faultDetail:
{}stackTrace:java.lang.ClassCastException: oracle.sql.TIMESTAMP cannot be cast to java.util.Date
at com.sunopsis.data.transform.impl.DataTransformerUtilDate2SqlTimestamp.from(DataTransformerUtilDate2SqlTimestamp.java)
at com.sunopsis.data.transform.impl.generic.DataTransformerReverser.to(DataTransformerReverser.java)
at com.sunopsis.data.transform.impl.generic.DataTransformerIfNullThenExceptionWrapper.to(DataTransformerIfNullThenExceptionWrapper.java)
at com.sunopsis.data.transform.impl.generic.DataTransformerCombiner.to(DataTransformerCombiner.java)
at oracle.odi.dataservices.fwk.axis2.OMSerializer.objectToXsd(OMSerializer.java)
at oracle.odi.dataservices.fwk.axis2.OMSerializer.serializeManagedEntity(OMSerializer.java)
at oracle.odi.dataservices.fwk.axis2.OMSerializer.serializeManagedEntityList(OMSerializer.java)
at oracle.odi.dataservices.fwk.axis2.OMSerializer.serializeOMElement(OMSerializer.java)
at oracle.odi.dataservices.fwk.axis2.DataServicesMessageReceiver.invokeBusinessLogic(DataServicesMessageReceiver.java)
at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:39)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:144)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:279)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:116)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
at java.lang.Thread.run(Thread.java:619)
oracle.sql.TIMESTAMP cannot be cast to java.util.Date
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)
at org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:1550)
at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1149)
at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:1792)
at com.sunopsis.wsinvocation.client.a.a.d.a(d.java)
at com.sunopsis.wsinvocation.client.a.a.d.requestReply(d.java)
at com.sunopsis.graphical.wsclient.f.b(f.java)
at com.sunopsis.graphical.tools.utils.swingworker.v.call(v.java)
at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
at com.sunopsis.graphical.tools.utils.swingworker.l.run(l.java)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
at java.lang.Thread.run(Thread.java:534)What database are you doing this with?
B -
Insert Blob column in the client errors ClassCastException: oracle.sql.BLOB
Hi,
When I try to insert and commit a Blob column(picture) I am getting the following exception.
Is there any jar I need to add or any other setup I need to do to accept the BLOB column in the olite client database.
500 Internal Server Error
javax.faces.FacesException: #{backing_XXPBWorkOrderResultsCreatePGBean.saveButton_action}: javax.faces.el.EvaluationException: java.lang.ClassCastException: oracle.sql.BLOB
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:78)
at oracle.adf.view.faces.component.UIXCommand.broadcast(UIXCommand.java:211)
Caused by: java.lang.ClassCastException: oracle.sql.BLOB
at oracle.lite.poljdbc.LiteEmbPreparedStmt.setVal(Unknown Source)
at oracle.lite.poljdbc.POLJDBCPreparedStatement.setObject(Unknown Source)
at oracle.lite.poljdbc.POLJDBCPreparedStatement.setObject(Unknown Source)
at oracle.lite.poljdbc.POLJDBCPreparedStatement.setObject(Unknown Source)
at oracle.lite.web.JupPreparedStatement.setObject(Unknown Source)
at oracle.jbo.server.BaseSQLBuilderImpl.bindUpdateStatement(BaseSQLBuilderImpl.java:1765)
at oracle.jbo.server.EntityImpl.bindDMLStatement(EntityImpl.java:7345)
With regareds,
Kali.
OSSI.Here are examples if inserting into a Blob from text, file, and retrieving a blob.
Insert into a Blob (Text)
import java.io.FileNotFoundException;
import java.sql.Connection;
import java.sql.Driver;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
public class InsertBlob {
public static void main(String[] args) throws FileNotFoundException {
Connection con = null;
PreparedStatement stmt = null;
ResultSet rs = null;
String letterText = "some letter text";
long id = 100;
try {
DriverManager.registerDriver((Driver)(Class.forName("oracle.lite.poljdbc.POLJDBCDriver").newInstance()));
try {
con = DriverManager.getConnection("jdbc:polite:polite", "system", "manager");
} catch (SQLException sqle) {
sqle.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
try {
stmt = con.prepareStatement("INSERT INTO BLOB_TABLE (BLOB_ID, BLOB_DATA) VALUES (?, EMPTY_BLOB())");
stmt.setLong(1, id);
stmt.executeUpdate();
stmt = con.prepareStatement("SELECT BLOB_DATA FROM BLOB_TABLE WHERE BLOB_ID = ? FOR UPDATE");
stmt.setLong(1, id);
rs = stmt.executeQuery();
if (rs.next()) {
try {
oracle.lite.poljdbc.BLOB oliteBlob = null;
oliteBlob = ((oracle.lite.poljdbc.OracleResultSet) rs).getBLOB(1);
byte[] byteLetterText = letterText.getBytes();
oliteBlob.putBytes(1, byteLetterText);
con.commit();
} catch (ClassCastException e) {
e.printStackTrace();
} finally {
rs = null;
stmt = null;
con.rollback();
con = null;
} catch (SQLException e) {
e.printStackTrace();
}Insert Into a Blob (File)
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.sql.Connection;
import java.sql.Driver;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;
public class InsertBlobFile {
public static void main(String[] args) throws FileNotFoundException {
Connection con = null;
PreparedStatement stmt = null;
long id = 200;
try {
DriverManager.registerDriver((Driver)(Class.forName("oracle.lite.poljdbc.POLJDBCDriver").newInstance()));
try {
con = DriverManager.getConnection("jdbc:polite:polite", "system", "manager");
} catch (SQLException sqle) {
sqle.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
try {
stmt = con.prepareStatement("INSERT INTO BLOB_TABLE (BLOB_ID, BLOB_DATA) VALUES (?, ?)");
stmt.setLong(1, id);
File fBlob = new File ( "C:\\BLOB_TEST_FILE.TXT" );
FileInputStream is = new FileInputStream ( fBlob );
stmt.setBinaryStream (2, is, (int) fBlob.length() );
stmt.executeUpdate();
con.commit();
} catch (SQLException e) {
e.printStackTrace();
}Retrieve from Blob (Write to file)
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.sql.Blob;
import java.sql.Connection;
import java.sql.Driver;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
public class RetrieveBlob {
final static int bBufLen = 32 * 1024;
final static String outFile = "C:\\BLOB_OUTPUT_FILE.TXT";
public static void main(String[] args) throws IOException {
Connection con = null;
PreparedStatement stmt = null;
ResultSet rs = null;
try {
DriverManager.registerDriver((Driver)(Class.forName("oracle.lite.poljdbc.POLJDBCDriver").newInstance()));
try {
con = DriverManager.getConnection("jdbc:polite:polite", "system", "manager");
} catch (SQLException sqle) {
sqle.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
try {
stmt = con.prepareStatement("SELECT * FROM BLOB_TABLE");
rs = stmt.executeQuery();
while(rs.next()) {
int id = rs.getInt(1);
Blob value = rs.getBlob(2);
System.out.println(id + " | " + value);
writeBlobToFile(value);
} catch (SQLException e) {
e.printStackTrace();
public static long readFromBlob(Blob blob, OutputStream out)
throws SQLException, IOException {
InputStream in = blob.getBinaryStream();
int length = -1;
long read = 0;
byte[] buf = new byte[bBufLen];
while ((length = in.read(buf)) > 0) {
out.write(buf, 0, length);
read += length;
in.close();
return read;
public static long writeBlobToFile(Blob blob)
throws IOException, SQLException {
long wrote = 0;
OutputStream fwriter = new FileOutputStream(outFile);
wrote = readFromBlob(blob, fwriter);
fwriter.close();
return wrote;
} -
Hi,
I am getting stuck with the exception.
Stack trace:java.lang.ClassCastException
at oracle.sql.StructDescriptor.createDescriptor(StructDescriptor.java:158)
at oracle.sql.StructDescriptor.createDescriptor(StructDescriptor.java:129)
at myclass.mymethod(myclass.java:99)That's all of the trace.
The line 99 of my class is:
StructDescriptor.createDescriptor("TYPE_STRUCT", conn);where TYPE_STRUCT is a simple type (2 attributes only) created in the database
I have already successfully got the object from the database, therefore the connection conn is working. I don't know why when I call createDescriptor it throws ClassCastException.
Please help. Thank you.I've got the answer now.....
The answer is : use OracleConnection instead of Connection
Thanks for attention. -
Invoke a FTP "Get File" operation throws java.lang.ClassCastException:
Hi there,
I am working on a very simple sample project that will pull the file from a ftp site. I create a partner link with FTP adpater with "Get File" operation.
When I deploy and run the SIMPLE project, it throws the following exception.
I am wondering if any of you experienced the same problem and how to resolve the issue. Your help will be greatly appreciated.
Here is the error message:
<messages><input><Invoke_1_Get_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Root-Element"><Root-Element xmlns="http://TargetNamespace.com/ftp_service"/>
</part></Invoke_1_Get_InputVariable></input><fault><bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>file:/C:/product/10.1.3.1/OracleAS_1/bpel/domains/default/tmp/.bpel_FTPProcess2_1.0_709914d835a81c407ed668866e080b9e.tmp/ftp_service.wsdl [ Get_ptt::Get(Root-Element) ] - WSIF JCA Execute of operation 'Get' failed due to: Could not instantiate InteractionSpec oracle.tip.adapter.ftp.inbound.FTPActivationSpec due to: oracle.tip.adapter.ftp.inbound.FTPActivationSpec; nested exception is:
java.lang.ClassCastException: oracle.tip.adapter.ftp.inbound.FTPActivationSpec; nested exception is:
org.collaxa.thirdparty.apache.wsif.WSIFException: Could not instantiate InteractionSpec oracle.tip.adapter.ftp.inbound.FTPActivationSpec due to: oracle.tip.adapter.ftp.inbound.FTPActivationSpec; nested exception is:
java.lang.ClassCastException: oracle.tip.adapter.ftp.inbound.FTPActivationSpec</summary>
</part><part name="detail"><detail>org.collaxa.thirdparty.apache.wsif.WSIFException: Could not instantiate InteractionSpec oracle.tip.adapter.ftp.inbound.FTPActivationSpec due to: oracle.tip.adapter.ftp.inbound.FTPActivationSpec; nested exception is:
java.lang.ClassCastException: oracle.tip.adapter.ftp.inbound.FTPActivationSpec</detail>
</part></bindingFault></fault></messages>Take a look at the stack trace, it shows you exactly where the error is coming from:
java.lang.ClassCastException: org.theclass.candidate.view.SearchForm
org.theclass.candidate.view.CandidateListAction.execute(CandidateListAction.java:41)Line 41 in your CandidateListAction.
Probably it is failing on a cast of your action form.
Taking a closer look at your struts-config, you are "chaining" actions.
Your AddCandidateAction uses the candidateForm, and forwards to CandidateListAction.do
Your CandidateListAction uses the searchForm.
That will be the cause of your class cast exception.
<action path="/Add"
name="candidateForm"
type="org.theclass.candidate.view.AddCandidateAction"
validate ="true"
input="/jsp/addcandidate.jsp">
<forward name="success" path="/CandidateList.do"/>
</action>
<action path="/CandidateList"
type="org.theclass.candidate.view.CandidateListAction"
name="searchForm"
scope="request" >
<forward name="failure" path="/jsp/list.jsp"/>
<forward name="success" path="/jsp/candidatelist.jsp"/>
</action>Check out: http://struts.apache.org/1.x/faqs/newbie.html#chaining
Solutions?
- don't chain actions ;-)
- use the same action form for both actions (possible?)
- make the actionForward a "redirect" one. That means a new request, and losing any request parameters/attributes but should prevent this class cast exception.
Hope this helps,
evnafets -
JPA + JBoss = java.lang.ClassCastException
Dear experts,
I developed a web application that uses JPA provided by TopLink. It is deployed to Tomcat 6 and everything work perfectly but now I need to migrate to JBoss. While deploying to JBoss I have following error:
12:09:32,229 INFO [PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=JiraReport.war/#JiraReportPU
*12:09:32,229 ERROR [AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=JiraReport.war/#JiraReportPU state=Create*
java.lang.ClassCastException: oracle.toplink.essentials.PersistenceProvider cannot be cast to javax.persistence.spi.PersistenceProvider
at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:300)
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:597)
at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:121)
at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:51)
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
persistence.xml:
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="JiraReportPU" transaction-type="JTA">
<provider>oracle.toplink.essentials.PersistenceProvider</provider>
<jta-data-source>java:/DefaultDS</jta-data-source>
<class>pkg.RawData</class>
<properties>
<property name="toplink.jdbc.driver" value="org.postgresql.Driver"/>
<property name="toplink.jdbc.url" value="jdbc:postgresql:localdb"/>
<property name="toplink.jdbc.user" value="user"/>
<property name="toplink.jdbc.password" value="pass"/>
<!--
<property name="toplink.ddl-generation" value="create-tables"/>
-->
</properties>
</persistence-unit>
</persistence>
Using Hibernate JPA provider doesn't change anything, as well as transaction-type="RESOURCE_LOCAL". Application also uses ICEFaces but I don't think problem is there.
Java ver: JavaSE 6, JavaEE 5
JBoss ver: jboss-5.1.0.GA-jdk6
Postgres ver: postgresql-8.4.4-1-windows
Driver: postgresql-8.4-701.jdbc4.jar
IDE: MyEclipse 8.5
Platform: Windows
Thank you in advance for any help!Thank you very much for your reply! It helps, partly!
I deploy app by clicking server -> add deployment -> project: "JiraReport" and deploy type: "Exploded Archive (development mode)".
It creates folder "JiraReport.war" in jboss-5.1.0.GA\server\default\deploy\ with my app.
*.jar libs are in JiraReport.war\WEB-INF\lib\. When I delete toplink libs: toplink-essentials.jar and toplink-essentials-agent.jar, I get error:
13:44:21,676 ERROR [AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=#JiraReportPU state=Create
java.lang.ClassNotFoundException: oracle.toplink.essentials.PersistenceProvider from BaseClassLoader@3f4547 ...
Then I look inside archives and in toplink-essentials.jar delete \javax\ folder - the folder of javax.persistence package. And get following info:
14:02:26,425 INFO [PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=#JiraReportPU
14:02:27,174 INFO [STDOUT] [TopLink Warning]: 2010.07.16 02:02:27.159--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class pkg.RawData. The class is ignored.
14:02:27,174 INFO [STDOUT] [TopLink Warning]: 2010.07.16 02:02:27.174--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class pkg.RawDataList. The class is ignored.
14:02:27,174 INFO [STDOUT] [TopLink Warning]: 2010.07.16 02:02:27.174--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class pkg.Date. The class is ignored.
14:02:27,174 INFO [STDOUT] [TopLink Warning]: 2010.07.16 02:02:27.174--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class pkg.RawDataBean. The class is ignored.
14:02:27,174 INFO [STDOUT] [TopLink Warning]: 2010.07.16 02:02:27.174--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class pkg.RawData. The class is ignored.
14:02:27,174 INFO [STDOUT] [TopLink Warning]: 2010.07.16 02:02:27.174--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class pkg.DateTest. The class is ignored.
14:02:27,174 INFO [STDOUT] [TopLink Warning]: 2010.07.16 02:02:27.174--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class pkg.SessionBean. The class is ignored.
14:02:27,206 INFO [TomcatDeployment] deploy, ctxPath=/JiraReport
Ignored all classes of my app! And error when try to load app:
14:10:30,696 SEVERE [lifecycle] JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /index.jspx) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@a157d]
14:10:30,696 ERROR [View] Problem encountered during View.servePage
javax.faces.FacesException: javax.el.ELException: com.sun.faces.mgbean.ManagedBeanCreationException: Cant instantiate class: pkg.SessionBean.
at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:393)
at com.icesoft.faces.component.ext.HtmlPanelGrid.isRendered(HtmlPanelGrid.java:139)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:505)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:522)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:522)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:522)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:522)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:522)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:481)
at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:153)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:19)
at com.icesoft.faces.context.View$2$1.respond(View.java:48)
at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:201)
at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet$ThreadBlockingRequestResponse.respondWith(ThreadBlockingAdaptingServlet.java:36)
at com.icesoft.faces.context.View$2.serve(View.java:76)
at com.icesoft.faces.context.View.servePage(View.java:139)
at com.icesoft.faces.webapp.http.core.SingleViewServer.service(SingleViewServer.java:52)
at com.icesoft.faces.webapp.http.common.ServerProxy.service(ServerProxy.java:11)
at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet$4.service(MainSessionBoundServlet.java:114)
at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:160)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.service(SessionDispatcher.java:42)
at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:62)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:153)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
at pkg.RawDataList.refreshData(RawDataList.java:101)
at pkg.SessionBean.<init>(SessionBean.java:25)
pkg.RawDataList.refreshData(RawDataList.java:101): RawData sample = em.find(RawData.class, id);
Conclusion: my classes are not loaded(( Any ideas?
Maybe you are looking for
-
I installed the WebLogic Workshop 8.1.2 (Build: 2003.1211.044125). I built all six projects and everything seems to work well. I could access to the sample web services on the WebLogic server from the local server as well as from a remote client mach
-
IDOC Acknowledgement with ALEAUD01 does not work
Hi, since my last thread Changing IDOC status after succesful processing i learned much about IDoc's and ALE. But my problem is still alive! I have the scenario IDOC (HRMD_A06) --> XI --> file. I noticed that the file adapter creates an acknowledge m
-
ST22 DUMP When I tried to change settings in se03 transaction
Hello Gurus We are facing some troubles after we done an upgrade ECC EP6, In the "old system" when we try to change settings to "no modificable" in transaction se03 appears the following dump (we have the same issue in both systems (new and old)), I
-
Can't see all albums on iTunes when I sync my iPhone
Hi. Everytime I launch iPhoto it says photo library has to be repaired and it does it every time. In addition It doesn't sync with my iPhone as iTunes does not see the albums I made on iPhoto and can't share photos. Can anybody help out please? Many
-
Iphone 6 not detecting wifi networks
my iPhone 6 is not detecting wifi network, i already switched off and on. thanks