Petstore Oracle Database Exception

To whom it may concern,
I recently installed WebLogic 7.0. It worked just fine with the pointbase database
connection. The petstore example worked.. As soon as I began setting up weblogic
with an Oracle database, I began running into problems. Here is what I do know
- Connection to the Database works
- utils.dbping to database works
- Configuring Weblogic to use database connection fails.
Currently, I am stuck trying to find why the following exception is being thrown:
Unable to deploy EJB: ContactInfoEJB from suppPOEjb.jar:
weblogic.ejb20.WLDeploymentException: Incorrect DataSource type
detected. The DataSource with JNDI name 'datasource-petstoresupplierPool', specified
in the RDBMS deployment
descriptor for the EJB 'ContactInfoEJB', is not a TXDataSource.
The EJB Container requires a TXDataSource to be specified for
transactions to be managed correctly.
at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.verifyTXDataSource(R
DBMSPersistenceManager.java:977)
If you can shed some light on why this might be happening or point me to documentation
that could shed light on how to properly configure the petstore example, that would
be fabulous. I have included the installation notes we performed to this point.
We will continue to locate information regarding this issue. Thank you in advance
for your help.
Dan
<Installing BEA Web Logic 7.0>
[Administrator]
<Pre-Requisites>
     - Install Oracle 8i 8.1.7 Database Client
(Note: Place the "weblogic700_win.exe" binary into c:\temp on the target machine)
     - Double click "c:\temp\weblogic700_win.exe"
<BEA Installation Framework - Weblogic Platform 7.0 - Welcome>
     - Click the "Next" button
<BEA Installation Framework - Weblogic Platform 7.0 - BEA License Agreement>
     - Do you agree with the terms of the license? Yes
     - Click the "Next" button
<BEA Installation Framework - Weblogic Platform 7.0 - BEA Home Directory>
     - Select "Create a new BEA Home"
     - BEA Home Directory: c:\bea
     - Click the "Next" button
<BEA Installation Framework - Weblogic Platform 7.0 - Choose Install Type>
     - Select "Typical Installation"
     - Click the "Next" button
<BEA Installation Framework - Weblogic Platform 7.0 - Choose Product Directory>
     - Product Installation Directory: c:\bea\weblogic700
     - Click the "Next" button
<BEA Installation Framework - Weblogic Platform 7.0 - Install Complete>
     - Click the "Done" button
<Configure the Database properties correctly>
<Test connection to the Database>
     c:\oracle\ora81\bin> sqlplus petstore70/petstore70@octqa1
<Update the Environment Path>
     - Click "Start -> Settings -> Control Panel"
<Control Panel>
     - Double Click "System"
<System Properties>
     - Click the "Advanced" tab
     - Click the "Environment Variables" button
<Environment Variables>
     - Double click Variable "Path" beneath "System variables"
<Edit System Variable>
     - Variable Name: Path
     - Append ";c:\bea\weblogic700\server\bin\oci817_8;c:\oracle\ora81\bin" to the end
of "Variable Value"
     - Click the "OK" button
<Test the Database Connection from WebLogic>
     c:\bea\weblogic700\server\bin> setWLSEnv.cmd
     c:\bea\weblogic700\server\bin> set path=c:\bea\wlserver700\server\bin\oci817_8;%PATH%
     c:\bea\weblogic700\server\bin> java utils.dbping ORACLE petstore70 petstore70 octqa1
<Follow the Instructions for updating the PetStore to enable a different database>
     - Read and Execute: c:\bea\weblogic700\samples\server\src\petstore\petstore.html
<Execute the build command>
     c:\bea\weblogic700\samples\server\config\examples> setExamplesEnv
     c:\bea\weblogic700\samples\server\src\petstore\src> ant
<Verify the *ear files exist>
     c:\bea> dir c:\bea\weblogic700\samples\server\src\petstore\src\apps\admin\build
     c:\bea> dir c:\bea\weblogic700\samples\server\src\petstore\src\apps\opc\build
     c:\bea> dir c:\bea\weblogic700\samples\server\src\petstore\src\apps\petstore\build
     c:\bea> dir c:\bea\weblogic700\samples\server\src\petstore\src\apps\supplier\build
<Run the Examples Server>
     c:\bea\weblogic700\samples\server\config\examples> startExamplesServer.cmd
<Configure the petstore Database JDBC petstore pool>
     - Visit http://ibs26:7001/console
<Administration Console - BEA WebLogic Server 7.0>
     - Username: weblogic
     - Password: weblogic
     - Click the "Sign In" button
<WebLogic Server Console>
     - Select "petstore -> Services -> JDBC -> Connection Pools"
     - Click the "Configure a new JDBC Connection Pool"
<examples: JDBC Connection ... Create a new JDBC Connection Pool>
     - Select "Configuration:General"
     - Name: petstorePool
     - URL: jdbc:weblogic:oracle:OCTQA1
     - Driver ClassName: weblogic.jdbc.oci.Driver
     (Note: Make sure the following user was added to the oracle database)
     - Properties: user=petstore70
     - Password: petstore70
     - Click the "Create" button
<examples: JDBC Connection ... petstorePool>
     - Click the "Targets" tab
     - Click the "Servers" tab
     - Select "examplesServer"
     - Click the ">" button to add it to the chosen list
     - Click the "Apply" button
<WebLogic Server Console>
     - Select "petstore -> Services -> JDBC -> Connection Pools"
     - Click the "Configure a new JDBC Connection Pool"
<examples: JDBC Connection ... Create a new JDBC Connection Pool>
     - Select "Configuration:General"
     - Name: petstoreopcPool
     - URL: jdbc:weblogic:oracle:OCTQA1
     - Driver ClassName: weblogic.jdbc.oci.Driver
     (Note: Make sure the following user was added to the oracle database)
     - Properties: user=petstore70opc
     - Password: petstore70opc
     - Click the "Create" button
<examples: JDBC Connection ... petstorePool>
     - Click the "Targets" tab
     - Click the "Servers" tab
     - Select "examplesServer"
     - Click the ">" button to add it to the chosen list
     - Click the "Apply" button
<WebLogic Server Console>
     - Select "petstore -> Services -> JDBC -> Connection Pools"
     - Click the "Configure a new JDBC Connection Pool"
<examples: JDBC Connection ... Create a new JDBC Connection Pool>
     - Select "Configuration:General"
     - Name: petstoresupplierPool
     - URL: jdbc:weblogic:oracle:OCTQA1
     - Driver ClassName: weblogic.jdbc.oci.Driver
     (Note: Make sure the following user was added to the oracle database)
     - Properties: user=petstore70supplier
     - Password: petstore70supplier
     - Click the "Create" button
<examples: JDBC Connection ... petstorePool>
     - Click the "Targets" tab
     - Click the "Servers" tab
     - Select "examplesServer"
     - Click the ">" button to add it to the chosen list
     - Click the "Apply" button
