ต้นเหตุที่ปิดไปแล้วแต่เหมือนไม่ปิดคือ หน้า log-in ทำงานคนละ User กับที่ใช้งานอยู่ โดย log-in จะใช้ User คือ gdm ดังนั้นสามารถปิดเสียงได้โดยใช้คำสั่งดังนี้
#sudo -u gdm gconftool-2 --set /desktop/gnome/sound/event_sounds --type bool false
#sudo -u gdm gconftool-2 --set /desktop/gnome/sound/event_sounds --type bool false
<bean name="/home" class="com.gable.train.springmvc.test2.mvc.HomeController" />
<bean name="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
<property name="prefix" value="/WEB-INF/jsp/"/>
<property name="suffix" value=".jsp"/>
</bean>
#sudo /etc/init.d/vboxdrv setup
[Desktop Entry]
Encoding=UTF-8
Name=NetBeans IDE 6.7.1
Exec=/bin/sh "/media/src/IDE/netbeans-6.7.1/bin/netbeans"
Icon=/media/src/IDE/netbeans-6.7.1/nb6.7/netbeans.png
Categories=Application;Development;Java;IDE
Version=1.0
StartupNotify=true
Type=Application
Terminal=0
To add a TrueType font to Java, just put the .TTF file in the /usr/java/jre/lib/fonts directory.
Note: you may need to restart the JVM to see it
XRM is an application platform layer that accelerates the development of relational Line-of-Business applications and drives business results through an optimised infrastructure on the Microsoft Application Platform.มันจะเหมือน OFBiz Framework รึเปล่าน้า
#dmesg | tail
[ 65.273067] EXT3-fs warning: mounting fs with errors, running e2fsck is recommended
[ 65.273406] EXT3 FS on sdb5, internal journal
#sudo e2fsck -C0 -f -v /dev/sdb1
dn: cn=John Doe,dc=example,dc=com
cn: John Doe
givenName: John
sn: Doe
telephoneNumber: +1 888 555 6789
telephoneNumber: +1 888 555 1232
mail: john@example.com
manager: cn=Barbara Doe,dc=example,dc=com
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
objectClass: top
<tx:annotation-driven transaction-manager="transactionManager" />
<aop:aspectj-autoproxy />
<bean id="transactionAttributeSource" class="org.springframework.transaction.annotation.AnnotationTransactionAttributeSource" />
<bean id="transactionInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager" ref="transactionManager" />
<property name="transactionAttributeSource" ref="transactionAttributeSource" />
</bean>
<bean id="org.springframework.transaction.config.internalTransactionAdvisor" class="org.springframework.transaction.interceptor.BeanFactoryTransactionAttributeSourceAdvisor">
<property name="transactionAttributeSource" ref="transactionAttributeSource" />
<property name="adviceBeanName" value="transactionInterceptor" />
</bean>
@Configuration
class MyConfig {
public @Bean MyBean myBean() {
new MyBean();
}
}
<beans>
<!-- first, define your individual @Configuration classes as beans -->
<bean class="myapp.MyConfig"/>
<!-- be sure to include the JavaConfig bean post-processor -->
<bean class="org.springframework.config.java.process.ConfigurationPostProcessor"/>
</beans>
<bean id="myconfig" class="myapp.MyConfig" />
<bean id="myBean" factory-bean="myconfig" factory-method="myBean" />
เฟรมเวิร์คที่ช้ากว่า มีเหตุผลที่ช้ากว่า ส่วนใหญ่จะเป็นที่มันมี layer เพิ่มเพื่อ 1) ทำให้เราเขียนโปรแกรมได้ง่ายขึ้น งานเสร็จเร็วขึ้น 2) ทำให้เราบำรุงรักษาโปรแกรมได้ง่ายขึ้น 3) มีฟีเจอร์สนับสนุนมากกว่า ไม่ต้องเขียนเอง
23:30:20,632 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
MyPrint/remote - EJB3.x Default Remote Business Interface
MyPrint/remote-test.PrintRemote - EJB3.x Remote Business Interface
+- MyPrint (class: org.jnp.interfaces.NamingContext)
| +- remote-test.PrintRemote (class: Proxy for: test.PrintRemote)
| +- remote (class: Proxy for: test.PrintRemote)
public class PrintClient {
public static void main(String[] args) {
try {
Properties prop = new Properties();
prop.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
prop.setProperty("java.naming.provider.url","jnp://localhost:1099");
prop.setProperty("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
InitialContext ctx = new InitialContext(prop);
PrintRemote print = (PrintRemote)ctx.lookup("MyPrint/remote");
print.display();
} catch (Exception e) {
e.printStackTrace();
}
}
}
<bean id="txManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<gorm:sessionFactory base-package="org.grails.samples"
data-source-ref="dataSource" message-source-ref="messageSource" transaction-manager-ref="txManager">
<property name="configLocations" value="classpath:hibernate.cfg.xml" />
<property name="hibernateProperties">
<util:map>
<entry key="hibernate.hbm2ddl.auto" value="update" />
</util:map>
</property>
</gorm:sessionFactory>
Exception in thread "main" org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'transactionManager' is defined
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:387)
at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:971)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:758)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:422)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:83)
at com.gable.grails.test.interoperation.App.main(App.java:15)
targetRegistry.registerAlias("transactionManager", transactionManagerRef);
targetRegistry.registerAlias(transactionManagerRef, "transactionManager");
[groovyc] Compiling 9 source files to /media/src/source/Eclipse/TestFrameWork/workspace/groovy/my-app/target/classes
[groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, Compile error during compilation with javac.
[groovyc] /media/src/source/Eclipse/TestFrameWork/workspace/groovy/my-app/src/java/org/grails/samples/Person.java:3: package javax.persistence does not exist
[groovyc] import javax.persistence.Entity;
[groovyc] ^
[groovyc] /media/src/source/Eclipse/TestFrameWork/workspace/groovy/my-app/src/java/org/grails/samples/Person.java:4: package javax.persistence does not exist
[groovyc] import javax.persistence.GeneratedValue;
[groovyc] ^
[groovyc] /media/src/source/Eclipse/TestFrameWork/workspace/groovy/my-app/src/java/org/grails/samples/Person.java:5: package javax.persistence does not exist
[groovyc] import javax.persistence.GenerationType;
[groovyc] ^
[groovyc] /media/src/source/Eclipse/TestFrameWork/workspace/groovy/my-app/src/java/org/grails/samples/Person.java:6: package javax.persistence does not exist
[groovyc] import javax.persistence.Id;
[groovyc] ^
[groovyc] /media/src/source/Eclipse/TestFrameWork/workspace/groovy/my-app/src/java/org/grails/samples/Person.java:7: package javax.persistence does not exist
[groovyc] import javax.persistence.Version;
[groovyc] ^
[groovyc] /media/src/source/Eclipse/TestFrameWork/workspace/groovy/my-app/src/java/org/grails/samples/Person.java:26: cannot find symbol
[groovyc] symbol: class Entity
[groovyc] @Entity
[groovyc] ^
[groovyc] /media/src/source/Eclipse/TestFrameWork/workspace/groovy/my-app/src/java/org/grails/samples/Person.java:28: cannot find symbol
[groovyc] symbol : class Id
[groovyc] location: class org.grails.samples.Person
[groovyc] @Id
[groovyc] ^
[groovyc] /media/src/source/Eclipse/TestFrameWork/workspace/groovy/my-app/src/java/org/grails/samples/Person.java:29: cannot find symbol
[groovyc] symbol : class GeneratedValue
[groovyc] location: class org.grails.samples.Person
[groovyc] @GeneratedValue(strategy=GenerationType.AUTO)
[groovyc] ^
[groovyc] /media/src/source/Eclipse/TestFrameWork/workspace/groovy/my-app/src/java/org/grails/samples/Person.java:31: cannot find symbol
[groovyc] symbol : class Version
[groovyc] location: class org.grails.samples.Person
[groovyc] @Version
[groovyc] ^
[groovyc] 9 errors
[groovyc]
[groovyc]
[groovyc] 1 error
Compilation error: Compilation Failed
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>ejb3-persistence</artifactId>
<version>1.0.2.GA</version>
</dependency>
SEVERE: StandardServer.await: create[8005]:
java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.(ServerSocket.java:185)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:373)
at org.apache.catalina.startup.Catalina.await(Catalina.java:630)
at org.apache.catalina.startup.Catalina.start(Catalina.java:590)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
sudo netstat -p -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 *:902 *:* LISTEN 6325/vmware-authdla
tcp 0 0 *:8333 *:* LISTEN 6466/vmware-hostd
tcp 0 0 localhost:8307 *:* LISTEN 6466/vmware-hostd
tcp 0 0 localhost:ipp *:* LISTEN 5069/cupsd
tcp 0 0 localhost:62168 *:* LISTEN 7621/wish8.5
tcp 0 0 *:8222 *:* LISTEN 6466/vmware-hostd
tcp6 0 0 localhost:6880 [::]:* LISTEN 8861/java
tcp6 0 0 localhost:8005 [::]:* LISTEN 6322/webAccess
tcp6 0 0 [::]:22214 [::]:* LISTEN 8861/java
tcp6 0 0 [::]:8008 [::]:* LISTEN 8861/java
tcp6 0 0 [::]:netbios-ssn [::]:* LISTEN 5387/smbd
tcp6 0 0 localhost:45100 [::]:* LISTEN 8861/java
tcp6 0 0 [::]:8009 [::]:* LISTEN 6322/webAccess
tcp6 0 0 [::]:47698 [::]:* LISTEN 8861/java
tcp6 0 0 [::]:8308 [::]:* LISTEN 6322/webAccess
tcp6 0 0 [::]:microsoft-ds [::]:* LISTEN 5387/smbd
ps -ef | grep webAccess
root 6312 1 0 19:30 ? 00:00:00 /bin/sh /usr/bin/vmware-watchdog -s webAccess -u 30 -q 5 /usr/lib/vmware/webAccess/java/jre1.5.0_15/bin/webAccess -client -Xmx64m -XX:MinHeapFreeRatio=30 -XX:MaxHeapFreeRatio=30 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/common/endorsed -classpath /usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/bin/bootstrap.jar:/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/bin/commons-logging-api.jar -Dcatalina.base=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16 -Dcatalina.home=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16 -Djava.io.tmpdir=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/temp org.apache.catalina.startup.Bootstrap start
root 6322 6312 0 19:30 ? 00:00:10 /usr/lib/vmware/webAccess/java/jre1.5.0_15/bin/webAccess -client -Xmx64m -XX:MinHeapFreeRatio=30 -XX:MaxHeapFreeRatio=30 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/common/endorsed -classpath /usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/bin/bootstrap.jar:/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/bin/commons-logging-api.jar -Dcatalina.base=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16 -Dcatalina.home=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16 -Djava.io.tmpdir=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/temp org.apache.catalina.startup.Bootstrap start
sudo chmod a+w server.xml
sudo chmod a-w server.xml