Friday, October 21, 2016

Execute failed: java.io.IOException: Cannot run program "wsgen": CreateProcess error=2,

I was running the Ant build for a small webservice standalone program I was getting below error -

Buildfile: C:\workspace\WebserviceExample\build.xml
wsgen:

BUILD FAILED
C:\workspace\WebserviceExample\build.xml:5: Execute failed: java.io.IOException: Cannot run program "wsgen": CreateProcess error=2, The system cannot find the file specified

Total time: 413 milliseconds

This was my build.xml file-

<project default="wsgen">
 
 <target name="wsgen" >
   
  <exec executable="wsgen">
      
   <arg line="-cp ./bin -keep -s ./src -d ./bin com.myfirst.wsServer.SayHello"/>
      
  </exec>
      
 </target>
 
</project>


After providing the complete path for wsgen in exec tag it worked like a charm-

<project default="wsgen">
 
 <target name="wsgen" >
   
  <exec executable="C:\Program Files\Java\jdk1.7.0_79\bin\wsgen">
      
   <arg line="-cp ./bin -keep -s ./src -d ./bin com.myfirst.wsServer.SayHello"/>
      
  </exec>
      
 </target>
 
</project>

Hope it will help.





Thursday, February 11, 2016

Pre-installed MYSQL Server and WAMP MYSQL Server clash due to same port

I was having issue with installing WAMP server. Every things looks fine to me but WAMP server didn't turned to Green from yellow. Tried all the way available on google but didn't work.

Initially I thought it may be due to Apache server port, look for service using 80 port but there was none. Then I look more closely and it seems my Apache server is running fine it is my pre-installed MySQL server which was causing the conflict between WAMP MySql server

Stopped Mysql server-


Started MySQL server is still having Start/Resume Service as green-


While Started Apache server had Start/Resume Services as grey-


I opened the my.ini file and look for the port number and changed from default 3306 to 3305 or it can be any free avialable port.
[mysqld]
port=3306
changed to 
port=3305

It worked like charm for me. Hope someone also might get help from this blog.


MySQL said: Documentation #1045 - Access denied for user 'root'@'localhost' (using password: NO)


While installing the WAMP server I was having the issue of MYSQL connection as I had provided my own passward in MYSQL-

1045 - Access denied for user 'root'@'localhost' (using password: NO)  error when typing http://localhost/phpmyadmin in browser.
Solution:
Go to file C:\wamp\apps\phpmyadmin4.1.14\config.inc.php
Go to the line $cfg['Servers'][$i]['password']='' and change this to
$cfg['Servers'][$i]['password']='NO'
Try opening phpMyAdmin again, and hopefully  message will read as "Access denied for user 'root'@'localhost' (using password: YES)
Now change the password in the above line to 'yourpassword' (whatever you had set it to before)

And here we go-