Jetty 9 not able to load jndi datasource driver class - jetty

I searched for the issues for several days and could not find out what can fix the problem. Please help.
I have the standalone web app with jetty-9.3.10.v20160621 and the datasource is defined in jetty.xml.
I have put the jars into the JETTY_HOME/lib/ext.
But it still failed to start the application:
Caused by: java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.eclipse.jetty.util.Loader.loadClass(Loader.java:86)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.newObj(XmlConfiguration.java:758)
I also tried with jetty-env.xml and which had the similar issue that the class loader could not find the class even though the jars shown in the classpath.

Related

Cannot install jenkins plugin. Getting an error occured unable to connect to jenkins

I have Jenkins running on Ubuntu 16.04.3 LTS
hosted on AWS. I can access the setup wizard; the problem I am having occurs after entering my admin password then proceeding to install the suggested plugins. I get an unable to connect to Jenkins message. Please, I need help on how to resolve this issue. I have spent hours trying to get this resolved by following suggested solutions but to no avail.
Thanks
Unable to connect to Jenkins error
Maybe this helps. This is the error message I am getting from the log
WARNING: null
org.eclipse.jetty.io.EofException
at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:292)
at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:429)
at org.eclipse.jetty.io.WriteFlusher.completeWrite(WriteFlusher.java:384)
at org.eclipse.jetty.io.ChannelEndPoint$3.run(ChannelEndPoint.java:139)
at org.eclipse.jetty.util.thread.Invocable.invokePreferred (Invocable.java:128)
at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199)
at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Broken pipe
at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
at sun.nio.ch.IOUtil.write(IOUtil.java:65)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:270)
... 11 more
There is a known issue with the Jenkins plugin environment right now. I used to have a Jira issue number, but I don't know what it is now.

Starting wso2 3.0.0 gateway windows "Could not load Logmanager"

So i am trying to load the WSO2 gateway from my local machine running the new 3.0.0-m6 version downloaded from their website.
I have run everything as described in the quickstart guide, and i get the following error on start up.
Could not load Logmanager "org.ballerinalang.launcher.BLogManager"
java.lang.ClassNotFoundException: org.ballerinalang.launcher.BLogManager
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.util.logging.LogManager$1.run(LogManager.java:195)
at java.util.logging.LogManager$1.run(LogManager.java:181)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.<clinit>(LogManager.java:181)
at java.util.logging.Logger.demandLogger(Logger.java:448)
at java.util.logging.Logger.getLogger(Logger.java:502)
at com.sun.jmx.remote.util.ClassLogger.<init>(ClassLogger.java:55)
at sun.management.jmxremote.ConnectorBootstrap.<clinit>(ConnectorBootstrap.java:846)
at sun.management.Agent.startLocalManagementAgent(Agent.java:138)
at sun.management.Agent.startAgent(Agent.java:260)
at sun.management.Agent.startAgent(Agent.java:447)
ballerina: unknown command 'start'
Run 'ballerina help' for usage.
ActiveMQ is running
WSO2 Server is running
WSO2 Identity manager is running
WSO2 API Manager is running
I am starting the gateway from the root folder as explained in the start up guide.
Are you running this in Windows? The version 3.0.0-m6 is based on Ballerina v0.89 and in this version of Ballerina, there's a bug in the bin/ballerina.batfile. As you can see, it's looking for a class named org.ballerinalang.launcher.BLogManager and fails. This class was moved to another package and now, its fully qualified name is org.ballerinalang.logging.BLogManager. In the ballerina.bat script, change the property (towards the end of the file) -Djava.util.logging.manager="org.ballerinalang.launcher.BLogManager" to -Djava.util.logging.manager="org.ballerinalang.logging.BLogManager" and it should solve your problem.

wso2 is 5.1.0 missing classes when running as a service (org.apache.jsp.user.edit_002duser_002droles_jsp)

