[JBoss JIRA] (AS7-4066) Using groovy throws a NoClassDefFoundError
by Kim Lindberg (JIRA)
Kim Lindberg created AS7-4066:
---------------------------------
Summary: Using groovy throws a NoClassDefFoundError
Key: AS7-4066
URL: https://issues.jboss.org/browse/AS7-4066
Project: Application Server 7
Issue Type: Bug
Components: Class Loading
Affects Versions: 7.1.0.Final
Environment: Mac OSX 10.7.2
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-11D50b)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)
Reporter: Kim Lindberg
Assignee: David Lloyd
Using groovy (tested versions 1.7.6 and 1.8.6 (latest) results in a NoClassDefFoundError even though the groovy jar is in the classpath. If the dependency to groovy module is removed, it fails at an earlier stage, which would indicate that it finds the library correctly. Declaring the groovy module as a global module did not help.
To clarify the procedure leading to the error is:
1. a configuration xml file is deployed
2. the deployer creates a spring bean based on the xml
3. some configurations are done with groovy script, so during bean construction, the groovy script is processed
4. exception is thrown
Stacktrace follows:
[Server:ivr] 15:44:47,833 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00001: Failed to start service jboss.deployment.unit."DEFAULT-ivr-messageservice.xml".DEPENDENCIES: org.jboss.msc.service.StartException in service jboss.deployment.unit."DEFAULT-ivr-messageservice.xml".DEPENDENCIES: Failed to process phase DEPENDENCIES of deployment "DEFAULT-ivr-messageservice.xml"
[Server:ivr] at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
[Server:ivr] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
[Server:ivr] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
[Server:ivr] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [classes.jar:1.6.0_29]
[Server:ivr] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [classes.jar:1.6.0_29]
[Server:ivr] at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_29]
[Server:ivr] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageTransport' defined in URL [jar:file:/usr/java/jboss-as-7.1.0.Final/modules/com/tecnomen/ivr/system/ivr-message-service/main/ivr-message-service-2.0.0-6-SNAPSHOT.jar!/com/tecnomen/ivr/messaging/service/receiver/jms/applicationContext-message-service-jms.xml]: Cannot resolve reference to bean 'messageRouter' while setting bean property 'messageRouter'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageRouter' defined in URL [jar:file:/usr/java/jboss-as-7.1.0.Final/modules/com/tecnomen/ivr/system/ivr-message-service/main/ivr-message-service-2.0.0-6-SNAPSHOT.jar!/com/tecnomen/ivr/messaging/service/receiver/jms/applicationContext-message-service-jms.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
[Server:ivr] PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'routing' threw exception; nested exception is java.lang.NoClassDefFoundError: groovy/lang/Script
[Server:ivr] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
[Server:ivr] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
[Server:ivr] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360)
[Server:ivr] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)
[Server:ivr] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
[Server:ivr] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
[Server:ivr] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
[Server:ivr] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
[Server:ivr] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
[Server:ivr] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
[Server:ivr] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
[Server:ivr] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
[Server:ivr] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
[Server:ivr] at com.tecnomen.ivr.messaging.service.receiver.jms.JmsForwardingMessageListener.initJMSTransport(JmsForwardingMessageListener.java:97)
[Server:ivr] at com.tecnomen.ivr.messaging.service.receiver.jms.JmsForwardingMessageListener.init(JmsForwardingMessageListener.java:55)
[Server:ivr] at com.tecnomen.ivr.messaging.service.configuration.XMLConfigurationReader.initConfigurable(XMLConfigurationReader.java:128)
[Server:ivr] at com.tecnomen.ivr.messaging.service.configuration.XMLConfigurationReader.access$1100(XMLConfigurationReader.java:42)
[Server:ivr] at com.tecnomen.ivr.messaging.service.configuration.XMLConfigurationReader$ReportChannelXMLConfiguration.parseListener(XMLConfigurationReader.java:768)
[Server:ivr] at com.tecnomen.ivr.messaging.service.configuration.XMLConfigurationReader$ReportChannelXMLConfiguration.parse(XMLConfigurationReader.java:751)
[Server:ivr] at com.tecnomen.ivr.messaging.service.configuration.XMLConfigurationReader$ReportChannelXMLConfiguration.<init>(XMLConfigurationReader.java:743)
[Server:ivr] at com.tecnomen.ivr.messaging.service.configuration.XMLConfigurationReader$MessageServiceXMLConfiguration.parseReportChannel(XMLConfigurationReader.java:370)
[Server:ivr] at com.tecnomen.ivr.messaging.service.configuration.XMLConfigurationReader$MessageServiceXMLConfiguration.parse(XMLConfigurationReader.java:329)
[Server:ivr] at com.tecnomen.ivr.messaging.service.configuration.XMLConfigurationReader$MessageServiceXMLConfiguration.<init>(XMLConfigurationReader.java:314)
[Server:ivr] at com.tecnomen.ivr.messaging.service.configuration.XMLConfigurationReader.parseConfiguration(XMLConfigurationReader.java:47)
[Server:ivr] at com.tecnomen.ivr.messaging.service.MessageServiceDeployer.deploy(MessageServiceDeployer.java:186)
[Server:ivr] at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
[Server:ivr] ... 5 more
[Server:ivr] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageRouter' defined in URL [jar:file:/usr/java/jboss-as-7.1.0.Final/modules/com/tecnomen/ivr/system/ivr-message-service/main/ivr-message-service-2.0.0-6-SNAPSHOT.jar!/com/tecnomen/ivr/messaging/service/receiver/jms/applicationContext-message-service-jms.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
[Server:ivr] PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'routing' threw exception; nested exception is java.lang.NoClassDefFoundError: groovy/lang/Script
[Server:ivr] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1396)
[Server:ivr] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)
[Server:ivr] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
[Server:ivr] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
[Server:ivr] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
[Server:ivr] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
[Server:ivr] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
[Server:ivr] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
[Server:ivr] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
[Server:ivr] ... 30 more
[Server:ivr] Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
[Server:ivr] PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'routing' threw exception; nested exception is java.lang.NoClassDefFoundError: groovy/lang/Script
[Server:ivr] at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:102)
[Server:ivr] at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:58)
[Server:ivr] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
[Server:ivr] ... 38 more
[Server:ivr]
[Server:ivr] 15:44:47,850 INFO [org.jboss.as.server] (host-controller-connection-threads - 3) JBAS015870: Deploy of deployment "DEFAULT-ivr-messageservice.xml" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"DEFAULT-ivr-messageservice.xml\".DEPENDENCIES" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"DEFAULT-ivr-messageservice.xml\".DEPENDENCIES: Failed to process phase DEPENDENCIES of deployment \"DEFAULT-ivr-messageservice.xml\""}}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 1 month
[JBoss JIRA] (JASSIST-158) Method calls with a parameter of long[] or double[] are compiled to incorrect bytecode resulting in errors such as java.lang.VerifyError: ... Inconsistent args_size for opc_invokeinterface
by Jens Deppe (JIRA)
Jens Deppe created JASSIST-158:
----------------------------------
Summary: Method calls with a parameter of long[] or double[] are compiled to incorrect bytecode resulting in errors such as java.lang.VerifyError: ... Inconsistent args_size for opc_invokeinterface
Key: JASSIST-158
URL: https://issues.jboss.org/browse/JASSIST-158
Project: Javassist
Issue Type: Bug
Reporter: Jens Deppe
Assignee: Shigeru Chiba
I believe this patch fixes the problem:
Method calls with a parameter of long[] or double[] are compiled to incorrect bytecode. For example, the following piece of code...
long[] aLongArray;
PdxWriter writer;
...
writer.writeLongArray("aLongArray", aLongArray);
Produces code similar to this:
13: aload_1
14: ldc #32; //String aLongArray
16: aload_0
17: getfield #35; //Field aLongArray:[J
20: invokeinterface #39, 4; //InterfaceMethod com/gemstone/gemfire/pdx/PdxWriter.writeLongArray:(Ljava/lang/String;[J)Lcom/gemstone/gemfire/pdx/PdxWriter;
25: pop
Following the code, it looks like getfield calculates an incorrect stackdepth when applied to a long[] or double[], resulting in an incorrect number of args applied to invokeinterface.
The following patch seems to fix things.
Index: src/main/javassist/compiler/MemberCodeGen.java
===================================================================
--- src/main/javassist/compiler/MemberCodeGen.java (revision 624)
+++ src/main/javassist/compiler/MemberCodeGen.java (working copy)
@@ -957,7 +957,7 @@
else
className = null;
- boolean is2byte = (c == 'J' || c == 'D');
+ boolean is2byte = ((c == 'J' || c == 'D') && dim == 0);
return is2byte;
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 1 month
[JBoss JIRA] (AS7-3809) Limit of open file descriptors missing in standalone.sh/domain.sh in AS7
by Luka Furlan (JIRA)
Luka Furlan created AS7-3809:
--------------------------------
Summary: Limit of open file descriptors missing in standalone.sh/domain.sh in AS7
Key: AS7-3809
URL: https://issues.jboss.org/browse/AS7-3809
Project: Application Server 7
Issue Type: Feature Request
Components: Scripts, Server
Affects Versions: 7.1.0.Final
Reporter: Luka Furlan
Assignee: Brian Stansberry
Priority: Minor
In AS6 run.sh script included an option to raise the limit of open file descriptors. In AS7, where run.sh was replaced by standalone.sh/domain.sh, MAX_FD variable still exists, but it's not used.
If you decide to include this functionality in AS7, it would be great if the flow of the script would be changed, so it doesn't immediately stop when MAX_FD could not be set, but it tries with a lower value. Something like:
{noformat}
STEP_VALUE=50
i=${MAX_FD}
while [ ${i} -gt 0 ]; do
if ulimit -n ${i} 2> /dev/null 1>&2; then
percent=`expr ${i} \* 100 \/ ${MAX_FD}`
echo "Open files limit set to ${i} (${percent}% value of desired ${MAX_FD})."
exit 0
else
i=`expr ${i} - ${STEP_VALUE}`
fi
done
{noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 1 month
[JBoss JIRA] (AS7-3872) The package sun.util.locale is missing when you use the class java.util.Locale in a JSP file.
by Igor Nadal (JIRA)
Igor Nadal created AS7-3872:
-------------------------------
Summary: The package sun.util.locale is missing when you use the class java.util.Locale in a JSP file.
Key: AS7-3872
URL: https://issues.jboss.org/browse/AS7-3872
Project: Application Server 7
Issue Type: Bug
Components: Server
Affects Versions: 7.1.0.Final
Environment: Operative system: Kubuntu 11.10 (Oneiric Ocelot) / Linux 3.0.0-16-generic x86_64
JDK: Oracle JDK 1.7.0_01
Reporter: Igor Nadal
Assignee: Jason Greene
If you use the 2 arguments constructor of java.util.Locale in a JSP file, it triggers an exception which reports about the absence of classes from the package sun.util.locale.
This is the stacktrace which I get when I use such constructor in a simple JSP:
15:49:56,476 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/test].[jsp]] (http--0.0.0.0-8443-1) Servlet.service() for servlet jsp threw exception: org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 7 in the jsp file: /index.jsp
The type sun.util.locale.LocaleExtensions cannot be resolved. It is indirectly referenced from required .class files
4:
5: %><%
6:
7: Locale myLocale = new Locale ("es", "ES");
8:
9:
10: %>
An error occurred at line: 7 in the jsp file: /index.jsp
The type sun.util.locale.BaseLocale cannot be resolved. It is indirectly referenced from required .class files
4:
5: %><%
6:
7: Locale myLocale = new Locale ("es", "ES");
8:
9:
10: %>
Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92) [jbossweb-7.0.10.Final.jar:]
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330) [jbossweb-7.0.10.Final.jar:]
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:446) [jbossweb-7.0.10.Final.jar:]
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:362) [jbossweb-7.0.10.Final.jar:]
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340) [jbossweb-7.0.10.Final.jar:]
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:327) [jbossweb-7.0.10.Final.jar:]
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:607) [jbossweb-7.0.10.Final.jar:]
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312) [jbossweb-7.0.10.Final.jar:]
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326) [jbossweb-7.0.10.Final.jar:]
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253) [jbossweb-7.0.10.Final.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.10.Final.jar:]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:154) [jboss-as-web-7.1.0.Final.jar:7.1.0.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.10.Final.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.10.Final.jar:]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.10.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.10.Final.jar:]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_01]
If I use the same java.util.Locale constructor in a simple class into the same WAR, no exception is thrown however.
This error is not thrown using the JDK 6, neither in JSP files nor in classes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 1 month
[JBoss JIRA] (AS7-4081) Connector "schema" required in model, but optional in subsystem schema
by Paul Ferraro (JIRA)
Paul Ferraro created AS7-4081:
---------------------------------
Summary: Connector "schema" required in model, but optional in subsystem schema
Key: AS7-4081
URL: https://issues.jboss.org/browse/AS7-4081
Project: Application Server 7
Issue Type: Bug
Components: Web
Affects Versions: 7.1.0.Final
Reporter: Paul Ferraro
Assignee: Remy Maucherat
In the web subsystem schema, the schema attribute of the connector element is optional. However, if left undefined, the subsystem fails to start:
e.g.
01:25:47,810 ERROR [org.jboss.as.controller.management-operation] Operation ("add") failed - address: ([
("subsystem" => "web"),
("connector" => "ajp")
]) - failure description: "JBAS014746: scheme may not be null"
This should either have a default value, or be required in the schema.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 1 month