At 04:19 PM 07/14/2000 +0100, you wrote:

>Anyone had any success with the above?
>
>i just downloaded the jdk1.3beta that was released yesterday, and after
>fiddling around with classpaths etc i finally got jboss running and
>autodeploying w/o errors.
>
>problem is from the client side, when i try to access a bean, i always end
>up with something like:
>javax.naming.CommunicationException [Root exception is
>java.io.StreamCorruptedException: Type code out of range, is 125]
>
>this happens both with my own beans and the supplied Bank example beans,
>already when doing a lookup.
>btw, whose idea was it to bundle an example bean jar, with no
>documentation, no source and no client/test apps?!? or maybe it's just me
>who can't find them.
>
>it should be said that i've never managed to get any beans working on
>jboss, but the ones i've tried have all been running successfully on other
>ejb servers (orcas4.0.0)
>
>cheers for what looks like a great project, though maybe you should try to
>catch up on documentation some time (Rikard - dokumentera mera!).

I've added some more specifics on how to do this to the Bugzilla bug we're 
using to keep track of changes to the jBoss documentation, bug #133. Here's 
what I said....

Comments on jBoss Installation Documentation

1) The first heading, "What this article is about", is not needed.

2) In the first paragraph, the first mention of jBoss should have a link to 
the jBoss Web site, <A HREF="http://jboss.org/">jBoss</A>. At the end of 
the first paragraph, there shouldn't be an apostrophe in "one's I've assumed".

3) In the second paragraph (beginning with "jBoss is an implementation of 
the EJB 1.1 specification,") the phrase "EJB 1.1 specification," could be a 
link to the spec, <A HREF="http://java.sun.com/products/ejb/docs.html">EJB 
1.1 specification,</A>

4) In the sentence, "In this it is similar to Sun's `J2SDK Enterprise 
Edition' (J2EE), but jBoss is much more single-minded than J2EE", would be 
a good place to explain the chief advantages of jBoss over the Sun J2EE 
Reference Implementation. Instead of "but jBoss is much more single-minded 
than J2EE" it would be better to say, "but jBoss is an Open Source 
implementation which can be used for commercial purposes" (or whatever you 
think is the chief advantage of jBoss over J2EE). So here's how I think the 
sentence should be worded: "It is similar to Sun's `J2SDK Enterprise 
Edition' (J2EE), but jBoss is an Open Source implementation which can be 
used for commercial purposes."

5) In the next paragraph, the sentence "You get no support, of course" is 
misleading to people who are not familiar with Open Source projects. 
Support is always available for Open Source projects, but not directly from 
the vendor (because there are many cooperating "vendors"). This paragraph 
actually deals with two completely different topics (hot deployment and 
Open Source/GPL/support). I think it should be broken into two paragraphs, 
and the new paragraph dealing with Open Source/GPL/support should be: 
'jBoss is distributed under the <A 
HREF="http://www.gnu.org/copyleft/copyleft.html">GNU public licence</A>, 
which means that it's free, even for commercial work, and is likely to 
remain that way. As with most Open Source projects, support is available 
from third-party vendors and an active <A 
HREF="http://jboss.org/mailing.htm">mailing list</A> of enthusiastic 
volunteers.'

6) The paragraph starting with "The main weakness of jBoss is its 
documentation" is the opposite of a self-fulfilling prophecy: if this 
article (and its cousins) do their job, the weakness goes away. It might be 
more accurate to say, "Like jBoss itself, the jBoss documentation is still 
evolving. You can start with this article, describing step-by-step how a 
simple EJB can be created, deployed and tested on the jBoss server, then 
use the mailing list and other documentation (to be added later) for more 
advanced topics."

7) On the next page, <http://www.web-tomorrow.com/jboss1.html>, the first 
paragraph is a bit confused. "The first step" isn't really the first step 
-- the rest of the paragraph says the very first step is to get your JDK 
running, then it doesn't give detailed directions on how to do that. It 
seems to me that we need details, but that they should be in a separate 
page, off of the main flow of the installation instructions. (After all, if 
the reader already has JDK 1.3 installed, there's no need to go through the 
details.)

First, login to your Linux system as root. You must have administrator 
access to install the JDK correctly.