Upgrading from WSO2 IS 5.0.0 SP1 to WSO2 IS 5.1.1 patch 92 (Windows Server 2008, JRE 1.7), running as a Windows service (installed using the yajsw.conf).
Adding a role to the user fails (with a blank page), in the wso2carbon.log we have an exception:
Caused by: java.lang.ClassNotFoundException:
org.apache.jsp.user.edit_002duser_002droles_jsp
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
Caused by: java.io.IOException: JSPException while including path '/user/edit-user-roles.jsp'. ServletException while including page.
at org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:91)
at org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequestContext.java:82)
Interesting on it is, that running the WSO2 IS 5.1.0 from the console works (wso2server.bat) without any issues. I searched for the edit-user-roles.jsp file and I found it in the library org.wso2.carbon.user.mgt.ui_5.0.7.jar (repository/components/plugins and repository/components/patches/patch0000). So - looks like the library is not loaded properly.
I was comparing the JVM settings between the IS started as a service and from CLI. The only discrepancy I found is in the -Dcomponents.repo parameter:
wso2server.bat: -Dcomponents.repo=%CARBON_HOME%\repository\components
wrapper.conf: -Dcomponents.repo=%CARBON_HOME%\repository\components\dropins
However
in the WSO2 IS 5.0.0S.P1 it looks the same (there are different values in the wso2server.bat and wrapper.conf) and there's no problem to add a role to the user account
I've changed the wrapper.conf to have the same value (=%CARBON_HOME%\repository\components) with no effect
Following updates to the wrapper.conf solved the problem:
wrapper.java.additional.18 = -Dcomponents.repo=${carbon_home}\\repository\\components
wrapper.java.additional.26 = -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false

Failed to configure Identity Server 5.0.0 as API Key Manager

I followed document to configure Identity Server 5.0.0 as API(1.80) Key Manager - https://docs.wso2.com/display/CLUSTER420/Configuring+WSO2+Identity+Server+as+the+Key+Manager, and log displayed exceptions when startup after installed API Key Manager feature in Identity server. The exceptions are as following:
ERROR {org.wso2.carbon.registry.indexing.RegistryConfigLoader} - org.wso2.carbon.apimgt.impl.indexing.indexer.WSDLIndexer is not found in classpath. Please check whether the class is exported in your OSGI bundle. {org.wso2.carbon.registry.indexing.RegistryConfigLoader}
java.lang.ClassNotFoundException: org.wso2.carbon.apimgt.impl.indexing.indexer.WSDLIndexer
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.wso2.carbon.registry.indexing.RegistryConfigLoader.<init>(RegistryConfigLoader.java:132)
...
ERROR {org.wso2.carbon.registry.indexing.solr.SolrClient} - Could not instantiate Solr client {org.wso2.carbon.registry.indexing.solr.SolrClient}
java.lang.RuntimeException: java.io.FileNotFoundException: D:\wso2\wso2is-5.0.0\solr\data\index\_7.fnm (The system cannot find the file specified)
at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1068)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:579)
at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:137)
at org.wso2.carbon.registry.indexing.solr.SolrClient.<init>(SolrClient.java:90)
...
Can anyone help? I would be very gratefull.
I believe I have found the issue. When installing the Key Manager feature in this article and installing the WSO2 Identity Manager Service pack after the Key Manager, there are two files in the /repository/components/plugins directory:
org.wso2.carbon.registry.indexing_4.2.1.jar
org.wso2.carbon.registry.indexing_4.2.2.jar
I resolved this issue by removing the 4.2.1 jar version and leaving the 4.2.2 jar version. After doing so, no errors were encountered.

can not invoke web service from websphere portal

I am facing a problem related to axis.jar classes.
I have a WAR file that has axis.jar in its lib directory.
this WAR deployed on IBM websphere environment1 and this WAR is working fine.
when I deploy the same WAR in IBM websphere environment2 not working.
I got the following exception when I try to invoke a webservice:
java.lang.NoClassDefFoundError: org.apache.axis.configuration.EngineConfigurationFactoryDefault
I have no idea why this class not loaded in environment2.
Note that the same WAR woking fine on environment1 and not working on environment2.
Any help please??
You should check your Websphere classloader configuration.
I've faced these errors before, and they happen when you mix your version of axis, with missing dependencies, that are taken from Websphere. Usually, these Websphere dependencies are outdated, and some classes/methods don't exist.
Provide axis.jar and its dependencies on the WEB-INF/lib folder, and configure classloading to PARENT_LAST.
Also be sure that your MANIFEST.MF is referencing axis libraries as well
This should do the work