Java.sql.SQLException: Cannot call rollback when using distributed transac
Hi all,
I am getting the below exception trace when I tried to rollback the data in WLI.I am getting the db connection Object from DBControl.
java.sql.SQLException: Cannot call rollback when using distributed transactions
at weblogic.jdbc.wrapper.JTAConnection.rollback(JTAConnection.java:313)
at controls.DailyFeedFileJavaImpl.excuteBatch(DailyFeedFileJavaImpl.jcs:
904)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java
:371)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:42
3)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:39
6)
at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(JcsProxy.java:381)
at $Proxy59.excuteBatch(Unknown Source)
at QnbDailyFeedProcess.feedFileJavaObjExcuteBatch(QnbDailyFeedProcess.jp
d:274)
at QnbDailyFeedProcess_wf$ImplControlSend15.invoke(QnbDailyFeedProcess_w
f.java:146)
at com.bea.wli.bpm.runtime.Perform.execute(Perform.java:32)
at com.bea.wli.bpm.runtime.ProcessState.executeInternalCallback(ProcessS
tate.java:726)
at QnbDailyFeedProcess_wf$_ProcessState.executeInternalCallback(QnbDaily
FeedProcess_wf.java:311)
at com.bea.wli.bpm.runtime.ProcessState.executeInternalCallback(ProcessS
tate.java:685)
at com.bea.wli.bpm.runtime.ProcessState.processNodeOrchestration(Process
State.java:681)
at sun.reflect.GeneratedMethodAccessor193.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java
:371)
at com.bea.wli.bpm.runtime.JpdInternalDispMethod.invoke(JpdInternalDispM
ethod.java:87)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:42
3)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:39
6)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:24
shanmuga gomathi nayagam wrote:
Hi all,
I am getting the below exception trace when I tried to rollback the data in WLI.I am getting the db connection Object from DBControl.
java.sql.SQLException: Cannot call rollback when using distributed transactions
at weblogic.jdbc.wrapper.JTAConnection.rollback(JTAConnection.java:313)Hi, Ideally, you should obtain the Transaction object and roll it back/ set it
to rollback only.
Joe
at controls.DailyFeedFileJavaImpl.excuteBatch(DailyFeedFileJavaImpl.jcs:
904)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java
:371)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:42
3)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:39
6)
at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(JcsProxy.java:381)
at $Proxy59.excuteBatch(Unknown Source)
at QnbDailyFeedProcess.feedFileJavaObjExcuteBatch(QnbDailyFeedProcess.jp
d:274)
at QnbDailyFeedProcess_wf$ImplControlSend15.invoke(QnbDailyFeedProcess_w
f.java:146)
at com.bea.wli.bpm.runtime.Perform.execute(Perform.java:32)
at com.bea.wli.bpm.runtime.ProcessState.executeInternalCallback(ProcessS
tate.java:726)
at QnbDailyFeedProcess_wf$_ProcessState.executeInternalCallback(QnbDaily
FeedProcess_wf.java:311)
at com.bea.wli.bpm.runtime.ProcessState.executeInternalCallback(ProcessS
tate.java:685)
at com.bea.wli.bpm.runtime.ProcessState.processNodeOrchestration(Process
State.java:681)
at sun.reflect.GeneratedMethodAccessor193.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java
:371)
at com.bea.wli.bpm.runtime.JpdInternalDispMethod.invoke(JpdInternalDispM
ethod.java:87)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:42
3)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:39
6)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:24
Similar Messages
-
BINDING.JCA-12510 JCA Resource Adapter - Cannot call rollback when using di
Hi,
i'm facing a simillar issue with dbadapter while trying to insert a record.
The issue that I'm facing is: (BINDING.JCA-12563)
Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'insert' failed due to: DBWriteInteractionSpec Execute Failed Exception. insert failed. Descriptor name: http://InsertEmployee.TestEmp. Caused by java.sql.SQLException: Cannot call rollback when using distributed transactions. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.
I faced the same issues that have been posted in this thread before but this is a new one I'm seeing.
Following are the configurations that I'm using.
WEBLOGIC ADMIN CONSOLE
JDBC datasources
General tab:
JNDI Name: jdbc/SOADataSource
Connection Pool tab:
URL - jdbc:oracle:thin:@localhost:1522/XE
Driver Class Name - oracle.jdbc.xa.client.OracleXADataSource
Properties - user=SATRA_SOAINFRA
oracle.net.CONNECT_TIMEOUT=10000
Deployments
Inside DbAdapter - Configuration
The general tab shows blank values for 'Native lib dir' and 'JNDI name' fields. Is this normal or I need to populate values into these.
Inside Outbound Connection Pools the javax.resource.cci.ConnectionFactory created an entry 'eis/DB/10gXE_DBCon'
following is the settings for dataSourceName property
dataSourceName java.lang.String jdbc/SOADataSource
I have kept the value for xADataSourceName as blank as giving the same value of 'jdbc/SOADataSource' throws error.
The JNDI value that I'm using while creating the database adapter from Jdev is eis/DB/10gXE_DBCon where 10gXE_DBCon is the database connection name.
Can you please tell me what is the issue and where I'm going wrong.
Thanks in advance,
SatrajitHi Sunil,
I followed your advice and did the changes, that error has gone but a new error is popping up.
BINDING.JCA-12563 Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'insert' failed due to: DBWriteInteractionSpec Execute Failed Exception. insert failed. Descriptor name: [InsertEmployee.TestEmp]. Caused by java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist . ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.
The name of the table i'm inserting to is test_emp and it exists in the database.
the .jca file for dbadsapter is like
<adapter-config name="FileToDB_DBAdp" adapter="Database Adapter" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
<connection-factory location="eis/DB/10gXE_DBCon" UIConnectionName="10gXE_DBCon" adapterRef=""/>
<endpoint-interaction portType="FileToDB_DBAdp_ptt" operation="insert">
<interaction-spec className="oracle.tip.adapter.db.DBWriteInteractionSpec">
<property name="DescriptorName" value="FileToDB_DBAdp.TestEmp"/>
<property name="DmlType" value="insert"/>
<property name="MappingsMetaDataURL" value="FileToDB_DBAdp-or-mappings.xml"/>
<property name="DetectOmissions" value="true"/>
<property name="GetActiveUnitOfWork" value="false"/>
</interaction-spec>
</endpoint-interaction>
</adapter-config>
and the .xsd file for dbadapter is
<?xml version = '1.0' encoding = 'UTF-8'?>
<xs:schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/top/FileToDB_DBAdp" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/FileToDB_DBAdp" elementFormDefault="qualified" attributeFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="TestEmpCollection" type="TestEmpCollection"/>
<xs:complexType name="TestEmpCollection">
<xs:sequence>
<xs:element name="TestEmp" type="TestEmp" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TestEmp">
<xs:sequence>
<xs:element name="empid" type="xs:decimal" nillable="true"/>
<xs:element name="name" type="xs:string" minOccurs="0" nillable="true"/>
<xs:element name="designation" minOccurs="0" nillable="true">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="salary" type="xs:decimal" minOccurs="0" nillable="true"/>
<xs:element name="deptno" type="xs:decimal" minOccurs="0" nillable="true"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
If I change element name from 'TestEmp' to 'Test_Emp' in the .xsd file,
I'm getting the following issue ...
Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'insert' failed due to: Could not create/access the TopLink Session. This session is used to connect to the datastore. Caused by java.lang.NullPointerException. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.
I'm confused why does it take the table name as TestEmp and not as Test_Emp.
Regards,
Satrajit -
Java.sql.SQLException: Cannot disable AUTO_COMMIT
Hi,
I am getting "java.sql.SQLException: Cannot disable AUTO_COMMIT" exception when using mySQL
with Weblogic 5.1 EJB (through org.gjt.mm.mysql.Driver JDBC driver).
Can anybody help!!!!!!
Thank you, Eric
[email protected]eric wrote:
>
Hi,
I am getting "java.sql.SQLException: Cannot disable AUTO_COMMIT" exception when using mySQL
with Weblogic 5.1 EJB (through org.gjt.mm.mysql.Driver JDBC driver).Hi. I'd have to see the whole stack trace to know for sure, but it looks like the
DBMS/driver you're using doesn't implement the transactional calls/behavior that
are required for managing EJB transactions. If you can write a small standalone
java program that just gets a JDBC connection to your database, then calls setAutoCommit(false),
then does a few updates, then calls Conenction.commit(), then there may be a weblogic problem,
but if your simple program gets the same error, you need a transactionally capable DBMS.
Joe
Can anybody help!!!!!!
Thank you, Eric
[email protected] -
Java.sql.SQLException: Cannot load JDBC driver
THis topic has been discussed many many times but I still not able to connect to Oracle 8i from my servlet using Tomcat 4.1.12 on hp-ux and java1.3
I always got: java.sql.SQLException: Cannot load JDBC driver class 'null'
In server.xml:
<Context Path="/MyApp" docBase="MyApp" debug="0" reloadable="true" >
<Resource name="jdbc/ora" auth="Container" type="javax.sql.DataSource"/> <ResourceParams name="jdbc/ora" >
<parameter>
<name>username</name>
<value>myname</value>
</parameter>
<parameter> <name>password</name>
<value>mypassword</value>
</parameter>
<parameter> <name>driverClassName</name>
<value>oracle.jdbc.driver.OracleDriver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:oracle:thin:@myhostname:1521:ora</value>
</parameter> </ResourceParams>
</Context>
In MyApp/WEB-INF/web.xml:
<resource-ref>
<res-ref-name>jdbc/ora</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
The Oracle jdbc jar file classes12.jar is under common/lib in Tomcat's home. read Permission is there.
In the servlet:
init(ServletConfig config):
Context init = new InitialContext();
Context ctx = (Context) init.lookup("java:comp/env");
dataSource = (DataSource) ctx.lookup("jdbc/acdb");
doPost(..)
the error occured at :
synchronized (dataSource){
con = dataSource.getConnection();}
Thanks in advance!Everything looks correct to me, except for one thing.
In your web.xml you have this:
<res-ref-name>jdbc/ora</res-ref-name> In your server.xml, you have this tag, which matches your web.xml:
<ResourceParams name="jdbc/ora" > But in your Java code, you've got this:
dataSource = (DataSource) ctx.lookup("jdbc/acdb"); When I've successfully set up a Web app data source, all three names had to agree. You either need to change your Java lookup name to "jdbc/ora" or change the web.xml and server.xml to "jdbc/acdb".
See if that does it. Everything else sounds correct to me. - MOD -
Using Weblogic Platform 7.0 (installed from platform700_win32.exe),
Running a BPM Doamin(WLIDomain with BPM only).
When I try to access my entity bean(CMP), the following exception is getting thrown.
I have seen a similar post in here, but the answer to that post, which says to
provide ACL. does not apply quite well my scenario.
To do this, I right clicked on the connection pool and selected define Ploicy..
It shows two options
RealmAdapterAuthorizer and DefaultAuthorizer; On DefaultAuthroizer i specified
role accessing the resource would be "everyone". - restarted the server - but
still the same error.
Please suggest a solution if any. Do i have to get some service pack for this?
TIA
Ranjith.We have never seen a case yet where this was not a permissions problem.
Do you have a fileRealm.properties file as part of your configuration?
"Ranjith" <[email protected]> wrote in message
news:3f0fdeb3$[email protected]..
>
java.sql.SQLException: Cannot obtain connection after 3600 seconds. ,Exception
= Access not allowed
java.sql.SQLException: Cannot obtain connection after 3600 seconds. ,Exception
= Access not allowed
atweblogic.jdbc.jts.Connection.wrapAndThrowSQLException(Connection.java:701)
atweblogic.jdbc.jts.Connection.getOrCreateConnection(Connection.java:623)
atweblogic.jdbc.jts.Connection.prepareStatement(Connection.java:133)
atweblogic.jdbc.rmi.internal.ConnectionImpl.prepareStatement(ConnectionImpl.ja
va:139)
atweblogic.jdbc.rmi.SerialConnection.prepareStatement(SerialConnection.java:81
atservice.samplemgt.v1_0.ejb.entity.BanksampletypeCMP_ckv0ao__WebLogic_CMP_RDB
MS.ej
bFindAll(BanksampletypeCMP_ckv0ao__WebLogic_CMP_RDBMS.java:873)
at java.lang.reflect.Method.invoke(Native Method)
atweblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.collectionFinder(RDBMSPersi
stenceManager
java:300)
atweblogic.ejb20.manager.BaseEntityManager.collectionFinder(BaseEntityManager.
java:715)
atweblogic.ejb20.manager.BaseEntityManager.collectionFinder(BaseEntityManager.
java:688)
atweblogic.ejb20.internal.EntityEJBLocalHome.finder(EntityEJBLocalHome.java:47
6)
at ... -
Java.sql.SQLException: Cannot load JDBC driver class 'null'
Hi,
I am a beginner of using jdbc, i use the tomcat4.1.x, mysql3.23.54 and it's jdbc driver 2.0.14. I place the drive <in jar file> in tomcat/commons/lib and configure the server.xml, web.xml and some testing coding. But there are some error like the following:
java.sql.SQLException: Cannot load JDBC driver class 'null'
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:529)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312)
at foo.DBTest.init(DBTest.java:18)
at org.apache.jsp.test_jsp._jspService(test_jsp.java:48)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
of course its some of the error code and there are more.
Why I have this problems and how can I fix it? Can someone help me??
Thanks,
Tong
I place my test.jsp at tomcat/webapps/DBTest and DBTest.java at tomcat/webapps/DBTest/WEB-INF/classes/foo
additional of the tomcat/conf/server.xml
<Resource name="TestDB" auth="Container" type="javax.sql.DataSource" description="MySQL TestDB"/>
<ResourceParams name="TestDB">
<parameter><name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter><name>maxActive</name><value>10</value></parameter>
<parameter><name>maxIdle</name><value>1</value></parameter>
<parameter><name>maxWait</name><value>10000</value></parameter>
<parameter><name>username</name><value>javauser</value></parameter>
<parameter><name>password</name><value>javadude</value></parameter>
<parameter>
<name>driverClassName</name>
<value>org.gjt.mm.mysql.Driver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost:3306/javatest?autoReconnect=true</value>
</parameter>
</ResourceParams>
tomcat/webapps/DBTest/WEB-INF/web.xml :
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<description>MySQL Test App</description>
</web-app>Post the part of your code that loads the driver and connects. My guess is you are using a variable for the name of the driver and the variable has not been set to anything(intially set to null).
Thanks
Cardwell -
Java.sql.SQLException: Cannot convert value
I have a database table - name is client. It has one field with TimeStamp Datatype.
I am using mysql-3.23.51-win and j2sdk-1_4_0_01-windows-i586.
create table client (
MODIFIED timestamp(14)
while I am doing select MODIFIED from client that time I am receiving 00000000000000.
So It has 00000000000000 value in databse.
Now I am getting this value using ResultSet. for that
I have a one Client Object class name is GenericClient
public class GenericClient {
private java.util.Date _modified;
public java.util.Date getModified() {
return _modified;
public void setModified(java.util.Date newVal) {
this._modified = newVal;
In my database processing class I am getting database value and set that value in setModified(java.util.Date newVal).
like
private Client decodeRow(ResultSet rs) throws SQLException {
GenericClient obj = new GenericClient();
obj.setModified(rs.getTimestamp(1));
return obj;
So at obj.setModified(rs.getTimestamp(1)); line I am received error message
java.sql.SQLException: Cannot convert value '00000000000000' from column 1 to TIMESTAMP.
Please guide me why I am receiving the above error.
Thanks
AmitPlease find some more information from my side
1) I am passing Timestamp Object
2) I am using PreparedStatement
3) code
Table : client
create table client (
MODIFIED timestamp(14)
);Bean Class
public class GenericClient {
private java.util.Date _modified;
public java.util.Date getModified() {
return _modified;
public void setModified(java.util.Date newVal) {
this._modified = newVal;
}Method - which is fired error
private Client decodeRow(ResultSet rs) throws SQLException {
GenericClient obj = new GenericClient();
obj.setModified(rs.getTimestamp(1));
return obj;
}3) Error Stack
==========
java.sql.SQLException: Cannot convert value '00000000000000' from column 1 to TIMESTAMP.
at com.mysql.jdbc.ResultSet.getTimestampFromString(ResultSet.java:5538)
at com.mysql.jdbc.ResultSet.getTimestampInternal(ResultSet.java:5566)
at com.mysql.jdbc.ResultSet.getTimestamp(ResultSet.java:5219)
at com.ksea.manager.ClientManager.decodeRow(ClientManager.java:463)
at com.ksea.manager.ClientManager.loadByWhere(ClientManager.java:266)
at com.ksea.manager.ClientManager.loadByWhere(ClientManager.java:221)
at com.ksea.manager.ClientManager.loadByWhere(ClientManager.java:203)
at com.ksea.manager.ClientManager.loadByUsername(ClientManager.java:53)
at com.ksea.nt.DBSynch.synchEmployees(DBSynch.java:83)
at com.ksea.nt.DBSynch.synchAll(DBSynch.java:35)
at com.ksea.nt.DBSynch.main(DBSynch.java:168)4) db Info
=======
I am using mysql-3.23.51-win and j2sdk-1_4_0_01-windows-i586. -
Java.sql.SQLException: Invalid column type when extending VO
Hi,
I'm getting java.sql.SQLException: Invalid column type when I'm extending a VO. The VO is the base query for a LOV. I'm not adding any columns, I'm just changing the from and the where. I'm not touching any java code.
When I click on the LOV torch for the first time it is working fine. But whenever I click on the GO button on the LOV Region it gives an error.
Original:
SELECT ca.location LocId,
ca.party_site_number LocNumber,
ca.party_name PartyName,
ca.party_number PartyNumber,
ca.address1 Address1,
ca.address2 Address2,
ca.address3 Address3,
ca.address4 Address4,
ca.city City,
ca.state State,
ca.zip PostalCode,
ca.country Country,
ca.party_id partyId,
hzp.site_use_type CurrSiteUsage
FROM csi_hzpty_addresses_v ca,
hz_party_site_uses hzp
WHERE ca.party_id = :1 and
ca.location = hzp.party_site_id(+) and
site_use_type(+) = 'INSTALL_AT' and
ca.status='A' and
sysdate between
nvl(ca.start_date_active, sysdate) and
nvl(ca.end_date_active, sysdate) and
hzp.status(+) = 'A'New:
SELECT ca.location LocId,
ca.party_site_number LocNumber,
ca.party_name PartyName,
ca.party_number PartyNumber,
ca.address1 Address1,
ca.address2 Address2,
ca.address3 Address3,
ca.address4 Address4,
ca.city City,
ca.state State,
ca.zip PostalCode,
ca.country Country,
ca.party_id partyId,
hzp.site_use_type CurrSiteUsage
FROM csi_hzpty_addresses_v ca,
hz_party_site_uses hzp,
hz_cust_acct_sites_all hcas,
hz_cust_site_uses_all hcsu
WHERE ca.party_id = :1
AND ca.location = hzp.party_site_id(+)
AND site_use_type(+) = 'INSTALL_AT'
AND ca.status = 'A'
AND SYSDATE BETWEEN NVL(ca.start_date_active, SYSDATE) AND NVL(ca.end_date_active, SYSDATE)
AND hzp.status(+) = 'A'
AND ca.location = hcas.party_site_id
AND hcsu.cust_acct_site_id = hcas.cust_acct_site_id
AND hcsu.status = 'A'
AND hcsu.site_use_code = 'SHIP_TO'
AND hcas.org_id = nvl(FND_PROFILE.VALUE('ORG_ID'), hcas.org_id)
AND hcsu.org_id = nvl(FND_PROFILE.VALUE('ORG_ID'), hcsu.org_id)Complete error stack:
oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (SELECT ca.location LocId,
ca.party_site_number LocNumber,
ca.party_name PartyName,
ca.party_number PartyNumber,
ca.address1 Address1,
ca.address2 Address2,
ca.address3 Address3,
ca.address4 Address4,
ca.city City,
ca.state State,
ca.zip PostalCode,
ca.country Country,
ca.party_id partyId,
hzp.site_use_type CurrSiteUsage
FROM csi_hzpty_addresses_v ca,
hz_party_site_uses hzp,
hz_cust_acct_sites_all hcas,
hz_cust_site_uses_all hcsu
WHERE ca.party_id = :1
AND ca.location = hzp.party_site_id(+)
AND site_use_type(+) = 'INSTALL_AT'
AND ca.status = 'A'
AND SYSDATE BETWEEN NVL(ca.start_date_active, SYSDATE) AND NVL(ca.end_date_active, SYSDATE)
AND hzp.status(+) = 'A'
AND ca.location = hcas.party_site_id
AND hcsu.cust_acct_site_id = hcas.cust_acct_site_id
AND hcsu.status = 'A'
AND hcsu.site_use_code = 'SHIP_TO'
AND hcas.org_id = nvl(FND_PROFILE.VALUE('ORG_ID'), hcas.org_id)
AND hcsu.org_id = nvl(FND_PROFILE.VALUE('ORG_ID'), hcsu.org_id)) QRSLT WHERE (( UPPER(ADDRESS1) like UPPER(:2) AND (ADDRESS1 like :3 OR ADDRESS1 like :4 OR ADDRESS1 like :5 OR ADDRESS1 like :6)))
at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:896)
at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1169)
at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1435)
at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2867)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1840)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:538)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:426)
at _OA._jspService(_OA.java:212)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:619)
## Detail 0 ##
java.sql.SQLException: Invalid column type
at oracle.jdbc.driver.OraclePreparedStatement.setObjectCritical(OraclePreparedStatement.java:8516)
at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:8034)
at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:8767)
at oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement.java:8748)
at oracle.jdbc.driver.OraclePreparedStatement.setObjectAtName(OraclePreparedStatement.java:11907)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.setObjectAtName(OraclePreparedStatementWrapper.java:815)
at oracle.jbo.server.OracleSQLBuilderImpl.bindParamValue(OracleSQLBuilderImpl.java:3919)
at oracle.jbo.server.BaseSQLBuilderImpl.bindParametersForStmt(BaseSQLBuilderImpl.java:3335)
at oracle.jbo.server.ViewObjectImpl.bindParametersForCollection(ViewObjectImpl.java:13827)
at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:804)
at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:669)
at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3723)
at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(Unknown Source)
at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4559)
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:743)
at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:892)
at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:806)
at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:800)
at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3643)
at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(OAViewObjectImpl.java:439)
at oracle.apps.fnd.framework.server.OAViewObjectImpl.initQuery(OAViewObjectImpl.java:743)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.setCriteriaOnVO(OAWebBeanHelper.java:2330)
at oracle.apps.fnd.framework.webui.OAListOfValuesHelper.processFormRequestAfterController(OAListOfValuesHelper.java:1584)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:847)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
at oracle.apps.fnd.framework.webui.OAListOfValuesHelper.processFormRequest(OAListOfValuesHelper.java:1490)
at oracle.apps.fnd.framework.webui.beans.layout.OAListOfValuesBean.processFormRequest(OAListOfValuesBean.java:423)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1027)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:993)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:848)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2863)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1840)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:538)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:426)
at _OA._jspService(_OA.java:212)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:619)
java.sql.SQLException: Invalid column type
at oracle.jdbc.driver.OraclePreparedStatement.setObjectCritical(OraclePreparedStatement.java:8516)
at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:8034)
at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:8767)
at oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement.java:8748)
at oracle.jdbc.driver.OraclePreparedStatement.setObjectAtName(OraclePreparedStatement.java:11907)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.setObjectAtName(OraclePreparedStatementWrapper.java:815)
at oracle.jbo.server.OracleSQLBuilderImpl.bindParamValue(OracleSQLBuilderImpl.java:3919)
at oracle.jbo.server.BaseSQLBuilderImpl.bindParametersForStmt(BaseSQLBuilderImpl.java:3335)
at oracle.jbo.server.ViewObjectImpl.bindParametersForCollection(ViewObjectImpl.java:13827)
at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:804)
at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:669)
at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3723)
at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(Unknown Source)
at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4559)
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:743)
at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:892)
at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:806)
at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:800)
at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3643)
at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(OAViewObjectImpl.java:439)
at oracle.apps.fnd.framework.server.OAViewObjectImpl.initQuery(OAViewObjectImpl.java:743)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.setCriteriaOnVO(OAWebBeanHelper.java:2330)
at oracle.apps.fnd.framework.webui.OAListOfValuesHelper.processFormRequestAfterController(OAListOfValuesHelper.java:1584)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:847)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
at oracle.apps.fnd.framework.webui.OAListOfValuesHelper.processFormRequest(OAListOfValuesHelper.java:1490)
at oracle.apps.fnd.framework.webui.beans.layout.OAListOfValuesBean.processFormRequest(OAListOfValuesBean.java:423)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1027)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:993)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:848)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2863)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1840)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:538)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:426)
at _OA._jspService(_OA.java:212)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:619)I have run through the Forum/Oracle Support/Google without finding any solution to my problem and checked everything that I could think of.
Any ideas to what I'm doing wrong?
Thanks.
DanielI had to set Binding Style to Oracle Positional on the View Object declaration (Button of page).
Saw this somewhere when I searched for the error but it didn't connect...
Anyways, problem solved. -
Java.sql.SQLException:Cannot open any more tables.
I have such exception(java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Cannot open any more tables.) when I try to make request to database:
if(null!=con)
try{
Statement stmt;
stmt = con.createStatement ( ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE);
ResultSet rs= stmt.executeQuery(quary);
} catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
ex.printStackTrace();
}//try
But exception occurs after several requests(about 20). First 20 requests work fine. What is it? Thanks.Statement stmt;
stmt = con.createStatement ( ResultSet.TYPE_SCROLL_INSENSITIVE,
try{
ResultSet.CONCUR_UPDATABLE);
ResultSet rs= stmt.executeQuery(quary);
} catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
ex.printStackTrace();
}//tryyou should reuse the statement rather than opening it for every query
Good Luck -
Java.sql.SQLException: ORA-00933: error when executing query
Hello,
I am trying to execute the following query from a jsp page.
String sqlUpdate ="UPDATE table_name SET name ='"+name+"', description='"+description+"', proj_link='" projlink"', active='" active"',sort_order='" order"',image='" image"',category='" category"', technology='" technology "' WHERE id="+id+" ";
stmt.executeQuery(sqlUpdate);
I get the follwoing error java.sql.SQLException: ORA-00933: SQL command not properly ended
When I omit "description" from the query it executes fine. But when I place it back into the query I get the above error. The table is in Oracle database and the datatype of description id varchar2(4000). I declared all the variables used in the query, I then assigned values caught from the form and then am trying to update the form varibles in the table.
Thanks,
Nikky128Nikky128 wrote:
Hello,
I am trying to execute the following query from a jsp page.There's a big part of your problem. You shouldn't be doing database stuff in JSPs. If you must, you should be using JSTL and its <sql> tags.
String sqlUpdate ="UPDATE table_name SET name ='"+name+"', description='"+description+"', proj_link='" projlink"', active='" active"',sort_order='" order"',image='" image"',category='" category"', technology='" technology "' WHERE id="+id+" ";Not using PreparedStatement here is just a silly noob error.
When I omit "description" from the query it executes fine. But when I place it back into the query I get the above error. The table is in Oracle database and the datatype of description id varchar2(4000). I declared all the variables used in the query, I then assigned values caught from the form and then am trying to update the form varibles in the table.Probably a single or double quote that you can't see. PreparedStatement will eliminate that problem.
% -
Java.sql.SQLException: Closed Connection error when invoking web service
Hi
I've assembled a simple web service for an Oracle PL/SQL package and deployed it on a Standalone OC4J, when I come to invoke it on the Oracle Enterprise Manager screen I'm getting the following returned within the envelope body:
<env:Body>
<env:Fault>
<faultcode>env:Server</faultcode>
<faultstring>Internal Server Error (serialization error: java.sql.SQLException: java.sql.SQLException: Closed Connection)</faultstring>
</env:Fault>
</env:Body>
The function that is called within the database returns a user defined object that consists of a RAW value and an XMLTYPE. The function takes a string as a parameter, when I enter a string that I know will not return an object there is no error in the envelope body, only when there is an object to return does the error appear.
Anyone have any suggestion as to why this is?I'm no further forward with this: has anyone assembled, deployed and invoked a web service that returns a XMLTYPE?? I know this should be possible but I think there's maybe some manual intervention required with the classes created with webservicesassembler: I'd really appreciate it if anyone with any experience of this kind of thing could help me think this through.
-
Java.sql.SQLException: No suitable driver while using a tomcat DataSource
Im looking for some directing as I keep getting same error no matter what i've tried
App Server: localhost (Win 2000 Tomcat 4.0.6)
MySQL server: 192.168.x.x (Linux version 3.23.49)
IDE: NetBeans 3.5
error:
2003-07-07 11:37:42 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
javax.servlet.ServletException: class stuff.dao.ContextTester : java.sql.SQLException: No suitable driver
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:471)
at org.apache.jsp.index$jsp._jspService(index$jsp.java:95)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.service(IDEJspServlet.java:173)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.serviceJspFile(IDEJspServlet.java:246)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.service(IDEJspServlet.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:226)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.netbeans.modules.web.monitor.catalina.MonitorValve.invoke(MonitorValve.java:148)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:534)
----- Root Cause -----
java.lang.InstantiationException: class stuff.dao.ContextTester : java.sql.SQLException: No suitable driver
at org.apache.jsp.index$jsp._jspService(index$jsp.java:66)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.service(IDEJspServlet.java:173)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.serviceJspFile(IDEJspServlet.java:246)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.service(IDEJspServlet.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:226)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.netbeans.modules.web.monitor.catalina.MonitorValve.invoke(MonitorValve.java:148)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:534)
web.xml:
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>
index.jsp
</welcome-file>
</welcome-file-list>
<resource-ref>
<res-ref-name>jdbc/dao</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
server.xml:
<Context path="" docBase="C:\Documents and Settings\devel\Desktop\stuff Proj">
<Valve className="org.netbeans.modules.web.monitor.catalina.MonitorValve"/>
<InstanceListener>org.netbeans.modules.web.monitor.catalina.DispatchListener</InstanceListener>
<Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost__log." suffix=".txt" timestamp="true"/>
<Resource name="jdbc/dao" auth="Container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/dao">
<parameter>
<name>url</name>
<value>jdbc:mysql://192.168.x.x/develop</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>com.mysql.jdbc.Driver</value>
</parameter>
<parameter>
<name>username</name>
<value>webapp</value>
</parameter>
<parameter>
<name>password</name>
<value>password</value>
</parameter
</ResourceParams>
</Context>
instantiated class:
package stuff.dao;
import java.beans.*;
import java.sql.*;
import javax.sql.*;
import javax.naming.*;
import java.util.*;
import java.io.*;
public class ContextTester extends Object implements java.io.Serializable {
public Connection con = null;
/** Creates new ContextTester */
public ContextTester() throws NamingException, SQLException {
Context init = new InitialContext();
Context ctx = (Context) init.lookup("java:comp/env");
DataSource ds = (DataSource) ctx.lookup("jdbc/dao");
con = ds.getConnection();
/** get new class ID from database **/
/* public String getNewID () throws SQLException {
PreparedStatement qry;
ResultSet results = null;
try {
qry = con.prepareStatement("SELECT MAX(id)FROM role");
results = qry.executeQuery();
if (!results.next()) throw new SQLException ("Can not retrieve maximum id");
return results.getString(1);
} finally {
try { results.close(); } catch (Exception ex) {}
index.jsp:
<jsp:useBean id="cntxt" class="stuff.dao.ContextTester" scope="page" />
<html>
<head><title>JSP Page</title></head>
<body>
Hello World!<br>
This page has worked!!<br>
</body>
</html>
A jar file containing stuff.dao.ContextTester
and mysql-connector-java-3.0.8-stable-bin.jar
are in the WEB-INF/lib directory of webapps
if anybody has any suggestions it would be appreciated!!I've never seen an IP address like the one you have in your database URL:
<value>jdbc:mysql://192.168.x.x/develop</value>
Are placeholders like that legal? Or did you put them into the note to disguise what machine you were using?
I've got a Context like this for a JSP-to-Oracle app that I'm using:
<Resource name="jdbc/Conference"
auth="Container"
type="javax.sql.DataSource"/>
<!-- Oracle 9.2.0.1 data source -->
<ResourceParams name="jdbc/Conference">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>oracle.jdbc.driver.OracleDriver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:oracle:thin:@elvis:1521:CAPP</value>
</parameter>
<parameter>
<name>username</name>
<value>api</value>
</parameter>
<parameter>
<name>password</name>
<value>mod</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>20</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>0</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>60000</value>
</parameter>
<parameter>
<name>removeAbandoned</name>
<value>true</value>
</parameter>
<parameter>
<name>removeAbandonedTimeout</name>
<value>300</value>
</parameter>
</ResourceParams>
The JNDI lookup string is "java:comp/env/jdbc/Conference". MOD -
Java.sql.SQLException: Cannot rollback a transactional connection
Hi
This is what i am trying to do:
try{
conn = getConnection();
conn.setAutoCommit(false);
execQuery(sql_1);
execQuery(sql_2);
conn.commit();
}catch(Exception ex){
conn.rollback();
i have made an error in sql_2 so i get an Exception. My queries use the same "conn" so the rollback should applay to the first query but it has made a commit. How do i get rollback to work?
I read this in an other topic:
Make sure that you configure your database connection in the jboss.jcml and not in the bean (or servlet) itself.
Then, make a lookup via jndi. On this way, the driver gets bound to the transactionManager and the rollback() works finde.
But i don�t know how to configure the connections, and how does the trasactionManager work.
Can some one help me?Maybe i should ad that i am using Oracle db an the
code is in a Entity BeanThis changes the way you want to do rollbacks. Rollbacks in ejbs are handled by the container. In order to do rollbacks, you need to flag the transaction as to be rolled back. To do this, you need to call the method setRollbackOnly() in the ejb's SessionContext - sessionContext.setRollbackOnly();
For this to work correctly, you must declare the method in the ejb's deployment descriptor as requiring to handle transactions by specifying the appropriate value for the <tran-attribute> element of you ejb's dd.
BTW, you'd be better off posting EJB related question in the J2EE SDK forum. -
Java.sql.SQLException: Error accessing jdbc driver
Hi,
We are using WebLogic Server 7.0 as Application Server.
We now create a connection pool named regPool and
a Tx datasource named regDS.
When we get the connection from the datasource, exception occurred.
java.sql.SQLException: Error accessing jdbc driver: driverURL =
jdbc:weblogic:pool:regPool, props = {enableTwoPhaseCommit=false,
jdbcTxDataSource=true, connectionPoolID=regPool}
at
weblogic.jdbc.jts.Driver.wrapAndThrowSQLException(Driver.java:323)
at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:377)
at weblogic.jdbc.jts.Driver.connect(Driver.java:129)
at
weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java
:265)
So I guess that why we can't use CMP for finding data. Here is the error when we call the finder.
javax.ejb.FinderException: Exception in findAllEmr while preparing or
executing statement: 'null'
java.sql.SQLException: Cannot obtain connection after 30 seconds. ,
Exception = Access not allowed
java.sql.SQLException: Cannot obtain connection after 30 seconds. ,
Exception = Access not allowed
at
weblogic.jdbc.jts.Connection.wrapAndThrowSQLException(Connection.java:694)
According to the exception message, it looks
like the connection fail between WLS and Oracle 9.2.
Here is a scenario I think you should need to know.
I change the table-name in the weblogic-cmp-rdbms-jar.xml
to a name that doesn't exist in the database.
Then, re-package the EJB, copy it to server and restart the server.
A exception occurred that says the table doesn't exist.
So, in this case, it looks like the datasource works and
connection is fine.
Any recommendation will be appreciated.
Jimmy ChangHi!
I am a default user to the databse server. I connect to the database with '\' as the username and blank passoword(I mean with Network authentication may be).When I am trying to create connection using
con = DriverManager.getConnection("jdbc:oracle:thin:@DRACINAL2:BSAJ", "/","" )
it gives me followint error
ava.sql.SQLException: Null user or password not supported in THIN driver
void oracle.jdbc.dbaccess.DBError.throwSqlException(java.lang.String, java.lang.String, int)
void oracle.jdbc.dbaccess.DBError.throwSqlException(int, java.lang.Object)
void oracle.jdbc.dbaccess.DBError.check_error(int)
oracle.jdbc.dbaccess.DBConversion oracle.jdbc.ttc7.TTC7Protocol.logon(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
void oracle.jdbc.driver.OracleConnection.<init>(oracle.jdbc.dbaccess.DBAccess, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
java.sql.Connection oracle.jdbc.driver.OracleDriver.getConnectionInstance(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
java.sql.Connection oracle.jdbc.driver.OracleDriver.connect(java.lang.String, java.util.Properties)
java.sql.Connection java.sql.DriverManager.getConnection(java.lang.String, java.util.Properties, java.lang.ClassLoader)
java.sql.Connection java.sql.DriverManager.getConnection(java.lang.String, java.lang.String, java.lang.String)
void textPack.GenTextFile.main(java.lang.String[])
How should I go about it?
Thanks for your help.
-Sreekanth Varidhireddy -
Hello All,
The code bellow works fine on our production server (WebLogic 5.1 sp12, SQL Server
7), but it fails on our development server (same configuration):
Product.java
383: java.sql.ResultSet rs = null;
384: java.sql.CallableStatement cs = null;
405: cs.execute();
406: rs = cs.getResultSet();
407: while (rs.next()) {
445: cs.getMoreResults();
446: rs = cs.getResultSet();
447: if (rs != null) {
448: while (rs.next()) { <<<<<< ERROR LINE
The trace follows:
java.sql.SQLException: This object was closed() and cannot be used anymore. at
weblogic.jdbcbase.mssqlserver4.BaseHandler.complainIfClosed(BaseHandler.java:115)
at weblogic.jdbcbase.mssqlserver4.TdsResultSet.next(TdsResultSet.java:68) at weblogic.jdbcbase.pool.ResultSet.next(ResultSet.java:158)
at weblogic.jdbc20.rmi.internal.ResultSetImpl.next(ResultSetImpl.java:44) at weblogic.jdbc20.rmi.SerialResultSet.next(SerialResultSet.java:38)
at com.visitrade.Product.getProduct(Product.java:448) at com.visitrade.ProductDetailAction.perform(ProductDetailAction.java:74)
at org.apache.struts.action.ActionServlet.processActionInstance(ActionServlet.java:794)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:702) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:314)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at com.visitrade.VisitradeServlet.service(VisitradeServlet.java:58)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:120)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:945)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:909)
at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:269)
at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:392)
at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:274) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:130)
Any clues?
Thanks in advance,
Wagner DosAnjos CMC, Tampa, FLWagner DosAnjos wrote:
Hello All,
The code bellow works fine on our production server (WebLogic 5.1 sp12, SQL Server
7), but it fails on our development server (same configuration):
Product.java
383: java.sql.ResultSet rs = null;
384: java.sql.CallableStatement cs = null;
405: cs.execute();
406: rs = cs.getResultSet();
407: while (rs.next()) {
445: cs.getMoreResults();
446: rs = cs.getResultSet();
447: if (rs != null) {
448: while (rs.next()) { <<<<<< ERROR LINEThat looks like a driver bug. Duplicate it in a standalone program using the MS driver.
If getResultSet() returns a non-null, and the first thing yo do afterwards is call rs.next()
it shouldn't throw an exception. Download our latest driver from our site, and make sure it's
ahead of all our server stuff in the weblogic.classpath, by editing the startWeblogic script.
Joe
>
>
The trace follows:
java.sql.SQLException: This object was closed() and cannot be used anymore. at
weblogic.jdbcbase.mssqlserver4.BaseHandler.complainIfClosed(BaseHandler.java:115)
at weblogic.jdbcbase.mssqlserver4.TdsResultSet.next(TdsResultSet.java:68) at weblogic.jdbcbase.pool.ResultSet.next(ResultSet.java:158)
at weblogic.jdbc20.rmi.internal.ResultSetImpl.next(ResultSetImpl.java:44) at weblogic.jdbc20.rmi.SerialResultSet.next(SerialResultSet.java:38)
at com.visitrade.Product.getProduct(Product.java:448) at com.visitrade.ProductDetailAction.perform(ProductDetailAction.java:74)
at org.apache.struts.action.ActionServlet.processActionInstance(ActionServlet.java:794)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:702) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:314)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at com.visitrade.VisitradeServlet.service(VisitradeServlet.java:58)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:120)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:945)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:909)
at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:269)
at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:392)
at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:274) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:130)
Any clues?
Thanks in advance,
Wagner DosAnjos CMC, Tampa, FL
Maybe you are looking for
-
HT1349 how to reset my mac book pro to factory settings
how do i reset my mac book pro back to factory settings and get rid of boot camp.
-
Urgent please - help trying to diagnose an issue?
Hi folks, I've been burning DVDs for 7 years now and I've run into an issue I can't quite diagnose (and one I've NEVER experienced). In short, I've had 4 clients in the last month come back because their discs were skipping at alternate points. I'll
-
New system will not boot up.
I am in the process of building a new system and it will not boot to the post. The power gets to the cpu fan and case fan for about 5 seconds then shguts off. I have to clear cmos to get the same response. Please help, I have pulled everything from t
-
HT1369 how do i get recent add back on i itune i deleted it by mistake
How do i get back recent added back on itune i deleted it by mistake
-
Why can't I open MS Office 2008 programs in Mountain Lion?
I just upgraded to Mountain Lion (10.8.3), and now I can't open any of my MS Office applications. Any ideas?