'Could not instantiate listener' error on Android Studio

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

'Could not instantiate listener' error on Android Studio

Nicoleta Sarbu
Hi,

I moved a project from Eclipse to Android Studio that inlcudes jetty-8.1.15.jar for Android and I have this error on the server side (service unavailable):

W/System.err: 2018-02-02 15:45:40.238:WARN:oejw.StandardDescriptorProcessor:Could not instantiate listener org.eclipse.jetty.servlet.listener.ELContextCleaner
W/System.err: java.lang.NullPointerException: throw with null exception
W/System.err:     at java.net.URLClassLoader.findClass(URLClassLoader.java:371)
W/System.err:     at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:421)
W/System.err:     at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:383)
W/System.err:     at org.eclipse.jetty.server.handler.ContextHandler.loadClass(ContextHandler.java:1528)
W/System.err:     at org.eclipse.jetty.webapp.StandardDescriptorProcessor.visitListener(StandardDescriptorProcessor.java:1893)
W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
W/System.err:     at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.visit(IterativeDescriptorProcessor.java:85)
W/System.err:     at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.process(IterativeDescriptorProcessor.java:72)
W/System.err:     at org.eclipse.jetty.webapp.MetaData.resolve(MetaData.java:366)
W/System.err:     at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1240)
W/System.err:     at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
W/System.err:     at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
W/System.err:     at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
W/System.err:     at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
W/System.err:     at org.eclipse.jetty.server.Server.doStart(Server.java:282)
W/System.err:     at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)

The library is added as a dependency. Is there any other setup that needs to be done?

Thank you


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: 'Could not instantiate listener' error on Android Studio

Joakim Erdfelt-8
Jetty 8 is EOL (End of Life)

Without knowing how the Android Studio instance of Jetty was started, it would be hard to troubleshoot.
If this was a distribution started version of Jetty, then its likely missing a distribution option to enable (and configure) for JSPs.


Joakim Erdfelt / [hidden email]

On Fri, Feb 2, 2018 at 8:32 AM, Nicoleta Sarbu <[hidden email]> wrote:
Hi,

I moved a project from Eclipse to Android Studio that inlcudes jetty-8.1.15.jar for Android and I have this error on the server side (service unavailable):

W/System.err: 2018-02-02 15:45:40.238:WARN:oejw.StandardDescriptorProcessor:Could not instantiate listener org.eclipse.jetty.servlet.listener.ELContextCleaner
W/System.err: java.lang.NullPointerException: throw with null exception
W/System.err:     at java.net.URLClassLoader.findClass(URLClassLoader.java:371)
W/System.err:     at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:421)
W/System.err:     at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:383)
W/System.err:     at org.eclipse.jetty.server.handler.ContextHandler.loadClass(ContextHandler.java:1528)
W/System.err:     at org.eclipse.jetty.webapp.StandardDescriptorProcessor.visitListener(StandardDescriptorProcessor.java:1893)
W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
W/System.err:     at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.visit(IterativeDescriptorProcessor.java:85)
W/System.err:     at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.process(IterativeDescriptorProcessor.java:72)
W/System.err:     at org.eclipse.jetty.webapp.MetaData.resolve(MetaData.java:366)
W/System.err:     at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1240)
W/System.err:     at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
W/System.err:     at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
W/System.err:     at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
W/System.err:     at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
W/System.err:     at org.eclipse.jetty.server.Server.doStart(Server.java:282)
W/System.err:     at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)

The library is added as a dependency. Is there any other setup that needs to be done?

Thank you


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: 'Could not instantiate listener' error on Android Studio

Joakim Erdfelt-8
Also, since you are using Jetty 8, be sure to not run Java 9 (its not supported on Jetty 8 due to JEP 238 & JPMS changes to the JVM)
For maximum compatibility with Jetty 8.1.15 you should probably stick to Java 7.


Joakim Erdfelt / [hidden email]

On Fri, Feb 2, 2018 at 8:39 AM, Joakim Erdfelt <[hidden email]> wrote:
Jetty 8 is EOL (End of Life)

Without knowing how the Android Studio instance of Jetty was started, it would be hard to troubleshoot.
If this was a distribution started version of Jetty, then its likely missing a distribution option to enable (and configure) for JSPs.


Joakim Erdfelt / [hidden email]

On Fri, Feb 2, 2018 at 8:32 AM, Nicoleta Sarbu <[hidden email]> wrote:
Hi,

I moved a project from Eclipse to Android Studio that inlcudes jetty-8.1.15.jar for Android and I have this error on the server side (service unavailable):

