Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8161841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:35:02+00:00 2026-06-06T18:35:02+00:00

Our project is in Jetty server and work completely then this project is deployed

  • 0

Our project is in Jetty server and work completely then this project is deployed in Jboss 7 server, but there are some errors.

I make war file and copy and past in E:\jboss-as-7.1.1.Final\standalone\deployments folder and auto-deploy become start and give this error :

java.lang.NoClassDefFoundError: javax/mail/internet/AddressException

but in \WEB-INF\lib I have mail.jar file ..

So how to remove this error?

Detail Error :

    15:34:02,245 ERROR [org.springframework.web.context.ContextLoader] (MSC service thread 1-4) Context initialization failed: org.springframework.beans.factor
y.BeanCreationException: Error creating bean with name 'log4jInitialization' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocati
on of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/mail/internet/AddressException
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420) [org.s
pringframework.beans-3.1.0.M1.jar:3.1.0.M1]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) [org.spri
ngframework.beans-3.1.0.M1.jar:3.1.0.M1]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) [org.spring
framework.beans-3.1.0.M1.jar:3.1.0.M1]
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) [org.springframework.beans-3.1.0.M1.jar:
3.1.0.M1]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [org.springframework.
beans-3.1.0.M1.jar:3.1.0.M1]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) [org.springframework.beans-3.1.0.M1.jar:3.
1.0.M1]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) [org.springframework.beans-3.1.0.M1.jar:3.1.
0.M1]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563) [org.springfr
amework.beans-3.1.0.M1.jar:3.1.0.M1]
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:900) [org.springf
ramework.context-3.1.0.M1.jar:3.1.0.M1]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:455) [org.springframework.context-3.1.0.M
1.jar:3.1.0.M1]
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:294) [org.springframework.web-3.1.0.M1.jar:3.1.0.M1
]
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:215) [org.springframework.web-3.1.0.M1.jar:3.1.0.M1]
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) [org.springframework.web-3.1.0.M1.jar:3.
1.0.M1]
        at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:]
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:]
        at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_01]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_01]
        at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_01]
Caused by: java.lang.NoClassDefFoundError: javax/mail/internet/AddressException
        at java.lang.Class.getDeclaredConstructors0(Native Method) [rt.jar:1.7.0_01]
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404) [rt.jar:1.7.0_01]
        at java.lang.Class.getConstructor0(Class.java:2714) [rt.jar:1.7.0_01]
        at java.lang.Class.newInstance0(Class.java:343) [rt.jar:1.7.0_01]
        at java.lang.Class.newInstance(Class.java:325) [rt.jar:1.7.0_01]
        at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:336) [log4j-1.2.16.jar:]
        at org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:123) [log4j-1.2.16.jar:]
        at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:752) [log4j-1.2.16.jar:]
        at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:735) [log4j-1.2.16.jar:]
        at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:615) [log4j-1.2.16.jar:]
        at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:502) [log4j-1.2.16.jar:]
        at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:547) [log4j-1.2.16.jar:]
        at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:415) [log4j-1.2.16.jar:]
        at org.springframework.util.Log4jConfigurer.initLogging(Log4jConfigurer.java:72) [org.springframework.core-3.1.0.M1.jar:3.1.0.M1]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_01]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_01]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_01]
        at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_01]
        at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:273) [org.springframework.core-3.1.0.M1.jar:3.1.0.M1]
        at org.springframework.beans.factory.config.MethodInvokingFactoryBean.doInvoke(MethodInvokingFactoryBean.java:162) [org.springframework.beans-3.1.0
.M1.jar:3.1.0.M1]
        at org.springframework.beans.factory.config.MethodInvokingFactoryBean.afterPropertiesSet(MethodInvokingFactoryBean.java:152) [org.springframework.b
eans-3.1.0.M1.jar:3.1.0.M1]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1479) [or
g.springframework.beans-3.1.0.M1.jar:3.1.0.M1]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417) [org.s
pringframework.beans-3.1.0.M1.jar:3.1.0.M1]
        ... 20 more
Caused by: java.lang.ClassNotFoundException: javax.mail.internet.AddressException from [Module "org.apache.log4j:main" from local module loader @1da817b (r
oots: E:\jboss-as-7.1.1.Final\modules)]
        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
        ... 43 more

So please help , how to remove this error ?

Thanks,

kamlesh

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T18:35:04+00:00Added an answer on June 6, 2026 at 6:35 pm

    JBoss AS 7 comes with isolated class-loading, so you should carefully configure your project dependencies. Details are here.

    In your case I see that Spring refers to Log4j, which is provided by JBossAS: Module "org.apache.log4j:main", and tries to configure it to do something unusual (possibly, tries to make logging go over e-mail). The problem is that mail-api is not accessible to log4j module, so it complains.

    Now you have at least 3 solutions:

    1. Make Spring just use log4j without trying to configure it. Instead configure log4j at app-server level. See this. Ask Spring experts how to do it 🙂

    2. Put log4j.jar in your /WEB-INF/lib and do not expose Module "org.apache.log4j" to your webapp.

    3. Expose mail-api to log4j module and delete /WEB-INF/lib/mail.jar from you app. You will have to edit jboss-as-7.1.1.Final/modules/org/apache/log4j/main/module.xml to include a dependency on mail-api:

      <dependencies>
          <module name="org.dom4j" optional="true"/>
          <module name="javax.api"/>
          <module name="javax.mail.api" export="true"/>
      </dependencies>
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For our project, maven is call by hudson(jenkins) and hudson is deployed by JBoss
Our project badly needs to move to Flexmojos4 to get a fix, but this
In our project we use Zend Framework Model generator, which produces something like this
In our project we need to import the csv file to postgres. There are
Our project uses an LDAP repository for storing users. In production this will be
Our project had a nice hack (although I'm guessing there are better ways to
In our project every day there will be lot of deliveries to integration stream.
Our project does some Java bytecode instrumentation. And we stumbled upon some strange behavior.
Our project is using Ext-js, and sometimes will send several request to Rails. This
Our project must be able to run both in Oracle and SQL Server. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.