You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Aman Nanner (JIRA)" <ji...@apache.org> on 2007/06/07 06:59:25 UTC
[jira] Created: (GERONIMO-3220) In-place deployment fails during
discovery of web services
In-place deployment fails during discovery of web services
----------------------------------------------------------
Key: GERONIMO-3220
URL: https://issues.apache.org/jira/browse/GERONIMO-3220
Project: Geronimo
Issue Type: Bug
Security Level: public (Regular issues)
Components: deployment
Affects Versions: 2.0-M6
Environment: Windows XP SP2
Reporter: Aman Nanner
Fix For: 2.0-M6
Inplace deployment of our application fails during discovery of web services. This seems to be due to a bug in the following code in {{org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder}}:
{code}
private List<Class> discoverWebServices(JarFile moduleFile,
boolean isEJB)
throws DeploymentException {
LOG.debug("Discovering web service classes");
File tmpDir = null;
List<URL> urlList = new ArrayList<URL>();
if (isEJB) {
File jarFile = new File(moduleFile.getName());
try {
urlList.add(jarFile.toURL());
} catch (MalformedURLException e) {
// this should not happen
throw new DeploymentException();
}
} else {
/*
* Can't get ClassLoader to load nested Jar files, so
* unpack the module Jar file and discover all nested Jar files
* within it and the classes/ directory.
*/
try {
tmpDir = DeploymentUtil.createTempDir();
/*
* This is needed becuase DeploymentUtil.unzipToDirectory()
* always closes the passed JarFile.
*/
JarFile module = new JarFile(moduleFile.getName());
DeploymentUtil.unzipToDirectory(module, tmpDir);
} catch (IOException e) {
if (tmpDir != null) {
DeploymentUtil.recursiveDelete(tmpDir);
}
throw new DeploymentException("Failed to expand the module archive", e);
}
.....
}
{code}
The exception is thrown at the line {{JarFile module = new JarFile(moduleFile.getName());}}. This code seems to assume that the moduleFile is a packed JAR file, when in fact it is a directory in this case. This line throws an "Access Denied" exception when trying to create the JAR file out of a directory.
The following is a stack trace from the debugger:
{code}
System Thread [RMI TCP Connection(1337)-192.168.12.66] (Suspended (breakpoint at line 123 in JAXWSServiceBuilder))
Axis2Builder(JAXWSServiceBuilder).discoverPOJOWebServices(Module, Map, Map<String,PortInfo>) line: 123
Axis2Builder(JAXWSServiceBuilder).discoverWebServices(Module, boolean, Map) line: 108
Axis2Builder(JAXWSServiceBuilder).findWebServices(Module, boolean, Map, Environment, Map) line: 90
JAXWSServiceBuilder$$FastClassByCGLIB$$5b2252ff.invoke(int, Object, Object[]) line: not available
FastMethod.invoke(Object, Object[]) line: 53
FastMethodInvoker.invoke(Object, Object[]) line: 38
GBeanOperation.invoke(Object, Object[]) line: 127
GBeanInstance.invoke(int, Object[]) line: 828
RawInvoker.invoke(int, Object[]) line: 57
RawOperationInvoker.invoke(AbstractName, Object[]) line: 35
ProxyMethodInterceptor.intercept(Object, Method, Object[], MethodProxy) line: 96
WebServiceBuilder$$EnhancerByCGLIB$$1b64aadc.findWebServices(Module, boolean, Map, Environment, Map) line: not available
TomcatModuleBuilder(AbstractWebModuleBuilder).basicInitContext(EARContext, Module, XmlObject, boolean) line: 350
TomcatModuleBuilder.initContext(EARContext, Module, ClassLoader) line: 300
TomcatModuleBuilder$$FastClassByCGLIB$$6f85ec2c.invoke(int, Object, Object[]) line: not available
FastMethod.invoke(Object, Object[]) line: 53
FastMethodInvoker.invoke(Object, Object[]) line: 38
GBeanOperation.invoke(Object, Object[]) line: 127
GBeanInstance.invoke(int, Object[]) line: 828
RawInvoker.invoke(int, Object[]) line: 57
RawOperationInvoker.invoke(AbstractName, Object[]) line: 35
ProxyMethodInterceptor.intercept(Object, Method, Object[], MethodProxy) line: 96
ModuleBuilder$$EnhancerByCGLIB$$1ed19bb9.initContext(EARContext, Module, ClassLoader) line: not available
SwitchingModuleBuilder.initContext(EARContext, Module, ClassLoader) line: 159
SwitchingModuleBuilder$$FastClassByCGLIB$$d0c31844.invoke(int, Object, Object[]) line: not available
FastMethod.invoke(Object, Object[]) line: 53
FastMethodInvoker.invoke(Object, Object[]) line: 38
GBeanOperation.invoke(Object, Object[]) line: 127
GBeanInstance.invoke(int, Object[]) line: 828
RawInvoker.invoke(int, Object[]) line: 57
RawOperationInvoker.invoke(AbstractName, Object[]) line: 35
ProxyMethodInterceptor.intercept(Object, Method, Object[], MethodProxy) line: 96
ModuleBuilder$$EnhancerByCGLIB$$1ed19bb9.initContext(EARContext, Module, ClassLoader) line: not available
EARConfigBuilder.buildConfiguration(boolean, Artifact, Object, JarFile, Collection, ArtifactResolver, ConfigurationStore) line: 564
EARConfigBuilder$$FastClassByCGLIB$$38e56ec6.invoke(int, Object, Object[]) line: not available
FastMethod.invoke(Object, Object[]) line: 53
FastMethodInvoker.invoke(Object, Object[]) line: 38
GBeanOperation.invoke(Object, Object[]) line: 127
GBeanInstance.invoke(int, Object[]) line: 828
RawInvoker.invoke(int, Object[]) line: 57
RawOperationInvoker.invoke(AbstractName, Object[]) line: 35
ProxyMethodInterceptor.intercept(Object, Method, Object[], MethodProxy) line: 96
CorbaGBeanNameSource$$EnhancerByCGLIB$$55ff15ce.buildConfiguration(boolean, Artifact, Object, JarFile, Collection, ArtifactResolver, ConfigurationStore) line: not available
Deployer.deploy(boolean, File, File, File, boolean, String, String, String, String, String, String, String, String) line: 302
Deployer.deploy(boolean, File, File, String) line: 124
Deployer$$FastClassByCGLIB$$734a235d.invoke(int, Object, Object[]) line: not available
FastMethod.invoke(Object, Object[]) line: 53
FastMethodInvoker.invoke(Object, Object[]) line: 38
GBeanOperation.invoke(Object, Object[]) line: 127
GBeanInstance.invoke(String, Object[], String[]) line: 863
BasicKernel.invoke(AbstractName, String, Object[], String[]) line: 239
KernelGBean.invoke(AbstractName, String, Object[], String[]) line: 342
KernelGBean$$FastClassByCGLIB$$1cccefc9.invoke(int, Object, Object[]) line: not available
FastMethod.invoke(Object, Object[]) line: 53
FastMethodInvoker.invoke(Object, Object[]) line: 38
GBeanOperation.invoke(Object, Object[]) line: 127
GBeanInstance.invoke(String, Object[], String[]) line: 863
BasicKernel.invoke(AbstractName, String, Object[], String[]) line: 239
MBeanGBeanBridge.invoke(String, Object[], String[]) line: 168
MetaDataImpl$PrivateDynamicMeta(DynamicMetaDataImpl).invoke(Object, String, Object[], String[]) line: 213
MetaDataImpl.invoke(Object, String, Object[], String[]) line: 220
DefaultMBeanServerInterceptor.invoke(ObjectName, String, Object[], String[]) line: 815
JmxMBeanServer.invoke(ObjectName, String, Object[], String[]) line: 784
RMIConnectionImpl.doOperation(int, Object[]) line: 1408
RMIConnectionImpl.access$100(RMIConnectionImpl, int, Object[]) line: 81
RMIConnectionImpl$PrivilegedOperation.run() line: 1245
AccessController.doPrivileged(PrivilegedExceptionAction<T>, AccessControlContext) line: not available [native method]
RMIConnectionImpl.doPrivilegedOperation(int, Object[], Subject) line: 1348
RMIConnectionImpl.invoke(ObjectName, String, MarshalledObject, String[], Subject) line: 782
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 585
UnicastServerRef2(UnicastServerRef).dispatch(Remote, RemoteCall) line: 294
Transport$1.run() line: 153
AccessController.doPrivileged(PrivilegedExceptionAction<T>, AccessControlContext) line: not available [native method]
TCPTransport(Transport).serviceCall(RemoteCall) line: 149
TCPTransport.handleMessages(Connection, boolean) line: 466
TCPTransport$ConnectionHandler.run() line: 707
Thread.run() line: 595
{code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (GERONIMO-3220) In-place deployment fails during
discovery of web services
Posted by "Aman Nanner (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-3220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aman Nanner closed GERONIMO-3220.
---------------------------------
Resolution: Invalid
Invalid bug. The problem was something else.
> In-place deployment fails during discovery of web services
> ----------------------------------------------------------
>
> Key: GERONIMO-3220
> URL: https://issues.apache.org/jira/browse/GERONIMO-3220
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: deployment
> Affects Versions: 2.0-M6
> Environment: Windows XP SP2
> Reporter: Aman Nanner
> Fix For: 2.0-M6
>
>
> Inplace deployment of our application fails during discovery of web services. This seems to be due to a bug in the following code in {{org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder}}:
> {code}
> private List<Class> discoverWebServices(JarFile moduleFile,
> boolean isEJB)
> throws DeploymentException {
> LOG.debug("Discovering web service classes");
> File tmpDir = null;
> List<URL> urlList = new ArrayList<URL>();
> if (isEJB) {
> File jarFile = new File(moduleFile.getName());
> try {
> urlList.add(jarFile.toURL());
> } catch (MalformedURLException e) {
> // this should not happen
> throw new DeploymentException();
> }
> } else {
> /*
> * Can't get ClassLoader to load nested Jar files, so
> * unpack the module Jar file and discover all nested Jar files
> * within it and the classes/ directory.
> */
> try {
> tmpDir = DeploymentUtil.createTempDir();
> /*
> * This is needed becuase DeploymentUtil.unzipToDirectory()
> * always closes the passed JarFile.
> */
> JarFile module = new JarFile(moduleFile.getName());
> DeploymentUtil.unzipToDirectory(module, tmpDir);
> } catch (IOException e) {
> if (tmpDir != null) {
> DeploymentUtil.recursiveDelete(tmpDir);
> }
> throw new DeploymentException("Failed to expand the module archive", e);
> }
> .....
> }
> {code}
> The exception is thrown at the line {{JarFile module = new JarFile(moduleFile.getName());}}. This code seems to assume that the moduleFile is a packed JAR file, when in fact it is a directory in this case. This line throws an "Access Denied" exception when trying to create the JAR file out of a directory.
> The following is a stack trace from the debugger:
> {code}
> System Thread [RMI TCP Connection(1337)-192.168.12.66] (Suspended (breakpoint at line 123 in JAXWSServiceBuilder))
> Axis2Builder(JAXWSServiceBuilder).discoverPOJOWebServices(Module, Map, Map<String,PortInfo>) line: 123
> Axis2Builder(JAXWSServiceBuilder).discoverWebServices(Module, boolean, Map) line: 108
> Axis2Builder(JAXWSServiceBuilder).findWebServices(Module, boolean, Map, Environment, Map) line: 90
> JAXWSServiceBuilder$$FastClassByCGLIB$$5b2252ff.invoke(int, Object, Object[]) line: not available
> FastMethod.invoke(Object, Object[]) line: 53
> FastMethodInvoker.invoke(Object, Object[]) line: 38
> GBeanOperation.invoke(Object, Object[]) line: 127
> GBeanInstance.invoke(int, Object[]) line: 828
> RawInvoker.invoke(int, Object[]) line: 57
> RawOperationInvoker.invoke(AbstractName, Object[]) line: 35
> ProxyMethodInterceptor.intercept(Object, Method, Object[], MethodProxy) line: 96
> WebServiceBuilder$$EnhancerByCGLIB$$1b64aadc.findWebServices(Module, boolean, Map, Environment, Map) line: not available
> TomcatModuleBuilder(AbstractWebModuleBuilder).basicInitContext(EARContext, Module, XmlObject, boolean) line: 350
> TomcatModuleBuilder.initContext(EARContext, Module, ClassLoader) line: 300
> TomcatModuleBuilder$$FastClassByCGLIB$$6f85ec2c.invoke(int, Object, Object[]) line: not available
> FastMethod.invoke(Object, Object[]) line: 53
> FastMethodInvoker.invoke(Object, Object[]) line: 38
> GBeanOperation.invoke(Object, Object[]) line: 127
> GBeanInstance.invoke(int, Object[]) line: 828
> RawInvoker.invoke(int, Object[]) line: 57
> RawOperationInvoker.invoke(AbstractName, Object[]) line: 35
> ProxyMethodInterceptor.intercept(Object, Method, Object[], MethodProxy) line: 96
> ModuleBuilder$$EnhancerByCGLIB$$1ed19bb9.initContext(EARContext, Module, ClassLoader) line: not available
> SwitchingModuleBuilder.initContext(EARContext, Module, ClassLoader) line: 159
> SwitchingModuleBuilder$$FastClassByCGLIB$$d0c31844.invoke(int, Object, Object[]) line: not available
> FastMethod.invoke(Object, Object[]) line: 53
> FastMethodInvoker.invoke(Object, Object[]) line: 38
> GBeanOperation.invoke(Object, Object[]) line: 127
> GBeanInstance.invoke(int, Object[]) line: 828
> RawInvoker.invoke(int, Object[]) line: 57
> RawOperationInvoker.invoke(AbstractName, Object[]) line: 35
> ProxyMethodInterceptor.intercept(Object, Method, Object[], MethodProxy) line: 96
> ModuleBuilder$$EnhancerByCGLIB$$1ed19bb9.initContext(EARContext, Module, ClassLoader) line: not available
> EARConfigBuilder.buildConfiguration(boolean, Artifact, Object, JarFile, Collection, ArtifactResolver, ConfigurationStore) line: 564
> EARConfigBuilder$$FastClassByCGLIB$$38e56ec6.invoke(int, Object, Object[]) line: not available
> FastMethod.invoke(Object, Object[]) line: 53
> FastMethodInvoker.invoke(Object, Object[]) line: 38
> GBeanOperation.invoke(Object, Object[]) line: 127
> GBeanInstance.invoke(int, Object[]) line: 828
> RawInvoker.invoke(int, Object[]) line: 57
> RawOperationInvoker.invoke(AbstractName, Object[]) line: 35
> ProxyMethodInterceptor.intercept(Object, Method, Object[], MethodProxy) line: 96
> CorbaGBeanNameSource$$EnhancerByCGLIB$$55ff15ce.buildConfiguration(boolean, Artifact, Object, JarFile, Collection, ArtifactResolver, ConfigurationStore) line: not available
> Deployer.deploy(boolean, File, File, File, boolean, String, String, String, String, String, String, String, String) line: 302
> Deployer.deploy(boolean, File, File, String) line: 124
> Deployer$$FastClassByCGLIB$$734a235d.invoke(int, Object, Object[]) line: not available
> FastMethod.invoke(Object, Object[]) line: 53
> FastMethodInvoker.invoke(Object, Object[]) line: 38
> GBeanOperation.invoke(Object, Object[]) line: 127
> GBeanInstance.invoke(String, Object[], String[]) line: 863
> BasicKernel.invoke(AbstractName, String, Object[], String[]) line: 239
> KernelGBean.invoke(AbstractName, String, Object[], String[]) line: 342
> KernelGBean$$FastClassByCGLIB$$1cccefc9.invoke(int, Object, Object[]) line: not available
> FastMethod.invoke(Object, Object[]) line: 53
> FastMethodInvoker.invoke(Object, Object[]) line: 38
> GBeanOperation.invoke(Object, Object[]) line: 127
> GBeanInstance.invoke(String, Object[], String[]) line: 863
> BasicKernel.invoke(AbstractName, String, Object[], String[]) line: 239
> MBeanGBeanBridge.invoke(String, Object[], String[]) line: 168
> MetaDataImpl$PrivateDynamicMeta(DynamicMetaDataImpl).invoke(Object, String, Object[], String[]) line: 213
> MetaDataImpl.invoke(Object, String, Object[], String[]) line: 220
> DefaultMBeanServerInterceptor.invoke(ObjectName, String, Object[], String[]) line: 815
> JmxMBeanServer.invoke(ObjectName, String, Object[], String[]) line: 784
> RMIConnectionImpl.doOperation(int, Object[]) line: 1408
> RMIConnectionImpl.access$100(RMIConnectionImpl, int, Object[]) line: 81
> RMIConnectionImpl$PrivilegedOperation.run() line: 1245
> AccessController.doPrivileged(PrivilegedExceptionAction<T>, AccessControlContext) line: not available [native method]
> RMIConnectionImpl.doPrivilegedOperation(int, Object[], Subject) line: 1348
> RMIConnectionImpl.invoke(ObjectName, String, MarshalledObject, String[], Subject) line: 782
> NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
> NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
> DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
> Method.invoke(Object, Object...) line: 585
> UnicastServerRef2(UnicastServerRef).dispatch(Remote, RemoteCall) line: 294
> Transport$1.run() line: 153
> AccessController.doPrivileged(PrivilegedExceptionAction<T>, AccessControlContext) line: not available [native method]
> TCPTransport(Transport).serviceCall(RemoteCall) line: 149
> TCPTransport.handleMessages(Connection, boolean) line: 466
> TCPTransport$ConnectionHandler.run() line: 707
> Thread.run() line: 595
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.