Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

authentication error #52

Open
tloubrieu opened this issue Jun 16, 2015 · 2 comments
Open

authentication error #52

tloubrieu opened this issue Jun 16, 2015 · 2 comments

Comments

@tloubrieu
Copy link

I am trying to connect with admin rights so to harvest some other server.

I have created a record in postgresql in table useraccount:
1;"admin";"admin";TRUE;TRUE

When I am trying to login on : http://localhost:8080/oss/login

The following url has an error (seen on debug in chrome) : http://localhost:8080/oss/j_spring_security_check

The tomcat log file contains the following exceptions:
09:28:01.714 [http-nio-8080-exec-9] DEBUG DebugFilter - URL: http://localhost:8080/oss-service/api/v1/user/login
09:28:01.717 [http-nio-8080-exec-9] DEBUG UserAccessResource - Authentication requested for user admin
16-Jun-2015 09:28:01.719 SEVERE [http-nio-8080-exec-9] null.null A message body writer for Java class java.lang.NullPointerException, and Java type class java.lang.NullPointerException, and MIME media type application/octet-stream was not found
16-Jun-2015 09:28:01.720 SEVERE [http-nio-8080-exec-9] null.null The registered message body writers compatible with the MIME media type are:
application/octet-stream ->
com.sun.jersey.core.impl.provider.entity.ByteArrayProvider
com.sun.jersey.core.impl.provider.entity.FileProvider
com.sun.jersey.core.impl.provider.entity.InputStreamProvider
com.sun.jersey.core.impl.provider.entity.DataSourceProvider
com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider
/ ->
com.sun.jersey.core.impl.provider.entity.FormProvider
com.sun.jersey.atom.rome.impl.provider.entity.AtomFeedProvider
com.sun.jersey.server.impl.template.ViewableMessageBodyWriter
com.sun.jersey.json.impl.provider.entity.JSONJAXBElementProvider$General
com.sun.jersey.json.impl.provider.entity.JSONArrayProvider$General
com.sun.jersey.json.impl.provider.entity.JSONObjectProvider$General
com.sun.jersey.json.impl.provider.entity.JSONWithPaddingProvider
com.sun.jersey.core.impl.provider.entity.StringProvider
com.sun.jersey.core.impl.provider.entity.ByteArrayProvider
com.sun.jersey.core.impl.provider.entity.FileProvider
com.sun.jersey.core.impl.provider.entity.InputStreamProvider
com.sun.jersey.core.impl.provider.entity.DataSourceProvider
com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$General
com.sun.jersey.core.impl.provider.entity.ReaderProvider
com.sun.jersey.core.impl.provider.entity.DocumentProvider
com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider
com.sun.jersey.core.impl.provider.entity.SourceProvider$SourceWriter
com.sun.jersey.atom.rome.impl.provider.entity.AtomEntryProvider
com.sun.jersey.json.impl.provider.entity.JSONRootElementProvider$General
com.sun.jersey.json.impl.provider.entity.JSONListElementProvider$General
com.sun.jersey.json.impl.provider.entity.JacksonProviderProxy
com.sun.jersey.core.impl.provider.entity.XMLRootElementProvider$General
com.sun.jersey.core.impl.provider.entity.XMLListElementProvider$General

16-Jun-2015 09:28:01.721 SEVERE [http-nio-8080-exec-9] null.null Mapped exception to response: 500 (Internal Server Error)
javax.ws.rs.WebApplicationException: com.sun.jersey.api.MessageException: A message body writer for Java class java.lang.NullPointerException, and Java type class java.lang.NullPointerException, and MIME media type application/octet-stream was not found
at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:285)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1437)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:886)
at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:834)
at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:795)
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
at org.n52.oss.guice.CorsFilter.doFilter(CorsFilter.java:59)
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
at org.n52.oss.guice.DebugFilter.doFilter(DebugFilter.java:55)
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:617)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1521)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1478)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.sun.jersey.api.MessageException: A message body writer for Java class java.lang.NullPointerException, and Java type class java.lang.NullPointerException, and MIME media type application/octet-stream was not found
... 37 more

Do you know where the problem is ?

Thanks,

@nuest
Copy link

nuest commented Jun 18, 2015

Hi! No, no idea :-(. The login feature is in an alpha status and was developed by a student during Google Summer of Code. It is only relevant for the feature to harvest external data sources using scripting language and the "sensor provider" approach (https://wiki.52north.org/bin/view/Projects/GSoC2013OpenSensorSearch#Alternative_harvesting_Techinque), which were planned to be uploaded using a web form. This feature is also in alpha stage, sorry! I would have to check the code in detail, which I cannot do in the next days.

What kind of server do you want to harvest? An SOS, maybe? Because that should work using the Harvest operation of the SIR interface, even without logging in.

@tloubrieu
Copy link
Author

That's find with me. I just tried to log in because I expected this to be mandatory to harvest.
I am going to test the free SOS harvesting function.

I am not closing the issues as it is still there although not critical for me at the moment.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants