Thread-safety in javax.jdbc.DataSource?

Hi.
I am using Tomcat with an Oracle DB, and using the Oracle DataSource and thin client implementation for my connection pooling. I am wondering if the javax.sql.DataSource class is threadsafe. That is, if I have a DataSource defined for my application in Tomcat's server.xml, and have code...
javax.sql.DataSource ds = null;
javax.naming.Context ctx = null;
java.sql.Connection conn = null;
ctx = new InitialContext();
ds = (DataSource)ctx.lookup("myDataSource");
conn = ds.getConnection();
... if two threads execute this code at the same time, will there be any threading problems? Will ds.getConnection() blowup? Or will two clients get different instances of DataSource that are not inter-dependant? Is this application server specific?
Could someone post a URL to someplace that discusses threading issues in these cases? Thanks.

... if two threads execute this code at the sametime,
will there be any threading problems? Will
ds.getConnection() blowup? Or will two clients
get
different instances of DataSource that are not
inter-dependant? Is this application server
specific?this actually will never happen, because each is
happening in its own context.Huh?
The code runs is a single VM. That means two threads
can access it at the same time.
two threads access it at the same time? what does it stand for? each time you want to have a connection obj from datasource, you would have to get an object that represents the physical databsource first and use this obj to get connections. where is the thread safty issue?
to make sense, maybe the question needs to be rephrased to read: can the physical datasource handle concurrent requests
It has nothing to do with context.when you are getting an object that represents the physical datasource, you would need to do it via jndi after initializing the context, required by the jndi deal.
>
however, i did post a question to all the dbasaround
me like this: if two orcal db users executed anupdate
or insert or delete sql stmt, what will happen? the
answer i got was it will never happen.Again what?
Of course two users can execute two expressions at the
same time. That is an expectation of high
perforamance servers. And it quickly becomes relevent
on multi-cpu boxes.
this is very much like if the physical datasource can handle concurrent requests. can they, oracle and the datasource, handle concurrent requests truthfully? for example, if mary is selecting a value frome a field of table which john happen is about to change. if mary and john execute their sqls exactly at the same time, what will mary see in that field? the new value or the old one?

