Timeout exception when trying to download any remote index in Archiva 2.2.0 - archiva

Archiva 2.2.0. is up and running on a VM (CentOS 6.6).
The VM can access the internet behind a proxy.
For example, GET repo1.maven.org works well:
...
<body>
<div id="top"></div>
<div id="container">
<p>Browsing for this directory has been disabled.</p>
<p>View this directory's contents on http://search.maven.org instead.</p>
<p>Find out more about The Central Repository.</p>
<div id="footer-spacer"></div>
</div>
<div id="footer">
About Central | Terms of Service
</div>
</body>
...
Two remote repositories are configured, both with the same proxy.
But unfortunately, I always get the same connection timeout exception. See below the exception for one of the configured remote repository (Central).
From archiva.log:
2015-06-01 10:24:55,286 [taskScheduler#indexDownloadRemote-1] INFO org.apache.archiva.scheduler.indexing.DownloadRemoteIndexTask$DownloadListener [] - error of transfer file nexus-maven-repository-index.properties: Connect to repo1.maven.org:80 timed out
org.apache.maven.wagon.TransferFailedException: Connect to repo1.maven.org:80 timed out
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:892) ~[wagon-http-2.5.jar:2.5]
at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116) [wagon-provider-api-2.5.jar:2.5]
at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88) [wagon-provider-api-2.5.jar:2.5]
at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61) [wagon-provider-api-2.5.jar:2.5]
at org.apache.archiva.scheduler.indexing.DownloadRemoteIndexTask$WagonResourceFetcher.retrieve(DownloadRemoteIndexTask.java:351) [archiva-scheduler-indexing-2.2.0.jar:?]
at org.apache.maven.index.updater.DefaultIndexUpdater.downloadIndexProperties(DefaultIndexUpdater.java:459) [indexer-core-5.1.1.jar:5.1.1]
at org.apache.maven.index.updater.DefaultIndexUpdater.access$000(DefaultIndexUpdater.java:76) [indexer-core-5.1.1.jar:5.1.1]
at org.apache.maven.index.updater.DefaultIndexUpdater$IndexAdaptor.setProperties(DefaultIndexUpdater.java:589) [indexer-core-5.1.1.jar:5.1.1]
at org.apache.maven.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:814) [indexer-core-5.1.1.jar:5.1.1]
at org.apache.maven.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:136) [indexer-core-5.1.1.jar:5.1.1]
at org.apache.archiva.scheduler.indexing.DownloadRemoteIndexTask.run(DownloadRemoteIndexTask.java:186) [archiva-scheduler-indexing-2.2.0.jar:?]
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) [spring-context-4.1.4.RELEASE.jar:4.1.4.RELEASE]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [?:1.7.0_65]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [?:1.7.0_65]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [?:1.7.0_65]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [?:1.7.0_65]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [?:1.7.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [?:1.7.0_65]
at java.lang.Thread.run(Thread.java:745) [?:1.7.0_65]
Caused by: org.apache.http.conn.ConnectTimeoutException: Connect to repo1.maven.org:80 timed out
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:119) ~[httpclient-4.3.6.jar:4.3.6]
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177) ~[httpclient-4.3.6.jar:4.3.6]
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:304) ~[httpclient-4.3.6.jar:4.3.6]
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611) ~[httpclient-4.3.6.jar:4.3.6]
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446) ~[httpclient-4.3.6.jar:4.3.6]
From request-*.log:
IP - - [01/juin/2015:08:47:55 +0000] "GET /restServices/archivaServices/remoteRepositoriesService/checkRemoteConnectivity/central?_=1433145022958 HTTP/1.1" 200 5 "http://$$$$$$$$$$/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36"
IP - - [01/juin/2015:08:46:54 +0000] "GET /restServices/archivaServices/remoteRepositoriesService/checkRemoteConnectivity/repo.jenkins-ci.org?_=1433145022952 HTTP/1.1" 200 5 "http://$$$$$$$$$$/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36"
Am I missing something?
Thanks!

You need to configure https://repo.maven.apache.org/maven2
and setup an https proxy.
Because even if you http://repo.maven.apache.org/maven2 there is a redirection https protocol.
That should work.
HTH
Olivier

