Home Database Mysql Tutorial DBCA启动问题(linux)

DBCA启动问题(linux)

Jun 07, 2016 pm 03:55 PM
linux list start up Report an error question

报错列表: 1、[oracle@linuxserver1~]$ dbca bash: dbca: command not found 2、[oracle@linuxserver1~]$ dbca Xlib: connection to :0.0refused by server Xlib: No protocol specified 3、[oracle@linuxserver1~]$ dbca Exception in thread main $ 4、[or

报错列表:

1、[oracle@linuxserver1~]$ dbca

bash: dbca: command not found

2、[oracle@linuxserver1~]$ dbca

Xlib: connection to ":0.0"refused by server

Xlib: No protocol specified

3、[oracle@linuxserver1~]$ dbca

Exception in thread "main" $

4、[oracle@linuxserver1~]$dbca

$JRE_DIR/bin/jre -DORACLE_HOME=$OH-DJDBC_PROTOCOL=thin -mx64m -classpath $CLASSPATHoracle.sysman.assistants.dbca.Dbca $ARGUMENTS等错误

5、系统原因

报错处理方式:

1、[oracle@linuxserver1~]$ dbca
bash: dbca: command not found

报错原因:环境变量设置错误,dbca 可执行文件就在 /usr/sbin:$PATH:$ORACLE_HOME/bin下

解决办法:修改.bash_profile中的参数设置

方法一:

[oracle@linuxserver1 ~]$vi .bash_profile

删除原先export PATH设置,

添加export PATH=/usr/sbin:$PATH:$ORACLE_HOME/bin

方法二:[oracle@linuxserver1 ~]$export PATH=/usr/sbin:$PATH:$ORACLE_HOME/bin

2、[oracle@linuxserver1~]$ dbca
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

报错原因一:缺少支持打印的图形化动态链接库libXp.so.6

通过查看dbca的log日志发现缺少包libXp

[oracle@game_dbscripts]$ cd $ORACLE_HOME/cfgtoollogs/dbca

[oracle@game_dbdbca]$ ls

trace.log

[oracle@game_dbdbca]$ tail -50 trace.log

java.lang.UnsatisfiedLinkError:/home/oracle_app_10204/jdk/jre/lib/i386/libawt.so:libXp.so.6: cannot openshared object file: No such file or directory

atjava.lang.ClassLoader$NativeLibrary.load(Native Method)

atjava.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586)

atjava.lang.ClassLoader.loadLibrary(ClassLoader.java:1503)

atjava.lang.Runtime.loadLibrary0(Runtime.java:788)

atjava.lang.System.loadLibrary(System.java:834)

atsun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)

atjava.security.AccessController.doPrivileged(Native Method)

atsun.awt.NativeLibLoader.loadLibraries(NativeLibLoader.java:38)

atsun.awt.DebugHelper.(DebugHelper.java:29)

atjava.awt.Component.(Component.java:506)

atoracle.sysman.assistants.util.wizard.WizardObject.(WizardObject.java:64)

atoracle.sysman.assistants.dbca.ui.DBCAWizard.(DBCAWizard.java:425)

atoracle.sysman.assistants.dbca.ui.UIHost.(UIHost.java:214)

atoracle.sysman.assistants.dbca.ui.InteractiveHost.(InteractiveHost.java:54)

atoracle.sysman.assistants.dbca.Dbca.getHost(Dbca.java:160)

atoracle.sysman.assistants.dbca.Dbca.execute(Dbca.java:94)

atoracle.sysman.assistants.dbca.Dbca.main(Dbca.java:180)

解决办法:将包libXp打上

解决步骤

1、验证一下包:

[oracle@linuxserver1 ~]$ rpm -qa|grep libXp

libXpm-devel-3.5.5-3

libXpm-3.5.5-3

2、将libXp 包打上:

[root@linuxserver1 ~]$# ll

-rwxrwSrwx 1 root root 229962007-07-26libXp-1.0.0-8.1.el5.i386.rpm

-rwxrwSrwx 1 root root 152622007-07-26libXp-devel-1.0.0-8.1.el5.i386.rpm

