Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to use JBoss?

Posted on 2004-08-23
18
Medium Priority
?
751 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:Muhammad Khan
  • 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:Muhammad Khan
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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:Muhammad Khan
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:Muhammad Khan
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:Muhammad Khan
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses

971 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