This is the error log resulting from the exception. I'm not sure what causing it to fail during the deployments
2016-05-23 10:19:57,656 INFO [com.sdars.util.EJBUtil]: {java.naming.provider.url=t3:/localhost:7001, java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory, weblogic.jndi.enableServerAffinity=true}
2016-05-23 10:19:57,656 INFO [com.sdars.util.EJBUtil]: javax.naming.ConfigurationException: t3:/localhost:7001 [Root exception is java.net.MalformedURLException: t3:/localhost:7001]
at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:36)
at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:808)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:365)
at weblogic.jndi.Environment.getContext(Environment.java:319)
at weblogic.jndi.Environment.getContext(Environment.java:288)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
at javax.naming.InitialContext.init(InitialContext.java:244)
at javax.naming.InitialContext.<init>(InitialContext.java:216)
Caused by: java.net.MalformedURLException: t3:/localhost:7001
at weblogic.protocol.ServerURL.parseURL(ServerURL.java:486)
at weblogic.protocol.ServerURL.<init>(ServerURL.java:104)
at weblogic.rjvm.ServerURL.<init>(ServerURL.java:49)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:335)
... 37 more
I believe that the error is due to trivial typo in java.naming.provider.url property value. Missing a / in the url.
Change from : t3:/localhost:7001
to : t3://localhost:7001
You may look at an example here from oracle's documentation.
Exception you are getting is
Root exception is java.net.MalformedURLException: t3:/localhost:7001. Standard weblogic url is of following format.
t3://ip:port
Looks like you are missing / in your url configuration
t3://localhost:7001
Related
I have a SOAP webservice backend only application which fails to start(deploy) since March 30th with the error //Unsupported protocol: https'// (including the single quote next to https), no code change went in since an year or so and none of the other system URL's are configured within the application code or property file other than xlmns namespace uri in the XSD. I get that error during the application deployment (initialization) even before testing any webservice within the application.
I am on JDK 1.6.0.45 on a weblogic 10.3.6 server. (Sorry, I know I need to upgrade to newer, I will get there eventually I promise)
The full stacktrace is as below, I did enable ssl debug logs during weblogic start up but I do not see any error that would convey a missing certificate.
<Apr 5, 2022 2:31:49 PM IST> <Warning> <HTTP> <BEA-101162> <User defined listener org.springframework.web.context.ContextLoaderListener failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection#0': Invocation of init method failed; nested exception is org.springframework.xml.xsd.commons.CommonsXsdSchemaException: Schema [ServletContext resource [/WEB-INF/xsd/AcmeAppGateway.xsd]] could not be loaded; nested exception is org.apache.ws.commons.schema.XmlSchemaException: Unsupported protocol: https'.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection#0': Invocation of init method failed; nested exception is org.springframework.xml.xsd.commons.CommonsXsdSchemaException: Schema [ServletContext resource [/WEB-INF/xsd/AcmeAppGateway.xsd]] could not be loaded; nested exception is org.apache.ws.commons.schema.XmlSchemaException: Unsupported protocol: https'
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1512)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
Truncated. see log file for complete stacktrace
Caused By: org.springframework.xml.xsd.commons.CommonsXsdSchemaException: Schema [ServletContext resource [/WEB-INF/xsd/AcmeAppGateway.xsd]] could not be loaded; nested exception is org.apache.ws.commons.schema.XmlSchemaException: Unsupported protocol: https'
at org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection.afterPropertiesSet(CommonsXsdSchemaCollection.java:147)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1571)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1509)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
Truncated. see log file for complete stacktrace
Caused By: org.apache.ws.commons.schema.XmlSchemaException: Unsupported protocol: https'
at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:710)
at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:706)
at org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder.java:538)
at org.apache.ws.commons.schema.SchemaBuilder.handleSchemaElementChild(SchemaBuilder.java:1513)
at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:658)
Truncated. see log file for complete stacktrace
Caused By: java.net.ProtocolException: Unsupported protocol: https'
at weblogic.net.http.HttpClient.openServer(HttpClient.java:384)
at weblogic.net.http.HttpClient.New(HttpClient.java:252)
at weblogic.net.http.HttpURLConnection.connect(HttpURLConnection.java:213)
at weblogic.net.http.HttpURLConnection.followRedirect(HttpURLConnection.java:698)
at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:464)
Truncated. see log file for complete stacktrace
>
The xsd mentioned in the error has xlmns URI's as below, is it possible these are causing the problem by being on higher TLS version (TLS 1.2 which is not supported on JDK 1.6)?
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
There is no other URL configured in that xsd other than above. I came across another similiar error here, but that was due to a missing certificate. Much appreciated if anyone can point me in the right direction.
Okay finally figured out what the problem was after trial and error.
On our SOAP WS project we have set schemaLocation as below:
I believe* this site schemas.xmlsoap.org has turned on TLS1.2 on March 30th (*I am open to other reasons but this is my assumption at this time) which is why our application was working fine until that day and start to fail post that date. I verified the TLS configuration of that URL on SSLABS which said anything below TLS1.2 was disabled for that site.
Since I am still on JDK 1.6 there is no way to connect to this site which is on higher TLS than the one supported by 1.6, which is why the application initialization was failing while establishing connection to that url. The solution was to manually download the xml content of the soap encoding from the URL to a xml file and place this file within the project folder and then refer this file within the XSD for schemaLocation as shown below. This did the trick!!
I am trying to deploy my legacy application in web-logic 12c but problem is every time its showing exception like > "ClassNotFoundException: org.objectweb.asm.ClassVisitor,Basically this issue comes if application not have asm.jar but in my application asm.jar is there and moreover my application successfully deployed in web-logic 11
After lot of research i found below document in that they are saying WebLogic 12.2.1 infra to WebLogic 12.2.1.3 infra, the class org.objectweb.asm.ClassVisitorbelow can NOT be found when starting the server with customer's application deployed. Please some one guide me how can i resolve this issue
Document
https://support.oracle.com/knowledge/Middleware/2526226_1.html#FIX
Deployment issue
<Dec 6, 2019 5:58:46,064 AM GMT> <Error> <HTTP> <WL-101216> <Servlet: "JerseyRESTService" failed to preload on startup in Web application: "CDMWeb.war".
A MultiException has 1 exceptions. They are:
1. java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor
at org.jvnet.hk2.internal.Utilities.justCreate(Utilities.java:1085)
at org.jvnet.hk2.internal.ServiceLocatorImpl.create(ServiceLocatorImpl.java:978)
at org.jvnet.hk2.internal.ServiceLocatorImpl.createAndInitialize(ServiceLocatorImpl.java:1082)
at org.jvnet.hk2.internal.ServiceLocatorImpl.createAndInitialize(ServiceLocatorImpl.java:1074)
at org.glassfish.jersey.server.ApplicationHandler.createApplication(ApplicationHandler.java:385)
Truncated. see log file for complete stacktrace
Caused By: java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor
at com.sun.jersey.api.core.ScanningResourceConfig.init(ScanningResourceConfig.java:79)
at com.sun.jersey.api.core.PackagesResourceConfig.init(PackagesResourceConfig.java:104)
at com.sun.jersey.api.core.PackagesResourceConfig.<init>(PackagesResourceConfig.java:78)
at com.verizon.application.Application.<init>(Application.java:12)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Truncated. see log file for complete stacktrace
Caused By: java.lang.ClassNotFoundException: org.objectweb.asm.ClassVisitor
at com.oracle.classloader.PolicyClassLoader.findClass(PolicyClassLoader.java:398)
at com.oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:371)
at com.oracle.classloader.weblogic.LaunchClassLoader.loadClass(LaunchClassLoader.java:55)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.sun.jersey.api.core.ScanningResourceConfig.init(ScanningResourceConfig.java:79)
Truncated. see log file for complete stacktrace
>
You can try adding the asm.jar to your Applications's WEB-INF/lib directory. From the error it's clear that JVM not able to locate the class, hence java.lang.ClassNotFoundException
I have created two Jersey servlet projects using com.sun.jersey.spi.spring.container.servlet.SpringServlet. I use jersey 1.19.1 jars. Both projects has the dependent jars in lib folder. I deployed both the projects in liberty 9 server.
When I try to access the endpoints, one project works fine but not the other one. I have below exception in console if second project does not work. If I restart that project alone (not the server), it works. I do not know why and I try to find the permanent fix for this.
SRVE0271E: Uncaught init() exception created by servlet [jersey-servlet] in application [secondproject]: java.lang.RuntimeException: javax.naming.NameNotFoundException: CDIExtension
SRVE0315E: An exception occurred: java.lang.Throwable: javax.servlet.ServletException: SRVE0207E: Uncaught initialization exception created by servlet
If first project does not work, I see the below exception in console.
SRVE0271E: Uncaught init() exception created by servlet [jersey-servlet] in application [firstproject]: java.lang.ClassCastException: com.sun.jersey.server.impl.cdi.CDIExtension incompatible with com.sun.jersey.server.impl.cdi.CDIExtension
SRVE0276E: Error while initializing Servlet [jersey-servlet]: javax.servlet.ServletException: SRVE0207E: Uncaught initialization exception created by servlet
Update with full stack:
java.lang.RuntimeException: javax.naming.NameNotFoundException: CDIExtension
at com.sun.jersey.server.impl.cdi.CDIExtension.getInitializedExtension(CDIExtension.java:183)
at com.sun.jersey.server.impl.cdi.CDIComponentProviderFactory.<init>(CDIComponentProviderFactory.java:95)
at com.sun.jersey.server.impl.cdi.CDIComponentProviderFactoryInitializer.initialize(CDIComponentProviderFactoryInitializer.java:76)
at com.sun.jersey.spi.container.servlet.WebComponent.configure(WebComponent.java:572)
at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.configure(ServletContainer.java:332)
at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:604)
at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:207)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:394)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:577)
at javax.servlet.GenericServlet.init(GenericServlet.java:244)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:332)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.loadOnStartupCheck(ServletWrapper.java:1428)
at com.ibm.ws.webcontainer.webapp.WebApp.doLoadOnStartupActions(WebApp.java:1181)
at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinally(WebApp.java:1149)
at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:1055)
at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:6499)
at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost.startWebApp(DynamicVirtualHost.java:446)
at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost.createRunnableHandler(DynamicVirtualHost.java:248)
at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost.createRunnableHandler(DynamicVirtualHost.java:313)
at com.ibm.ws.http.internal.VirtualHostImpl.discriminate(VirtualHostImpl.java:251)
at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.ready(HttpDispatcherLink.java:300)
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:471)
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleNewRequest(HttpInboundLink.java:405)
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.processRequest(HttpInboundLink.java:285)
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.ready(HttpInboundLink.java:256)
at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:174)
at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:83)
at com.ibm.ws.tcpchannel.internal.WorkQueueManager.requestComplete(WorkQueueManager.java:504)
at com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQueueManager.java:574)
at com.ibm.ws.tcpchannel.internal.WorkQueueManager.workerRun(WorkQueueManager.java:929)
at com.ibm.ws.tcpchannel.internal.WorkQueueManager$Worker.run(WorkQueueManager.java:1018)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.lang.Thread.run(Thread.java:785)
Caused by: javax.naming.NameNotFoundException: CDIExtension
at com.ibm.ws.jndi.internal.ContextNode.lookup(ContextNode.java:218)
at com.ibm.ws.jndi.internal.WSContext.lookup(WSContext.java:297)
at com.ibm.ws.jndi.WSContextBase.lookup(WSContextBase.java:62)
at com.sun.jersey.server.impl.cdi.CDIExtension.getInitializedExtension(CDIExtension.java:181)
... 33 more
Caused by: java.lang.ClassCastException: com.sun.jersey.server.impl.cdi.CDIExtension incompatible with com.sun.jersey.server.impl.cdi.CDIExtension
at com.sun.jersey.server.impl.cdi.CDIExtension.getInitializedExtension(CDIExtension.java:181)
at com.sun.jersey.server.impl.cdi.CDIComponentProviderFactory.<init>(CDIComponentProviderFactory.java:95)
at com.sun.jersey.server.impl.cdi.CDIComponentProviderFactoryInitializer.initialize(CDIComponentProviderFactoryInitializer.java:76)
at com.sun.jersey.spi.container.servlet.WebComponent.configure(WebComponent.java:572)
at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.configure(ServletContainer.java:332)
at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:604)
at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:207)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:394)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:577)
at javax.servlet.GenericServlet.init(GenericServlet.java:244)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:332)
... 1 more
Please check this link, it is helpful to me.
You can solve the problem when setting the system-property
com.sun.jersey.server.impl.cdi.lookupExtensionInBeanManager=true
This can be done from the GlassFish server console.
Select the node ->Configuration->server-config->JVM Settings
change to the tab ‘JVM Options’
add a new entry
-Dcom.sun.jersey.server.impl.cdi.lookupExtensionInBeanManager=true
restart your server
In the logs you can see:
Caused by: java.lang.ClassCastException: com.sun.jersey.server.impl.cdi.CDIExtension incompatible with com.sun.jersey.server.impl.cdi.CDIExtension
Liberty uses Jersey as JAX-RS provider, so you have conflict. You either have to remove these jars from your application, or make sure that JAX-RS feature is not included explicitly or implicitly in your server.xml
The error,
javax.naming.NameNotFoundException: Unable to resolve 'com.sun.jersey.config.CDIExtension'. Resolved 'com.sun.jersey.config'; remaining name 'CDIExtension'
can be caused due to an class import in EJB3
Example:
import javax.enterprise.context.RequestScoped;
#RequestScoped
public class SampleServices {
#EJB
CalcBeanLocal calcBean;
.....
When importing RequestScope "bean.xml" will be added to WEB-INF.
This ca be resolved by using #stateless annotation instead of #RequestScope and by removing the above created "bean.xml" in WEB-INF.
Example:
#stateless
public class SampleServices {
#EJB
CalcBeanLocal calcBean;
.....
project run on local machine, but after deploy on server get hibernate.cfg.xml not found error.same war file deploy on local machine tomcat it work.
2015-07-13 07:00:00 ERROR JobRunShell:211 - Job grpPM.jobPM threw an unhandled Exception:
org.hibernate.HibernateException: Hibernate.cfg.xml not found
at org.hibernate.internal.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:173)
at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:2095)
at org.hibernate.cfg.Configuration.configure(Configuration.java:2076)
at hibernet.HibernateConnection.getInstance(HibernateConnection.java:32)
at hibernet.HibernateData.getConnection(HibernateData.java:45)
at stockRefresh.Script330.runScript(Script330.java:34)
at StockRefresh330.execute(StockRefresh330.java:13)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
2015-07-13 07:00:00 ERROR ErrorLogger:2425 - Job (grpPM.jobPM threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.hibernate.HibernateException: Hibernate.cfg.xml not found]
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: org.hibernate.HibernateException: Hibernate.cfg.xml not found
at org.hibernate.internal.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:173)
at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:2095)
at org.hibernate.cfg.Configuration.configure(Configuration.java:2076)
at hibernet.HibernateConnection.getInstance(HibernateConnection.java:32)
at hibernet.HibernateData.getConnection(HibernateData.java:45)
at stockRefresh.Script330.runScript(Script330.java:34)
at StockRefresh330.execute(StockRefresh330.java:13)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
Put your hibernate.cfg.xml in your classpath. and if you don't want, use the below to get context of your XML file.
Configuration configuration = new Configuration();
configuration.configure("hibernate.cfg.xml");//Here you can give your exact path w.r.t your project`
Put your hibernate.cfg.xml under src/main/resources if the file is the same folder as your Java files your build system may not copy it.
I'm having issues on getting Solr 4.3.1 to run using the cargo-maven2-plugin. After fixing all classpath issues, I've ended up with the following error:
ERROR org.apache.solr.core.CoreContainer - null:org.apache.solr.common.SolrException: Unable to create core: collection1
at org.apache.solr.core.CoreContainer.recordAndThrow(CoreContainer.java:1450)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:993)
at org.apache.solr.core.CoreContainer$2.call(CoreContainer.java:597)
<...>
Caused by: org.apache.solr.common.SolrException: RequestHandler init failure
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:821)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:618)
at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:949)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:984)
... 10 more
Caused by: org.apache.solr.common.SolrException: RequestHandler init failure
at org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:168)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:758)
... 13 more
Caused by: org.apache.solr.common.SolrException: Error Instantiating Request Handler, org.apache.solr.handler.dataimport.DataImportHandler failed to instantiate org.apache.solr.request.SolrRequestHandler
at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:539)
at org.apache.solr.core.SolrCore.createRequestHandler(SolrCore.java:592)
at org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:154)
... 14 more
Caused by: java.lang.ClassCastException: class org.apache.solr.handler.dataimport.DataImportHandler
at java.lang.Class.asSubclass(Class.java:3037)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:448)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:396)
at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:518)
... 16 more
I've tried with the tomcat7x and jetty7x containers. If this is a classloader problem, can I somehow force the container to use the same classloader as maven is using?
Going through the stack trace I did a Google search on
Error Instantiating Request Handler, \
org.apache.solr.handler.dataimport.DataImportHandler \
failed to instantiate org.apache.solr.request.SolrRequestHandl
And that brought up the following SO question.
Why can't I instantiate DataImportHandler in Solr on JBoss?
There are many answers that should help resolve the issue.