Solved

How to use JBoss?

Posted on 2004-08-23
18
739 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
 
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

744 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now