<Create the Data Sources>
     - Select "petstore -> Services -> JDBC -> Data Sources"
     - Click the "Configure a new JDBC Data Source"
<examples.. JDBC Data Sources.. Create a new JDBCDataSource...>
     - Name: PetstoreDataSource
     - JNDI Name: datasource-petstorePool
     - Pool Name: petstorePool
     - Click the "Create" button
<examples.. JDBC Data Sources.. PetstoreDataSource...>
     - Click the "Targets" tab
     - Click the "Servers" tab
     - Select "examplesServer"
     - Click the ">" button to add it to the chosen list
     - Click the "Apply" button
<Create the Data Sources>
     - Select "petstore -> Services -> JDBC -> Data Sources"
     - Click the "Configure a new JDBC Data Source"
<examples.. JDBC Data Sources.. Create a new JDBCDataSource...>
     - Name: PetstoreOPCDataSource
     - JNDI Name: datasource-petstoreopcPool
     - Pool Name: petstoreopcPool
     - Click the "Create" button
<examples.. JDBC Data Sources.. PetstoreOPCDataSource...>
     - Click the "Targets" tab
     - Click the "Servers" tab
     - Select "examplesServer"
     - Click the ">" button to add it to the chosen list
     - Click the "Apply" button
<Create the Data Sources>
     - Select "petstore -> Services -> JDBC -> Data Sources"
     - Click the "Configure a new JDBC Data Source"
<examples.. JDBC Data Sources.. Create a new JDBCDataSource...>
     - Name: PetstoreSupplierDataSource
     - JNDI Name: datasource-petstoresupplierPool
     - Pool Name: petstoresupplierPool
     - Click the "Create" button
<examples.. JDBC Data Sources.. PetstoreSupplierDataSource...>
     - Click the "Targets" tab
     - Click the "Servers" tab
     - Select "examplesServer"
     - Click the ">" button to add it to the chosen list
     - Click the "Apply" button
<Create the Data Sources>
     - Select "petstore -> Services -> JDBC -> Data Sources"
     - Click the "Configure a new JDBC Data Source"
<examples.. JDBC Data Sources.. Create a new JDBCDataSource...>
     - Name: CatalogDataSource
     - JNDI Name: jdbc.CatalogDataSource
     - Pool Name: petstorePool
     - Click the "Create" button
<examples.. JDBC Data Sources.. CatalogDataSource...>
     - Click the "Targets" tab
     - Click the "Servers" tab
     - Select "examplesServer"
     - Click the ">" button to add it to the chosen list
     - Click the "Apply" button
<Create the Connection Factories>
     - Select "petstore -> Services -> JMS -> Connection Factories"
     - Click the "Configure a New JMS Connection Factory."
<examples... JMS Connection F.... Create a new JMSConnectionFactory>
     - Click the "General" tab
     - Name: petstoreQueueConnectionFactory
     - JNDIName: jms.JPS_MY_QUEUE
     - Click the "Create" button
<examples.. JMS Connection F... petstoreQueueCon...>
     - Click the "Targets" tab
     - Click the "Servers" tab
     - Select "examplesServer"
     - Click the ">" button to add it to the chosen list
     - Click the "Apply" button
<Create the Connection Factories>
     - Select "petstore -> Services -> JMS -> Connection Factories"
     - Click the "Configure a New JMS Connection Factory."
<examples... JMS Connection F.... Create a new JMSConnectionFactory>
     - Click the "General" tab
     - Name: petstoreTopicConnectionFactory
     - JNDIName: jms.MyTopicConnectionFactory
     - Click the "Create" button
<examples.. JMS Connection F... petstoreTopicCon...>
     - Click the "Targets" tab
     - Click the "Servers" tab
     - Select "examplesServer"
     - Click the ">" button to add it to the chosen list
     - Click the "Apply" button
<Move the EAR Files to the Examples Domain>
     c:\bea\weblogic700\samples\server\src\petstore\src\apps\admin\build> copy *ear ..\..\..\..\..\..\config\examples\applications
     c:\bea\weblogic700\samples\server\src\petstore\src\apps\opc\build> copy *ear ..\..\..\..\..\..\config\examples\applications
     c:\bea\weblogic700\samples\server\src\petstore\src\apps\petstore\build> copy *ear
.\..\..\..\..\..\config\examples\applications
     c:\bea\weblogic700\samples\server\src\petstore\src\apps\supplier\build> copy *ear
.\..\..\..\..\..\config\examples\applications
<Restart the weblogic Examples server>
     c:\bea\weblogic700\samples\server\config\examples> startExamplesServer.cmd
<Visit the Petstore Application
     - Visit http://ibs26:7001/petstore/index.jsp
<Notes on install>
     - The following is being thrown in the examples server:
Unable to deploy EJB: ContactInfoEJB from suppPOEjb.jar:
weblogic.ejb20.WLDeploymentException: Incorrect DataSource type detected. The Da
taSource with JNDI name 'datasource-petstoresupplierPool', specified in the RDBM
S deployment descriptor for the EJB 'ContactInfoEJB', is not a TXDataSource. The
EJB Container requires a TXDataSource to be specified for transactions to be ma
naged correctly.
at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.verifyTXDataSource(R
DBMSPersistenceManager.java:977)
     - At present, there is no solution to this issue

To whom it may concern,
I recently installed WebLogic 7.0. It worked just fine with the pointbase database
connection. The petstore example worked.. As soon as I began setting up weblogic
with an Oracle database, I began running into problems. Here is what I do know
- Connection to the Database works
- utils.dbping to database works
- Configuring Weblogic to use database connection fails.
Currently, I am stuck trying to find why the following exception is being thrown:
Unable to deploy EJB: ContactInfoEJB from suppPOEjb.jar:
weblogic.ejb20.WLDeploymentException: Incorrect DataSource type
detected. The DataSource with JNDI name 'datasource-petstoresupplierPool', specified
in the RDBMS deployment
descriptor for the EJB 'ContactInfoEJB', is not a TXDataSource.
The EJB Container requires a TXDataSource to be specified for
transactions to be managed correctly.
at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.verifyTXDataSource(R
DBMSPersistenceManager.java:977)
If you can shed some light on why this might be happening or point me to documentation
that could shed light on how to properly configure the petstore example, that would
be fabulous. I have included the installation notes we performed to this point.
We will continue to locate information regarding this issue. Thank you in advance
for your help.
Dan
<Installing BEA Web Logic 7.0>
[Administrator]
<Pre-Requisites>
     - Install Oracle 8i 8.1.7 Database Client
(Note: Place the "weblogic700_win.exe" binary into c:\temp on the target machine)
     - Double click "c:\temp\weblogic700_win.exe"
<BEA Installation Framework - Weblogic Platform 7.0 - Welcome>
     - Click the "Next" button
