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

  • SEARCH
  • Home
  • 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 886301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:02:41+00:00 2026-05-15T13:02:41+00:00

While building my web project from Eclipse , everything is fine: no errors, no

  • 0

While building my web project from Eclipse, everything is fine: no errors, no warnings.

However while building project with Maven it failes. Below is the output form mvn compile:

c:\Users\jwa\Desktop\tets\traffic_web>mvn
compile -e
+ Error stacktraces are turned on. [INFO] Scanning for projects… [INFO]
———————————————————————— [INFO] Building traffic_web [INFO]
task-segment: [compile] [INFO]
———————————————————————— [INFO] [resources:resources
{execution: default-resources}]
[WARNING] Using platform encoding
(Cp1250 actually) to copy filtered
resources, i.e. build is platform
dependent! [INFO] skip non existing
resourceDirectory
c:\Users\jwa\Desktop\tets\traffic_web\src\main\resources
[INFO] [compiler:compile {execution:
default-compile}] [INFO] Compiling 22
source files to
c:\Users\jwa\Desktop\tets\traffic_web\target\classes
[INFO]
———————————————————————— [ERROR] BUILD FAILURE [INFO]
———————————————————————— [INFO] Compilation failure

c:\Users\jwa\Desktop\tets\traffic_web\src\traffic_web\tools\Encryptor.java:[7,15]
sun.misc.BASE64Encoder is Sun propriet
ary API and may be removed in a future
release

c:\Users\jwa\Desktop\tets\traffic_web\src\traffic_web\tools\Session.java:[3,25]
package javax.servlet.http does not
exis t

c:\Users\jwa\Desktop\tets\traffic_web\src\traffic_web\tools\Session.java:[15,21]
cannot find symbol symbol : class
HttpSession location: class
traffic_web.tools.Session

c:\Users\jwa\Desktop\tets\traffic_web\src\traffic_web\tools\ServletContextListenerInitializer.java:[6,20]
package javax. servlet does not exist

c:\Users\jwa\Desktop\tets\traffic_web\src\traffic_web\tools\ServletContextListenerInitializer.java:[7,20]
package javax. servlet does not exist

c:\Users\jwa\Desktop\tets\traffic_web\src\traffic_web\tools\ServletContextListenerInitializer.java:[8,20]
package javax. servlet does not exist

c:\Users\jwa\Desktop\tets\traffic_web\src\traffic_web\tools\ServletContextListenerInitializer.java:[10,58]
cannot find s ymbol symbol: class
ServletContextListener public class
ServletContextListenerInitializer
implements ServletContextListener {

c:\Users\jwa\Desktop\tets\traffic_web\src\traffic_web\tools\ServletContextListenerInitializer.java:[12,33]
cannot find s ymbol symbol : class
ServletContextEvent location: class
traffic_web.tools.ServletContextListenerInitializer

c:\Users\jwa\Desktop\tets\traffic_web\src\traffic_web\tools\ServletContextListenerInitializer.java:[15,35]
cannot find s ymbol symbol : class
ServletContextEvent location: class
traffic_web.tools.ServletContextListenerInitializer

c:\Users\jwa\Desktop\tets\traffic_web\src\traffic_web\controller\BoardController.java:[9,25]
package javax.servlet.http does not
exist

c:\Users\jwa\Desktop\tets\traffic_web\src\traffic_web\controller\BoardController.java:[87,29]
cannot find symbol symbol : class
HttpServletResponse location: class
traffic_web.controller.BoardController

c:\Users\jwa\Desktop\tets\traffic_web\src\traffic_web\controller\BoardController.java:[116,37]
cannot find symbol symbol : class
HttpServletResponse location: class
traffic_web.controller.BoardController

c:\Users\jwa\Desktop\tets\traffic_web\src\traffic_web\tools\Encryptor.java:[27,15]
sun.misc.BASE64Encoder is Sun proprie
tary API and may be removed in a
future release

c:\Users\jwa\Desktop\tets\traffic_web\src\traffic_web\tools\Session.java:[17,27]
cannot access
javax.servlet.http.HttpSe rvletRequest
class file for
javax.servlet.http.HttpServletRequest
not found
return attr.getRequest().getSession(true); //
true == allow create

c:\Users\jwa\Desktop\tets\traffic_web\src\traffic_web\tools\ServletContextListenerInitializer.java:[17,8]
cannot find sy mbol symbol : class
ServletContext location: class
traffic_web.tools.ServletContextListenerInitializer

[INFO]
———————————————————————— [INFO] Trace
org.apache.maven.BuildFailureException:
Compilation failure
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:715)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:55
6)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.jav
a:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by:
org.apache.maven.plugin.CompilationFailureException:
Compilation failure
at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:516)
at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
… 17 more [INFO] ———————————————————————— [INFO] Total time: 1 second [INFO]
Finished at: Mon Jun 28 21:56:25 CEST
2010 [INFO] Final Memory: 13M/254M

[INFO]

My POM file looks like that:

<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>masters.traffic</groupId>
  <artifactId>traffic_web</artifactId>
  <packaging>war</packaging>
  <name>traffic_web</name>
  <version>0.1.0</version>
  <build>
        <sourceDirectory>src</sourceDirectory>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>                    
                </configuration>
            </plugin>
        </plugins>
  </build>

    ...

</project>

Can Someone help me how to fix that ?

Regards

  • 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-05-15T13:02:41+00:00Added an answer on May 15, 2026 at 1:02 pm

    You haven’t added the servlet classes as dependencies. There are apparently present per default in Eclipse, which is why it works to compile from there. Add the following to you pom (before <build>..., taken from here):

    <dependencies>
      [...]
      <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>2.4</version>
        <scope>provided</scope>
      </dependency>
    </dependencies>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 471k
  • Answers 471k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The best solution, use boost::function with boost::bind, or if your… May 16, 2026 at 3:25 am
  • Editorial Team
    Editorial Team added an answer Go with Wordpress. It's easily customisable, and there's masses and… May 16, 2026 at 3:25 am
  • Editorial Team
    Editorial Team added an answer you could do something like this, though there may be… May 16, 2026 at 3:25 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.