Related

Captive portal flow Android 11

With the update to Android 11 this wonderful captive portal solution stopped working: https://github.com/ConnectBox/simple-offline-captive-portal
The problem is that on my Pixel3 with Android 11 the captive portal page will not close after clicking the OK button. It just remains open and the wifi is not accepted.
After looking into the requests I am really lost why that happens as I do not see any difference between Android 10 and Android 11:
Android 10
"POST /generate_204 HTTP/1.1" 200 7520 "http://connectivitycheck.gstatic.com/generate_204" "Mozilla/5.0 (Linux; Android 10; Pixel 3 Build/QP1A.190711.020.C3; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.90 Mobile Safari/537.36"
"GET /generate_204 HTTP/1.1" 204 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.32 Safari/537.36"
...(several GET requests) ...
"GET /generate_204 HTTP/1.1" 204 0 "-" "Dalvik/2.1.0 (Linux; U; Android 10; Pixel 3 Build/QP1A.190711.020.C3)"
....
Android 11
"POST /generate_204 HTTP/1.1" 200 7584 "http://connectivitycheck.gstatic.com/generate_204" "Mozilla/5.0 (Linux; Android 11; Pixel 3 Build/RP1A.201005.004; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.75 Mobile Safari/537.36"
"GET /generate_204 HTTP/1.1" 204 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.32 Safari/537.36"
"GET /gen_204 HTTP/1.1" 204 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.32 Safari/537.36"
Android 10 works like a charm - Android 11 stopped working after the OK button.
Any help - experience how to get captive portals with Android 11 working - ideas how to debug this are welcome.
I already tried logging HTTP and DNS traffic on the raspberry the captive portal is running on but nothing that seems to be leading to that error.
I think the Problem is the App Android System WebView.
For me it was needed to update after the Systemupdate, because there were many Apps which crashed, including the Captive Portal.

Go micro dashboard does not register my service when running inside docker-compose

I'm new to go-micro, tried to have micro server running as another service in my docker-compose setup however my first micro-service is not getting show in Micro Web (the Go Micro dashboard). If I run micro server outside docker-compose I can see several go-micro-related micro-services in the dashboard, but inside docker-compose none is displayed.
I have put together an example code that reproduces what I experience, I generated the service using micro new and changed nothing in it, the docker-compose.yml reflects how I have it setup in my project where I began experiencing this:
https://github.com/shackra/go-micro-docker-compose-bug
What am I doing wrong and how do I get the Micro dashboard to work as expected inside docker-compose?
EDIT
I have added a network in docker compose without any luck, also made my example service compilable inside docker.
EDIT 2
if I restart the service micro complains about it:
micro_1 | 2020-07-02 03:25:36 file=auth/wrapper.go:84 level=error service=web none available
micro_1 | 172.21.0.1 - - [02/Jul/2020:03:25:36 +0000] "GET /services HTTP/1.1" 500 15 "http://localhost:8082/" "Mozilla/5.0 (X11; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0"
micro_1 | 2020-07-02 03:25:39 file=auth/wrapper.go:84 level=error service=web none available
micro_1 | 172.21.0.1 - - [02/Jul/2020:03:25:39 +0000] "GET /client HTTP/1.1" 500 15 "http://localhost:8082/" "Mozilla/5.0 (X11; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0"
micro_1 | 2020-07-02 03:28:34 file=auth/wrapper.go:84 level=error service=web none available
micro_1 | 172.21.0.1 - - [02/Jul/2020:03:28:34 +0000] "GET /client HTTP/1.1" 500 15 "http://localhost:8082/" "Mozilla/5.0 (X11; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0"
micro_1 | 2020-07-02 03:28:38 file=auth/wrapper.go:84 level=error service=web none available
micro_1 | 172.21.0.1 - - [02/Jul/2020:03:28:37 +0000] "GET /services HTTP/1.1" 500 15 "http://localhost:8082/" "Mozilla/5.0 (X11; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0"
example_1 | 2020-07-02 03:30:55 file=grpc/grpc.go:791 level=info Deregistering node: go.micro.service.example-58b408cc-eec2-41a3-8d7f-5ac1751ad795
example_1 | 2020-07-02 03:30:55 file=grpc/grpc.go:814 level=info Unsubscribing from topic: go.micro.service.example
example_1 | 2020-07-02 03:30:55 file=grpc/grpc.go:959 level=info Broker [http] Disconnected from 127.0.0.1:45863
micro_1 | 2020-07-02 03:30:55 file=registry/registry.go:102 level=error service=api unable to get go.micro.service.example service: service not found
go-micro-docker-compose-bug_example_1 exited with code 0
micro_1 | 2020-07-02 03:30:58 file=handler/handler.go:227 level=error service=debug Error calling go.micro.service.example#172.21.0.2:38625 ({"id":"go.micro.client","code":500,"detail":"connection error: desc = \"transport: Error while dialing dial tcp 172.21.0.2:38625: connect: connection refused\"","status":"Internal Server Error"})
micro_1 | 2020-07-02 03:31:08 file=handler/handler.go:227 level=error service=debug Error calling go.micro.service.example#172.21.0.2:38625 ({"id":"go.micro.client","code":500,"detail":"connection error: desc = \"transport: Error while dialing dial tcp 172.21.0.2:38625: connect: connection refused\"","status":"Internal Server Error"})
micro_1 | 2020-07-02 03:31:18 file=handler/handler.go:227 level=error service=debug Error calling go.micro.service.example#172.21.0.2:38625 ({"id":"go.micro.client","code":500,"detail":"connection error: desc = \"transport: Error while dialing dial tcp 172.21.0.2:38625: connect: connection refused\"","status":"Internal Server Error"})
I don't really get it, why would it report no services nor clients were found but still being able to connect with my service?
it seems that despite micro's dashboard showing nothing, if I issue micro list services my example service is listed
I then removed the network from the docker-compose.yml, stopped docker-compose and put it up again, issued micro list services again and my example service was included in the listing. So, this seems to be a bug with the dashboard itself.

