Help - Search - Members - Calendar
Full Version: J2ee Ri 1.3 On Red Hat 9.0 Linux
Linuxhelp > Support > Technical Support
untz
Hello...

I download the Java 2 EE SDK 1.3.1 Reference Implementation from http://java.sun.com...

I untarred it into:

Logging into Red Hat 9.0 as "root"

/usr/java/j2skee1.3

then did this:

chmod a+x -R /usr/java/j2sdkee1.3

I, also set up the appropriate CLASSPATH & PATH variables...

I logged out of "root" and logged back in as "untz" (this is my user name under Linux)...

I then did this:

$ cd /j2ee_projects/tmp/
$ j2ee -verbose

I got the following:

================================================================================
=======================================
Warning: This J2EE SDK release is designed to run on J2SE 1.3
J2EE server listen port: 1050
Naming service started:1050
Binding DataSource, name = jdbc/DB2, url = jdbc:cloudscape:rmi:CloudscapeDB;create=true
Binding DataSource, name = jdbc/EstoreDB, url = jdbc:cloudscape:rmi:CloudscapeDB;create=true
Binding DataSource, name = jdbc/Cloudscape, url = jdbc:cloudscape:rmi:CloudscapeDB;create=true
Binding DataSource, name = jdbc/DB1, url = jdbc:cloudscape:rmi:CloudscapeDB;create=true
Binding DataSource, name = jdbc/InventoryDB, url = jdbc:cloudscape:rmi:CloudscapeDB;create=true
Binding DataSource, name = jdbc/XACloudscape, url = jdbc/XACloudscape__xa
Binding DataSource, name = jdbc/XACloudscape__xa, dataSource = COM.cloudscape.core.RemoteXaDataSource@4d76b4
Starting JMS service...
Couldn't start JMS service...
java.io.FileNotFoundException: /usr/java/j2sdkee1.3/logs/localhost.localdomain/jms/jms/error.log (Permission denied)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:177)
at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
at java.io.FileWriter.<init>(FileWriter.java:61)
at com.sun.enterprise.log.FileLogWriter.<init>(FileLogWriter.java:26)
at com.sun.enterprise.log.LogUtil.getLog(LogUtil.java:129)
at com.sun.enterprise.jms.ExternalManagerImpl.<init>(ExternalManagerImpl.java:42)
at com.sun.enterprise.jms.JmsUtil.getJMSManager(JmsUtil.java:93)
at com.sun.enterprise.jms.JmsUtil.startJmsService(JmsUtil.java:172)
at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:273)
at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:913)
java.io.FileNotFoundException: /usr/java/j2sdkee1.3/logs/localhost.localdomain/jms/jms/error.log (Permission denied)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:177)
at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
at java.io.FileWriter.<init>(FileWriter.java:61)
at com.sun.enterprise.log.FileLogWriter.<init>(FileLogWriter.java:26)
at com.sun.enterprise.log.LogUtil.getLog(LogUtil.java:129)
at com.sun.enterprise.jms.ExternalManagerImpl.<init>(ExternalManagerImpl.java:42)
at com.sun.enterprise.jms.JmsUtil.getJMSManager(JmsUtil.java:93)
at com.sun.enterprise.jms.JmsUtil.startJmsService(JmsUtil.java:172)
at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:273)
at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:913)
java.io.FileNotFoundException: /usr/java/j2sdkee1.3/logs/localhost.localdomain/jms/jms/error.log (Permission denied)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:177)
at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
at java.io.FileWriter.<init>(FileWriter.java:61)
at com.sun.enterprise.log.FileLogWriter.<init>(FileLogWriter.java:26)
at com.sun.enterprise.log.LogUtil.getLog(LogUtil.java:129)
at com.sun.enterprise.jms.ExternalManagerImpl.<init>(ExternalManagerImpl.java:42)
at com.sun.enterprise.jms.JmsUtil.getJMSManager(JmsUtil.java:93)
at com.sun.enterprise.jms.JmsUtil.startJmsService(JmsUtil.java:172)
at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:273)
at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:913)

java.lang.RuntimeException: /usr/java/j2sdkee1.3/logs/localhost.localdomain/jms/jms/error.log (Permission denied)
at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:350)
at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:913)
J2EE server reported the following error: /usr/java/j2sdkee1.3/logs/localhost.localdomain/jms/jms/error.log (Permission denied)
Error executing J2EE server ...
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

How do I set up the permission so that the everything in the /usr/java/j2sdkee1.3/ directory is usable by "root" & also "untz"?

As "root" everything works, so exactly what do I put after the "chmod" in:

chmod /usr/java/j2sdkee1.3/

?

Also should I use chown instead? If so what the the complete set of commands to type on the command line?

Thanks again...
hughesjr
if untz is going to be the ONLY user to use the j2ee then you could do a chown and it should work fine ... the command would be:

chown -R untz:group /usr/java/j2sdkee1.3

(substitute untz's primary group for group)
untz
Thanks...

I want to be used by "root" & "untz"... How do I find what "group" to put in?

-Unnsse
hughesjr
the easiest way is to do the command:

ls -al

in untz's home directory ...

The result will be something like this:

-rw-r--r-- 1 root root 910 2003-11-18 07:21 windows_trace

the forth column (the bold one) is the group ... it will probably be untz or users ....
untz
Is there a way to give permission to "untz" & "root" at the same time? Is there a way to give permissions to all users?
hughesjr
I think you could create a group called java:
groupadd java

then assign root & untz as members of the java group
usermod -G java untz
usermod -G java root

then change the permissions on the directory to 775 (so all group members have write permissions)
chmod -R 775 /usr/java/j2sdkee1.3/

then change the owner of the directory so that it belongs to the java group
chown -R untz:java /usr/java/j2sdkee1.3/

Now add all other users you want to group java .... you didn't say what distro you had, but most have a graphical way to modify groups and users .... if your box has several hundred users that you want to add to the java group, we could right a script to add the users.
----------------------------------------
You will also want to change the umask permissions on both untz and root (and any other users you want in the java directory) so that their umask is set to 0002.

To do this, go to each users home directory (that you have in the java group) and edit the file .bashrc and/or .bash_profle ... normally this is set in .bash_profile. If there is already a umask line, change it to umask 0002. If there is not a umask in either file, add this as the last line of .bash_profile.... umask 0002. You also need to setup CLASSPATH & PATH in each user's .bash_profle. (Again ... if you have several hundred users, we could write a script to do this).

If you are going to make all users (including newly added users) members of the java group, then go to the file /etc/skel/.bash_profile and change (or add) the umask in that file to umask 0002.

{/etc/skel/.bash_profile is the .bash_profile that will be copied to new users ... you would also need to put any other required variables in there for this program ... like CLASSPATH & PATH}

.... (I am assuming you are using /bin/bash as the login shell for all your users on linux ... if you are using a different shell, the login files won't be .bashrc and/or .bash_profile).
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.