[JBoss AS 7 Development] - Firebird in JBoss 7
by Hrvoje Jo
Hrvoje Jo [http://community.jboss.org/people/hrast200] created the discussion
"Firebird in JBoss 7"
To view the discussion, visit: http://community.jboss.org/message/644805#644805
--------------------------------------------------------------
Hi!
Did anyone succeed in connecting Firebird DB and JBoss? I cann't get rid of
| JBAS014775: | New missing/unsatisfied dependencies: |
| | service jboss.jdbc-driver.firebirdsql (missing) dependents: [service jboss.data-source.java:/tiranDS] |
jaybird-pool-2.1.6.jar is in .....\jboss-as-7.1.0.CR1b\modules\org\firebirdsql\main
This is my standalone.xml [some parts are changed, like ...(some_path)...]
...
<subsystem xmlns="urn:jboss:domain:datasources:1.0">
<datasources>
<datasource jndi-name="java:/tiranDS" pool-name="TiranPool" enabled="true" jta="true" use-java-context="true" use-ccm="true">
<connection-url>
jdbc:firebirdsql:serversp/3050:C:\Program Files\...(some_path)...\tiran.gdb
</connection-url>
<driver>
firebirdsql
</driver>
<pool>
<prefill>
false
</prefill>
<use-strict-min>
false
</use-strict-min>
<flush-strategy>
FailingConnectionOnly
</flush-strategy>
</pool>
<security>
<user-name>
username
</user-name>
<password>
pass
</password>
</security>
</datasource>
<drivers>
<driver name="firebirdsql" module="org.firebirdsql">
<xa-datasource-class>
org.firebirdsql.jdbc.FBDriver
</xa-datasource-class>
</driver>
</drivers>
</datasources>
</subsystem>
...
module.xml looks like this (all .jars mentioned in module.xml aree in .....\jboss-as-7.1.0.CR1b\modules\org\firebirdsql\main folder)
<module xmlns="urn:jboss:module:1.0" name="org.firebirdsql">
<resources>
<resource-root path="jaybird-full-2.1.6.jar"/>
<resource-root path="jaybird-pool-2.1.6.jar"/>
<resource-root path="log4j-1.2.13.jar"/>
<resource-root path="jboss-javaee.jar"/>
<resource-root path="jmxri.jar"/>
<resource-root path="jmxtools.jar"/>
<resource-root path="sax2.jar"/>
<resource-root path="commons-logging-1.1.jar"/>
<resource-root path="junit-3.8.1.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.activation.api"/>
<module name="javax.xml.soap.api"/>
<module name="javax.servlet.api"/>
<module name="org.jboss.common-core"/>
<module name="org.jboss.logging"/>
<module name="javax.mail.api"/>
<module name="org.apache.log4j"/>
<module name="org.jboss.logmanager.log4j"/>
<module name="org.apache.james.mime4j"/>
<module name="org.apache.commons.codec"/>
<module name="org.apache.commons.collections"/>
<module name="org.apache.commons.io"/>
<module name="org.apache.commons.lang"/>
<module name="org.apache.commons.logging"/>
<module name="org.apache.httpcomponents"/>
<module name="org.apache.xalan"/>
<module name="org.apache.xerces"/>
<module name="org.w3c.css.sac"/>
<module name="net.sourceforge.cssparser"/>
<module name="net.sourceforge.nekohtml"/>
</dependencies>
</module>
Whati is wrong here?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/644805#644805]
Start a new discussion in JBoss AS 7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 11 months
[jBPM Development] - Issue in Deploying gwt console war file
by Rajesh Kumar Tunuguntla
Rajesh Kumar Tunuguntla [http://community.jboss.org/people/mailformrx] created the discussion
"Issue in Deploying gwt console war file"
To view the discussion, visit: http://community.jboss.org/message/644577#644577
--------------------------------------------------------------
I have Downloaded the jbpm-console sourcce Code from https://github.com/bpmc/bpm-console https://github.com/bpmc/bpm-console".
I have followed the below steps
1. download the zip and extracted in a folder (bpmc-bpm-console-1cf8710)
2. Executed: mvn clean install in the same folder
3. Executed: mvn package from bpmc-bpm-console-1cf8710/gui/war/ folder
4. After that the war file(gwt-console.war) was generated in target folder(bpmc-bpm-console-1cf8710/gui/war/target)
5. When i placed the gwt-console.war file in jboss/server/default/deploy, there were deployment errors which i have posted below.
Help me on solving the this issue.
2012-01-02 21:23:27,738 INFO [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (HDScanner) deploy, ctxPath=/default-bpm-console
2012-01-02 21:23:28,397 ERROR [org.reflections.Reflections] (HDScanner) could not create Vfs.Dir from url. ignoring the exception and continuing
org.reflections.ReflectionsException: could not create Dir using org.jboss.errai.bus.server.service.metadata.VFSUrlType from url vfszip:/D:/jbpm5.1/jbpm-installer/jboss-5.1.0.GA/server/default/deploy/jbpm-gwt-console.war/WEB-INF/classes/
at org.reflections.vfs.Vfs.fromURL(Vfs.java:99)
at org.reflections.vfs.Vfs.fromURL(Vfs.java:89)
at org.reflections.Reflections.scan(Reflections.java:136)
at org.jboss.errai.bus.server.service.metadata.MetaDataScanner.<init>(MetaDataScanner.java:83)
at org.jboss.errai.bus.server.service.metadata.MetaDataScanner.createInstance(MetaDataScanner.java:95)
at org.jboss.errai.bus.server.service.metadata.MetaDataScanner.createInstance(MetaDataScanner.java:87)
at org.jboss.errai.bus.server.service.ErraiServiceConfiguratorImpl.<init>(ErraiServiceConfiguratorImpl.java:58)
at org.jboss.errai.bus.server.service.ErraiServiceConfiguratorImpl$$FastClassByGuice$$b6139751.newInstance(<generated>)
at com.google.inject.internal.cglib.reflect.FastConstructor.newInstance(FastConstructor.java:40)
at com.google.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:60)
at com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at com.google.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:111)
at com.google.inject.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at com.google.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:84)
at com.google.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:111)
at com.google.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:811)
at com.google.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at com.google.inject.Scopes$1$1.get(Scopes.java:54)
at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48)
at com.google.inject.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.InjectorImpl$4$1.call(InjectorImpl.java:758)
at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:804)
at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:754)
at com.google.inject.InjectorImpl.getInstance(InjectorImpl.java:793)
at org.jboss.errai.bus.server.servlet.AbstractErraiServlet.buildService(AbstractErraiServlet.java:133)
at org.jboss.errai.bus.server.servlet.AbstractErraiServlet.init(AbstractErraiServlet.java:104)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:950)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4122)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4421)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
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:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
at $Proxy38.start(Unknown Source)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
at org.jboss.system.ServiceController.start(ServiceController.java:460)
at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Thanks
Rajesh
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/644577#644577]
Start a new discussion in jBPM Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 12 months
[JBoss AS 7 Development] - Re: Security propagation from remote EJB clients to AS7
by Radek Rodak
Radek Rodak [http://community.jboss.org/people/rodakr] created the discussion
"Re: Security propagation from remote EJB clients to AS7"
To view the discussion, visit: http://community.jboss.org/message/644551#644551
--------------------------------------------------------------
Hi
1)
Can you provide client sample code using SASL Security ( for now PLAIN example would be enought ).
( or just add this example to https://docs.jboss.org/author/display/AS71/Developer+Guide#DeveloperGuide... https://docs.jboss.org/author/display/AS71/Developer+Guide#DeveloperGuide... )
2)
I looked in source code of org.jboss.sasl.JBossSaslProvider.java ( jboss-sasl-1.0.0.Beta9.jar )
Ony SASL MECH I see here are:
"ANONYMOUS"
"PLAIN",
"DIGEST-MD5",
"JBOSS-LOCAL-USER"
Could you also add "GSSAPI" ( here how to from Darran Lofthouse http://community.jboss.org/docs/DOC-17302 http://community.jboss.org/wiki/SASLAndKerberos )
Basically I would like to do this but with AS7.1:
http://community.jboss.org/docs/DOC-16137 http://community.jboss.org/wiki/EJB3AuthenticationWithSPNEGO
I tried to call remote ejb after sucessfull JAAS Login, but JAAS Login Context seams to not get propagatet to Server over Jboss Remote...
Here how I tried ( the same Code but calling Web URL Secured with SPNEGO works, so KRB5 Java Setup is ok) :
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.security.AccessController;
import java.security.Principal;
import java.security.PrivilegedExceptionAction;
import java.security.Security;
import java.util.Collections;
import java.util.Hashtable;
import java.util.Properties;
import java.util.Set;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.security.auth.Subject;
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.NameCallback;
import javax.security.auth.callback.PasswordCallback;
import javax.security.auth.callback.TextInputCallback;
import javax.security.auth.callback.TextOutputCallback;
import javax.security.auth.callback.UnsupportedCallbackException;
import javax.security.auth.login.LoginContext;
import javax.security.sasl.Sasl;
import javax.security.sasl.SaslClient;
import javax.security.sasl.SaslException;
import test.ejb3.TestServiceItf;
public class TestServiceClient {
static String JAAS_CONFIG_ENTRY = "com.sun.security.jgss.krb5.initiate";
static BufferedReader br = new BufferedReader( new InputStreamReader (System.in));
public static void main(String[] args) throws Exception {
LoginContext lc = null;
try {
System.out.println("\n >> Enter Win user Name : ");
//String callbackUser = br.readLine ();
String callbackUser = "rrad";
System.out.println("\n >> Enter Win User AD password : ");
//String callbackPwd = br.readLine ();
String callbackPwd ="radoslaw13";
// jaas collback might be needed for ticket refresh...
lc = new LoginContext(JAAS_CONFIG_ENTRY,new NamePasswordCallbackHandler2(callbackUser,callbackPwd ));
lc.login();
//and get a subject
Subject mySubject = lc.getSubject();
System.out.println(" *********??????????********>>>> subject: "+mySubject);
Set<Principal> sp = mySubject.getPrincipals();
if ( sp == null ) System.out.println(" 0 principals ");
else {
System.out.println(+sp.size()+" principals");
for ( Principal p : sp ) {
System.out.println("principal name :"+p.getName());
}
}
// in case if not passed to java as property..
System.setProperty("javax.security.auth.useSubjectCredsOnly", "false");
System.setProperty( "sun.security.krb5.debug", "true");
PrivilegedExceptionAction<String> action = new GetAction( null, null );
//jaas call the service
String aRet = (String)mySubject.doAs(mySubject, action);
// successfuly called, read returned values
System.out.println("successfully caled protected Method : "+aRet);
} catch (Exception e) {
e.printStackTrace();
System.exit(-1);
}
}
/**
* dummy readLine Helper
* @return
*/
public static String readLine(String message)
{
String s = null;
System.out.println(message);
try {
InputStreamReader converter = new InputStreamReader(System.in);
BufferedReader in = new BufferedReader(converter);
s = in.readLine();
} catch (Exception e) {
System.out.println("Error! Exception: "+e);
} finally {
System.out.println("");
}
return s;
}
}
class GetAction implements PrivilegedExceptionAction<String> {
private String toke;
private String user;
private String testEjbItf="test.ejb3.TestServiceItf";
// context.lookup("ejb:" + appName + "/" + moduleName + "/" + distinctName + "/" + beanName + "!" + viewClassName);
private String testEjbJndi="ejb:/sl-securityTestEjb3//TestServiceSLEJB3Bean!test.ejb3.TestServiceItf";
public GetAction(String user , String token) {
this.user = user;
this.toke=token;
}
static {
try {
Sasl.createSaslClient(new String[]{"PLAIN"}, null, "remoting", "ux2084", Collections.EMPTY_MAP, new NamePasswordCallbackHandler2("rrad","radoslaw13" ) );
} catch (SaslException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
// make shure
public String run() throws Exception {
//Sasl.createSaslClient(new String[]{"GSSAPI"}, null, "remoting", "ux2084", Collections.EMPTY_MAP, new NamePasswordCallbackHandler2("xxx","yyy" ) );
//Sasl.createSaslClient(new String[]{"PLAIN"}, null, "remoting", "ux2084", Collections.EMPTY_MAP, new NamePasswordCallbackHandler2("xxx","yyy" ) );
javax.security.auth.Subject currentSubject = javax.security.auth.Subject.getSubject( AccessController.getContext());
if ( currentSubject == null ) System.out.println(" our Action runs as Subject: null ");
else System.out.println(" our Action runs as Subject: "+currentSubject.toString());
Context ctx = getInitialContext();
System.out.println("Initial Context created");
System.out.println("lookup"+testEjbJndi+" @RolesAllowed({\"BackofficeRole\"})");
Class itfClass = Thread.currentThread().getContextClassLoader().loadClass(testEjbItf);
TestServiceItf testService = (TestServiceItf) ctx.lookup(testEjbJndi);
System.out.println("lookup testEjbJndi successful");
System.out.println(" call unsecured Method permittAllMethod()");
Subject asu = testService.permittAllMethod(" calling unsecured");
System.out.println(" successfully called, received Subject: "+asu);
System.out.println(" call secured Method with role "+testService.BACKOFFICE_ROLE);
asu = testService.pwvAuthenticatorSecuredMethod(" calling secured");
System.out.println(" successfully called, received Subject: "+asu);
return "Test ok";
}
private static Context getInitialContext() throws NamingException {
final Hashtable jndiProperties = new Hashtable();
jndiProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
jndiProperties.put(Context.SECURITY_AUTHENTICATION, "GSSAPI");
final Context context = new InitialContext(jndiProperties);
return context;
}
}
class NamePasswordCallbackHandler2 implements CallbackHandler
{
/**
* The username to be provided when prompted.
*/
private String username;
/**
* The password to be provided when prompted.
*/
private String password;
private String url;
/**
* Create a new NamePasswordCallbackHandler (required Cams default
* constructor that is dynamically called by the authentication
* server).
* @param anURL
* @param callbackPwd
* @param callbackUser
*/
public NamePasswordCallbackHandler2(String callbackUser, String callbackPwd)
{
this.username = callbackUser;
this.password = callbackPwd;
}
/**
* Set the username.
*
* @param username the username to be provided to a NameCallback.
*/
public void setUsername(String username)
{
if (username == null)
{
this.username = "";
return;
}
this.username = username;
}
/**
* Set the password.
*
* @param password the password to be provided to a PasswordCallback.
*/
public void setPassword(String password)
{
if (password == null)
{
this.password = "";
return;
}
this.password = password;
}
public void handle(Callback[] callbacks)
throws IOException, UnsupportedCallbackException
{
for(int i = 0; i < callbacks.length; i++)
{
if(callbacks[i] instanceof TextOutputCallback)
{
// Display the message according to the specified type
TextOutputCallback toc = (TextOutputCallback)callbacks[i];
switch(toc.getMessageType())
{
case TextOutputCallback.INFORMATION:
log(toc.getMessage());
break;
case TextOutputCallback.ERROR:
log("ERROR: " + toc.getMessage());
break;
case TextOutputCallback.WARNING:
log("WARNING: " + toc.getMessage());
break;
default:
throw new IOException("Unsupported message type: "+toc.getMessageType());
}
}
else if(callbacks[i] instanceof NameCallback)
{
// If username not supplied on cmd line, prompt the user for the username.
NameCallback nc = (NameCallback)callbacks[i];
if (username == null || username.isEmpty()) {
System.err.print(nc.getPrompt());
System.err.flush();
nc.setName((new BufferedReader(new InputStreamReader(System.in))).readLine());
}
else {
log("username: "+username);
nc.setName(username);
}
}
else if(callbacks[i] instanceof PasswordCallback)
{
PasswordCallback pc = (PasswordCallback)callbacks[i];
// If password not supplied on cmd line, prompt the user for the password.
if (password == null || password.isEmpty()) {
System.err.print(pc.getPrompt());
System.err.flush();
// Note: JAAS specifies that the password is a char[] rather than a String
String tmpPassword = (new BufferedReader(new InputStreamReader(System.in))).readLine();
int passLen = tmpPassword.length();
char[] passwordArray = new char[passLen];
for(int passIdx = 0; passIdx < passLen; passIdx++)
passwordArray[passIdx] = tmpPassword.charAt(passIdx);
pc.setPassword(passwordArray);
}
else {
String tPass = new String();
for(int p = 0; p < password.length(); p++)
tPass += "*";
log("password: "+tPass);
pc.setPassword(password.toCharArray());
}
}
else if(callbacks[i] instanceof TextInputCallback)
{
// Prompt the user for the username
TextInputCallback callback = (TextInputCallback)callbacks[i];
System.err.print(callback.getPrompt());
System.err.flush();
callback.setText((new BufferedReader(new InputStreamReader(System.in))).readLine());
}
else
{
throw new UnsupportedCallbackException(callbacks[i], "Unrecognized Callback");
}
}
}
private void log(String str) { System.out.println(str); }
Happy New Year
Radek Rodak
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/644551#644551]
Start a new discussion in JBoss AS 7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 12 months
[JBoss Messaging Development] - JMS Client Connection Factory lookup failed
by Ashutosh Pandey
Ashutosh Pandey [http://community.jboss.org/people/ashutoshpandey.in] created the discussion
"JMS Client Connection Factory lookup failed"
To view the discussion, visit: http://community.jboss.org/message/644254#644254
--------------------------------------------------------------
Hi friends and senior developers, I'm trying to run JMS example on *JBoss as 7* which is running fine on *glassfish 3*
I added a queue using the "cli" file and also deployed MDB
I tried the code:
*final Context iniCtx = new InitialContext();*
*TopicConnectionFactory qcf = (TopicConnectionFactory) iniCtx.lookup("ConnectionFactory");*
The second line causes the error : *Need to specify class name in environment or system property*
I tried to set InitialContextFactory as we did in JBoss 4.x days but failed.
I'm searching lot of documents in past 2 days but not able to run. I've tried adding JBoss runtime library and various jar files like marshalling, ejb-client etc. but of no use.
I also tried to run this code from EJB project and from Java project ( in Eclipse Indigo ) but still same error.
Please somebody tell me what is I'm missing
I hope somebody solve my problem
Thanks in advance...
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/644254#644254]
Start a new discussion in JBoss Messaging Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 12 months