Open Websocket connection using http4s

I'm running http4s WS example from:
https://github.com/http4s/http4s/blob/master/examples/blaze/src/main/scala/com/example/http4s/blaze/BlazeWebSocketExample.scala
And I'm trying to connect to it from google chrome console:
var ws = new WebSocket("ws://localhost:8080/http4s/wsecho")
ws.send("Hi")
But actually I see no messages. In console log I see
Uncaught DOMException: Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.
at <anonymous>:1:4
(anonymous) # VM204:1
VM186:1 WebSocket connection to 'ws://localhost:8080/http4s/wsecho' failed: Connection closed before receiving a handshake response
And server logs contain no errors:
23:12:43 [blaze-nio1-acceptor] INFO o.h.blaze.channel.ServerChannelGroup - Connection to /127.0.0.1:59777 accepted at Tue Mar 20 23:12:43 GST 2018.
23:12:43 [blaze-nio-fixed-selector-pool-3] DEBUG org.http4s.blaze.pipeline.Stage - SocketChannelHead starting up at Tue Mar 20 23:12:43 GST 2018
23:12:43 [blaze-nio-fixed-selector-pool-3] DEBUG org.http4s.blaze.pipeline.Stage - Stage SocketChannelHead sending inbound command: Connected
23:12:43 [blaze-nio-fixed-selector-pool-3] DEBUG org.http4s.blaze.pipeline.Stage - QuietTimeoutStage starting up at Tue Mar 20 23:12:43 GST 2018
23:12:43 [blaze-nio-fixed-selector-pool-3] DEBUG org.http4s.blaze.pipeline.Stage - Stage QuietTimeoutStage sending inbound command: Connected
23:12:43 [blaze-nio-fixed-selector-pool-3] DEBUG org.http4s.blaze.pipeline.Stage - Starting HTTP pipeline
23:12:43 [blaze-nio-fixed-selector-pool-3] DEBUG o.h.blaze.channel.nio1.SelectorLoop - Started channel.
23:12:43 [scala-execution-context-global-19] DEBUG org.http4s.blaze.pipeline.Stage - Websocket key: Some(WebSocketContext(Websocket(Stream(..),fs2.async.mutable.Queue$$Lambda$378/1284896246#5b314a6c),Headers(),IO$1816945727))
Request headers: Headers(Host: localhost:8080, Connection: Upgrade, Pragma: no-cache, Cache-Control: no-cache, Upgrade: websocket, Origin: https://www.google.ae, Sec-WebSocket-Version: 13, User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.162 Safari/537.36, Accept-Encoding: gzip, deflate, br, Accept-Language: en-US,en;q=0.9, Cookie: _ga=GA1.1.1008064719.1515165520, Sec-WebSocket-Key: ozUxsxBzUk0MaQwHbk45ow==, Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits)
What do I miss?
You simply aren't waiting until the websocket connection is actually open. Try this instead:
var ws = new WebSocket("ws://localhost:8080/http4s/wsecho")
ws.onopen = function(e) { ws.send("Hi") }
If you want, you can change the WebSocketBuilder definition to this so that you have some more visibility of what's being sent:
WebSocketBuilder[F].build(d.observe1(wsf => F.delay{print(wsf)}), e)

SRVE0777E: Exception thrown by application class 'org.apache.jasper..runtime.pageContextImpl.handlePageException:701'

After successfully uploading project on bluemix I got this error
SRVE0777E: Exception thrown by application class
'org.apache.jasper..runtime.pageContextImpl.handlePageException:701'
on eclipse and on URL page I got Exception thrown by application
class
'org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection:284'
javax.servlet.jsp.JspException: Unable to get connection, DataSource
invalid: "java.sql.SQLException: No suitable driver found for
jdbc:db2://75.126.155.153:50000/SQLDB" at
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(Query
I have updated my version of jar file to db2jcc4.jar from db2jcc.jar but still facing the below issue .Please find full stack trace below:
{
Checking application - bluemixproject
Generating application archive - bluemixproject
Pushing application - bluemixproject
Application successfully pushed
Starting application - bluemixproject
Updated app with guid a6dc6027-eb2e-499a-83b9-641e15e9dd78 ({"state"=>"STOPPED"})
Stopped app instance (index 0) with guid a6dc6027-eb2e-499a-83b9-641e15e9dd78
Stopping app instance (index 0) with guid a6dc6027-eb2e-499a-83b9-641e15e9dd78
Got staging request for app with id a6dc6027-eb2e-499a-83b9-641e15e9dd78
Updated app with guid a6dc6027-eb2e-499a-83b9-641e15e9dd78 ({"state"=>"STARTED"})
-----> Downloaded app package (5.3M)
-----> Downloaded app buildpack cache (4.0K)
-----> Liberty Buildpack Version: v1.20.1-20150729-1255
-----> Retrieving IBM 1.7.1_sr3fp10-20150708 JRE (ibm-java-jre-7.1-3.10-pxa6470_27sr3fp10-20150708_01-cloud.tgz) ... (0.0s)
Expanding JRE to .java ... (0.9s)
-----> Retrieving App Management 1.7.0_20150729-1104 (app-mgmt_v1.7-20150729-1104.zip) ... (0.0s)
Expanding App Management to .app-management (1.0s)
-----> Retrieving com.ibm.ws.liberty-2015.6.0.0-201507291255.tar.gz ... (0.0s)
Installing archive ... (0.9s)
-----> Retrieving com.ibm.ws.liberty.ext-2015.6.0.0-201507291255.tar.gz ... (0.0s)
Installing archive ... (0.7s)
-----> Retrieving and installing client jar(s) from com.ibm.ws.icap.clientJars.db2.zip (0.0s)
-----> Warning: Liberty feature set is not specified. Using the default feature set: ["jsf-2.0", "jsp-2.2", "servlet-3.0", "ejbLite-3.1", "cdi-1.0", "jpa-2.0", "jdbc-4.0", "jndi-1.0", "managedBeans-1.0", "jaxrs-1.1"]. For the best results, explicitly set the features via the JBP_CONFIG_LIBERTY environment variable or deploy the application as a server directory or packaged server with a custom server.xml file.
-----> Auto-configuration is creating config for service instance 'SQL Database-fl' of type 'SQLDB'
-----> Liberty buildpack is done creating the droplet
-----> Uploading droplet (194M)
Starting app instance (index 0) with guid a6dc6027-eb2e-499a-83b9-641e15e9dd78
Launching defaultServer (WebSphere Application Server 2015.6.0.0/wlp-1.0.9.cl50620150610-1749) on IBM J9 VM, version pxa6470_27sr3fp10-20150708_01 (SR3 FP10) (en_US)
[AUDIT ] CWWKE0001I: The server defaultServer has been launched.
[AUDIT ] CWWKG0028A: Processing included configuration resource: /home/vcap/app/wlp/usr/servers/defaultServer/runtime-vars.xml
[INFO ] CWWKE0002I: The kernel started after 4.594 seconds
[INFO ] CWWKF0007I: Feature update started.
[INFO ] CWWKO0219I: TCP Channel defaultHttpEndpoint has been started and is now listening for requests on host * (IPv6) port 61432.
[INFO ] CWSCX0122I: Register management Bean provider: com.ibm.ws.cloudoe.management.client.provider.dump.JavaDumpBeanProvider#fc8940ad.
[INFO ] CWSCX0122I: Register management Bean provider: com.ibm.ws.cloudoe.management.client.provider.logging.LibertyLoggingBeanProvider#b72bc7f3.
[INFO ] SRVE0169I: Loading Web Module: com.ibm.ws.cloudoe.management.client.liberty.connector.
[INFO ] SRVE0250I: Web Module com.ibm.ws.cloudoe.management.client.liberty.connector has been bound to default_host.
[AUDIT ] CWWKT0016I: Web application available (default_host): http://18sfpg6jl5m:61432/IBMMGMTRest/
[INFO ] CWWKZ0018I: Starting application myapp.
[INFO ] SRVE0250I: Web Module bluemixproject has been bound to default_host.
[INFO ] SRVE0169I: Loading Web Module: bluemixproject.
[AUDIT ] CWWKT0016I: Web application available (default_host): http://18sfpg6jl5m:61432/
[AUDIT ] CWWKZ0001I: Application myapp started in 0.802 seconds.
[AUDIT ] CWWKF0012I: The server installed the following features: [json-1.0, jpa-2.0, icap:managementConnector-1.0, beanValidation-1.0, jdbc-4.0, managedBeans-1.0, cloudAutowiring-1.0, jsf-2.0, jsp-2.2, servlet-3.0, jaxrs-1.1, jndi-1.0, appState-1.0, ejbLite-3.1, cdi-1.0].
[INFO ] CWWKF0008I: Feature update completed in 5.356 seconds.
[AUDIT ] CWWKF0011I: The server defaultServer is ready to run a smarter planet.
[INFO ] SESN8501I: The session manager did not find a persistent storage location; HttpSession objects will be stored in the local application server's memory.
[INFO ] SESN0176I: A new session context will be created for application key default_host/
[INFO ] JSPG8502I: The value of the JSP attribute jdkSourceLevel is "15".
[INFO ] SRVE0242I: [myapp] [/] [/loginpage.jsp]: Initialization successful.
fscproj.mybluemix.net - [05/08/2015:08:28:48 +0000] "GET / HTTP/1.1" 200 0 3835 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0" 75.126.70.46:12949 x_forwarded_for:"122.248.183.22" vcap_request_id:91bbda0f-c95d-4e3a-43cd-a26eb6745303 response_time:1.722074055 app_id:a6dc6027-eb2e-499a-83b9-641e15e9dd78
fscproj.mybluemix.net - [05/08/2015:08:28:50 +0000] "GET /styles/layout.css HTTP/1.1" 200 0 8777 "http://fscproj.mybluemix.net/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0" 75.126.70.46:35466 x_forwarded_for:"122.248.183.22" vcap_request_id:dcad0bc3-790f-44f1-5bb9-0febaed00734 response_time:0.013548015 app_id:a6dc6027-eb2e-499a-83b9-641e15e9dd78
fscproj.mybluemix.net - [05/08/2015:08:28:51 +0000] "GET /images/ibm.jpg HTTP/1.1" 200 0 92824 "http://fscproj.mybluemix.net/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0" 75.126.70.43:17662 x_forwarded_for:"122.248.183.22" vcap_request_id:fb136519-b55f-4bff-7c42-95bccaf618c8 response_time:0.013932824 app_id:a6dc6027-eb2e-499a-83b9-641e15e9dd78
fscproj.mybluemix.net - [05/08/2015:08:28:51 +0000] "GET /images/logo.jpg HTTP/1.1" 200 0 7347 "http://fscproj.mybluemix.net/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0" 75.126.70.46:15591 x_forwarded_for:"122.248.183.22" vcap_request_id:f494b027-53da-4c2b-6011-f751e1d58d0a response_time:0.014634660 app_id:a6dc6027-eb2e-499a-83b9-641e15e9dd78
fscproj.mybluemix.net - [05/08/2015:08:28:51 +0000] "GET /styles/navi.css HTTP/1.1" 200 0 3229 "http://fscproj.mybluemix.net/styles/layout.css" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0" 75.126.70.46:26003 x_forwarded_for:"122.248.183.22" vcap_request_id:fd46d2d1-db2b-4828-74f4-842b2c3ad729 response_time:0.006212971 app_id:a6dc6027-eb2e-499a-83b9-641e15e9dd78
fscproj.mybluemix.net - [05/08/2015:08:28:51 +0000] "GET /styles/forms.css HTTP/1.1" 200 0 1986 "http://fscproj.mybluemix.net/styles/layout.css" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0" 75.126.70.42:50968 x_forwarded_for:"122.248.183.22" vcap_request_id:98690564-68c0-4a80-5fad-21d929b3486b response_time:0.005961185 app_id:a6dc6027-eb2e-499a-83b9-641e15e9dd78
fscproj.mybluemix.net - [05/08/2015:08:28:51 +0000] "GET /styles/tables.css HTTP/1.1" 200 0 924 "http://fscproj.mybluemix.net/styles/layout.css" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0" 75.126.70.42:60561 x_forwarded_for:"122.248.183.22" vcap_request_id:cf75f2ff-2fd8-42fa-620f-5977ea24bc79 response_time:0.010175099 app_id:a6dc6027-eb2e-499a-83b9-641e15e9dd78
fscproj.mybluemix.net - [05/08/2015:08:28:51 +0000] "GET /styles/featured_slide.css HTTP/1.1" 200 0 2400 "http://fscproj.mybluemix.net/styles/layout.css" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0" 75.126.70.43:24397 x_forwarded_for:"122.248.183.22" vcap_request_id:cd0aa784-5e4d-41f2-73bd-ae68f7f30e8c response_time:0.018511510 app_id:a6dc6027-eb2e-499a-83b9-641e15e9dd78
[INFO ] SRVE0242I: [myapp] [/] [loginclass]: Initialization successful.
Searching through VCAP keys
Key is: sqldb
Service found: SQL Database-fl
Connecting to the database
Finished
fscproj.mybluemix.net - [05/08/2015:08:29:00 +0000] "GET /loginclass?empid=23232I&password=ggggg&SUBMIT=login HTTP/1.1" 302 0 0 "http://fscproj.mybluemix.net/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0" 75.126.70.43:13856 x_forwarded_for:"122.248.183.22" vcap_request_id:66350d6c-fc15-4521-69dd-b343cc98ef03 response_time:0.744243093 app_id:a6dc6027-eb2e-499a-83b9-641e15e9dd78
[INFO ] SRVE0242I: [myapp] [/] [/empdetails.jsp]: Initialization successful.
at [internal classes]
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:101)
com.ibm.websphere.servlet.error.ServletErrorReport: javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver found for jdbc:db2://75.126.155.153:50000/SQLDB"
at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.java:284)
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:701)
... 2 more
at com.ibm._jsp._empdetails._jspService(_empdetails.java:204)
Caused by: javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver found for jdbc:db2://75.126.155.153:50000/SQLDB"
at [internal classes]
at com.ibm._jsp._empdetails._jspx_meth_s_query_0(_empdetails.java:259)
at com.ibm._jsp._empdetails._jspService(_empdetails.java:154)
[ERROR ] SRVE0777E: Exception thrown by application class 'org.apache.jasper.runtime.PageContextImpl.handlePageException:701'
at [internal classes]
fscproj.mybluemix.net - [05/08/2015:08:29:01 +0000] "GET /empdetails.jsp HTTP/1.1" 500 0 2052 "http://fscproj.mybluemix.net/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0" 75.126.70.43:26112 x_forwarded_for:"122.248.183.22" vcap_request_id:9e5e91ab-43df-4da9-4f47-f57d195ec76b response_time:0.899565979 app_id:a6dc6027-eb2e-499a-83b9-641e15e9dd78}

Errors when starting a GWT/Hibernate program

I am trying to make a simple web application that adds a user to a database. I am using GWT-RPC with Hibernate, MySQL, and Eclipse IDE, all on Windows 7. I learnt through a tutorial how to save/add/delete values in a database using Hibernate, as well as how to do GWT-RPC from a GWT tutorial. Now, I'm trying to merge the two in a very simple program.
When starting the application through Eclipse, I get the following errors:
[WARN] Server class 'org.hibernate.Session' could not be found in the web app, but was found on the system classpath
[WARN] Adding classpath entry 'file:/D:/enterprize/MyFirstHibernateApp/lib/hibernate3.jar' to the web app classpath for this session
For additional info see: file:/D:/Programs/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.r37v201108301710/gwt-2.4.0/doc/helpInfo/webAppClassPath.html
[WARN] Server class 'org.dom4j.DocumentException' could not be found in the web app, but was found on the system classpath
[WARN] Adding classpath entry 'file:/D:/enterprize/MyFirstHibernateApp/lib/dom4j-1.6.1.jar' to the web app classpath for this session
For additional info see: file:/D:/Programs/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.r37v201108301710/gwt-2.4.0/doc/helpInfo/webAppClassPath.html
Initial SessionFactory creation failed.java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
Starting Jetty on port 8888
[WARN] Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.String rpctest.client.RpctestService.addUser(java.lang.String,java.lang.String) throws java.lang.IllegalArgumentException' threw an unexpected exception: java.lang.ExceptionInInitializerError
at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:385)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:588)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
Caused by: java.lang.ExceptionInInitializerError
at hibDomain.HibernateUtil.buildSessionFactory(HibernateUtil.java:16)
at hibDomain.HibernateUtil.<clinit>(HibernateUtil.java:7)
at rpctest.server.RpctestServiceImpl.addUser(RpctestServiceImpl.java:19)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
... 22 more
Caused by: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:151)
at hibDomain.HibernateUtil.buildSessionFactory(HibernateUtil.java:11)
... 29 more
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload$WebAppClassLoaderExtension.findClass(JettyLauncher.java:372)
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:366)
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337)
... 31 more
[ERROR] 500 - POST /rpctest/testService (127.0.0.1) 57 bytes
Request headers
Accept: */*
X-GWT-Permutation: HostedMode
X-GWT-Module-Base: http://127.0.0.1:8888/rpctest/
Content-Type: text/x-gwt-rpc; charset=utf-8
Referer: http://127.0.0.1:8888/Rpctest.html?gwt.codesvr=127.0.0.1:9997
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)
Host: 127.0.0.1:8888
Content-Length: 168
Connection: Keep-Alive
Cache-Control: no-cache
Response headers
Content-Type: text/plain
From the last part of the stack trace, it appears that SLF4J library is somehow not visible. However, I clearly have the library in my path:
\lib\antlr-2.7.6.jar
\lib\commons-collections-3.1.jar
\lib\dom4j-1.6.1.jar
\lib\hibernate3.jar
\lib\hibernate-cglib-repack-2.1_3.jar
\lib\hibernate-entitymanager-4.0.0.CR5.jar
\lib\javassist-3.4.GA.jar
\lib\jta-1.1.jar
\lib\mysql-connector-java-5.1.18-bin.jar
\lib\slf4j-api-1.6.4.jar
\lib\slf4j-simple-1.6.4.jar
Make sure to put all the libraries in war/WEB-INF/lib. If you have them elsewhere, remove them from the classpath first, move them, then re-add them to the classpath.