Similar Messages

  • Install problem olite NoClassDefFoundError: javax/activation/DataSource

    Hello,
    I ran into an installation problem with the Oracle BPEL PM server. Though the installation completed successfully during startup of the server the following error occurs (part of log, complete log follows):
    XXXXXXXXXXXXXXX
    <2004-12-11 16:22:45,959> <ERROR> <default.collaxa.cube> <ServerManager::handleInitException> Error while initializing java class "javax/activation/DataSource".
    Java class "javax/activation/DataSource" cannot be found. Check if class "javax
    /activation/DataSource" package is in your classpath.
    <2004-12-11 16:22:45,959> <ERROR> <default.collaxa.cube> <ServerManager::handleInitException>
    Failed to load OraBPEL Process "default" domain because:
    javax/activation/DataSource
    <ServerManager::loadAllDomains>
    ORABPEL START-UP ERROR!!!!!
    XXXXXXXXXXXXXXXXXXX
    It seems to happen because of the following exception:
    XXXXXXXXXXXXXXXXXXX
    java.lang.NoClassDefFoundError: javax/activation/DataSource
    XXXXXXXXXXXXXXXXXXX
    On another WinXP-System everything is fine.
    I already had a default Oracle Lite Installation on my machine through Mobile Development Kit when installing BPEL PM Server. So I think there is a conflict between the two OLite DB... (Unfortunately I really need the first installation of OLite).
    When I tried to reach the bpel-OLite DB through msql everything is fine. I can address the orapbel schema either with the ODBC-DSN syntax or the syntax which uses the olsv2040 adaptor service.
    I checked ODBC.ini, ODBCinst.ini and polite.ini - they are configured as mentioned in another forum thread.
    The classpath seems to be correct as shown by the log (following). The class javax/activation/DataSource is in orapbel.jar - this archive is in the classpath. Perhaps the signature of the executed method doesn't fit with two concurrent olite DB on the system...
    Does somebody has an idea what's wrong with my configuration?
    I appreciate any suggestion.
    Thank you very much!
    Florian Werner
    University Tuebingen, Germany
    STARTUP LOG OF BPEL SERVER:
    04/12/11 16:22:35 Application default (default) initialized...
    04/12/11 16:22:35 Binding EJB CubeEngineBean to ejb/collaxa/system/CubeEngineBea
    n...
    04/12/11 16:22:35 Binding EJB DispatcherBean to ejb/collaxa/system/DispatcherBea
    n...
    04/12/11 16:22:35 Binding EJB InvokeSenderBean to ejb/collaxa/system/InvokeSende
    rBean...
    04/12/11 16:22:35 Binding EJB ServerBean to ejb/collaxa/system/ServerBean...
    04/12/11 16:22:35 Binding EJB DeliveryBean to ejb/collaxa/system/DeliveryBean...
    04/12/11 16:22:35 Binding EJB MessageBean to ejb/collaxa/system/MessageBean...
    04/12/11 16:22:35 Binding EJB InstanceKeyGenerator to ejb/collaxa/system/Instanc
    eKeyGenerator...
    04/12/11 16:22:35 Binding EJB DomainManagerBean to ejb/collaxa/system/DomainMana
    gerBean...
    04/12/11 16:22:35 Binding EJB FinderBean to ejb/collaxa/system/FinderBean...
    04/12/11 16:22:35 Binding EJB ProcessManagerBean to ejb/collaxa/system/ProcessMa
    nagerBean...
    04/12/11 16:22:35 Binding EJB InstanceManagerBean to ejb/collaxa/system/Instance
    ManagerBean...
    04/12/11 16:22:35 Binding EJB ActivityManagerBean to ejb/collaxa/system/Activity
    ManagerBean...
    04/12/11 16:22:35 Binding EJB ArchiveManagerBean to ejb/collaxa/system/ArchiveMa
    nagerBean...
    04/12/11 16:22:35 Binding EJB PresentationManagerBean to ejb/collaxa/system/Pres
    entationManagerBean...
    04/12/11 16:22:35 Binding EJB TaskManagerBean to ejb/collaxa/system/TaskManagerB
    ean...
    04/12/11 16:22:35 Binding EJB TransactionManagerBean to ejb/collaxa/system/Trans
    actionManagerBean...
    04/12/11 16:22:35 Binding EJB TransactionViewManagerBean to ejb/collaxa/system/T
    ransactionViewManagerBean...
    04/12/11 16:22:35 Binding EJB CubeFinderBean to ejb/collaxa/system/CubeFinderBea
    n...
    04/12/11 16:22:35 Binding EJB TransactionFinderBean to ejb/collaxa/system/Transa
    ctionFinderBean...
    04/12/11 16:22:36 Application orabpel (Collaxa Web Applications) initialized...
    04/12/11 16:22:38 Web-App default:defaultWebApp (0.0.0.0/0.0.0.0:9700/) started.
    04/12/11 16:22:38 Building Global TagLibrary Persistent Cache
    04/12/11 16:22:38 Looking for global resource at C:\orabpel\system\appserver\oc4
    j\j2ee\home\config\..\jsp\lib\taglibDone getting application current resources
    04/12/11 16:22:38 Done initializing cache
    04/12/11 16:22:38 Refreshing global cache - from existing cache ...
    04/12/11 16:22:38 Building Application TagLibrary Persistent Cache for defaultWe
    bApp
    04/12/11 16:22:38 Done getting application current resources
    04/12/11 16:22:38 Done initializing cache
    04/12/11 16:22:38 Refreshing application cache - from existing cache ...
    04/12/11 16:22:38 Found 0 listeners
    04/12/11 16:22:38 Web-App orabpel:admin_war (0.0.0.0/0.0.0.0:9700/BPELAdmin) sta
    rted...
    04/12/11 16:22:38 Building Application TagLibrary Persistent Cache for admin_war
    04/12/11 16:22:38 Done getting application current resources
    04/12/11 16:22:38 Done initializing cache
    04/12/11 16:22:38 Refreshing application cache - from existing cache ...
    04/12/11 16:22:38 Found 0 listeners
    04/12/11 16:22:38 Web-App orabpel:console_war (0.0.0.0/0.0.0.0:9700/BPELConsole)
    started...
    04/12/11 16:22:38 Building Application TagLibrary Persistent Cache for console_w
    ar
    04/12/11 16:22:38 Done getting application current resources
    04/12/11 16:22:38 Done initializing cache
    04/12/11 16:22:38 Refreshing application cache - from existing cache ...
    04/12/11 16:22:38 Found 0 listeners
    04/12/11 16:22:38 Web-App orabpel:startup_war (0.0.0.0/0.0.0.0:9700/orabpel) sta
    rted...
    04/12/11 16:22:38 Building Application TagLibrary Persistent Cache for startup_w
    ar
    04/12/11 16:22:38 Done getting application current resources
    04/12/11 16:22:38 Done initializing cache
    04/12/11 16:22:38 Refreshing application cache - from existing cache ...
    04/12/11 16:22:38 Found 0 listeners
    <ServerManager::__init>
    Oracle BPEL Server version 2.0.10
    Build: 2004.08.26.19.51
    Build time: Thu Aug 26 19:51:38 PDT 2004
    Build type: release
    <ServerDescriptor::validateCompatibility> Detected server descriptor version '2.
    0.1'
    <BaseJDKAdaptor::initAdaptor>
    JVM properties
    Java version: 1.4.2_04, Sun Microsystems Inc.
    Java Home: C:\j2sdk1.4.2_04\jre
    Java VM: Java HotSpot(TM) Client VM 1.4.2_04-b05, Sun Microsystems Inc
    OS-System: Windows XP 5.1, x86
    System Class path: oc4j.jar;C:\orabpel\system\appserver\oc4j\j2ee\home
    \lib/ejb.jar;C:\orabpel\system\appserver\oc4j\j2ee\home\lib/servlet.jar;C:\orabp
    el\system\appserver\oc4j\j2ee\home\lib/ojsp.jar;C:\orabpel\system\appserver\oc4j
    \j2ee\home\lib/jndi.jar;C:\orabpel\system\appserver\oc4j\j2ee\home\lib/jdbc.jar;
    C:\orabpel\system\appserver\oc4j\j2ee\home\iiop.jar;C:\orabpel\system\appserver\
    oc4j\j2ee\home\iiop_gen_bin.jar;C:\orabpel\system\appserver\oc4j\j2ee\home\lib/j
    ms.jar;C:\orabpel\system\appserver\oc4j\j2ee\home\lib/jta.jar;C:\orabpel\system\
    appserver\oc4j\j2ee\home\lib/jmxri.jar;C:\orabpel\system\appserver\oc4j\j2ee\hom
    e\lib/javax77.jar;C:\orabpel\system\appserver\oc4j\j2ee\home\lib/javax88.jar;C:\
    orabpel\system\appserver\oc4j\j2ee\home\../../opmn/lib/ons.jar;C:\orabpel\system
    \appserver\oc4j\j2ee\home\../../opmn/lib/optic.jar;C:\orabpel\system\appserver\o
    c4j\j2ee\home\../../lib/dms.jar;C:\orabpel\system\appserver\oc4j\j2ee\home\../..
    /dms/lib/dms.jar;C:\orabpel\system\appserver\oc4j\j2ee\home\lib/connector.jar;C:
    \orabpel\system\appserver\oc4j\j2ee\home\lib/cos.jar;C:\orabpel\system\appserver
    \oc4j\j2ee\home\lib/jsse.jar;C:\orabpel\system\appserver\oc4j\j2ee\home\../../or
    acle/lib/jsse.jar;C:\orabpel\system\appserver\oc4j\j2ee\home\lib/jnet.jar;C:\ora
    bpel\system\appserver\oc4j\j2ee\home\lib/jcert.jar;C:\orabpel\system\appserver\o
    c4j\j2ee\home\lib/activation.jar;C:\orabpel\system\appserver\oc4j\j2ee\home\lib/
    mail.jar;C:\orabpel\system\appserver\oc4j\j2ee\home\../../javavm/lib/jasper.zip;
    C:\orabpel\system\appserver\oc4j\j2ee\home\../../lib/xmlparserv2.jar;C:\orabpel\
    system\appserver\oc4j\j2ee\home\../../oracle/lib/xmlparserv2.jar;C:\orabpel\syst
    em\appserver\oc4j\j2ee\home\lib/jaxp.jar;C:\orabpel\system\appserver\oc4j\j2ee\h
    ome\lib/jaas.jar;C:\orabpel\system\appserver\oc4j\j2ee\home\jazn.jar;C:\orabpel\
    system\appserver\oc4j\j2ee\home\../../jdbc/lib/classes12dms.jar;C:\orabpel\syste
    m\appserver\oc4j\j2ee\home\../../oracle/jdbc/lib/classes12dms.jar;C:\orabpel\sys
    tem\appserver\oc4j\j2ee\home\../../jdbc/lib/nls_charset12.jar;C:\orabpel\system\
    appserver\oc4j\j2ee\home\../../oracle/jdbc/lib/nls_charset12.jar;C:\orabpel\syst
    em\appserver\oc4j\j2ee\home\jaxb-rt-1.0-ea.jar;C:\orabpel\system\appserver\oc4j\
    j2ee\home\../../soap/lib/soap.jar;C:\orabpel\system\appserver\oc4j\j2ee\home\../
    ../webservices/lib/wsserver.jar;C:\orabpel\system\appserver\oc4j\j2ee\home\../..
    /webservices/lib/wsdl.jar;C:\orabpel\system\appserver\oc4j\j2ee\home\../../rdbms
    /jlib/aqapi.jar;C:\orabpel\system\appserver\oc4j\j2ee\home\lib/jem.jar;C:\orabpe
    l\system\appserver\oc4j\j2ee\home\../../javacache/lib/cache.jar;C:\orabpel\syste
    m\appserver\oc4j\j2ee\home\lib/http_client.jar;C:\orabpel\system\appserver\oc4j\
    j2ee\home\../../jlib/jssl-1_1.jar;C:\orabpel\system\appserver\oc4j\j2ee\home\../
    ../oracle/jlib/jssl-1_1.jar;C:\orabpel\system\appserver\oc4j\j2ee\home\../../jli
    b/repository.jar;C:\orabpel\system\appserver\oc4j\j2ee\home\../../oracle/jlib/re
    pository.jar;C:\orabpel\system\appserver\oc4j\j2ee\home\lib/jaasmodules.jar;C:\o
    rabpel\system\appserver\oc4j\j2ee\home\../../sqlj/lib/runtime12ee.jar;C:\orabpel
    \system\appserver\oc4j\j2ee\home\../../sqlj/lib/translator.jar;C:\orabpel\system
    \appserver\oc4j\j2ee\home\lib/crimson.jar;;C:\orabpel\system\classes;C:\orabpel\
    lib\saxon_7.9.jar;C:\orabpel\lib\orabpel-external.jar;C:\orabpel\lib\orabpel.jar
    ;C:\orabpel\lib\orabpel-common.jar;C:\orabpel\lib\orabpel-ant.jar;C:\j2sdk1.4.2_
    04\lib\tools.jar;C:\orabpel\lib\commons-httpclient-2.0.jar;C:\orabpel\lib\olite4
    0.jar;C:\orabpel\lib\ant_1.5.4.jar;C:\orabpel\lib\xmlparserv2.jar;C:\orabpel\sys
    tem\appserver\oc4j\j2ee\home\applib;C:\orabpel\system\appserver\oc4j\sqlj\lib;C:
    \orabpel\system\appserver\oc4j\rdbms\jlib\xsu12.jar;C:\orabpel\system\appserver\
    oc4j\lib\dsv2.jar;C:\orabpel\system\appserver\oc4j\j2ee\home\jsp\lib\taglib;C:\o
    rabpel\system\appserver\oc4j\j2ee\home\jsp\lib\taglib\jaxen-full.jar;C:\orabpel\
    system\appserver\oc4j\j2ee\home\jsp\lib\taglib\ojsputil.jar;C:\orabpel\system\ap
    pserver\oc4j\j2ee\home\jsp\lib\taglib\saxpath.jar;C:\orabpel\system\appserver\oc
    4j\j2ee\home\jsp\lib\taglib\standard.jar;C:\orabpel\system\appserver\oc4j\j2ee\h
    ome\applications\orabpel_ear\ejb_ob_engine.jar;C:\orabpel\system\appserver\oc4j\
    j2ee\home\application-deployments\orabpel\ejb_ob_engine.jar\deployment.cache;
    <BasePlatformAdaptor::registerShutdownHook> Registered shutdown hook for olite
    <ConnectionFactoryImpl::init> Initialized connection factory jdbc/BPELServerData
    Source
    <ConnectionFactoryImpl::init> Initialized connection factory jdbc/BPELServerData
    Source
    <ServerManager::__init> Detected datasource 'olite'
    <ServerAdaptorManager::init> Initialized adaptors for platform 'oc4j_10g'
    <ServerManager::loadAllDomains> Loading all domains under C:\orabpel\domains
    <DomainDescriptor::validateCompatibility> Detected domain descriptor version '2.
    0.5'
    <2004-12-11 16:22:45,028> <INFO> <default.collaxa.cube> <ServerManager::loadDoma
    in>
    Oracle BPEL Server version 2.0.10
    Build: 2004.08.26.19.51
    Build time: Thu Aug 26 19:51:38 PDT 2004
    Build type: release
    <2004-12-11 16:22:45,138> <INFO> <default.collaxa.cube.engine> <CubeEngine::load
    >
    Initializing BPEL domain from descriptor file
    "C:\orabpel\domains\default\config\domain.xml"
    <ConnectionFactoryImpl::init> Initialized connection factory jdbc/BPELServerData
    Source
    <ConnectionFactoryImpl::init> Initialized connection factory jdbc/BPELServerData
    Source
    <2004-12-11 16:22:45,368> <INFO> <default.collaxa.cube.engine> <BaseDatabaseAdap
    tor::validateCompatibility> Detected database version '2.0.29'
    <2004-12-11 16:22:45,378> <INFO> <default.collaxa.cube.engine> <AdaptorManager::
    init> Initialized adaptors for platform 'oc4j_10g', datasource 'olite'
    <2004-12-11 16:22:45,959> <ERROR> <default.collaxa.cube> <ServerManager::handleI
    nitException> Error while initializing java class "javax/activation/DataSource".
    Java class "javax/activation/DataSource" cannot be found. Check if class "javax
    /activation/DataSource" package is in your classpath.
    <2004-12-11 16:22:45,959> <ERROR> <default.collaxa.cube> <ServerManager::handleI
    nitException>
    Failed to load OraBPEL Process "default" domain because:
    javax/activation/DataSource
    <ServerManager::loadAllDomains>
    ORABPEL START-UP ERROR!!!!!!!!
    OraBPEL run-time system failed to start due to exception:
    Exception not handled by the Collaxa Cube system.
    An unhandled exception has been thrown in the Collaxa Cube system. The exception
    reported is: "java.lang.NoClassDefFoundError: javax/activation/DataSource
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:141)
    at org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory.class$(J
    AFDataHandlerSerializerFactory.java:76)
    at org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory.getSeria
    lizerClass(JAFDataHandlerSerializerFactory.java:85)
    at org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory.<init>(J
    AFDataHandlerSerializerFactory.java:73)
    at org.apache.axis.encoding.DefaultTypeMappingImpl.<init>(DefaultTypeMap
    pingImpl.java:154)
    at org.apache.axis.encoding.DefaultTypeMappingImpl.<init>(DefaultTypeMap
    pingImpl.java:130)
    at org.apache.axis.encoding.DefaultTypeMappingImpl.getSingleton(DefaultT
    ypeMappingImpl.java:124)
    at com.collaxa.cube.engine.deployment.TypeSoapRegistry.registerHeaderTyp
    es(TypeSoapRegistry.java:269)
    at com.collaxa.cube.engine.deployment.TypeSoapRegistry.load(TypeSoapRegi
    stry.java:101)
    at com.collaxa.cube.engine.core.TypeRegistry.load(TypeRegistry.java:121)
    at com.collaxa.cube.engine.CubeEngine.__load(CubeEngine.java:522)
    at com.collaxa.cube.engine.CubeEngine.load(CubeEngine.java:452)
    at com.collaxa.cube.admin.ServerManager.loadDomain(ServerManager.java:91
    9)
    at com.collaxa.cube.admin.ServerManager.loadAllDomains(ServerManager.jav
    a:733)
    at com.collaxa.cube.admin.ServerManager.init(ServerManager.java:92)
    at com.collaxa.cube.beans.ServerBean.init(ServerBean.java:202)
    at IServerBean_StatelessSessionBeanWrapper14.init(IServerBean_StatelessS
    essionBeanWrapper14.java:79)
    at com.collaxa.cube.admin.CXLoaderServlet.init(CXLoaderServlet.java:59)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.
    java:2094)
    at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.
    java:4523)
    at com.evermind.server.http.HttpApplication.initPreloadServlets(HttpAppl
    ication.java:4617)
    at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.
    java:765)
    at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:
    497)
    at com.evermind.server.Application.getHttpApplication(Application.java:8
    86)
    at com.evermind.server.http.HttpServer.getHttpApplication(HttpServer.jav
    a:688)
    at com.evermind.server.http.HttpSite.initApplications(HttpSite.java:570)
    at com.evermind.server.http.HttpSite.setConfig(HttpSite.java:263)
    at com.evermind.server.http.HttpServer.setSites(HttpServer.java:259)
    at com.evermind.server.http.HttpServer.setConfig(HttpServer.java:160)
    at com.evermind.server.ApplicationServer.initializeHttp(ApplicationServe
    r.java:2325)
    at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.jav
    a:1498)
    at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLa
    uncher.java:93)
    at java.lang.Thread.run(Thread.java:534)
    Exception: java.lang.NoClassDefFoundError: javax/activation/DataSource
    Handled As: com.collaxa.cube.engine.EngineInitializationException
    04/12/11 16:22:46 Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)
    initialized

    Hello Erwin,
    thank you for your fast reply.
    I'll try to switch to 9i/10g.
    In migrating perhaps also I will use the Designer as standalone tool on the client and connecting to iAS on another machine where I could integrate the BPEL Engine.
    That means integrating BPEL in our architecture.
    Regards Florian

  • Thread safety! Is this the right way?

    Hello,
    Lately I'm reading lot about thread-safety in Swing...
    so just wondering that is this the right way to code ...
    For ex following code executes(which makes DB connection and load some list) when user press the "connect (JButton)" ....
    private void prepareAndShowConnBox()
            //System.out.println("prep - EDT: " + javax.swing.SwingUtilities.isEventDispatchThread());
            pwd.setEchoChar('*');
            javax.swing.Box box1 = new javax.swing.Box(javax.swing.BoxLayout.Y_AXIS);
            javax.swing.Box box2 = new javax.swing.Box(javax.swing.BoxLayout.Y_AXIS);
            box1.add(new javax.swing.JLabel("DB URL :     "));
            box2.add(db_url);
            box1.add(new javax.swing.JLabel("User Name :  "));
            box2.add(uid);
            box1.add(new javax.swing.JLabel("Password :   "));
            box2.add(pwd);
            final javax.swing.Box box = new javax.swing.Box(javax.swing.BoxLayout.X_AXIS);
            box.add(box1);
            box.add(box2);
            int retval = javax.swing.JOptionPane.showOptionDialog(me, box,
                    "Database Connection:",
                    javax.swing.JOptionPane.OK_CANCEL_OPTION,
                    javax.swing.JOptionPane.QUESTION_MESSAGE,
                    null, null, null);
            if(retval == javax.swing.JOptionPane.OK_OPTION)
                status.setText("Connecting...");
                Thread t = new Thread(makeConn, "Conn Thread");
                t.setPriority(Thread.NORM_PRIORITY);
                t.start();
        }And the makeConn is....
    private Runnable makeConn = new Runnable()
            boolean success;
            Exception x;
            public void run()
                //System.out.println("Con - EDT: " + javax.swing.SwingUtilities.isEventDispatchThread());
                success = true;
                x = null;
                try
                    //load sun JDBC-ODBC bridgr driver...
                    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                    //make connection to DB...
                    con = java.sql.DriverManager.getConnection("jdbc:odbc:" + db_url.getText(),
                            uid.getText(), new String(pwd.getPassword()));
                catch(Exception e)
                    success = false;
                    x = e;
                    System.err.println(x);
                java.awt.EventQueue.invokeLater(GUItask);
            Runnable GUItask = new Runnable()
                public void run()
                    //System.out.println("Con gui - EDT: " + javax.swing.SwingUtilities.isEventDispatchThread());
                    if(success)
                        bConn.setText("Disconnect");
                        status.setText("");
                        status.setIcon(imgLink);
                        imgLink.setImageObserver(status);
                        //load the pic list...
                        Thread t = new Thread(execQuery, "List1 Thread");
                        t.setPriority(Thread.NORM_PRIORITY);
                        t.start();
                    else
                        status.setText("Connection Failed.");
                        showErr(x.toString());
        };Here uid,db_url (JTextField) , pwd (JPasswordField) , status (JLabel) are class fields.
    Thanks for any comments... :)

    Threading looks fine too me... the connection is created on a background thread, but (critically) all GUI updates are performed on the EDT, even if there's an exception. Well done.
    My only comment is... why is your GUI creating a database connection at all? Ideally the controler would get the DAO (which would connect itself) and inject it (the connected DAO) into the view... but I'm a server-side boy, so feel free to ignore me.
    Cheers. Keith.

  • How to create a JDBC datasource thru script/xml?

    Hello All,
    Is there any way to create a JDBC datasource using some script or xml file that
    can be deployed to WLS 7.x?
    This feature is required for our J2EE application installation program.
    rgds
    MS

    Hi
    See this thread for connecting SQL Server
    Re: what is the process to connect to database from webdynpro ?
    For Oracle
    try
    {DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@Oracle_server_ip:Oracle port:SID of the Database","user_name","password");
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery("your query");
    }catch(Exception e){
    see this thread
    Webdynpro and Oracle
    Kind Regards
    Mukesh

  • JNDI lookup() for sql server jdbc datasource returns null

    Hi,
    I am trying to use a jdbc datasource in tomcat 5 to access a sql server 2000 database. I had many common problems and did found an answer to them in the forums but I'm having one last (I hope) problem. My program is also using a mySQL datasource and it works fine.
    The problem is that my lookup returns null. No exception, just null. It seems that many people had this problem but I didn't found any answer to it.
    This is the lookup code:
        Context ctx = new InitialContext();
        Context envCtx = (Context)ctx.lookup("java:comp/env");
        axaptaDS = (DataSource) envCtx.lookup("jdbc/axapta"); //returns null :(This my context.xml config:
    <ResourceParams name="jdbc/axapta">
        <parameter>
          <name>factory</name>
          <value>com.microsoft.jdbcx.sqlserver.SQLServerDataSourceFactory</value>
        </parameter>
        <parameter>
          <name>url</name>
          <value>jdbc:microsoft:sqlserver://hostname:1433</value>
        </parameter>
        <parameter>
          <name>password</name>
          <value>password</value>
        </parameter>
        <parameter>
          <name>maxActive</name>
          <value>4</value>
        </parameter>
        <parameter>
          <name>maxWait</name>
          <value>5000</value>
        </parameter>
        <parameter>
          <name>driverClassName</name>
          <value>com.microsoft.jdbcx.sqlserver.SQLServerDataSource</value>
        </parameter>
        <parameter>
          <name>username</name>
          <value>username</value>
        </parameter>
        <parameter>
          <name>maxIdle</name>
          <value>2</value>
        </parameter>
      </ResourceParams>And I also put these lines in my web.xml file:
    <resource-ref id="ResourceRef_1092254277306">
         <res-ref-name>jdbc/axapta</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
         <res-auth>Container</res-auth>
         <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>Thanks for helping!

    I finally found a remedy to this problem:
    specify this driver instead and remove the entry about the factory in the context's .xml file:
    com.microsoft.jdbc.sqlserver.SQLServerDriver

  • Deployment using JDBC DataSource instead of JDBC URL

    Hello,
    I've noticed some strange behaviour when deploying an ADF application (11g, latest release) to a WLS (integrated or stand-alone), when using JDBC DataSource as a connection type for the application module.
    Normally, when you create your Business Components, a Database Connection is added to the Application Resources panel, eg MyConnection. If you then set your AM to JDBC DataSource instead of JDBC URL, the default datasource would be jdbc/MyConnectionDS. To make the application use the DataSource defined on the WLS, I then uncheck "Auto Generate and Synchronize weblogic-jdbc.xml Descriptors during deployment" in the Application Properties > Deployment tab.
    So far so good: after deployment to the WLS, the application uses the DataSource defined on the WLS server (jdbc/MyConnectionDS). When changing it on the server to another database, the application indeed uses this other database. Also, the following is automatically added to the web.xml during deployment to .ear file:
      <resource-ref>
        <res-ref-name>jdbc/MyConnectionDS</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
      </resource-ref>Now the part that doens't make sense to me: if I delete the password in the Database Connection under Application Resources, I can still deploy the application, but the jdbc/MyConnectionDS on the WLS is not found anymore. While it is still there. I get the following error message:
    Unable to lookup Data Source at context java:comp/env/jdbc/MyConnectionDS
    oracle.jbo.DMLException: JBO-27200: JNDI failure. Unable to lookup Data Source at context java:comp/env/jdbc/MyConnectionDS
    I made the JDev connection (used at development) invalid, and the deployed application stops working (at runtime). While it should just be using the JDBC DataSource defined on the WLS, that is still there. The reason appears to be that when there is no password in the Database Connection in JDev, the entry in the web.xml (see above) is not made during deployment.
    I am doing something wrong? Or is this "expected" behaviour?
    The reason why it bothers me: I have made a reusable component (a Data Control, let's call it A) from a model project, by deploying it to a ADF library JAR. I've set the AM of this project to use a certain jdbc datasource, which will be defined on the WLS.
    When importing the library JAR of A inside another application (B), the connection of the A is added to B. But ofcourse, without the password for security reasons, so we're in the situation described above: When I deploy the new application B, the web.xml is not updated with the DataSource of A, and the application doens't work. And what I would like to avoid, is that whenever someone uses component A, that they have to update the connection details of component A in application B. Because when I fill in the password of application A's Database Connection in application B, all works well again.
    I hope this question makes sense. :-)
    Thanks in advance,
    Chris

    Arun and Krithika,
    Thanks for your replies. I have already done what both of you suggested:
    Chris Schryvers wrote:
    I then uncheck "Auto Generate and Synchronize weblogic-jdbc.xml Descriptors during deployment" in the Application Properties > Deployment tab.I can get it to work, both for deployment on the internal WLS as on a stand-alone WLS.
    My only question is: why does a property at development time (the empty password of the JDev connection) influence the runtime behaviour (the JDBC DataSource not being found after deployment).
    Ofcourse, setting the password for the connection in JDev "solves" the problem. But I want to avoid that everyone who uses the reusable component needs to fill in the password for its database connection. In my opinion, that's the whole point of using a JDBC datasource instead of a JDBC URL: the reusable component just states that there needs to be a jdbc/MyConnectionDS on the server and it can be used as is. Wihtout any modifications at development time.
    What's more:
    Suppose I import the reusable JAR and its connection is added to JDev, without password.
    *) Leaving the password empty: DS not found after deployment (web.xml not adjusted, as mentioned in my original post)
    *) Entering the correct password: DS found, web.xml adjusted at deploy time.
    *) Entering an incorrect password: DS found, web.xml adjusted at deploy time.
    It even works when I enter an incorrect password, which proves that the JDBC DataSource on the server is used, instead of the JDev connection. Then why is the web.xml not adjusted when the password remains empty?
    Arun, I'll check the documention that you linked to, but this just seems like an weird decision in the implementation of JDev/ADF. :-)

  • Connecting locally with BC4J and JDBC DataSource

    I have a BC4J project/module which I'm using as the data access layer for a web application, and that is deployed in 'local' mode on the OC4J server. In the config for the BC4J Module, I'm using the 'JDBC DataSource' connection type. When I deploy to OC4J, the appropriate entries are made in data-sources.xml and things run fine.
    W/in JDev, however, I'd like to be able to use the BC4J Tester and/or some local java classes (ie, run with a main method, outside the context of OC4J) to do some testing as I develop, including accessing the DB via my BC4J module, with the JDBC DataSource connection type. Currently, in order to run outside of the context of OC4J, I need to modify my config to use a connection type of 'JDBC URL' in order to successfully connect via the tester or via a main method driven class. (But then must be sure to change it back to 'JDBC DataSource' prior to redeploying.) If don't do this, and instead try to use the DataSource connection type, I get the errors "oracle.jbo.JboException: JBO-27200: JNDI failure. Unable to lookup Data Source at context jdbc/ADD_OWNER_DEV2DS" and "javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial" (among others)
    It seems pretty clear that I need to somehow/somewhere specify the context factory or such when running in JDev vs under OC4J, or somehow point the IDE to the local OC4J instance as the source of the info, etc?
    When trying to connect from the development environment, I have a local OC4J instance up and running, and I have what I think is an appropriate entry in data-sources.xml (I've tried this in 4 locations - j2ee\home\config, multi\system\oc4j-config, system9.0.3.1035\oc4j-config and as a new Data Sources Descriptor in the project.)
    Is there a way to set things up such that I can use the 'JDBC DataSource' connection type regardless of whether I'm running inside or outside of OC4J?
    Thanks,
    Jim

    Jim,
    You need some jndi implementation to bind(define) the datasource that can be looked up at runtime. Unfortunately, currently the only jndi implementation available in which you can bind datasources comes from oc4j. So you have to run in oc4j for using the datasource as your connection type.
    Dhiraj

  • Question on thread safety with Sevlet action method

    I have an application that runs well but seems to have trouble with multiple users and I suspect that there is some thread safety issue involved.
    It is a Struts application and I have all of my execute methods of the Acton classes are all synchronized which I thought would take care of any cross user issues but it does not seem to have done that.
    The Action classes do have some instance variables which may be the problem as well as possibly a few utility string classes with static methods that are not synchornized. I keep some db connection cached in the session object but this should not be shared between users.
    My question is, with the execute method synchronized how or where could I be getting crosstalk between users (each with their own sessions)?
    I was thinking of packaging my Action class as seperate object with the actual Action class just allocate what I need (messages and locale) and pass them through a freshly instantiated "old action class". That should solve any instance variable cross talk.
    I am assuming that any local variables in the execute method would not have any exposure as they should be thread specific and allocated on the runtime stack for that thread call.
    Am I missing anything important?
    Thanks in advance
    ---John Putnam

         * Creates a new instance of a {@link javax.xml.parsers.DocumentBuilder}
         * using the currently configured parameters.
        public DocumentBuilder newDocumentBuilder()
            throws ParserConfigurationException
            /** Check that if a Schema has been specified that neither of the schema properties have been set. */
            if (grammar != null && attributes != null) {
                if (attributes.containsKey(JAXPConstants.JAXP_SCHEMA_LANGUAGE)) {
                    throw new ParserConfigurationException(
                            SAXMessageFormatter.formatMessage(null,
                            "schema-already-specified", new Object[] {JAXPConstants.JAXP_SCHEMA_LANGUAGE}));
                else if (attributes.containsKey(JAXPConstants.JAXP_SCHEMA_SOURCE)) {
                    throw new ParserConfigurationException(
                            SAXMessageFormatter.formatMessage(null,
                            "schema-already-specified", new Object[] {JAXPConstants.JAXP_SCHEMA_SOURCE}));               
            try {
                return new DocumentBuilderImpl(this, attributes, features, fSecureProcess);
            } catch (SAXException se) {
                // Handles both SAXNotSupportedException, SAXNotRecognizedException
                throw new ParserConfigurationException(se.getMessage());
        }It appears to be thread-safe. The 'attributes' and 'features' instances variables are hashtables, which are synchronized. Unless you are modifying DocumentBuilderFactory itself in another thread (say, changing whether it is namespace aware), I do not see any issues with a simple call to newDocumentBuilder().
    - Saish

  • Whats is JDBC DataSource Factory ??

    What is the biggest different between from JDBC DataSource and JDBC DataSource
    Factory ??
    It says that JDBC DataSource Factory enables the EJB to map a resource factory
    reference in the EJB deployment descriptor. But can't I do the same thing to JDBC
    DataSource ????

    Did you target your datasource when you created it?
    Did you look at the server output log to if that the connection pool and
    data source had any errors in deploying to the target?
    <Muthukumaran Shanmuga> wrote in message
    news:[email protected]..
    I defined a datasource for sybase named let us say "SDS".
    I get error with my test program as follows.
    javax.naming.NameNotFoundException: Unable to resolve 'SDS'. Resolved '';
    remaining name 'SDS'
    How do I troubleshoot this error?
    Is there a way to list names of JNDI datasources for a WLS instance?
    I am sure I created jdbc datasource "SDS" under base_domain via console
    and tested the connection
    My current test program code is as follows.
    Properties prop = new Properties();
    prop.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    prop.put(Context.PROVIDER_URL,
    "t3://localhost:7001");
    System.out.println("DEBUG: create initialConext:start");
    InitialContext ic = new InitialContext(prop);
    System.out.println("DEBUG: create initialConext:end");
    DataSource ds =null;
    System.out.println("DEBUG: looking up datasource:start");
    ds = (DataSource)ic.lookup("SDS");
    System.out.println("DEBUG: looking up datasource:end");
    System.out.println("DEBUG: get Connection:start");
    Connection c = ds.getConnection();
    System.out.println("DEBUG: get Connection:end");
    }catch( Exception ex){
    System.out.println(ex.toString());
    Thanks

  • XSQLServlet and JDBC Datasource

    Hi,
    Is is possible to use connections from a JDBC Datasource
    that is defined in the JNDI context w/ the XSQL servlet, instead of specifying the connection paramters separately in
    the XSQConfig.xml file?
    Would appreciate it if someone would point me in the right direction.
    TIA,
    Vijay

    To specify a data source in a XSQL page:
    1. In the XSQLConfig.xml file set
    <connection-manager>
    <factory>
    oracle.xml.xsql.XSQLDatasourceConnectionManager
    </factory>
    </connection-manager>2. In the oc4j-config/data-sources.xml file set
    <data-source
              class="oracle.jdbc.pool.OracleConnectionPoolDataSource"
              name="OracleDS"
              location="jdbc/DS"
              xa-location="jdbc/xa/OracleXADS"
              ejb-location="jdbc/OracleDS"
              connection-driver="oracle.jdbc.driver.OracleDriver"
              username=""
              password=""
              url="jdbc:oracle:thin:@<host>:<port>:<SID>"
              inactivity-timeout="30"
         />3. In the web.xml of the XSQL page specify resource-ref
    <resource-ref>
      <res-ref-name>jdbc/OracleDS</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
    </resource-ref>3. In the XSQL page specify the data source in the connection attribute of the page tag with
    connection="java:comp/env/jdbc/OracleDS"

  • [WLS 8.1] - AbstractMethodError using javax.sql.DataSource  getConnection()

    [WLS 8.1.3] I'm getting an error while trying to execute the getConnection() method of javax.sql.DataSource.
    The same code, test data, WLS JDBC connection & data source runs fine on HP-UX but when I try to run it on XP, I get an error.(see below) Our code calls the getConnection() method several times and it actually works the first few times in the transaction but then fails after the 5th or 6th call. We're using the weblogic.jdbc.oci.Driver in both HP-UX & XP and the JDBC settings are identical. I've tried the same query in SQLPLUS as what's being used in the prepared statement and it works fine.
    The error message is as follows:
    Transaction BEA1-0002AD72C454EBACDA96 not active anymore. tx status = Marked rollback. [Reason=java.lang.AbstractMethodError: weblogic.xml.schema.binding.BeanCodecBase.getCompositor()Lweblogic/xml/schema/binding/ModelGroupCompositor;]>
    The code snippet that gets the error:
    Context ctx = new InitialContext();
    ds = (javax.sql.DataSource) ctx.lookup ("com.xxxx.yyyy.zzzz");
    conn = ds.getConnection();
    Any ideas what could cause this error?

    I turned JDBC logging on but the only SQLExceptions I could find in the JDBC log where some "java.sql.SQLException: Result set already closed" errors. Not ideal but the db calls actually worked and those errors were not in the same place in the code. I'm looking into why these are occurring but I don't think this is the root problem of the AbstractMethodError as the same SQLException occurs in the JDBC logs on UNIX where the AbstractMethodError is not being thrown. I can include a stack trace of the SQLException if you still think it might help.
    While searching the logs, I found other occurrences of the AbstractMethodError. I also noticed there is a JDK version difference between the WLS 8.1.3 for XP and the one for HP-UX. The XP version has JDK 142_04 and the HP-UX has 142_03.
    Here's a stack trace of the other AbstractMethodError I found from one of the EJB's:
    ####<Oct 6, 2004 6:41:35 AM PDT> <Info> <EJB> <JEAGLEMXP> <lnppiServer> <ExecuteThread: '14' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-00009C0656BCEBACDA96> <BEA-010051> <EJB Exception occurred during invocation from home: com.qwest.lnppi.business.port.PortedTnEjb_rn88fn_HomeImpl@26d560 threw exception: java.lang.AbstractMethodError: weblogic.xml.schema.binding.BeanCodecBase.getCompositor()Lweblogic/xml/schema/binding/ModelGroupCompositor;
    java.lang.AbstractMethodError: weblogic.xml.schema.binding.BeanCodecBase.getCompositor()Lweblogic/xml/schema/binding/ModelGroupCompositor;
         at weblogic.xml.schema.binding.BeanCodecBase.gatherContents(BeanCodecBase.java:299)
         at weblogic.xml.schema.binding.CodecBase.serializeFill(CodecBase.java:285)
         at weblogic.xml.schema.binding.CodecBase.serialize_internal(CodecBase.java:222)
         at weblogic.xml.schema.binding.CodecBase.serialize(CodecBase.java:181)
         at weblogic.xml.schema.binding.RuntimeUtils.invoke_serializer(RuntimeUtils.java:188)
         at weblogic.xml.schema.binding.RuntimeUtils.invoke_serializer(RuntimeUtils.java:174)
         at weblogic.webservice.core.DefaultPart.invokeSerializer(DefaultPart.java:324)
         at weblogic.webservice.core.DefaultPart.toXML(DefaultPart.java:297)
         at weblogic.webservice.core.DefaultMessage.toXML(DefaultMessage.java:645)
         at weblogic.webservice.core.ClientDispatcher.send(ClientDispatcher.java:206)
         at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:143)
         at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:457)
         at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:443)
         at weblogic.webservice.core.rpc.StubImpl._invoke(StubImpl.java:290)
         at com.qwest.lnppi.portedTNservice.PortedTelephoneNumber_Stub.getPortedTelelphoneNumber(Unknown Source)
         at com.qwest.lnppi.business.port.PortedTnBean.portedTnWS(Unknown Source)
         at com.qwest.lnppi.business.port.PortedTnBean.portedTn(Unknown Source)
         at com.qwest.lnppi.business.port.PortedTnEjb_rn88fn_EOImpl.portedTn(PortedTnEjb_rn88fn_EOImpl.java:98)
         at com.qwest.lnppi.business.svc.GetCurrentServiceProviderSwitch.getCurrentServiceProviderSwitch(Unknown Source)
         at com.qwest.lnppi.business.svc.LnppiServiceBean.getPortingOptions(Unknown Source)
         at com.qwest.lnppi.business.svc.LnppiServiceEjb_tk1dpv_EOImpl.getPortingOptions(LnppiServiceEjb_tk1dpv_EOImpl.java:46)
         at com.qwest.lnppi.web.lnppiTester.Tester.CallTheBean(Unknown Source)
         at com.qwest.lnppi.web.lnppiTester.Tester.TestIt(Unknown Source)
         at jsp_servlet.__tester._jspService(__tester.java:157)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:312)
         at com.qwest.lnppi.web.lnppiTester.pgMgr.doTestIt(Unknown Source)
         at com.qwest.lnppi.web.lnppiTester.pgMgr.service(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6452)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3661)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2630)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    >

  • Cannot deploy application because of JDBC datasource target misconfigured

    --- environnement ---
    Weblogic 10.3.2
    Windows 2008 R2
    Sun Java 6
    Hello, I'd like to have your advices on my issue.
    I tried to deploy an application in my weblogic domain but it kept on status deploy running
    My domain is configured as follow
    clusterA and clusterB
    JDBC datasource targets on clusterA and clusterB
    Today we had to rename clusterB to clusterC
    and we cannot start the managed servers (they stayed in ADMIN state) so we tried to redeploy the application but the deployment process'status was deploy running
    After investigating for a very long time, we finaly noticed that our JDBC datasource was misconfigured. After correcting this, the deployement was successfull.
    now I'm wondering how a misconfigured JDBC datasource can prevent a deployement of an ear, maybe the code is requesting something during its deployement but I don't know the application and looking at the stacktrace didn't give me any clue except the hibernate message.
    Thanks in advance for your advices.
    For info here's the stacktrace:
    ####<Apr 13, 2011 5:32:24 PM CEST> <Error> <Deployer> <EQDG1UZSMRTD001> <SmartDispatcherNodeConsole1> <[STANDBY] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1302708744385> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1302708738983' for task '36'. Error is: 'weblogic.management.DeploymentException: '
    weblogic.management.DeploymentException:
         at weblogic.application.internal.BaseDeployment.throwAppException(BaseDeployment.java:157)
         at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:371)
         at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:54)
         at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:207)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:98)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747)
         at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250)
         at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused By: org.hibernate.HibernateException: 'hibernate.dialect' must be set when no Connection avalable
         at org.hibernate.dialect.resolver.DialectFactory.buildDialect(DialectFactory.java:107)
         at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:138)
         at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2119)
         at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2115)
         at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1339)
         at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
         at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
         at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132)
         at weblogic.deployment.PersistenceUnitInfoImpl.createEntityManagerFactory(PersistenceUnitInfoImpl.java:343)
         at weblogic.deployment.PersistenceUnitInfoImpl.createEntityManagerFactory(PersistenceUnitInfoImpl.java:323)
         at weblogic.deployment.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:125)
         at weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(AbstractPersistenceUnitRegistry.java:336)
         at weblogic.deployment.EarPersistenceUnitRegistry.initialize(EarPersistenceUnitRegistry.java:75)
         at weblogic.application.internal.flow.InitJpaFlow.prepare(InitJpaFlow.java:38)
         at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:1221)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
         at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:367)
         at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:54)
         at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:207)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:98)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747)
         at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250)
         at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

    Hello,
    Here is the solution...
    Solution 1:
    Undeploy sap.com/cafUIservicebrowser from SP06 or SP07 before starting upgrade to SP11.
    Solution 2:
    Upgrade to SP08 first and than to SP11.
    The Solution was discussed on NW04s STAB and accepted due to following reasons:
    - There will be not much customers upgrading from SP06 or SP07 to SP11. The most of customers have already upgraded to SP08 and will not be affected by this issue.
    - Unchecking the Web Dynpro check before upgrades from from SP06 or SP07 to SP11 is unacceptable.
    For More info, check the SAP Note 1010640
    Reward points of my reply was useful..

  • What are the thread safety requirements for container implementation?

    I rarely see in the TopLink documentation reference to thread safety requirements and it’s not different for container implementation.
    The default TopLink implementation for:
    - List is Vector
    - Set is HashSet
    - Collection is Vector
    - Map is HashMap
    Half of them are thread safe implementations List/Collection and the other half is not thread safe Set/Map.
    So if I choose my own implementation do I need a thread safe implementation for?
    - List ?
    - Set ?
    - Collection ?
    - Map ?
    Our application is always reading and writing via UOW. So if TopLink synchronize update on client session objects we should be safe with not thread safe implementation for any type; does TopLink synchronize update on client session objects?
    The only thing we are certain is that it is not thread safe to read client session object or read read-only UOW object if they are ever expired or ever refreshed.
    We got stack dump below in an application always reading and writing objects from UOW, so we believe that TopLink doesn’t synchronize correctly when it’s updating the client session objects.
    java.util.ConcurrentModificationException
    at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:449)
    at java.util.AbstractList$Itr.next(AbstractList.java:420)
    at oracle.toplink.internal.queryframework.InterfaceContainerPolicy.next(InterfaceContainerPolicy.java:149)
    at oracle.toplink.internal.queryframework.ContainerPolicy.next(ContainerPolicy.java:460)
    at oracle.toplink.internal.helper.WriteLockManager.traverseRelatedLocks(WriteLockManager.java:140)
    at oracle.toplink.internal.helper.WriteLockManager.acquireLockAndRelatedLocks(WriteLockManager.java:116)
    at oracle.toplink.internal.helper.WriteLockManager.checkAndLockObject(WriteLockManager.java:349)
    at oracle.toplink.internal.helper.WriteLockManager.traverseRelatedLocks(WriteLockManager.java:144)
    at oracle.toplink.internal.helper.WriteLockManager.acquireLockAndRelatedLocks(WriteLockManager.java:116)
    at oracle.toplink.internal.helper.WriteLockManager.checkAndLockObject(WriteLockManager.java:349)
    at oracle.toplink.internal.helper.WriteLockManager.traverseRelatedLocks(WriteLockManager.java:144)
    at oracle.toplink.internal.helper.WriteLockManager.acquireLockAndRelatedLocks(WriteLockManager.java:116)
    at oracle.toplink.internal.helper.WriteLockManager.acquireLocksForClone(WriteLockManager.java:56)
    at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterObject(UnitOfWork.java:756)
    at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterObject(UnitOfWork.java:714)
    at oracle.toplink.internal.sessions.UnitOfWorkIdentityMapAccessor.getAndCloneCacheKeyFromParent(UnitOfWorkIdentityMapAccessor.java:153)
    at oracle.toplink.internal.sessions.UnitOfWorkIdentityMapAccessor.getFromIdentityMap(UnitOfWorkIdentityMapAccessor.java:99)
    at oracle.toplink.internal.sessions.IdentityMapAccessor.getFromIdentityMap(IdentityMapAccessor.java:265)
    at oracle.toplink.publicinterface.UnitOfWork.registerExistingObject(UnitOfWork.java:3543)
    at oracle.toplink.publicinterface.UnitOfWork.registerExistingObject(UnitOfWork.java:3503)
    at oracle.toplink.queryframework.ObjectLevelReadQuery.registerIndividualResult(ObjectLevelReadQuery.java:1812)
    at oracle.toplink.internal.descriptors.ObjectBuilder.buildWorkingCopyCloneNormally(ObjectBuilder.java:455)
    at oracle.toplink.internal.descriptors.ObjectBuilder.buildObjectInUnitOfWork(ObjectBuilder.java:419)
    at oracle.toplink.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:379)
    at oracle.toplink.queryframework.ObjectLevelReadQuery.buildObject(ObjectLevelReadQuery.java:455)
    at oracle.toplink.queryframework.ObjectLevelReadQuery.conformIndividualResult(ObjectLevelReadQuery.java:622)
    at oracle.toplink.queryframework.ReadObjectQuery.conformResult(ReadObjectQuery.java:339)
    at oracle.toplink.queryframework.ReadObjectQuery.registerResultInUnitOfWork(ReadObjectQuery.java:604)
    at oracle.toplink.queryframework.ReadObjectQuery.executeObjectLevelReadQuery(ReadObjectQuery.java:421)
    at oracle.toplink.queryframework.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:811)
    at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:620)
    at oracle.toplink.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:779)
    at oracle.toplink.queryframework.ReadObjectQuery.execute(ReadObjectQuery.java:388)
    at oracle.toplink.queryframework.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:836)
    at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(UnitOfWork.java:2604)
    at oracle.toplink.publicinterface.Session.executeQuery(Session.java:993)
    at oracle.toplink.publicinterface.Session.executeQuery(Session.java:950)

    Hi Lionel,
    As a general rule of thumb, the ATI Rage 128 Pro will not support a 20" LCD. That being said, there are reports of it doing just that (possibly the edition that went into the cube).
    I'm not that familiar with the ins and outs of the Cube, so I can't give you authoritative information on it.
    A good place to start looking for answers is:
    http://cubeowner.com/kbase_2/
    Cheers!
    Karl

  • What is the method of getUserName() for JDBC DataSource in JDeveloper 11g.

    Hi All,
    I am facing a issue about getUserName() Method.
    The below method
      getDBTransaction().getConnectionMetadata().getUserName()
    working fine for JDBC URL While the  same method not working for JDBC DataSource.
    So What is optional method for getUserName() for JDBC DataSource,  I need  JDBC DataSource because in Our Standalone weblogic server we using data source.
    Maroof

    Hi Vohar,
    JNDI is there then how we can get user name you have any idea?
    Our Connection.xml look like below
                                        user                              oraJDBC                              1500                              192.168.0.0                              user1                                       thin                 

  • Vector Replacement in Java 1.4 - Is Thread Safety Needed In This Scenario?

    I have a Java 1.4 application that queries Database # 1, and builds custom strings used to create records that are inserted into Database # 2.
    Right now Vectors are used as a container to temporarily hold query output from Database # 1 while building records going into Database # 2, but I want to convert away from this legacy collection type.
    This application does this with a single "worker" thread that is started and monitored by the application main thread. If the main thread detects any exceptions, i.e. a network or any database problem, the application main thread will stop the single worker thread and restart a new single worker thread.
    There are several instances of this application running simultaneously on the same server but accessing different test databases. When put into the production environment this application will run on a separate server and there will be only 1 instance of the application running.
    I have reviewed numerous forums here and Google results and have not found much specific info that would closely apply to my exact design situation. I did not post any code since this is more of a design question than issue with a specific code snippet.
    My question is: In the scenario I described, does thread safety need to be a factor in choosing a new collection type (to replace Vectors) and in building code that accesses this new collection type?

    The several instances of the application are all independent JVMs and can't interact with each other directly at all. So there's no thread safety issue there and there never was. So what does that leave you? You've got a single worker thread using the Vector? There's no thread safety issue there either. The only time you have to think about thread safety is when two threads are trying to use the same object.

