7
respostas

Problemas de autenticação no proxy

tentei executar o ant jetty.run, mas dá problemas de autenticação no proxy:

[ivy:retrieve]
[ivy:retrieve] :: problems summary ::
[ivy:retrieve] :::: WARNINGS
[ivy:retrieve]  Your proxy requires authentication.
[ivy:retrieve]  Your proxy requires authentication.
[ivy:retrieve]          module not found: br.com.caelum#vraptor;3.4.0
[ivy:retrieve]  ==== local: tried
[ivy:retrieve]    C:\Users\silvia.taveiros\.ivy2/local/br.com.caelum/vraptor/3.4.0/ivys/ivy.xml
[ivy:retrieve]    -- artifact br.com.caelum#vraptor;3.4.0!vraptor.jar:
[ivy:retrieve]    C:\Users\silvia.taveiros\.ivy2/local/br.com.caelum/vraptor/3.4.0/jars/vraptor.jar
[ivy:retrieve]  ==== shared: tried
[ivy:retrieve]    C:\Users\silvia.taveiros\.ivy2/shared/br.com.caelum/vraptor/3.4.0/ivys/ivy.xml
[ivy:retrieve]    -- artifact br.com.caelum#vraptor;3.4.0!vraptor.jar:
[ivy:retrieve]    C:\Users\silvia.taveiros\.ivy2/shared/br.com.caelum/vraptor/3.4.0/jars/vraptor.jar
7 respostas

Oi Silvia

Você está utilizando algum proxy?

O da empresa tá barrando baixar e executar a aplicação

Oi Silvia tudo bem?

Nesse caso você precisa falar com o gestor da rede da sua empresa para ele poder liberar o acesso da sua aplicação.

Ok. André, Bom dia!

Consegui resolver este problema, através das dicas do site abaixo:

https://gist.github.com/armoucar/1309272

Com essa configuração, consegui passar as informações do proxy da empresa e efetuar o login nele. E com isso, consegui baixar as dependências, porém, está ocorrendo o erro abaixo ao executar no prompt de comando o comando: ant jetty.run.

jetty.run:
    [jetty] Configuring Jetty for project: vraptor-scaffold
    [jetty] 2019-04-29 08:42:49.658::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog
    [jetty]
    [jetty] Configuring Jetty for web application: leiloes
    [jetty] Webapp source directory = C:\Users\silvia.taveiros\Desktop\alura\leiloes\leiloes\src\main\webapp
    [jetty] Context path = /
    [jetty] Classpath = []
    [jetty] Default scanned paths = []
    [jetty] Extra scan targets = [C:\Users\silvia.taveiros\Desktop\alura\leiloes\leiloes\src\main\webapp\WEB-INF\classes]
    [jetty] Temp directory = C:\Users\silvia.taveiros\Desktop\alura\leiloes\leiloes\target\jetty-temp\
    [jetty] web.xml file = C:\Users\silvia.taveiros\Desktop\alura\leiloes\leiloes\src\main\webapp\WEB-INF\web.xml
    [jetty] 2019-04-29 08:42:49.705::INFO:  jetty-6.1.14
    [jetty] 2019-04-29 08:42:49.814::INFO:  org.mortbay.jetty.ant.JettyWebAppConfiguration does not support annotations on source. Use org.mortbay.jetty.annotations.Configuration instead
    [jetty] 2019-04-29 08:42:49.814::INFO:  No Transaction manager found - if your webapp requires one, please configure one.
    [jetty] 19-04-29 08:42:49,955 [INFO] br.com.caelum.vraptor.config.BasicConfiguration - Using class br.com.caelum.vraptor.ioc.spring.SpringProvider as Container Provider
    [jetty] 19-04-29 08:42:49,955 [INFO] br.com.caelum.vraptor.ioc.spring.DefaultSpringLocator - No application context found
    [jetty] 19-04-29 08:42:49,986 [INFO] br.com.caelum.vraptor.scan.WebAppBootstrapFactory - No static WebAppBootstrap found.
    [jetty] 19-04-29 08:42:49,986 [INFO] br.com.caelum.vraptor.config.BasicConfiguration - br.com.caelum.vraptor.scanning = null
    [jetty] 2019-04-29 08:42:50.033::WARN:  failed vraptor
    [jetty] br.com.caelum.vraptor.scan.ScannerException: Could not scan WEB-INF/classes
    [jetty]     at br.com.caelum.vraptor.scan.ScannotationComponentScanner.scanWebInfClasses(ScannotationComponentScanner.java:74)
    [jetty]     at br.com.caelum.vraptor.scan.ScannotationComponentScanner.scan(ScannotationComponentScanner.java:57)
    [jetty]     at br.com.caelum.vraptor.scan.WebAppBootstrapFactory.create(WebAppBootstrapFactory.java:65)
    [jetty]     at br.com.caelum.vraptor.ioc.spring.SpringProvider.start(SpringProvider.java:83)
    [jetty]     at br.com.caelum.vraptor.VRaptor.init(VRaptor.java:110)
    [jetty]     at br.com.caelum.vraptor.VRaptor.init(VRaptor.java:103)
    [jetty]     at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
    [jetty]     at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    [jetty]     at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:620)
    [jetty]     at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
    [jetty]     at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1234)
    [jetty]     at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
    [jetty]     at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:460)
    [jetty]     at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    [jetty]     at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
    [jetty]     at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
    [jetty]     at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    [jetty]     at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
    [jetty]     at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    [jetty]     at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    [jetty]     at org.mortbay.jetty.Server.doStart(Server.java:222)
    [jetty]     at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    [jetty]     at org.mortbay.jetty.ant.ServerProxyImpl.start(ServerProxyImpl.java:209)
    [jetty]     at org.mortbay.jetty.ant.JettyRunTask.execute(JettyRunTask.java:204)
    [jetty]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)

E ao tentar acessar a página do sistema web leilão conforme orientado no curso ao acessar via browser http://localhost:8080), ocorre o erro abaixo no browser:

HTTP ERROR: 503
SERVICE_UNAVAILABLE
RequestURI=/

Powered by jetty://

Obs: Baixei o projeto no curso: http://s3.amazonaws.com/caelum-online-public/PM-74/leiloes.zip

Seguem as minhas configurações:

JAVA: java version "11.0.2" 2019-01-15 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed mode

ANT: Apache Ant(TM) version 1.10.2 compiled on February 3 2018

Browser: Firefox 66.0.3 Chrome Versão 73.0.3683.103

VARIÁVEIS DE AMBIENTE: JAVA_HOME: C:\Program Files\Java\jdk-11.0.2\bin

ANT_HOME: C:\apache-ant-1.10.2\

Path: Contém o %JAVA_HOME% e o caminho do ant (C:\apache-ant-1.10.5\bin)

ANT_ARGS: -autoproxy (Obs: Está na variáveis de ambiente da parte do usuário)

Sobre o erro "ScannerException: Could not scan WEB-INF/classes":

Coloque essa configuração no seu pom.xml:

<project>
    ...
    <build>
        <outputDirectory>${basedir}/src/main/webapp/WEB-INF/classes</outputDirectory>
    </build>
</project>

Não possuo este arquivo