Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Oct 29, 2010

Integrated Server

Alhamdulillah thanks for Alloh who has given His mercy to us till now. And also for people who support this project, beginning from our study club students which are keep struggle to realize our goals.

Designing this project has been imagined for along time. The real implementation of ICT for our school, which is become very large community and number of services that must be served. We was studied about amount of network, Linux operating system, wireless technology and also the real cases of ours here. Implementing our knowledge has begin, since we got high speed internet access.

The concept of this project is giving good serving actually on internet access with no breaking the religion rules. Some special configurations are needed to prevent users access prohibited sites.

All software that used on this project are open source. The configurations of this AAA server are customized for SMA Budi Utomo  only. Due to some features of Radius Server cannot run properly, we made some special scripts to handle many cases which not handled by AAA.

We setting up this for project with high-end technology to make it still applicable  for next expansion of ICT. For next step, we can merged such as SIPS (Voip Server), freeNAS (open source NAS implementation) , Kannel (GSM messaging system) to our existing server.

Next urgently needed is develop private website and micro-blog to support some features and also empower human resource in using ICT for teaching. Facing global growth of technology, especially to make micro-blog and private websites, our student and also teacher must familiar to our new system. Some features has been enabled to improve them, such as private samba file server with net-bios login for each teacher 1 Giga Byte quota.

We know that its not too prefect, sometimes we found any vulnerabilities of our system, especially in filtering many words related to porn term and many others. We try to make it best, but we need support from all users to give many suggestions to improve our system together.

check my ppt on  : http://www.slideshare.net/febru/integrated-server
Read more ...

Aug 7, 2010

[SOLVED] Spring Error on x64

Please give me suggestion about this problem,... iam working on this for 4 days
==

PRE-CONDITION :
1. LUCID / netbean 6.8 / x64 / oracle 10 / tomcat 6.0.20 / springFramework / iceFaces framework / hibernate 2.5
2. Oraclelistener + connection => (seems working properly)
3. phisical mem : 4 Gb, swap 8 Gb / centrino core 2 solo

modification :
1. tweak tomcat memory :
-Xmx512m -Xms512m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:NewSize=128m
( http://spring-java-ee.blogspot.com/2010/07/tomcat-javalangoutofmemoryerror-permgen.html )

2. update connection post max on server.xml (let it accept more than 2 Mb)
<Connector URIEncoding="utf-8" maxPostSize="4097152" connectionTimeout="20000" port="8084" protocol="HTTP/1.1" redirectPort="8443"/>

3. update jasper-runtime and jasper-compiler with native jasper of tomcat (suggested by mr. Joko)

4. startup oracle, update oracle url to connect using DataManager, update oracleDialect (it seems working properly)


TAP POINT:
/home/febru/Downloads/INTI
/telkom/telkom-isc/OS3/nbproject/build-impl.xml:701:
<nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>

PROBLEMS:
1. sometimes build => OK but cannot deploy => i do clean and re-build and restart tomcat
2. sometimes error memory => i need to kill force tomcat
3. build OK => Deploy => OK but i've got 404, or 500
5. cannot initialize ServletContainer

MEMORY DUMP:
$ free
total used free shared buffers cached
Mem: 3961232 3912696 48536 0 35344 629104
-/+ buffers/cache: 3248248 712984
Swap: 7815580 156452 7659128

$ top
top - 19:25:17 up 4:43, 3 users, load average: 2.55, 1.86, 1.74
Tasks: 224 total, 4 running, 220 sleeping, 0 stopped, 0 zombie
Cpu(s): 96.0%us, 4.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 3961232k total, 3919508k used, 41724k free, 36004k buffers
Swap: 7815580k total, 156444k used, 7659136k free, 623696k cached
 
1. tomcat log :

Jul 5, 2010 6:49:30 PM org.apache.catalina.core.ApplicationContext log
...INFO: Marking servlet jsp as unavailable
Jul 5, 2010 6:49:30 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /docs threw load() exception
java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactoryat java.net.URLClassLoader$1.run(URLClassLoader.java:202)at java.security.AccessController.doPrivileged(Native Method)at java.net.URLClassLoader.findClass(URLClassLoader.java:190)at java.lang.ClassLoader.loadClass(ClassLoader.java:307)

Jul 5, 2010 6:49:30 PM org.apache.catalina.core.ApplicationContext log
INFO: Marking servlet jsp as unavailable
Jul 5, 2010 6:49:30 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet threw load() exception
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactoryat org.apache.jasper.servlet.JspServlet.<init>(JspServlet.java:58)at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

Jul 5, 2010 6:49:31 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jul 5, 2010 6:49:31 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jul 5, 2010 6:49:31 PM org.apache.catalina.core.ApplicationContext log
INFO: Marking servlet jsp as unavailable
Jul 5, 2010 6:49:31 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /examples threw load() exception
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactoryat org.apache.jasper.servlet.JspServlet.<init>(JspServlet.java:58)at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

Jul 5, 2010 6:50:49 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Jul 5, 2010 6:50:52 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.OutOfMemoryError: PermGen space
Caused by: java.lang.OutOfMemoryError: PermGen spaceat java.lang.ClassLoader.defineClass1(Native Method)at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)at java.lang.ClassLoader.defineClass(ClassLoader.java:616)

