FlorianLR’s Blog

Comments about life

Archive for the ‘Development’ Category

Maven: print all maven, ant and enviroment variables/properties which are available for a build

Posted by langbogen on April 24, 2012

If you want to see all properties which can be used in a build you can add this snipped to your pom.xml:

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <property environment="env" />
                                <echoproperties />
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

Please note that this will show all maven, but also all ant and enviroment properties. But its a good start to take a look before using hard coded paths etc.

A good guide is available here: http://docs.codehaus.org/display/MAVENUSER/MavenPropertiesGuide

Posted in Development | Leave a Comment »

Systemerror 58 with network share from Windows 2000 to Windows 7

Posted by langbogen on October 20, 2009

Running VMWare Server 2.0.1 with Windows 2000 VMWare machines I lose the connection to shares at the Windows 7 Host about one time a week. At the guest I get a error 58 from net use.

In the beginning I did a complete restart, but at the moment I do a net stop server and net start server (in german its namend server, service name is LanmanServer = svchost.exe -k netsvcs) from the command line to bring the service up again.

If anyone has a permanent solution it would be great!

Posted in Development, Windows (de+en) | 1 Comment »

Cooliris and Joomgallery 1.0 “This feed has no items”

Posted by langbogen on October 9, 2009

I activated the Cooliris at my joomgallery 1.0 but after starting the link it only showed the error “This feed has no items”.

First I fixed the ‘/components/com_joomgallery/classes/cooliris.class.php’ by replacing all urlencode with htmlspecialchars like it is described at this Forum Thread.

But as my page has an “ü” in the title the atom feed was still not usable for Cooliris. So I patched the Title Tag to

<title>'.urlencode($mosConfig_sitename).'</title>

and everything worked!

Posted in Development | Leave a Comment »

VMWare Server 2 and invalid virtual machine

Posted by langbogen on September 10, 2009

If you try to open a pre 4.x virtual machine in VMWare Server 2.0.1 you get the following error:

Unknown 1 (Invalid)
The selected virtual machine is not recognized on this system. The cause of this problem may be that the virtual machine’s .vmx file is corrupted, or that the virtual machine version is newer than is recognized by the host. You can remove the virtual machine from the inventory if you believe that it is not recoverable.

I used VMWare Workstation 4.5.2 to upgrade my 3.x virtual machines to a current machine for 4.5.2 and afterwards I was able to open it using Server 2.0.1.

Posted in Development | Leave a Comment »

VMWare Server does not support VMWare Tools Installation

Posted by langbogen on September 7, 2009

Using VMWare Server 2.0.1 (installed on Windows 7) and Windows 2000 as Guest I got the following message when I tried to Install the VMWare Tools from the Web-Interface:

VMware Tools is not supported on this guest OS.
Check the virtual machine’s configuration to make sure the settings match the installed operating system. Consult the documentation for more details about supported guest operating systems.

Workaround: Use VI-Client 2.0 to start the Installation or mount the Installer ISO from <VMWare-Installation-Dir>\windows.iso

Posted in Development | Leave a Comment »

fixing VMWare NAT problems on Windows 7

Posted by langbogen on July 9, 2009

The current version of VMWare (Workstation 6.5.1, 6.5.2, Server 2.0.1, Player) doesn’t support NAT on Windows 7 (RC1). Typically you can ping servers and do nslookups but not use your Internet Browser or ssh/telnet etc.
But you can use the Internet Connection Sharing (ICS).

A more complex solution by removing all virtual adapters can be found in this VMWare Forum thread but this made some troubles on my PC so I simplified these instructions.

First Step: change virtual IP

  1. Run “Manage Virtual Networks” (VMWare Player: start vmnetcfg.exe from installation directory) with administrave rights
  2. go to “Host Virtual Network Mapping” tab, select the “>” next to VMnet1 and (if necessary) change the subnet to something different than 192.168.137.0 (for example 192.168.50.0) and click apply
  3. go to “Host Virtual Network Mapping” tab, select the “>” next to VMnet8 and change the subnet to 192.168.137.0 and click apply
  4. go to “NAT” tab, click edit and change gateway IP adress to 192.168.137.1 and click apply

It is not necessary to restart the NAT service.

Second Step: enable ICS

  1. open the “Network and Sharing Center” and click “Change adapter settings”
  2. open the properties of your LAN-Connection, go to the “sharing” tab and enable “allow other network users to connet through this computer’s internet connection” and select to connect through VMnet8
  3. windows tells you that it will assign IP 192.168.137.1, click OK

Third Step: check VMs

If you have configured a fixed IP inside your VM you must change the IP4 Gateway and DNS1 to 192.168.137.1

Note 1: Port forwarding has to be configured using the ICS Settings button, not the VMWare NAT-Dialog.

Note 2: Windows 7 Beta seems to use 192.168.37.1 as IP für ICS.