[root@linuxserver1 ~]$# rpm -ivh libXp*.rpm
warning: libXp-1.0.0-8.1.el5.i386.rpm:Header V3 DSA signature: NOKEY, key ID37017186
Preparing... ########################################### [100%]
1:libXp ########################################### [ 50%]
2:libXp-devel ########################################### [100%]
[oracle@linuxserver1 ~]$# rpm -qa|grep libXp
libXpm-devel-3.5.5-3
libXp-1.0.0-8.1.el5
libXpm-3.5.5-3
libXp-devel-1.0.0-8.1.el5

3、root用户下执行xhosts+命令保证图形化安装界面可以启动
[root@linuxserver1 ~]$# xhost +
access control disabled, clients canconnect from any host
[root@linuxserver1 ~]# su - oracle
[oracle@linuxserver1 ~]$ exportDISPLAY=192.168.3.189:0.0
[oracle@linuxserver1 ~]$ dbca

注意: 

一、使用SecureCRT实现远程应用程序的图形显示步骤:

1、 在root用户下修改/etc/ssh/sshd_config文件中的X11Forwarding的值为yes。

2、 设置SecureCRT的”会话选项”中的”远程/X11”中勾选”转发X11”数据包。

3、 重启服务,servicesshrestart。

4、 推出会话,重新连接。此时,echo$DISPLAY将会有值显示。

5、 在客户端这边,开启Xmanager(:0.0)。

6、 在SecureCRT端登入,设置DISPLAY变量(export DISPLAY=客户端IP:0.0)。

二. 在用oracle登录之前现在root用户下输入xhost +命令,oracle用户才能利用图形方式安装oracle或者建库

报错原因二:DISPLAY 环境变量设置错误。因为Xserver默认情况下不允许别的用户的图形程序的图形显示在当前屏幕上.

解决办法:如果需要别的用户的图形显示在当前屏幕上, 则应以当前登陆的用户, 也就是切换身份前的用户执行如下命令

[root@linuxserver1 ~]$xhost +

解决办法:用root登陆,在#提示符后输入:
xhost local:oracle non-network local connections being added to access controllist
此时再 su - oracle 切换到Oracle用户执行图形界面任务就可以了
man xhost中有这样一段
A complete name has the syntax‘‘family:name’’ where the families are as follows:
inet Internet host (IPv4)
inet6 Internet host (IPv6)
dnet DECnet host
nis Secure RPC network name
krb Kerberos V5 principal
local contains only one name, the empty string
si Server Interpreted
其中local那个是用来解决同一台机器的不同用户访问X的问题的

3、[oracle@linuxserver1~]$ dbca
Exception in thread "main" $

报错原因:DISPLAY参数设置

解决方法:

[oracle@linuxserver1 ~]$exportDISPLAY=127.0.0.1:0.0

[oracle@linuxserver1 ~]$ exportDISPLAY=:0.0

[oracle@linuxserver1 ~]$ xhost +

access control disabled, clients canconnect from any host

[oracle@linuxserver1 ~]$ dbca

4、[oracle@linuxserver1~]$dbca
$JRE_DIR/bin/jre -DORACLE_HOME=$OH -DJDBC_PROTOCOL=thin -mx64m -classpath$CLASSPATH oracle.sysman.assistants.dbca.Dbca $ARGUMENTS等错误

报错原因:JRE 的版本不对。oracle 的dbca脚本里默认的JRE 是 1.1.8

解决办法:

1. rm $ORACLE_HOME/JRE (此JRE链接是1.1.8 的符号链接,需要改指向向1.3.1的)

  2. ln -s $ORACLE_BASE/jre/1.3.1 $ORACLE_HOME/JRE

  3. cd $ORACLE_BASE/jre/1.3.1/bin

  4. ln -s java jre

  5. cd i386/native_threads

  6. ln -s java jre

注意:

JRE介绍:http://baike.baidu.com/view/160710.htm

版本管理

Java的解决办法是每个程序自己携带一套JRE。

比如说某人的机器上已经被安装了好多套JRE和JDK(JDK包括了同版本的JRE,此外还包括有编译器和其它工具),它们分别是:

