<< Previous | Home

#samurai is now licensed under the Apache License 2.0

Samurai is a thread dump analysis tool and/or log browsing tool.
It is my oldest open source project and I noticed that the license - LGPL - can be some times making it difficult to embed it's core part into proprietary solutions.

So I decided to change the license to Apache License 2.0.
It's less viral and you can use, integrate Samurai more casually with your commercial and non-commercial project.

GitHub - yusuke/samurai

このエントリーをはてなブックマークに追加   

Just joined the flock! #yuskey_at_twitter

After 4+ years of Twitter4J development, I accepted an engineering position at Twitter, Inc.
Starting from this week, I'm in the flock!

このエントリーをはてなブックマークに追加   

maven release:perform failed after upgrading to OSX Lion #gpg #fink #homebrew

Today I tried to release Twitter4J 2.2.4 using maven release plugin and it failed with an error.
It turned out that mvn-release plugin was unable find gpg command as I cleaned up /sw/bin directory after upgrading to Lion.
Unfortunately the fink team hasn't been managed to package gpg command and this time I used homebrew instead.

Here's the logs for the later reference:

$ mvn -e release:perform -Dgpg.passphrase=******* -Darguments="-Dgpg.passphrase=****** -Dmaven.test.skip=true"
...
[INFO] [INFO] Building jar: /Users/yusukey/opensource/twitter4j/target/checkout/twitter4j-core/target/twitter4j-core-2.2.4-javadoc.jar
[INFO] [INFO] [gpg:sign {execution: sign-artifacts}]
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [ERROR] BUILD ERROR
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Unable to execute gpg command
[INFO]
[INFO] Embedded error: Error while executing process.
[INFO] error=2, No such file or directory
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] For more information, run Maven with the -e switch
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 45 seconds
[INFO] [INFO] Finished at: Tue Aug 02 19:11:43 JST 2011
[INFO] [INFO] Final Memory: 35M/102M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Maven execution failed, exit code: '1'

[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Maven execution failed, exit code: '1'
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Maven execution failed, exit code: '1'
at org.apache.maven.plugins.release.PerformReleaseMojo.execute(PerformReleaseMojo.java:133)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
Caused by: org.apache.maven.shared.release.ReleaseExecutionException: Maven execution failed, exit code: '1'
at org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(AbstractRunGoalsPhase.java:89)
at org.apache.maven.shared.release.phase.RunPerformGoalsPhase.execute(RunPerformGoalsPhase.java:67)
at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:334)
at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:282)
at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:262)
at org.apache.maven.plugins.release.PerformReleaseMojo.execute(PerformReleaseMojo.java:129)
... 19 more
Caused by: org.apache.maven.shared.release.exec.MavenExecutorException: Maven execution failed, exit code: '1'
at org.apache.maven.shared.release.exec.InvokerMavenExecutor.executeGoals(InvokerMavenExecutor.java:375)
at org.apache.maven.shared.release.exec.InvokerMavenExecutor.executeGoals(InvokerMavenExecutor.java:393)
at org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(AbstractRunGoalsPhase.java:81)
... 24 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 19 seconds
[INFO] Finished at: Tue Aug 02 19:11:43 JST 2011
[INFO] Final Memory: 9M/81M
[INFO] ------------------------------------------------------------------------


$ fink install gpg
Password:
Information about 1817 packages read in 0 seconds.
Failed: no package found for specification 'gpg'!


$ /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
...
/usr/local/lib/libfuse_ino64.2.dylib
==> Installation successful!
Now type: brew help
$ brew install gpg
...
ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-1.4.11.tar.bz2
######################################################################## 100.0%
######################################################################## 100.0%==> Downloading patches
==> Patching
patching file configure.ac
patching file ChangeLog
==> /usr/bin/autoconf
==> ./configure --prefix=/usr/local/Cellar/gnupg/1.4.11 --disable-asm
==> make
==> make check
==> make install
/usr/local/Cellar/gnupg/1.4.11: 52 files, 5.1M, built in 55 seconds