W/System.err: 2018-02-02 15:45:40.238:WARN:oejw.StandardDescriptorProcessor:Could not instantiate listener org.eclipse.jetty.servlet.listener.ELContextCleaner
W/System.err: java.lang.NullPointerException: throw with null exception
W/System.err:     at java.net.URLClassLoader.findClass(URLClassLoader.java:371)
W/System.err:     at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:421)
W/System.err:     at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:383)
W/System.err:     at org.eclipse.jetty.server.handler.ContextHandler.loadClass(ContextHandler.java:1528)
W/System.err:     at org.eclipse.jetty.webapp.StandardDescriptorProcessor.visitListener(StandardDescriptorProcessor.java:1893)
W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
W/System.err:     at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.visit(IterativeDescriptorProcessor.java:85)
W/System.err:     at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.process(IterativeDescriptorProcessor.java:72)
W/System.err:     at org.eclipse.jetty.webapp.MetaData.resolve(MetaData.java:366)
W/System.err:     at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1240)
W/System.err:     at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
W/System.err:     at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
W/System.err:     at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
W/System.err:     at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
W/System.err:     at org.eclipse.jetty.server.Server.doStart(Server.java:282)
W/System.err:     at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)

The library is added as a dependency. Is there any other setup that needs to be done?

Thank you


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: 'Could not instantiate listener' error on Android Studio

Nicoleta Sarbu
In reply to this post by Joakim Erdfelt-8
This is the method where I start the server which is an instance of org.eclipse.jetty.server.Server:
(in Eclipse was working ok)
/////////////////////////////////////////
// Initializes and starts the Jetty webserver
public synchronized void startServer()
{
if(server == null)
{
server = new Server(port);
server.setHandler(getWebAppContext());
}
else if(!server.isStarted())
{
return;
}

try
{
server.start();
}
catch (Exception e)
{
Log.e(TAG, "Error starting server!");
}
}


On 2 February 2018 at 16:39, Joakim Erdfelt <[hidden email]> wrote:
Jetty 8 is EOL (End of Life)

Without knowing how the Android Studio instance of Jetty was started, it would be hard to troubleshoot.
If this was a distribution started version of Jetty, then its likely missing a distribution option to enable (and configure) for JSPs.


Joakim Erdfelt / [hidden email]

On Fri, Feb 2, 2018 at 8:32 AM, Nicoleta Sarbu <[hidden email]> wrote:
Hi,

I moved a project from Eclipse to Android Studio that inlcudes jetty-8.1.15.jar for Android and I have this error on the server side (service unavailable):

W/System.err: 2018-02-02 15:45:40.238:WARN:oejw.StandardDescriptorProcessor:Could not instantiate listener org.eclipse.jetty.servlet.listener.ELContextCleaner
W/System.err: java.lang.NullPointerException: throw with null exception
W/System.err:     at java.net.URLClassLoader.findClass(URLClassLoader.java:371)
W/System.err:     at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:421)
W/System.err:     at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:383)
W/System.err:     at org.eclipse.jetty.server.handler.ContextHandler.loadClass(ContextHandler.java:1528)
W/System.err:     at org.eclipse.jetty.webapp.StandardDescriptorProcessor.visitListener(StandardDescriptorProcessor.java:1893)
W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
W/System.err:     at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.visit(IterativeDescriptorProcessor.java:85)
W/System.err:     at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.process(IterativeDescriptorProcessor.java:72)
W/System.err:     at org.eclipse.jetty.webapp.MetaData.resolve(MetaData.java:366)
W/System.err:     at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1240)
W/System.err:     at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
W/System.err:     at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
W/System.err:     at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
W/System.err:     at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
W/System.err:     at org.eclipse.jetty.server.Server.doStart(Server.java:282)
W/System.err:     at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)

The library is added as a dependency. Is there any other setup that needs to be done?

Thank you


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: 'Could not instantiate listener' error on Android Studio

Nicoleta Sarbu
This is my gradle build file:

apply plugin: 'com.android.application'