<BEA Installation Framework - Weblogic Platform 7.0 - BEA License Agreement>
     - Do you agree with the terms of the license? Yes
     - Click the "Next" button
<BEA Installation Framework - Weblogic Platform 7.0 - BEA Home Directory>
     - Select "Create a new BEA Home"
     - BEA Home Directory: c:\bea
     - Click the "Next" button
<BEA Installation Framework - Weblogic Platform 7.0 - Choose Install Type>
     - Select "Typical Installation"
     - Click the "Next" button
<BEA Installation Framework - Weblogic Platform 7.0 - Choose Product Directory>
     - Product Installation Directory: c:\bea\weblogic700
     - Click the "Next" button
<BEA Installation Framework - Weblogic Platform 7.0 - Install Complete>
     - Click the "Done" button
<Configure the Database properties correctly>
<Test connection to the Database>
     c:\oracle\ora81\bin> sqlplus petstore70/petstore70@octqa1
<Update the Environment Path>
     - Click "Start -> Settings -> Control Panel"
<Control Panel>
     - Double Click "System"
<System Properties>
     - Click the "Advanced" tab
     - Click the "Environment Variables" button
<Environment Variables>
     - Double click Variable "Path" beneath "System variables"
<Edit System Variable>
     - Variable Name: Path
     - Append ";c:\bea\weblogic700\server\bin\oci817_8;c:\oracle\ora81\bin" to the end
of "Variable Value"
     - Click the "OK" button
<Test the Database Connection from WebLogic>
     c:\bea\weblogic700\server\bin> setWLSEnv.cmd
     c:\bea\weblogic700\server\bin> set path=c:\bea\wlserver700\server\bin\oci817_8;%PATH%
     c:\bea\weblogic700\server\bin> java utils.dbping ORACLE petstore70 petstore70 octqa1
<Follow the Instructions for updating the PetStore to enable a different database>
     - Read and Execute: c:\bea\weblogic700\samples\server\src\petstore\petstore.html
<Execute the build command>
     c:\bea\weblogic700\samples\server\config\examples> setExamplesEnv
     c:\bea\weblogic700\samples\server\src\petstore\src> ant
<Verify the *ear files exist>
     c:\bea> dir c:\bea\weblogic700\samples\server\src\petstore\src\apps\admin\build
     c:\bea> dir c:\bea\weblogic700\samples\server\src\petstore\src\apps\opc\build
     c:\bea> dir c:\bea\weblogic700\samples\server\src\petstore\src\apps\petstore\build
     c:\bea> dir c:\bea\weblogic700\samples\server\src\petstore\src\apps\supplier\build
<Run the Examples Server>
     c:\bea\weblogic700\samples\server\config\examples> startExamplesServer.cmd
<Configure the petstore Database JDBC petstore pool>
     - Visit http://ibs26:7001/console
<Administration Console - BEA WebLogic Server 7.0>
     - Username: weblogic
     - Password: weblogic
     - Click the "Sign In" button
<WebLogic Server Console>
     - Select "petstore -> Services -> JDBC -> Connection Pools"
     - Click the "Configure a new JDBC Connection Pool"
<examples: JDBC Connection ... Create a new JDBC Connection Pool>
     - Select "Configuration:General"
     - Name: petstorePool
     - URL: jdbc:weblogic:oracle:OCTQA1
     - Driver ClassName: weblogic.jdbc.oci.Driver
     (Note: Make sure the following user was added to the oracle database)
     - Properties: user=petstore70
     - Password: petstore70
     - Click the "Create" button
<examples: JDBC Connection ... petstorePool>
     - Click the "Targets" tab
     - Click the "Servers" tab
     - Select "examplesServer"
     - Click the ">" button to add it to the chosen list
     - Click the "Apply" button
<WebLogic Server Console>
     - Select "petstore -> Services -> JDBC -> Connection Pools"
     - Click the "Configure a new JDBC Connection Pool"
<examples: JDBC Connection ... Create a new JDBC Connection Pool>
     - Select "Configuration:General"
     - Name: petstoreopcPool
     - URL: jdbc:weblogic:oracle:OCTQA1
     - Driver ClassName: weblogic.jdbc.oci.Driver
     (Note: Make sure the following user was added to the oracle database)
     - Properties: user=petstore70opc
     - Password: petstore70opc
     - Click the "Create" button
<examples: JDBC Connection ... petstorePool>
     - Click the "Targets" tab
     - Click the "Servers" tab
     - Select "examplesServer"
     - Click the ">" button to add it to the chosen list
     - Click the "Apply" button
<WebLogic Server Console>
     - Select "petstore -> Services -> JDBC -> Connection Pools"
     - Click the "Configure a new JDBC Connection Pool"
<examples: JDBC Connection ... Create a new JDBC Connection Pool>
     - Select "Configuration:General"
     - Name: petstoresupplierPool
     - URL: jdbc:weblogic:oracle:OCTQA1
     - Driver ClassName: weblogic.jdbc.oci.Driver
     (Note: Make sure the following user was added to the oracle database)
     - Properties: user=petstore70supplier
     - Password: petstore70supplier
     - Click the "Create" button
<examples: JDBC Connection ... petstorePool>
     - Click the "Targets" tab
     - Click the "Servers" tab
     - Select "examplesServer"
     - Click the ">" button to add it to the chosen list
     - Click the "Apply" button
<Create the Data Sources>
     - Select "petstore -> Services -> JDBC -> Data Sources"
     - Click the "Configure a new JDBC Data Source"
<examples.. JDBC Data Sources.. Create a new JDBCDataSource...>
     - Name: PetstoreDataSource
     - JNDI Name: datasource-petstorePool
     - Pool Name: petstorePool
     - Click the "Create" button
<examples.. JDBC Data Sources.. PetstoreDataSource...>
     - Click the "Targets" tab
     - Click the "Servers" tab
     - Select "examplesServer"
     - Click the ">" button to add it to the chosen list
     - Click the "Apply" button
<Create the Data Sources>
     - Select "petstore -> Services -> JDBC -> Data Sources"
     - Click the "Configure a new JDBC Data Source"
<examples.. JDBC Data Sources.. Create a new JDBCDataSource...>
     - Name: PetstoreOPCDataSource
     - JNDI Name: datasource-petstoreopcPool
     - Pool Name: petstoreopcPool
     - Click the "Create" button
<examples.. JDBC Data Sources.. PetstoreOPCDataSource...>
     - Click the "Targets" tab
     - Click the "Servers" tab
     - Select "examplesServer"
     - Click the ">" button to add it to the chosen list
     - Click the "Apply" button
<Create the Data Sources>
     - Select "petstore -> Services -> JDBC -> Data Sources"
     - Click the "Configure a new JDBC Data Source"
