Saturday, March 22, 2014

Clase en Auditoria en Informática, Actividad Webinar

Como parte de la actividad Seleccion de Webinar para discusion en equipo de contenido de auditoria, hacemos una pequena sintesis de lo realizado en la actividad.


Guide to Auditing and Logging in the Oracle E Business Suite


Nombre del Equipo: Zeus
  • Francisco Goicochea Romero
  • Carlos Eduardo Vega Castillo
  • David Eduardo Magaña
  • Sanchez Huerta Octavio

Descripcion:

Oracle publica sus herramientas y su conjuncion con estandares de auditoria en Informática un punto son las rutinas que posee cada una de sus tecnologias para hacer un reporte de analisis de auditoria un ejemplo de ello es oracle database addm los cuales miden el uso de la base de datos de acuerdo a queriea optimizados, Oracle Service Bus tambien posee pistas de auditoria con caulquier tipo de adaptador en el mercado un ejemplo importe es la intercomunicacion con SAP sus herramientas tienen nodos que pueden interconectarse con transaciones que pueden ser monitoreadas.
Enlance del webinar:




Proveedor: Oracle

How to resolve "Object has been closed" driver exception on Oracle Weblogic?

Oracle Weblogic provide a list of jdbc driver which you could connect with another database different of Oracle Database Grid Link, If you chose a configuration of a simple datasource you will get a error like this on your log file:


Caused by: java.sql.SQLException: [FMWGEN][SQLServer JDBC Driver]Object has been closed.
    at weblogic.jdbc.sqlserverbase.ddb_.b(Unknown Source)
    at weblogic.jdbc.sqlserverbase.ddb_.a(Unknown Source)
    at weblogic.jdbc.sqlserverbase.ddb9.b(Unknown Source)
    at weblogic.jdbc.sqlserverbase.ddb9.a(Unknown Source)
    at weblogic.jdbc.sqlserverbase.BaseConnection.getTransactionIsolation(Unknown Source)
    at weblogic.jdbc.wrapper.PoolConnection_weblogic_jdbc_sqlserverbase_ddah.getTransactionIsolation(Unknown Source)
    at org.springframework.jdbc.datasource.DataSourceUtils.prepareConnectionForTransaction(DataSourceUtils.java:190)



After a quick look inside of the log file I figure out that is Memory Problem of OracleWeblogic so I imagine that driver should be changed by an updated driver made it by a the original vendor in this case we are talking of Microsoft SqlServer 2008 R2, if you following a changing configuration of a driver inside of a weblogic you might get an idea of you was. After a successful artifact update and depending of application I get an error like this:

Reached maximum capacity of pool

So after a shameful explanation of what in the hell I was doing with a Database Connection with my leaders the decision was taken, increase capacity connection inside of oracle weblogic, in future releases I will fix my problem with shared configuration using weblogic.xml and probably using a SqlAdapter created with Oracle Service Bus.

 Best regards,

Tuesday, March 18, 2014

How to Install Apache Archiva 2.0 in Oracle Linux 5

Apache Archiva 2.0.0 has been released a new version, after doing some installation of the product  I have decided to publish a quick tutorial of my accomplishment.

Dealing with the following error on Archiva 2.0.0 Standalone :

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'roleManager': Invocation of init method failed; nested exception is java.util.NoSuchElementException

I had to take a decision to resolve this problem, In my case in a brief look into the log file makes me figure out new Apache Archiva version is built on Spring Framework 4.0 and  JQuery, 

Requirements:
  • JDK 1.6+
  • Apache Archiva 2.0.0 WAR
  • Apache Archiva 2.0.0 Standalone
  • Apache Tomcat 7.0.52

Installing Apache Archiva Apache Tomcat

1. You can following a tutorial (http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos), if you have a more complex doubt of installing apache tomcat on Oracle Linux 5.

Do not forget add variables inside classpath because is needed for Apache Archiva 2.0.0 WAR.

export CATALINA_OPTS="-Dappserver.home=$CATALINA_HOME -Dappserver.base=$CATALINA_HOME" (for UNIX)

OR

set CATALINA_OPTS="-Dappserver.home=%CATALINA_HOME% -Dappserver.base=%CATALINA_HOME%" (for Windows)


1. Create a folder inside tomcat instalation like this:

/root/programs/apache-tomcat-7.0.52/archiva

this folder is where you should paste archiva war file.


2. Create a file called archiva.xml inside your apache tomcat on

/root/programs/apache-tomcat-7.0.52/conf/Catalina/localhost