android {
compileSdkVersion 20
buildToolsVersion "25.0.2"

aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false


defaultConfig {
applicationId
minSdkVersion 15
targetSdkVersion 20

jackOptions{
enabled true
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
incremental false
}
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}

repositories{
mavenCentral()
}

dependencies {
compile 'com.android.support:support-v4:20.0.0'
compile files('libs/activation.jar')
compile files('libs/additionnal.jar')
compile files('libs/d2xx.jar')
compile files('libs/mail.jar')
compile files('src/main/webapp/jetty-8.1.15.jar')
}


On 2 February 2018 at 16:49, Nicoleta Sarbu <[hidden email]> wrote:
This is the method where I start the server which is an instance of org.eclipse.jetty.server.Server:
(in Eclipse was working ok)
/////////////////////////////////////////
// Initializes and starts the Jetty webserver
public synchronized void startServer()
{
if(server == null)
{
server = new Server(port);
server.setHandler(getWebAppContext());
}
else if(!server.isStarted())
{
return;
}

try
{
server.start();
}
catch (Exception e)
{
Log.e(TAG, "Error starting server!");
}
}


On 2 February 2018 at 16:39, Joakim Erdfelt <[hidden email]> wrote:
Jetty 8 is EOL (End of Life)

Without knowing how the Android Studio instance of Jetty was started, it would be hard to troubleshoot.
If this was a distribution started version of Jetty, then its likely missing a distribution option to enable (and configure) for JSPs.


Joakim Erdfelt / [hidden email]

On Fri, Feb 2, 2018 at 8:32 AM, Nicoleta Sarbu <[hidden email]> wrote:
Hi,

I moved a project from Eclipse to Android Studio that inlcudes jetty-8.1.15.jar for Android and I have this error on the server side (service unavailable):

W/System.err: 2018-02-02 15:45:40.238:WARN:oejw.StandardDescriptorProcessor:Could not instantiate listener org.eclipse.jetty.servlet.listener.ELContextCleaner
W/System.err: java.lang.NullPointerException: throw with null exception
W/System.err:     at java.net.URLClassLoader.findClass(URLClassLoader.java:371)
W/System.err:     at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:421)
W/System.err:     at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:383)
W/System.err:     at org.eclipse.jetty.server.handler.ContextHandler.loadClass(ContextHandler.java:1528)
W/System.err:     at org.eclipse.jetty.webapp.StandardDescriptorProcessor.visitListener(StandardDescriptorProcessor.java:1893)
W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
W/System.err:     at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.visit(IterativeDescriptorProcessor.java:85)
W/System.err:     at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.process(IterativeDescriptorProcessor.java:72)
W/System.err:     at org.eclipse.jetty.webapp.MetaData.resolve(MetaData.java:366)
W/System.err:     at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1240)
W/System.err:     at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
W/System.err:     at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
W/System.err:     at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
W/System.err:     at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
W/System.err:     at org.eclipse.jetty.server.Server.doStart(Server.java:282)
W/System.err:     at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)

The library is added as a dependency. Is there any other setup that needs to be done?

Thank you


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: 'Could not instantiate listener' error on Android Studio

Jan Bartel
Could possibly be an android bug - make sure you're up to date.

Otherwise, if you can see the ELContextCleaner class inside the jetty-8.1.15.jar your code should be able to see it. Try writing a small test program that just does new ElContextCleaner() - should help you debug it.

Jan

On 2 February 2018 at 15:51, Nicoleta Sarbu <[hidden email]> wrote:
This is my gradle build file:

apply plugin: 'com.android.application'

android {
compileSdkVersion 20
buildToolsVersion "25.0.2"

aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false


defaultConfig {
applicationId
minSdkVersion 15
targetSdkVersion 20

jackOptions{
enabled true
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
incremental false
}
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}

repositories{
mavenCentral()
}

dependencies {
compile 'com.android.support:support-v4:20.0.0'
compile files('libs/activation.jar')
compile files('libs/additionnal.jar')
compile files('libs/d2xx.jar')
compile files('libs/mail.jar')
compile files('src/main/webapp/jetty-8.1.15.jar')
}


On 2 February 2018 at 16:49, Nicoleta Sarbu <[hidden email]> wrote:
This is the method where I start the server which is an instance of org.eclipse.jetty.server.Server:
(in Eclipse was working ok)
/////////////////////////////////////////
// Initializes and starts the Jetty webserver
public synchronized void startServer()
{
if(server == null)
{
server = new Server(port);
server.setHandler(getWebAppContext());
}
else if(!server.isStarted())
{
return;
}

try
{
server.start();
}
catch (Exception e)
{
Log.e(TAG, "Error starting server!");
}
}


On 2 February 2018 at 16:39, Joakim Erdfelt <[hidden email]> wrote:
Jetty 8 is EOL (End of Life)

Without knowing how the Android Studio instance of Jetty was started, it would be hard to troubleshoot.
If this was a distribution started version of Jetty, then its likely missing a distribution option to enable (and configure) for JSPs.


Joakim Erdfelt / [hidden email]

On Fri, Feb 2, 2018 at 8:32 AM, Nicoleta Sarbu <[hidden email]> wrote:
Hi,

I moved a project from Eclipse to Android Studio that inlcudes jetty-8.1.15.jar for Android and I have this error on the server side (service unavailable):

W/System.err: 2018-02-02 15:45:40.238:WARN:oejw.StandardDescriptorProcessor:Could not instantiate listener org.eclipse.jetty.servlet.listener.ELContextCleaner
W/System.err: java.lang.NullPointerException: throw with null exception
W/System.err:     at java.net.URLClassLoader.findClass(URLClassLoader.java:371)
W/System.err:     at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:421)
W/System.err:     at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:383)
W/System.err:     at org.eclipse.jetty.server.handler.ContextHandler.loadClass(ContextHandler.java:1528)
W/System.err:     at org.eclipse.jetty.webapp.StandardDescriptorProcessor.visitListener(StandardDescriptorProcessor.java:1893)
W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
W/System.err:     at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.visit(IterativeDescriptorProcessor.java:85)
W/System.err:     at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.process(IterativeDescriptorProcessor.java:72)
W/System.err:     at org.eclipse.jetty.webapp.MetaData.resolve(MetaData.java:366)
W/System.err:     at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1240)
W/System.err:     at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
W/System.err:     at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
W/System.err:     at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
W/System.err:     at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
W/System.err:     at org.eclipse.jetty.server.Server.doStart(Server.java:282)
W/System.err:     at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)