このエントリーをはてなブックマークに追加   

Hudson build fails with Maven JVM terminated unexpectedly with exit code 134

We use Hudson as a continuous integration tool for Twitter4J.
I really love the maven oriented and easy to use tool and it makes Twitter4J development much smoother.

But what unfortunate is the error message "ERROR: Maven JVM terminated unexpectedly with exit code 134" which can be seen quite often. This is really annoying because it happens randomly and when it happens, it persists until I restart Hudson.

I consulted the mailing list and knew that exit code 134 indicates that the process crashed with SEGV or something like that.
But somehow I don't couldn't find hs_err_pid[PID].log or core dump on the current directory.
Then I dug an important message from syslog, saying

Nov 25 21:59:17 macmini com.apple.ReportCrash.Root[3736]: 2010-11-25 21:59:17.966 ReportCrash[3736:1407] Saved crash report for java[3732] version 1.0 (1.0) to /Library/Logs/DiagnosticReports/java_2010-11-25-215917_localhost.crash


It seems that Apple's JVM stores crash reports under /Library/Logs/DiagnosticReports/ as same as other native OSX apps.
Here's snippet of the crash report:
Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 libSystem.B.dylib 0x00007fff82e7a3d6 __kill + 10
1 libSystem.B.dylib 0x00007fff82f1a972 abort + 83
2 com.apple.LaunchServices 0x00007fff80a31c9c GetOurLSSessionIDInit() + 298
3 libSystem.B.dylib 0x00007fff82e447fa pthread_once + 95
4 com.apple.LaunchServices 0x00007fff80a31b6a GetOurLSSessionAttributeBits() + 23
5 com.apple.LaunchServices 0x00007fff80a31b3b NormalizeLSSessionID(LSSessionID) + 28
6 com.apple.LaunchServices 0x00007fff80a30c10 _LSApplicationCheckIn + 44
7 com.apple.HIServices 0x00007fff85e473ce _RegisterApplication + 1086
8 com.apple.HIServices 0x00007fff85e4e926 SetApplicationIsDaemon + 90
9 libawt.jnilib 0x00000001150a9884 +[AWTStarter startAWT:] + 902
10 libawt.jnilib 0x000000011506d625 -[CPerformer perform] + 93
11 com.apple.Foundation 0x00007fff811f563b __NSThreadPerformPerform + 219
12 com.apple.CoreFoundation 0x00007fff8734be91 __CFRunLoopDoSources0 + 1361
13 com.apple.CoreFoundation 0x00007fff8734a089 __CFRunLoopRun + 873
14 com.apple.CoreFoundation 0x00007fff8734984f CFRunLoopRunSpecific + 575
15 java 0x0000000100004696 0x100000000 + 18070
16 java 0x0000000100003eee 0x100000000 + 16110
17 java 0x00000001000017b4 0x100000000 + 6068

From the stack, I can see that the JVM crashed while initializing AWT and it appears to be a Mac OSX specific issue.

Then I googled with "AWTStarter crashed __NSThreadPerformPerform java com.apple.main-thread GetOurLSSessionIDInit" and found this thread.
Comments about Nasty problem with headless mode in Tomcat 6-0-24
In fact just after receiving this email from you I also got one from
Apple saying that it's a bug and that they're trying to solve it.


The above thread doesn't tell any solution or workaround, but the subject hints that it happens only on headless mode.
So I turned -Djava.awt.headless=false to true and the problem solved, yay!

Things learned from the issue:
- usually exit code 134 is caused by SEGV
- Apple's JVM dumps crash report to /Library/Logs/DiagnosticReports/java_YYYY-MM-DD-******_[hostname].crash
- Apple's JVM dies with code 134 occasionally and it's a known issue
- the issue can be workarounded with -Djava.awt.headless=true (or just without -Djava.awt.headless option)

このエントリーをはてなブックマークに追加   

