Wednesday, September 23, 2015
The command that fixed my Apple Store error "can't load data from the apple software update server"
sudo chown -R _softwareupdate:_softwareupdate /var/folders/zz/zyxvpxvq6csfxvn_n00000s0000068
Thursday, November 15, 2012
Activiti getDbSqlSession() nullPointer exception
connection = getDbSqlSession().getSqlSession().getConnection();
And it gives me nullPointer exception. After many failures, here's the solution, in /WEB-INF/applicationContext.xml, add one more property for bean processEngineConfiguration:
<property name="transactionsExternallyManaged" value="true" />
This will solve the problem.
Important: I used this in Spring Beans, which was used in <activiti:formProperty>, if you use it directly, better use JPAContainer.
Monday, July 30, 2012
Activiti activiti-explorer connects to Oracle
Its' nice to have a working Activiti after downloading, but the default H2 database seems hard to switch to Oracle. The simplest way to do it is:
Copy the activiti-explorer to existing tomcat_home/webapps directory, then open activiti-explorer/WEB-INF/application-Context.xml
comment out the default connection:
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
< property name="driverClassName" value="${jdbc.driver}" />
< property name="url" value="${jdbc.url}" />
< property name="username" value="${jdbc.username}" />
< property name="password" value="${jdbc.password}" />
< property name="defaultAutoCommit" value="false" />
< /bean>
Copy the JNDI resource in your Tomcat server.xml:
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
< property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
< property name="url" value="jdbc:oracle:thin:@oratest.test1.com:1521:test1" />
< property name="username" value="user" />
< property name="password" value="passwd" />
< property name="defaultAutoCommit" value="false" />
< /bean>
Make sure the account you are using could create new tables in the Oracle database, because the first time you start activiti-explorer it will try to create all the tables.
Retart Tomcat, and now you are using Oracle instead of H2.
Or, instead of hard coding, change it in WEB-INF/classes/db.properties file. Original file:
db=h2
jdbc.driver=org.h2.Driver
jdbc.url=jdbc\:h2\:tcp\://localhost/activiti
jdbc.username=sa
jdbc.password=
change to:
db=oracle
jdbc.driver=oracle.jdbc.driver.OracleDriver
jdbc.url=jdbc:oracle:thin:@oratest.test1.com:1521:test1
jdbc.username=sa
jdbc.password=
Friday, September 23, 2011
Table not found in statement
java.sql.SQLException: Table not found in statement [...
After searching online and randomly trying to fix it, I finally come to change the column name to "myPassword", and it worked. I could only wish the error message could be more helpful.
Friday, September 16, 2011
STS and Grails error
The type groovy.lang.GroovyObject cannot be resolved. It is indirectly referenced from required .class files.
To solve this problem, right click the project, grail tools -> refresh dependencies fixed it.
Wednesday, April 28, 2010
Windows CPU 100% all the time
Finally, I tried go to Start, then Run Services, on Automatic Updates, disable it. From then on, I'm wuauclt.exe free!
Thursday, July 2, 2009
MyEclipse upgrade - making a war file
In the older version of MyEclipse, we used JBoss plugin for Eclipse for .war file generation. But after the upgrade to MyEclipse 7.1, the JBoss plugin simply doesn't work anymore.
Of course, we could always write our own deployment descriptor, run ANT, and generate the .war file. But that also means install ANT on every developer's local machine, configure the path, go to command line every time, not something easy for everyday life.
So, after some research, here's the alternative:
Although MyEclipse does not require Tomcat plugin, we could just set the path and run different versions of Tomcat. But if we add the Tomcat plugin, we could generate .war file!
Step 1: Right click the project name -> properties
Step 2: Choose Tomcat from the bottom, then click Export to WAR settings.
Step 3: Browse to the correct directory and give the WAR file name.
Step 4: Click Apply and close the properties page.
Step 5: Right click the project name -> Tomcat Project -> Export to the WAR file sets in project properties.
Now we have a .war file ready to be deployed.