jndi

Glassfish application not working with maven library (gf-client)

对着背影说爱祢 提交于 2019-12-06 00:13:00
For a school assignment I received a Netbeans project using JNDI and JMS with Glassfish (3 open source edition). All the Glassfish libraries this application is using are referenced by absolute path and all the other libraries (in the "lib" folder) are referenced by relative path. Since my group is working with a version control system the "lib" folder is included in the repository. This works fine because it is a small project. However the Glassfish libraries are problematic as I am a Linux user and the others are Windows users. We have worked around this problem by letting Netbeans take care

Spring 3 The matching wildcard is strict, but no declaration can be found for element 'jee:jndi-lookup'

那年仲夏 提交于 2019-12-05 21:15:12
问题 So I am having an issue similar to here... Spring 3.0 Error: The matching wildcard is strict, but no declaration can be found for element my pom looks like this <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:p="http://www.springframework.org/schema/p" xmlns:mvc="http://www.springframework.org/schema/mvc"

Set project stage for JavaServer Faces with JNDI configuration/lookup in Glassfish v3

孤者浪人 提交于 2019-12-05 20:58:35
I'm trying to set the project stage for JavaServer Faces in a GlassFish application server v3 with a JNDI property. I set the stage property to Development stage, but my application received always the Production stage. I use GlassFish Server Open Source Edition 3.1 (build 43) on a windows system. For rendering the project stage in the JSF page I use this: <h:outputText value="Stage:#{facesContext.application.projectStage}"/> Is anything else necessary to use the project stage in an application? The application has no web.xml file. Lenny Primak Everything is correct, but instead of stage

Jetty JNDI error within Maven Jetty Plugin

落爺英雄遲暮 提交于 2019-12-05 20:00:31
I am trying to configure a JNDI data source that can be used from an invocation of the Maven Jetty Plugin. I am trying to do this external to the WAR file, so that anyone who might later deploy our webapp with Jetty will not have to edit a configuration file inside the WAR's WEB-INF directory. I created a jetty.xml file as follows: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd"> <Configure class="org.mortbay.jetty.webapp.WebAppContext"> <!-- Atomikos XA aware (but not XA capable) JDBC data

LDAP: error code 49 - Simple Bind Failed: NT_STATUS_LOGON_FAILURE

社会主义新天地 提交于 2019-12-05 19:52:36
I am trying to authenticate the user but it throws Exception .May be there is problem in configuration. public class LdapApplication { private static final String INITIAL_CONTEXT_FACTORY = "com.sun.jndi.ldap.LdapCtxFactory"; private static final String SECURITY_AUTHENTICATION ="simple"; private static final String NAMED_CONTEXT = "CN=Users"; private static final String SAM_ACCOUNT_NAME = "sAMAccountName="; public static void main(String[] args) { Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY,INITIAL_CONTEXT_FACTORY); env.put(Context.PROVIDER_URL, "ldap://ip:portNo/dc

How to access EJB on remote server?

守給你的承諾、 提交于 2019-12-05 19:40:06
I am using a GlassFish-3.1.2 server running in my subnet (192.168.1.3:3700). I already deployed an enterprise app including an EJB in which i defined a business method. Now I want to remotely access the EJB from my java application client. How do i have to setup the JNDI resp. the InitialContext object for doing the lookup of the EJB ? How do I need to define the properties? Btw. I had to run "asadmin enabled-secure-admin" in order to make the GlassFish server work on the LAN. Probably I also need to send my credentials with the properties ? Here's my current "solution", which seems to be

JBoss 7 jndi names of ejb's package in war

一个人想着一个人 提交于 2019-12-05 18:35:48
Does anyone know how to modify the "module" component of the global jndi names for ejb's deployed in a war under JBoss 7.2 (EAP 6.1)? Per spec, the module name is the same as the base war name, which in my case includes a version number. Here is the spec from oracle: java:global/[<application-name>]/<module-name>/<bean-name> In my case it yeilds: java:/global/mywar-1.0/MyService What I would like is: java:/global/mywar/MyService I know I can modify the name of the war prior to deployment, but would prefer to explicitly name the module via configuration file. I have attempted to use the ejb-jar

EJB 3.1 | Error calling remote session bean via JNDI

风格不统一 提交于 2019-12-05 18:25:48
I'm trying to call a simple stateless session bean from a Java SE (Simple class). Here's my bean import javax.ejb.Stateless; /** * * @author MMRUser */ @Stateless public class CapitalBean implements CapitalBeanRemote { public String greetingsEjb(String name) { return "Hello " + name; } } Remote interface import javax.ejb.Remote; /** * * @author MMRUser */ @Remote public interface CapitalBeanRemote { public String greetingsEjb(String name); } From my client side I used stand-alone java class to call the session bean using JNDI as follows import ejb.CapitalBeanRemote; import javax.naming.Context

Forward slashes in the names returned by JNDI query to LDAP server

…衆ロ難τιáo~ 提交于 2019-12-05 18:16:52
I need to make several queries to LDAP directory server and I'm using JNDI directory facilities for it. Then I need to do some work with the objects from the query result using their distinguished names. Some of the entries returned by the server contain forward slash character, and because of this JNDI escapes the whole name with double quotes: NamingEnumeration<SearchResult> results = dirContext.search(queryRoot, queryFilter, controls); for (SearchResult result : Collections.list(results)) { String objectName = result.getName(); System.out.println(objectName); } If one of the objects in the

Adding datasource programmatically to JNDI context in embedded tomcat 7

萝らか妹 提交于 2019-12-05 18:16:21
I'm trying to register a new datasource before the server starts but on lookup execution I'm getting javax.naming.NameNotFoundException: Name [jdbc/db] is not bound in this Context. Unable to find [jdbc]. This is how I start tomcat: Tomcat tomcat = new Tomcat(); //... ContextResource resource = new ContextResource(); resource.setName("jdbc/db"); resource.setAuth("Container"); resource.setType("javax.sql.DataSource"); resource.setScope("Sharable"); resource.setProperty("driverClassName", "org.hsqldb.jdbc.JDBCDriver"); resource.setProperty("url", "jdbc:hsqldb:hsql://localhost:1234/mydb1");