Download JDK 1.3. Here are two sources: Sun's <A 
HREF="http://java.sun.com/j2se/">Java<SUP><FONT SIZE="-2">TM</FONT></SUP> 2 
SDK, Standard Edition, v 1.3</A> and IBM's <A 
HREF="http://www.ibm.com/java/jdk/download/index.html">JDK</A>. (We'll give 
step-by-step instructions for Sun's version.)

You can use your favorite Web browser to download the JDK to your Linux 
machine. If you use Lynx, the text-only browser that comes with Redhat, you 
can download it directly to your Linux machine, even if your Linux machine 
doesn't have a graphical browser installed. Use this command:

# lynx http://java.sun.com/j2se/1.3/

Then navigate the page, using the down arrow until you highlight the link 
to download the Linux version of the Java(TM) 2 Platform, Standard Edition 
version 1.3 (currently, the link has the text "Linux Beta" but that should 
change soon). Press the enter key. The next page asks you to register or 
login. Use the down arrow to move between fields, type your user ID and 
password, then use down arrow to "Log in" and press enter. Accept any 
cookies the server throws at you.

On the next page (titled "Java(TM) 2 SDK, Standard Edition, v 1.3.0 Beta"), 
use the arrow keys to navigate to "One large bundle" then press enter on 
"Select Install Format." If you're using Redhat Linux, you can arrow down 
to "Red Hat (RPM)" and press enter. Arrow down to "continue" and press 
enter again. (If you're not using Redhat, choose gunzip-tar.) This will 
bring you to the "License & Export for Java(TM) 2 SDK, Standard Edition 
1.3.0" page.

On the "License & Export for Java(TM) 2 SDK, Standard Edition 1.3.0" page, 
read through the license and arrow down to "ACCEPT" then press enter.

On the next page, "Download Java(TM) 2 SDK, Standard Edition 1.3.0", arrow 
down to "FTP download" and press enter. (Or, if you're behind a firewall, 
arrow down to "HTTP download" and press enter.) Either way, Lynx will ask 
you if you want to D)ownload, or C)ancel. Press D. Now you wait for a 
while. After Lynx eventually downloads the 39 megabyte RPM file to a 
temporary location, it will ask you for a file name. Use the default name, 
"j2sdk-1_3_0-beta-linux.rpm". When Lynx is done, you can quit by pressing Q.

Now under Redhat, you can type this command:
# rpm --install j2sdk-1_3_0-beta-linux.rpm

This will install the JDK in this directory:
/usr/java/jdk1.3

Remember that directory. It will be important later on.

If you have installed a different JDK (like the one from IBM) or you have 
installed it in a different directory, you'll need to know the name of that 
directory. You can find it like this:
# find / -name javac -print

This will print out a list of all of the directories containing the Java 
compiler, javac. My system still has the older JDK 1.2.2 and the IBM JDK on 
it, so my system tells gives me this result:

/usr/local/jdk1.2.2/bin/i386/native_threads/javac
/usr/local/jdk1.2.2/bin/i386/green_threads/javac
/usr/local/jdk1.2.2/bin/javac
/usr/java/jdk1.3/bin/i386/green_threads/javac
/usr/java/jdk1.3/bin/i386/native_threads/javac
/usr/java/jdk1.3/bin/javac
find: /proc/6/fd: Permission denied
/opt/IBMJava2-13/bin/exe/javac
/opt/IBMJava2-13/bin/javac

 From that list, I can tell that my newly-installed Sun JDK 1.3 is in 
/usr/java/jdk1.3. (I can also see that I don't have a floppy in the drive 
-- that's what the "Permission denied" message is about.)

You now need to add /usr/java/jdk1.3/bin directory to your PATH environment 
variable. You use one of the following commands depending on your shell.

.bash:

PATH=$PATH:/usr/java/jdk1.3/bin

csh, tcsh:

# set path=($PATH /usr/java/jdk1.3/bin)

sh:

# PATH=($PATH /usr/java/jdk1.3/bin); export $PATH

You should also add these lines to your .bash_profile, .profile and .cshrc 
files so you won't have to do this every time you login. Note that your 
shell will usually find the first occurrence of a program along your path, 
so if you have more than one version of Java installed, you should add only 
one to your path at any time. To find out the path to the version of Java 
that will run when you enter a java command, type this:

# which java

Adjust your path until this command tells you /usr/java/jdk1.3/bin. You may 
need to edit your .bash_profile (or other file) then do this command:

# source .bash_profile


(Meanwhile, back at jBoss-specific installation procedures)

8) In the paragraph starting "It doesn't matter very much where you install 
jBoss" I don't happen to agree with your suggestion of /usr/lib/jboss/. I 
think local applications belong in /usr/local/, so I like 
/usr/local/jboss/. (What does everyone else think? Where is jBoss installed 
on your Linux system?)

9) The paragraph starting 'jBoss is distributed as a ZIP archive,' could be 
modified to include a link to the jBoss binary like this: 'jBoss is 
distributed as a <A HREF="http://www.telkel.com/binary/jboss.zip">ZIP 
archive,</A>'

10) Before telling the reader how to do the jar/unzip command, we ought to 
suggest how to create the directory and download the Zip file to the Linux 
machine, something like this:

