[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)
>

Similar Messages

  • Please!  How the hell do I use javax.sql in WSAD?

    I am migrating from VAJ 3.5 to WSAD 4.0. I am getting errors at certain import statements, such as the ones for javax.sql. I noticed that this package is not in WSAD. Is there another package it uses instead? How can I import this package?

    I highly doubt it uses another package. I know the javax.sql package comes with j2se 1.4 but I'm not sure about previous releases. If WSAD is like VAJ you may just need to add the package into the workspace.

  • Setting v$session.program with javax.sql.DataSource unsing JNDI

    I am trying to set v$session's program column while connecting to database.
    It works like charm when i use :
    java.util.Properties params = new java.util.Properties();
    params.put("v$session.program", "MyApp");
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    conn = DriverManager.getConnection("jdbc:oracle:thin:user/[email protected]:1521:myDB",params);
    It just doesn't SET anything when i use, JNDI :
    java.util.Properties params = new java.util.Properties();
    params.put("v$session.program", "MyApp");
    Context ctx = new InitialContext(params);
    DataSource ds = (DataSource)ctx.lookup(datasourceName);
    conn = ds.getConnection(userName,password);
    Just couldn't figure out why its not setting in the 2nd Case. Any ideas ??

    Valid..
    But then, even if i set v$session.program in my JDev environment or even on app server's connection pool Its NOt getting set.
    Am i doing something worng.
    Btw, i am using jdbc thin 10.1.0.3 driver. I read somewhere that this was a bug and its fixed with jdbc thin driver 10.2.x versions.
    Has anyone tried on 10.2.x versions ?

  • Using XQSL w/Datasource : ClassCastException

    I'm attempting to use XSQL in a Websphere 5.1 test server (WSAD) and I am getting this error:
    Oracle XML Developers Kit 10.1.0.2.0 - Production
    XML-25017: Unexpected Error Occurred
    java.lang.ClassCastException: com.ibm.ejs.cm.proxy.OracleCallableStatementProxy
    at oracle.xml.xsql.actions.XSQLRefCursorFunctionHandler.handleAction(XSQLRefCursorFunctionHandler.java:102)
    The datasource in question is setup correctly since it works as implemented in the web app. XSQL appears setup correctly because it works with using XSQLConnectionManagerFactoryImpl and <connectiondefs>, and it also works using a AS400JDBCDriver Datasource with XSQLOracleDatasourceConnectionManager.
    I'm using classes12.jar (and have tried it with the latest 3 versions). I'm using jdbc:oracle:thin with oracle.jdbc.pool.OracleConnectionPoolDataSource.
    Finally, (not sure if this helps) when I decompile XSQLRefCursorFunctionHandler, line 102 appears to bomb here (see below), so I added a "date-format" attribute and value just for funzzies, without change in result:
    if(s1 != null && !s1.equals(""))
    oraclexmlquery.setDateFormat(s1);
    boolean flag1 = s9 != null
    && (s9.equalsIgnoreCase("yes")
    || s9.equalsIgnoreCase("y"));
    I'd would greatly appreciate some help.
    Thanks in advance!
    Monte

    One possible reason is that i am using javax.sql.datasource in the source code but the DataSource has been defined with "com.evermind.sql.DriverManagerDataSource" throwing the classcast exception.
    any idea in which jar the "com.evermind.sql.DriverManagerDataSource" class can be found ?

  • NameNotFound exception by using javax.jts.UserTransaction

    Hello:
              I am working on using jts for the transaction access to a Oracle 7.3
              database.
              In the property file of my application, I used
              weblogic.jdbc.connectionPool.oraclePool=\
              url=jdbc:oracle:thin:@10.10.0.201:1521:orcl,\
              driver=oracle.jdbc.driver.OracleDriver,\
              loginDelaySecs=1,\
              initialCapacity=4,\
              maxCapacity=10,\
              capacityIncrement=2,\
              allowShrinking=true,\
              shrinkPeriodMins=15,\
              refreshMinutes=10,\
              testTable=dual,\
              props=user=joe;password=tiger
              weblogic.allow.reserve.weblogic.jdbc.connectionPool.oraclePool=guest
              weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.jtsPool=oraclePool
              In my servlet, I used
              Context ctx = null;
              Hashtable env = new Hashtable();
              env.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
              env.put(Context.PROVIDER_URL, "t3://127.0.0.1:8080");
              env.put(Context.SECURITY_PRINCIPAL, "system");
              env.put(Context.SECURITY_CREDENTIALS, "Administrator");
              ctx = new InitialContext(env);
              UserTransaction tx = (UserTransaction)
              ctx.lookup("javax.jts.UserTransaction");
              When I access the servlet, the following exception were thrown.
              javax.naming.NameNotFoundException: 'javax.jts.UserTransaction';
              remaining name 'jts.UserTransaction' at
              weblogic.jndi.toolkit.BasicWLContext.resolveName(BasicWLContext.java,
              Compiled Code)at
              weblogic.jndi.toolkit.BasicWLContext.lookup(BasicWLContext.java:133)at
              weblogic.jndi.toolkit.BasicWLContext.lookup(BasicWLContext.java:574)at
              javax.naming.InitialContext.lookup(InitialContext.java:349) at
              jtsdemo.SelectAccessor.accessDatabase(SelectAccessor.java:20)at
              jtsdemo.SelectJTS.doPost(SelectJTS.java:29) at
              jtsdemo.SelectJTS.doGet(SelectJTS.java:12)
              When I open the weblogic console, in directory Naming, I could not find
              javax.jts.UserTransaction entry. However there is weblogic.jdbc.jts
              entry which is generated by the following line, which I put into the
              properties file.
              weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.jtsPool=oraclePool
              Thank you for any thoughts.
              MSU
              [att1.html]
              

    Hello:
              Thank Kumar for a reply.
              I checked the document and able to follow it and use
              javax.sql.DataSource to get a jts connection and select from database.
              In the properties file of the weblogic application server,
              weblogic.jdbc.TXDataSource.jtsOraclePool=oraclePool
              Some questions follow.
              In this way, I could not get a handle to UserTransaction. I am
              wondering in case of database insertion, does this connection
              automatically commit for each execUpdate(), if I do not call
              conn.setAutoCommit(false)?
              If a programmer has to manage the transaction on the Connection,
              what is the advantage to use jts connection pool? Does this performed
              faster or internally it behaves the same?
              Look forward to any insight.
              MSU
              Kumar Allamraju wrote:
              > Michelle,
              >
              > see the correct usage here:
              > http://www.weblogic.com/docs50/classdocs/DataSource.html#998209
              >
              > -Kumar
              >
              > Michelle Sue wrote:
              >
              >> Hello, Kumar:
              >> Thank you for the information given.
              >> Now what I did is
              >> Properties p = new Properties();
              >> p.put(Context.INITIAL_CONTEXT_FACTORY,
              >> "weblogic.jndi.WLInitialContextFactory");
              >> Context ctx = new InitialContext(p);
              >> UserTransaction tx = (UserTransaction)
              >> ctx.lookup("javax.transaction.UserTransaction");
              >> try {
              >> tx.begin();
              >> Driver myDriver = (Driver)
              >> Class.forName("weblogic.jdbc.jts.Driver").newInstance();
              >> Properties props = new Properties();
              >> props.put("connectionPoolID", "oraclePool");
              >> conn = myDriver.connect("jdbc:weblogic:jts", props);
              >> Statement stmt = conn.createStatement();
              >>
              >> The new error is
              >> JTS JDBC Driver being called without a pool name
              >> at
              >> weblogic.jdbcbase.jts.Connection.openConnectionIfNecessary(Connection.java:569)
              >>
              >> at weblogic.jdbcbase.jts.Connection.createStatement
              >>
              >> I guess something wrong with the props.put("connectionPoolID",
              >> "oraclePool");
              >> In the properties file, it seems to me that the only line related to
              >> jts is
              >>
              >> weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.oraclePool=oraclePool
              >> oraclePool was also defined in this properties file as a
              >> weblogic.jdbc.connectionPool
              >>
              >> MSU
              >>
              >>
              >> Kumar Allamraju wrote:
              >>
              >> > Hi Michelle,
              >> >
              >> > The use of javax.jts.UserTransaction is deprecated in EJB 1.1
              >> > The correct package name is javax.transaction.UserTransaction.
              >> >
              >> > Remeber you shouldn't make any t3 connections from the server side
              >> > class.
              >> >
              >> > you can directly say context c = new InitialContext( )
              >> > Pls refer one of our examples directory.
              >> > for e.g weblogic/examples/ejb/basic/beanManaged/Servlet.java
              >> >
              >> > Hope this helps
              >> > -Kumar
              >> >
              >> >
              >> >
              >> > Michelle Sue wrote:
              >> >
              >> >> Hello:
              >> >> I am working on using jts for the transaction access to a
              >> >> Oracle 7.3 database.
              >> >> In the property file of my application, I used
              >> >>
              >> >> weblogic.jdbc.connectionPool.oraclePool=\
              >> >> url=jdbc:oracle:thin:@10.10.0.201:1521:orcl,\
              >> >> driver=oracle.jdbc.driver.OracleDriver,\
              >> >> loginDelaySecs=1,\
              >> >> initialCapacity=4,\
              >> >> maxCapacity=10,\
              >> >> capacityIncrement=2,\
              >> >> allowShrinking=true,\
              >> >> shrinkPeriodMins=15,\
              >> >> refreshMinutes=10,\
              >> >> testTable=dual,\
              >> >> props=user=joe;password=tiger
              >> >>
              >> >> eblogic.allow.reserve.weblogic.jdbc.connectionPool.oraclePool=guest
              >> >>
              >> >> weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.jtsPool=oraclePool
              >> >>
              >> >>
              >> >> In my servlet, I used
              >> >> Context ctx = null;
              >> >> Hashtable env = new Hashtable();
              >> >>
              >> >> env.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
              >> >>
              >> >> env.put(Context.PROVIDER_URL, "t3://127.0.0.1:8080");
              >> >> env.put(Context.SECURITY_PRINCIPAL, "system");
              >> >> env.put(Context.SECURITY_CREDENTIALS, "Administrator");
              >> >> ctx = new InitialContext(env);
              >> >> UserTransaction tx = (UserTransaction)
              >> >> ctx.lookup("javax.jts.UserTransaction");
              >> >>
              >> >> When I access the servlet, the following exception were thrown.
              >> >>
              >> >> javax.naming.NameNotFoundException: 'javax.jts.UserTransaction';
              >> >> remaining name 'jts.UserTransaction' at
              >> >> weblogic.jndi.toolkit.BasicWLContext.resolveName(BasicWLContext.java,
              >> >> Compiled Code)at
              >> >> weblogic.jndi.toolkit.BasicWLContext.lookup(BasicWLContext.java:133)at
              >> >> weblogic.jndi.toolkit.BasicWLContext.lookup(BasicWLContext.java:574)at
              >> >> javax.naming.InitialContext.lookup(InitialContext.java:349) at
              >> >> jtsdemo.SelectAccessor.accessDatabase(SelectAccessor.java:20)at
              >> >> jtsdemo.SelectJTS.doPost(SelectJTS.java:29) at
              >> >> jtsdemo.SelectJTS.doGet(SelectJTS.java:12)
              >> >>
              >> >> When I open the weblogic console, in directory Naming, I could
              >> >> not find javax.jts.UserTransaction entry. However there is
              >> >> weblogic.jdbc.jts entry which is generated by the following line,
              >> >> which I put into the properties file.
              >> >> weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.jtsPool=oraclePool
              >> >>
              >> >> Thank you for any thoughts.
              >> >>
              >> >> MSU
              >> >>
              >> >>
              >> >
              [att1.html]
              

  • Java.sql.SQLException: No suitable driver while using a tomcat DataSource

    Im looking for some directing as I keep getting same error no matter what i've tried
    App Server: localhost (Win 2000 Tomcat 4.0.6)
    MySQL server: 192.168.x.x (Linux version 3.23.49)
    IDE: NetBeans 3.5
    error:
    2003-07-07 11:37:42 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
    javax.servlet.ServletException: class stuff.dao.ContextTester : java.sql.SQLException: No suitable driver
    at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:471)
    at org.apache.jsp.index$jsp._jspService(index$jsp.java:95)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.service(IDEJspServlet.java:173)
    at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.serviceJspFile(IDEJspServlet.java:246)
    at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.service(IDEJspServlet.java:339)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:226)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.netbeans.modules.web.monitor.catalina.MonitorValve.invoke(MonitorValve.java:148)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
    at java.lang.Thread.run(Thread.java:534)
    ----- Root Cause -----
    java.lang.InstantiationException: class stuff.dao.ContextTester : java.sql.SQLException: No suitable driver
    at org.apache.jsp.index$jsp._jspService(index$jsp.java:66)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.service(IDEJspServlet.java:173)
    at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.serviceJspFile(IDEJspServlet.java:246)
    at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.service(IDEJspServlet.java:339)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:226)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.netbeans.modules.web.monitor.catalina.MonitorValve.invoke(MonitorValve.java:148)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
    at java.lang.Thread.run(Thread.java:534)
    web.xml:
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
         <welcome-file>
    index.jsp
    </welcome-file>
    </welcome-file-list>
    <resource-ref>
    <res-ref-name>jdbc/dao</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    server.xml:
    <Context path="" docBase="C:\Documents and Settings\devel\Desktop\stuff Proj">
    <Valve className="org.netbeans.modules.web.monitor.catalina.MonitorValve"/>
    <InstanceListener>org.netbeans.modules.web.monitor.catalina.DispatchListener</InstanceListener>
    <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost__log." suffix=".txt" timestamp="true"/>
    <Resource name="jdbc/dao" auth="Container" type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/dao">
    <parameter>
    <name>url</name>
    <value>jdbc:mysql://192.168.x.x/develop</value>
    </parameter>
    <parameter>
    <name>driverClassName</name>
    <value>com.mysql.jdbc.Driver</value>
    </parameter>
    <parameter>
    <name>username</name>
    <value>webapp</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>password</value>
    </parameter
    </ResourceParams>
    </Context>
    instantiated class:
    package stuff.dao;
    import java.beans.*;
    import java.sql.*;
    import javax.sql.*;
    import javax.naming.*;
    import java.util.*;
    import java.io.*;
    public class ContextTester extends Object implements java.io.Serializable {
    public Connection con = null;
    /** Creates new ContextTester */
    public ContextTester() throws NamingException, SQLException {
    Context init = new InitialContext();
    Context ctx = (Context) init.lookup("java:comp/env");
    DataSource ds = (DataSource) ctx.lookup("jdbc/dao");
    con = ds.getConnection();
    /** get new class ID from database **/
    /* public String getNewID () throws SQLException {
    PreparedStatement qry;
    ResultSet results = null;
    try {
    qry = con.prepareStatement("SELECT MAX(id)FROM role");
    results = qry.executeQuery();
    if (!results.next()) throw new SQLException ("Can not retrieve maximum id");
    return results.getString(1);
    } finally {
    try { results.close(); } catch (Exception ex) {}
    index.jsp:
    <jsp:useBean id="cntxt" class="stuff.dao.ContextTester" scope="page" />
    <html>
    <head><title>JSP Page</title></head>
    <body>
    Hello World!<br>
    This page has worked!!<br>
    </body>
    </html>
    A jar file containing stuff.dao.ContextTester
    and mysql-connector-java-3.0.8-stable-bin.jar
    are in the WEB-INF/lib directory of webapps
    if anybody has any suggestions it would be appreciated!!

    I've never seen an IP address like the one you have in your database URL:
    <value>jdbc:mysql://192.168.x.x/develop</value>
    Are placeholders like that legal? Or did you put them into the note to disguise what machine you were using?
    I've got a Context like this for a JSP-to-Oracle app that I'm using:
    <Resource name="jdbc/Conference"
    auth="Container"
    type="javax.sql.DataSource"/>
    <!-- Oracle 9.2.0.1 data source -->
    <ResourceParams name="jdbc/Conference">
    <parameter>
    <name>factory</name>
    <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
    </parameter>
    <parameter>
    <name>driverClassName</name>
    <value>oracle.jdbc.driver.OracleDriver</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:oracle:thin:@elvis:1521:CAPP</value>
    </parameter>
    <parameter>
    <name>username</name>
    <value>api</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>mod</value>
    </parameter>
    <parameter>
    <name>maxActive</name>
    <value>20</value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>0</value>
    </parameter>
    <parameter>
    <name>maxWait</name>
    <value>60000</value>
    </parameter>
    <parameter>
    <name>removeAbandoned</name>
    <value>true</value>
    </parameter>
    <parameter>
    <name>removeAbandonedTimeout</name>
    <value>300</value>
    </parameter>
    </ResourceParams>
    The JNDI lookup string is "java:comp/env/jdbc/Conference". MOD

  • How do I use a JNDI datasource in my application?

    Not sure how to access the JNDI datasource i setup in my config.xml. I tried to browse it at rmi://localhost:1099/ but it only shows jmxrmi in the tree.
    My config.xml looks like
    <n1:config xsi:schemaLocation="http://www.bea.com/ns/wlevs/config/server wlevs_server_config.xsd" xmlns:n1="http://www.bea.com/ns/wlevs/config/server" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <netio>
        <name>NetIO</name>
        <port>9002</port>
      </netio>
      <work-manager>
        <name>JettyWorkManager</name>
        <min-threads-constraint>5</min-threads-constraint>
        <max-threads-constraint>10</max-threads-constraint>
      </work-manager>
      <jetty>
        <name>JettyServer</name>
        <network-io-name>NetIO</network-io-name>
        <work-manager-name>JettyWorkManager</work-manager-name>
      </jetty>
      <rmi>
        <name>RMI</name>
        <http-service-name>JettyServer</http-service-name>
      </rmi>
      <jndi-context>
        <name>JNDI</name>
      </jndi-context>
      <exported-jndi-context>
        <name>exportedJndi</name>
        <rmi-service-name>RMI</rmi-service-name>
      </exported-jndi-context>
      <jmx>
        <jndi-service-name>JNDI</jndi-service-name>
        <rmi-service-name>RMI</rmi-service-name>
        <rmi-registry-port>1099</rmi-registry-port>
        <rmi-jrmp-port>9999</rmi-jrmp-port>
      </jmx>
      <transaction-manager>
          <name>transactionmanager</name>
          <!--max-resource-requests-on-server>1</max-resource-requests-on-server>
          <max-resource-unavailable-millis>1000</max-resource-unavailable-millis-->
      </transaction-manager>
      <data-source>   
          <name>hqsqlconn</name>   
          <driver-params>     
            <url>jdbc:hsqldb:hsql://localhost/wlevdb</url>
            <driver-name>org.hsqldb.jdbcDriver</driver-name>
            <properties>
              <element>
                <name>user</name>
                <value>sa</value>
              </element>
              <element>
                <name>password</name>
                <value></value>
              </element>
            </properties>
            <use-xa-data-source-interface>true</use-xa-data-source-interface>   
          </driver-params>   
          <connection-pool-params>     
            <initial-capacity>1</initial-capacity>     
            <max-capacity>5</max-capacity>     
            <test-table-name>test_table</test-table-name>   
          </connection-pool-params>   
          <data-source-params>     
            <jndi-names>
              <element>hqsqlconn</element>
            </jndi-names>
            <global-transactions-protocol>TwoPhaseCommit</global-transactions-protocol>
          </data-source-params> 
      </data-source>
    </n1:config>

    I see what you are saying.
    The JNDI approach should work-we will try to reproduce this internally.
    I would recommend leveraging the OSGi service registry, instead of using JNDI, however. The Event Server is a modular server based on OSGi, so one should use the OSGi service registry whenever possible instead of using the jndi registry. Jndi is primarily there to support legacy code that requires Jndi.
    Any data sources that you configure are automatically registered in the OSGi service registry. When there is more than one data source they can be distinguished using their name.
    There are a couple of options.
    If you want to inject a reference to your datasource into a Spring bean, you can use an annotation, @Service, to annotate a setter method on your bean (see my previous post). The container will then inject a reference to the data source into the bean.
    You can also put the following in your spring application context file
    <osgi:reference id="myDataSource"
    interface="javax.sql.DataSource"/>
    This creates a bean proxy that references the datasource by looking up the datasource in the OSGi service registry. It works similarly to JndiObjectFactoryBean, but it uses the OSGi service registry instead of the JNDI registry. You can read more about it here
    http://www.springframework.org/osgi/specification
    (Look in section 3.3)
    Hope that helps.
    Seth
    Edited by swhite at 08/01/2007 6:19 PM

  • ORA-01002: fetch out of sequence using multiple XA datasources

    Hi,
    I have a problem accessing multiple XA datasources :
    - launch an sql request on datasource 1
    - rs.next() on the resultset
    - use the data to launch another sql request on datasource 2
    After 10 iterations, the next() method throws an SQLException (ORA-01002: fetch out of sequence).
    After further investigation, I noticed that :
    - the problem doesn't occur if the same datasource is used for the 2 requests
    - if I set the fetch size to 15 for the first request, the exception is thrown after 15 iterations (but I can't use this as a workaround because the number is potentially above the million).
    Anyone experiencing the same problem ?
    Thanks in advance
    Nicolas
    Here's my configuration :
    - Weblogic 8.1 SP4
    - JDK sun 1.4.2_04 (we have the same problem with various JDKs including JRockit)
    - Oracle 10g
    - Oracle thin driver xa 10.1.0.2.0
    A JSP I use to reproduce the problem :
    <pre><%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
    <%@ page import="java.util.ArrayList,
                        java.sql.Connection,
                        java.sql.PreparedStatement,
                        java.sql.ResultSet,
                        java.sql.SQLException,
                        javax.naming.InitialContext,
                        javax.naming.NamingException,
                        javax.sql.DataSource,
                        javax.transaction.UserTransaction"%>
    <%!
         public void launchTest() throws Exception {
              Connection cnx =null ;
              try {
                   getUserTransaction().begin();
                   // SQL access #1
                   cnx = getConnection("jdbc/xaDatasource1");
                   PreparedStatement stmt = cnx.prepareStatement("SELECT test_col from test_table");
                   ResultSet rs = stmt.executeQuery();
                   // iterate on resulset from SQL 1
                   int i=1;
                   while (rs.next()){ // SQL exception after 10 iterations
                        System.out.println(i + "");
                        i++;
                        // SQL access #2
                        Connection cnx2 = getConnection("jdbc/xaDatasource2");
                        // problem occurs even if we don't request
                        cnx2.close();
                        // end SQL access #2
                   getUserTransaction().commit();
              } catch (Exception e) {
                   e.printStackTrace();
                   try {
                        getUserTransaction().rollback();
                   } catch (Exception e1) {
                        e1.printStackTrace();
                        throw e;
              } finally {
                   try {
                        if (cnx != null && !cnx.isClosed())
                             cnx.close();
                   } catch (Exception e1) {
                        e1.printStackTrace();
         private UserTransaction getUserTransaction() throws NamingException {
              return (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction");
         private Connection getConnection(String jndiName) throws NamingException, SQLException {
              DataSource ds = (DataSource) new InitialContext().lookup(jndiName);
              return ds.getConnection();
    %>
    <%
    launchTest();
         SQL CODE :
         CREATE TABLE TEST_TABLE (     TEST_COL NUMBER(2));
         insert into test_table values(1);
         insert into test_table values(2);
         insert into test_table values(3);
         insert into test_table values(4);
         insert into test_table values(5);
         insert into test_table values(6);
         insert into test_table values(7);
         insert into test_table values(8);
         insert into test_table values(9);
         insert into test_table values(10);
         insert into test_table values(11);
    %>
    </pre>

    Nicolas Mervaillie wrote:
    Hi,
    I have a problem accessing multiple XA datasources :
    - launch an sql request on datasource 1
    - rs.next() on the resultset
    - use the data to launch another sql request on datasource 2
    After 10 iterations, the next() method throws an SQLException (ORA-01002: fetch out of sequence).
    After further investigation, I noticed that :
    - the problem doesn't occur if the same datasource is used for the 2 requests
    - if I set the fetch size to 15 for the first request, the exception is thrown after 15 iterations (but I can't use this as a workaround because the number is potentially above the million).
    Anyone experiencing the same problem ?Hi. This is a known weakness of Oracle. If the XA transactional context of a connection
    changes during a result set processing, even if it is switched back correctly, the result
    set is aborted. If the oracle driver has fetched 10 rows, that's all you get. The next
    call to next() that needs real DBMS communication will fail.
    By spec, an XA connection should be able to be swapped out and enlisted in different
    transactions at a per-call granularity, so our pools allow that by default. Try setting
    the KeepXAConnTillTxCOmplete setting in your pool.
    When a connection is put back in the pool, if it is an XA connection we will suspend
    any user tx, and test it with our own test tx, then re-enlist and re-start the user
    tx in flight. This may be the context switch that kills the oracle result set.
    Joe
    >
    Thanks in advance
    Nicolas
    Here's my configuration :
    - Weblogic 8.1 SP4
    - JDK sun 1.4.2_04 (we have the same problem with various JDKs including JRockit)
    - Oracle 10g
    - Oracle thin driver xa 10.1.0.2.0
    A JSP I use to reproduce the problem :
    <pre><%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
    <%@ page import="java.util.ArrayList,
                        java.sql.Connection,
                        java.sql.PreparedStatement,
                        java.sql.ResultSet,
                        java.sql.SQLException,
                        javax.naming.InitialContext,
                        javax.naming.NamingException,
                        javax.sql.DataSource,
                        javax.transaction.UserTransaction"%>
    <%!
         public void launchTest() throws Exception {
              Connection cnx =null ;
              try {
                   getUserTransaction().begin();
                   // SQL access #1
                   cnx = getConnection("jdbc/xaDatasource1");
                   PreparedStatement stmt = cnx.prepareStatement("SELECT test_col from test_table");
                   ResultSet rs = stmt.executeQuery();
                   // iterate on resulset from SQL 1
                   int i=1;
                   while (rs.next()){ // SQL exception after 10 iterations
                        System.out.println(i + "");
                        i++;
                        // SQL access #2
                        Connection cnx2 = getConnection("jdbc/xaDatasource2");
                        // problem occurs even if we don't request
                        cnx2.close();
                        // end SQL access #2
                   getUserTransaction().commit();
              } catch (Exception e) {
                   e.printStackTrace();
                   try {
                        getUserTransaction().rollback();
                   } catch (Exception e1) {
                        e1.printStackTrace();
                        throw e;
              } finally {
                   try {
                        if (cnx != null && !cnx.isClosed())
                             cnx.close();
                   } catch (Exception e1) {
                        e1.printStackTrace();
         private UserTransaction getUserTransaction() throws NamingException {
              return (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction");
         private Connection getConnection(String jndiName) throws NamingException, SQLException {
              DataSource ds = (DataSource) new InitialContext().lookup(jndiName);
              return ds.getConnection();
    %>
    <%
    launchTest();
         SQL CODE :
         CREATE TABLE TEST_TABLE (     TEST_COL NUMBER(2));
         insert into test_table values(1);
         insert into test_table values(2);
         insert into test_table values(3);
         insert into test_table values(4);
         insert into test_table values(5);
         insert into test_table values(6);
         insert into test_table values(7);
         insert into test_table values(8);
         insert into test_table values(9);
         insert into test_table values(10);
         insert into test_table values(11);
    %>
    </pre>

  • How to make the java.sql.Datasource.setLoginTimeout method work

    I have an EJB that gets a database connection. At the moment, if it can't get a connection, it waits there for 3 minutes, which is unacceptable. I would like to throw an exception or somehow limit the timeout period. When I found this setLoginTimeout method I thought my troubles were over. But no matter what I set it to, it still blocks and waits about 3 minutes.
    I have tried this with MSSQL7 databases, and Sybase databases, using all the inet drivers available and also jConn52 driver (for Sybase). But with no luck (despite inet saying Opta supports this method)
    Is it that no drivers yet support this method? If so, could you point me in the direction of some drivers (MSSQL7 and Sybase Server ) that support this method? Otherwise, could someone tell me what I'm doing wrong? Thanks.
    This is my code, to try to make it timeout in 30 seconds.
    javax.naming.InitialContext ic = new javax.naming.InitialContext();
    javax.sql.DataSource ds = (javax.sql.DataSource)ic.lookup(myDatasourceName);
    ds.setLoginTimeout(30);
    java.sql.Conection newConn newConn = ds.getConnection();
    Thank you for your help.

    Hi,
    I am using Oracle classes12.jar driver to connect to DB. When i use DriverManager.setLoginTimeout(1). But it is not getting timed out. Why?

  • 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?

  • Error  in DataSource.getConnection() !

    Hello to u all,
    I'm trying to make an application that uses database connection pooling and i've followed
    closely the tutorial:
    http://jakarta.apache.org/tomcat/tomcat-4.1-doc/printer/jndi-datasource-examples-howto.html
    The code in the tutorial worked just fine, however, later when i tried to use it in my (servlet)application a get an error in the datasource.getconnection! Here's my code:
    web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <description>MySQL Test App</description>
    <resource-ref>
    <description>DB Connection</description>
    <res-ref-name>jdbc/TestDB</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    <servlet>
    <servlet-name>ServletContactosControllerDB</servlet-name>
    <servlet-class>ServletContactosControllerDB</servlet-class>
    <init-param>
         <param-name>event</param-name>
         <param-value>event</param-value>
         </init-param>
         <init-param>
         <param-name>error_event</param-name>
         <param-value>error</param-value>
         </init-param>
         <init-param>
         <param-name>new_user_event</param-name>
         <param-value>newuser</param-value>
         </init-param>
         <init-param>
         <param-name>dbLookup</param-name>
         <param-value>java:comp/env/jdbc/DBContactos</param-value>
         </init-param>
              <init-param>
         <param-name>login_event</param-name>
         <param-value>login</param-value>
         </init-param>
    </servlet>
    <servlet-mapping>
    <servlet-name>ServletContactosControllerDB</servlet-name>
    <url-pattern>/index.html</url-pattern>
    </servlet-mapping>
    </web-app>
    I know that the configuration in the server.xml is fine because the example in the tutorial worked!!
    so my code in the doPost method in the servlet is:
         Context initCtx = new InitialContext();
    DebugUtility.println("POST 2 ");
    DataSource dataSource = (DataSource)initCtx.lookup("java:comp/env/jdbc/TestDB");
    DebugUtility.println("POST 3 ");
    Connection con = dataSource.getConnection();
                        DebugUtility.println("POST 4");
    it fails in getconnection with the following error:
    Cannot create JDBC driver of class '' for connect URL 'null'
    can anyone figure it out what is happening ? Is my web.xml with a wrong configuration !!
    thx in advance to all of u !

    Finally i have discover the error !!!
    In fact the error reports some irony cause i had said with conviction that
    the error wasn't in the server.xml , but it was :
    <Context path="/contactos_sb" docBase="contactos_sb"
    debug="5" reloadable="true" crossContext="true">
    i was keeping the tutorial path and not my application path so my servlet wasn't able
    to get the class driver and the url !!
    So. it works fine now ! :)�

  • How to update java.sql.Clob using javax.persistence.EntityManager?

    Hello.
    Can anyone tell me (or show me some example) how to update java.sql.Clob using javax.persistence.EntityManager.
    When I’m trying to update column (with type Clob) value is not inserting, after update column is empty. I haven’t any error during update, I’m using database Oracle 10g.
    Edited by: ernest211 on Jul 16, 2009 1:24 AM

    Post some code so we can see how you are doing it. If you are using JPA entities take a look at the @Lob annotation.
    m

  • Where to find package javax.sql

    Hi,
    I am getting the following error when I am trying to use DataSource.
    package javax.sql does not exist
    I have included weblogic.jar in the classpath.
    What else do I need to include?
    Thanks.

    You have to set the WLS environment.Go to BEA_HOME\user_projects\domains\YOUR_DOMAIN
    and then run the command setEnv after that try to compile the java program.It will work.

  • I met an error when connect to oracle db with tag sql:DataSource

    When I use the jstl tag <sql:DataSource> connect to oracle db ,I met an error as :
    javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver"
    My Source code as follow:
    <sql:setDataSource var="dataSource" driver="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@192.168.1.220:1521:gzserver" scope="request" user="lnmisscall" password="lnmcadmin"/>
    <sql:query dataSource="{$dataSource}" var="data">
    I am sure the connection information are right (I can connecte to the db with them in jsp & java bean) , and I have put the oracle's jdbc driver under the tomcat/common/lib folder,
    Please help me to fit it ,thanks.

    Sabrina,
    Its all dependent on the application and whether its 32-bit or 64-bit.  For example, SSRS reporting services 2008 R2 is a 64-bit application, so load the 64-bit oracle client there for report execution.  Report builder is a 32-bit client application,
    assuming its running on a different machine, so load the 32-bit oracle client on any user computers using RB 3.0 and working with Oracle.  If the computers are one in the same, then do as the post above says, load both...

  • What is the diffrence between package javax.sql and java.sql

    Is javax designed for J2EE?
    And when to use package javax?

    Hi,
    What is the diffrence between package javax.sql and java.sql?The JDBC 2.0 & above API is comprised of two packages:
    1.The java.sql package and
    2.The javax.sql package.
    java.sql provides features mostly related to client
    side database functionalities where as the javax.sql
    package, which adds server-side capabilities.
    You automatically get both packages when you download the JavaTM 2 Platform, Standard Edition, Version 1.4 (J2SETM) or the JavaTM 2, Platform Enterprise Edition, Version 1.3 (J2EETM).
    For further information on this please visit our website at http://java.sun.com/j2se/1.3/docs/guide/jdbc/index.html
    Hope this helps.
    Good Luck.
    Gayam.Srinivasa Reddy
    Developer Technical Support
    Sun Micro Systems
    http://www.sun.com/developers/support/

Maybe you are looking for

  • How can I reset my security questions in my apple account because I forgot my answer and I can't make any purchases please anyone help

    I'm am have trouble with my security question I can't remember my answers and it is not allowing me to make any purchases ,Is there a way to reset the security questions ? Please help ;(

  • Lightroom 4.4 Won't Open Up

    Just this week when I try to open LR, it just does not open. No errors and PC just freezes. It WILL open in Safe Mode, just not in normal mode. Then PC just hangs up and I need to hard power off. Anyone having issues like this?

  • Iphone 3G Wi-Fi??

    I have an iphone 3G. I have updated to the latest firmware 4.2.1 and my wifi stopped working I have tried resetting the network connection ..... but that dont work I have tried resetting all settings .... that too does not work I have reset and refor

  • Tabular forms, referencing current row and using checkboxes

    I've searched through the whole forum and read over 50 threads on referencing other columns in a tabular form only to find this impossible. Many of these threads were outdated so I would like to ask it again. Can I use references between columns of t

  • Vision missing files in executable

    Hi, I am using vision software to do some image analysis. I made a project on one computer and built it into an executable. On the computer where it was created, it works fine, but this program is to be used on another computer. The second computer a