You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Alton Idowu (JIRA)" <ji...@apache.org> on 2008/05/12 00:09:55 UTC
[jira] Created: (CXF-1584) DynamicClientFactory.setupClasspath
method throws Exception if jar file does not exist
DynamicClientFactory.setupClasspath method throws Exception if jar file does not exist
--------------------------------------------------------------------------------------
Key: CXF-1584
URL: https://issues.apache.org/jira/browse/CXF-1584
Project: CXF
Issue Type: Bug
Components: Core
Affects Versions: 2.1
Environment: Ubuntu 7.04, Windows XP, jdk 1.5_09, cxf 2.1
Reporter: Alton Idowu
If a jar file reported by the classloader does not exist, the following exception is thrown:
Caused by: java.util.zip.ZipException: No such file or directory
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:203)
at java.util.jar.JarFile.<init>(JarFile.java:132)
at java.util.jar.JarFile.<init>(JarFile.java:97)
at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.addClasspathFromManifest(DynamicClientFactory.java:366)
at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.setupClasspath(DynamicClientFactory.java:422)
at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:214)
... 54 more
As the code does not display the file in question, it is a very tedious process to find the issue in the classpath. It would be prefferable if the code would ignore any missing jar file. Another possible solution (though less preferrable) would be to print the jar files as they are added.
Code in question:
if (file.exists()) {
classPath.append(file.getAbsolutePath())
.append(System
.getProperty("path.separator"));
}
if (file.getName().endsWith(".jar")) {
addClasspathFromManifest(classPath, file);
}
The following code should fix the issue:
if (file.exists()) {
classPath.append(file.getAbsolutePath())
.append(System
.getProperty("path.separator"));
if (file.getName().endsWith(".jar")) {
addClasspathFromManifest(classPath, file);
}
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (CXF-1584) DynamicClientFactory.setupClasspath
method throws Exception if jar file does not exist
Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Kulp reassigned CXF-1584:
--------------------------------
Assignee: Daniel Kulp
> DynamicClientFactory.setupClasspath method throws Exception if jar file does not exist
> --------------------------------------------------------------------------------------
>
> Key: CXF-1584
> URL: https://issues.apache.org/jira/browse/CXF-1584
> Project: CXF
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.1
> Environment: Ubuntu 7.04, Windows XP, jdk 1.5_09, cxf 2.1
> Reporter: Alton Idowu
> Assignee: Daniel Kulp
>
> If a jar file reported by the classloader does not exist, the following exception is thrown:
> Caused by: java.util.zip.ZipException: No such file or directory
> at java.util.zip.ZipFile.open(Native Method)
> at java.util.zip.ZipFile.<init>(ZipFile.java:203)
> at java.util.jar.JarFile.<init>(JarFile.java:132)
> at java.util.jar.JarFile.<init>(JarFile.java:97)
> at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.addClasspathFromManifest(DynamicClientFactory.java:366)
> at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.setupClasspath(DynamicClientFactory.java:422)
> at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:214)
> ... 54 more
> As the code does not display the file in question, it is a very tedious process to find the issue in the classpath. It would be prefferable if the code would ignore any missing jar file. Another possible solution (though less preferrable) would be to print the jar files as they are added.
> Code in question:
> if (file.exists()) {
> classPath.append(file.getAbsolutePath())
> .append(System
> .getProperty("path.separator"));
> }
>
> if (file.getName().endsWith(".jar")) {
> addClasspathFromManifest(classPath, file);
> }
> The following code should fix the issue:
> if (file.exists()) {
> classPath.append(file.getAbsolutePath())
> .append(System
> .getProperty("path.separator"));
> if (file.getName().endsWith(".jar")) {
> addClasspathFromManifest(classPath, file);
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CXF-1584) DynamicClientFactory.setupClasspath
method throws Exception if jar file does not exist
Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Kulp resolved CXF-1584.
------------------------------
Resolution: Fixed
Fix Version/s: 2.1.1
> DynamicClientFactory.setupClasspath method throws Exception if jar file does not exist
> --------------------------------------------------------------------------------------
>
> Key: CXF-1584
> URL: https://issues.apache.org/jira/browse/CXF-1584
> Project: CXF
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.1
> Environment: Ubuntu 7.04, Windows XP, jdk 1.5_09, cxf 2.1
> Reporter: Alton Idowu
> Assignee: Daniel Kulp
> Fix For: 2.1.1
>
>
> If a jar file reported by the classloader does not exist, the following exception is thrown:
> Caused by: java.util.zip.ZipException: No such file or directory
> at java.util.zip.ZipFile.open(Native Method)
> at java.util.zip.ZipFile.<init>(ZipFile.java:203)
> at java.util.jar.JarFile.<init>(JarFile.java:132)
> at java.util.jar.JarFile.<init>(JarFile.java:97)
> at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.addClasspathFromManifest(DynamicClientFactory.java:366)
> at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.setupClasspath(DynamicClientFactory.java:422)
> at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:214)
> ... 54 more
> As the code does not display the file in question, it is a very tedious process to find the issue in the classpath. It would be prefferable if the code would ignore any missing jar file. Another possible solution (though less preferrable) would be to print the jar files as they are added.
> Code in question:
> if (file.exists()) {
> classPath.append(file.getAbsolutePath())
> .append(System
> .getProperty("path.separator"));
> }
>
> if (file.getName().endsWith(".jar")) {
> addClasspathFromManifest(classPath, file);
> }
> The following code should fix the issue:
> if (file.exists()) {
> classPath.append(file.getAbsolutePath())
> .append(System
> .getProperty("path.separator"));
> if (file.getName().endsWith(".jar")) {
> addClasspathFromManifest(classPath, file);
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.