geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "viola.lu (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (GERONIMO-5615) Failed to deploy war files after putting server directory under "C:\Documents and Settings\myDir"
Date Tue, 16 Nov 2010 15:14:13 GMT

    [ https://issues.apache.org/jira/browse/GERONIMO-5615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932426#action_12932426
] 

viola.lu edited comment on GERONIMO-5615 at 11/16/10 10:12 AM:
---------------------------------------------------------------

hi, david:
I tried bundlecontext.installbundle on felix, felix can resolve %20 and space, no problem,
only eclipse has this problem.https://bugs.eclipse.org/bugs/show_bug.cgi?id=290193 eclipse
3.6 fixed this issue,we should upgrade eclipse from 3.5 to 3.6.

Except for the bundlecontext.installbunle, JarFile API in our org.apache.geronimo.kernel.util.JarUtil
class as below

File file = new File(url.getFile().substring(5, url.getFile().indexOf("!/")));
                String path = url.getFile().substring(url.getFile().indexOf("!/") + 2);
                jarFile = new JarFile(file);
also just supports space in path, not %20. if space is encoded into %20 , will make file not
found exception in new JarFile(file).

So i filed another patch: keep file.toURI.toURL as previous, but call URLDecoder.Decode function
to decode %20 to space as below:
URLDecoder.decode(tempBundleFile.toURI().toURL().toString(),"UTF-8")
File file = new File(URLDecoder.decode(url.getFile().substring(5, url.getFile().indexOf("!/")),"UTF-8"));

It's that OK? Thanks in advance!

      was (Author: viola.lu):
    hi, david:
I tried bundlecontext.installbundle on felix, felix can resolve %20 and space, no problem,
only eclipse has this problem, in its community, it suggests use space as workaround, i also
opened a bug in eclipse bugzilla, but not sure whether they will fix it.

Except for the bundlecontext.installbunle, JarFile API in our org.apache.geronimo.kernel.util.JarUtil
class as below

File file = new File(url.getFile().substring(5, url.getFile().indexOf("!/")));
                String path = url.getFile().substring(url.getFile().indexOf("!/") + 2);
                jarFile = new JarFile(file);
also just supports space in path, not %20. if space is encoded into %20 , will make file not
found exception in new JarFile(file).

So i filed another patch: keep file.toURI.toURL as previous, but call URLDecoder.Decode function
to decode %20 to space as below:
URLDecoder.decode(tempBundleFile.toURI().toURL().toString(),"UTF-8")
File file = new File(URLDecoder.decode(url.getFile().substring(5, url.getFile().indexOf("!/")),"UTF-8"));

It's that OK? Thanks in advance!
  
> Failed to deploy war files after putting server directory under "C:\Documents and Settings\myDir"
> -------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-5615
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5615
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: documentation
>    Affects Versions: 3.0
>         Environment: OS: Windows XP SP3
>            Reporter: Chris Zhang
>            Assignee: viola.lu
>            Priority: Minor
>             Fix For: 3.0
>
>         Attachments: G5615.patch, G5615_Update.patch
>
>
> The steps to recur are:
> (1) Create a directory called myDir under "C:\Documents and Settings"
> (2) Put the geronimo server directory under "C:\Documents and Settings\myDir".  Now the
server root directory is "C:\Documents and Settings\myDir\g". 
> (3) Start the server and  login to the admin console.
> (4) Deploy a war file and some exceptions thrown.
> The exception information is:
>  
> 2010-09-20 16:33:48,329 ERROR [DeploymentPortlet] The application was not deployed.
> Unable to create configuration for deployment: dependencies: null
> org.apache.geronimo.common.DeploymentException: Unable to create configuration for deployment:
dependencies: null
> 	at org.apache.geronimo.deployment.DeploymentContext.createTempConfiguration(DeploymentContext.java:208)
> 	at org.apache.geronimo.deployment.DeploymentContext.initializeConfiguration(DeploymentContext.java:188)
> 	at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:615)
> 	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:250)
> 	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:138)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:600)
> 	at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
> 	at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131)
> 	at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:872)
> 	at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245)
> 	at org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
> 	at org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61)
> 	at java.lang.Thread.run(Thread.java:736)
> Caused by: org.osgi.framework.BundleException: An error occurred trying to read the bundle
> 	at org.eclipse.osgi.internal.baseadaptor.BundleInstall.begin(BundleInstall.java:94)
> 	at org.eclipse.osgi.framework.internal.core.Framework.installWorkerPrivileged(Framework.java:922)
> 	at org.eclipse.osgi.framework.internal.core.Framework$1.run(Framework.java:838)
> 	at java.security.AccessController.doPrivileged(AccessController.java:251)
> 	at org.eclipse.osgi.framework.internal.core.Framework.installWorker(Framework.java:889)
> 	at org.eclipse.osgi.framework.internal.core.Framework.installBundle(Framework.java:833)
> 	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.installBundle(BundleContextImpl.java:167)
> 	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.installBundle(BundleContextImpl.java)
> 	at org.apache.geronimo.deployment.DeploymentContext.createTempConfiguration(DeploymentContext.java:200)
> 	... 15 more
> Caused by: java.io.FileNotFoundException: C:\Documents%20and%20Settings\myDir\geronimo-tomcat7-javaee6-3.0-SNAPSHOT\var\temp\geronimo-fileutils3448848740305009830.tmpfile
> 	at org.eclipse.osgi.framework.internal.protocol.reference.ReferenceURLConnection.connect(ReferenceURLConnection.java:46)
> 	at org.eclipse.osgi.framework.internal.protocol.reference.ReferenceURLConnection.getInputStream(ReferenceURLConnection.java:61)
> 	at org.eclipse.osgi.internal.baseadaptor.BundleInstall.begin(BundleInstall.java:56)
> 	... 23 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message