Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439

You may have a problem with the default browser (Galeon or Mozilla) not displaying the �console tree� on the left. In order to do this, you need to setup a Java Plugin on this browser.

From a command prompt, you need type in the following commands

mkdir ~/.mozilla/plugins
ln �s /opt/JDK-1.4.2/jre/plugin/i386/ns610-gcc32/libjavaplugin_oji.so ~/.mozilla/plugins

You then need to restart the browser.

 

Q9: I get the error message �The WebLogic Server did not start up properly

You also see:

Exception raised: 'weblogic.server.ServiceFailureException: Could not obtain an exclusive lock to the embedded LDAP data files directory: ./myserver/ldap/ldapfiles because another WebLogic Server is already using this directory. Ensure that the first WebLogic Server is completely shutdown and restart the server.'

 

This can mean either:

  1. You are running more than one copy of WebLogic on the machine
  2. You are running WebLogic on Charlie
  3. You did not stop the weblogic server correctly.

You should not run more than one copy of WebLogic on a workstation, and you are not allowed to run weblogic on charlie or sally. !!

If you didn�t stop weblogic via the wlstop or the shutdown console option, you may need to remove a lock file.


You can do this with the following command:


rm ~/webLogic/$USER/myserver/ldap/ldapfiles/*.lok



(note: you can replace the $USER path with your username)


You can then restart the server.

 

Q10: I want to run WebLogic at home

There are 2 options

  1. Install WebLogic on your home machine. This can be on a Windows 2000/XP machine (see Q11) or on a Linux redhat 8 machine.
  2. Remotely access the Faculty�s machines via the internet (see Q12)

 

Q11: Running WebLogic at home on windows 2000

You will need to download WebLogic server 8.1 from BEA
You can do this by connecting to
You will be asked to register with BEA to download.

 

Because the files are rather large, it may be best to download with Broadband connections or to login to the ITD machines on level 2 (the open air lab with black Dell workstations with LCD screens). The ITD lab machines also have the advantage of having a CD burner built in J!

 

The basic machine requirements to run WebLogic Server 8.1 are:
Windows 2000 SP2 or Windows XP SP1
Pentium III-700Mhz
256Mb Memory (prefer 512Mb)
400Mb disk space

Please install the WebLogic Server 8.1 with SP1 (*not* platform, as this file is over 450Mb large!).

There are 2 modes of installing:

  1. Net Installer
  2. Package installer.

 

The Net Installer will download a 20Mb file. This installer will download components that you need. However, you need to be connected to the internet to run this installer.
The Package installer is the entire WebLogic 8.1 server in one executable. This file is rather large, 259Mb.

Once you have downloaded the installer, just execute it and follow the prompts. It is a good idea to install the samples (the default configuration will work just fine.)

Just remember that the directory structure is different, mostly following the Windows conventions.

 

In general, after you install weblogic server, you run the QuickStart to create a new domain configuration.

 

This by default, creates a domain called "mydomain".

 

The setup dialogs ask you to enter the name (default is "myserver"), listen address, listen port and the admin username and password.
YOU choose what the username and password is (the default username is "weblogic" - you CAN change this to "system".

 

The default directory structure is:

c:\bea\user_projects\domains\mydomain
(this is the equivalent to your usual ~/webLogic/$USER directory)

 

Note that it DOESN'T install the DefaultWebApp.
To install this:

(1)     go back to QuickStart

(2)   Create/Extend Domain configuration

(3)   Extend an existing WebLogic configuration

(4)   Select mydomain in the filetree (hint: expand the domains folder to see this. Be careful, you *must* select it explicitly)

(5)   Select the DefaultWebApp configuration extension

(6)   *IMPORTANT STEP*: When you get to the "Create WebLogic Configuration" screen, choose the Configuration Applications Location by pressing the Browse button. By default, Weblogic on Windows places the DefaultWebApp in c:\bea\user_projects\applications\mydomain.

(7)   Instead, select
c:\bea\user_projects\domains\mydomain\applications
You then press Import to load it.

(8)   Note that in the console, instead of the domain being your faculty userid, it will display mydomain.

 

 

 

 

 

Q12: Running WebLogic remotely (from the internet or other machines in UTS)

Basically, you will need to use SSH to connect to a workstation, and then use a recent browser to access the WebLogic console.

 

*CAUTION*: You need to CHECK that no one else is using WebLogic on the target workstation. Please use common sense and courtesy when you do this as someone may need the workstation for their lab or assignment work. Check the lab schedules on the start.it.uts.edu.au web site to ensure the room isn�t booked.

Step1: Determine the name of the workstation.

You should have a workstation that you are using in the labs. This is displayed on the login prompt and on the X-Console window. This looks something like: zigzager The full internet name of this machine would be zigzager.it.uts.edu.au

Step2: Check that the machine isn�t being used.

The simplest method is to use a browser to see if WebLogic is running
ie:
http://zigzager.it.uts.edu.au:7001/console.
If you get an error about the server not being found or not responding, this is GOOD and means no one is currently running WebLogic.
We will do one more check to see if anyone is using the machine.

Step3: Use an SSH compliant client to access this machine.

We highly recommend using:
SSH (on the unix machines)
Putty (on the FIT Windows lab machines)
TeraTerm Pro (on the ITD windows lab machines)

This is very much like Telnet, except it is encrypted. If the client asks you to accept a key, please do so.
You should get a prompt to enter your userid and password.
This provides a session much like the Xterminal consoles you get on the unix machines.
You SHOULD check that no one else is using the workstation at the moment.
Type:
who at the commmand prompt to check.

Step4: Use the session

You should start multiple sessions with your SSH client. One should be used to start WebLogic (hint: wlstart). The other can be used for other purposes (eg: wlstop)

Step5: Access WebLogic remotely via a browser

Where ever the lecture/lab notes refer to localhost, replace this with the full internet name of your machine. For example,
http://zigzager.it.uts.edu.au:7001/console
Don�t forget to stop the WebLogic server cleanly when you are finished.

 

 

Q13: The WebLogic Server did not start up properly: Authentication denied

I get the following message:

The WebLogic Server did not start up properly.
Reason: weblogic.security.SecurityInitializationException: Authentication
denied: Bood identity not valid; The user name and/ or password from the
boot identity file (boot.properties) is not valid. The boot identity may
have been changed since the boot identity file was created. Please edit
and update the boot identity file with the proper values of username and
password. The first time the updated boot identity file is used to start
the server, these new values are encrypted.

This occurs if you have corrupted the userid/password entry in your ~/webLogic/$USER directory.

You can fix this by editing boot.properties and ensuring the following entries are added

username=systempassword=password

 

WebLogic will automagically update your boot.properties file with an encrypted version of these entries. This MAY look like the following

#Sun Aug 10 15:51:40 EST 2003password={3DES}Xsy8MY0hgZDcoUoXe6Lv/Q\=\=username={3DES}1XDkCIg77y8\=

 

Q14: Connect to Oracle database from home

Q15: Using other databases with WebLogic

 

Unfortunately, the main Oracle database, dragon.it.uts.edu.au , is firewalled from the rest of the internet - this means that you can't run it from home.

 

However, you can run any ODBC enabled database instead.

Refer to the link called�Microsoft Access example using JDBC-ODBC bridge� in the JDBC lab notes page

In this case, your dbdriver is now
sun.jdbc.odbc.JdbcOdbcDriver
and your dburl is
jdbc:odbc:mydsn
(where you define mydsn in the Windows Control Panel -> Data Sources (ODBC) )
For example, you can use Excel as your database (see ) for how to do this.
Note that the table name is the Sheet name in brackets
eg:
SELECT * FROM [Sheet1$] You will also have to create the excel spreadsheet by hand J!

If you followed the JDBC lab notes, and am using Connection Pools + Data Sources, your code should be portable by merely changing the data source details in WebLogic!

 

 

Q16: I can't get the console tree showing up on my browser (I get this funny block symbol instead)

Q17: Java applets don't work on Mozilla or Galeon on the Linux machines

There is a known bug in the install of the Java JDK on the Linux machines. For most people, this has been fixed, but you might be the unlucky few with a problem.

You need to setup a Java Plugin on Mozilla/Galeon.

From a command prompt, you need type in the following commands

mkdir ~/.mozilla/plugins
ln �s /opt/JDK-1.4.2/jre/plugin/i386/ns610-gcc32/libjavaplugin_oji.so ~/.mozilla/plugins

You then need to restart the browser.

本站部分内容来自互联网,仅供学习和参考