<examples.. JDBC Data Sources.. Create a new JDBCDataSource...>
     - Name: PetstoreSupplierDataSource
     - JNDI Name: datasource-petstoresupplierPool
     - Pool Name: petstoresupplierPool
     - Click the "Create" button
<examples.. JDBC Data Sources.. PetstoreSupplierDataSource...>
     - Click the "Targets" tab
     - Click the "Servers" tab
     - Select "examplesServer"
     - Click the ">" button to add it to the chosen list
     - Click the "Apply" button
<Create the Data Sources>
     - Select "petstore -> Services -> JDBC -> Data Sources"
     - Click the "Configure a new JDBC Data Source"
<examples.. JDBC Data Sources.. Create a new JDBCDataSource...>
     - Name: CatalogDataSource
     - JNDI Name: jdbc.CatalogDataSource
     - Pool Name: petstorePool
     - Click the "Create" button
<examples.. JDBC Data Sources.. CatalogDataSource...>
     - Click the "Targets" tab
     - Click the "Servers" tab
     - Select "examplesServer"
     - Click the ">" button to add it to the chosen list
     - Click the "Apply" button
<Create the Connection Factories>
     - Select "petstore -> Services -> JMS -> Connection Factories"
     - Click the "Configure a New JMS Connection Factory."
<examples... JMS Connection F.... Create a new JMSConnectionFactory>
     - Click the "General" tab
     - Name: petstoreQueueConnectionFactory
     - JNDIName: jms.JPS_MY_QUEUE
     - Click the "Create" button
<examples.. JMS Connection F... petstoreQueueCon...>
     - Click the "Targets" tab
     - Click the "Servers" tab
     - Select "examplesServer"
     - Click the ">" button to add it to the chosen list
     - Click the "Apply" button
<Create the Connection Factories>
     - Select "petstore -> Services -> JMS -> Connection Factories"
     - Click the "Configure a New JMS Connection Factory."
<examples... JMS Connection F.... Create a new JMSConnectionFactory>
     - Click the "General" tab
     - Name: petstoreTopicConnectionFactory
     - JNDIName: jms.MyTopicConnectionFactory
     - Click the "Create" button
<examples.. JMS Connection F... petstoreTopicCon...>
     - Click the "Targets" tab
     - Click the "Servers" tab
     - Select "examplesServer"
     - Click the ">" button to add it to the chosen list
     - Click the "Apply" button
<Move the EAR Files to the Examples Domain>
     c:\bea\weblogic700\samples\server\src\petstore\src\apps\admin\build> copy *ear ..\..\..\..\..\..\config\examples\applications
     c:\bea\weblogic700\samples\server\src\petstore\src\apps\opc\build> copy *ear ..\..\..\..\..\..\config\examples\applications
     c:\bea\weblogic700\samples\server\src\petstore\src\apps\petstore\build> copy *ear
.\..\..\..\..\..\config\examples\applications
     c:\bea\weblogic700\samples\server\src\petstore\src\apps\supplier\build> copy *ear
.\..\..\..\..\..\config\examples\applications
<Restart the weblogic Examples server>
     c:\bea\weblogic700\samples\server\config\examples> startExamplesServer.cmd
<Visit the Petstore Application
     - Visit http://ibs26:7001/petstore/index.jsp
<Notes on install>
     - The following is being thrown in the examples server:
Unable to deploy EJB: ContactInfoEJB from suppPOEjb.jar:
weblogic.ejb20.WLDeploymentException: Incorrect DataSource type detected. The Da
taSource with JNDI name 'datasource-petstoresupplierPool', specified in the RDBM
S deployment descriptor for the EJB 'ContactInfoEJB', is not a TXDataSource. The
EJB Container requires a TXDataSource to be specified for transactions to be ma
naged correctly.
at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.verifyTXDataSource(R
DBMSPersistenceManager.java:977)
     - At present, there is no solution to this issue

