jndi

Oracle driver memory leak - Tomcat

懵懂的女人 提交于 2019-11-30 05:23:53
问题 We're using tomcat-7.0.33. Spring 3.0.1 and JPA using a tomcat JNDI datasource. Oracle 10g on the backend using ojdbc6.jar (latest). When we try to undeploy the application some Oracle classes seem to be leaking. I don't see this when using the older ojdbc14.jar drivers but we can't use those as we're migrating to Oracle 11g which requires the newer drivers. I'm guessing this is a bug in the Oracle drivers? Is there anything I can do to clean these resources up? I've tried closing the

What to put into jta-data-source of persistence.xml?

一曲冷凌霜 提交于 2019-11-30 04:17:16
What value should I place into <jta-data-source> of my persistence.xml ? In glassfish admin panel I created a datasource name "abcDS" . In my jndi.properties (inside src/test/resources ) I defined it like this: [...] abcDS=new://Resource?type=DataSource abcDS.JdbcDriver=org.hsqldb.jdbcDriver abcDS.JdbcUrl=jdbc:hsqldb:mem:testdb abcDS.JtaManaged=true [...] What shall I place into persistence.xml ? I've found a lot of variants in the Net, like: "jdbc/abcDS" , "java:/abcDS" , "abcDS" . Which one is right? And is there some rule for this? I understand that it's related to JNDI, but... I'm trying

Shutting down Spring application makes JNDI name for datasource go away from jdbc context

元气小坏坏 提交于 2019-11-30 02:47:15
问题 I'm trying to setup a web application using Spring MVC and Spring Data JPA on my Weblogic server. The application works fine the first time I deploy it to the Weblogic server but when I stop the application the jndi name (jdbc/myDS) to my datasource disappears from the JNDI Tree on my Weblogic server, and then when I try to start the application again I get the following error: Caused By: javax.naming.NameNotFoundException: Unable to resolve 'jdbc.myDS'. Resolved 'jdbc'; remaining name 'myDS'

spring jndi NamingException: Name [spring.liveBeansView.mbeanDomain] is not bound in this Context

天涯浪子 提交于 2019-11-30 02:45:35
问题 My webapp with spring 3.2.4 is running fine. But when I start up it, I will get debug infos: 2014-05-20 11:11:47 DEBUG JndiTemplate:150 - Looking up JNDI object with name [java:comp/env/spring.liveBeansView.mbeanDomain] 2014-05-20 11:11:47 DEBUG JndiLocatorDelegate:101 - Converted JNDI name [java:comp/env/spring.liveBeansView.mbeanDomain] not found - trying original name [spring.liveBeansView.mbeanDomain]. javax.naming.NameNotFoundException: Name [spring.liveBeansView.mbeanDomain] is not

How do I lookup a JNDI Datasource from outside a web container?

送分小仙女□ 提交于 2019-11-29 20:44:41
I have the following environment set up: Java 1.5 Sun Application Server 8.2 Oracle 10 XE Struts 2 Hibernate I'm interested to know how I can write code for a Java client (i.e. outside of a web application) that can reference the JNDI datasource provided by the application server. The ports for the Sun Application Server are all at their defaults. There is a JNDI datasource named jdbc/xxxx in the server configuration, but I noticed that the Hibernate configuration for the web application uses the name java:comp/env/jdbc/xxxx instead. Most of the examples I've seen so far involve code like

What is the relationship between java:comp/env and java:global?

删除回忆录丶 提交于 2019-11-29 20:38:19
What is the relationship between java:comp/env and java:global (regarding 3.1 spec)? Seems like java:comp/env contains specific to EJB references. What means "specific" in this case? java:global is a namespace that's global for the entire application server, which includes other EAR modules (which are considered to be different applications). java:comp/env is a much smaller namespace. For the web module, it corresponds to all web components (servlets etc) which are all together considered to be a single 'component' for JNDI, but for EJB beans it's a namespace for a single bean, since every

jetty-env.xml with DataSource leads to failing WebAppContext on mvn jetty:run

*爱你&永不变心* 提交于 2019-11-29 19:35:39
问题 I have a really simple webapp project with maven and jetty that has been working very well until now. But now I need to setup MySQL connection pooling with JNDI as the database connections always time out. First of all here is the relevant content of my pom.xml: <modelVersion>4.0.0</modelVersion> ... <packaging>war</packaging> ... <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <jetty-version>8.1.0.v20120127</jetty-version> </properties> <dependencies> ...

simple string value by JNDI in Java

风流意气都作罢 提交于 2019-11-29 18:00:42
How can i set simple string value in configuration of tomcat and then read in java application? context.xml <ResourceLink name="global/test" global="testing" type="java.lang.String" /> server.xml <Enviroment name="testing" value="myUser" type="java.lang.String"/> web.xml in application <resource-env-ref> <resource-env-ref-name>global/test</resource-env-ref-name> <resource-env-ref-type>java.lang.String</resource-env-ref-type> </resource-env-ref> in my java application public String getValue(){ return new JndiDataSourceLookup().getDataSource("global/test").toString(); } When i Run tomcat, i see

LDAP OperationNotSupportedException : error code 53 - WILL_NOT_PERFORM [duplicate]

别说谁变了你拦得住时间么 提交于 2019-11-29 17:20:10
This question already has an answer here: How do I resolve “WILL_NOT_PERFORM” MS AD reply when trying to change password in scala w/ the unboundid LDAP SDK? 3 answers when I create a user using JNDI to communicate to active directory , I am now getting LDAP Error 53 (WILL_NOT_PERFORM) . I'm trying set password for the created user. Also I've disabled the 'User must change password at next logon' option. attrs.put("unicodePwd", "\"Test123\"".getBytes("UTF-16LE") ); String newValue = Integer.toString(-1); ModificationItem mods[] = new ModificationItem[2]; mods[0] = new ModificationItem

What does “javax.naming.NoInitialContextException” mean? [duplicate]

╄→尐↘猪︶ㄣ 提交于 2019-11-29 17:11:59
问题 This question already has an answer here: The meaning of NoInitialContextException error 12 answers As the title suggests, what does "javax.naming.NoInitialContextException" mean in non technical terms? And what are some general suggestions to fix it? EDIT (From the console): javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial at javax.naming.spi