Показаны сообщения с ярлыком gotcha. Показать все сообщения
Показаны сообщения с ярлыком gotcha. Показать все сообщения
воскресенье, 9 сентября 2012 г.
how-to-create-mutable-java-lang-string
2012, 17 years since java born: how-to-create-mutable-java-lang-string
вторник, 24 июля 2012 г.
Ubuntu x64, avd device creation error
in order to use android sdk in ubuntu (12.04) x64 you need to install x32 java libraries (~270mb), otherwise: Error: Failed to create the SD card
вторник, 10 июля 2012 г.
netty 3.5.1 bundle in Felix 3.2.1 osgi Container = ClassNotFoundException
netty 3.5.1 started in osgi (felix 3.2.1):
If you debug and dig into netty source code - you'll find more descriptive exception: java.lang.ClassNotFoundException: sun.misc.Unsafe not found by org.jboss.netty
The problem seems that osgi container doesn't normally expose sun.misc.* internals, so the application cannot find it, though it's Oracle Jdk 1.6 with this stuff inside.
Looking further to the source code - you'll find the workaround: -Dorg.jboss.netty.tryUnsafe=false
p.s. issue discussion on the netty github tracker
... [org.jboss.netty.util.internal.QueueFactory] - Unable to instance LinkedTransferQueue, fallback to LegacyLinkedTransferQueue java.lang.NoClassDefFoundError: Could not initialize class org.jboss.netty.util.internal.LinkedTransferQueue at org.jboss.netty.util.internal.QueueFactory.createQueue(QueueFactory.java:53) ~[na:na] at org.jboss.netty.channel.socket.nio.AbstractNioWorker.(AbstractNioWorker.java:111) ~[netty-3.5.1.Final.jar:na] at org.jboss.netty.channel.socket.nio.NioWorker. (NioWorker.java:44) ~[netty-3.5.1.Final.jar:na] at org.jboss.netty.channel.socket.nio.NioWorkerPool.createWorker(NioWorkerPool.java:34) ~[netty-3.5.1.Final.jar:na] at org.jboss.netty.channel.socket.nio.NioWorkerPool.createWorker(NioWorkerPool.java:26) ~[netty-3.5.1.Final.jar:na] at org.jboss.netty.channel.socket.nio.AbstractNioWorkerPool. (AbstractNioWorkerPool.java:58) ~[netty-3.5.1.Final.jar:na] at org.jboss.netty.channel.socket.nio.NioWorkerPool. (NioWorkerPool.java:29) ~[netty-3.5.1.Final.jar:na] at org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory. (NioClientSocketChannelFactory.java:149) ~[netty-3.5.1.Final.jar:na] at org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory. (NioClientSocketChannelFactory.java:114) ~[netty-3.5.1.Final.jar:na] ...
If you debug and dig into netty source code - you'll find more descriptive exception: java.lang.ClassNotFoundException: sun.misc.Unsafe not found by org.jboss.netty
The problem seems that osgi container doesn't normally expose sun.misc.* internals, so the application cannot find it, though it's Oracle Jdk 1.6 with this stuff inside.
Looking further to the source code - you'll find the workaround: -Dorg.jboss.netty.tryUnsafe=false
p.s. issue discussion on the netty github tracker
пятница, 18 мая 2012 г.
yet another gotcha this week )
when running scp task from ant (1.8) script - you need place jsch-0.1.48.jar to ant classpath (via IDE e.g.), otherwise you'll get "class org.apache.tools.ant.taskdefs.optional.ssh.Scp was not found" (SO).
And in case of running it from maven - instead of standart form:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (default) on project ...
ildException has occured: Problem: failed to create task or type scp
[ERROR] Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.Scp was not found.
[ERROR] This looks like one of Ant's optional components.
[ERROR] Action: Check that the appropriate optional JAR exists in
[ERROR] -ANT_HOME\lib
[ERROR] -the IDE Ant configuration dialogs
[ERROR]
[ERROR] Do not panic, this is a common problem.
[ERROR] The commonest cause is a missing JAR.
[ERROR]
[ERROR] This is not a bug; it is a configuration problem
[ERROR]
[ERROR] around Ant part ...<scp ....
[ERROR] -> [Help 1]
And in case of running it from maven - instead of standart form:
you'll need to add the following dependencies:maven-antrun-plugin 1.7 deploy .... run
otherwise you'll get in maven smth like that:maven-antrun-plugin 1.7 org.apache.ant ant-jsch 1.7.0 com.jcraft jsch 0.1.48 deploy .... run
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (default) on project ...
ildException has occured: Problem: failed to create task or type scp
[ERROR] Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.Scp was not found.
[ERROR] This looks like one of Ant's optional components.
[ERROR] Action: Check that the appropriate optional JAR exists in
[ERROR] -ANT_HOME\lib
[ERROR] -the IDE Ant configuration dialogs
[ERROR]
[ERROR] Do not panic, this is a common problem.
[ERROR] The commonest cause is a missing JAR.
[ERROR]
[ERROR] This is not a bug; it is a configuration problem
[ERROR]
[ERROR] around Ant part ...<scp ....
[ERROR] -> [Help 1]
faced gotcha
you must use special openssh format key when running scp from ant: http://netpenthe.wordpress.com/2007/02/02/jschexception-invalid-privatekey-ant-scp/
четверг, 17 мая 2012 г.
четверг, 2 февраля 2012 г.
faced gotcha: puzzle with google account in android emulator
When creating your device in AVD - if you select configuration by android version like android 2.2 - you 'll fail to add google account on it ))
Only if you select device configuration by Google API Version (like API Level 8) - you'll get an ability to have google/gmail sign-on on you emulator. Quite a funny.
- related SO question.
Only if you select device configuration by Google API Version (like API Level 8) - you'll get an ability to have google/gmail sign-on on you emulator. Quite a funny.
- related SO question.
Подписаться на:
Сообщения (Atom)