Similar Messages

  • Free Report Writer for Oracle Database except Crystal Report and Data Vison

    Dear All,
    I want Free Report Writer for Oracle Database except Crystal Report and Data Vision software.
    Wr are working on Linux and windows both platform.
    Any one have direct link or website address for it ?
    Regards,
    Vipul Patel
    Ahmedabad

    Please check the following link -
    http://www.google.co.in/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&channel=s&hl=en&q=open+source+report+writer+for+oracle&meta=&btnG=Google+Search
    Regards.
    Satyaki De.

  • [oracle@localhost database]$ Exception in thread "main" java.lang.Unsatisfi

    hi,
    i am trying to install oracle 10 g in my redhat 4 machine 32 bit. i have created all the required users and directories. but when i run the rininstaller i get following error( i believe possible i have to install some package which i don't know):
    [oracle@localhost ~]$ cd /home/oracle/Desktop/untitled/ora10g/database
    [oracle@localhost database]$ ./runInstaller
    Starting Oracle Universal Installer...
    Checking installer requirements...
    Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
    Passed
    All installer requirements met.
    Preparing to launch Oracle Universal Installer from /tmp/OraInstall2008-01-08_10-47-41PM. Please wait ...[oracle@localhost database]$ Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/OraInstall2008-01-08_10-47-41PM/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(Unknown Source)
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at sun.security.action.LoadLibraryAction.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)
    at sun.awt.DebugHelper.<clinit>(Unknown Source)
    at java.awt.Component.<clinit>(Unknown Source)
    can u plz help me with that.

    I think that you have to install Xorg (or XFree, whichever X environment redhat uses) related packages.
    They seem to be missing or not completely installed.
    I don't remember which specific package contains "libXp" nor its dependencies... so i'd recommend you to install them all.
    Good luck!

  • Exception during commit of transaction in wli when using oracle database

    I have configured oracle Database instead of pointbase in wli 9.2
    While getting the response through callback in wli process (from Worklist console)this errror is coming "Exception occurred during commit of transaction ".
    What should I do to remove this error??
    Stack trace is
    <Jan 6, 2007 5:19:59 PM CST> <Error> <EJB> <BEA-010026> <Exception occurred during commit of transac
    tion Xid=BEA1-012806F477B49C8F6264(7312912),Status=Rolled back. [Reason=weblogic.utils.NestedRuntime
    Exception: Error in beforeCompletion],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=
    0,seconds left=60,XAServerResourceInfo[WLStore_oracle1domain_cgJMSStore]=(ServerResourceInfo[WLStore
    oracle1domaincgJMSStore]=(state=rolledback,assigned=AdminServer),xar=WLStore_oracle1domain_cgJMSSt
    ore1269044,re-Registered = false),XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(Ser
    verResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=rolledback,assigned=AdminServer),xar
    =weblogic.jdbc.wrapper.JTSXAResourceImpl@14c0a31,re-Registered = false),SCInfo[oracle1domain+AdminSe
    rver]=(state=rolledback),properties=({weblogic.jdbc=t3://199.81.36.226:7001}),local properties=({mod
    ifiedListeners=[weblogic.ejb.container.internal.TxManager$TxListener@1442c7b], class com.bea.wli.bpm
    .runtime.JpdContainer$TxnListener1168125300187=com.bea.wli.bpm.runtime.JpdContainer$TxnListener@1313
    24d}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=AdminServer+199.8
    1.36.226:7001+oracle1domain+t3+, XAResources={WLStore_oracle1domain_cgJMSStore, WLStore_oracle1domai
    n_WseeFileStore, WLStore_oracle1domain__WLS_AdminServer, weblogic.jdbc.wrapper.JTSXAResourceImpl},No
    nXAResources={})],CoordinatorURL=AdminServer+199.81.36.226:7001+oracle1domain+t3+): weblogic.transac
    tion.RollbackException: Unexpected exception in beforeCompletion: sync=weblogic.ejb.container.intern
    al.TxManager$TxListener@1442c7b
    Error in beforeCompletion
    at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java
    :1782)
    at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.
    java:331)
    at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:227
    at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:463)
    at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:335)
    at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:291)
    at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4060)
    at weblogic.jms.client.JMSSession.execute(JMSSession.java:3953)
    at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:4467)
    at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    .>

    Did you get a solution to this problem ?I am seeing similar exceptions intermittently .
    Thanks,
    Meena.

  • Sql exception when connecting to oracle database

    When trying to connect to an oracle database using the code below i get an sql error. i put the code below it and the stack trace below the code. any help would be great
    Connection connection = null;
            try {
                // Load the JDBC driver
                String driverName = "oracle.jdbc.driver.OracleDriver";
                Class.forName(driverName);
                //  Create a connection to the database
                String serverName = "192.168.0.2";
                String portNumber = "1158";
                String sid = "orcl";
                String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" + sid;
                // String url = "jdbc:oracle:oci:@orcl";
                String username = "system";
                String password = "mmsi";
                connection = DriverManager.getConnection(url, username, password);
            } catch (ClassNotFoundException e) {
                System.out.println("Class Not Found Exception in connection to db");
            } catch (SQLException e) {
                System.out.println("SQL Exception in connecting to Database ");
                e.printStackTrace();
    stackTrace------------------------------------------------------------------------------
    java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    SQL Exception in connecting to Database
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
            at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
    before this.start
    got to doaction
            at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:420)
            at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
            at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
            at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
            at java.sql.DriverManager.getConnection(DriverManager.java:525)
            at java.sql.DriverManager.getConnection(DriverManager.java:171)
            at mmsiserver.conversation.<init>(conversation.java:190)
            at mmsiserver.Server.run(Server.java:105)
    Exception in thread "Thread-0" java.lang.NullPointerException
            at mmsiserver.conversation.doAction(conversation.java:218)
            at mmsiserver.conversation.<init>(conversation.java:202)
            at mmsiserver.Server.run(Server.java:105)Message was edited by:
    pcpitcher1

    Please read this
    http://forum.java.sun.com/thread.jspa?threadID=512566&start=0&tstart=0

  • Update MRP Exception Messages...in Oracle Database

    Hi All,
    I am working on MRP Exception Messages.
    I am using the BAPI_MATERIAL_MRP_LIST for my MRP Messages.
    For the above BAPI The Inputs are 1.Material Number 2. Plant.
    I have the Plant and Material numbers (57,000 i inserted using BAPI_MATERIAL_GETLIST) Tables With Data in my Oracle Database.
    I would like to update the MRP Messages Table in in my Oracle Database.
    My logic is I took the plant numbers and put into the repeater and the same Material too. I am giving linking the both to BAPI inputs,material and Plant. Is it right what I am going?
    Can you give some ideas how to do it.
    Thanks
    R M

    I think this is a duplicate of your other MRP Exception Message.  Please close this one since the other one is receiving all the responses.
    Thanks,
    Mike

  • Getting TXN timeout exception when getting an XA Oracle Database Connection

    Running WLS 8.1 sp5 on Linux in a Cluster (4 servers)
              Using Oracle 10.2.0.2.0 Thin XA driver
              Running Oracle Datbase 9.2.06 or 9.2.07; I think
              I am getting the SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: Transaction rolled back: Transaction timed out after 31 seconds
              It fails at: weblogic.jdbc.jta.DataSource.enlist(Lweblogic/transaction/Transaction;)V(Optimized Method). The exception occurs on all 4 WLS instances at the same time.
              Stack trace at bottom. This problem seems to occur on and off at about the same time. We have not been able to see other jobs that would affect it during this time.
              - Max Pool Size = 25
              - Current and High Connections = 5
              - Num Unavaiable = 0
              - Failure to Reconnect = 0
              - Connection Delay ranges from 57 to 126 milliseconds
              The problem occurs within an MDB. The MDB gets a msg from the JMS queue, fires off an SMTP msg, and tries to update the database and fails due to the timeout on enlisting in the XA transaction.
              Any thoughts on what to look for? Read the info at http://edocs.bea.com/wls/docs81/faq/JTA.html#738205. Is it talking to the Oracle database to enlist. Since occuring on all 4, there is a central place it's failing and I guess the database is a start.
              Thanks. Later...
              - Wayne
              Wed Jan 10 08:30:13 EST 2007: EMS: Exception: EMSSenderDao.mdbChangeMessageQueueStatus() : java.lang.Exception: getMdbDBConnection() : java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: Transaction rolled back: Transaction timed out after 31 seconds
              BEA1-6A0F2B6B5AA26811FBB9
              at weblogic.jdbc.jta.DataSource.enlist(Lweblogic/transaction/Transaction;)V(Optimized Method)
              at weblogic.jdbc.jta.DataSource.getConnection()Ljava/sql/Connection;(Optimized Method)
              at weblogic.jdbc.jta.DataSource.connect(Ljava/lang/String;Ljava/util/Properties;)Ljava/sql/Connection;(Optimized Method)
              at weblogic.jdbc.common.internal.RmiDataSource.getConnection()Ljava/sql/Connection;(Optimized Method)
              at com.foo_company.ems.dao.EMSSenderDao.mdbChangeMessageQueueStatus(ILjava/lang/String;I)I(Optimized Method)
              at com.foo_company.ems.ejb.emsmessageconsumer.EMSMessageConsumerBean.onMessage(Ljavax/jms/Message;)V(Optimized Method)
              at weblogic.ejb20.internal.MDListener.execute(Lweblogic/kernel/ExecuteThread;)V(Optimized Method)
              at weblogic.ejb20.internal.MDListener.transactionalOnMessage(Ljavax/jms/Message;)V(Optimized Method)
              at weblogic.ejb20.internal.MDListener.onMessage(Ljavax/jms/Message;)V(Optimized Method)
              at weblogic.jms.client.JMSSession.onMessage(Ljavax/jms/MessageListener;Lweblogic/jms/common/MessageImpl;)V(Optimized Method)
              at weblogic.jms.client.JMSSession.execute(Lweblogic/kernel/ExecuteThread;)V(Optimized Method)
              at weblogic.kernel.ExecuteThread.execute(Lweblogic/kernel/ExecuteRequest;)V(Optimized Method)
              at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:183)
              at java.lang.Thread.startThreadFromVM(Ljava/lang/Thread;)V(Unknown Source)

    Wayne Lau wrote:
              > Running WLS 8.1 sp5 on Linux in a Cluster (4 servers)
              > Using Oracle 10.2.0.2.0 Thin XA driver
              > Running Oracle Datbase 9.2.06 or 9.2.07; I think
              >
              > I am getting the SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: Transaction rolled back: Transaction timed out after 31 seconds
              >
              > It fails at: weblogic.jdbc.jta.DataSource.enlist(Lweblogic/transaction/Transaction;)V(Optimized Method). The exception occurs on all 4 WLS instances at the same time.
              >
              > Stack trace at bottom. This problem seems to occur on and off at about the same time. We have not been able to see other jobs that would affect it during this time.
              > - Max Pool Size = 25
              > - Current and High Connections = 5
              > - Num Unavaiable = 0
              > - Failure to Reconnect = 0
              > - Connection Delay ranges from 57 to 126 milliseconds
              >
              > The problem occurs within an MDB. The MDB gets a msg from the JMS queue, fires off an SMTP msg, and tries to update the database and fails due to the timeout on enlisting in the XA transaction.
              >
              > Any thoughts on what to look for? Read the info at http://edocs.bea.com/wls/docs81/faq/JTA.html#738205. Is it talking to the Oracle database to enlist. Since occuring on all 4, there is a central place it's failing and I guess the database is a start.
              >
              > Thanks. Later...
              >
              >
              > - Wayne
              Hi. At that moment the issue, whatever it is, has already happened.
              Something in the processing of the transaction to this point has
              already taken longer than you have specified that a transaction
              must complete in. Ideally we'd like to see the JTA/JDBC/2PC debug
              logging turned on, so we have lines with timestamps for every
              step in your tx.
              Joe
              > Wed Jan 10 08:30:13 EST 2007: EMS: Exception: EMSSenderDao.mdbChangeMessageQueueStatus() : java.lang.Exception: getMdbDBConnection() : java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: Transaction rolled back: Transaction timed out after 31 seconds
              > BEA1-6A0F2B6B5AA26811FBB9
              > at weblogic.jdbc.jta.DataSource.enlist(Lweblogic/transaction/Transaction;)V(Optimized Method)
              > at weblogic.jdbc.jta.DataSource.getConnection()Ljava/sql/Connection;(Optimized Method)
              > at weblogic.jdbc.jta.DataSource.connect(Ljava/lang/String;Ljava/util/Properties;)Ljava/sql/Connection;(Optimized Method)
              > at weblogic.jdbc.common.internal.RmiDataSource.getConnection()Ljava/sql/Connection;(Optimized Method)
              > at com.foo_company.ems.dao.EMSSenderDao.mdbChangeMessageQueueStatus(ILjava/lang/String;I)I(Optimized Method)
              > at com.foo_company.ems.ejb.emsmessageconsumer.EMSMessageConsumerBean.onMessage(Ljavax/jms/Message;)V(Optimized Method)
              > at weblogic.ejb20.internal.MDListener.execute(Lweblogic/kernel/ExecuteThread;)V(Optimized Method)
              > at weblogic.ejb20.internal.MDListener.transactionalOnMessage(Ljavax/jms/Message;)V(Optimized Method)
              > at weblogic.ejb20.internal.MDListener.onMessage(Ljavax/jms/Message;)V(Optimized Method)
              > at weblogic.jms.client.JMSSession.onMessage(Ljavax/jms/MessageListener;Lweblogic/jms/common/MessageImpl;)V(Optimized Method)
              > at weblogic.jms.client.JMSSession.execute(Lweblogic/kernel/ExecuteThread;)V(Optimized Method)
              > at weblogic.kernel.ExecuteThread.execute(Lweblogic/kernel/ExecuteRequest;)V(Optimized Method)
              > at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:183)
              > at java.lang.Thread.startThreadFromVM(Ljava/lang/Thread;)V(Unknown Source)

  • Error in CLOB datatype for transfering data from Excel to Oracle database

    Am using excel sheet as source and Oracle as target Database.
    For all tables the operations works smoothly except for tables containing CLOB datatype.
    Initially i have used SQL Developer to transfer some data into excell sheets, now i want to transfer those file's data into another Oracle Database.
    What other options do i have?
    Is excel not the right tool to transfer CLOB datatypes?

    well,
    I couldn't suggest an excel to do it...
    You can go from Oracle to Oracle with the PL/SQL IKM. It works fine.
    Does it help you?

  • Oracle Database 10g relase 1 Installation Problem on RHEL 3 ES

    Dear all
    I'm trying to install oracle database 10g r1 X86_64 on Intel Xeon Machine with EM64T technology with RHEL 3 ES update 2 X86_64 edition. The problem is described below :
    Oracle OUI .runInstaller collapsed with such a following error:
    An unexpected exception has been detected in native code outside the
    VM.
    Unexpected Signal : 11 occurred at PC=0x8077470
    Function=[Unknown.]
    Library=(N/A)
    Is there anyone can help me ??

    Check pushitz website and ensure that you have all the required rpms installed properly.
    Check the log files in the installation directory. That should give some more details as to what exactly is going on.

  • Memory issue in oracle database 11g ...

    Hi All,
    I have installed oracle11gR2 on Linux (CentOS 5.5)... SErver has good amount of HDD - 669G and 16G RAM. I have two database running on this server.
    I am getting out of memory error and end user also complains about dB is very slow... I have configured memory and SGA parameter in both the database and total allocation of memory and SGA maximum size 7.5G. So I assuemd that oracle database used RAM from whatever we configured in memory maximum parameter , in my case I have allocated upto 7.5G but when I run top command I can see almost 16G is in used and only few mbs left...
    can anyone suggest me my assumption about memory allcoation to database is correct or not ? or when I allocated memory to database (using memory max parameter) then why top showing all memory in used. This is database server and no other process is running except oracle.
    Thanks in advance...

    Just enable AMM as below and forget the nitty gritties of setting lots of memory parameters ;-D
    ALTER SYSTEM SET MEMORY_TARGET=6G SCOPE=SPFILE; --select the amount of memory as per your need                                                                                                                                                                                                                                                                                                                                                                                                   

  • Oracle Database upgrade to 11G (Host_Command Issues)

    Sorry I'm posting this again. Original post in Database - Upgrade. I'm not getting a lot of clicks in that category
    We recently upgraded to Oracle 11g (Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production). Our PL/SQL release: (PL/SQL Release 11.2.0.2.0 - Production). We use a lot of host commands inside our PL/SQL stored procedures. One of these included fetching data from an external server and pushing the data into Oracle Tables.
    Most of this process is running fine, except the execution never completes. There is no issue data wise. It's just that the Host_command doesn't receive the completion status and seems to be running even though there's nothing going on in the background.
    The Oracle e-business suite's concurrent program based on this stored proc also never completes, though it doesn't do anything in the background. For testing purpose, our DBA used 2 insert statements one before and one after the host_command. The insert before the host_command worked but not the one after. Please help! This is happening after we upgraded to 11g 3 weeks ago!
    Thanks, Naveen Gagadam.

    Pl do not post duplicates - Upgrade to 11g, Host Command Inside Stored Proc doesn't end.
    I have moved your duplicate post to the EBS forums
    Srini

  • Difference in select for update of - in Oracle Database 10g and 11g

    Hi, I found out that Oracle Database 10g and 11g treat the following PL/SQL block differently (I am using scott schema for convenience):
    DECLARE
      v_ename bonus.ename%TYPE;
    BEGIN
      SELECT b.ename
        INTO v_ename
        FROM bonus b
        JOIN emp e ON b.ename = e.ename
        JOIN dept d ON d.deptno = e.deptno
       WHERE b.ename = 'Scott'
         FOR UPDATE OF b.ename;
    END;
    /While in 10g (10.2) this code ends successfully (well NO_DATA_FOUND exception is raised but that is expected), in 11g (11.2) it raises exception "column ambiguously defined". And that is definitely not expected. It seems like it does not take into account table alias because I found out that when I change the column in FOR UPDATE OF e.empno (also does not work) to e.mgr (which is unique) it starts working. So is this some error in 11g? Any thoughts?
    Edited by: Libor Nenadál on 29.4.2010 21:46
    It seems that my question was answered here - http://stackoverflow.com/questions/2736426/difference-in-select-for-update-of-in-oracle-database-10g-and-11g

    The behaviour seems like it really is a bug and can be avoided using non-ANSI syntax. (It makes me wonder why Oracle maintains two query languages while dumb me thinks that this is just a preprocessor matter and query engine could be the same).

  • Unable to connect to Oracle database running on Windows machine from linux.

    Hi,
    I'm not able to connect to oracle database running on Windows machine from Linux machine. I'm geting the below mentioned error. I have given below the code I used to connect to database and database propertes.Do I need to use any specific driver?
    Please help me.
    Thanks,
    Sunjyoti
    Code :
    import oracle.jdbc.pool.OracleDataSource;
    import java.sql.Connection;
    import java.util.*;
    import java.sql.*;
    import java.io.*;
    class try2{
    public static void main(String args[]) {
    try {
              System.out.println("hi");
    // Load the properties file to get the connection information
    Properties prop = new Properties();
    prop.load(new FileInputStream("/home/sreejith/EDIReader/Connection.properties"));
    // Create a OracleDataSource instance
    OracleDataSource ods = new OracleDataSource();
    System.out.println("prop is "+prop);
    configureDataSource(ods, prop);
    Connection conn=null;
    // Create a connection object
    conn = ods.getConnection();
         System.out.println("Connection is"+conn);
    // Sets the auto-commit property for the connection to be false.
    conn.setAutoCommit(false);
    } catch (SQLException sqlEx){ // Handle SQL Errors
    System.out.println("In exception "+sqlEx);
    } catch(Exception excep) { // Handle other errors
    System.out.println(" Exception "+ excep.toString());
    private static void configureDataSource(OracleDataSource ods, Properties prop) {
    // Database Host Name
    ods.setServerName(prop.getProperty("HostName"));
    // Set the database SID
    ods.setDatabaseName(prop.getProperty("SID"));
    // Set database port
    ods.setPortNumber( new Integer( prop.getProperty("Port") ).intValue());
    // Set the driver type
    ods.setDriverType ("thin");
    // Sets the user name
    ods.setUser(prop.getProperty("UserName"));
    // Sets the password
    ods.setPassword(prop.getProperty("Password"));
    Connection properties :
    # Your Database Connection details
    HostName = 10.20.3.19
    SID = EDIREAD
    Port = 1521
    UserName = dbuser
    Password = dbuser
    Error I'm getting is
    error while trying to connect with odbc datasource
    [root@iflexpau2217 EDIReader]# java try2
    hi
    prop is {HostName=10.20.3.19, Password=dbuser, UserName=dbuser, SID=EDIREAD, Port=1521}
    In exception java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    Also I tried to connect with weblogic JDBC driver
    Code is here:
    import java.io.BufferedReader;
    import java.io.ByteArrayInputStream;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.io.IOException;
    import java.sql.Blob;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.SQLException;
    //import com.entrust.toolkit.util.ByteArray;
    public class trial{
         public static void main(String args[]) throws IOException{
              System.out.println("hi");
              Connection p_conn = null;
              PreparedStatement xml_insert = null;
              try {
         // Load the JDBC driver
                   System.out.println("hi2");
         // String driverName = "oracle.jdbc.driver.OracleDriver";
    String driverName = "weblogic.jdbc.oracle.OracleDriver";
         System.out.println("hi2");
         Class.forName(driverName);
         // Create a connection to the database
         String serverName = "10.20.3.19";
         String portNumber = "1521";
         String sid = "EDIREAD";
         //String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" + sid;
    String url = "jdbc:bea:oracle://10.20.3.19:1521";
         String username = "dbuser";
         String password = "dbuser";
    System.out.println("connection is:"+p_conn+"user name is"+username+"password is"+password);
         p_conn = DriverManager.getConnection(url, username, password);
         System.out.println("connection is:"+p_conn+"user name is"+username+"password is"+password);
              xml_insert=p_conn.prepareStatement("insert into PRTB_SUBUNIT (SUBUNT_ID,SUBUNT_SUB_UNIT,SUBUNT_PHYUNT_ID) values (?,?,?)");
              //InputStream in=null;
              File l_file=new File("/home/sreejith/EDIReader/propertyfiles/inputfile/BUG_10802_ES_CSB19_68.txt");
              BufferedReader input =null;
              input=new BufferedReader(new FileReader(l_file));
              String line = null;
              StringBuffer trial=new StringBuffer();
              while (( line = input.readLine()) != null){
                   trial.append(line);
                   trial.append(System.getProperty("line.separator"));
              //InputStream is = new BufferedInputStream(new FileInputStream(l_file));
              System.out.println(trial.toString());
              //Blob b ;
              //byte[] bytes=trial.toString().getBytes();
              //System.out.println("Size-->"+bytes.length);
              xml_insert.setString(1,new String("SpecailChar"));
              //xml_insert.setBinaryStream(2,new ByteArrayInputStream(bytes),15920);
              xml_insert.setString(3,"SpecailChar");
              xml_insert.executeUpdate();
              p_conn.commit();
              } catch (ClassNotFoundException e) {
                   System.out.println("ClassNotFoundException:"+e.getMessage());
              // Could not find the database driver
              } catch (SQLException e) {
                   System.out.println("SQEXCEPTIN:"+e.getMessage());
              // Could not connect to the database
              }catch (FileNotFoundException e) {
                   System.out.println("filenot found:"+e.getMessage());
              // Could not connect to the database
    Error I'm getting is
    error while trying with jdbc:
    SQEXCEPTIN:[BEA][Oracle JDBC Driver]Error establishing socket to host and port: 10.20.3.19:1521. Reason: Connection refused

    Is the Windows firewall active? Have you enabled the port on the firewall, if it is?

  • How to insert a image file into oracle database

    hi all
    can anyone guide me how to insert a image file into oracle database now
    i have created table using
    create table imagestore(image blob);
    but when inserting i totally lost don't know what to do how to write query to insert image file

    Hi I don't have time to explain really, I did have to do this a while ago though so I will post a code snippet. This is using the commons file upload framework.
    Firstly you need a multi part form data (if you are using a web page). If you are not using a web page ignore this bit.
    out.println("<form name=\"imgFrm\" method=\"post\" enctype=\"multipart/form-data\" action=\"FileUploadServlet?thisPageAction=reloaded\" onSubmit=\"return submitForm();\"><input type=\"FILE\" name=\"imgSource\" size='60' class='smalltext' onKeyPress='return stopUserInput();' onKeyUp='stopUserInput();' onKeyDown='stopUserInput();' onMouseDown='noMouseDown(event);'>");
    out.println("   <input type='submit' name='submit' value='Submit' class='smalltext'>");
    out.println("</form>"); Import this once you have the jar file:
    import org.apache.commons.fileupload.*;Now a method I wrote to upload the file. I am not saying that this is correct, or its the best way to do this. I am just saying it works for me.
    private boolean uploadFile(HttpServletRequest request, HttpSession session) throws Exception {
            boolean result = true;
            String fileName = null;
            byte fileData[] = null;
            String fileUploadError = null;
            String imageType = "";
            String error = "";
            DiskFileUpload fb = new DiskFileUpload();
            List fileItems = fb.parseRequest(request);
            Iterator it = fileItems.iterator();
            while(it.hasNext()){
                FileItem fileItem = (FileItem)it.next();
                if (!fileItem.isFormField()) {
                    fileName = fileItem.getName();
                    fileData = fileItem.get();
                    // Get the imageType from the filename extension
                    if (fileName != null) {
                        int dotPos = fileName.indexOf('.');
                        if (dotPos >= 0 && dotPos != fileName.length()-1) {
                            imageType = fileName.substring(dotPos+1).toLowerCase();
                            if (imageType.equals("jpg")) {
                                imageType = "jpeg";
            String filePath = request.getParameter("FILE_PATH");
            session.setAttribute("filePath", filePath);
            session.setAttribute("fileData", fileData);
            session.setAttribute("fileName", fileName);
            session.setAttribute("imageType", imageType);
            return result;  
         } And now finally the method to actually write the file to the database:
    private int writeImageFile(byte[] fileData, String fileName, String imageType, String mode, Integer signatureIDIn, HttpServletRequest request) throws Exception {
            //If the previous code found a file that can be uploaded then
            //save it into the database via a pstmt
            String sql = "";
            UtilDBquery udbq = getUser(request).connectToDatabase();
            Connection con = null;
            int signatureID = 0;
            PreparedStatement pstmt = null;
            try {
                udbq.setUsePreparedStatements(true);
                con = udbq.getPooledConnection();
                con.setAutoCommit(false);
                if((!mode.equals("U")) || (mode.equals("U") && signatureIDIn == 0)) {
                    sql = "SELECT SEQ_SIGNATURE_ID.nextval FROM DUAL";
                    pstmt = con.prepareStatement(sql);
                    ResultSet rs = pstmt.executeQuery();
                    while(rs.next()) {
                       signatureID = rs.getInt(1);
                    if (fileName != null && imageType != null) {
                        sql = "INSERT INTO T_SIGNATURE (SIGNATURE_ID, SIGNATURE) values (?,?)";
                        InputStream is2 = new ByteArrayInputStream(fileData);
                        pstmt = con.prepareStatement(sql);
                        pstmt.setInt(1, signatureID);
                        pstmt.setBinaryStream(2, is2, (int)(fileData.length));
                        pstmt.executeUpdate();
                        pstmt.close();
                        con.commit();
                        con = null;
                if(mode.equals("U") && signatureIDIn != 0) {
                    signatureID = signatureIDIn.intValue();
                    if (fileName != null && imageType != null) {
                        sql = "UPDATE T_SIGNATURE SET SIGNATURE = ? WHERE SIGNATURE_ID = ?";
                        InputStream is2 = new ByteArrayInputStream(fileData);
                        pstmt = con.prepareStatement(sql);
                        pstmt.setBinaryStream(1, is2, (int)(fileData.length));
                        pstmt.setInt(2, signatureID);
                        pstmt.executeUpdate();
                        pstmt.close();
                        con.commit();
                        con = null;
            } catch (Exception e) {
                con = null;
                throw new Exception(e.toString());
            return signatureID;
       }

  • How-To install SOAP Client Stack in Oracle Database

    Hi,
    1. i wrote a java clientstub that accesses a webservice.
    2. all works fine if i run it from within java.
    3. i then tried to port it to oracle database.
    4. loading the java classes defined in the sample code works fine too.
    5. i then loaded my client (wrapper and client-stub) classes and made pl/sql procedure from the wrapper.
    6. i try to access the webservice
    the problem:
    1. if i made step 5 in SYS-SCHEMA all is ok
    2. if i made step 5 in an other SCHEMA i got an exception in step 6:
    java.lang.NoClassDefFoundError
    the code line is pointing to: m_httpConnection = new OracleSOAPHTTPConnection();
    this is located in the client-stub class constructor
    there exist synonyms of all classes in the public schema.
    is it a problem with priviledges, and if what priviledges are required?
    if this isn't the best way to access webservices from within oracle database, what other solutions are possible?
    if more information are required, please let me know
    thanks
    ralf

    Hi,
    Refer to this document for information on loading SOAP jar files to the database.
    The database schema you are using needs to be granted the following permission to access the external web service
    execute dbms_java.grant_permission('<dbuser>','SYS:java.net.SocketPermission','<host-name>:<port>','connect,resolve');
    where, <host-name> and <port> point to the location where the webservice is running. If you are behind a firewall, use the proxy host and port here.
    For more information on accessing external web service from the database refer to the samples on the Database Web Services Page
    HTH,
    Sujatha
    OTN Group.

Maybe you are looking for