Jul 5, 2010 6:50:54 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
java.lang.OutOfMemoryError: PermGen spaceat java.lang.ClassLoader.defineClass1(Native Method)at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)at java.lang.ClassLoader.defineClass(ClassLoader.java:616)at java.security.SecureClassLoader.defineClass(SecureClassLoader.
java:141)

Jul 5, 2010 6:58:26 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /docs threw load() exception
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactoryat org.apache.jasper.servlet.JspServlet.<init>(JspServlet.java:58)at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)at java.lang.reflect.Constructor.newInstance(Constructor.java:513)at java.lang.Class.newInstance0(Class.java:355)

INFO: Reading mappings from resource : ./os3/bussiness/hbm/Profile.hbm.xml
Jul 5, 2010 7:04:06 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
INFO: Mapping class: os3.bussiness.beans.Profile -> profile
Jul 5, 2010 7:04:06 PM org.hibernate.cfg.Configuration addResource
INFO: Reading mappings from resource : ./os3/bussiness/hbm/Radius.hbm.xml
Jul 5, 2010 7:04:06 PM com.icesoft.faces.application.D2DViewHandler <clinit>
INFO:
ICEsoft Technologies, Inc.
ICEfaces 1.6.0 DR5
Build number: 8
Revision: 13974
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
APPLICATION LOG:

init:
deps-module-jar:
deps-ear-jar:
deps-jar:
...Created dir: /home/febru/Downloads/INTI/telkom/telkom-isc/OS3/build/web/WEB-INF/classes
Created dir: /home/febru/Downloads/INTI/telkom/telkom-isc/OS3/build/web/META-INF
Copying 1 file to /home/febru/Downloads/INTI/telkom/telkom-isc/OS3/build/web/META-INF
Copying 228 files to /home/febru/Downloads/INTI/telkom/telkom-isc/OS3/build/web
Copied 43 empty directories to 1 empty directory under /home/febru/Downloads/INTI/telkom/telkom-isc/OS3/build/web
library-inclusion-in-archive:
Copying 1 file to /home/febru/Downloads/INTI/telkom/telkom-isc/OS3/build/web/WEB-INF/lib
Copying 1 file to /home/febru/Downloads/INTI/telkom/telkom-isc/OS3/build/web/WEB-INF/lib
Copying 1 file to /home/febru/Downloads/INTI/telkom/telkom-isc/OS3/build/web/WEB-INF/lib
Copying 1 file to /home/febru/Downloads/INTI/telkom/telkom-isc/OS3/build/web/WEB-INF/lib

Copying 1 file to /home/febru/Downloads/INTI/telkom/telkom-isc/OS3/build/web/WEB-INF/lib
Copying 1 file to /home/febru/Downloads/INTI/telkom/telkom-isc/OS3/build/web/WEB-INF/lib
library-inclusion-in-manifest:
Created dir: /home/febru/Downloads/INTI/telkom/telkom-isc/OS3/build/empty
Compiling 567 source files to /home/febru/Downloads/INTI/telkom/telkom-isc/OS3/build/web/WEB-INF/classes
/home/febru/Downloads/INTI/telkom/telkom-isc/OS3/src/java/os3/backing/beans/speedyAccount/UsagePage.java:526: warning: [deprecation] getDate() in java.util.Date has been deprecated

stopdate.setDate(stopdate.getDate()+1);
/home/febru/Downloads/INTI/telkom/telkom-isc/OS3/src/java/os3/backing/beans/speedyAccount/UsagePage.java:526: warning: [deprecation] setDate(int) in java.util.Date has been deprecated

stopdate.setDate(stopdate.getDate()+1);
/home/febru/Downloads/INTI/telkom/telkom-isc/OS3/src/java/os3/backing/beans/speedyAccount/UsagePage.java:540: warning: [deprecation] getDate() in java.util.Date has been deprecated