Maybe you are looking for

  • What program to use to repair a hard disk with "serious" issues?

    Norton Disk Doctor that came preloaded on my G3 iBook found some "serious issues" that must be repaired with Disk Doctor on CD-ROM. When I go to Symentec website to order Disk Utility Software on CD-ROM, I find only such utility software avilable for

  • SUN DSEE 6.2 vs Fedora DS 1.1 performance comparison

    Hi all, I've just discovered a nice tool from SUN about performance analysis for ldap servers named SLAMD (http://www.slamd.com) So I configured it and tried to analyze my servers. I've setup one SUN DSEE 6.2 and one Fedora DS 1.1 in my workstation.

  • Download korean characters to file

    Hi, I'm trying to download data which is in Korean into a file. The database character set is AMERICAN_AMERICA.UTF8. I am using the UTL_FILE functions to create the file. I tried converting the text to unicode and creating a unicode file. When I open

  • Transitioning from Bridge to Lightroom

    I have been using Bridge and Photoshop for years, but yesterday installed Lightroom through CC.  I would like to maintain my existing naming convention and file structure for my images.  Does this involve anything other than importing my existing fil

  • Restart of OBIEE components are very slow...

    when i use EM to restart the BI components, the process of restart is quite slow, sometimes will take between 2 to 5 minutes to complete. On OPMN log, I see: reapplication_obips1~OracleBIPresentationServicesComponent~coreapplication_obips1~1 (2049931