The library is added as a dependency. Is there any other setup that needs to be done?

Thank you


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



--
Jan Bartel <[hidden email]>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: 'Could not instantiate listener' error on Android Studio

Nicoleta Sarbu
It sees the class, but I think the problem is that it doesnt get the listeners from webdefault.xml fro the jetty library. Can you send me a newer version of jetty for android please?

Thank you.

On 2 February 2018 at 17:42, Jan Bartel <[hidden email]> wrote:
Could possibly be an android bug - make sure you're up to date.

Otherwise, if you can see the ELContextCleaner class inside the jetty-8.1.15.jar your code should be able to see it. Try writing a small test program that just does new ElContextCleaner() - should help you debug it.

Jan

On 2 February 2018 at 15:51, Nicoleta Sarbu <[hidden email]> wrote:
This is my gradle build file:

apply plugin: 'com.android.application'

android {
compileSdkVersion 20
buildToolsVersion "25.0.2"

aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false


defaultConfig {
applicationId
minSdkVersion 15
targetSdkVersion 20

jackOptions{
enabled true
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
incremental false
}
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}

repositories{
mavenCentral()
}

dependencies {
compile 'com.android.support:support-v4:20.0.0'
compile files('libs/activation.jar')
compile files('libs/additionnal.jar')
compile files('libs/d2xx.jar')
compile files('libs/mail.jar')
compile files('src/main/webapp/jetty-8.1.15.jar')
}


On 2 February 2018 at 16:49, Nicoleta Sarbu <[hidden email]> wrote:
This is the method where I start the server which is an instance of org.eclipse.jetty.server.Server:
(in Eclipse was working ok)
/////////////////////////////////////////
// Initializes and starts the Jetty webserver
public synchronized void startServer()
{
if(server == null)
{
server = new Server(port);
server.setHandler(getWebAppContext());
}
else if(!server.isStarted())
{
return;
}

try
{
server.start();
}
catch (Exception e)
{
Log.e(TAG, "Error starting server!");
}
}


On 2 February 2018 at 16:39, Joakim Erdfelt <[hidden email]> wrote:
Jetty 8 is EOL (End of Life)

Without knowing how the Android Studio instance of Jetty was started, it would be hard to troubleshoot.
If this was a distribution started version of Jetty, then its likely missing a distribution option to enable (and configure) for JSPs.


Joakim Erdfelt / [hidden email]

On Fri, Feb 2, 2018 at 8:32 AM, Nicoleta Sarbu <[hidden email]> wrote:
Hi,

I moved a project from Eclipse to Android Studio that inlcudes jetty-8.1.15.jar for Android and I have this error on the server side (service unavailable):

W/System.err: 2018-02-02 15:45:40.238:WARN:oejw.StandardDescriptorProcessor:Could not instantiate listener org.eclipse.jetty.servlet.listener.ELContextCleaner
W/System.err: java.lang.NullPointerException: throw with null exception
W/System.err:     at java.net.URLClassLoader.findClass(URLClassLoader.java:371)
W/System.err:     at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:421)
W/System.err:     at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:383)
W/System.err:     at org.eclipse.jetty.server.handler.ContextHandler.loadClass(ContextHandler.java:1528)
W/System.err:     at org.eclipse.jetty.webapp.StandardDescriptorProcessor.visitListener(StandardDescriptorProcessor.java:1893)
W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
W/System.err:     at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.visit(IterativeDescriptorProcessor.java:85)
W/System.err:     at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.process(IterativeDescriptorProcessor.java:72)
W/System.err:     at org.eclipse.jetty.webapp.MetaData.resolve(MetaData.java:366)
W/System.err:     at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1240)
W/System.err:     at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
W/System.err:     at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
W/System.err:     at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
W/System.err:     at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
W/System.err:     at org.eclipse.jetty.server.Server.doStart(Server.java:282)
W/System.err:     at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)

The library is added as a dependency. Is there any other setup that needs to be done?

Thank you


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



--
Jan Bartel <[hidden email]>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users