Javax.naming.NameNotFoundException of DataSource under heavy load
WL 6.1 sp2, Solaris 2.8, JDK 1.3.1_02
Getting the following error on production under heavy-load server, occurring
infrequently (~1% of request) and irregularly:
javax.naming.NameNotFoundException::Unable to resolve srPoolDS. Resolved:
""; Unresolved:"srPoolDS";
srPoolDS is an oracle pool DataSource, and a BMP ejb is doing the lookup
with a local new InitialContext(). Anyone experienced this before, and know
of a solution?
Gene
You definitely bring up good point. Here my concerns:
1) Even if I don't cache my JNDI lookups, I expect subsequent local lookups
of an already-found object to not fail!
2) If indeed JNDI lookup in 6.1/7.0 is now more expensive than it was in
5.1, shouldn't the local caching be done by a WL proxy to Context? Why give
the onus to the developer?
Gene
"Wenjin Zhang" <[email protected]> wrote in message
news:3cf8f7b1$[email protected]..
>
Is is possible for you to cache the data source after one lookup and onlyto refresh
after some system failure since JNDI lookup is not a cheap process?
"Gene Chuang" <[email protected]> wrote:
WL 6.1 sp2, Solaris 2.8, JDK 1.3.1_02
Getting the following error on production under heavy-load server,
occurring
infrequently (~1% of request) and irregularly:
javax.naming.NameNotFoundException::Unable to resolve srPoolDS. Resolved:
""; Unresolved:"srPoolDS";
srPoolDS is an oracle pool DataSource, and a BMP ejb is doing the lookup
with a local new InitialContext(). Anyone experienced this before, andknow
of a solution?
Gene
Similar Messages
-
Problem with ADF BC 11G and datasource : javax.naming.NameNotFoundException
Hi,
My application works with ADF BC 10G but does not work with ADF BC 11g. In both cases I use the same data source.
My application uses only the BC4J from ADF.
The setting of the datasource in my EAR is only in the web.xml and weblogic.xml, as in 10g version.
What have I forgotten?
Thanks.
## Detail 0 ##
javax.naming.NameNotFoundException: DataSourceContext could not locate a DataSource for the name: jdbc/datasource
at oracle.jbo.server.DataSourceContext.lookup(DataSourceContext.java:109)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at oracle.jbo.server.DBTransactionImpl.lookupDataSource(DBTransactionImpl.java:1404)
at oracle.jbo.server.DBTransactionImpl2.connectToDataSource(DBTransactionImpl2.java:309)
The setting is :
web.xml
<resource-ref>
<description>JDBC connection</description>
<res-ref-name>jdbc/datasource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
weblogic.xml
<weblogic-web-app>
<description>Web Application</description>
<weblogic-version></weblogic-version>
<reference-descriptor>
<resource-description>
<res-ref-name>jdbc/datasource</res-ref-name>
<jndi-name>jdbc/datasource</jndi-name>
</resource-description>
</reference-descriptor>
</weblogic-web-app>
this code finds the datasource :
InitialContext initialContextForDatasource = new InitialContext();
javax.sql.DataSource ds = (javax.sql.DataSource) initialContextForDatasource.lookup("java:comp/env/jdbc/datasource");
There is no error in the logs about data source
Edited by: jdev user on Nov 24, 2010 11:16 AM
Edited by: jdev user on Nov 25, 2010 10:59 AMA change in the problem :
This code finds the datasource :
InitialContext initialContextForDatasource = new InitialContext();
javax.sql.DataSource ds = (javax.sql.DataSource) initialContextForDatasource.lookup("java:comp/env/jdbc/datasource");
There is no error in the log about data source :
<BEA-001124> <Created Connection Pool named DS .>
<BEA-001174> <Creating Data Source named DS , JNDI Name = jdbc/datasource.>
<BEA-001512> <Data Source DS has been successfully created.>
but the applicationModule don't find the data source :
## Detail 0 ##
javax.naming.NameNotFoundException: DataSourceContext could not locate a DataSource for the name: jdbc/datasource
at oracle.jbo.server.DataSourceContext.lookup(DataSourceContext.java:109)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at oracle.jbo.server.DBTransactionImpl.lookupDataSource(DBTransactionImpl.java:1404)
at oracle.jbo.server.DBTransactionImpl2.connectToDataSource(DBTransactionImpl2.java:309)
at oracle.jbo.server.DBTransactionImpl2.connectToDataSource(DBTransactionImpl2.java:329)
Edited by: jdev user on Nov 25, 2010 1:40 PM -
Javax.naming.NameNotFoundException while trying to lookup for the Datasourc
I get following exception when the datasource is looked up after redeployment.
javax.naming.NameNotFoundException: Unable to resolve 'jdbc.oracleDS' Resolved: '' Unresolved:'jdbc' ; remaining name 'jdbc.oracleDS'
But after redeployment if I restart the application server, this problem gets resolved automatically and I am able to get the connection.
So is there any specific configuration, so that I can access the Database connections without restarting the servers after re-deployment?
Connection Pool and DataSource are targetted to a Cluster.
Please let me know if there is any solution for this.
Thanks in advance !there are multiple option of creating data source.which one i should use.
should i use generic one. what is URL information for oracle xe client.what is driver name? -
Javax.naming.NameNotFoundException: error in whil calling EJB Bean
Dear friends,
I have created (Bean Managed Entity) a remote,home and bean objects for adding a country in a database. When i convert
into jar and and deploy means, its working fine. But if i put into a package means it does work
and raise "javax.naming.NameNotFoundException" error.
i keep my files as following folder structure
d:\siva\projects\ShopCart\
(under this )
CountryMas.java
CountryHome.java
CountryBean.java
CountryMasPK.java
<meta-inf>
ejb-jar.xml
weblogic-ejb-jar.xml
and deployed in weblogic 6.1 using console.
i have copied the source code here with
Remote interface
package ShopCart;
import javax.ejb.*;
import javax.rmi.*;
public interface CountryMas extends EJBObject {
Home Interface
package ShopCart;
import javax.ejb.*;
import java.rmi.*;
public interface CountryHome extends EJBHome {
public CountryMas create(String Cname) throws CreateException,RemoteException;
public CountryMas findByPrimaryKey(CountryMasPK pk) throws
FinderException,RemoteException;
BEAN OBJECT
package ShopCart;
import java.io.*;
import java.util.*;
import java.sql.*;
import javax.sql.*;
import javax.ejb.*;
import javax.naming.*;
public class CountryBean implements EntityBean {
private EntityContext ctx;
private int CountryId;
private String CountryName;
public void setEntityContext(EntityContext ctx){
this.ctx = ctx;
public void unsetEntityContext(){
this.ctx = null;
public void ejbActivate(){
public void ejbPassivate(){
public void ejbLoad(){
public void ejbStore(){
public void ejbRemove(){
Connection con = null;
PreparedStatement ps = null ;
try {
con = getConnection();
ps = con.prepareStatement("Delete from CountryMas where id=?");
ps.setInt(1,CountryId);
if (ps.executeUpdate() !=1) {
String Error = "JDBC did not create any row";
throw new CreateException (Error);
}catch (Exception e){
System.out.println (e);
public CountryMasPK ejbCreate(String Cname) throws CreateException {
this.CountryName =Cname;
Connection con = null;
PreparedStatement ps = null ;
try {
con = getConnection();
ps = con.prepareStatement("insert into CountryMas values(?)");
ps.setString (1,CountryName);
if (ps.executeUpdate() !=1) {
String Error = "JDBC did not delete any row";
throw new CreateException (Error);
con.commit();
}catch (Exception e){
System.out.println (e);
int PKid=0;
ResultSet rs;
PreparedStatement ps1 = null;
try {
ps1 = con.prepareStatement("select max(id) as Mid from CountryMas");
rs = ps1.executeQuery();
PKid = rs.getInt("mid");
}catch(Exception e){
System.out.println (e);
return new CountryMasPK(PKid);
public void ejbPostCreate(String Cname) throws CreateException {
private Connection getConnection()throws SQLException {
InitialContext initCtx = null;
DataSource ds = null;
try{
initCtx = new InitialContext ();
ds = (javax.sql.DataSource)
initCtx.lookup("java:comp/env/jdbc/ShopCartPool");
}catch(Exception e){
System.out.println(e);
return ds.getConnection();
public CountryMasPK ejbFindByPrimaryKey(CountryMasPK pk)throws ObjectNotFoundException {
Connection con= null;
PreparedStatement ps = null ;
try{
con = getConnection();
ps = con.prepareStatement("select cname from CountryMas where id=?");
ps.setInt(1,pk.ID);
ps.executeQuery();
ResultSet rs= ps.getResultSet();
if (rs.next()){
this.CountryName = rs.getString(1);
}catch(Exception e){
System.out.println(e);
//return new CountryMasPK(pk.i);
return pk;
PRIMARY KEY OBJECT
package ShopCart;
import java.io.Serializable;
public class CountryMasPK implements java.io.Serializable {
public int ID;
public CountryMasPK(int ID){
this.ID =ID;
public CountryMasPK(){
public CountryMasPK(CountryMasPK pk){
this.ID = pk.ID;
public String toString(){
return new Integer(ID).toString();
public int hashCode(){
return new Integer(ID).hashCode();
public boolean equals(Object countrymas){
//return ((CountryMasPK)countrymas).ID.equals(ID);
return true;
EJB-JAR.XML
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC
'-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN'
'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>ShopCart</ejb-name>
<home>ShopCart.CountryHome</home>
<remote>ShopCart.CountryMas</remote>
<ejb-class>ShopCart.CountryBean</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>ShopCart.CountryMasPK</prim-key-class>
<reentrant>False</reentrant>
<resource-ref>
<res-ref-name>jdbc/ShopCartPool</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>ShopCart</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
WEBLOGIC-EJB-JAR.XML
<?xml version="1.0"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC
'-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN'
'http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd'>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>ShopCart</ejb-name>
<reference-descriptor>
<resource-description>
<res-ref-name>jdbc/ShopCartPool</res-ref-name>
<jndi-name>ShopCartDataSource</jndi-name>
</resource-description>
</reference-descriptor>
<jndi-name>Country</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
i converted jar file like this
d:\siva\projects\> set claapath=%classpath%;.;
cd d:\siva\projects\ShopCart > javac *.java
cd d:\siva\projects\ShopCart > jar -cvf Sh.jar *
cd..
d:\siva\projects> java weblogic.ejbc ShopCart\Sh.jar ShopCart\Shop.jar
and deployed using weblogic 6.1 console
and client code as follows
Client.java
import java.io.*;
import javax.naming.*;
import javax.ejb.*;
import javax.rmi.*;
import java.util.*;
import ShopCart.*;
class Client {
public static void main(String args[]){
Context ctx=null;
try{
Properties pr = new Properties();
pr.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
pr.put(Context.PROVIDER_URL,"t3://localhost:7001");
ctx= new InitialContext(pr);
Object obj = ctx.lookup("Country");
CountryHome cm = (CountryHome)
javax.rmi.PortableRemoteObject.narrow(obj,CountryHome.class);
cm.create(args[0]);
System.out.println ("Creating Country " + args[0] +" ..... [Done]");
}catch (Exception e){
System.out.println(e);
when i run this file it raise the error
D:\Siva\Projects>java Client.java
Exception in thread "main" java.lang.NoClassDefFoundError: Client/java
D:\Siva\Projects>java Client
javax.naming.NameNotFoundException: Unable to resolve Country. Resolved: '' Unre
solved:'Country' ; remaining name ''
D:\Siva\Projects>
This is the error message. Please observe it and do let me know what would be the error. There
would be small configuration error. But i couldn't locate it . plz help me somebody.
Thanx & Regards,
Siva.you need to use the name java:comp/env/Country in the client.
and the client deployment descriptor will need an ejb-ref entry:
<ejb-ref>
<ejb-ref-name>
Country
</ejb-ref-name>
<ejb-ref-type>
Session
</ejb-ref-type>
<home>
ShopCart.CountryHome
</home>
<remote>
ShopCart.CountryMas
</remote>
</ejb-ref>toby -
Struts javax.naming.NameNotFoundException: name not found
Hi.
I'm developing a my first struts web application an I'm getting: javax.naming.NameNotFoundException: control_seguros not found
This is my META -INF/context.xml
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/control_seguros">
<Resource auth="Container" driverClassName="org.postgresql.Driver" name="jdbc/control_seguros" password="seguros" type="javax.sql.DataSource" url="jdbc:postgresql://localhost/control_seguros" username="seguros"/>
</Context>
web.xml
<resource-ref>
<description>Conexión Base de Datos</description>
<res-ref-name>jdbc/control_seguros</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
action code
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
// Look up our data source
DataSource ds = (DataSource) envCtx.lookup("jdbc/control_seguros");
// Allocate and use a connection from the pool
Connection conn = ds.getConnection();
conn.close();
How can i solve this? I'm using Glassfish v3 prelude. One more thing: i'm not sure if it's relevant, but i create meta-inf folder and content.xml manually. I'd like to know how the application determinates that the database connection settings are in this xml.1. To use local interfaces in Glassfish your client & bean must be in same EAR or EJB module.
2. @Sateless(name=) it's only the name of bean and in fact the bean interface is stored under different name then processPayment, it can be something like
packege.className.
3. I assume that you can't use EJB annotation is servlet.
4. If indeed you need to use lookup, you need perform following steps (only in Glassfish context).
a) if you are in same EAR as servlet use in web.xml resource ref like in following eg.
<ejb-local-ref>
<ejb-ref-name>Custom name, this name you will use in WAR</ejb-ref-name> <!---->
<ejb-ref-type>Session</ejb-ref-type>
<local-home/> <!-- Beans are homeles ->
<local>eu.softper.aleksandra.ewidencje.book.BookLocal</local> <!-- Your's bean local interface -->
<ejb-link>Your bean name - here</ejb-link>
</ejb-local-ref>b)if outside EAR you need to use server specific deployment, if server allows to pass local ref outside application. Glassfish does not. -
Javax.naming.NameNotFoundException: jdbc not bound
Hi !
I've a application deployed with JBoss 4.0.2 Solaris 2.8, I've create a Oracle DS, when I try to read data from a database throw DS works fine, but when I try to insert, delete or update records from database the jboss show the next error.
2005-09-07 09:17:55,662 ERROR [org.jboss.ejb.plugins.LogInterceptor] Transaction
RolledbackLocalException in method: public abstract int com.soluzionasf.arqw10.g
c.cmp.OracleSequenceSessionLocal.getNextSequenceNumber(java.lang.String) throws
javax.ejb.FinderException, causedBy:
javax.naming.NameNotFoundException: jdbc not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:491)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:499)
at org.jnp.server.NamingServer.getObject(NamingServer.java:505)
at org.jnp.server.NamingServer.lookup(NamingServer.java:249)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:610)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at com.soluzionasf.arqw10.gc.cmp.OracleSequenceSessionBean.getConnection
(OracleSequenceSessionBean.java:76)
at com.soluzionasf.arqw10.gc.cmp.OracleSequenceSessionBean.getNextSequen
ceNumber(OracleSequenceSessionBean.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(S
tatelessSessionContainer.java:214)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
ke(CachedConnectionInterceptor.java:185)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(Stat
elessSessionInstanceInterceptor.java:130)
at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(Service
EndpointInterceptor.java:51)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidation
Interceptor.java:48)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
rceptor.java:105)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
torCMT.java:335)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:1
66)
This is my DS definition
<?xml version="1.0" encoding="UTF-8"?>
<local-tx-datasource>
<jndi-name>jdbc/OracleDS</jndi-name>
<connection-url>jdbc:oracle:thin:@10.98.10.42:1532:orcl28</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>evo_adminis</user-name>
evo_adminis1
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<type-mapping>Oracle9i</type-mapping>
</local-tx-datasource>
Who knows the solutions for my problem
Thanks for advanceCould be that your EJB is connected to a wrong datasource called only "jdbc"?
Strangely you say that while reading data all works fine (so the datasource definition is ok) but only when writing data there is a NamingException.
The stacktrace seems to report an error while getting datasource reference inside com.soluzionasf.arqw10.gc.cmp.OracleSequenceSessionLocal.getNextSequenceNumber method, the problems seems to be a bad name resource name ("jdbc" instead of java:jdbc/OracleDS or java:comp/env/jdbc/OracleDS if you use resource reference in your web.xml file). If you created this class as a CMP perhaps you misstype the right datasource name, otherwise if you code this method by yourseft you misstype the naming reference. -
Hi
I have developed a search servlet and deployed it in tomcat 4.0.3 and connected to mysql database through jdbc by specifying jndi.
I have coded JNDI lokkup name as "java:comp/env/jdbc/KgoogleDB"
I have added a context in server.xml file of tomcat for DBCP connection pooling .I have tested this in windows and it is running well in it.
But when i hosted this in linux i got error like this
INIT OF SEARCH SERVLET
Error in file reading Connection refused
File Not Found
javax.naming.NameNotFoundException: Name java:comp is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:811)
at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
at javax.naming.InitialContext.lookup(InitialContext.java:354)
at DbConnect.getConnection(DbConnect.java:35)
at QueryDetails.Query(QueryDetails.java:32)
at Search.doPost(Search.java:66)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:446)
at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:216)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
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 filters.ExampleFilter.doFilter(ExampleFilter.java:149)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
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.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
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:2343)
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.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.warp.WarpRequestHandler.handle(WarpRequestHandler.java:217)
at org.apache.catalina.connector.warp.WarpConnection.run(WarpConnection.java:194)
at java.lang.Thread.run(Thread.java:536)
Connection ID null
Entered FINALLY
=================================
What would be the cause of this error?.Please help me.
My server.xml context is
- <Host className="org.apache.catalina.connector.warp.WarpHost" name="www.keralagoogle.com" debug="0" appBase="/domains/www.yy.com/tomcat/webapps" unpackWARs="true">
- <Context path="/yyjava" docBase="/domains/www.yy.com/tomcat/webapps/yyjava" debug="0" reloadable="true" crossContext="true">
<Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_KgoogleDB." suffix=".txt" timestamp="true" />
<Resource name="jdbc/KgoogleDB" auth="Container" type="javax.sql.DataSource" />
- <ResourceParams name="jdbc/KgoogleDB">
- <parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
- <!--
Maximum number of dB connections in pool. Make sure you
configure your mysqld max_connections large enough to handle
all of your db connections. Set to 0 for no limit.
-->
- <parameter>
<name>maxActive</name>
<value>500</value>
</parameter>
- <!--
Maximum number of idle dB connections to retain in pool.
Set to 0 for no limit.
-->
- <parameter>
<name>maxIdle</name>
<value>300</value>
</parameter>
- <!--
Maximum time to wait for a dB connection to become available
in ms, in this example 10 seconds. An Exception is thrown if
this timeout is exceeded. Set to -1 to wait indefinitely.
-->
- <parameter>
<name>maxWait</name>
<value>12000</value>
</parameter>
- <!-- MySQL dB username and password for dB connections
-->
- <parameter>
<name>username</name>
<value>pratap</value>
</parameter>
- <parameter>
<name>password</name>
<value>ky67yumXg</value>
</parameter>
- <!-- Class name for mm.mysql JDBC driver
-->
- <parameter>
<name>driverClassName</name>
<value>com.mysql.jdbc.Driver</value>
</parameter>
- <!--
The JDBC connection url for connecting to your MySQL dB.
The autoReconnect=true argument to the url makes sure that the
mm.mysql JDBC Driver will automatically reconnect if mysqld closed the
connection. mysqld by default closes idle connections after 8 hours.
-->
- <parameter>
<name>url</name>
<value>jdbc:mysql://localhost:3306/kgoogle?</value>
</parameter>
</ResourceParams>
</Context>
==============================
Please help me find if i have to change the syntax for linux in the above code.
Thanks in Advance
Prathaphi
Thanks for your advise.
But when i chenged my web.xml and jndi name in my servlet file i got error like this
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:811)
at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:183)
at javax.naming.InitialContext.lookup(InitialContext.java:354)
at DbConnect.getConnection(DbConnect.java:35)
at QueryDetails.Query(QueryDetails.java:32)
at Search.doPost(Search.java:66)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServl
et.java:446)
at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.jav
a:216)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:193)
at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:193)
at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:566)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:475)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:564)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve
.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
2343)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
rValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava: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.jav
a:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcesso
r.java:1012)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.ja
va:1107)
at java.lang.Thread.run(Thread.java:536)
Connection ID null
Entered FINALLY
Please help me
Thanks in Advance
Prathap -
JNDI lookup from OC4J to weblogic throws javax.naming.NameNotFoundException
Hi All,
We have the below setup in our production environment.
EJB application is deployed in the Weblogic 10.3.4.0 Server on Sun Solaris. The EJB version is 3.0
OC4J 10.2.0 is running on another Sun Solaris machine.
There are 2 webservice applications WEBSERV1 & TestSoapEJB running on this OC4J container.
We need to do lookup the EJBs deployed on the Weblogic server. For this we used the below logic in the web service's Stateless session bean:
String weblogicURL = "";
Properties props = new Properties();
try
props.load(Thread.currentThread().getContextClassLoader().getResourceAsStream("wl.properties"));
weblogicURL = props.getProperty("weblogicURL");
catch (FileNotFoundException e)
e.printStackTrace();
catch (IOException e)
e.printStackTrace();
Context ctx = null;
Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
ht.put(Context.SECURITY_PRINCIPAL,"weblogic");
ht.put(Context.SECURITY_CREDENTIALS,"weblogic654");
ht.put(Context.PROVIDER_URL, weblogicURL);
ctx = NamingManager.getInitialContext(ht) ;
// tried using //ctx = new InitialContext(ht); same behavior.
TestEJB.AdministratorEJB ejb = (TestEJB.AdministratorEJB) ctx.lookup("TestEJB#TestEJB.AdministratorEJB");
ctx.close();
When we first test first WEBSER1, the lookup is fine.
But when we test the second webservice WEBSER2, the webservice name itself not able to lookup: It gives the below error:
javax.naming.NameNotFoundException: remaining name: env/TestSoapEJB
Below is the stack throws thrown on browser:
500 Internal Server Error
javax.naming.NameNotFoundException: remaining name: env/TestSoapEJB
at weblogic.j2eeclient.SimpleContext.resolve(SimpleContext.java:35)
at weblogic.j2eeclient.SimpleContext.resolve(SimpleContext.java:39)
at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:59)
at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:59)
at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:64)
at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)
at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at oracle.j2ee.ws.SessionBeanRpcWebService.init(SessionBeanRpcWebService.java:65)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpApplication.loadServlet(HttpApplication.java:2354)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpApplication.findServlet(HttpApplication.java:4795)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpApplication.getRequestDispatcher(HttpApplication.java:2821)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:680)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:662)
It seems that, the OC4J is looking in Weblogic context. But it should be looking in its own context. How to resolve this issue.
The same case happens if i restart the OC4J and first test the TestSoapEJB the lookup is fine . But if i test the WEBSERV1 , it throws the same error as above. In short, if one of the webservices lookup is working fine, the other webservice is not working. At the same time only one webservice's lookup is working.
Kindly help me to resolve this issue.
regards,
Zia
Edited by: PT Expert on Sep 9, 2012 3:16 AMI work now more that two days on this error!!!
-> I remade my complete jdev project, it did not work!
-> I deleted the jdev/system/j2ee/oc4j/workspace dir
-> I search for some .lock files
-> and many more tries!!! But without success...
Is there a way to reset the Embedded OC4J? -
Help, help! I have a problem:
javax.naming.NameNotFoundException: No object bound for java:comp/env/configuratorDataSource
at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:116)
at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:127)
at javax.naming.InitialContext.lookup(InitialContext.java:355)
at oracle.toplink.jndi.JNDIConnector.connect(Unknown Source)
at oracle.toplink.sessions.DatabaseLogin.connect(Unknown Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
at oracle.toplink.threetier.ConnectionPool.buildConnection(Unknown Source)
at oracle.toplink.threetier.ConnectionPool.startUp(Unknown Source)
at oracle.toplink.threetier.ServerSession.connect(Unknown Source)
at oracle.toplink.publicinterface.DatabaseSession.login(Unknown Source)
at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
at com.configurator.datasource.ToplinkClientSessionManager.<init>(ToplinkClientSessionManager.java:18)
at com.configurator.datasource.ToplinkClientSessionManager.getInstance(ToplinkClientSessionManager.java:33
at com.configurator.persistence.PersistenceManagerImpl.<init>(PersistenceManagerImpl.java:16)
at com.configurator.ConfiguratorServiceMediatorImpl.getModelsFromDB(ConfiguratorServiceMediatorImpl.java:3
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:384)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:281)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:319)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:450)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:285)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:653)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:301)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:595)
code:
initialContext = new InitialContext();
LocalStatelessREHome localHome = (LocalStatelessREHome)initialContext.lookup("java:comp/env/StatelessREBean");
in web.xml:
<ejb-local-ref>
<ejb-ref-name>StatelessREBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.re.stateless.ejb.LocalStatelessREHome</local-home>
<local>com.re.stateless.ejb.LocalStatelessRE</local>
<ejb-link>StatelessREBean</ejb-link>
</ejb-local-ref>
Any help will be appreciated! Thanks in advance.Try removing the JNDI fully qualified name (i.e. java:comp\env\) Use the name of your bean to lookup.
It worked for me when i used to get a similar exception. -
WL5.1 SP* javax.naming.NameNotFoundException
I am looking for advice ... I started getting a NameNotFoundException when I
moved from SP6 to SP8 running on a Solaris machine (NO code changes).
Anyone have any ideas as to the problem? As the deployment names seem
correct, it is not obvious to me where the problem lies.
ejb-jar.xml snippet
=============
<session>
<description>ProductHierarchy EJB</description>
<display-name>ProductHierarchy</display-name>
<ejb-name>ProductHierarchy</ejb-name>
<home>com.redcelsius.ecommerce.product.ejb.ProductHierarchyHome</home>
<remote>com.redcelsius.ecommerce.product.ejb.ProductHierarchy</remote>
<ejb-class>com.redcelsius.ecommerce.product.ejb.ProductHierarchyBean</ejb-cl
ass>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
</session>
weblogic-ejb-jar.xml snippet
===================
<weblogic-enterprise-bean>
<ejb-name>ProductHierarchy</ejb-name>
<caching-descriptor>
</caching-descriptor>
<jndi-name>ecommerce.ProductHierarchyHome</jndi-name>
</weblogic-enterprise-bean>
client home lookup snippet
==================
InitialContext ctx =
AbstractResourceFactory.getResourceFactory().getInitialContext();
Object ref = ctx.lookup("ecommerce.ProductHierarchyHome");
Weblogic deployment
===============
Thu Mar 01 12:18:31 GMT-05:00 2001:<I> <EJB JAR deployment
./myserver/redcelsius/ecommerce-server.jar> EJB home interface:
'com.redcelsius.ecommerce.product.ejb.ProductHierarchyHome' deployed bound
to the JNDI name: 'ecommerce.ProductHierarchyHome'
Exception
=======
javax.naming.NameNotFoundException: 'ecommerce.ProductHierarchyHome';
remaining name 'ecommerce.ProductHierarchyHome'
at
weblogic.jndi.toolkit.BasicWLContext.resolveName(BasicWLContext.java:745)
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:350)
at
com.redcelsius.ecommerce.product.web.ProductBean.getEJB(ProductBean.java:68)I solved the problem. We read vendor specific values (such as
Context.PROVIDER_URL and Context.INITIAL_CONTEXT_FACTORY) from a property
file in a startup class in a static initializer.
It seems that the timing of when the startup class is loaded changed between
sp6 and sp8; as a result the static initializer could not find our property
file to set the values required when InitialContext(Properties) is called.
Everything now works.
Alan Koop
"Rob Woollen" <[email protected]> wrote in message
news:[email protected]...
Are you sure that you are looking up the EJB on the WLS server that
deployed it? (I have to ask.)
Otherwise, there shouldn't be any required code changes between SP6 and
SP8. We certainly test 1000s of EJBs against the service pack so JNDI
lookups should work fine.
Have you made any environmental changes?
If you go back to SP6, does it still work?
-- Rob
Alan Koop wrote:
I am looking for advice ... I started getting a NameNotFoundException
when I
moved from SP6 to SP8 running on a Solaris machine (NO code changes).
Anyone have any ideas as to the problem? As the deployment names seem
correct, it is not obvious to me where the problem lies.
ejb-jar.xml snippet
=============
<session>
<description>ProductHierarchy EJB</description>
<display-name>ProductHierarchy</display-name>
<ejb-name>ProductHierarchy</ejb-name>
<home>com.redcelsius.ecommerce.product.ejb.ProductHierarchyHome</home>
<remote>com.redcelsius.ecommerce.product.ejb.ProductHierarchy</remote>
<ejb-class>com.redcelsius.ecommerce.product.ejb.ProductHierarchyBean</ejb-cl
ass>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
</session>
weblogic-ejb-jar.xml snippet
===================
<weblogic-enterprise-bean>
<ejb-name>ProductHierarchy</ejb-name>
<caching-descriptor>
</caching-descriptor>
<jndi-name>ecommerce.ProductHierarchyHome</jndi-name>
</weblogic-enterprise-bean>
client home lookup snippet
==================
InitialContext ctx =
AbstractResourceFactory.getResourceFactory().getInitialContext();
Object ref = ctx.lookup("ecommerce.ProductHierarchyHome");
Weblogic deployment
===============
Thu Mar 01 12:18:31 GMT-05:00 2001:<I> <EJB JAR deployment
./myserver/redcelsius/ecommerce-server.jar> EJB home interface:
'com.redcelsius.ecommerce.product.ejb.ProductHierarchyHome' deployedbound
to the JNDI name: 'ecommerce.ProductHierarchyHome'
Exception
=======
javax.naming.NameNotFoundException: 'ecommerce.ProductHierarchyHome';
remaining name 'ecommerce.ProductHierarchyHome'
at
weblogic.jndi.toolkit.BasicWLContext.resolveName(BasicWLContext.java:745)
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:350)
at
com.redcelsius.ecommerce.product.web.ProductBean.getEJB(ProductBean.java:68)
>
Coming Soon: Building J2EE Applications & BEA WebLogic Server
by Michael Girdley, Rob Woollen, and Sandra Emerson
http://learnweblogic.com -
Exception in thread "main" javax.naming.NameNotFoundException: Unable to re
Hi friends,
I am running simple Client program of JMS to produce text message. I have JMSServer under JMS tab in weblogic home site.my desnation is topic its name is topic2.Following Error occurs
C:\j2sdk1.4.2_12\bin>java Client1
Exception in thread "main" javax.naming.NameNotFoundException: Unable to resolve
'topic1' Resolved [Root exception is javax.naming.NameNotFoundException: Unabl
e to resolve 'topic1' Resolved ]; remaining name 'topic1'
at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.j
ava:108)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteR
ef.java:284)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteR
ef.java:244)
at weblogic.jndi.internal.ServerNamingNode_813_WLStub.lookup(Unknown Sou
rce)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:369)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:357)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at Client1.main(Client1.java:21)
Caused by: javax.naming.NameNotFoundException: Unable to resolve 'topic1' Resolv
ed
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(Basic
NamingNode.java:897)
at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.jav
a:230)
at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.j
ava:154)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:18
8)
at weblogic.jndi.internal.RootNamingNode_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerR
ef.java:108)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
144)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
a:415)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
.java:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
C:\j2sdk1.4.2_12\bin>I am no expert to this but, I have gotten that error when I try to subscribe to a topic that does not exist.
Make sure your server is running and that the topic exists. -
WebLogic is not responding to client request under heavy load
Under heavy loading, our WLS 6.0 SP2 will be not be responding to client requests
after some time, say, 1 hour. From the administration console, the request throughput
is 0 while request waiting accumulates to over 1,000. Even the clients stop making
request to the server, the request waiting will not drop. It seems that WLS blocked
on some threads and unable to serve the requests (see attached thread dump for
details).
Our configuration is as follow:
OS: SunOS 5.7
Database: MS SQL Server 7.0 running on NT4 Enterprise Edition.
(JDBC Driver is the one bundled with WLS 6.0)
We know that using 'DriverManager.getConnection()' can cause deadlock in number
of cases but we have gone through all the code but all of our Database connections
are obtained through datasource. And the connection is closed properly in finally
block.
Moreover, the application is originally running on WLS 4.51 but no problem is
encountered.
Does any expert know what the problem and solution are?
Thanks!
[session.log]It appears that some threads were possibly blocked at some jDriver calls
initially (ExecuteThread 0,10,15,23 of the default thread pool). WLS JTA
subsequently timed out and rolled back the transactions asynchronously. The
first rollback attempt was blocked at the jDriver level (ExecuteThread 18 of
the default thread pool). Each subsequent rollback retry blocks an
additional execute thread (due to a JTA bug that is fixed in WLS 6.1, but
not 6.0 SPs) - ExecuteThread 1-9,11-26 of the default thread pool.
Eventually, the server ran out of execute threads and became unresponsive.
It is unclear that whether the initial blocking of threads by the jDriver is
a jDriver issue or an application issue. Please report to BEA support at
[email protected] for further assistance.
Regards,
Priscilla
Gary Mok <[email protected]> wrote in message
news:[email protected]..
>
Under heavy loading, our WLS 6.0 SP2 will be not be responding to clientrequests
after some time, say, 1 hour. From the administration console, the requestthroughput
is 0 while request waiting accumulates to over 1,000. Even the clientsstop making
request to the server, the request waiting will not drop. It seems thatWLS blocked
on some threads and unable to serve the requests (see attached thread dumpfor
details).
Our configuration is as follow:
OS: SunOS 5.7
Database: MS SQL Server 7.0 running on NT4 Enterprise Edition.
(JDBC Driver is the one bundled with WLS 6.0)
We know that using 'DriverManager.getConnection()' can cause deadlock innumber
of cases but we have gone through all the code but all of our Databaseconnections
are obtained through datasource. And the connection is closed properly infinally
block.
Moreover, the application is originally running on WLS 4.51 but no problemis
encountered.
Does any expert know what the problem and solution are?
Thanks! -
Hi,
I am not able to resolve the JNDI name - ATGProductionDS
I have used CIM to create this and i am using ATG10.2 with MYSQL as my database and weblogic.
/atg/epub/file/ConfigFileSystem journaling file system started: vfs=file:/C:
/Stixs/ATG/ATG10.2/home/PublishingAgent/deploymentconfig/live/config/ journalDirectory=C:\Stixs\ATG\ATG10.2\home\PublishingAgent\deploymentc
onfig\data\config
**** Error Fri Dec 27 20:58:35 EST 2013 1388195915495 /atg/dynamo/service/jdbc/DirectJTDataSource Failed to resolve ATGProduct
ionDS javax.naming.NameNotFoundException: Unable to resolve 'ATGProductionDS'. Resolved ''; remaining name 'ATGProductionDS'
**** Error Fri Dec 27 20:58:35 EST 2013 1388195915495 /atg/dynamo/service/jdbc/DirectJTDataSource at weblogic.jndi.int
ernal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
**** Error Fri Dec 27 20:58:35 EST 2013 1388195915495 /atg/dynamo/service/jdbc/DirectJTDataSource at weblogic.jndi.int
Entries from Weblogic console -datasources
ATGBatchDS
Generic
ATGBatchDS
ATGProductionDS
Generic
ATGProductionDS
atg_production_lockserver, atg_publishing_lockserver
ATGPublishingDS
Generic
ATGPublishingDS
atg_publishing_lockserver
Please provide assistance.Hi,
if you click the "Control" tab for the ATGProductionDS datasource in the Weblogic console does it show the State as running?
Does the "Monitoring" tab for the datasource show the State as running? If you click on the "Testing" tab can you test the datasource successfully?
If you inspect the Server using the Weblogic console there is a link "View JNDI Tree" If you click the link do you see the datasource listed in the left pane?
Do you see any errors for the ATGProductionDS in the Weblogic server log and out log files? -
OC4J Configuration - javax.naming.NameNotFoundException
Here is a description of the problem we are having:
The Problem
We have a remote client that wishes to invoke services
that we are
going to provide. These services will be accessible via a JNDI
lookup from
the client's JVM. The client, is operating in a JRE, version
1.2.2, but is
an in-house Java Server Engine (developed before the Servlet API
specification) and not a command line client application. It is
desirable to
do a simple JNDI lookup from the RMIInitialContext and gain
access to the
services (Home Interface). Attached is a demonstration of a
client
application doing a lookup against the deployment shown below
(orion-ejb-jar.xml ). Notice the name of the service in the
lookup on the
client application are exactly the same as the location
declaration of the
session deployment element of the orion-ejb-jar.xml. The service
(EJB, not
attached) was deployed without any errors. The exception we are
getting is:
Exception in thread "main" javax.naming.NameNotFoundException:
DAServicesDemo not found
at com.evermind.server.rmi.RMIContext.lookup
(RMIContext.java:121)
at javax.naming.InitialContext.lookup
(InitialContext.java:350)
at test.RemoteServiceClient.main
(RemoteServiceClient.java:26)
The RMI server has been configured with the default
settings, and is
listening on port 8474
The Source
package test;
import ORG.oclc.da.beans.*;
import javax.naming.*;
import java.util.*;
import java.rmi.*;
import javax.ejb.*;
public class RemoteServiceClient
public static void main(String[] args)
throws NamingException, CreateException,
RemoteException,
Exception{
Properties h = new Properties();
h.put(Context.INITIAL_CONTEXT_FACTORY,
"com.evermind.server.rmi.RMIInitialContextFactory");
h.put
(Context.PROVIDER_URL, "ormi://risc14.dev.oclc.org:8474");
InitialContext context = new InitialContext(h);
DAServicesDemoHome remoteServiceHome =
(DAServicesDemoHome) (new
InitialContext(h)).lookup("DAServicesDemo");
DAServicesDemo remoteService =
(DAServicesDemo)remoteServiceHome.create();
System.out.println("Here it is: " +
remoteService.getContentGroup());
C_DemoServices remoteService = new C_DemoServices();
String result = remoteService.getContentGroup();
System.out.println("This is the result form the remote
service: " +
result);
EJB-jar.xml
<ejb-jar>
<description>
Proof of concept application for the integration of DA to
CORC
</description>
<display-name>Digital Archive Remote Services</display-name>
<enterprise-beans>
<session>
<ejb-name>DAServicesDemo</ejb-name>
<home>ORG.oclc.da.beans.DAServicesDemoHome</home>
<remote>ORG.oclc.da.beans.DAServicesDemo</remote>
<ejb-class>ORG.oclc.da.beans.DAServicesDemoBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>DAServicesDemo</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>NotSupported</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
Orion-ejb.jar
<orion-ejb-jar deployment-version="1.0.2.2" deployment-
time="ea2215b915">
<enterprise-beans>
<session-deployment name="DAServicesDemo"
location="DAServicesDemo"
wrapper="DAServicesDemoHome_StatelessSessionHomeWrapper1"
timeout="1800"
persistence-filename="DAServicesDemo" />
</enterprise-beans>
<assembly-descriptor>
<default-method-access>
<security-role-mapping
name="<default-ejb-caller-role>" impliesAll="true" />
</default-method-access>
</assembly-descriptor>
</orion-ejb-jar>
Any help would be greatly appreciated, thanks in advanced...Hi Jonathan,
If I understand you correctly, you are trying to access an EJB in
OC4J from a separate, external JVM. If that is correct, then, in
order to achieve that, the (EJB) home interface "stub" class must
be located in the client's JVM. Unfortunately, I haven't figured
out how to do that, and therefore, as far as I can see, the only
two client options available are:
1. Web-based client -- servlet or JSP
2. Application client -- standalone java application.
However, for both options, the client must also be deployed to
OC4J. I don't know how to obtain "stub" classes generated by OC4J
so that I can give external clients access to them.
According to the J2EE spec, application clients need to be run
within containers, too -- albeit thin containers. I presume that
means you need 2 instances of OC4J running -- one for the server
and one for the client. Seems a bit "heavy" to me, so for now I'm
going with the web-based (servlet) client and having external
java classes communicate with the servlet.
Hope this has been of assistance to you,
Avi. -
A difficult javax.naming.NameNotFoundException problem
I have to move my application from IBM X455 PC Server to IBM X3850 (inter x86 64bit) PC Server . The application had been running on IBM X455 for about 3 years well . The OS is Red hat linux. The weblogic server on IBM X455 is 8.1.3. I tar the application from IBM X455 to IBM X3850 and install weblogic 8.1.4 on the x86 64bit OS. I redeploy the application on weblogic 8.1.4. When the client try to connect to the server, follow errors appear:
<Jul 30, 2008 8:39:21 AM GMT+08:00> <Warning> <WLW> <000000> <Unable to load class ProcessControl>
<Jul 30, 2008 8:39:22 AM GMT+08:00> <Error> <WLW> <000000> <Exception processing SessionService
java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.RuntimeException: Unable to create adaptor
at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:186)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:290)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:247)
at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl_814_WLStub.confirmDeployment(Unknown Source)
at com.bea.wlw.runtime.core.dispatcher.DispProjectJar.confirmDeployment(DispProjectJar.java:190)
at com.bea.wlw.runtime.core.dispatcher.DispResources.confirmDeployment(DispResources.java:752)
at com.bea.wlw.runtime.core.dispatcher.DispCache.ensureDispUnit(DispCache.java:767)
at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.getDispUnit(HttpServerHelper.java:501)
at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.executePostRequest(HttpServerHelper.java:649)
at com.bea.wlw.runtime.core.dispatcher.HttpServer.doPost(HttpServer.java:49)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at com.reformsoft.safe.manage.SessionFilter.doFilter(SessionFilter.java:64)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6724)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
Caused by: java.lang.RuntimeException: Unable to create adaptor
at com.bea.wlw.runtime.core.dispatcher.DispBean.getAdaptor(DispBean.java:198)
at com.bea.wlw.runtime.core.bean.SyncDispatcherBean.confirmDeployment(SyncDispatcherBean.java:346)
at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.confirmDeployment(SyncDispatcher_k1mrl8_EOImpl.java:100)
at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:166)
... 24 more
Caused by: javax.naming.NameNotFoundException: While trying to lookup 'SafeWebService.GenericStateless.bean.StatelessContainer' didn
't find subcontext 'GenericStateless' Resolved SafeWebService; remaining name 'GenericStateless/bean/StatelessContainer'
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:897)
at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:225)
at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:154)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:188)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:196)
at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:256)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:359)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at com.bea.wlw.runtime.core.dispatcher.DispBean.getHome(DispBean.java:132)
at com.bea.wlw.runtime.core.dispatcher.DispBean.getAdaptor(DispBean.java:189)
... 28 more
>
<Jul 30, 2008 8:39:22 AM GMT+08:00> <Error> <WLW> <000000> <Returning HTTP 500 due to httpWriteCompileErrors <error> <description>An
unexpected exception occurred while attempting to locate the run-time information for this Web Service. Error: java.rmi.RemoteExcep
tion:EJB Exception: ; nested exception is: java.lang.RuntimeException: Unable to create adaptor</description> <source>[unknown sourc
e]</source> <line>[unknown line]</line> <column>[unknown column]</column> <prescription>An unexpected error occurred. Please contact
[email protected] for further assistance.</prescription> </error> >
I check the weblogic console and find that there is something wrong with the JNDI tree. The state of GenericStateless is red. because of my poor english , please get the picture from http://dev2dev.bea.com.cn/bbs/thread.jspa?forumID=81&threadID=47583&messageID=282533 or http://www.itpub.net/viewthread.php?tid=1032379&extra=page%3D1&frombbs=1 , it will help.
Since the application is an old one and runs well on IBM X455 machine , the configuration of JNDI and other components is ok. Since the weblogic version is different(8.1.3 to 8.1.4, 32 bit to 64 bit) , is there anything wrong with the weblogic or JDK enviroment? or OS configuration? I have tried weblogic 8.1.6 and many versions of JDK too, still failed . What is wrong? Please help me ASAP. Thanks a lot!Did you managed to get the solution to the above error. Can you please let me know the solution if you have get it right? You can post back to my id [email protected]
Thanks,
SK
Edited by: shivaG on Nov 3, 2008 4:25 AM
Maybe you are looking for
-
we are currently experiencing large disk queues on our sql server due to numerous long running jobs. We have several file groups on different drives BUT is there a performance gain to be had in splitting a file group across different drives. I believ
-
If you are trying to sort using the ALBUM column, and it appears as ALBUM BY ARTIST, which mine did, you will notice that compilation albums will scatter throughout the column. The album will not be grouped as it should be like a normal album. here's
-
For some reason I am on the USA App Store, but I live in the UK, how do I switch it back
Please help, I live in the Uk and for some reason the App Store has changed to the USA, Can anyone advise me how I can change it back to the Uk version
-
I've just made test or demo installation of BI SE One to see how it works and what has been included there. I can see there still BI Delivers being available in user interface but it's not listed in sales material. In sales material I've understood t
-
Where are my rented movies downloaded to?
I cannot find where to view my already downloaded rented movies...hmmm