Twitter4J 2.1.8 released - now supports ALL official APIs

Twitter4J is an open-sourced, mavenized and Google App Engine/Android ready Java library for the Twitter API which is released under the BSD license.

Twitter4J 2.1.8 is now available for download.
This version supports all existing REST APIs, and comes with example codes for all APIs.


This version is also available in the Maven central repository.
http://repo1.maven.org/maven2/org/twitter4j/
You can also use the snapshot repository.
http://twitter4j.org/maven2/org/twitter4j/

Release Notes - Twitter4J - Version 2.1.8

Bug

  • [TFJ-392] - & not escaped properly in JSON results
  • [TFJ-449] - GetSuggestedUserCategories.java fails with ArrayIndexOutOfBoundsException
  • [TFJ-450] - all trends Resources examples scripts point twitter4j.examples.tweets.UpdateStatus
  • [TFJ-455] - createPlace() fails with 404

Improvement

  • [TFJ-403] - include entities is not enabled for some methods
  • [TFJ-447] - getOAuthRequestToekn() should throw IllegalStateException if Access token is already available
  • [TFJ-448] - getRetweetedBy(IDs)(long statusId, Paging paging) is useless as it returns only the first 100 users and no pagination is necessary
  • [TFJ-456] - retry when receiving 503 status code
  • [TFJ-461] - documentation is pointing old OAuth endpoints

New Feature

  • [TFJ-397] - support site streams
  • [TFJ-451] - support /related_results/show
  • [TFJ-457] - support twipplePhoto

Task

  • [TFJ-452] - deprecate updateDeliveryDevice
  • [TFJ-453] - changing email via account/update_profile is no longer supported
  • [TFJ-458] - refactor ImageUpload
  • [TFJ-459] - ImageUpload example
  • [TFJ-460] - remove authentication credentials from the repository
このエントリーをはてなブックマークに追加   

Twitter4J 2.1.7 released - supports ALL existing REST APIs

Twitter4J is an open-sourced, mavenized and Google App Engine/Android ready Java library for the Twitter API which is released under the BSD license.

Twitter4J 2.1.7 is now available for download.
This version supports all existing REST APIs, and comes with example codes for all APIs.


This version is also available in the Maven central repository.
http://repo1.maven.org/maven2/org/twitter4j/
You can also use the snapshot repository.
http://twitter4j.org/maven2/org/twitter4j/

Release Notes - Twitter4J - Version 2.1.7

Bug

  • [TFJ-408] - Twitter.getLocationTrends(int woeid) throws twitter4j.internal.org.json.JSONException for some woeids
  • [TFJ-412] - twitter4j-httpclient-support doesn't respect HTTP timeout parameters
  • [TFJ-420] - Searching for phrases with a whitespace leads 401 unauthorized

Improvement

  • [TFJ-372] - UserStream: support replies=all option
  • [TFJ-410] - java.lang.SecurityException in ConfigurationBase
  • [TFJ-411] - warn that Proxy is not supported with the default HTTPClient implementation on JDK1.4.2

New Feature

  • [TFJ-366] - support GET users/profile_image/:screen_name method
  • [TFJ-398] - UserStream example
  • [TFJ-413] - support legal resources
  • [TFJ-414] - support POST :user/:list_id/create_all
  • [TFJ-415] - support GET geo/search
  • [TFJ-416] - support geo/similar_places
  • [TFJ-417] - support POST geo/place
  • [TFJ-419] - introduce stream connection lifecycle listener
  • [TFJ-421] - add TwitterStream handling multiple Listener capability
  • [TFJ-422] - provide access to raw JSON strings
  • [TFJ-445] - ability to get response headers from TwitterException