if (isSearch && eksekusi) stopdate.setDate(stopdate.getDate()-1);
/home/febru/Downloads/INTI/telkom/telkom-isc/OS3/src/java/os3/backing/beans/speedyAccount/UsagePage.java:540: warning: [deprecation] setDate(int) in java.util.Date has been deprecated

home/febru/Downloads/INTI/telkom/telkom-isc/OS3/src/java/os3/services/assembled/impl/OS3UsageReportImpl.java:42: warning: [deprecation] setMonth(int) in java.util.Date has been deprecated

date.setMonth(mon-1);
/home/febru/Downloads/INTI/telkom/telkom-isc/OS3/src/java/os3/services/assembled/impl/OS3UsageReportImpl.java:43: warning: [deprecation] setDate(int) in java.util.Date has been deprecated

date.setDate(1);
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
16 warnings
Copying 106 files to /home/febru/Downloads/INTI/telkom/telkom-isc/OS3/build/web/WEB-INF/classes
RMI Compiling 1 class to /home/febru/Downloads/INTI/telkom/telkom-isc/OS3/build/web/WEB-INF/classes
compile:
compile-jsps:
Starting Tomcat process...
Waiting for Tomcat...
Tomcat server started.
In-place deployment at /home/febru/Downloads/INTI/telkom/telkom-isc/OS3/build/web
deploy?config=file%3A%2Ftmp%2Fcontext4975874327773052747.xml&path=/OS3
FAIL - Failed to deploy application at context path /OS3
/home/febru/Downloads/INTI/telkom/telkom-isc/OS3/nbproject/build-impl.xml:701: The module has not been deployed.
BUILD FAILED (total time: 1 minute 15 seconds)

HENDY's comment
Hendy Irawan
Feb,
1. yg WAR udah jadi ada gak? kalo ada, coba dicompare ke WAR hasil build. ada file yg kurang gak..?

2. ini pake NB ato Eclipse? nampaknya koq di situ pake NB. coba rebuild ulang project originalnya pake IDE aslinya. aslinya sndiri pake N...B/Eclipse? (kalo eclipse ada file .project, kalo NB ada folder nbproject)

3. di build process ada file yg kurang, tambahkan library commons-logging.jar sbg dependency.

root of the problem: format project aslinya apa (Eclipse/NB)? jgn bikin project baru cm dgn ngambil source, krn byk setting/dependencies dll. berasal dr project tsb.

MY ANSWER
Febru Wasono
‎@Hendy: thanks bro.
1. ada .war nya tp klo di deploy malah error, krn compatibilitas lib untuk jasper-runtime + jasper-compiler di awal tdk sama dgn yg ada di server (makanya Mas Joko saranin di replace)

2. ini di develop oleh bbrp org sebel...umnya dgn bbrpa IDE, terdekat dengan aku (di atasku) dia pk NB

3. common-looging + common-logging-api udah di tambahkan

4. klo ku lihat yg eclipse dia udah gak ada .project nya, itu lah alasannya knpa kmrin km saranin pk STS aku gak jadi pake, aku pake NB aja yg 1 jalur di atasku.

OS3 is operation support system for a telecom company which is handle many network devices to make provisioning.
SOLUTION

Pre Condition :
=========
Product Version: NetBeans IDE 6.8 (Build 200912041610)
Java: 1.6.0_20; Java HotSpot(TM) 64-Bit Server VM 16.3-b01
System: Linux version 2.6.32-22-generic running on amd64; UTF-8; en_US (nb)
Userdir: /home/febru/.netbeans/6.8
Linux x64.

Detected Problems
======
1. Java Aliasing for Java Development Kit on Netbean, some NB project maybe incompatible version with your NB, the new one, define that JDK Alias is "JDK 1.6 (Default)" and the old define as "JDK 1.6" , I don't know exactly why it makes different in compilation process since the ".war" also cannot running well on my tomcat (even it successful to be build).
2. tomcat 6.x use different library on jasper.

Solution Steps:
=========
A. Create new alias for Sun JDK to NB
1. Project Properties
2. Click libraries
3. Click manage platform
4. Add platform with name "JDK 1.6" and locate the folder location refers to your Sun JDK

B. Just use flat version of tomcat 5.X

Points
====
1. ensure that you use Java Sun
2. do not rebuild deployment configuration on NB (usually automatic re-generate)
3. use JDK Alias as "JDK 1.6"
4. use tomcat 5.x
Read more ...