Nov 20, 2011

Override pom from command line

Hi Everyone,

I had this scenario but my solution catch them all.
I had this <skipTests>true</skipTests> in my pom.
Trying to "mvn -DskipTests=false test" => not good, it doesn't override the pom.

Solution:
Define a property like this
  <skip.my.tests>true</skip.my.tests>
Add it to the <properties> section

In the above example, i will replace it and it will look like this <skipTests>${skip.my.tests}</skipTests>

This is the solution for all the thing you want to override from command line.

Hoped it helped,

Dor

Sep 21, 2011

getResponseCode() Illegal character in URL

2 Hours i have spent on this.

String key = base64encode(password);

What's solved me the issue was this "key.replaceAll("\r\n?", "");"

Hoping that it will assist you too and save you the time i already spent,

(The base64encode method based on apache-commons base64encoder)

Dor

Sep 18, 2011

FTPClient completePendingCommand() deadlock stuck freeze

It's strange, that this method hangs or freeze for this method.

I used commons-net 2.2v, don't know if it already solved at 3v. But, i have found that my problem was:
Executing this method before closing the input stream.
Switching them, first closing the input stream and then running completePendingCommand() solved the issue.
+
There are some cases where this method isn't really necessary, beware.

Hoped it helped,
Dor

Sep 12, 2011

quartz cron expression

Lately i looked over the web for cron expression maker or validations, thought to my self that if it doesn't exists already, i will write something. That will help us all. 

So , i have found it, it is here http://www.cronmaker.com/

Nice 1,

Dor

Aug 23, 2011

the project does not have any gwt sdks on its build path

Strange when this occurs although everything is configured well, build path as well as maven pom.xml file.
The solution i have found here is working.


Bye,
Dor


Group not found: launchGroup

Happened to me in eclipse, unable to compile my project although it's not the issue.
I have found that in the work space directory there is a file named ".lock" in which eclipse creates.
After exiting Eclipse -> Deleting this file -> Entering again to eclipse -> Trying to compile the project succeeded.


See ya,

Dor

Aug 7, 2011

unable to find valid certification path to requested target

Hi,

The issue: You are probably missing the certificate for the specific site you work with.

Solution: You need to add export the certificate for the site mentioned above, After exporting it, add it to the cacerts file of java (default file) which located usually here : "c:\Program Files\Java\jdk1.6.0_23\jre\lib\security".
(the default java password for this file is 'changeit').

* If you need the export procedure, tell me, it's simple i can guide you.

In the code, add this lines :

System.setProperty("javax.net.ssl.trustStore", "path_to_cacerts_file/cacerts"); // for example c:\cert\cacerts
System.setProperty("javax.net.ssl.trustStorePassword", "changeit"); //unless you change it


You can also create your own certificate storage file and direct java to it instead.

Helpful link to keytool can be found here.

Jul 3, 2011

zip file from unix

Today i had a very strange experience, i am sharing this with you to save you time.

I got a zip file, big one with many directories.

When i have tried to open it with windows default zip extractor i got 3 directories, although actual there were 10 directories.

When i have opened it using the free 7zip it worked, all the 10 directories extracted.

As far as i know this is Microsoft bug. Who know's, but actually 7zip solved me the problem.



Dor

Jun 13, 2011

Skype has stopped working on windows 7

Had this once with the current version, 5.3.011.

I think that they already know about this issue and working to solve it.

I thought it's something with the firewall but it doesn't looks like.

My solution that worked for me, founded among many forums is:
Start -> Run -> write '%appdata%\Skype' in this directory, delete a file named 'shared.xml'
Restart skype.

But i know it doesn't solve the problem for all cases, meaning you may have like me windows 7 64bit, do the same solution but it won't work, why ? Don't really know.

Dor

May 31, 2011

The SCM for this project has blocked this attempt to wipe out the project's workspace.

Hi,

It happen when i tried to wipe out the Hudson workspace. I have noticed also that this issue already open on Hudson Jira.

Solution: To wait for Hudson team or to do it manually.


Dor

May 16, 2011

Problems encountered while moving resources

Hi,

It appears that changing a capital letter package name like:
MONITOR into monitor
Is impossible in eclipse helios version. This happen to me on Windows 7 64bit.

Solution: Change this "MONITOR" into something like this "MONITORa" as a temporary name.
Then change the temporary name to "monitor" this should work.

In case you are using svn or subclipse plugin for eclipse, i thinks that you will need to do commit between changes.

Hoped i helped,
Dor

Mar 23, 2011

chrome wsdl

If you wondered why chrome unlike FF for example doesn't display WSDL, i have checked this issue, it's an open bug 434, and it will be fixed in the next chrome release.
So till then CTRL+U to view source solve this issue.


Dor

Jan 20, 2011

Invalid row number (100039) outside allowable range (0..65535)

Lately i got this error while using apache poi version 3.2 but it's still exists in 3.7:
"the poi 3.2 or 3.7 version support till 65535 max rows not more"

Actually, excel 2003 maximum rows in a sheet is 65535, but since than in version like in excel 2007 and excel 2010
the maximum rows per sheet is around 1m. But apache poi still doesn't support this amount of rows.

Meaning, that you need to split into several sheets
Something like this:

if (i>65535){ // or some other number or condirion
    // create a new sheet
    sheet = workBook.createSheet();
   i = 1;
}

Hoped that it helps,


Dor

Jan 6, 2011

java.lang.ClassNotFoundException: javassist.util.proxy.MethodFilter

I got this error while using maven, jetty, wicket, spring and hibernate all with annotations.
Found two solutions
1) Get the java assist jar using maven, but them i got into some other problems.

2) Use this :

 <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-jaxrs</artifactId>
  </dependency>
It seems that it solved the issue since the jaxrs contains this method filter.

If you know other or better solution, i am here to listen.

Hoped it helped,
Dor

Jan 4, 2011

org.postgresql.util.PSQLException: ERROR: syntax error at or near

This happen when you have a name which is a reserved name or already exists by a table for example.

Lets say your are trying to add a new table and the error was:
org.postgresql.util.PSQLException: ERROR: syntax error at or near "User"

You got this error since the postgresql in the current schema has already a User table and this name is reserved.
Change your table (if in your case like this example, it's a table issue) name to a different.

Hoped it helps.

Dor

Started SelectChannelConnector@0.0.0.0:8080

I am not saying it's ok to receive this kind of message, but if you did, try
accessing your jetty server via http://localhost:8080 or http://ip_address:8080

Hoped it helps.

Dor

By the way there is a nice paper back book from amazon named Jetty (Web Server)

addComponentInstantiationListener in wicket 1.5

Hi,

In 1.4 we could do this :  addComponentInstantiationListener(springInjector);

The only solution that i found in 1.5 M3 is calling the super and doing this like:
  super.getComponentInstantiationListeners().add(springInjector);

Maybe in later versions it will be more easy.

Wicket in Action