LOB with JDBC

I've a few problems
on Insert LOB into Oracle 815
From Java Servlet
Via JDBC
(ErrorMessage: Need Lock on Table).
null

We have actually found the 8.1.6_01 thin driver to be faster than oci at writing BLOB's and normalized data.
Don't know why.

Similar Messages

  • Slow performance WLS with jdbc pools

    Hi all, we have follow configuration of our system: the server with applications and server with jdbc pools. Recently we get strange situation. The server with jdbc pools it seems hung. We get thread dumps for this server and we see that it not hung, but normally work but very slow. Many weblogic.kernel.Default threads were busy by rmi database calls (see below). Anothe strange that before slowing server work nothing enties in server log. Last entry in server log were one hour before slow work. May someone propose why this situation can occure?
    Thread dump:
    <b>"ExecuteThread: '0' for queue: 'weblogic.kernel.Default'" id=11 idx=0x1c tid=6668 prio=5 alive, daemon
    at java/util/WeakHashMap.get(Ljava/lang/Object;)Ljava/lang/Object;(WeakHashMap.java:342)[optimized]
    at weblogic/rmi/internal/ClientRuntimeDescriptor.intern(Ljava/lang/String;)Lweblogic/rmi/internal/ClientRuntimeDescriptor;(ClientRuntimeDescriptor.java:130)[inlined]
    at weblogic/rmi/internal/BasicRuntimeDescriptor.getClientRuntimeDescriptor(Ljava/lang/String;)Lweblogic/rmi/internal/ClientRuntimeDescriptor;(BasicRuntimeDescriptor.java:459)[optimized]
    at weblogic/rmi/internal/BasicServerRef.getStub()Ljava/lang/Object;(BasicServerRef.java:656)[optimized]
    at weblogic/rmi/internal/OIDManager.getReplacement(Ljava/lang/Object;)Ljava/lang/Object;(OIDManager.java:189)[optimized]
    at weblogic/rmi/extensions/StubFactory.getStub(Ljava/rmi/Remote;)Ljava/lang/Object;(StubFactory.java:66)
    at weblogic/jdbc/rmi/internal/CallableStatementImpl.interopWriteReplace(Lweblogic/common/internal/PeerInfo;)Ljava/lang/Object;(CallableStatementImpl.java:50)
    at weblogic/rmi/utils/io/InteropObjectReplacer.replaceObject(Ljava/lang/Object;)Ljava/lang/Object;(InteropObjectReplacer.java:38)[optimized]
    at weblogic/common/internal/ChunkedObjectOutputStream.replaceObject(Ljava/lang/Object;)Ljava/lang/Object;(ChunkedObjectOutputStream.java:54)[inlined]
    at weblogic/common/internal/ChunkedObjectOutputStream$NestedObjectOutputStream.replaceObject(Ljava/lang/Object;)Ljava/lang/Object;(ChunkedObjectOutputStream.java:249)[optimized]
    at java/io/ObjectOutputStream.writeObject0(Ljava/lang/Object;Z)V(Unknown Source)[inlined]
    at java/io/ObjectOutputStream.writeObject(Ljava/lang/Object;)V(Unknown Source)[inlined]
    at weblogic/common/internal/ChunkedObjectOutputStream.writeObject(Ljava/lang/Object;)V(ChunkedObjectOutputStream.java:120)[inlined]
    at weblogic/rjvm/MsgAbbrevOutputStream.writeObject(Ljava/lang/Object;Ljava/lang/Class;)V(MsgAbbrevOutputStream.java:94)[optimized]
    at weblogic/jdbc/rmi/internal/ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_OracleConnection_WLSkel.invoke(ILweblogic/rmi/spi/InboundRequest;Lweblogic/rmi/spi/OutboundResponse;Ljava/lang/Object;)Lweblogic/rmi/spi/OutboundResponse;(Unknown Source)[optimized]
    at weblogic/rmi/internal/BasicServerRef.invoke(Lweblogic/rmi/extensions/server/RuntimeMethodDescriptor;Lweblogic/rmi/spi/InboundRequest;Lweblogic/rmi/spi/OutboundResponse;)V(BasicServerRef.java:477)[optimized]
    at weblogic/rmi/internal/BasicServerRef$1.run()Ljava/lang/Object;(BasicServerRef.java:420)[inlined]
    at weblogic/security/acl/internal/AuthenticatedSubject.doAs(Lweblogic/security/subject/AbstractSubject;Ljava/security/PrivilegedExceptionAction;)Ljava/lang/Object;(AuthenticatedSubject.java:363)[inlined]
    at weblogic/security/service/SecurityManager.runAs(Lweblogic/security/acl/internal/AuthenticatedSubject;Lweblogic/security/acl/internal/AuthenticatedSubject;Ljava/security/PrivilegedExceptionAction;)Ljava/lang/Object;(SecurityManager.java:147)[inlined]
    at weblogic/rmi/internal/BasicServerRef.handleRequest(Lweblogic/rmi/spi/InboundRequest;)V(BasicServerRef.java:415)[inlined]
    at weblogic/rmi/internal/BasicExecuteRequest.execute(Lweblogic/kernel/ExecuteThread;)V(BasicExecuteRequest.java:27)[optimized]
    at weblogic/kernel/ExecuteThread.execute(Lweblogic/kernel/ExecuteRequest;)V(ExecuteThread.java:219)[optimized]
    at weblogic/kernel/ExecuteThread.run()V(ExecuteThread.java:178)
    at jrockit/vm/RNI.c2java(IIII)V(Native Method)
    -- end of trace
    "ExecuteThread: '1' for queue: 'weblogic.kernel.Default'" id=12 idx=0x1e tid=6669 prio=5 alive, daemon
    at java/util/WeakHashMap.get(Ljava/lang/Object;)Ljava/lang/Object;(WeakHashMap.java:346)[optimized]
    at weblogic/rmi/internal/ClientRuntimeDescriptor.intern(Ljava/lang/String;)Lweblogic/rmi/internal/ClientRuntimeDescriptor;(ClientRuntimeDescriptor.java:130)[inlined]
    at weblogic/rmi/internal/BasicRuntimeDescriptor.getClientRuntimeDescriptor(Ljava/lang/String;)Lweblogic/rmi/internal/ClientRuntimeDescriptor;(BasicRuntimeDescriptor.java:459)[optimized]
    at weblogic/rmi/internal/BasicServerRef.getStub()Ljava/lang/Object;(BasicServerRef.java:656)[optimized]
    at weblogic/rmi/internal/OIDManager.getReplacement(Ljava/lang/Object;)Ljava/lang/Object;(OIDManager.java:189)[optimized]
    at weblogic/rmi/extensions/StubFactory.getStub(Ljava/rmi/Remote;)Ljava/lang/Object;(StubFactory.java:66)
    at weblogic/jdbc/rmi/internal/CallableStatementImpl.interopWriteReplace(Lweblogic/common/internal/PeerInfo;)Ljava/lang/Object;(CallableStatementImpl.java:50)
    at weblogic/rmi/utils/io/InteropObjectReplacer.replaceObject(Ljava/lang/Object;)Ljava/lang/Object;(InteropObjectReplacer.java:38)[optimized]
    at weblogic/common/internal/ChunkedObjectOutputStream.replaceObject(Ljava/lang/Object;)Ljava/lang/Object;(ChunkedObjectOutputStream.java:54)[inlined]
    at weblogic/common/internal/ChunkedObjectOutputStream$NestedObjectOutputStream.replaceObject(Ljava/lang/Object;)Ljava/lang/Object;(ChunkedObjectOutputStream.java:249)[optimized]
    at java/io/ObjectOutputStream.writeObject0(Ljava/lang/Object;Z)V(Unknown Source)[inlined]
    at java/io/ObjectOutputStream.writeObject(Ljava/lang/Object;)V(Unknown Source)[inlined]
    at weblogic/common/internal/ChunkedObjectOutputStream.writeObject(Ljava/lang/Object;)V(ChunkedObjectOutputStream.java:120)[inlined]
    at weblogic/rjvm/MsgAbbrevOutputStream.writeObject(Ljava/lang/Object;Ljava/lang/Class;)V(MsgAbbrevOutputStream.java:94)[optimized]
    at weblogic/jdbc/rmi/internal/ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_OracleConnection_WLSkel.invoke(ILweblogic/rmi/spi/InboundRequest;Lweblogic/rmi/spi/OutboundResponse;Ljava/lang/Object;)Lweblogic/rmi/spi/OutboundResponse;(Unknown Source)[optimized]
    at weblogic/rmi/internal/BasicServerRef.invoke(Lweblogic/rmi/extensions/server/RuntimeMethodDescriptor;Lweblogic/rmi/spi/InboundRequest;Lweblogic/rmi/spi/OutboundResponse;)V(BasicServerRef.java:477)[optimized]
    at weblogic/rmi/internal/BasicServerRef$1.run()Ljava/lang/Object;(BasicServerRef.java:420)[inlined]
    at weblogic/security/acl/internal/AuthenticatedSubject.doAs(Lweblogic/security/subject/AbstractSubject;Ljava/security/PrivilegedExceptionAction;)Ljava/lang/Object;(AuthenticatedSubject.java:363)[inlined]
    at weblogic/security/service/SecurityManager.runAs(Lweblogic/security/acl/internal/AuthenticatedSubject;Lweblogic/security/acl/internal/AuthenticatedSubject;Ljava/security/PrivilegedExceptionAction;)Ljava/lang/Object;(SecurityManager.java:147)[inlined]
    at weblogic/rmi/internal/BasicServerRef.handleRequest(Lweblogic/rmi/spi/InboundRequest;)V(BasicServerRef.java:415)[inlined]
    at weblogic/rmi/internal/BasicExecuteRequest.execute(Lweblogic/kernel/ExecuteThread;)V(BasicExecuteRequest.java:27)[optimized]
    at weblogic/kernel/ExecuteThread.execute(Lweblogic/kernel/ExecuteRequest;)V(ExecuteThread.java:219)[optimized]
    at weblogic/kernel/ExecuteThread.run()V(ExecuteThread.java:178)
    at jrockit/vm/RNI.c2java(IIII)V(Native Method)
    -- end of trace</b>

    Denis Reimer wrote:
    Hi all, we have follow configuration of our system: the server with applications and server with jdbc pools. Recently we get strange situation. The server with jdbc pools it seems hung. We get thread dumps for this server and we see that it not hung, but normally work but very slow. Many weblogic.kernel.Default threads were busy by rmi database calls (see below). Anothe strange that before slowing server work nothing enties in server log. Last entry in server log were one hour before slow work. May someon
    e propose why this situation can occure?
    Thread dump:
    <b>"ExecuteThread: '0' for queue: 'weblogic.kernel.Default'" id=11 idx=0x1c tid=6668 prio=5 alive, daemon
    at java/util/WeakHashMap.get(Ljava/lang/Object;)Ljava/lang/Object;(WeakHashMap.java:342)[optimized]
    at weblogic/rmi/internal/ClientRuntimeDescriptor.intern(Ljava/lang/String;)Lweblogic/rmi/internal/ClientRuntimeDescriptor;(ClientRuntimeDescriptor.java:130)[inlined]
    at weblogic/rmi/internal/BasicRuntimeDescriptor.getClientRuntimeDescriptor(Ljava/lang/String;)Lweblogic/rmi/internal/ClientRuntimeDescriptor;(BasicRuntimeDescriptor.java:459)[optimized]
    at weblogic/rmi/internal/BasicServerRef.getStub()Ljava/lang/Object;(BasicServerRef.java:656)[optimized]
    at weblogic/rmi/internal/OIDManager.getReplacement(Ljava/lang/Object;)Ljava/lang/Object;(OIDManager.java:189)[optimized]
    at weblogic/rmi/extensions/StubFactory.getStub(Ljava/rmi/Remote;)Ljava/lang/Object;(StubFactory.java:66)
    at weblogic/jdbc/rmi/internal/CallableStatementImpl.interopWriteReplace(Lweblogic/common/internal/PeerInfo;)Ljava/lang/Object;(CallableStatementImpl.java:50)
    at weblogic/rmi/utils/io/InteropObjectReplacer.replaceObject(Ljava/lang/Object;)Ljava/lang/Object;(InteropObjectReplacer.java:38)[optimized]
    at weblogic/common/internal/ChunkedObjectOutputStream.replaceObject(Ljava/lang/Object;)Ljava/lang/Object;(ChunkedObjectOutputStream.java:54)[inlined]
    at weblogic/common/internal/ChunkedObjectOutputStream$NestedObjectOutputStream.replaceObject(Ljava/lang/Object;)Ljava/lang/Object;(ChunkedObjectOutputStream.java:249)[optimized]
    at java/io/ObjectOutputStream.writeObject0(Ljava/lang/Object;Z)V(Unknown Source)[inlined]
    at java/io/ObjectOutputStream.writeObject(Ljava/lang/Object;)V(Unknown Source)[inlined]
    at weblogic/common/internal/ChunkedObjectOutputStream.writeObject(Ljava/lang/Object;)V(ChunkedObjectOutputStream.java:120)[inlined]
    at weblogic/rjvm/MsgAbbrevOutputStream.writeObject(Ljava/lang/Object;Ljava/lang/Class;)V(MsgAbbrevOutputStream.java:94)[optimized]
    at weblogic/jdbc/rmi/internal/ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_OracleConnection_WLSkel.invoke(ILweblogic/rmi/spi/InboundRequest;Lweblogic/rmi/spi/OutboundResponse;Ljava/lang/Object;)Lweblogic/rmi/spi/OutboundResponse;(Unknown Source)[optimized]
    at weblogic/rmi/internal/BasicServerRef.invoke(Lweblogic/rmi/extensions/server/RuntimeMethodDescriptor;Lweblogic/rmi/spi/InboundRequest;Lweblogic/rmi/spi/OutboundResponse;)V(BasicServerRef.java:477)[optimized]
    at weblogic/rmi/internal/BasicServerRef$1.run()Ljava/lang/Object;(BasicServerRef.java:420)[inlined]
    at weblogic/security/acl/internal/AuthenticatedSubject.doAs(Lweblogic/security/subject/AbstractSubject;Ljava/security/PrivilegedExceptionAction;)Ljava/lang/Object;(AuthenticatedSubject.java:363)[inlined]
    at weblogic/security/service/SecurityManager.runAs(Lweblogic/security/acl/internal/AuthenticatedSubject;Lweblogic/security/acl/internal/AuthenticatedSubject;Ljava/security/PrivilegedExceptionAction;)Ljava/lang/Object;(SecurityManager.java:147)[inlined]
    at weblogic/rmi/internal/BasicServerRef.handleRequest(Lweblogic/rmi/spi/InboundRequest;)V(BasicServerRef.java:415)[inlined]
    at weblogic/rmi/internal/BasicExecuteRequest.execute(Lweblogic/kernel/ExecuteThread;)V(BasicExecuteRequest.java:27)[optimized]
    at weblogic/kernel/ExecuteThread.execute(Lweblogic/kernel/ExecuteRequest;)V(ExecuteThread.java:219)[optimized]
    at weblogic/kernel/ExecuteThread.run()V(ExecuteThread.java:178)
    at jrockit/vm/RNI.c2java(IIII)V(Native Method)
    -- end of trace
    "ExecuteThread: '1' for queue: 'weblogic.kernel.Default'" id=12 idx=0x1e tid=6669 prio=5 alive, daemon
    at java/util/WeakHashMap.get(Ljava/lang/Object;)Ljava/lang/Object;(WeakHashMap.java:346)[optimized]
    at weblogic/rmi/internal/ClientRuntimeDescriptor.intern(Ljava/lang/String;)Lweblogic/rmi/internal/ClientRuntimeDescriptor;(ClientRuntimeDescriptor.java:130)[inlined]
    at weblogic/rmi/internal/BasicRuntimeDescriptor.getClientRuntimeDescriptor(Ljava/lang/String;)Lweblogic/rmi/internal/ClientRuntimeDescriptor;(BasicRuntimeDescriptor.java:459)[optimized]
    at weblogic/rmi/internal/BasicServerRef.getStub()Ljava/lang/Object;(BasicServerRef.java:656)[optimized]
    at weblogic/rmi/internal/OIDManager.getReplacement(Ljava/lang/Object;)Ljava/lang/Object;(OIDManager.java:189)[optimized]
    at weblogic/rmi/extensions/StubFactory.getStub(Ljava/rmi/Remote;)Ljava/lang/Object;(StubFactory.java:66)
    at weblogic/jdbc/rmi/internal/CallableStatementImpl.interopWriteReplace(Lweblogic/common/internal/PeerInfo;)Ljava/lang/Object;(CallableStatementImpl.java:50)
    at weblogic/rmi/utils/io/InteropObjectReplacer.replaceObject(Ljava/lang/Object;)Ljava/lang/Object;(InteropObjectReplacer.java:38)[optimized]
    at weblogic/common/internal/ChunkedObjectOutputStream.replaceObject(Ljava/lang/Object;)Ljava/lang/Object;(ChunkedObjectOutputStream.java:54)[inlined]
    at weblogic/common/internal/ChunkedObjectOutputStream$NestedObjectOutputStream.replaceObject(Ljava/lang/Object;)Ljava/lang/Object;(ChunkedObjectOutputStream.java:249)[optimized]
    at java/io/ObjectOutputStream.writeObject0(Ljava/lang/Object;Z)V(Unknown Source)[inlined]
    at java/io/ObjectOutputStream.writeObject(Ljava/lang/Object;)V(Unknown Source)[inlined]
    at weblogic/common/internal/ChunkedObjectOutputStream.writeObject(Ljava/lang/Object;)V(ChunkedObjectOutputStream.java:120)[inlined]
    at weblogic/rjvm/MsgAbbrevOutputStream.writeObject(Ljava/lang/Object;Ljava/lang/Class;)V(MsgAbbrevOutputStream.java:94)[optimized]
    at weblogic/jdbc/rmi/internal/ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_OracleConnection_WLSkel.invoke(ILweblogic/rmi/spi/InboundRequest;Lweblogic/rmi/spi/OutboundResponse;Ljava/lang/Object;)Lweblogic/rmi/spi/OutboundResponse;(Unknown Source)[optimized]
    at weblogic/rmi/internal/BasicServerRef.invoke(Lweblogic/rmi/extensions/server/RuntimeMethodDescriptor;Lweblogic/rmi/spi/InboundRequest;Lweblogic/rmi/spi/OutboundResponse;)V(BasicServerRef.java:477)[optimized]
    at weblogic/rmi/internal/BasicServerRef$1.run()Ljava/lang/Object;(BasicServerRef.java:420)[inlined]
    at weblogic/security/acl/internal/AuthenticatedSubject.doAs(Lweblogic/security/subject/AbstractSubject;Ljava/security/PrivilegedExceptionAction;)Ljava/lang/Object;(AuthenticatedSubject.java:363)[inlined]
    at weblogic/security/service/SecurityManager.runAs(Lweblogic/security/acl/internal/AuthenticatedSubject;Lweblogic/security/acl/internal/AuthenticatedSubject;Ljava/security/PrivilegedExceptionAction;)Ljava/lang/Object;(SecurityManager.java:147)[inlined]
    at weblogic/rmi/internal/BasicServerRef.handleRequest(Lweblogic/rmi/spi/InboundRequest;)V(BasicServerRef.java:415)[inlined]
    at weblogic/rmi/internal/BasicExecuteRequest.execute(Lweblogic/kernel/ExecuteThread;)V(BasicExecuteRequest.java:27)[optimized]
    at weblogic/kernel/ExecuteThread.execute(Lweblogic/kernel/ExecuteRequest;)V(ExecuteThread.java:219)[optimized]
    at weblogic/kernel/ExecuteThread.run()V(ExecuteThread.java:178)
    at jrockit/vm/RNI.c2java(IIII)V(Native Method)
    -- end of trace</b>Hi. It seems you're doing JDBC in an external client, using our RMI-based
    JDBC wrappers to the actual connection in the WLS server, and you are
    doing LOB retrieval. This means your query goes from your client to
    the WLS process, and then to the DBMS, and the LOB data (big) has to go
    from the DBMS to the WLS process and then back over RMI to your client.
    This is bound to be inefficient. If you can move your JDBC to a JSP or
    other serverside class, it will be much faster. Otherwise, if the
    management that WLS provides is not strictly necessary for the LOB
    manipulation, it may be faster to get that directly from the DBMS to
    the external client by using the vendor's JDBC driver directly.
    Joe

  • Cannot assign an empty string to a parameter with JDBC type VARCHAR

    Hi,
    I am seeing the aforementioned error in the logs. I am guessing its happening whenever I am starting an agent instance in PCo. Can somebody explain whats going on?
    Regards,
    Chanti.
    Heres the complete detail from logs -
    Log Record Details   
    Message: Unable to retreive path for , com.sap.sql.log.OpenSQLException: Failed to set the parameter 1 of the statement >>SELECT ID, PARENTID, FULLPATH, CREATED, CREATEDBY, MODIFIED, MODIFIEDBY, REMOTEPATH, CHECKEDOUTBY FROM XMII_PATHS WHERE FULLPATH =  ?  <<: Cannot assign an empty string to a parameter with JDBC type >>VARCHAR<<.
    Date: 2010-03-12
    Time: 11:32:37:435
    Category: com.sap.xmii.system.FileManager
    Location: com.sap.xmii.system.FileManager
    Application: sap.com/xappsxmiiear

    Sounds like a UI browsing bug (when no path is selected from a catalog tree folder browser) - I would suggest logging a support ticket so that it can be addressed.

  • I have a problem with JDBC Realm in Tomcat/Oracle/Win XP

    I have a problem with JDBC Realm in Tomcat.
    I have attached my server.xml file located in the
    C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\server.xml
    The Problem is that when I login I get the user name and password prompt but it does not resolve.
    When I enter in the tomcat-users.xml password with memory realm uncommented it works fine.
    C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\tomcat-users.xml
    Is there a cache or something I need to reset for the JDBC Realm to work?
    I have attached my tables and contents as well...
    Did I miss something????
    Thanks
    Phil
    server.xml
    <Server port="8005" shutdown="SHUTDOWN">
    <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
    <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
    <Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
    <!-- Global JNDI resources -->
    <GlobalNamingResources>
    <!-- Test entry for demonstration purposes -->
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
    </GlobalNamingResources>
    <!-- Define the Tomcat Stand-Alone Service -->
    <Service name="Catalina">
    <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
    <Connector
    port="8080" maxHttpHeaderSize="8192"
    maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
    enableLookups="false" redirectPort="8443" acceptCount="100"
    connectionTimeout="20000" disableUploadTimeout="true" />
    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009"
    enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
    <!-- Define the top level container in our container hierarchy -->
    <Engine name="Catalina" defaultHost="localhost">
    <!--
    <Realm className="org.apache.catalina.realm.MemoryRealm" />
    -->
    <Realm className="org.apache.catalina.realm.JDBCRealm"
    driverName="oracle.jdbc.driver.OracleDriver"
    connectionURL="jdbc:oracle:thin:@localhost:1521:orcl"
    connectionName="testName" connectionPassword="testPass"
    userTable="users"
    userNameCol="user_name"
    userCredCol="user_pass"
    userRoleTable="user_roles"
    roleNameCol="role_name" />
    <!-- Define the default virtual host
    Note: XML Schema validation will not work with Xerces 2.2.
    -->
    <Host name="localhost" appBase="webapps"
    unpackWARs="true" autoDeploy="true"
    xmlValidation="false" xmlNamespaceAware="false">
    </Host>
    </Engine>
    </Service>
    </Server>
    Tables
    create table users
    user_name varchar(15) not null primary key,
    user_pass varchar(15) not null
    create table roles
    role_name varchar(15) not null primary key
    create table user_roles
    user_name varchar(15) not null,
    role_name varchar(15) not null,
    primary key( user_name, role_name )
    select * from users;
    ----------------------+
    | user_name | user_pass |
    ----------------------+
    | tomcat | tomcat |
    | user1 | tomcat |
    | user2 | tomcat |
    | user3 | tomcat |
    ----------------------+
    select * from roles;
    | role_name |
    | tomcat |
    | role1 |
    select * from user_roles;
    -----------------------+
    | role_name | user_name |
    -----------------------+
    | tomcat | user1 |
    | role1 | user2 |
    | tomcat | tomcat |
    | role1 | tomcat |
    -----------------------+

    Jan 2, 2008 11:49:35 AM org.apache.coyote.http11.Http11Protocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8080
    Jan 2, 2008 11:49:35 AM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 734 ms
    Jan 2, 2008 11:49:35 AM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    Jan 2, 2008 11:49:35 AM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.5.9
    Jan 2, 2008 11:49:35 AM org.apache.catalina.realm.JDBCRealm start
    SEVERE: Exception opening database connection
    java.sql.SQLException: oracle.jdbc.driver.OracleDriver
         at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:684)
         at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:758)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1004)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
         at org.apache.catalina.core.StandardService.start(StandardService.java:450)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
         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:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
    Jan 2, 2008 11:49:35 AM org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    Jan 2, 2008 11:49:36 AM org.apache.catalina.core.StandardContext resourcesStart

  • Problem with JDBC and Tomcat

    I don't know where the problem originate, the only thing in my memory is that the program worked very well on my PC yesterday, but today, without even slightest change, it doesn't work anymore. As to debug it, I simplified the codes to the least, but it still refuse to work. I was beaten down by this problem totally, and cannot make out any solution for it, so, I come here, hoping to find a warrior to kill this damned bug for me.
    My program is a Servlet, but for the purpose of debugging, I have recode it to an Application/Servlet. When run as a application, I can get the result expected, but as a Servlet, :-(, maybe you should see it by yourself. My server software is Tomcat 4.1.15, and the JDK version is 1.4.0. To excute this program, you should add Data Source "Test" to ODBC.
    ///////////////////////code begins/////////////////////////
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    public class Ex extends HttpServlet
         int ErrorType = 0;
         String err = new String("");
         public static void main(String args[]) throws Exception{
              Ex cEx = new Ex();
              cEx.init();     
              System.out.println(cEx.ErrorType);     
         public void init() {
              String url = "jdbc:odbc:Test";
              ErrorType = 3;     //passed
              try{
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              } catch (ClassNotFoundException e) {
                   e.printStackTrace();
                   ErrorType = 1; //trapped in Class.forName
              try{
                   Connection c = DriverManager.getConnection(url);
              } catch (SQLException e) {
                   e.printStackTrace();
                   ErrorType = 2; //trapped in DriverManager.getConnection
                   err = e.getMessage();
         public void service(HttpServletRequest req, HttpServletResponse res)
                   throws IOException {
              res.setContentType("text/html; charset=GB2312");
              PrintWriter out = res.getWriter();
              out.println("Success " + "<p>" + ErrorType + "<p>" +err);
              out.close();
    //////////////////////////code ends///////////////////////////////
    The result from the Servlet tell me that the problem occurred within the connection process, I don't know who should be responsible to this - Tomcat or JDBC?

    If you could print the exception that you got then that would help :) In the mean time, I could make a guess. It is unlikely that your application server (in this case, Tomcat) is blocking connections from your servlet. So the problem is either with JDBC directly or with the underlying datasource. It seems unlikely that it is JDBC given that you have stated that the code has not changed and it works in application form.
    My guess would be that you are coming up against some sort of security constraint (eg: your DBMS is letting you log in from one IP but not another?, your Java plug-in security policy is disallowing the connection?). It's hard to say.
    But if it works as an application but not via a servlet then you could try putting this in your java.policy file, which is located in the directory where your plug-ins are installed (eg: "C:\Program Files\Java\<version>\lib\security\") on Windows systems;
    permission java.net.SocketPermission "bend xp:1099", "listen,connect,accept";
    Try that, see if it works :)
    Ben

  • How to set a sql query time out with jdbc:oracle:thin

    should i change the JDBC driver with jdbc:oralce:XA:thin or other driver with XA?

    SQL query timeout may be set with setQueryTimeout.
    http://java.sun.com/j2se/1.4.2/docs/api/java/sql/Statement.html#setQueryTimeout(int)
    A query timeout bug is fixed in Oracle JDBC Drivers release
    10.1.0.2.0 (10g)
    FIXED BUG-2249191
    In the Server Internal Driver, setting the query timeout does not
    +(and likely will never) work. The query execution will not be+
    canceled when the timeout expires, even if the query runs forever.
    Further, after the query returns, the execution of your code
    may pause for the length of the timeout.
    http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_readme101020.html

  • Can't connect to external Oracle DB with JDBC connector

    Hello guys,
    I had failed to connect to connect external Oracle  via JDBC connector .
    Could you please help me to resolve the problem ?
    Backgroud:
    We need to connect the external Oracle DB with JDBC connector, because BI need to connect to the target Oracle. If the JDBC connector suceed, BI will create a UD which use the datasource
    we create in Visual admin to connect to the external Oracle DB.
    Environment:
    Our EP version is NW04S SP17 , OS is AIX .
    The target Oracle DB version is 10g(10.1.0.2.0, 64bi).
    Configuration procedure :
    1. Import Oracle driver "ojdbc14.jar" and create new driver which named "Oracle "  under
    JDBC Connector ->Run time ->Driver  in Visual Admin.
    2. Create datasource "Mydatasource" under JDBC Connector ->Run time ->Data Source,
    Name : Mydatasource
    Driver Name : Oracle
    JDBC version: 2.0(with XA support)
    JDBC compliant:
    Object Factory :oracle.jdbc.pool.OracleDataSourceFactory
    DataSource Type: ConnectionPoolDataSource
    *CPDS class name :oracle.jdbc.pool.OracleConnectionPoolDataSource
    Additional:
    Additional Properties:
    DatabaseName:LPAR8TEST
    DriverName:oracle.jdbc.OracleDriver
    Password: *****
    PortNumber:1521
    ServerName: 10.1.16.208
    URL :jdbc:oracel:[email protected]:1521:LPAR8TEST
    User:IMPL
    Connectoin Pool:
    Initial Connectons: 1                                         Expiration:  (check)
    Maximum Connections: 25                                  Connection Lifetime :600
    Maximum time wait of connection : 60                  Cleanup Thread : 200
    Default Connectoin Isolaton :Default
    SQL Engine:
    Open SQL
    3.Create Connector :
       Copy the standard connector :SDK_JDBC to SDK_JDBC_Oracle,
      Resource Adopter:
      Loader References:
      Add "libray:Oracle" .
    Managed Connection Factory:
    Configuration Property:
    DriverName:oracle.jdbc.OracleDriver
    Password: ****
    User:IMPL
    URL: jdbc:oracle:[email protected]:1521:LPAR8TEST
    All fo my configuration had been listed.
    And I had created JCO RFC : JT-BIDEV_PORTAL_BD1 , and created RFC connection with SM59 in BI.
    Please give me some suggesiton.
    Thanks.
    Louis

    When I try to start datasoure "Mydatasource" , it display error, error detail:
    java.rmi.RemoteException: com.sap.engine.services.dbpool.exceptions.BaseRemoteException: Error during start of application "sap.com/Mydatasource". [id = StartupError]
         at com.sap.engine.services.dbpool.deploy.DataSourceManagerImpl.startApplication(DataSourceManagerImpl.java:608)
    Caused by: java.rmi.RemoteException: Error occurred while starting application in whole cluster and wait.; nested exception is:
         com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Clusterwide exception: server ID 3128050:com.sap.engine.services.dbpool.exceptions.BaseDeploymentException: Cannot start DataSource "CGNPC".
         at com.sap.engine.services.dbpool.deploy.ContainerImpl.startDataSource(ContainerImpl.java:1549)
    Caused by: com.sap.engine.services.dbpool.exceptions.BaseResourceException: SQLException thrown by the physical connection: java.sql.SQLException: Invalid Oracle URL specified: OracleDataSource.makeURL
         at com.sap.engine.services.dbpool.spi.CPManagedConnectionFactoryImpl.createManagedConnection(CPManagedConnectionFactoryImpl.java:198)
    Caused by: java.sql.SQLException: Invalid Oracle URL specified: OracleDataSource.makeURL
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
    Caused by: com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Clusterwide exception: server ID 3128050:com.sap.engine.services.dbpool.exceptions.BaseDeploymentException: Cannot start DataSource "Mydatasource".
         at com.sap.engine.services.dbpool.deploy.ContainerImpl.startDataSource(ContainerImpl.java:1549)
    Caused by: com.sap.engine.services.dbpool.exceptions.BaseResourceException: SQLException thrown by the physical connection: java.sql.SQLException: Invalid Oracle URL specified: OracleDataSource.makeURL
         at com.sap.engine.services.dbpool.spi.CPManagedConnectionFactoryImpl.createManagedConnection(CPManagedConnectionFactoryImpl.java:198)
    Caused by: java.sql.SQLException: Invalid Oracle URL specified: OracleDataSource.makeURL
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
              u2026.
    When I try to test JDBC with URL : http://jt-pldev:50000/TestJDBC_Web/TestJDBCPage.jsp,
    First I choose connection name "SDK_JDBC_Oracle" .
    If I click "Check Connectons", it display :
    500   Internal Server Error
    SAP J2EE Engine/7.00
      Application error occurred during request processing.
      Details:
      java.lang.NoClassDefFoundError: com.sap.ip.bi.sdk.dac.connector.odbo.impl.Connection (initialization failure)
    Exception id: [001A64A86F2C006B000004C40010302A000469C74E86A096]
    If I click "Slecton Connection", it display:
    500   Internal Server Error
    SAP J2EE Engine/7.00
      Application error occurred during request processing.
      Details:
      com.sap.engine.frame.core.load.SAPNoClassDefFoundError: javax.resource.Referenceable
    Exception id: [001A64A86F2C0063000004C00010302A000469C74FA2BB59]

  • Interface program with JDBC

    I created three database tables in PostgreSQL database and interfaced it with JDBC.
    In the interface program, I queried the program to retrieve data from two tables. I got results from the first table, but did not get any result from the second table. Rather, the system sent the following error message: Exception in thread "main" java.sql.SQLException: ERROR: parser: parse error at or
    near "mdas_ar_coments"
    at org.postgresql.core.QueryExecutor.executeV2(QueryExecutor.java:289)
    Mdas_ar_coments is the name of the second table. I have checked the names, there is no spelling mistake in both the database tables and interface program.
    Please, let me know how to query two or more tables in a JDBC interface program.
    Thanks.

    Please show me how you are attempting to query two tables using JDBC.

  • Why can't i use "INNER JOIN" in a query for SQL Server with JDBC??????

    Hi,
    I'm trying to execute some SQL queries and I just don't understand what's wrong.
    I�m using Tomcat and SQL Server in order to do this, but when I�m try to execute a query with a INNER JOIN statements Tomcat raise a SQL exception... at the very first time I thought there was a problem with database connection but I realize that a simple query to a table works pretty well. then I found out some problems with JDBC:ODBC.... so I install JDBC for SQL Server 2000 and test with the same simple query and works..... so, I come to a conclusion.... INNER JOIN or JOIN statements can't be used in JDBC..... please... somebody tell I�m wrong and give me a hand...
    I'm using TOMCAT 4 and JDK 1.4 SQL Server 2000
    Error occurs when executeQuery() is called.... not prepareStatement().... ??????
    Driver DriverRecResult = (Driver)Class.forName(driver).newInstance();
    Connection ConnRecResult = DriverManager.getConnection(DSN,user,password);
    PreparedStatement StatementRecResult = ConnRecResult.prepareStatement(query);
    ResultSet RecResult = StatementRecResult.executeQuery(); <---- Exception raise here
    So much tahnks in advance,

    That's exactly what I think, driver it's raising the exception, but I don't know why.... i test the same query with INNER JOIN directly from SQL Query Analyser and it's works perfectly, my problem ain't SQL, but JSP and JDBC 'cause i'm a newbie about these issues.
    Common sense tell me possible problems lie in SQLServer drivers 'cause i run the same pages on JRUN through jdbc:odbc and do works well, but by now i just depend on Tomcat.....
    I've installed SQL Server drivers for JDBC but i just find it doesn't work fully... could be the version of JDK i've installed? what version do i need?
    ( I'm running Tomcat 4 with JDK 1.4 & SQL Server 2000 W2K )
    thanks for reply.

  • Problem with jdbc:odbc returning incorrect number of rows.

    Hello,
    Am sure i have done something stupid, but i have an issue with jdbc:odbc ....
    It is a simple sceanrio that i have coded umpteen times before ...
    I have the following ....
    1. Connection to DB2 on an IBM i5 (I apologise for not using native drivers from jt400.jar, but i had an ODBC code example and was in a rush - no excuse i know)
    2. Statement object created from connection above
    3. A string with my SQL in it
    4. A result set for the results.
    These are created as follows:
    Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver");
    con = DriverManager.getConnection(ODBCSource, userID, password);
    if (con == null) {
    // error handling not relevant here
    } else {
    Statement s = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
    String SQL = "select * from table";
    ResultSet rs = s.executeQuery(SQL);
    i then try to loop ....
    while (rs.next() )
    // stuff
    however, i only ever get one result .... if i stick in the check for isLast, the first loop hits this check, i get my little status message, and the loop ends.
    while (rs.next() )
    if (rs.isLast() )
    System.out.println("I am on last record");
    BUT if i run the SQL
    "select count(*) from table" ... i get a count of 148 !!
    I tried setting the FetchSize through setFetchSize(), but made no difference.
    This is running on a JBoss server 4.2.1GA, JDK is "jdk1.6.0_02" .... i have a suspicion that this may be a JBoss specfic issue, as this exact code runs just fine on the Domino platform that it was originally on, if this is the case, i apologise for wasting everyones time .... but would still appreciate any pointers you can give me.
    Cheers

    Hello,
    Thanks for the reply, I am not sure i follow what you are saying.
    I only mentioned JBoss as it is the application server that we have deployed to and because the orignal code ran fine on a Domino server, I will take your advice and try to run it through in debug rather than running actually on the application server.
    Am i incorrect in my assumption that if "select count(*) from table" gives a count of 148, i should expect 148 records in a result set created from "select * from table" ? This is all rather new to me so i apologise if this is incorrect, I'd love to know why this is incorrect so i dont make similar mistakes in future.
    Also, If i run this same code on the previous platform, i get 148 iterations of the code contained within
    while (rs.next() ) { ... }
    When the war file is deployed to JBoss, the same SQL statement gives a result set that only iterates once for
    while (rs.next() ) { ... }
    The previous platform as I say was domino, but it was running as a lotus notes java agent (despite not using any notes documents etc) as it happened to be where the web pages that call this process were located. It is possible that some of the main code has changed as I had cut and paste the code into a servlet using MyEclipse, but i have double checked the bit that does this SQL request and it is identical
    To complete the picture, the new servelt is then called from the action tag on the submit form on a JSP, when it ends the servlet redirects via the requestdispacher to success or failure jsp pages depending on the outcome of the processing.
    Thank you again for your help.

  • How to get the field's type in the database with jdbc?

    How to get the one filed's type(varchar,int,long...etc) with jdbc??
    Can u help me??
    It's best that giving a sample code..

    Thx for your reply,BheegaChicken! But i use it with
    oracle9i jdbc..It doesn't return to my the fields
    type correctly..
    This is problem is caused by oracle jdbc??
    Can u tell me??It depends on the driver classes you are using... some of them don't have an implementation for those methods and you won''t get anything useful. Check the driver documentation.
    ***Annie***

  • Paging with JDBC

    Hi
    What is the best way to do paging with JDBC when using PL/SQL Cursor. I want to create DAOs that access PL/SQL Cursors with a paging mechanism. The DAO must be stateless.
    Regards,
    Nestor Boscan

    Nestor,
    While I'm not trying to take away from Mikael's suggestion, the way I do it (which was implemented before the existence of "OracleCachedRowSet") is to maintain a scrollable "ResultSet" on the server, and send "Collection"s to the client. But beware of very large "ResultSet"s, because the Oracle JDBC driver implements scrollable "ResultSet"s via client memory.
    In any case, paging has been discussed previously in this forum. Did you try searching the forum archives?
    Good Luck,
    Avi.

  • RMI with JDBC

    Hello,
    this is the first time that I work with RMI.
    In fact it isn't so hard.
    But I've made an interface that do the operations on my database.
    Do I also have to program a locking mechanism?
    Does anybody made such a system, or what do you recommand.
    I want to make a simpel program that uses a database on another pc.
    tnx

    Hi Twims
    Im asking if you could make me a favor... As I can see you know RMI with JDBC... And at this moment I need a client and server programs to connect to a database, execute SQL commands and retrieve information to client.
    If you could send me those programs please do it to [email protected] or [email protected]
    Thanks in advance
    ANDRES GONZALEZ

  • RMI with  JDBC program

    i want a program RMI with JDBC code included.

    Java RMI programs for implementing Author Registration.
    /* File Name : AuthorServerint.java
    Java Remote Interface for implementing Author Registration
    import java.rmi.*;
    public interface AuthorServerint extends java.rmi.Remote
              public void Update_Details(String autid, String name,String
                   title,String street, String city, String state, int pin)
                   throws java.rmi.RemoteException;
    File Name : AuthorServerimpl.java
    Java Interface implementation and Server program for implementing
    Author Registration
    import java.rmi.*;
    import java.sql.*;
    import javax.swing.*;
    public class AuthorServerimpl extends java.rmi.server.UnicastRemoteObject
              implements AuthorServerint
              static Connection con;
              static PreparedStatement ps;
              static ResultSet rs;
              static Statement st;
              int in;
              public AuthorServerimpl() throws java.rmi.RemoteException
                   super();
              public static void main(String args[])throws Exception
                   try{
                        AuthorServerint As=new AuthorServerimpl();
                        Naming.rebind("rmi://localhost/As",As);
                        System.out.println("Server ready");
              catch(Exception e){
                   System.out.println(e);
         public void Update_Details(String autid, String name,String
                   title,String street, String city, String state, int pin)
                   throws java.rmi.RemoteException
                   try{
                        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                        con=DriverManager.getConnection("Jdbc:Odbc:data");
                        st=con.createStatement();
                        if(autid.equals("") || name.equals("") || title.equals("") ||
                             street.equals("") || city.equals("") || state.equals(""))
                             JOptionPane.showMessageDialog(null,"Fill all the entries");
                        else{
                             in=st.executeUpdate("insert into Author values ('" autid
                                  "','"+name+"','"+title+"','"+street+"','"+ city+
                                  "','"+state+"','"+pin+"')");
                             if(in>0){          
                                  JOptionPane.showMessageDialog(null,"Data Updated");
                   catch(Exception e){}
    File Name : Authorclient.java
    Java Client program for implementing Author Registration
    import java.rmi.*;
    import java.io.*;
    import java.rmi.Naming;
    import java.sql.*;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    public class Authorclient extends JFrame implements ActionListener
              static JTextField tautid,tname,ttitle,tstreet,tcity,tstate,tpin;
              JLabel lautid,lname,ltitle,lstreet,lcity,lstate,lpin;
              static JButton Badd,Exit,Bclear;
              String autid,name,title,street,city,state;
              int pin;
              Authorclient()
                   Container C=getContentPane();
                   C.setLayout(new GridLayout(9,2));
                   lautid=new JLabel("Author Id");
                   lname=new JLabel("Author Name");
                   ltitle=new JLabel("Title");
                   lstreet=new JLabel("Street");
                   lcity=new JLabel("City");
                   lstate=new JLabel("State");
                   lpin=new JLabel("Pincode");
                   tautid=new JTextField(10);
                   tname=new JTextField(10);
                   ttitle=new JTextField(10);
                   tstreet=new JTextField(10);
                   tcity=new JTextField(10);
                   tstate=new JTextField(10);
                   tpin=new JTextField(10);
                   Badd=new JButton("SUBMIT");
                   Exit=new JButton("EXIT");
                   Bclear=new JButton("CLEAR");
                   Badd.addActionListener(this);
                   Exit.addActionListener(this);
                   Bclear.addActionListener(this);
                   C.add(lautid);
                   C.add(tautid);
                   C.add(lname);
                   C.add(tname);
                   C.add(ltitle);
                   C.add(ttitle);
                   C.add(lstreet);
                   C.add(tstreet);
                   C.add(lcity);
                   C.add(tcity);
                   C.add(lstate);
                   C.add(tstate);
                   C.add(lpin);
                   C.add(tpin);
                   C.add(Bclear);
                   C.add(Badd);
                   C.add(Exit);
                   setVisible(true);
                   resize(300,300);
         public void actionPerformed(ActionEvent ae)
                   if(ae.getActionCommand().equals("SUBMIT"))
                        try{
                             AuthorServerint A=(AuthorServerint)Naming.lookup ("rmi://
                                  localhost/As");
                             autid=tautid.getText();
                             name=tname.getText();
                             title=ttitle.getText();
                             street=tstreet.getText();
                             city=tcity.getText();
                             state=tstate.getText();
                             pin=Integer.parseInt(tpin.getText());
                             A.Update_Details(autid,name,title,street,city,state,pin);
                        catch(Exception E){}
                   else if(ae.getActionCommand().equals("EXIT"))
                        System.exit(0);
                   else if(ae.getActionCommand().equals("CLEAR"))
                        tautid.setText("");
                        tname.setText("");
                        ttitle.setText("");
                        tstreet.setText("");
                        tcity.setText("");
                        tstate.setText("");
                        tpin.setText("");
         public static void main(String args[])
                   new Authorclient();
    note: this program is done using swing components and need a database to run. The fields of the table("Author") database("data") are the same as the variable used in "Update_Details" function.
    Edited by: Amar on Oct 30, 2007 12:11 PM

  • BUG JSF h:dataTable with JDBC ResultSet - only last column is updated

    I tried to create updatable h:dataTable tag with three h:inputText columns with JDBC ResultSet as data source. But what ever I did I have seceded to update only the last column in h:dataTable tag.
    My JSF page is:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1250"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <f:view>
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1250"/>
    <title>Stevan</title>
    </head>
    <body><h:form>
    <p>
    <h:messages/>
    </p>
    <p>
    <h:dataTable value="#{tabela.people}" var = "record">
    <h:column>
    <f:facet name="header">
    <h:outputText value="PIN"/>
    </f:facet>
    <h:inputText value="#{record.PIN}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Surname"/>
    </f:facet>
    <h:inputText value="#{record.SURNAME}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Name"/>
    </f:facet>
    <h:inputText value="#{record.NAME}"/>
    </h:column>
    </h:dataTable>
    </p>
    <h:commandButton value="Submit"/>
    </h:form></body>
    </html>
    </f:view>
    My java been is:
    package com.steva;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    public class tabela {
    private Connection conn;
    private ResultSet resultSet;
    public tabela() throws SQLException, ClassNotFoundException {
    Statement stmt;
    Class.forName("oracle.jdbc.OracleDriver");
    conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe", "hr", "hr");
    stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
    resultSet = stmt.executeQuery("SELECT PIN, SURNAME, NAME FROM PERSON");
    public ResultSet getPeople() {
    return resultSet;
    I have instaled “Oracle Database 10g Express Edition Release 10.2.0.1.0” – product on my PC localy. I have enabled HR schema and I have instaled and pupulated with sample data folloving table:
    CREATE TABLE "PERSON"
    (     "PIN" VARCHAR2(20) NOT NULL ENABLE,
         "SURNAME" VARCHAR2(30),
         "NAME" VARCHAR2(30),
         CONSTRAINT "PERSON_PK" PRIMARY KEY ("PIN") ENABLE
    I have:
    Windows XP SP2
    Oracle JDeveloper Studio Edition Version 10.1.3.1.0.3894
    I am not shure why this works in that way, but I think that this is a BUG
    Thanks in advance.

    Hi,
    I am sorry because of formatting but while I am entering text looks fine but in preview it is all scrambled. I was looking on the Web for similar problems and I did not find anything similar. Its very simple sample and I could not believe that the problem is in SUN JSF library. I was thinking that problem is in some ResultSet parameter or in some specific Oracle implementation of JDBC thin driver. I did not try this sample on any other platform, database or programming tool. I am new in Java and JSF and I have some experience only with JDeveloper.
    Java been(session scope):
    package com.steva;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    public class tabela {
    private Connection conn;
    private ResultSet resultSet;
    public tabela() throws SQLException, ClassNotFoundException {
    Statement stmt;
    Class.forName("oracle.jdbc.OracleDriver");
    conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@localhost:1521:xe", "hr", "hr");
    stmt = conn.createStatement
    (ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
    resultSet = stmt.executeQuery("SELECT PIN, SURNAME, NAME FROM PERSON");
    public ResultSet getZaposleni() {
    return resultSet;
    JSF Page:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1250"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <f:view>
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1250"/>
    <title>Stevan</title>
    </head>
    <body><h:form>
    <p>
    <h:messages/>
    </p>
    <p>
    <h:dataTable value="#{tabela.zaposleni}" var = "record">
    <h:column>
    <f:facet name="header">
    <h:outputText value="PIN"/>
    </f:facet>
    <h:inputText value="#{record.PIN}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Surname"/>
    </f:facet>
    <h:inputText value="#{record.SURNAME}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Name"/>
    </f:facet>
    <h:inputText value="#{record.NAME}"/>
    </h:column>
    </h:dataTable>
    </p>
    <h:commandButton value="Submit"/>
    </h:form></body>
    </html>
    </f:view>

Maybe you are looking for