unable to create new native thread. 10C

有哪位大神可以给些意见?十分感谢!

问题描述如下:
首先,我是在一个docker container上工作:
container的OS是:Red Hat Enterprise Linux Server release 7.5 (Maipo)

系统配置应该是足够的:
max user processes: 1048576
free physical memory: 49G

但我在调用某些java程序时还是遇到OutOfMemoryError:

2018-08-17 02:03:25 [ERROR] [RS_Main:1][CONTAINER] - Diagnostic Data for Exception java.lang.OutOfMemoryError
Thread: RS_Main - [1]
Description: unable to create new native thread (41 threads running, rlimit: STACK 10240k, CORE infinity, NPROC 10240, NOFILE 10240, AS infinity, DATA infinity, CPU infinity, FSIZE infinity, MEMLOCK 64k , Memory: 4k page, physical 65195152k(51676960k free), swap 3129340k(3129324k free) )
StackTrace
( 0) - java.lang.Thread.start0(Native Method)
(-1) - java.lang.Thread.start(Thread.java:776)
(-2) - java.util.Timer.(Timer.java:176)
(-3) - com.sybase.rs.container.taskservices.ScheduledTaskManagerImpl.init(ScheduledTaskManagerImpl.java:83)
(-4) - com.sybase.rs.container.runtime.ContainerRuntime.initializeServices(ContainerRuntime.java:1014)
(-5) - com.sybase.rs.container.runtime.ContainerRuntime.init(ContainerRuntime.java:470)
(-6) - com.sybase.rs.container.runtime.ContainerRuntime.(ContainerRuntime.java:360)
(-7) - com.sybase.rs.container.runtime.ContainerRuntime.main(ContainerRuntime.java:1639)

2018-08-17 02:03:25 [Console] [RS_Main:1][CONTAINER] - Unexpected Error java.lang.OutOfMemoryError in the Container Initializer
2018-08-17 02:03:25 [Console] [RS_Main:1][CONTAINER] - Error is unable to create new native thread (41 threads running, rlimit: STACK 10240k, CORE infinity, NPROC 10240, NOFILE 10240, AS infinity, DATA infinity, CPU infinity, FSIZE infinity, MEMLOCK 64k , Memory: 4k page, physical 65195152k(51676960k free), swap 3129340k(3129324k free) ), See The Log for Details of this Error
2018-08-17 02:03:25 [Console] [RS_Main:1][CONTAINER] - AgentContainer - has Terminated Abnormally!
2018-08-17 02:03:35 [Always] [LoggerShutdownHook:15][LOGGER] - Logger Shutdown Hook Notifying The Logger Thread

2018-08-17 02:03:35 [INFO ] [LoggerThread:14][LOGGER] - Logger Thread Ending, 122 Messages Processed, Max Queued Messages was 103, CPU Time 38.756ms

1个回答