mkdir /usr/local/jboss
cd /usr/local/jboss
lynx -source http://www.telkel.com/binary/jboss.zip > jBoss-2.0.zip
jar xvf jBoss-2.0.zip
rm -f jBoss-2.0.zip
cd bin
java -jar run.jar

(That kinda takes all of the guessing out of the process, doesn't it? All 
the reader needs to do is to copy/paste that block of commands to the Linux 
prompt and jBoss is up and running. We could label this the "Quick Start 
Procedure.")

11) In file <http://www.jboss.org/jboss1.html>, in the paragraph starting, 
"If the JDK binaries aren't in the PATH" won't the previous command (java 
-jar run.jar) fail if the JDK binaries aren't in the PATH? It seems like a 
good idea to organize these "Things to watch out for" a little better, like 
a list of error messages often seen during start-up and a corrective action 
for each, something like this:

<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=5 BGCOLOR="#FFFF80">
   <TR VALIGN="TOP">
     <TH>Error Message</TH>
     <TH>Corrective Action</TH>
   </TR>

   <TR VALIGN="TOP">
     <TD>bash: java: command not found</TD>
     <TD>The JDK binaries aren't in the PATH. Check your PATH environment 
variable and try the command<PRE># which java</PRE>See the section on 
downloading and installing the JDK.</TD>
   </TR>

   <TR VALIGN="TOP">
     <TD>[hypersonic] System.run/init: database is in use by a different 
process</TD>
     <TD>The JDK binaries aren't in the PATH. If you get this message, the 
SQL server hasn't started, and there will be a whole heap of other errors 
later. Check your PATH environment variable and try the command<PRE># which 
java</PRE>See <A HREF="#somewhere_else">the section on downloading and 
installing the JDK.</A></TD>
   </TR>

   <TR VALIGN="TOP">
     <TD>Failed to load Main-Class manifest attribute from<BR>
       run.jar</TD>
     <TD>You're not in the right directory and Java can't find file 
run.jar. Try this:<PRE># cd /usr/local/jboss/bin</PRE></TD>
   </TR>

   <TR VALIGN="TOP">
     <TD>[Webserver] java.net.UnknownHostException:...</TD>
     <TD>The jBoss server tries to establish its host's IP number when it 
starts up. If it can't do this, you will see this error message. This 
problem is quite common on systems that get their network configuration 
parameters dynamically. For example, if your computer connects to the 
Internet by a dial-up connection, and you cancel the dial-up process, you 
may end up with a hostname that doesn't make sense. You can re-establish 
your connection or you can temporarily reset your hostname to `localhost' 
like this: <PRE># hostname localhost</PRE></TD>
   </TR>

   <TR VALIGN="TOP">
     <TD>[Webserver] java.net.BindException: Address already in use</TD>
     <TD>This probably means you already have jBoss running and you're 
trying to start it a second time. Use this command:<PRE># ps ax | grep 
run.jar</PRE>to determine the process ID of the previous attempt to invoke 
jBoss then use kill -9 (pid) to kill that PID. Restart jBoss.</TD>
   </TR>

   <TR VALIGN="TOP">
     <TD>[Container factory] No configuration chosen. Using default 
configuration</TD>
     <TD>No corrective action necessary. This means that a particular EJB 
did not have a jboss.xml file in its META-INF directory (which is inside 
the EJB's .jar file in the deploy/ directory). This isn't a real problem; 
jBoss will just use its default configuration. If you want to change the 
configuration, see <A HREF="#somewhere_else">the section on jboss.xml.</A></TD>
   </TR>

   <TR VALIGN="TOP">
     <TD>[Container factory] javax.management.InstanceNotFoundException: 
DefaultDomain: service=Webserver</TD>
     <TD>TBD</TD>
   </TR>

   <TR VALIGN="TOP">
     <TD>[JMX RMI Adaptor] Started<BR>
       java.net.BindException: Address already in use</TD>
     <TD>TBD</TD>
   </TR>

</TABLE>

12) I think it would be worthwhile to tell readers how to set up jBoss in 
/etc/rc.d/init.d/ so that it will restart every time the system reboots.

13) Per the e-mail note listed as another attachment to bug #133, I think 
it would be worthwhile to give details on how to configure jBoss with MS 
SQL Server. (This may be beyond the scope of the introductory installation 
and how-to guide, and may be put in an "Advanced jBoss Installation" section.)

14) It would also be worthwhile to give details on how to configure jBoss 
with MySQL. ("Advanced jBoss Installation" section.)

15) We should have a parallel documentation set detailing installation on 
Windows NT and any other commonly-used platforms. One way to implement this 
would be to use servlets or JavaScript and ask the reader which system he's 
using, then customize the documentation for that system.

-- Ken Jenks, http://abiblion.com/

    Tools for reading.


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to