Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348044 - "java.net.Inet4Address cannot be cast to java.lang.String" when IP address is set
Summary: "java.net.Inet4Address cannot be cast to java.lang.String" when IP address is...
Status: CLOSED FIXED
Alias: None
Product: Virgo
Classification: RT
Component: runtime (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.0.0.M06   Edit
Assignee: Violeta Georgieva CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-02 00:10 EDT by Brad Chen CLA
Modified: 2011-06-03 10:26 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brad Chen CLA 2011-06-02 00:10:21 EDT
Build Identifier: 3.0.0.M05

In tomcat-server.xml, adding address="ip address" to any of the <Connector> declaration results in the exception message, "java.net.Inet4Address cannot be cast to java.lang.String." More details are below:

[2011-06-01 23:53:25.733] system-artifacts             <DE0006E> Start failed for bundle 'org.eclipse.gemini.web.tomcat' version '2.0.0.M01'. org.eclipse.virgo.kernel.deployer.core.DeploymentException: BundleException
	at org.eclipse.virgo.kernel.install.artifact.internal.bundle.StandardBundleDriver.startBundle(StandardBundleDriver.java:171)
	at org.eclipse.virgo.kernel.install.artifact.internal.bundle.StandardBundleDriver.start(StandardBundleDriver.java:150)
	at org.eclipse.virgo.kernel.install.artifact.internal.bundle.StandardBundleInstallArtifact.doStart(StandardBundleInstallArtifact.java:271)
	at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.driveDoStart(AbstractInstallArtifact.java:209)
	at org.eclipse.virgo.kernel.install.artifact.internal.bundle.StandardBundleInstallArtifact.start(StandardBundleInstallArtifact.java:260)
	at org.eclipse.virgo.kernel.install.artifact.internal.StandardPlanInstallArtifact.doStart(StandardPlanInstallArtifact.java:120)
	at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.driveDoStart(AbstractInstallArtifact.java:209)
	at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.start(AbstractInstallArtifact.java:199)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.start(PipelinedApplicationDeployer.java:301)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.deploy(PipelinedApplicationDeployer.java:208)
	at org.eclipse.virgo.kernel.userregion.internal.InitialArtifactDeployer$ArtifactDeployingRunnable.deployArtifacts(InitialArtifactDeployer.java:156)
	at org.eclipse.virgo.kernel.userregion.internal.InitialArtifactDeployer$ArtifactDeployingRunnable.run(InitialArtifactDeployer.java:146)
	at java.lang.Thread.run(Thread.java:662)
Caused by: org.osgi.framework.BundleException: Exception in org.eclipse.gemini.web.tomcat.internal.Activator.start() of bundle org.eclipse.gemini.web.tomcat.
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:299)
	at org.eclipse.virgo.kernel.core.internal.StandardBundleStarter.start(StandardBundleStarter.java:57)
	at org.eclipse.virgo.kernel.core.internal.StandardBundleStarter.start(StandardBundleStarter.java:45)
	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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
	at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
	at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	at $Proxy63.start(Unknown Source)
	at org.eclipse.virgo.kernel.install.artifact.internal.bundle.StandardBundleDriver.startBundle(StandardBundleDriver.java:169)
	... 12 common frames omitted
Caused by: java.lang.ClassCastException: java.net.Inet4Address cannot be cast to java.lang.String
	at org.eclipse.virgo.web.tomcat.support.ServerLifecycleLoggingListener.checkPortAvailability(ServerLifecycleLoggingListener.java:105)
	at org.eclipse.virgo.web.tomcat.support.ServerLifecycleLoggingListener.checkConnectorPortsAvailable(ServerLifecycleLoggingListener.java:88)
	at org.eclipse.virgo.web.tomcat.support.ServerLifecycleLoggingListener.handleServerLifecycle(ServerLifecycleLoggingListener.java:79)
	at org.eclipse.virgo.web.tomcat.support.ServerLifecycleLoggingListener.lifecycleEvent(ServerLifecycleLoggingListener.java:38)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
	at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:379)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:98)
	at org.eclipse.gemini.web.tomcat.internal.OsgiAwareEmbeddedTomcat.init(OsgiAwareEmbeddedTomcat.java:161)
	at org.eclipse.gemini.web.tomcat.internal.TomcatServletContainer.<init>(TomcatServletContainer.java:63)
	at org.eclipse.gemini.web.tomcat.internal.TomcatServletContainerFactory.createContainer(TomcatServletContainerFactory.java:30)
	at org.eclipse.gemini.web.tomcat.internal.Activator.createContainer(Activator.java:105)
	at org.eclipse.gemini.web.tomcat.internal.Activator.start(Activator.java:59)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
	... 36 common frames omitted


Reproducible: Always

Steps to Reproduce:
1. Edit tomcat-server.xml, and add address="<ip address>" to any <Connector> declaration. <ip address> is any valid IP address that the machine has.
2. Start Virgo.
Comment 1 Violeta Georgieva CLA 2011-06-03 09:08:22 EDT
Fixed with commit ID eebc23beedd6b3d978206e3f68b67912194703a2
Comment 2 Brad Chen CLA 2011-06-03 09:36:47 EDT
Thanks for the fix.