Task

  • [TFJ-399] - example classes need to migrate to OAuth
  • [TFJ-423] - Tweets Resources examples
  • [TFJ-424] - User Resources examples
  • [TFJ-425] - Trends Resources examples
  • [TFJ-426] - Local Trends Resources examples
  • [TFJ-427] - List Resources examples
  • [TFJ-428] - List Members Resources examples
  • [TFJ-429] - List Subscribers Resources examples
  • [TFJ-430] - Direct Message Resources examples
  • [TFJ-431] - Friendship Resources examples
  • [TFJ-432] - Friends and Followers Resources examples
  • [TFJ-433] - Account Resources examples
  • [TFJ-434] - Favorite Resources examples
  • [TFJ-435] - Notification Resources examples
  • [TFJ-436] - Block Resources examples
  • [TFJ-437] - Spam Reporting Resources example
  • [TFJ-438] - Saved Searches Resources examples
  • [TFJ-439] - Geo Resources examples
  • [TFJ-440] - Legal Resources examples
  • [TFJ-441] - Help Resource examples
  • [TFJ-442] - Streamed Tweets Resources examples
  • [TFJ-443] - Search API Resources examples
  • [TFJ-444] - httpclient-support compilation fails: ThreadSafeClientConnManager#setMaxTotalConnections() is now setMaxTotal()
このエントリーをはてなブックマークに追加   

Twitter4J 2.1.3 released - with UserStream and YFrog/TwitPic support

Twitter4J is an open-sourced, mavenized and Google App Engine/Android ready Java library for the Twitter API which is released under the BSD license.

Twitter4J 2.1.3 is now available for download.


This version is also available in the Maven central repository.
http://repo1.maven.org/maven2/org/twitter4j/
You can also use the snapshot repository.
http://twitter4j.org/maven2/org/twitter4j/

Release Notes - Twitter4J - Version 2.1.3

Bug

  • [TFJ-326] - xAuth: setOAuthConsumer() fails with IllegalStateException if the instance is Basic auth'ed
  • [TFJ-338] - getIncomingFriendship() / getOutgoingFriendship() are not checking credentials availability
  • [TFJ-341] - StackOverFlowError at RequestToken.hashCode()
  • [TFJ-342] - Streaming API: wait time for TCP level error is always initialized to 250ms
  • [TFJ-346] - java.lang.IllegalStateException with httpclient-support
  • [TFJ-347] - StatusUpdate#setInReplyToStatusId() is not functioning
  • [TFJ-348] - JSONObject["created_at"] not found.
  • [TFJ-356] - typo in reportSpam method
  • [TFJ-357] - NoSuchMethodError with Log4J 1.2.16
  • [TFJ-369] - httpclient connection closing still not quite right

Improvement

  • [TFJ-349] - JSONObject["created_at"] not found.
  • [TFJ-355] - make PagableResponseList mocking test friendly
  • [TFJ-358] - Apache HttpClient need to be shutdown gracefully
  • [TFJ-359] - defaulting useSSL=false
  • [TFJ-364] - getRetweets() returns only 20 retweets
  • [TFJ-370] - support location element in Tweet

New Feature

  • [TFJ-39] - ability to upload images to TwitPic
  • [TFJ-299] - support YFrog APIs
  • [TFJ-330] - include error code generated from stacktrace in TwitterException#getMessage() for the ease of support
  • [TFJ-334] - support User Stream API
  • [TFJ-339] - support statuses/id/retweeted_by and statuses/id/retweeted_by/ids
  • [TFJ-343] - Add Twitter Search option parameter, result_type
  • [TFJ-350] - support include_rts
  • [TFJ-352] - Have a source code jar in the release zip
  • [TFJ-354] - add verifyCredentials in AsyncTwitter
  • [TFJ-360] - add httpclient max conns configuration
  • [TFJ-361] - Add support for clients specifying arbitrary stream endpoints
  • [TFJ-362] - Streaming API - OAuth support

Task

  • [TFJ-363] - deprecate Basic auth methods
  • [TFJ-365] - move JavaDoc links from https://apiwiki.twitter.com/* to http://dev.twitter.com/doc/*
  • [TFJ-368] - deprecate nearby_places
このエントリーをはてなブックマークに追加