Note 3: no Windows Firewall changes are necessary

 

[Update Sep 2011] Take also a look at this comment on how to use the vmnat.exe fromVMWare Player to fix the Problem.

Posted in Development | 70 Comments »

Access Port inside VMWare using Vista

Posted by langbogen on June 19, 2009

Today I wanted to access a Tomcat server running inside a VMWare Server virtual machine from other computers on the local network.

There were three steps necessary:

1. Use the “manage virtual networks” from VMWare to add the port forwarding (click “edit” at the NAT-Tab and select “port forwarding”. The host port gets forwarded to a port on an virtual machines IP address)

2. Vista classifies the VMware virtual network as public network, effectively shutting down the ports.
so open the Vista networking center and change the virtual VMWAre network from public to private.

3. open the Vista firewall settings and add the Port as exception.

[update]
Windows loses the change from point 2 after restarting. For a permantent fix run the script from this article or if you don’t want to run the script simply
1. start regedit and go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}
2. find the adapters where the description contains something like “VMware Virtual Ethernet Adapter for VMnet…”
3. add a new DWORD with name *NdisDeviceType and value 1
4. restart the network adapters (disable/enable) or reboot

Posted in Development | Leave a Comment »

java.io.IOException: Broken pipe with Hudson, maven and maven-changelog-plugin

Posted by langbogen on April 28, 2009

Today I tried to run the maven-changelog-plugin using Hudson (1.295) and maven (2.0.9). I use the :ext: connection method and CVS_RSH ist set to an valid ssh command.

Nevertheless connecting to cvs failed:

java.io.IOException: Broken pipe
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(FileOutputStream.java:260)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
at java.io.FilterOutputStream.flush(FilterOutputStream.java:123)
at org.netbeans.lib.cvsclient.Client.processRequests(Client.java:507)
at org.netbeans.lib.cvsclient.command.log.LogCommand.execute(LogCommand.java:132)
at org.netbeans.lib.cvsclient.Client.executeCommand(Client.java:629)
at org.apache.maven.scm.provider.cvslib.cvsjava.util.CvsConnection.executeCommand(CvsConnection.java:94)
at org.apache.maven.scm.provider.cvslib.cvsjava.util.CvsConnection.processCommand(CvsConnection.java:478)
at org.apache.maven.scm.provider.cvslib.cvsjava.command.changelog.CvsJavaChangeLogCommand.executeCvsCommand(CvsJavaChangeLogCommand.java:54)
at org.apache.maven.scm.provider.cvslib.command.changelog.AbstractCvsChangeLogCommand.executeChangeLogCommand(AbstractCvsChangeLogCommand.java:109)
at org.apache.maven.scm.provider.cvslib.command.changelog.AbstractCvsChangeLogCommand.executeChangeLogCommand(AbstractCvsChangeLogCommand.java:61)
at org.apache.maven.scm.command.changelog.AbstractChangeLogCommand.executeCommand(AbstractChangeLogCommand.java:101)
at org.apache.maven.scm.command.AbstractCommand.execute(AbstractCommand.java:58)
at org.apache.maven.scm.provider.cvslib.AbstractCvsScmProvider.executeCommand(AbstractCvsScmProvider.java:521)
at org.apache.maven.scm.provider.cvslib.AbstractCvsScmProvider.changelog(AbstractCvsScmProvider.java:575)
at org.apache.maven.scm.provider.AbstractScmProvider.changeLog(AbstractScmProvider.java:250)
at org.apache.maven.plugin.changelog.ChangeLogReport.generateChangeSetsFromSCM(ChangeLogReport.java:464)
at org.apache.maven.plugin.changelog.ChangeLogReport.getChangedSets(ChangeLogReport.java:393)
at org.apache.maven.plugin.changelog.ChangeLogReport.executeReport(ChangeLogReport.java:340)
at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:98)
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 hudson.maven.agent.ComponentInterceptor.invoke(ComponentInterceptor.java:47)
at hudson.maven.agent.PluginManagerInterceptor$3.invoke(PluginManagerInterceptor.java:228)
at $Proxy2.generate(Unknown Source)
at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:139)
at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:269)
at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:101)
at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:129)
at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:96)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:182)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
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 hudson.maven.agent.Main.launch(Main.java:158)
at hudson.maven.MavenBuilder.call(MavenBuilder.java:162)
at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:577)
at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:523)
at hudson.remoting.UserRequest.perform(UserRequest.java:92)
at hudson.remoting.UserRequest.perform(UserRequest.java:46)
at hudson.remoting.Request$2.run(Request.java:236)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
[ERROR] Provider message:
[ERROR] The cvs command failed.

It seems that maven is not able to use the command supplied by CVS_RSH. Instead it was necessary to set -Dmaven.scm.cvs.java.cvs_rsh=/usr/bin/ssh

Tricky ;-)

Posted in Development | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.