<?xml version='1.0' encoding='utf-8'?>
<Context path="/archiva"
          docBase="/root/programs/apache-tomcat-7.0.52/archiva/apache-archiva-2.0.0.war">

 <Resource name="jdbc/users" auth="Container" type="javax.sql.DataSource"
           username="sa"
           password=""
           driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
           url="jdbc:derby:/path/to/database/users;create=true" />

 <Resource name="mail/Session" auth="Container"
            type="javax.mail.Session"
            mail.smtp.host="localhost"/>
</Context>

Please take a look inside the file, you will have to change docBase according to your configuration.

A pretty windows like this should be printed when you start your apache tomcat console:


You only have to click Start Button.

Best Regards,


How to Install a JDBC Driver on Oracle Weblogic?

Next Steps should be doing inside each Server on Cluster Server also you have to include administrative console of Oracle Weblogic.

Procedure for Driver Installation

1. We should use an administrative user on Server Console for copy and paste an artifact.(Example: weblogic).
2. Copy & Paste jdbcdriver-XXX.jar artifact inside the following path: ${WL_HOME}/server/lib/

 ${WL_HOME} is the path where is installed binary files of Oracle Weblogic, as example of that is the following path:
 /root/Oracle/Middleware/wlserver_10.3/server/lib/

3. Add permissions to the artifact executing the following sentences:


chmod 755 ${WL_HOME}/server/lib/jdbcdriver-XXX.jar

4. Open the following file inside ${WL_HOME}/server/lib

jdbcdrivers.xml

Add the following code snippet:

EXAMPLE (SQL SERVER 2008 R2):

  <Driver
    Database="MS SQL Server"
    Vendor="Microsoft"
    Type="Type 4"
    DatabaseVersion="2005 and later"
    ForXA="false"
    ClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
    URLHelperClassname="weblogic.jdbc.utils.MSSQL2005JDBC4DriverURLHelper"
    TestSql="SELECT 1">
        <Attribute Name="DbmsName" Required="true" InURL="true"/>
        <Attribute Name="DbmsHost" Required="true" InURL="true"/>
        <Attribute Name="DbmsPort" Required="true" InURL="true" DefaultValue="1433"/>
        <Attribute Name="DbmsUsername" Required="true" InURL="false"/>
        <Attribute Name="DbmsPassword" Required="true" InURL="false"/>
  </Driver>

  <Driver
    Database="MS SQL Server"
    Vendor="Microsoft"
    Type="Type 4"
    DatabaseVersion="2005 and later"
    ForXA="true"
    ClassName="com.microsoft.sqlserver.jdbc.SQLServerXADataSource"
    URLHelperClassname="weblogic.jdbc.utils.MSSQL2005JDBC4DriverURLHelper"
    TestSql="SELECT 1">
        <Attribute Name="DbmsName" Required="true" InURL="true"/>
        <Attribute Name="DbmsHost" Required="true" InURL="true"/>
        <Attribute Name="DbmsPort" Required="true" InURL="true" DefaultValue="1433"/>
        <Attribute Name="DbmsUsername" Required="true" InURL="false"/>
        <Attribute Name="DbmsPassword" Required="true" InURL="false"/>

  </Driver>

This snippet contains a description of Driver Class and the proper use of it inside Oracle Weblogic Driver declaration.

The way to choose where it should be add the above lines is looking for the vendor of you jdbc driver, In my case is a SQL Server 2008 R2 so I identify where is SQL SERVER part of code and after the final bracket I add above code.

5. Go to the following path:

${WL_HOME}/common/bin
Example: /root/Oracle/Middleware/wlserver_10.3/common/bin

Open a file called: commEnv.sh

You should locate the following lines:
(Search between the lines of : # set up WebLogic Server's class path):

Inside of WEBLOGIC_CLASSPATH add the following line:

${CLASSPATHSEP}${WL_HOME}/server/lib/sqljdbc4.jar

You should have a variable declared likes this one:

WEBLOGIC_CLASSPATH="${JAVA_HOME}/lib/tools.jar${CLASSPATHSEP}${WL_HOME}/server/lib/weblogic_sp.jar${CLASSPATHSEP}${WL_HOME}/server/lib/weblogic.jar${CLASSPATHSEP}${FEATURES_DIR}/weblogic.server.modules_10.3.5.0.jar${CLASSPATHSEP}${WL_HOME}/server/lib/webservices.jar${CLASSPATHSEP}${ANT_HOME}/lib/ant-all.jar${CLASSPATHSEP}${ANT_CONTRIB}/lib/ant-contrib.jar${CLASSPATHSEP}${WL_HOME}/server/lib/sqljdbc4.jar"

After of doing step briefly commented above, you should have to restarted all your servers including administrative console, and If you declare a driver, you will get a Database Driver declared as you did it.



Best regards,