BEAWeblogic Server 7.0 自带一套 JDK1.3.1_02, 还下载了一套最新的JDK1.4.1_02

JBuilder9自带一套JDK1.4.1_02

Oracle8.1.7自带一套JRE1.1.7

RationRose自带一套JDK1.3

DreamWeaver自带一套JDK1.3

6套JRE,每套JRE都被各自安装到不同的目录,不会互相影响。当在控制台执行java.exe,操作系统寻找JRE的方式如下:

先找当前目录下有没有JRE

再找父目录下有没有JRE

接着在PATH路径中找JRE

注册表HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\JavaRuntime Environment\ 查看CurrentVersion的键值指向哪个JRE

最常用的是在PATH路径中找JRE,一般情况下,自己的程序运行之前都会先在批处理文件里面临时设置PATH,把自己用的JRE放到PATH路径最前面,所以肯定会运行自己带的JRE,不会造成版本混乱。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Linux Architecture: Unveiling the 5 Basic Components Linux Architecture: Unveiling the 5 Basic Components Apr 20, 2025 am 12:04 AM

The five basic components of the Linux system are: 1. Kernel, 2. System library, 3. System utilities, 4. Graphical user interface, 5. Applications. The kernel manages hardware resources, the system library provides precompiled functions, system utilities are used for system management, the GUI provides visual interaction, and applications use these components to implement functions.

What computer configuration is required for vscode What computer configuration is required for vscode Apr 15, 2025 pm 09:48 PM

VS Code system requirements: Operating system: Windows 10 and above, macOS 10.12 and above, Linux distribution processor: minimum 1.6 GHz, recommended 2.0 GHz and above memory: minimum 512 MB, recommended 4 GB and above storage space: minimum 250 MB, recommended 1 GB and above other requirements: stable network connection, Xorg/Wayland (Linux)

vscode terminal usage tutorial vscode terminal usage tutorial Apr 15, 2025 pm 10:09 PM

vscode built-in terminal is a development tool that allows running commands and scripts within the editor to simplify the development process. How to use vscode terminal: Open the terminal with the shortcut key (Ctrl/Cmd). Enter a command or run the script. Use hotkeys (such as Ctrl L to clear the terminal). Change the working directory (such as the cd command). Advanced features include debug mode, automatic code snippet completion, and interactive command history.

How to check the warehouse address of git How to check the warehouse address of git Apr 17, 2025 pm 01:54 PM

To view the Git repository address, perform the following steps: 1. Open the command line and navigate to the repository directory; 2. Run the "git remote -v" command; 3. View the repository name in the output and its corresponding address.

How to run java code in notepad How to run java code in notepad Apr 16, 2025 pm 07:39 PM

Although Notepad cannot run Java code directly, it can be achieved by using other tools: using the command line compiler (javac) to generate a bytecode file (filename.class). Use the Java interpreter (java) to interpret bytecode, execute the code, and output the result.

Where to write code in vscode Where to write code in vscode Apr 15, 2025 pm 09:54 PM

Writing code in Visual Studio Code (VSCode) is simple and easy to use. Just install VSCode, create a project, select a language, create a file, write code, save and run it. The advantages of VSCode include cross-platform, free and open source, powerful features, rich extensions, and lightweight and fast.

What is the main purpose of Linux? What is the main purpose of Linux? Apr 16, 2025 am 12:19 AM

The main uses of Linux include: 1. Server operating system, 2. Embedded system, 3. Desktop operating system, 4. Development and testing environment. Linux excels in these areas, providing stability, security and efficient development tools.

vscode terminal command cannot be used vscode terminal command cannot be used Apr 15, 2025 pm 10:03 PM

Causes and solutions for the VS Code terminal commands not available: The necessary tools are not installed (Windows: WSL; macOS: Xcode command line tools) Path configuration is wrong (add executable files to PATH environment variables) Permission issues (run VS Code as administrator) Firewall or proxy restrictions (check settings, unrestrictions) Terminal settings are incorrect (enable use of external terminals) VS Code installation is corrupt (reinstall or update) Terminal configuration is incompatible (try different terminal types or commands) Specific environment variables are missing (set necessary environment variables)

See all articles