Solved

How to use JBoss?

Posted on 2004-08-23
18
743 Views
Last Modified: 2012-06-21
I have Jboss installed on ma system.. i have started it using run.bat.. it prints a trillion lines on the Command prompt and then waits for something.. following are the last lines

) DOMSource node as this type not supported.]
14:26:22,289 INFO  [URLDeploymentScanner] Started
14:26:22,289 INFO  [MainDeployer] Deployed package: file:/C:/jboss-3.0.4_tomcat-
4.1.12/server/default/conf/jboss-service.xml
14:26:22,289 INFO  [Server] JBoss (MX MicroKernel) [3.0.4 Date:200211021607] Started in 1m:37s:861ms


nd now... i want to know. what to do next? how to check if JBoss is running or not. n how to deploy my EJB with it.. after deploying how to access those beans.. i have been searching for it for 5 hours.. n all gone in vein.. plz help me..
0
Comment
Question by:aiklamha
  • 4
  • 4
  • 4
  • +2
18 Comments
 
LVL 35

Expert Comment

by:girionis
ID: 11868727
If you don't get any error message then JBoss is probably up and running. For all the other info look at the documentation that comes with JBoss.
0
 
LVL 35

Expert Comment

by:TimYates
ID: 11868819
go to :

http://localhost:8080/jmx-console

the you will see if it is running :-)

Looks like it is, so you need to drop your EJB jar file into server/default/deploy
0
 
LVL 17

Author Comment

by:aiklamha
ID: 11869117
I tried the link but it is not working... what does that mean?
How can i see what error JBoss is giving? caz i mentioned earlier that it is printing some trillion lines. then looks like stopped to take breathe...
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 35

Expert Comment

by:girionis
ID: 11869163
It probably means that JBoss is not running.
0
 
LVL 35

Expert Comment

by:girionis
ID: 11869168
Try restarting it. Also make sur that you access the console by providng the HTTP port (8080).
0
 
LVL 35

Expert Comment

by:TimYates
ID: 11869193
> that it is printing some trillion lines.

It prints about 600 - 1200 lines, look through them for an error ;-)

It is in

jboss/server/default/logs/server.log
0
 
LVL 6

Expert Comment

by:valipotor
ID: 11869622
Here is sample code to access a session bean named SessionBean1 which has a method named testMethod().
Before running this code the bean must be deployed in jboss.

1099 is JBoss default port.

 Hashtable environment = new Hashtable();

 environment.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
 environment.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
 environment.put(Context.PROVIDER_URL, "jnp://localhost:1099");
 Context context=new InitialContext(environment);

 //look up jndi name
 Object ref = context.lookup("SessionBean1");
 //look up jndi name and cast to Home interface
  SeesionBean1Home home = (SessionBean1Home) PortableRemoteObject.narrow(ref, SessionBean1Home.class);
  SessionBean1 bean = home.create();
  bean.testMethod();

Of course you have to catch the exceptions, and import some classes.

 valipotor
0
 
LVL 6

Expert Comment

by:valipotor
ID: 11869644

If the link doesn't work it means that JBoss isn't running. If there is an exception while loading the page, JBoss will generate a error page with the stack trace of the exception.

valipotor
0
 
LVL 17

Author Comment

by:aiklamha
ID: 11877960
I have mentioned that JBoss window is paused after printing all the lines(seems to load all the ejbs in server/deploy) now the last lines are.

 Depends On Me: javax.xml.transform.TransformerException: XSL-1101: (Fatal Error
) DOMSource node as this type not supported.]
09:19:17,485 INFO  [URLDeploymentScanner] Started
09:19:17,485 INFO  [MainDeployer] Deployed package: file:/C:/jboss-3.0.4_tomcat-
4.1.12/server/default/conf/jboss-service.xml
09:19:17,485 INFO  [Server] JBoss (MX MicroKernel) [3.0.4 Date:200211021607] Sta
rted in 1m:16s:509ms

any1 tell me what do these line suggest? JBoss is running or not?
0
 
LVL 35

Expert Comment

by:girionis
ID: 11878479
As far as I can tell they suggest it running. It says JBoss started.
0
 
LVL 6

Expert Comment

by:valipotor
ID: 11878557
Yes. jboss is running. But some part of it it's not running.
If you want more info post the entire description of the error, not just the last lines

>>> Depends On Me: javax.xml.transform.TransformerException: XSL-1101: (Fatal Error
>>> ) DOMSource node as this type not supported.]

I think some module or maybe your jar containing Ejb's is unable to read an xml file.
0
 
LVL 17

Author Comment

by:aiklamha
ID: 11878608
u mean i post the whole server.log? :o
0
 
LVL 6

Expert Comment

by:valipotor
ID: 11878668
not the whole server log, just the part with the exeception

this is how the log should look, each line starting with time stamp

>>09:19:17,485 INFO  [URLDeploymentScanner] Started
>>09:19:17,485 INFO  [MainDeployer] Deployed package: file:/C:/jboss-3.0.4_tomcat-
>>4.1.12/server/default/conf/jboss-service.xml
>>09:19:17,485 INFO  [Server] JBoss (MX MicroKernel) [3.0.4 Date:200211021607] Sta
rted in 1m:16s:509ms

so the exception output should be easy to recognize
0
 
LVL 17

Author Comment

by:aiklamha
ID: 11878799
Yuppiiiiiiiiii...
i again.. figured out the problem myself.. :)
it was a problemo with default Configuration set .. i started JBoss like

run.bat -c all

and now it doesn't print trillion lines.. just a million or two.. :) and now the above link is working...
Now i m thinking what to do with this Question
0
 
LVL 35

Expert Comment

by:TimYates
ID: 11879040
that means you are running it under a different configuration...

there are 3 configurations, "all", "default", and "minimal"

It is strange that "default" wasn't working for you...  what had you changed?

Now you are running the "all" configuration, you need to deploy your EJB jar (or EAR) -- and your libraries you use to

    jboss/server/all/deploy
    jboss/server/all/lib

respectivley, instead of

    jboss/server/default/deploy
    jboss/server/default/lib
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 12280068
PAQed, with points refunded (25)

Computer101
E-E Admin
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
This video teaches viewers about errors in exception handling.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question