I've been using JBoss and retrieving beans for some time now successfully, but after
taking a break from a project over summer and reinstalling JBoss on my new PC it is no
longer working. If it makes a difference, I upgraded to Windows XP x64 edition and
NetBeans 6.0, same JBoss version (4.2.2 GA)
The specific error from JBoss is:
13:29:00,524 INFO [STDOUT] An error occured : There was a problem while talking to
216.19.36.215:22
I am attempting to access the bean locally and have tried using the -b 0.0.0.0 option,
with no luck. I'm confused because the JBoss server is acknowledging the connection,
but there is some sort of internal error that I am unaware of.
Here is some of the code in quesion:
public class ManagerClient {
|
| public static InitialContext INITIAL_CONTEXT = null;
|
| /**
| *Creates the ManagerClient with the provided URL to the Application Server
| *
| *@param providerURL URL of the JBoss Application Server
| *@throws NamingException If something goes wrong with the environement naming
| */
| public ManagerClient(String providerURL) throws NamingException {
|
| Properties env = new Properties();
|
| env.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
| env.put(Context.URL_PKG_PREFIXES,
"org.jboss.naming:org.jnp.interfaces");
| env.put(Context.PROVIDER_URL, providerURL);
|
| try {
| ManagerClient.INITIAL_CONTEXT = new InitialContext(env);
| } catch (NamingException ex) {
| ex.printStackTrace();
| System.exit(1);
| }
| }
|
| /**
| * Sets the default location of the JBoss Application Server
| *
| * @throws NamingException If something goes wrong with the environment naming
| */
| public ManagerClient() throws NamingException {
| this("jnp://localhost:1099");
| }
|
|
| /**
| * Creates the ManagerClient environment, then starts the meat of the program
| * in the ManagerFrame.
| * @param args the command line arguments
| */
| public static void main(String[] args) {
|
| try {
| new ManagerClient();
| } catch (NamingException ex) {
| ex.printStackTrace();
| System.exit(1);
| }
|
| new ManagerFrame("Manager");
|
| }
| }
and when I retrieve in the ManagerFrame,
dbm = (DataBaseManager)
ManagerClient.INITIAL_CONTEXT.lookup("ResourceGate-server/DataBaseManagerBean/remote");
| ssh = (SSHInterface)
ManagerClient.INITIAL_CONTEXT.lookup("ResourceGate-server/SSHBean/remote");
| secureTransfer = (SecureFileTransfer)
ManagerClient.INITIAL_CONTEXT.lookup("ResourceGate-server/SecureFileTransfer/remote");
Thanks for any help you can provide -- I am trying to finish this project up for
deployment this week and not being able to run it at all is frustrating :(.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4123890#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...