https://blog.csdn.net/candcplusplus/article/details/53728507 扩大下启动内存限制,或者在jvm上配置下-Xms512M -Xmx16G

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
nutch:unable to create new native thread
使用nutch爬取时,报错,以下是日志,哪位大神给我解答下 java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start0(Native Method) at java.lang.Thread.start(Thread.java:597) at java.util.concurrent.ThreadPoolExecutor.addIfUnderMaximumPoolSize(ThreadPoolExecutor.java:727) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:657) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:92) at org.apache.nutch.parse.ParseUtil.runParser(ParseUtil.java:159) at org.apache.nutch.parse.ParseUtil.parse(ParseUtil.java:93) at org.apache.nutch.parse.ParseSegment.map(ParseSegment.java:97) at org.apache.nutch.parse.ParseSegment.map(ParseSegment.java:44) at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:50) at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:358) at org.apache.hadoop.mapred.MapTask.run(MapTask.java:307) at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:177)
unable to create new native thread
mSuggestionSearch = SuggestionSearch.newInstance(); mSuggestionSearch.setOnGetSuggestionResultListener(new OnGetSuggestionResultListener() { @Override public void onGetSuggestionResult(SuggestionResult arg0) { // TODO Auto-generated method stub if(arg0 == null || arg0.getAllSuggestions() == null) { return; } myArrayAdapter.clear(); for(SuggestionResult.SuggestionInfo info : arg0.getAllSuggestions()) { if(info.key != null) { myArrayAdapter.add(info.key); } } myArrayAdapter.notifyDataSetChanged(); } }); ``` ``` 执行完这段代码后跳转到下面图片这里,求大神解答一下 ![](https://img-ask.csdn.net/upload/201609/22/1474536959_755631.png)
eclipse mars安装spring插件报错
eclipse mars安装spring插件出现这个错误unable to create new native thread ![图片说明](https://img-ask.csdn.net/upload/201611/09/1478701998_630427.png) 如图啊,安装到一般就弹这个框
JVM线程数限制
<pre name="code" class="java">public class MaxThreadsTest { /** * @param args */ public static void main(String[] args) { while (true) { new Thread(new A()).start(); if(A.eflag.get()){ return; } } } } class A implements Runnable { static AtomicInteger counts = new AtomicInteger(0); static AtomicBoolean eflag = new AtomicBoolean(false); @Override public void run() { try { int x = counts.getAndIncrement(); if(x%200==0) System.out.println("conts: " + A.counts); Thread.sleep(30000); } catch (InterruptedException e) { eflag.set(true); e.printStackTrace(); } } } </pre> <p> <br></p> <pre name="code" class="java">-Xms16M -Xmx32M -Xss1M -XX:+HeapDumpOnOutOfMemoryError conts: 1801 Exception in thread "main" java.lang.OutOfMemoryError: unable to create new native thread -Xms32M -Xmx64M -Xss1M -XX:+HeapDumpOnOutOfMemoryError conts: 1801 Exception in thread "main" java.lang.OutOfMemoryError: unable to create new native thread //把Xmx设大可以建立的线程数反而变小,这是个很奇怪的事情: -Xms64M -Xmx128M -Xss1M -XX:+HeapDumpOnOutOfMemoryError conts: 1601 Exception in thread "main" java.lang.OutOfMemoryError: unable to create new native thread //把Xmx设大可以建立的线程数反而变小,这是个很奇怪的事情: -Xms128M -Xmx256M -Xss1M -XX:+HeapDumpOnOutOfMemoryError conts: 1601 Exception in thread "main" java.lang.OutOfMemoryError: unable to create new native thread //把Xss设小有惊人效果: -Xms16M -Xmx32M -Xss128K -XX:+HeapDumpOnOutOfMemoryError conts: 13401 Exception in thread "main" java.lang.OutOfMemoryError: unable to create new native thread </pre> <p> <br><br>以上是在eclipse里测试的。 <br><br>在windows下直接测试有明显不同。 <br>java MaxThreadsTest -Xms16M -Xmx32M -Xss1M <br>java MaxThreadsTest -Xms64M -Xmx128M -Xss1M <br>无论怎么设置都在5401后结束。 <br><br><br>我对JVM的了解基本为0,所以也分析不出原因。 <br>请大家帮我看看,这是怎么回事,不是说Xmx越大、Xss越小,则线程数越多么?</p> <p> </p> <p>被移到问答区里了,这么低的悬赏,能有人关注吗?</p> <p>没办法了,就这么点钱啦……………………………………………………………………</p> <p> </p>
Hibernate提示错误Unable to create requested service
异常提示如下: ------在加载Hibernate配置文件时抛出异常,内容如下: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:271) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:233) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:210) at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:51) at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:94) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:242) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:210) at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.handleTypes(MetadataBuildingProcess.java:352) at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:111) at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.build(MetadataBuildingProcess.java:83) at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:418) at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:87) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:691) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:726) at com.mwq.hibernate.HibernateSessionFactory.<clinit>(HibernateSessionFactory.java:17) at com.mwq.hibernate.BaseDao.queryList(BaseDao.java:29) at com.mwq.hibernate.Dao.queryManagerOfNatural(Dao.java:141) at com.mwq.frame.LandFrame.<init>(LandFrame.java:100) at com.mwq.PersonnelManage.land(PersonnelManage.java:32) at com.mwq.PersonnelManage$1.run(PersonnelManage.java:26) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Caused by: org.hibernate.exception.JDBCConnectionException: Error calling Driver#connect at org.hibernate.engine.jdbc.connections.internal.BasicConnectionCreator$1$1.convert(BasicConnectionCreator.java:105) at org.hibernate.engine.jdbc.connections.internal.BasicConnectionCreator.convertSqlException(BasicConnectionCreator.java:123) at org.hibernate.engine.jdbc.connections.internal.DriverConnectionCreator.makeConnection(DriverConnectionCreator.java:41) at org.hibernate.engine.jdbc.connections.internal.BasicConnectionCreator.createConnection(BasicConnectionCreator.java:58) at org.hibernate.engine.jdbc.connections.internal.PooledConnections.addConnections(PooledConnections.java:123) at org.hibernate.engine.jdbc.connections.internal.PooledConnections.<init>(PooledConnections.java:42) at org.hibernate.engine.jdbc.connections.internal.PooledConnections.<init>(PooledConnections.java:20) at org.hibernate.engine.jdbc.connections.internal.PooledConnections$Builder.build(PooledConnections.java:161) at org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl.buildPool(DriverManagerConnectionProviderImpl.java:109) at org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl.configure(DriverManagerConnectionProviderImpl.java:72) at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:94) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:242) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:210) at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.buildJdbcConnectionAccess(JdbcEnvironmentInitiator.java:145) at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:66) at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35) at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:88) at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:259) ... 33 more Caused by: java.sql.SQLException: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:412) at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:531) at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:221) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:503) at org.hibernate.engine.jdbc.connections.internal.DriverConnectionCreator.makeConnection(DriverConnectionCreator.java:38) ... 48 more Caused by: oracle.net.ns.NetException: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor at oracle.net.ns.NSProtocol.connect(NSProtocol.java:385) at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1042) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:301) ... 53 more Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at com.mwq.hibernate.HibernateSessionFactory.getSession(HibernateSessionFactory.java:27) at com.mwq.hibernate.BaseDao.queryList(BaseDao.java:29) at com.mwq.hibernate.Dao.queryManagerOfNatural(Dao.java:141) at com.mwq.frame.LandFrame.<init>(LandFrame.java:100) at com.mwq.PersonnelManage.land(PersonnelManage.java:32) at com.mwq.PersonnelManage$1.run(PersonnelManage.java:26) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)
tomcat起不来了,各路大神支支招吧
2017-5-5 12:52:37 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_27\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\app\gaomin\product\11.2.0\dbhome_1\bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Java\jdk1.6.0_27\bin;C:\Program Files\Java\jdk1.6.0_27\jre\bin;E:\ruanjian\SVN\bin;C:\Users\gaomin\AppData\Local\Microsoft\WindowsApps;;. 2017-5-5 12:52:37 org.apache.coyote.AbstractProtocol init 信息: Initializing ProtocolHandler ["http-bio-8090"] 2017-5-5 12:52:37 org.apache.coyote.AbstractProtocol init 信息: Initializing ProtocolHandler ["ajp-bio-8010"] 2017-5-5 12:52:37 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 537 ms 2017-5-5 12:52:37 org.apache.catalina.core.StandardService startInternal 信息: Starting service Catalina 2017-5-5 12:52:37 org.apache.catalina.core.StandardEngine startInternal 信息: Starting Servlet Engine: Apache Tomcat/7.0.40 2017-5-5 12:52:37 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory E:\beidou\apache-tomcat-7.0.40\webapps\ROOT 12:52:53.612 ERROR org.springframework.web.context.ContextLoader - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilter' defined in ServletContext resource [/WEB-INF/config/shiro-context.xml]: Cannot resolve reference to bean 'securityManager' while setting bean property 'securityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in ServletContext resource [/WEB-INF/config/shiro-context.xml]: Cannot resolve reference to bean 'authorizingRealm' while setting bean property 'realm'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authorizingRealm': Unsatisfied dependency expressed through method 'setUnifiedUserMng' parameter 0: Error creating bean with name 'unifiedUserMng': Unsatisfied dependency expressed through method 'setDao' parameter 0: Error creating bean with name 'unifiedUserDao': Unsatisfied dependency expressed through method 'setSessionFactory' parameter 0: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/config/application-context.xml]: Invocation of init method failed; nested exception is java.lang.OutOfMemoryError: unable to create new native thread; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/config/application-context.xml]: Invocation of init method failed; nested exception is java.lang.OutOfMemoryError: unable to create new native thread; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'unifiedUserDao': Unsatisfied dependency expressed through method 'setSessionFactory' parameter 0: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/config/application-context.xml]: Invocation of init method failed; nested exception is java.lang.OutOfMemoryError: unable to create new native thread; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/config/application-context.xml]: Invocation of init method failed; nested exception is java.lang.OutOfMemoryError: unable to create new native thread; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'unifiedUserMng': Unsatisfied dependency expressed through method 'setDao' parameter 0: Error creating bean with name 'unifiedUserDao': Unsatisfied dependency expressed through method 'setSessionFactory' parameter 0: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/config/application-context.xml]: Invocation of init method failed; nested exception is java.lang.OutOfMemoryError: unable to create new native thread; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/config/application-context.xml]: Invocation of init method failed; nested exception is java.lang.OutOfMemoryError: unable to create new native thread; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'unifiedUserDao': Unsatisfied dependency expressed through method 'setSessionFactory' parameter 0: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/config/application-context.xml]: Invocation of init method failed; nested exception is java.lang.OutOfMemoryError: unable to create new native thread; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/config/application-context.xml]: Invocation of init method failed; nested exception is java.lang.OutOfMemoryError: unable to create new native thread
java 实现串口通信 循环打开串口 内存一直在增加 最后溢出
我每20秒取一次串口列表,然后打开每一个串口,向串口里写数据,再把串口关闭掉。可是发现一个问题。内存一直在增长,最后溢出。报nUnsetOwner: Error 8 in MapViewOfFile Exception in thread "Thread-2" java.lang.OutOfMemoryError: unable to create new native thread 有谁遇到过这样的问题。
jenkins中S3-publisher插件出现安装完启动不了的问题。
在我安装完S3-publisher的时候,去启动它,日志中报错,报错如下: ``` Failed to load hudson.plugins.s3.Entry com.amazonaws.SdkClientException: Unable to load partition metadata from com/amazonaws/partitions/endpoints.json at com.amazonaws.partitions.PartitionsLoader.build(PartitionsLoader.java:82) at com.amazonaws.regions.RegionMetadataFactory.create(RegionMetadataFactory.java:30) at com.amazonaws.regions.RegionUtils.initialize(RegionUtils.java:65) at com.amazonaws.regions.RegionUtils.getRegionMetadata(RegionUtils.java:53) at com.amazonaws.regions.RegionUtils.getRegionsForService(RegionUtils.java:98) at hudson.plugins.s3.Entry.<clinit>(Entry.java:41) Caused: java.lang.ExceptionInInitializerError at sun.misc.Unsafe.ensureClassInitialized(Native Method) at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43) at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:156) at java.lang.reflect.Field.acquireFieldAccessor(Field.java:1088) at java.lang.reflect.Field.getFieldAccessor(Field.java:1069) at java.lang.reflect.Field.get(Field.java:393) at net.java.sezpoz.IndexItem.instance(IndexItem.java:185) Caused: java.lang.InstantiationException at net.java.sezpoz.IndexItem.instance(IndexItem.java:193) at hudson.ExtensionFinder$GuiceFinder.instantiate(ExtensionFinder.java:369) at hudson.ExtensionFinder$GuiceFinder.access$700(ExtensionFinder.java:240) at hudson.ExtensionFinder$GuiceFinder$SezpozModule$1.get(ExtensionFinder.java:557) at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81) at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53) at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:65) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115) at hudson.ExtensionFinder$GuiceFinder$SezpozModule.onProvision(ExtensionFinder.java:577) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:126) at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68) at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:63) at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45) at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103) at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145) at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:440) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41) at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092) at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012) at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:402) at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:393) at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:344) at hudson.ExtensionList.load(ExtensionList.java:381) at hudson.ExtensionList.ensureLoaded(ExtensionList.java:317) at hudson.ExtensionList.iterator(ExtensionList.java:172) at jenkins.model.Jenkins.getDescriptorByType(Jenkins.java:1599) at hudson.plugins.git.GitSCM.onLoaded(GitSCM.java:1870) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104) at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296) at jenkins.model.Jenkins$5.runTask(Jenkins.java:1142) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117) 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) Jan 08, 2020 3:21:05 AM WARNING hudson.ExtensionFinder$GuiceFinder instantiate Failed to load hudson.plugins.s3.S3BucketPublisher java.lang.NoClassDefFoundError: Could not initialize class hudson.plugins.s3.Entry at hudson.plugins.s3.S3BucketPublisher$DescriptorImpl.<init>(S3BucketPublisher.java:404) at hudson.plugins.s3.S3BucketPublisher$DescriptorImpl.<init>(S3BucketPublisher.java:409) at hudson.plugins.s3.S3BucketPublisher.<clinit>(S3BucketPublisher.java:41) at sun.misc.Unsafe.ensureClassInitialized(Native Method) at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43) at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:156) at java.lang.reflect.Field.acquireFieldAccessor(Field.java:1088) at java.lang.reflect.Field.getFieldAccessor(Field.java:1069) at java.lang.reflect.Field.get(Field.java:393) at net.java.sezpoz.IndexItem.instance(IndexItem.java:185) Caused: java.lang.InstantiationException at net.java.sezpoz.IndexItem.instance(IndexItem.java:193) at hudson.ExtensionFinder$GuiceFinder.instantiate(ExtensionFinder.java:369) at hudson.ExtensionFinder$GuiceFinder.access$700(ExtensionFinder.java:240) at hudson.ExtensionFinder$GuiceFinder$SezpozModule$1.get(ExtensionFinder.java:557) at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81) at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53) at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:65) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115) at hudson.ExtensionFinder$GuiceFinder$SezpozModule.onProvision(ExtensionFinder.java:577) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:126) at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68) at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:63) at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45) at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103) at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145) at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:440) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41) at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092) at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012) at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:402) at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:393) at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:344) at hudson.ExtensionList.load(ExtensionList.java:381) at hudson.ExtensionList.ensureLoaded(ExtensionList.java:317) at hudson.ExtensionList.iterator(ExtensionList.java:172) at jenkins.model.Jenkins.getDescriptorByType(Jenkins.java:1599) at hudson.plugins.git.GitSCM.onLoaded(GitSCM.java:1870) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104) at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296) at jenkins.model.Jenkins$5.runTask(Jenkins.java:1142) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117) 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) ``` 我不知道这是为什么,谁能帮帮我。
如何定位native内存泄露问题?
[b]环境:[/b]WinXP + SUN JDK 6.0 + RCP + AutoMan(Rational Functional Tester) [b]问题描述:[/b]   测试人员用AutoMan(测试部自主开发的一套Java自动化测试工具,封装IBM的RFT)对RCP应用程序进行GUI自动化测试. 运行一段时间后,程序出现异常:部分操作无法进行.异常日志如下: java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start0(Native Method) at java.lang.Thread.start(Unknown Source) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:387) at com.huawei.unistar.quoter.framework.guide.internal.GuideDialog.run(GuideDialog.java:585) at com.huawei.unistar.quoter.framework.guide.internal.GuidePage.needShowPage(GuidePage.java:99) at com.huawei.unistar.quoter.framework.guide.internal.Guide.getStartingPage(Guide.java:123) at org.eclipse.jface.wizard.WizardDialog.showStartingPage(WizardDialog.java:1173) 此时在任务管理器里面发现进程内存大小几乎达到1.3G [b]问题分析:[/b]   1,首先怀疑是JVM堆空间内存泄露.于是用jmap生成dump文件,使用MAT工具进行OOM分析,发现JVM堆空间使用情况良好(设置最大堆空间为512M,而程序出现问题时,堆空间也就使用了300M左右). 而且也没有发现内存泄露点.      2,然后怀疑是自动化工具引起的native内存泄露.因此特地手工重复测试一遍,结果显示:程序运行良好,jvm堆空间大小一直稳定在一个区间;而且用工具分析,也没有发现内存泄露.         根据上面两个步骤地分析,因此我们怀疑是自动化工具(或测试用例)引起的native内存泄露.苦于对AutoMan和RFT工具(无源码)的不了解,不好从java层面下手分析问题.   所以想逆过来分析:从native内存着手,找出内存泄露的原因!   烦请专家指点如何分析native内存?
[多线程]Java OutOfMemoryError
Java OutOfMemoryError unable to create new native thread 错误 不知道是不是线程创建太多的缘故: 我程序是这样写的 有一个ArrayBlockingQueue 一个操作是 读文件,往里面扔数据offer 还有个操作是 拉数据,poll 这两个操作 都是基于多线程的 我是通过线程池ThreadPoolExecutor来管理的 这样难道还会出现问题么? [b]问题补充:[/b] 启动参数 #!/bin/sh java -jar -Xms512m -Xmx1024m ApacheParser.jar [b]问题补充:[/b] ThreadPoolExecutor threadPool = new ThreadPoolExecutor(10, 20, 1, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(20), new ThreadPoolExecutor.DiscardOldestPolicy());
Unable to read HiveServer2 uri from ZooKeeper
Exception in thread "main" java.sql.SQLException: org.apache.hive.jdbc.ZooKeeperHiveClientException: Unable to read HiveServer2 uri from ZooKeeper at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:127) at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:247) at JDBCExample.main(JDBCExample.java:142) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140) Caused by: org.apache.hive.jdbc.ZooKeeperHiveClientException: Unable to read HiveServer2 uri from ZooKeeper at org.apache.hive.jdbc.ZooKeeperHiveClientHelper.getNextServerUriFromZooKeeper(ZooKeeperHiveClientHelper.java:109) at org.apache.hive.jdbc.Utils.resolveAuthorityUsingZooKeeper(Utils.java:492) at org.apache.hive.jdbc.Utils.resolveAuthority(Utils.java:464) at org.apache.hive.jdbc.Utils.parseURL(Utils.java:371) at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:125) ... 9 more Caused by: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hiveserver2 at org.apache.zookeeper.KeeperException.create(KeeperException.java:99) at org.apache.zookeeper.KeeperException.create(KeeperException.java:51) at org.apache.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:2231) at org.apache.curator.framework.imps.GetChildrenBuilderImpl$3.call(GetChildrenBuilderImpl.java:214) at org.apache.curator.framework.imps.GetChildrenBuilderImpl$3.call(GetChildrenBuilderImpl.java:203) at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:107) at org.apache.curator.framework.imps.GetChildrenBuilderImpl.pathInForeground(GetChildrenBuilderImpl.java:199) at org.apache.curator.framework.imps.GetChildrenBuilderImpl.forPath(GetChildrenBuilderImpl.java:191) at org.apache.curator.framework.imps.GetChildrenBuilderImpl.forPath(GetChildrenBuilderImpl.java:38) at org.apache.hive.jdbc.ZooKeeperHiveClientHelper.getNextServerUriFromZooKeeper(ZooKeeperHiveClientHelper.java:91) ... 13 more
不能够创建 JAXBContext
八月 05, 2015 4:50:22 下午 com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized 严重: WSSERVLET11: failed to parse runtime descriptor: javax.xml.ws.WebServiceException: Unable to create JAXBContext javax.xml.ws.WebServiceException: Unable to create JAXBContext at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:158) at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:87) at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:262) at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:322) at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:188) at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:467) at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:253) at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:147) at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:108) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5528) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) Caused by: java.security.PrivilegedActionException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions java.lang.StackTraceElement does not have a no-arg default constructor. this problem is related to the following location: at java.lang.StackTraceElement at public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace() at java.lang.Throwable at public java.lang.Throwable[] rxmz.dsr.common.service.jaxws.ExceptionBean.suppressed at rxmz.dsr.common.service.jaxws.ExceptionBean at java.security.AccessController.doPrivileged(Native Method) at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:148) ... 18 more Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions java.lang.StackTraceElement does not have a no-arg default constructor. this problem is related to the following location: at java.lang.StackTraceElement at public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace() at java.lang.Throwable at public java.lang.Throwable[] rxmz.dsr.common.service.jaxws.ExceptionBean.suppressed at rxmz.dsr.common.service.jaxws.ExceptionBean at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102) at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:438) at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:286) at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139) at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:105) at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:153) at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:149) ... 20 more 八月 05, 2015 4:50:22 下午 org.apache.catalina.core.StandardContext listenerStart 严重: Exception sending context initialized event to listener instance of class com.sun.xml.ws.transport.http.servlet.WSServletContextListener com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11: failed to parse runtime descriptor: javax.xml.ws.WebServiceException: Unable to create JAXBContext at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:118) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5528) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) Caused by: javax.xml.ws.WebServiceException: Unable to create JAXBContext at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:158) at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:87) at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:262) at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:322) at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:188) at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:467) at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:253) at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:147) at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:108) ... 10 more Caused by: java.security.PrivilegedActionException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions java.lang.StackTraceElement does not have a no-arg default constructor. this problem is related to the following location: at java.lang.StackTraceElement at public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace() at java.lang.Throwable at public java.lang.Throwable[] rxmz.dsr.common.service.jaxws.ExceptionBean.suppressed at rxmz.dsr.common.service.jaxws.ExceptionBean at java.security.AccessController.doPrivileged(Native Method) at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:148) ... 18 more Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions java.lang.StackTraceElement does not have a no-arg default constructor. this problem is related to the following location: at java.lang.StackTraceElement at public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace() at java.lang.Throwable at public java.lang.Throwable[] rxmz.dsr.common.service.jaxws.ExceptionBean.suppressed at rxmz.dsr.common.service.jaxws.ExceptionBean at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102) at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:438) at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:286) at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139) at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:105) at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:153) at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:149) ... 20 more 弄了一天求大神些帮我弄一下, 其他电脑都行,就我电脑不行。 tomcat7+jdk1.6,1.7都试过 就报这个错。。。
JVM内存溢出问题:freeMemory还很大,为什么出现了OOM?
我使用java编写的一个应用程序,用于产生数据插入到HBase数据库中,但是程序在运行一段时间后就会产生OOM异常: Exception in thread "main" java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start0(Native Method) at java.lang.Thread.start(Thread.java:640) at java.util.concurrent.ThreadPoolExecutor.addIfUnderCorePoolSize(ThreadPoolExecutor.java:703) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:652) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:92) at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.processBatch(HConnectionManager.java:1401) at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.processBatchOfPuts(HConnectionManager.java:1499) at org.apache.hadoop.hbase.client.HTable.flushCommits(HTable.java:859) at org.apache.hadoop.hbase.client.HTable.doPut(HTable.java:715) at org.apache.hadoop.hbase.client.HTable.put(HTable.java:693) at storm.monitor.hbase.BasicOperation.addRecord(BasicOperation.java:135) at storm.monitor.util.HBase_Operation.insertIntoHBase(HBase_Operation.java:75) at storm.monitor.util.Data_Generator.insertIntoHBase(Data_Generator.java:215) at storm.monitor.util.Data_Generator.run(Data_Generator.java:394) at storm.monitor.util.Data_Generator.init(Data_Generator.java:68) at storm.monitor.util.Data_Generator.<init>(Data_Generator.java:41) at storm.monitor.util.Main_Generator.main(Main_Generator.java:22) 可是我在类中获得Runtime,输出freeMemory,totalMemory如下free 505328288 total 528154624 max 1037959168 ,明显的可用内存还有很多,怎么会出现上述异常呢? 在我的类中,方法多是静态方法,不过全局变量很少使用,一般都是创建的临时变量,并且是方法结束前都设为null。并且只有一个LinkedList全局对象和几个多维数组。 在eclipse中设置了(x)arguments -Xms512m -Xmx1024m。 到底是什么原因导致了OOM呢,整个应用程序中并没有创建线程的地方。 求解惑!
关于ideal2019版本配置maven问题
![图片说明](https://img-ask.csdn.net/upload/201909/13/1568352987_566484.png) 今天配置idea时候,我是用的是idea2019版本以及maven3.6的版本,以前用的是老版本没有问题,但是我觉得这不是版本的问题存在,我在cmd里面输入命令mvn -v是没有任何问题的系统可以看见![图片说明](https://img-ask.csdn.net/upload/201909/13/1568353130_795335.png) 但是一创建maven项目以后就报这个错误,我真的很无助,昨晚已经搞了好久,今天又重新安装了一遍maven还是不行,能给各位大佬提供解决思路的唯有我的错误日志,![图片说明](https://img-ask.csdn.net/upload/201909/13/1568353190_197996.png) 而且我确定一定以及肯定是,我的maven的本地仓库配置以及ideal里面maven版本的地址没有一点的问题。 1) No implementation for org.apache.maven.model.path.PathTranslator was bound. while locating org.apache.maven.model.path.PathTranslator for field at org.apache.maven.model.interpolation.AbstractStringBasedModelInterpolator.pathTranslator(Unknown Source) at org.codehaus.plexus.DefaultPlexusContainer$1.configure(DefaultPlexusContainer.java:350) 2) No implementation for org.apache.maven.model.path.UrlNormalizer was bound. while locating org.apache.maven.model.path.UrlNormalizer for field at org.apache.maven.model.interpolation.AbstractStringBasedModelInterpolator.urlNormalizer(Unknown Source) at org.codehaus.plexus.DefaultPlexusContainer$1.configure(DefaultPlexusContainer.java:350) 2 errors java.lang.RuntimeException: com.google.inject.CreationException: Unable to create injector, see the following errors: 1) No implementation for org.apache.maven.model.path.PathTranslator was bound. while locating org.apache.maven.model.path.PathTranslator for field at org.apache.maven.model.interpolation.AbstractStringBasedModelInterpolator.pathTranslator(Unknown Source) at org.codehaus.plexus.DefaultPlexusContainer$1.configure(DefaultPlexusContainer.java:350) 2) No implementation for org.apache.maven.model.path.UrlNormalizer was bound. while locating org.apache.maven.model.path.UrlNormalizer for field at org.apache.maven.model.interpolation.AbstractStringBasedModelInterpolator.urlNormalizer(Unknown Source) at org.codehaus.plexus.DefaultPlexusContainer$1.configure(DefaultPlexusContainer.java:350) 2 errors at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:543) at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:159) at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:106) at com.google.inject.Guice.createInjector(Guice.java:87) at com.google.inject.Guice.createInjector(Guice.java:69) at com.google.inject.Guice.createInjector(Guice.java:59) at org.codehaus.plexus.DefaultPlexusContainer.addComponent(DefaultPlexusContainer.java:344) at org.codehaus.plexus.DefaultPlexusContainer.addComponent(DefaultPlexusContainer.java:332) at org.jetbrains.idea.maven.server.Maven3XServerEmbedder.customizeComponents(Maven3XServerEmbedder.java:573) at org.jetbrains.idea.maven.server.Maven3XServerEmbedder.customize(Maven3XServerEmbedder.java:542) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:359) at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200) at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196) at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:562) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:796) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:677) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) at java.rmi/sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:283) at java.rmi/sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:260) at java.rmi/sun.rmi.server.UnicastRef.invoke(UnicastRef.java:161) at java.rmi/java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:209) at java.rmi/java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:161) at com.sun.proxy.$Proxy135.customize(Unknown Source) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at com.intellij.execution.rmi.RemoteUtil.invokeRemote(RemoteUtil.java:175) at com.intellij.execution.rmi.RemoteUtil.access$200(RemoteUtil.java:38) at com.intellij.execution.rmi.RemoteUtil$1$1$1.compute(RemoteUtil.java:156) at com.intellij.openapi.util.ClassLoaderUtil.computeWithClassLoader(ClassLoaderUtil.java:45) at com.intellij.execution.rmi.RemoteUtil.executeWithClassLoader(RemoteUtil.java:227) at com.intellij.execution.rmi.RemoteUtil$1$1.invoke(RemoteUtil.java:153) at com.sun.proxy.$Proxy135.customize(Unknown Source) at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.doCustomize(MavenEmbedderWrapper.java:92) at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.lambda$customizeForResolve$1(MavenEmbedderWrapper.java:65) at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:76) at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.customizeForResolve(MavenEmbedderWrapper.java:64) at org.jetbrains.idea.maven.project.MavenProjectsTree.resolve(MavenProjectsTree.java:1261) at org.jetbrains.idea.maven.project.MavenProjectsProcessorResolvingTask.perform(MavenProjectsProcessorResolvingTask.java:45) at org.jetbrains.idea.maven.project.MavenProjectsProcessor.doProcessPendingTasks(MavenProjectsProcessor.java:140) at org.jetbrains.idea.maven.project.MavenProjectsProcessor.access$000(MavenProjectsProcessor.java:33) at org.jetbrains.idea.maven.project.MavenProjectsProcessor$2.run(MavenProjectsProcessor.java:114) at org.jetbrains.idea.maven.utils.MavenUtil.lambda$runInBackground$5(MavenUtil.java:468) at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:294) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) 这么说吧,如若帮我解决了这个问题,微信加我 我给你发个红包算是我的心意了,求求大佬们,好无助,解决了好久没
安卓开发JDBC连接数据库No static method metafactory错误怎么解决?
直接上代码 JdbcUtil类 ``` package com.example.myapplication; import java.io.File; import java.io.FileInputStream; import java.sql.Connection; import java.sql.DriverManager; import java.util.Properties; public class JdbcUtil { private static JdbcUtil instance; public static JdbcUtil getInstance(){ if (instance ==null){ instance = new JdbcUtil(); } return instance; } public Connection getConnection(String dbName,String name,String password) { try { new com.mysql.cj.jdbc.Driver(); String url = "jdbc:mysql://localhost:3306/"+dbName; return DriverManager.getConnection(url,name,password); } catch (Exception e) { return null; } } public Connection getConnection(String file){ File f = new File(file); if(!f.exists()){ return null; }else { Properties pro = new Properties(); try { Class.forName("com.mysql.jdbc.Driver"); pro.load(new FileInputStream(f)); String url = pro.getProperty("url"); String name = pro.getProperty("name"); String password = pro.getProperty("password"); return DriverManager.getConnection(url,name,password); }catch (Exception e){ return null; } } } } ``` UserDao类 ``` package com.example.myapplication; import android.util.Log; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import static android.content.ContentValues.TAG; public class UserDao { JdbcUtil jdbcUtil = JdbcUtil.getInstance(); //第一个参数为数据库名称,第二个参数为数据库账号 第三个参数为数据库密码 Connection conn = jdbcUtil.getConnection("test","root","LHMbdbqandr2015"); //注册 public boolean register(String name,String password){ if (conn==null){ Log.i(TAG,"register:conn is null"); return false; }else { //进行数据库操作 String sql = "insert into user(name,password) values(?,?)"; try { PreparedStatement pre = conn.prepareStatement(sql); pre.setString(1,name); pre.setString(2,password); return pre.execute(); } catch (SQLException e) { return false; }finally { try { conn.close(); } catch (SQLException e) { e.printStackTrace(); } } } } //登录 public boolean login(String name,String password){ if (conn==null){ Log.i(TAG,"register:conn is null"); return false; }else { String sql = "select * from user where name=? and password=?"; try { PreparedStatement pres = conn.prepareStatement(sql); pres.setString(1,name); pres.setString(2,password); ResultSet res = pres.executeQuery(); boolean t = res.next(); return t; } catch (SQLException e) { return false; } } } } ``` MainActivity文件 ``` package com.example.myapplication; import android.Manifest; import android.content.Intent; import android.content.pm.PackageManager; import android.os.Build; import android.os.Bundle; import android.os.Looper; import android.os.Trace; import android.util.Log; import android.view.View; import android.widget.EditText; import android.widget.Toast; import androidx.appcompat.app.AppCompatActivity; public class MainActivity extends AppCompatActivity { private static final String TAG="MainActivity"; private EditText name; private EditText password; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); name = findViewById(R.id.name); password = findViewById(R.id.password); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { if (checkSelfPermission(Manifest.permission.INTERNET) != PackageManager.PERMISSION_GRANTED) { // TODO: Consider calling // Activity#requestPermissions requestPermissions(new String[]{Manifest.permission.INTERNET},1); // here to request the missing permissions, and then overriding // public void onRequestPermissionsResult(int requestCode, String[] permissions, // int[] grantResults) // to handle the case where the user grants the permission. See the documentation // for Activity#requestPermissions for more details. return; } } } //用户根据点击事件来找到相应的功能 public void fun(View v){ switch (v.getId()){ case R.id.register: new Thread(new Runnable() { @Override public void run() { String n = name.getText().toString().trim(); String psw = password.getText().toString().trim(); UserDao ud = new UserDao(); boolean result =ud.register(n,psw); if (!result){ Looper.prepare(); Toast toast = Toast.makeText(MainActivity.this,"注册成功!",Toast.LENGTH_SHORT); toast.show(); Looper.loop(); } Log.i(TAG,"fun"+result); //以上为jdbc注册 } }).start(); break; case R.id.login: new Thread(new Runnable() { @Override public void run() { String n = name.getText().toString().trim(); String psw = password.getText().toString().trim(); if (n.equals("")||psw.equals("")){ Looper.prepare(); Toast toast = Toast.makeText(MainActivity.this,"输入不能为空!",Toast.LENGTH_SHORT); toast.show(); Looper.loop(); } UserDao ud = new UserDao(); Boolean result = ud.login(n,psw); if (!result){ Looper.prepare(); Toast toast=Toast.makeText(MainActivity.this,"用户名不存在或密码错误!",Toast.LENGTH_SHORT); toast.show(); Looper.loop(); }else{ Looper.prepare(); Toast toast=Toast.makeText(MainActivity.this,"登录成功",Toast.LENGTH_SHORT); toast.show(); //一下代码为跳转界面 // Intent intent=new Intent(MainActivity.this,info.class); //intent.putExtra("name",n); // startActivity(intent); Looper.loop(); } //以上为jdbc登录 } }).start(); } } } ``` 现在遇到的问题如下 ``` 11/14 01:40:49: Launching 'app' on Nexus 5X API 29 x86. $ adb shell am start -n "com.example.myapplication/com.example.myapplication.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Waiting for process to come online... Connected to process 23852 on device 'emulator-5554'. Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page. I/e.myapplicatio: Not late-enabling -Xcheck:jni (already on) E/e.myapplicatio: Unknown bits set in runtime_flags: 0x8000 W/e.myapplicatio: Unexpected CPU variant for X86 using defaults: x86 D/libEGL: Emulator has host GPU support, qemu.gles is set to 1. W/libc: Unable to set property "qemu.gles" to "1": connection failed; errno=13 (Permission denied) W/RenderThread: type=1400 audit(0.0:129): avc: denied { write } for name="property_service" dev="tmpfs" ino=8368 scontext=u:r:untrusted_app:s0:c130,c256,c512,c768 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0 app=com.example.myapplication D/libEGL: loaded /vendor/lib/egl/libEGL_emulation.so D/libEGL: loaded /vendor/lib/egl/libGLESv1_CM_emulation.so D/libEGL: loaded /vendor/lib/egl/libGLESv2_emulation.so W/e.myapplicatio: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed) Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed) D/: HostConnection::get() New Host Connection established 0xd7d24f50, tid 23910 D/: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_1 W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without... D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 0 0 D/EGL_emulation: eglCreateContext: 0xe3340b60: maj 3 min 1 rcv 4 D/EGL_emulation: eglMakeCurrent: 0xe3340b60: ver 3 1 (tinfo 0xe338bc10) E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da glUtilsParamSize: unknow param 0x000082da W/Gralloc3: mapper 3.x is not supported D/: createUnique: call D/: HostConnection::get() New Host Connection established 0xd7d26ad0, tid 23910 HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_1 D/eglCodecCommon: allocate: Ask for block of size 0x1000 D/eglCodecCommon: allocate: ioctl allocate returned offset 0x3ffff6000 size 0x2000 D/EGL_emulation: eglMakeCurrent: 0xe3340b60: ver 3 1 (tinfo 0xe338bc10) D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 0 0 I/AssistStructure: Flattened final assist data: 1788 bytes, containing 1 windows, 10 views W/e.myapplicatio: Accessing hidden method Ljava/lang/invoke/LambdaMetafactory;->metafactory(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; (blacklist, linking, denied) E/AndroidRuntime: FATAL EXCEPTION: Thread-2 Process: com.example.myapplication, PID: 23852 java.lang.NoSuchMethodError: No static method metafactory(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; in class Ljava/lang/invoke/LambdaMetafactory; or its super classes (declaration of 'java.lang.invoke.LambdaMetafactory' appears in /apex/com.android.runtime/javalib/core-oj.jar) at com.mysql.cj.conf.ConnectionUrl.buildConnectionStringCacheKey(ConnectionUrl.java:246) at com.mysql.cj.conf.ConnectionUrl.getConnectionUrlInstance(ConnectionUrl.java:185) at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:204) at java.sql.DriverManager.getConnection(DriverManager.java:580) at java.sql.DriverManager.getConnection(DriverManager.java:218) at com.example.myapplication.JdbcUtil.getConnection(JdbcUtil.java:22) at com.example.myapplication.UserDao.<init>(UserDao.java:15) at com.example.myapplication.MainActivity$1.run(MainActivity.java:53) at java.lang.Thread.run(Thread.java:919) D/EGL_emulation: eglMakeCurrent: 0xe3340b60: ver 3 1 (tinfo 0xe338bc10) D/AutofillManager: onActivityFinishing(): calling cancelLocked() Process 23852 terminated. ``` 在网上百度了很多方法都没有解决,起初以为是驱动的问题,但是换了一个仍然不好用,求求大神赐教
ssh整合的时候报的异常加载不了配置文件
整合ssh的时候出现的毛病,希望大神能够帮忙解决 严重: Exception starting filter struts2 Unable to load configuration. - package - file:/D:/jsp/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ssh/WEB-INF/classes/struts.xml:11:68 at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:502) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:502) at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422) at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3838) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4488) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:722) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:593) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: Unable to load configuration. - package - file:/D:/jsp/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ssh/WEB-INF/classes/struts.xml:11:68 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:446) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:490) ... 20 more Caused by: Unable to find interceptor class referenced by ref-name sshStack - package - file:/D:/jsp/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ssh/WEB-INF/classes/struts.xml:11:68 at com.opensymphony.xwork2.config.providers.InterceptorBuilder.constructInterceptorReference(InterceptorBuilder.java:63) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.buildFullActionConfig(DefaultConfiguration.java:413) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.buildRuntimeConfiguration(DefaultConfiguration.java:356) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.rebuildRuntimeConfiguration(DefaultConfiguration.java:190) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:264) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67) ... 22 more 五月 24, 2016 2:13:12 下午 org.apache.catalina.core.StandardContext start 严重: Error filterStart 五月 24, 2016 2:13:12 下午 org.apache.catalina.core.StandardContext start 严重: Context [/ssh] startup failed due to previous errors 五月 24, 2016 2:13:12 下午 org.apache.catalina.core.ApplicationContext log 信息: Closing Spring root WebApplicationContext 五月 24, 2016 2:13:12 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc 严重: A web application registered the JBDC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. 五月 24, 2016 2:13:12 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads 严重: A web application appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak. 五月 24, 2016 2:13:12 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads 严重: A web application appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0] but has failed to stop it. This is very likely to create a memory leak. 五月 24, 2016 2:13:12 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads 严重: A web application appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1] but has failed to stop it. This is very likely to create a memory leak. 五月 24, 2016 2:13:12 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads 严重: A web application appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2] but has failed to stop it. This is very likely to create a memory leak. 五月 24, 2016 2:13:12 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads 严重: A web application appears to have started a thread named [MySQL Statement Cancellation Timer] but has failed to stop it. This is very likely to create a memory leak. 五月 24, 2016 2:13:12 下午 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap 严重: A web application created a ThreadLocal with key of type [org.springframework.core.NamedThreadLocal] (value [Prototype beans currently in creation]) and a value of type [null] (value [null]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.
ssh框架整合,spring和hibernate整合时连接池报错
17:03:13,051 WARN XmlWebApplicationContext:546 - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [application.xml]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.connections.spi.ConnectionProvider] 17:03:13,066 ERROR ContextLoader:353 - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [application.xml]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.connections.spi.ConnectionProvider] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:753) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:446) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:328) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5141) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5664) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1017) 2019-8-15 17:03:13 org.apache.catalina.core.StandardContext startInternal at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:993) 严重: One or more listeners failed to start. Full details will be found in the appropriate container log file 2019-8-15 17:03:13 org.apache.catalina.core.StandardContext startInternal at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652) at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1899) 严重: Context [/Bysj_xml_war_exploded] startup failed due to previous errors at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761) at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:618) at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:565) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761) at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:431) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1426) at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1264) at java.security.AccessController.doPrivileged(Native Method) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1366) at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305) at sun.rmi.transport.Transport$1.run(Transport.java:159) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:155) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619) **Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.connections.spi.ConnectionProvider]** at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:244) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:208) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:189) at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.buildJdbcConnectionAccess(JdbcEnvironmentInitiator.java:145) at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:66) at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35) at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:88) at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:234) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:208) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:189) at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:51) at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:94) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:217) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:189) at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.handleTypes(MetadataBuildingProcess.java:352) at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:111) at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.build(MetadataBuildingProcess.java:83) at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:418) at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:87) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:692) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:724) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:793) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:715) at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:189) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574) ... 56 more Caused by: org.hibernate.HibernateException: Could not instantiate connection provider [org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider] at org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator.instantiateExplicitConnectionProvider(ConnectionProviderInitiator.java:194) at org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator.initiateService(ConnectionProviderInitiator.java:111) at org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator.initiateService(ConnectionProviderInitiator.java:41) at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:88) at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:234) ... 81 more Caused by: java.lang.ClassCastException: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider cannot be cast to org.hibernate.engine.jdbc.connections.spi.ConnectionProvider at org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator.instantiateExplicitConnectionProvider(ConnectionProviderInitiator.java:191) ... 85 more [2019-08-15 05:03:13,117] Artifact Bysj_xml:war exploded: Error during artifact deployment. See server log for details. 下面是jar包 ![图片说明](https://img-ask.csdn.net/upload/201908/15/1565859929_463251.jpg)![图片说明](https://img-ask.csdn.net/upload/201908/15/1565859944_159838.jpg) 下面是我的application.xml和jdbc.properties ![图片说明](https://img-ask.csdn.net/upload/201908/15/1565861001_733864.jpg)![图片说明](https://img-ask.csdn.net/upload/201908/15/1565861013_586414.jpg)
maven项目创建失败,有IDEA错误日志但还是找不到问题根源
``` 2019-10-08 10:51:50,509 [1021249] INFO - ide.actions.ShowFilePathAction - Exit code 1 2019-10-08 10:51:51,396 [1022136] INFO - mponents.impl.stores.StoreUtil - saveProjectsAndApp took 254 ms 2019-10-08 10:53:28,265 [1119005] INFO - mponents.impl.stores.StoreUtil - saveProjectsAndApp took 142 ms 2019-10-08 10:53:47,104 [1137844] WARN - .impl.LineStatusTrackerManager - Tracker for is being held on dispose by com.intellij.openapi.editor.impl.EditorImpl@5d5743a 2019-10-08 10:53:47,104 [1137844] WARN - .impl.LineStatusTrackerManager - Tracker for is being held on dispose by com.intellij.openapi.editor.impl.EditorImpl@40247cea 2019-10-08 10:53:47,712 [1138452] INFO - mponents.impl.stores.StoreUtil - saveProjectsAndApp took 103 ms 2019-10-08 10:53:49,229 [1139969] INFO - pl.projectlevelman.NewMappings - VCS Root: [svn] - [<Project>] 2019-10-08 10:53:49,396 [1140136] INFO - PerformancePlugin - Performance Plugin is in silent mode 2019-10-08 10:53:49,401 [1140141] INFO - odeStyleSettingsInferComponent - settings inference skipped: already done 2019-10-08 10:53:49,402 [1140142] INFO - .ScalaCompilerReferenceService - Initialized ScalaCompilerReferenceService in clinic_hospital, current compiler mode = JPS 2019-10-08 10:53:49,449 [1140189] INFO - ution.rmi.RemoteProcessSupport - Terminating: 63844/Maven36ServerImpl9b210999 2019-10-08 10:53:49,665 [1140405] INFO - ge.ExternalProjectsDataStorage - Load external projects data in 1 millis (read time: 0) 2019-10-08 10:53:49,691 [1140431] INFO - j.ide.ui.OptionsTopHitProvider - 42 ms spent to cache options in project 2019-10-08 10:53:49,725 [1140465] INFO - .diagnostic.PerformanceWatcher - Post-startup activities under progress took 167ms; general responsiveness: ok; EDT responsiveness: ok 2019-10-08 10:53:49,732 [1140472] INFO - .diagnostic.PerformanceWatcher - Pushing properties took 140ms; general responsiveness: ok; EDT responsiveness: ok 2019-10-08 10:53:49,768 [1140508] INFO - tartup.impl.StartupManagerImpl - D:/clinic_hospital/.idea case-sensitivity: expected=false actual=false 2019-10-08 10:53:49,877 [1140617] INFO - tor.impl.FileEditorManagerImpl - Project opening took 680 ms 2019-10-08 10:53:49,914 [1140654] INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 182ms; general responsiveness: ok; EDT responsiveness: ok 2019-10-08 10:53:49,934 [1140674] INFO - cloudConfig.CloudConfigManager - === StatusBar ignored === 2019-10-08 10:53:50,028 [1140768] INFO - Json.PackageJsonUpdateNotifier - processPackageJsonFiles [] 2019-10-08 10:53:50,289 [1141029] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: Build process started. Classpath: C:/Program Files/JetBrains/IntelliJ IDEA 2019.2.2/plugins/java/lib/jps-launcher.jar;C:/Program Files/Java/jdk1.8.0_221/lib/tools.jar 2019-10-08 10:53:50,372 [1141112] INFO - pl.projectlevelman.NewMappings - Mapped Roots: 1 2019-10-08 10:53:50,411 [1141151] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". 2019-10-08 10:53:50,411 [1141151] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: SLF4J: Defaulting to no-operation (NOP) logger implementation 2019-10-08 10:53:50,411 [1141151] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. 2019-10-08 10:53:51,086 [1141826] INFO - .ScalaCompilerReferenceService - [compiler indices] onCompilationStart. active indexing phases: 1 2019-10-08 10:53:52,381 [1143121] INFO - .ScalaCompilerReferenceService - [compiler indices] onCompilationFinish. success: true, active indexing phases: 0 2019-10-08 10:53:52,867 [1143607] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: Build process started. Classpath: C:/Program Files/JetBrains/IntelliJ IDEA 2019.2.2/plugins/java/lib/jps-launcher.jar;C:/Program Files/Java/jdk1.8.0_221/lib/tools.jar 2019-10-08 10:53:52,924 [1143664] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". 2019-10-08 10:53:52,924 [1143664] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: SLF4J: Defaulting to no-operation (NOP) logger implementation 2019-10-08 10:53:52,924 [1143664] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. 2019-10-08 10:53:54,965 [1145705] INFO - ings.impl.UpdateCheckerService - channel: release 2019-10-08 10:54:23,804 [1174544] ERROR - #org.jetbrains.idea.maven - com.google.inject.CreationException: Unable to create injector, see the following errors: 1) No implementation for org.apache.maven.model.path.PathTranslator was bound. while locating org.apache.maven.model.path.PathTranslator for field at org.apache.maven.model.interpolation.AbstractStringBasedModelInterpolator.pathTranslator(Unknown Source) at org.codehaus.plexus.DefaultPlexusContainer$1.configure(DefaultPlexusContainer.java:350) 2) No implementation for org.apache.maven.model.path.UrlNormalizer was bound. while locating org.apache.maven.model.path.UrlNormalizer for field at org.apache.maven.model.interpolation.AbstractStringBasedModelInterpolator.urlNormalizer(Unknown Source) at org.codehaus.plexus.DefaultPlexusContainer$1.configure(DefaultPlexusContainer.java:350) 2 errors java.lang.RuntimeException: com.google.inject.CreationException: Unable to create injector, see the following errors: 1) No implementation for org.apache.maven.model.path.PathTranslator was bound. while locating org.apache.maven.model.path.PathTranslator for field at org.apache.maven.model.interpolation.AbstractStringBasedModelInterpolator.pathTranslator(Unknown Source) at org.codehaus.plexus.DefaultPlexusContainer$1.configure(DefaultPlexusContainer.java:350) 2) No implementation for org.apache.maven.model.path.UrlNormalizer was bound. while locating org.apache.maven.model.path.UrlNormalizer for field at org.apache.maven.model.interpolation.AbstractStringBasedModelInterpolator.urlNormalizer(Unknown Source) at org.codehaus.plexus.DefaultPlexusContainer$1.configure(DefaultPlexusContainer.java:350) 2 errors at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:543) at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:159) at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:106) at com.google.inject.Guice.createInjector(Guice.java:87) at com.google.inject.Guice.createInjector(Guice.java:69) at com.google.inject.Guice.createInjector(Guice.java:59) at org.codehaus.plexus.DefaultPlexusContainer.addComponent(DefaultPlexusContainer.java:344) at org.codehaus.plexus.DefaultPlexusContainer.addComponent(DefaultPlexusContainer.java:332) at org.jetbrains.idea.maven.server.Maven3XServerEmbedder.customizeComponents(Maven3XServerEmbedder.java:573) at org.jetbrains.idea.maven.server.Maven3XServerEmbedder.customize(Maven3XServerEmbedder.java:542) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:359) at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200) at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196) at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:562) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:796) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:677) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) at java.rmi/sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:283) at java.rmi/sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:260) at java.rmi/sun.rmi.server.UnicastRef.invoke(UnicastRef.java:161) at java.rmi/java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:209) at java.rmi/java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:161) at com.sun.proxy.$Proxy185.customize(Unknown Source) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at com.intellij.execution.rmi.RemoteUtil.invokeRemote(RemoteUtil.java:175) at com.intellij.execution.rmi.RemoteUtil.access$200(RemoteUtil.java:38) at com.intellij.execution.rmi.RemoteUtil$1$1$1.compute(RemoteUtil.java:156) at com.intellij.openapi.util.ClassLoaderUtil.computeWithClassLoader(ClassLoaderUtil.java:45) at com.intellij.execution.rmi.RemoteUtil.executeWithClassLoader(RemoteUtil.java:227) at com.intellij.execution.rmi.RemoteUtil$1$1.invoke(RemoteUtil.java:153) at com.sun.proxy.$Proxy185.customize(Unknown Source) at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.doCustomize(MavenEmbedderWrapper.java:92) at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.onWrappeeCreated(MavenEmbedderWrapper.java:45) at org.jetbrains.idea.maven.server.RemoteObjectWrapper.getOrCreateWrappee(RemoteObjectWrapper.java:42) at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.doCustomize(MavenEmbedderWrapper.java:92) at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.lambda$customizeForResolve$1(MavenEmbedderWrapper.java:65) at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:76) at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.customizeForResolve(MavenEmbedderWrapper.java:64) at org.jetbrains.idea.maven.project.MavenProjectsTree.resolve(MavenProjectsTree.java:1261) at org.jetbrains.idea.maven.project.MavenProjectsProcessorResolvingTask.perform(MavenProjectsProcessorResolvingTask.java:45) at org.jetbrains.idea.maven.project.MavenProjectsProcessor.doProcessPendingTasks(MavenProjectsProcessor.java:140) at org.jetbrains.idea.maven.project.MavenProjectsProcessor.access$000(MavenProjectsProcessor.java:33) at org.jetbrains.idea.maven.project.MavenProjectsProcessor$2.run(MavenProjectsProcessor.java:114) at org.jetbrains.idea.maven.utils.MavenUtil.lambda$runInBackground$5(MavenUtil.java:468) at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:294) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) 2019-10-08 10:54:23,805 [1174545] ERROR - #org.jetbrains.idea.maven - IntelliJ IDEA 2019.2.2 Build #IU-192.6603.28 2019-10-08 10:54:23,805 [1174545] ERROR - #org.jetbrains.idea.maven - JDK: 11.0.3; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o 2019-10-08 10:54:23,805 [1174545] ERROR - #org.jetbrains.idea.maven - OS: Windows 8.1 2019-10-08 10:54:23,810 [1174550] ERROR - #org.jetbrains.idea.maven - Last Action: Maven.Reimport 2019-10-08 10:54:26,474 [1177214] INFO - ide.actions.ShowFilePathAction - Exit code 1 2019-10-08 10:54:27,591 [1178331] INFO - mponents.impl.stores.StoreUtil - saveProjectsAndApp took 301 ms ``` 这是从IDEA错误日志上显示的,求个大神帮我找到根源
微信小程序本地测试没问题,体验版没问题,审核时报错被驳回
## 问题描述: 之前给公司做了个小程序,上线之后没有问题,审核也通过了,近期有需求做了一些更改(改动不大),这是背景。 然后这次提交审核之后,被驳回了,原因是小程序无法正常使用,看了下审核反馈的截图,登录未成功,报错了。 我立马用体验版测试,因为体验版就是审核的代码,后台连接的服务器程序也是完全一致的,结果亮点来了,我体验版**完美运行** 后来又测试了本地版本,又用了各种方式测试了体验版本,都没有问题,再次提交审核,不出意外,又毙了。。 拉出审核人员登录时的后台日志: ``` ================================================================================================================================================================================================================================================ ==========================日志开始====================== ================================================================================================================================================================================================================================================ 开始计时:07:42:04.389 URI : /fleetif/fleet/loginFleet Controller : com.organ.controller.fleet.FleetLoginController Method : loginFleet Method Type : POST contentType : application/json Params : {"tel":"10001000","checkCode":"1234"} [DEBUG] 2019-12-09 19:42:04 AbstractMessageConverterMethodArgumentResolver.java DEBUG method:org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodArgumentResolver.readWithMessageConverters(AbstractMessageConverterMethodArgumentResolver.java:197) Read [class com.organ.entity.fleet.FleetUser] as "application/json;charset=UTF-8" with [org.springframework.http.converter.json.MappingJackson2HttpMessageConverter@47b74fce] [DEBUG] 2019-12-09 19:42:04 SqlSessionUtils.java DEBUG method:org.mybatis.spring.SqlSessionUtils.getSqlSession(SqlSessionUtils.java:109) Creating a new SqlSession [DEBUG] 2019-12-09 19:42:04 SqlSessionUtils.java DEBUG method:org.mybatis.spring.SqlSessionUtils.getSqlSession(SqlSessionUtils.java:145) SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@18c7d16e] was not registered for synchronization because synchronization is not active [DEBUG] 2019-12-09 19:42:04 DataSourceUtils.java DEBUG method:org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:110) Fetching JDBC Connection from DataSource [DEBUG] 2019-12-09 19:42:04 SpringManagedTransaction.java DEBUG method:org.mybatis.spring.transaction.SpringManagedTransaction.openConnection(SpringManagedTransaction.java:88) JDBC Connection [org.apache.commons.dbcp.PoolableConnection@22754112] will not be managed by Spring [DEBUG] 2019-12-09 19:42:04 BaseJdbcLogger.java DEBUG method:org.apache.ibatis.logging.jdbc.BaseJdbcLogger.debug(BaseJdbcLogger.java:139) ==> Preparing: SELECT id, user_name userName, tel, user_type userType, state, balance, balance_state balanceState, parent_id parentId, check_code checkCode, create_time createTime, is_del isDel, unit_price_0 unitPrice0, unit_price_10 unitPrice10 FROM `fleet_user` WHERE tel = ? AND is_del = ? [DEBUG] 2019-12-09 19:42:04 SQLErrorCodeSQLExceptionTranslator.java DEBUG method:org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:281) Unable to translate SQLException with Error code '0', will now try the fallback translator [DEBUG] 2019-12-09 19:42:04 SqlSessionUtils.java DEBUG method:org.mybatis.spring.SqlSessionUtils.closeSqlSession(SqlSessionUtils.java:173) Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@18c7d16e] [DEBUG] 2019-12-09 19:42:04 DataSourceUtils.java DEBUG method:org.springframework.jdbc.datasource.DataSourceUtils.doReleaseConnection(DataSourceUtils.java:329) Returning JDBC Connection to DataSource [DEBUG] 2019-12-09 19:42:04 DataSourceUtils.java DEBUG method:org.springframework.jdbc.datasource.DataSourceUtils.releaseConnection(DataSourceUtils.java:299) Could not close JDBC Connection java.sql.SQLException: Already closed. at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:114) at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:191) at org.springframework.jdbc.datasource.DataSourceUtils.doCloseConnection(DataSourceUtils.java:343) at org.springframework.jdbc.datasource.DataSourceUtils.doReleaseConnection(DataSourceUtils.java:330) at org.springframework.jdbc.datasource.DataSourceUtils.releaseConnection(DataSourceUtils.java:296) at org.mybatis.spring.transaction.SpringManagedTransaction.close(SpringManagedTransaction.java:125) at org.apache.ibatis.executor.BaseExecutor.close(BaseExecutor.java:83) at org.apache.ibatis.executor.CachingExecutor.close(CachingExecutor.java:61) at org.apache.ibatis.session.defaults.DefaultSqlSession.close(DefaultSqlSession.java:210) at org.mybatis.spring.SqlSessionUtils.closeSqlSession(SqlSessionUtils.java:175) at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:375) at com.sun.proxy.$Proxy51.selectOne(Unknown Source) at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:163) at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:68) at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52) at com.sun.proxy.$Proxy59.findFleetUser(Unknown Source) at com.organ.service.fleet.FleetUserService.findFleetUser(FleetUserService.java:39) at com.organ.service.fleet.FleetUserService$$FastClassBySpringCGLIB$$888fc21f.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:669) at com.organ.service.fleet.FleetUserService$$EnhancerBySpringCGLIB$$726af94b.findFleetUser(<generated>) at com.organ.controller.fleet.FleetLoginController.loginFleet(FleetLoginController.java:104) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) at javax.servlet.http.HttpServlet.service(HttpServlet.java:660) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at com.organ.filter.PostRequestFilter.doFilter(PostRequestFilter.java:35) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.logging.log4j.core.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:66) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:660) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:808) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) [DEBUG] 2019-12-09 19:42:04 AbstractMessageConverterMethodProcessor.java DEBUG method:org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:234) Written [com.organ.controller.base.ResultData@13c8038d] as "application/json" using [org.springframework.http.converter.json.MappingJackson2HttpMessageConverter@47b74fce] [DEBUG] 2019-12-09 19:42:04 LogInterceptor.java DEBUG method:com.organ.interceptor.LogInterceptor.postHandle(LogInterceptor.java:118) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- CostTime : 8ms --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [DEBUG] 2019-12-09 19:42:04 DispatcherServlet.java DEBUG method:org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1048) Null ModelAndView returned to DispatcherServlet with name 'springDispatcherServlet': assuming HandlerAdapter completed request handling [DEBUG] 2019-12-09 19:42:04 LogInterceptor.java DEBUG method:com.organ.interceptor.LogInterceptor.afterCompletion(LogInterceptor.java:142) 计时结束:07:42:04.397 耗时:8 URI:/fleetif/fleet/loginFleet [DEBUG] 2019-12-09 19:42:04 LogInterceptor.java DEBUG method:com.organ.interceptor.LogInterceptor.afterCompletion(LogInterceptor.java:149) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [DEBUG] 2019-12-09 19:42:04 FrameworkServlet.java DEBUG method:org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1000) Successfully completed request [DEBUG] 2019-12-09 19:42:33 PostRequestFilter.java DEBUG method:com.organ.filter.PostRequestFilter.doFilter(PostRequestFilter.java:27) ------------------------PostRequestFilter doFilter execute!!! [DEBUG] 2019-12-09 19:42:33 DispatcherServlet.java DEBUG method:org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:869) DispatcherServlet with name 'springDispatcherServlet' processing POST request for [/fleetif/fleet/smsCode] [DEBUG] 2019-12-09 19:42:33 AbstractHandlerMethodMapping.java DEBUG method:org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.getHandlerInternal(AbstractHandlerMethodMapping.java:310) Looking up handler method for path /fleet/smsCode [DEBUG] 2019-12-09 19:42:33 AbstractHandlerMethodMapping.java DEBUG method:org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.getHandlerInternal(AbstractHandlerMethodMapping.java:317) Returning handler method [public java.lang.Object com.organ.controller.fleet.FleetLoginController.smsCode(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)] [DEBUG] 2019-12-09 19:42:33 AbstractBeanFactory.java DEBUG method:org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:251) Returning cached instance of singleton bean 'fleetLoginController' [DEBUG] 2019-12-09 19:42:33 LogInterceptor.java DEBUG method:com.organ.interceptor.LogInterceptor.preHandle(LogInterceptor.java:90) ``` 可以看到数据库报了个错,但是这个错什么原因目前查不出来,而且我们无法复现,我们测试一切正常,只要审核人员登录就会报这个错误。 有没有大神指导一下,现在头都大了。。。
爬虫福利二 之 妹子图网MM批量下载
爬虫福利一:27报网MM批量下载    点击 看了本文,相信大家对爬虫一定会产生强烈的兴趣,激励自己去学习爬虫,在这里提前祝:大家学有所成! 目标网站:妹子图网 环境:Python3.x 相关第三方模块:requests、beautifulsoup4 Re:各位在测试时只需要将代码里的变量 path 指定为你当前系统要保存的路径,使用 python xxx.py 或IDE运行即可。
字节跳动视频编解码面经
三四月份投了字节跳动的实习(图形图像岗位),然后hr打电话过来问了一下会不会opengl,c++,shador,当时只会一点c++,其他两个都不会,也就直接被拒了。 七月初内推了字节跳动的提前批,因为内推没有具体的岗位,hr又打电话问要不要考虑一下图形图像岗,我说实习投过这个岗位不合适,不会opengl和shador,然后hr就说秋招更看重基础。我当时想着能进去就不错了,管他哪个岗呢,就同意了面试...
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它是一个过程,是一个不断累积、不断沉淀、不断总结、善于传达自己的个人见解以及乐于分享的过程。
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过
Python 基础(一):入门必备知识
目录1 标识符2 关键字3 引号4 编码5 输入输出6 缩进7 多行8 注释9 数据类型10 运算符10.1 常用运算符10.2 运算符优先级 1 标识符 标识符是编程时使用的名字,用于给变量、函数、语句块等命名,Python 中标识符由字母、数字、下划线组成,不能以数字开头,区分大小写。 以下划线开头的标识符有特殊含义,单下划线开头的标识符,如:_xxx ,表示不能直接访问的类属性,需通过类提供
兼职程序员一般可以从什么平台接私活?
这个问题我进行了系统性的总结,以下将进行言简意赅的说明和渠道提供,希望对各位小猿/小媛们有帮助~ 根据我们的经验,程序员兼职主要分为三种:兼职职位众包、项目整包和自由职业者驻场。 所谓的兼职职位众包,指的是需求方这边有自有工程师配合,只需要某个职位的工程师开发某个模块的项目。比如开发一个 app,后端接口有人开发,但是缺少 iOS 前端开发工程师,那么他们就会发布一个职位招聘前端,来配合公司一...
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。 1. for - else 什么?不是 if 和 else 才
数据库优化 - SQL优化
前面一篇文章从实例的角度进行数据库优化,通过配置一些参数让数据库性能达到最优。但是一些“不好”的SQL也会导致数据库查询变慢,影响业务流程。本文从SQL角度进行数据库优化,提升SQL运行效率。 判断问题SQL 判断SQL是否有问题时可以通过两个表象进行判断: 系统级别表象 CPU消耗严重 IO等待严重 页面响应时间过长
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 c/c++ 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7
写了很久,这是一份最适合/贴切普通大众/科班/非科班的『学习路线』
说实话,对于学习路线这种文章我一般是不写的,大家看我的文章也知道,我是很少写建议别人怎么样怎么样的文章,更多的是,写自己的真实经历,然后供大家去参考,这样子,我内心也比较踏实,也不怕误导他人。 但是,最近好多人问我学习路线,而且很多大一大二的,说自己很迷茫,看到我那篇 普普通通,我的三年大学 之后很受激励,觉得自己也能行,(是的,别太浪,你一定能行)希望我能给他个学习路线,说
经典算法(5)杨辉三角
写在前面: 我是 扬帆向海,这个昵称来源于我的名字以及女朋友的名字。我热爱技术、热爱开源、热爱编程。技术是开源的、知识是共享的。 这博客是对自己学习的一点点总结及记录,如果您对 Java、算法 感兴趣,可以关注我的动态,我们一起学习。 用知识改变命运,让我们的家人过上更好的生活。 目录一、杨辉三角的介绍二、杨辉三角的算法思想三、代码实现1.第一种写法2.第二种写法 一、杨辉三角的介绍 百度
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹
面试官:你连RESTful都不知道我怎么敢要你?
面试官:了解RESTful吗? 我:听说过。 面试官:那什么是RESTful? 我:就是用起来很规范,挺好的 面试官:是RESTful挺好的,还是自我感觉挺好的 我:都挺好的。 面试官:… 把门关上。 我:… 要干嘛?先关上再说。 面试官:我说出去把门关上。 我:what ?,夺门而去 文章目录01 前言02 RESTful的来源03 RESTful6大原则1. C-S架构2. 无状态3.统一的接
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看
SQL-小白最佳入门sql查询一
一 说明 如果是初学者,建议去网上寻找安装Mysql的文章安装,以及使用navicat连接数据库,以后的示例基本是使用mysql数据库管理系统; 二 准备前提 需要建立一张学生表,列分别是id,名称,年龄,学生信息;本示例中文章篇幅原因SQL注释略; 建表语句: CREATE TABLE `student` ( `id` int(11) NOT NULL AUTO_INCREMENT, `
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // dosho
致 Python 初学者
文章目录1. 前言2. 明确学习目标,不急于求成,不好高骛远3. 在开始学习 Python 之前,你需要做一些准备2.1 Python 的各种发行版2.2 安装 Python2.3 选择一款趁手的开发工具3. 习惯使用IDLE,这是学习python最好的方式4. 严格遵从编码规范5. 代码的运行、调试5. 模块管理5.1 同时安装了py2/py35.2 使用Anaconda,或者通过IDE来安装模
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,
程序员:我终于知道post和get的区别
IT界知名的程序员曾说:对于那些月薪三万以下,自称IT工程师的码农们,其实我们从来没有把他们归为我们IT工程师的队伍。他们虽然总是以IT工程师自居,但只是他们一厢情愿罢了。 此话一出,不知激起了多少(码农)程序员的愤怒,却又无可奈何,于是码农问程序员。 码农:你知道get和post请求到底有什么区别? 程序员:你看这篇就知道了。 码农:你月薪三万了? 程序员:嗯。 码农:你是怎么做到的? 程序员:
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1...
程序员把地府后台管理系统做出来了,还有3.0版本!12月7号最新消息:已在开发中有github地址
第一幕:缘起 听说阎王爷要做个生死簿后台管理系统,我们派去了一个程序员…… 996程序员做的梦: 第一场:团队招募 为了应对地府管理危机,阎王打算找“人”开发一套地府后台管理系统,于是就在地府总经办群中发了项目需求。 话说还是中国电信的信号好,地府都是满格,哈哈!!! 经常会有外行朋友问:看某网站做的不错,功能也简单,你帮忙做一下? 而这次,面对这样的需求,这个程序员
网易云6亿用户音乐推荐算法
网易云音乐是音乐爱好者的集聚地,云音乐推荐系统致力于通过 AI 算法的落地,实现用户千人千面的个性化推荐,为用户带来不一样的听歌体验。 本次分享重点介绍 AI 算法在音乐推荐中的应用实践,以及在算法落地过程中遇到的挑战和解决方案。 将从如下两个部分展开: AI 算法在音乐推荐中的应用 音乐场景下的 AI 思考 从 2013 年 4 月正式上线至今,网易云音乐平台持续提供着:乐屏社区、UGC
8年经验面试官详解 Java 面试秘诀
    作者 | 胡书敏 责编 | 刘静 出品 | CSDN(ID:CSDNnews) 本人目前在一家知名外企担任架构师,而且最近八年来,在多家外企和互联网公司担任Java技术面试官,前后累计面试了有两三百位候选人。在本文里,就将结合本人的面试经验,针对Java初学者、Java初级开发和Java开发,给出若干准备简历和准备面试的建议。   Java程序员准备和投递简历的实
面试官如何考察你的思维方式?
1.两种思维方式在求职面试中,经常会考察这种问题:北京有多少量特斯拉汽车? 某胡同口的煎饼摊一年能卖出多少个煎饼? 深圳有多少个产品经理? 一辆公交车里能装下多少个乒乓球? 一
碎片化的时代,如何学习
今天周末,和大家聊聊学习这件事情。 在如今这个社会,我们的时间被各类 APP 撕的粉碎。 刷知乎、刷微博、刷朋友圈; 看论坛、看博客、看公号; 等等形形色色的信息和知识获取方式一个都不错过。 貌似学了很多,但是却感觉没什么用。 要解决上面这些问题,首先要分清楚一点,什么是信息,什么是知识。 那什么是信息呢? 你一切听到的、看到的,都是信息,比如微博上的明星出轨、微信中的表情大战、抖音上的...
so easy! 10行代码写个"狗屁不通"文章生成器
前几天,GitHub 有个开源项目特别火,只要输入标题就可以生成一篇长长的文章。 背后实现代码一定很复杂吧,里面一定有很多高深莫测的机器学习等复杂算法 不过,当我看了源代码之后 这程序不到50行 尽管我有多年的Python经验,但我竟然一时也没有看懂 当然啦,原作者也说了,这个代码也是在无聊中诞生的,平时撸码是不写中文变量名的, 中文...
知乎高赞:中国有什么拿得出手的开源软件产品?(整理自本人原创回答)
知乎高赞:中国有什么拿得出手的开源软件产品? 在知乎上,有个问题问“中国有什么拿得出手的开源软件产品(在 GitHub 等社区受欢迎度较好的)?” 事实上,还不少呢~ 本人于2019.7.6进行了较为全面的回答,对这些受欢迎的 Github 开源项目分类整理如下: 分布式计算、云平台相关工具类 1.SkyWalking,作者吴晟、刘浩杨 等等 仓库地址: apache/skywalking 更...
相关热词 如何提升c#开发能力 矩阵乘法c# c#调用谷歌浏览器 c# 去空格去转义符 c#用户登录窗体代码 c# 流 c# linux 可视化 c# mvc 返回图片 c# 像素空间 c# 日期 最后一天
立即提问