How do i get error after compiling package
Hi ,
i am compiling some packages by sys schema of hr schema as
alter package hr.example compile package
but it shows compiled with error
how can i see that errors as i dont know the password of hr schema ..
Thanks in advance
First of all you should not be using SYS to compile anything ... create a DBA account.
Second there is not need to be HR to see the errors ... type "SHO ERR" and you should see the errors and if that does not work there is always the simple
SELECT * FROM dba_errors;In the future please do not post questions without full version number and, when possible, screen scrapes (cut and paste) so we can see what you are doing.
Similar Messages
-
Getting error while compiling frmcmp_batch batch file
HI
I am getting error while running frmcmp_batch commant
to create .fmx file
following is command that i am using
$ frmcmp_batch module=$AU_TOP/forms/US/DEMxxEOR.fmb userid=APPS/apps output_file=$PO/forms/US/DEMxxEOR.fmx module_type=form batch=no compile_all=specialfollowing is error that i am getting
Forms 10.1 (Form Compiler) Version 10.1.2.3.0 (Production)
Forms 10.1 (Form Compiler): Release - Production
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application >>Testing options
PL/SQL Version 10.1.0.5.0 (Production)
Oracle Procedure Builder V10.1.2.3.0 - Production
Oracle Virtual Graphics System Version 10.1.2.0.0 (Production)
Oracle Multimedia Version 10.1.2.0.2 (Production)
Oracle Tools Integration Version 10.1.2.0.2 (Production)
Oracle Tools Common Area Version 10.1.2.0.2
Oracle CORE 10.1.0.5.0 Production
FRM-18108: Failed to load the following objects.
Source Module:APPSTAND>> Source Object: STANDARD_PC_AND_VA
Source Module:APPSTAND>>Source Object: STANDARD_TOOLBAR
Source Module:APPSTAND>>Source Object: STANDARD_CALENDAR
Compiling package specification APP_CUSTOM...>> No compilation errors.
Compiling package specification APP_CUSTOM...>> No compilation errors.
Compiling package body APP_CUSTOM...
Compilation error on package body APP_CUSTOM:
PL/SQL ERROR 302 at line 22, column 19
component 'DISABLED' must be declared
PL/SQL ERROR 0 at line 22, column 5
Statement ignored
PL/SQL ERROR 201 at line 40, column 5
identifier 'APP_WINDOW.CLOSE_FIRST_WINDOW' must be declared
PL/SQL ERROR 0 at line 40, column 5
Statement ignored
Compilation errors have occurred.
Form not createdHi;
I am getting error while running frmcmp_batch commant
to create .fmx file
following is command that i am using
$ frmcmp_batch module=$AU_TOP/forms/US/DEMxxEOR.fmb userid=APPS/apps output_file=$PO/forms/US/DEMxxEOR.fmx module_type=form batch=no compile_all=special
Please try wiht below syntax
frmcmp_batch userid=apps/apps module=/u01/VIS/apps/apps_st/appl/au/12.0.0/forms/US/INVTTMTX.fmb output_file=/u01/VIS/apps/apps_st/appl/au/12.0.0/forms/US/INVTTMTX.fmx module_type=form batch=no compile_all=yes
Regard
Helios -
While installing itunes i am getting error "this installation package could not be opened.verify that the package exists and that you can access it,or contact the appliacation vendor to verify that this is a valid windows installer package"
I'd first try downloading an installer from the Apple website using a different web browser:
http://www.apple.com/itunes/download/
If you use Firefox instead of IE for the download (or vice versa), do you get a working installer? -
When i am on the 4 step in Search Result Display options, i get errors after 2 radio buttons
I am using Oracle portal 9.0.2 version
When i am on the 4 step in Search Result Display options, i get errors after 2 radio buttons
Default Search Results Page
This Search Portlet
An unexpected error has occurred (WWS-32100)
User-Defined Exception (WWS-11230)
Unknown Exception (WWC-45131)
ORA-20101:
ORA-06512: at "PORTAL.WWSBR_STDERR", line 437
ORA-06512: at "PORTAL.WWPOB_API_PAGE", line 3369
ORA-01403: no data found
ORA-01403: no data found (WWC-11230)
No data found (WWS-32101)
ORA-1403: ORA-01403: no data found
ORA-01403: no data found (WWC-36000)
Error: An unexpected error occurred: User-Defined Exception (WWC-43000)
Please help me with this one
P.S I tried to run inctxgrn.sql, but it did not solve the problemi solved the problem by runing 2 scripts as a portal user
You can refer to bug - 2418089. This was fixed in 9.0.2.3
begin
wwpre_api_value.set_value_as_number
p_path => 'oracle.portal.search',
p_name => 'searchresultpageid',
p_level_type => wwpre_api_value.SYSTEM_LEVEL_TYPE,
p_level_name => null,
p_value => 6,
p_commit => true
commit;
end;
begin
wwpre_api_value.set_value_as_number
p_path => 'oracle.portal.search',
p_name => 'searchresultpagesiteid',
p_level_type => wwpre_api_value.SYSTEM_LEVEL_TYPE,
p_level_name => null,
p_value => 6,
p_commit => true
commit;
end;
NOTE - The difference is the value of 'p_name' attribute. If u see carefully it is 'searchresultpagesiteid'. The first time u run this the value is 'searchresultpageid'. -
How to suspend the installation after downloading packages via ota for lollipop 5.0.1. on my Note 4. always asks me to install it on notification bar. thank you
If you factory reset, it wont make the update go away, but you should back up and reset before you install the update.
-
Getting error after installing admt 3.2
hi team
i am getting error after installing the admt 3.2 on server 2008 R2 where i have installed sql server 2008 sp1 with express edition
the server is a DC
the error is "Unable to check for failed actions. :DBManager.IManageDB.1 Unable to retrieve the database file pagth from the registry. the system cannot find the file specified"
Thanks,
virajYou should change the forum type on this to a question. The way you have this labled as a discussion not a problem.
See if the link below helps you out.
http://support.microsoft.com/kb/2266373
Paul Bergson
MVP - Directory Services
MCITP: Enterprise Administrator
MCTS, MCT, MCSE, MCSA, Security+, BS CSci
2008, Vista, 2003, 2000 (Early Achiever), NT4
http://www.pbbergs.com Twitter @pbbergs
http://blogs.dirteam.com/blogs/paulbergson
Please no e-mails, any questions should be posted in the NewsGroup. This posting is provided "AS IS" with no warranties, and confers no rights. -
[SOLVED] Strange error while compiling packages via AUR
I've been facing this error while compiling packages via AUR. I'm also posting the output of my /etc/makepkg.conf
Error
==> Starting build()...
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether cc supports -O2... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GSTREAMER... yes
checking for GSTREAMER_GTK... yes
checking for XOpenDisplay in -lX11... yes
checking for ncursesw5-config... /usr/bin/ncursesw5-config
checking for initscr in -lncurses... yes
checking whether gcc supports -Wall... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating docs/Makefile
config.status: creating config.h
config.status: executing depfiles commands
fatal: Not a git repository (or any of the parent directories): .git
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /tmp/yaourt-tmp-hellknight/aur-gst123/src/gst123-0.2.0/build-aux/missing --run aclocal-1.11 -Wno-portability
sh: autom4te: command not found
aclocal-1.11: autom4te failed with exit status: 127
make: *** [aclocal.m4] Error 1
==> ERROR: A failure occurred in build().
Aborting...
==> ERROR: Makepkg was unable to build gst123.
==> Restart building gst123 ? [y/N]
==> -------------------------------
==>
/etc/makepkg.conf
# /etc/makepkg.conf
# SOURCE ACQUISITION
#-- The download utilities that makepkg should use to acquire sources
# Format: 'protocol::agent'
DLAGENTS=('ftp::/usr/bin/wget -c --passive-ftp -t 3 --waitretry=3 -O %o %u'
'http::/usr/bin/wget -c -t 3 --waitretry=3 -O %o %u'
'https::/usr/bin/wget -c -t 3 --waitretry=3 --no-check-certificate -O %o %u'
'rsync::/usr/bin/rsync -z %u %o'
'scp::/usr/bin/scp -C %u %o')
# Other common tools:
# /usr/bin/snarf
# /usr/bin/lftpget -c
# /usr/bin/curl
# ARCHITECTURE, COMPILE FLAGS
CARCH="x86_64"
CHOST="x86_64-unknown-linux-gnu"
#-- Exclusive: will only run on x86_64
# -march (or -mcpu) builds exclusively for an architecture
# -mtune optimizes for an architecture, but builds for whole processor family
CFLAGS="-march=amdfam10 -mtune=generic -O2 -pipe"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-Wl,--hash-style=gnu -Wl,--as-needed"
#-- Make Flags: change this for DistCC/SMP systems
MAKEFLAGS="-j8"
# BUILD ENVIRONMENT
# Defaults: BUILDENV=(fakeroot !distcc color !ccache)
# A negated environment option will do the opposite of the comments below.
#-- fakeroot: Allow building packages as a non-root user
#-- distcc: Use the Distributed C/C++/ObjC compiler
#-- color: Colorize output messages
#-- ccache: Use ccache to cache compilation
BUILDENV=(fakeroot !distcc color !ccache)
#-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
#-- specify a space-delimited list of hosts running in the DistCC cluster.
#DISTCC_HOSTS=""
# GLOBAL PACKAGE OPTIONS
# These are default values for the options=() settings
# Default: OPTIONS=(strip docs libtool emptydirs zipman purge)
# A negated option will do the opposite of the comments below.
#-- strip: Strip symbols from binaries/libraries in STRIP_DIRS
#-- docs: Save doc directories specified by DOC_DIRS
#-- libtool: Leave libtool (.la) files in packages
#-- emptydirs: Leave empty directories in packages
#-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip
#-- purge: Remove files specified by PURGE_TARGETS
OPTIONS=(strip docs libtool emptydirs zipman purge)
#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512
INTEGRITY_CHECK=(md5)
#-- Options to be used when stripping binaries. See `man strip' for details.
STRIP_BINARIES="--strip-all"
#-- Options to be used when stripping shared libraries. See `man strip' for details.
STRIP_SHARED="--strip-unneeded"
#-- Options to be used when stripping static libraries. See `man strip' for details.
STRIP_STATIC="--strip-debug"
#-- Manual (man and info) directories to compress (if zipman is specified)
MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
#-- Doc directories to remove (if !docs is specified)
DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
#-- Directories to be searched for the strip option (if strip is specified)
STRIP_DIRS=(bin lib sbin usr/{bin,lib,sbin,local/{bin,lib,sbin}} opt/*/{bin,lib,sbin})
#-- Files to be removed from all packages (if purge is specified)
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
# PACKAGE OUTPUT
# Default: put built package and cached source in build directory
#-- Destination: specify a fixed directory where all packages will be placed
#PKGDEST=/home/packages
#-- Source cache: specify a fixed directory where source files will be cached
#SRCDEST=/home/sources
#-- Source packages: specify a fixed directory where all src packages will be placed
#SRCPKGDEST=/home/srcpackages
#-- Packager: name/email of the person or organization building packages
#PACKAGER="John Doe <[email protected]>"
# EXTENSION DEFAULTS
# WARNING: Do NOT modify these variables unless you know what you are
# doing.
PKGEXT='.pkg.tar.xz'
SRCEXT='.src.tar.gz'
# vim: set ft=sh ts=2 sw=2 et:
Last edited by tarun.hellknight (2011-04-12 15:45:26)That's strange... it wasn't installed.. although I had never,ever faced a problem while compiling packages via AUR.. maybe, I should be careful when uninstalling orphans.. thanks for the help..
-
How to see errors after compilation.
Hello,
I am new to SQL/Developer.
How do we check the errors after running the script in sql/developer.
Warning: execution completed with warning.
I tried show errors but its not working.
Please help.
Thanks,
SrikanthHi,
After you run your script, you execute show errors.
Reagrds Salim.
SQL> create or replace function ff return number
2 is
3 begin
4 dbms_output.put_line(pp);
5 end ;
6 /
Warning: Function created with compilation errors.
SQL> show errors;
Errors for FUNCTION FF:
LINE/COL ERROR
4/1 PL/SQL: Statement ignored
4/22 PLS-00201: identifier 'PP' must be declared
SQL> -
Error when Compiling package header and body - how change pkb file associat
Hi everyone,
it has already been noticed elsewhere (in the thread "Compiling package header and body" of Jan 12, 2010) that the compilation of package scripts sometimes fails (apparently because of a sqldeveloper bug) when the script contains the terminating slash /.
Is this bug still open?
Next question: In the above mentioned thread it is recommended as workaround to change the corresponding file type association from pl/sql to sql. I would like to do that; I know the place in the preferences dialog, but most of the associations there seem to be hard coded and cannot be changed.
I would appreciate any ideas!
Thanks in advance,
user8632123.For the workaround: you'd have to change the file's extension, not the association (to e.g. .sql).
Have fun,
K. -
Using database connection in a servlet and get errors after 8 hours
Hey,
I'm running a poker script using applet/servlets and it works great. But for some reason about about 8 hours that database layer stops working. At first I thought it was the connections to mySQL that were timing out (because im using connection pooling) but after turning pooling off (I now create the connection each time) I'm still seeing that same error (I can create a connection but when I do an action ex. like a select statment I get an error). What i'm wondering could it be that the driver I load with Class.forName() some how unloads it's self after x amount of time not being used? Not sure if that is it but if anyone could give me some insight that would be great. The Error i recieve is below:
INFO: Database Event:DatabaseController: Error executing database query.
ERROR: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.SocketException
MESSAGE: Software caused connection abort: recv failed
STACKTRACE:
java.net.SocketException: Software caused connection abort: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(Unknown Source)
at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:104)
at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:144)
at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:172)
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1839)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2288)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2784)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1531)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1622)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2370)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2297)
at com.mysql.jdbc.Statement.executeQuery(Statement.java:1183)
at com.softnet.database.DatabaseController.executeDatabaseQuery(DatabaseController.java:190)
at com.softnet.games.GameServer.validateUser(GameServer.java:438)
at com.softnet.games.GameServer.handleData(GameServer.java:113)
at com.softnet.network.HttpConnectionThread.run(HttpServletListener.java:191)
** END NESTED EXCEPTION **
I know the query is good because it works all other times just not after about 8 hours.
--Z3r0CooLHey,
Thanks for the responces. For the connection pooling I would open 5 connections and keep them open. So i though maybe after 8 hours after not being used they would timeout. Thats why i turned off conection pooling and create a new connection each time. Anyways i'll post the code below incase i made a mistake somewhere.
package com.softnet.database;
/************************ DatabaseControler **************************/
import java.sql.*;
import java.util.*;
import com.softnet.database.DatabaseConnectionPool;
import com.softnet.database.DatabaseSettings;
public class DatabaseController
implements DatabaseListener
//Used to make sure the database driver is loaded
private boolean databaseDriverState = false;
//Used to store a database connection
private Connection databaseConnection = null;
//If to user connection pooling or not
private boolean useConnectionPooling = false;
//Used to hold the connection pool varible
private DatabaseConnectionPool connectionPool = null;
//Used to store database settings
private DatabaseSettings databaseSettings;
//Used to hold the DatabaseController listeners
private List databaseControllerListeners = new ArrayList();
//min number of connections for connection pool
private int minNumberOfConnections = 1;
//max number of connections for connection pool -1 is unlimited
private int maxNumberOfConnections = -1;
//DatabaseController Constructors
public DatabaseController(DatabaseSettings databaseSettings)
this.databaseSettings = databaseSettings;
databaseDriverState = loadDatabaseDriver(databaseSettings.getDatabaseDriver());
public DatabaseController(DatabaseSettings databaseSettings, boolean useConnectionPooling, int minNumberOfConnections, int maxNumberOfConnections)
this.databaseSettings = databaseSettings;
this.useConnectionPooling = useConnectionPooling;
this.minNumberOfConnections = minNumberOfConnections;
this.maxNumberOfConnections = maxNumberOfConnections;
if(useConnectionPooling == true)
connectionPool = new DatabaseConnectionPool(databaseSettings, minNumberOfConnections, maxNumberOfConnections);
connectionPool.addDatabaseListener(this);
else
databaseDriverState = loadDatabaseDriver(databaseSettings.getDatabaseDriver());
public DatabaseController() {}
//Database Settings Get/Set
public DatabaseSettings getDatabaseSettings()
return databaseSettings;
public void setDatabaseSettings(DatabaseSettings databaseSettings)
this.databaseSettings = databaseSettings;
//Connection Pooling Get/Set
public boolean getConnectionPooling()
return useConnectionPooling;
public void setConnectionPooling(boolean useConnectionPooling, int minNumberOfConnections, int maxNumberOfConnections)
this.useConnectionPooling = useConnectionPooling;
this.minNumberOfConnections = minNumberOfConnections;
this.maxNumberOfConnections = maxNumberOfConnections;
if(useConnectionPooling == true)
if(connectionPool == null)
connectionPool = new DatabaseConnectionPool(databaseSettings, minNumberOfConnections, maxNumberOfConnections);
connectionPool.addDatabaseListener(this);
else
if(connectionPool != null)
connectionPool.destroyConnections();
connectionPool.removeDatabaseListener(this);
connectionPool = null;
//Return if there connected
public boolean isConnected()
boolean isConnected;
if(databaseConnection != null)
isConnected = true;
else
isConnected = false;
return isConnected;
//Used to connect to database or get a connection for the connection pool
public void connect()
if(databaseDriverState == false)
databaseDriverState = loadDatabaseDriver(databaseSettings.getDatabaseDriver());
//If we dont have a current connection, make one
if(databaseConnection == null && databaseDriverState == true)
if(useConnectionPooling == false)
try
databaseConnection = DriverManager.getConnection(databaseSettings.getDatabaseURL(), databaseSettings.getUserName(), databaseSettings.getUserPassword());
catch (SQLException sqle)
//Raise event
raiseDatabaseEvent("DatabaseController: Error connecting to database. \nERROR: " + sqle.getMessage());
databaseConnection = null;
else
databaseConnection = connectionPool.getConnection();
//Used to disconnect from the database or give back the connection to the connection pool
public void disconnect()
if(databaseConnection != null)
if(useConnectionPooling == false)
try
//Close DB Connection
databaseConnection.close();
catch(SQLException ignore) {}
finally
databaseConnection = null;
else
connectionPool.returnConnection(databaseConnection);
databaseConnection = null;
public ResultSet executeDatabaseQuery(String sSQL)
ResultSet databaseResult = null;
if(databaseConnection != null)
try
Statement databaseStatement = databaseConnection.createStatement();
databaseResult = databaseStatement.executeQuery(sSQL);
catch(SQLException sqle)
//Raise event
raiseDatabaseEvent("DatabaseController: Error executing database query.\nSQL: " + sSQL + "\nERROR: " + sqle.getMessage());
return databaseResult;
public int executeDatabaseUpdate(String sSQL)
int rowsAffected = -1;
if(databaseConnection != null)
try
Statement databaseStatement = databaseConnection.createStatement();
rowsAffected = databaseStatement.executeUpdate(sSQL);
catch(SQLException sqle)
//Raise event
raiseDatabaseEvent("DatabaseController: Error executing database update.\nSQL: " + sSQL + "\nERROR: " + sqle.getMessage());
return rowsAffected;
//Used to load the Database Driver
private boolean loadDatabaseDriver(String databaseDriver)
boolean driverLoaded;
if(databaseDriver.equals("") == false)
try
//Load Database Driver
Class.forName(databaseDriver).newInstance();
driverLoaded = true;
catch (Exception e)
//Raise event
raiseDatabaseEvent("DatabaseController: Error loading database driver. \nERROR: " + e.getMessage());
driverLoaded = false;
else
driverLoaded = false;
return driverLoaded;
//Wrap the DatabaseConnectionPool Error to the DatabaseController
public void databaseEventOccurred(DatabaseEvent de)
raiseDatabaseEvent(de.getErrorMessage());
//Event Handling Code
//Used to add database listeners (Its sync'd so you can change the listeners when firing an event)
public synchronized void addDatabaseListener(DatabaseListener databaseControllerListener)
databaseControllerListeners.add(databaseControllerListener);
//Used to remove a listener from the list (Its sync'd so you can change the listeners when firing an event)
public synchronized void removeDatabaseListener(DatabaseListener databaseControllerListener)
databaseControllerListeners.remove(databaseControllerListener);
//Used to send the raise event to the listeners
private synchronized void raiseDatabaseEvent(String databaseError)
DatabaseEvent databaseEvent = new DatabaseEvent(this, databaseError);
Iterator listeners = databaseControllerListeners.iterator();
while(listeners.hasNext())
DatabaseListener listener = (DatabaseListener) listeners.next();
listener.databaseEventOccurred(databaseEvent);
/********************* DatabaseConnectionPool **************/
package com.softnet.database;
import java.io.*;
import java.sql.*;
import java.util.*;
import com.softnet.database.*;
import com.softnet.database.DatabaseSettings;
public class DatabaseConnectionPool
//min number of connections
private int minNumberOfConnections = 1;
//max number of connections -1 is unlimited
private int maxNumberOfConnections = -1;
//Store the connections
protected Hashtable databaseConnections = null;
//Database Info
protected DatabaseSettings databaseSettings;
//to hold Driver state
private boolean databaseDriverState = false;
//To hold connection checker
private DatabaseConnectionCheck connectionChecker = null;
//Used to hold the DatabaseConnectionPool listeners
private List databaseConnectionPoolListeners = new ArrayList();
public DatabaseConnectionPool(DatabaseSettings databaseSettings, int minNumberOfConnections, int maxNumberOfConnections)
this.databaseSettings = databaseSettings;
this.minNumberOfConnections = minNumberOfConnections;
this.maxNumberOfConnections = maxNumberOfConnections;
//Load Driver
databaseDriverState = loadDatabaseDriver(databaseSettings.getDatabaseDriver());
//Create connection
createConnections();
public DatabaseConnectionPool(int minNumberOfConnections, int maxNumberOfConnections)
this.minNumberOfConnections = minNumberOfConnections;
this.maxNumberOfConnections = maxNumberOfConnections;
//Database Settings Get/Set
public DatabaseSettings getDatabaseSettings()
return databaseSettings;
public void setDatabaseSettings(DatabaseSettings databaseSettings)
this.databaseSettings = databaseSettings;
//Driver State Get
public boolean getDatabaseDriverState()
return databaseDriverState;
public void createConnections()
if(databaseDriverState == false)
databaseDriverState = loadDatabaseDriver(databaseSettings.getDatabaseDriver());
//Create all connections and load the minimum in the Hashtable
if(databaseConnections == null)
if(databaseDriverState == true && minNumberOfConnections != 0)
databaseConnections = new Hashtable();
for(int i = 0; i < minNumberOfConnections; i++)
try
databaseConnections.put(DriverManager.getConnection(databaseSettings.getDatabaseURL(), databaseSettings.getUserName(), databaseSettings.getUserPassword()), Boolean.FALSE);
catch(SQLException sqle)
//Problem break loop and destroy any connections
destroyConnections();
//Raise event
raiseDatabaseEvent("DatabaseConnectionPool: Error creating database connections. \nERROR: " + sqle.getMessage());
break;
//If no connection check exists create one
if(connectionChecker == null)
connectionChecker = new DatabaseConnectionCheck(this);
connectionChecker.start();
public Connection getConnection()
Connection connection = null;
boolean errorWithConnection = false;
Enumeration connections = databaseConnections.keys();
synchronized (databaseConnections)
while(connections.hasMoreElements())
errorWithConnection = false;
connection = (Connection) connections.nextElement();
Boolean state = (Boolean) databaseConnections.get(connection);
//If connection is not used, use it.
if(state == Boolean.FALSE)
try
connection.setAutoCommit(true);
catch(SQLException e)
//Problem with connection remove connection and replace it
databaseConnections.remove(connection);
try
connection = DriverManager.getConnection(databaseSettings.getDatabaseURL(), databaseSettings.getUserName(), databaseSettings.getUserPassword());
catch(SQLException sqle)
errorWithConnection = true;
if(errorWithConnection == false)
// Update the Hashtable to show this one's taken
databaseConnections.put(connection, Boolean.TRUE);
// Return the connection
return connection;
//All connections being used check to max to see if we can make a new one
if(maxNumberOfConnections == -1 || maxNumberOfConnections > databaseConnections.size())
try
connection = DriverManager.getConnection(databaseSettings.getDatabaseURL(), databaseSettings.getUserName(), databaseSettings.getUserPassword());
catch(SQLException sqle)
errorWithConnection = true;
if(errorWithConnection == false)
databaseConnections.put(connection, Boolean.TRUE);
return connection;
//If not connections free and max connections reached wait for a free connection
return getConnection();
public void returnConnection(Connection connection)
boolean errorWithConnection = false;
//Make sure connection still works
try
connection.setAutoCommit(true);
catch(SQLException e)
//Problem with connection remove connection and replace it
databaseConnections.remove(connection);
try
connection = DriverManager.getConnection(databaseSettings.getDatabaseURL(), databaseSettings.getUserName(), databaseSettings.getUserPassword());
catch(SQLException sqle)
errorWithConnection = true;
if(errorWithConnection == false)
databaseConnections.put(connection, Boolean.FALSE);
public void destroyConnections()
Connection connection = null;
if(databaseConnections != null)
//Close all connections
Enumeration connections = databaseConnections.keys();
while (connections.hasMoreElements())
connection = (Connection) connections.nextElement();
try
connection.close();
catch(SQLException ignore) {}
//Free up hashtable
databaseConnections = null;
private boolean loadDatabaseDriver(String databaseDriver)
boolean driverLoaded;
if(databaseDriver.equals("") == false)
try
//Load Database Driver
Class.forName(databaseDriver);
driverLoaded = true;
catch (ClassNotFoundException cnfe)
//Raise event
raiseDatabaseEvent("DatabaseController: Error loading database driver. \nERROR: " + cnfe.getMessage());
driverLoaded = false;
else
driverLoaded = false;
return driverLoaded;
//Event Handling Code
//Used to add database listeners (Its sync'd so you can change the listeners when firing an event)
public synchronized void addDatabaseListener(DatabaseListener databaseConnectionPoolListener)
databaseConnectionPoolListeners.add(databaseConnectionPoolListener);
//Used to remove a listener from the list (Its sync'd so you can change the listeners when firing an event)
public synchronized void removeDatabaseListener(DatabaseListener databaseConnectionPoolListener)
databaseConnectionPoolListeners.remove(databaseConnectionPoolListener);
//Used to send the raise event to the listeners
private synchronized void raiseDatabaseEvent(String databaseError)
DatabaseEvent databaseEvent = new DatabaseEvent(this, databaseError);
Iterator listeners = databaseConnectionPoolListeners.iterator();
while(listeners.hasNext())
DatabaseListener listener = (DatabaseListener) listeners.next();
listener.databaseEventOccurred(databaseEvent);
class DatabaseConnectionCheck extends Thread
private DatabaseConnectionPool connectionPool;
DatabaseConnectionCheck(DatabaseConnectionPool connectionPool)
this.connectionPool = connectionPool;
public void run()
try
while(true)
//check threads every 30 seconds
this.sleep(300000);
if(connectionPool.databaseConnections != null)
Connection connection = null;
Enumeration connections = connectionPool.databaseConnections.keys();
synchronized (connectionPool.databaseConnections)
while(connections.hasMoreElements())
connection = (Connection) connections.nextElement();
Boolean state = (Boolean) connectionPool.databaseConnections.get(connection);
//If connection is not used, use it.
if(state == Boolean.FALSE)
try
connection.setAutoCommit(true);
catch(SQLException e)
//Problem with connection remove connection and replace it
connectionPool.databaseConnections.remove(connection);
try
connection = DriverManager.getConnection(connectionPool.databaseSettings.getDatabaseURL(), connectionPool.databaseSettings.getUserName(), connectionPool.databaseSettings.getUserPassword());
catch(SQLException sqle)
connection = null;
// Update the Hashtable with new connection if its not null
if(connection != null)
connectionPool.databaseConnections.put(connection, Boolean.FALSE);
catch(InterruptedException ignored) {}
Basicly the why it works is the connection pool hold the database connections. When the user needs a connection they use the database controller to request a connection (By create a instance and called the connect() method) and the connection is either created or grabed from the connection pool. After the user is done with the connection they call the disconnect() method which closes the connection or returns it to the connection pool.
--Z3r0CooL -
Getting error after creating project of DC ess~Org from ESS Track
Hi All,
Our basis team just now implemented the track for ESS and MSS.So we need to sync all application from DTR.
We are facing problem with one Dc essOrg.I have created project essOrg from ESS track in inactive DC of development configuration.Build of DC is successful,where as in the Task tab its showing below error message:
" Tree TreeCont dataSource: Context element and property are not compatible Orgchart.wdview NWI_HR1_Dessorg~sap.com/src/packages/com/sap/xss/hr/org/chart "
I have done the follwing steps :
1.I have close the project.Then remove it from client.Then close the NWDs and reopen it.Still the same error we are getting after creatig project from the track.
2.Even we tried to repair the DC.Its asking for check out.Then after creating activity its showing an error pop up message "org.eclipse.jdt.core.JavaModelException: Classpath contains duplicate entry: D:Documents and settings/susmita.panigrahi/.dtc/2/DCs/sap.com/pcui_gp/xssfpm/_comp/gen/default/public/FloorplanManager/lib/java/sap.compcui_gpxssfpm~FloorplanManager.jar "
3.I have open the OrgChart view of VcOrgChart Component in NWDs.I have found that the data source property of Tree node is showing red cross mark with name OrgTab(name of context node).I have tried to select another node also other than the context node OrgTab , getting message "Select an attribute of Type"
Can any body tell me how to solve the error"Context element and property are not compatible " coming for DC ess~Org?
Thanks
SusmitaHi,
after creating the project, dont build it, close the project and close you NWDS then open the NWDS ,open the project and build, it will work ithink,
i faced the same problem, try this may be it weill work.
dont remove from client, only close the project.,
Cheers,
Apparao -
Error after compiling because of scroll
I would like to get scrollbars (vertical and horizontal) after doing the Pascal's Triangle that appends in the JTextArea named "prog", inside the JPanel "dret".
I've tried lots of things in teh code, but I get, after compiling:
"Exception in thread "main" java.kang.IllegalArgumentException: adding container's parent to itself
at java.awt.Container.addImpl(Container.java:309)
at java.awt.Container.add(Container.java:210)
at cerni.<init>(cerni.java:218)
at cerni.main(cerni.java:261)
Here the java code:
import java.lang.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.IOException.*;
import javax.swing.text.*;
import java.util.*;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public class cerni extends JFrame {
//declaraci� de variables.
JPanel principal, centre, esquerre, dret, intro, esquerrealt, esquerrebaix;
JButton element2, element3, element4, element6;
JTextArea prog;
JTextField element1, element5, introtext;
static String newline = System.getProperty("line.separator");
//funci� binominal.
public static int binominal (int n, int p) {
if (p * (n-p) == 0)
return(1);
else
return(binominal(n-1, p-1) + binominal(n-1,p));
//funci� cerni.
public cerni() {
//t�tol.
super(" �-_JavaPascal_-`");
//definici� de variables.
principal = new JPanel();
centre = new JPanel();
esquerre = new JPanel();
dret = new JPanel();
intro = new JPanel();
esquerrealt = new JPanel();
esquerrebaix = new JPanel();
element2 = new JButton("Informaci�");
element4 = new JButton("Fer el triangle");
element3 = new JButton("Sortir");
element6 = new JButton("Netejar la pantalla");
element1 = new JTextField("");
element5 = new JTextField(" Entreu el valor d' n+1 files del triangle de Pascal.");
introtext = new JTextField(" Benvinguts al programa JavaPascal, el programa escrit i compilat en java que dibuixa el triangle de Pascal.");
prog = new JTextArea();
//propietats de texts.
introtext.setFont(new Font("Serif", Font.ITALIC, 16));
prog.setFont(new Font("Serif", Font.ITALIC, 16));
prog.setLineWrap(true);
prog.setCaretPosition(prog.getText().length());
element5.setEditable(false);
introtext.setEditable(false);
prog.setEditable(false);
//minimissatge del principi.
JOptionPane.showMessageDialog(principal, " Benvinguts al programa JavaPascal.", " -> Bon dia!! <- ",JOptionPane.INFORMATION_MESSAGE);
//bot� netejar.
element6.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e){
String o = new String();
prog.setText(o);
//bot� informaci�.
element2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e){
JOptionPane.showMessageDialog(principal, "El programa JavaPascal ha estat escrit per Cerni Pol durant els dies 11 i 12 de maig del 2002.\nAmb una estructura de JFrame i JPanels, m�s JButtons i components de text, l'aplicaci� en q�esti� us exposar�\nel triangle de Pascal, en tantes files com li demaneu, al camp de text de la dreta.\nNo �s recomanable demanar un n m�s gran de 25, per aix� tenir un millor rendiment en l'operaci� de la compu-\ntadora. (rendiment provat en un processador Pentium2 a 450 mhz)\nQue us ho passeu b� amb aquest programa.\n(Enjoy.)");
//bot� sortir.
element3.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e){
System.exit (0);
//bot� pascal.
element4.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e){
int n, p, c;
c = 10;
String s1 = element1.getText();
c = Integer.parseInt(s1);
n = 0;
p = 0;
for (n=0; n<c+1; n++){
prog.append(cerni.newline);
for (p=0; p<n+1;p++){
String s = Integer.toString(binominal (n,p));
prog.append(s);
prog.append(" ");
prog.append(cerni.newline);
//panell esquerrealt.
esquerrealt.setLayout(new GridLayout(4, 0));
esquerrealt.setBorder(BorderFactory.createEmptyBorder(
30, //top
20, //left
40, //bottom
20) //dret
esquerrealt.add(element5);
esquerrealt.add(element4);
esquerrealt.add(element1);
esquerrealt.add(element6);
//panell esquerrebaix.
esquerrebaix.setLayout(new GridLayout(0, 2));
esquerrebaix.setBorder(BorderFactory.createEmptyBorder(30, 30, 20, 30));
esquerrebaix.add(element2);
esquerrebaix.add(element3);
//panell esquerre.
esquerre.setLayout(new BorderLayout());
esquerre.add(esquerrealt, "North");
esquerre.add(esquerrebaix, "South");
JScrollPane dretScrollPane = new JScrollPane(dret);
dretScrollPane.createVerticalScrollBar();
dretScrollPane.createHorizontalScrollBar();
dretScrollPane.setVerticalScrollBarPolicy
(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
dretScrollPane.setHorizontalScrollBarPolicy
(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
dret.add(dretScrollPane);
//panell dret.
dret.setLayout(new BorderLayout());
dret.add(prog, "Center");
//panell centre.
centre.setPreferredSize(new Dimension(800, 700));
centre.setBorder(BorderFactory.createEmptyBorder(30, 30, 20, 30));
centre.setLayout(new GridLayout(0, 2));
centre.add(esquerre);
centre.add(dret);
//panell intro.
intro.setLayout(new BorderLayout());
intro.add(introtext, "Center");
//panell principal.
principal.setLayout(new BorderLayout());
principal.setBorder(BorderFactory.createEmptyBorder(30, 30, 20, 30));
principal.add(centre, "Center");
principal.add(intro, "North");
setContentPane(principal);
//main.
public static void main (String[] args) {
JFrame principal = new cerni();
principal.addWindowListener (new WindowAdapter () {
public void windowClosing (WindowEvent e) {System.exit(0);}
principal.show();
principal.pack();
principal.setSize(800, 700);
Thanks to help me.Hi...
The line is error is below...
dret.add(dretScrollPane);You've already added dret to the scrollpane in the constructor of the scrollpane (some 6/7 lines above the line above). Simply add the scrollpane to the main frame (pane) now.
Merry Christmas -
Runtime error after compiling and linking functions containing XDK calls
We have a preexisting application in C distributed across multiple shared objects - on HPUX.
$ORACLE_HOME/xdk/include was included in the include path and the programs were compiled. Linking also was successful.
However at runtime we get errors of the form:
/usr/lib/dld.sl: Unresolved symbol: XmlCreate__FP6xmlerrPUce (code) from ./lib_my_so_name.so
Clearly it's not able to locate the shared libraries corresponding to the xdk since XmlCreate() is not getting resolved.
Where would these libraries be, what are their names on HPUX, and are they installed by default? If not is the installation procedure documented anywhere.
We'll need this information for both HPUX and AIX.* Don't post that much code. There should never be a reason to. You should be able to break your code down into small enough pieces that you can post a small example that demonstrates your problem.
* When you do post code, use [code] and [/code] tags to make it readable. You can use the code button on the message entry page.
* The stack trace will tell you which line the NPE occurred on, where it was called from, where that was called from, etc. You can use that to help you find your error. Look at the line it's complaining about. What references are on that line followed by a dot, and what arrays do you try to access the elements of. One of those must be null.
* Now that you know what[b] is null, put in a bunch of print statements to track [b]how it got to be null. -
Error while compiling packages
Hi All,
i have been asked to execute some packages. so i took the backup of the existing package by using dbms_metadata and spool.
Now i have been asked to revert it again back to the original.
When i am executing the old backup one again i am getting error. It was valid before. I know the error is due to not proper fromatting, as in vi editor when i am seeing it its coming like this may be due to improper pagesize and linesize setting while spooling
CREATE OR REPLACE PACKAGE "STGPUB1"."BP_RELATED_CONTENT_PKG" AS
* Package Name : BP_RELATED_CONTENT_PKG
* This package is called to get all the information about all related content
* New Procedure "GET_TEASER_IMG_TXT_PRC" is created for BPR2. Date: 15-Mar-04,
*/could you plz help me how to get rid of this...by using vi or notepad or wordpad or by any other process.
Edited by: user8850066 on Jun 28, 2010 1:03 AMAs i told you no dependencies failed the error is due to improper formatting as it was valid earlier.
below is the error
TEXT
PL/SQL: ORA-00923: FROM keyword not found where expected
PLS-00103: Encountered the symbol "AS" when expecting one of the following:
, from
PLS-00103: Encountered the symbol "M" when expecting one of the following:
. ( ) , * @ % & | = - + < / > at in is mod remainder not
range rem => .. <an exponent (**)> <> or != or ~= >= <= <>
and or like LIKE2_ LIKE4_ LIKEC_ between || multiset member
SUBMULTISET_
TEXT
The symbol "." was substituted for "M" to continue.
PLS-00103: Encountered the symbol "NULL" when expecting one of the following:
, * & - + / at mod remainder rem <an identifier>
<a double-quoted delimited-identifier> <an exponent (**)> as
from || multiset
The symbol "," was substituted for "NULL" to continue.
PLS-00103: Encountered the symbol "NULL" when expecting one of the following:
TEXT
. ( , * @ % & - + / at mod remainder rem <an identifier>
<a double-quoted delimited-identifier> <an exponent (**)> as
from || multiset
The symbol "," was substituted for "NULL" to continue.
PL/SQL: SQL Statement ignored
6 rows selected. -
How to turn off validation when compiling Packages...!
Hello,
How do I turn off the validation when compiling Packages in SQLPLus?
Thanks
RaoI'm guessing at what you're after here, but maybe this?
ME_XE?create or replace procedure one
2 as
3 begin
4 null;
5 end;
6 /
Procedure created.
Elapsed: 00:00:00.73
ME_XE?set feedback off
ME_XE?create or replace procedure one
2 as
3 begin
4 null;
5 end;
6 /
Elapsed: 00:00:00.61
Maybe you are looking for
-
How do you change the sound settings when using the lightning digital AV adapter HDMI to a Bluetooth device.
-
6500 loses connection during NSU
So here i go, trying to update my 6500 classic, i've been waiting a while since last time. Because last time i had to return my phone to nokia and get a new one, which took about 2 months. And i don't have time for that. But since the 6500 classic is
-
How do I change the iPod Device Name?
I missed the field to change my ipod's "name" - it assumed the computer name as the device name. How can I update the device name? Thanks!
-
Adobe Download Assistant Quit Unexpectedly- intel iMac
I have tried installing it on my desktop, user folder, on a different HD, refreshed the download page, etc, etc, and I constantly get the same crash message: Process: Adobe Download Assistant [577] Path: /Users/USER/Adobe Download
-
I have iOS 8.02 on both my iPhone and iPad Air and both have both bluetooth and wifi turned on I get the error Remote Hotspot Failure every time I try and connect to my personal hotspot from my iPad. The only way I can get it to work is using the 'ol