Exception in thread "main" java.lang.Error

package com.dlhs;
class Person(){

public void setName(String name){
    this.name=name;
}
public void setAge(int age){
    this.age=age;
}
public return String getName(){
    return name;
}
public return  int getAge(){
    return age;
}

}

class Student extends Person()
{

public return String getSchool(){
return school;
}
public void setSchool(String school){
this.school =school;
}
}
public class Test{
public static void main(String args[]){
public String school;
public String name;
public int age;
Student student =new Student();
student.setName("john");
student.setAge(18);
student.setSchool("SCH");
System.out.println(student.getName());
System.out.println(student.getAge());
System.out.println(student.getSchool());}

}

3个回答

Unresolved compilation problem: 没有解决的编译问题

你的代码有语法错误,根本不能通过编译。

问题:
1、class Person后面不需要(),而且首字母要大写,对应的文件名也要大写
2、public return String getName() 这种方法不需要return,全部都要去掉。

在JAVA继承类函数中编译出现Exception in thread "main" java.lang.Error: Unresolved compilation problem:这个问题,一直解决不了,主要是自己太菜了,想不明白,只能请教大神了

zwd866102
zwd866102 回复当作看不见: 改好了,非常感谢
接近 4 年之前 回复
zwd866102
zwd866102 回复当作看不见: 恩恩,好的,多谢
接近 4 年之前 回复
qq_29594393
当作看不见 回复zwd866102: 无关,但是你不遵守规则会出错,把person() 这个类名改为person 就可以了,继承也记得改一下
接近 4 年之前 回复
zwd866102
zwd866102 回复当作看不见: 不符合命名规则?怎么改呢?是因为这个和继承有关吗,大神
接近 4 年之前 回复
qq_29594393
当作看不见 你把person()这个class名改为person
接近 4 年之前 回复

class person()这个类名不符合命名规则

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
java程序编译成功但运行不了(Exception in thread "main" java.lang.IllegalArgumentException

D:\work>javac JComboBoxDemo.java D:\work>java JComboBoxDemo Exception in thread "main" java.lang.IllegalArgumentException: adding container' s parent to itself at java.awt.Container.checkAddToSelf(Unknown Source) at java.awt.Container.addImpl(Unknown Source) at java.awt.Container.add(Unknown Source) at JComboBoxDemo.go(JComboBoxDemo.java:61) at JComboBoxDemo.main(JComboBoxDemo.java:12) D:\work> 以上是我的程序运行情况,如有你知道点什么,给我留言 附件是我的java程序

Exception in thread "main" java.lang.Error:报错

运行后一直报错? public class Demo { private static UxServer server; public static void testServer() throws IOException{ server = new UxServer().bind(new InetSocketAddress(8008)).listen(new UxSocketListener() { @Override public void onOpen(UxSocket socket) { System.out.println("on-socket-open:"+socket.address()); try { socket.sendData("https://www.biblegateway.com/passage/?search=Psalm+62%3A5-12&version=NLTCommon people are as worthless as a puff of wind,and the powerful are not what they appear to be.Don鈥檛 make your living by extortiondon鈥檛 make it the center of your life.God has spoken plainlyPower, O God, belongs to you".getBytes()); } catch (IOException e) { e.printStackTrace(); } } @Override public void onData(UxSocket socket, byte[] data) { System.out.println("on-socket-data:"+socket.address()+"->"+new String(data)); if(new String(data).startsWith("rp")){ try { socket.sendData(data); } catch (IOException e) { e.printStackTrace(); } } for(UxSocket s: server.clients()){ try { s.sendData(data); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } @Override public void onClose(UxSocket socket) { System.out.println("on-socket-close:"+socket.address()+ socket.closeInfo()); } }); System.out.println("server"); } public static void testClient() throws IOException{ UxSocket socket = new UxSocket(); socket.listen(new UxSocketListener() { @Override public void onOpen(UxSocket socket) { System.out.println("on-open"); try { socket.sendData("hi123456".getBytes()); socket.sendData("woabc".getBytes()); } catch (IOException e) { e.printStackTrace(); } } @Override public void onData(UxSocket socket, byte[] data) { System.out.println("on-data:"+new String(data)); } @Override public void onClose(UxSocket socket) { System.out.println("on-close-"+ socket.closeInfo()); } }) .connect(new InetSocketAddress("127.0.0.1",8008)); // .connect(new InetSocketAddress("s1.gz.1251014155.clb.myqcloud.com", 8008)); try { Thread.sleep(1000L); for(int i=0;i<1000;i++){ socket.sendData(("rp-msgat:"+i).getBytes()); Thread.sleep(10L); } Thread.sleep(300000L); System.exit(0); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } public static void main(String[] args) throws IOException { boolean serverAble = args.length==1 && args[0].equals("1"); if(args.length==0)serverAble=true; if(serverAble){ testServer(); }else{ testClient(); } } }![图片说明](https://img-ask.csdn.net/upload/201912/05/1575544159_188253.png)

Exception in thread "main" java.lang.NoClassDefFoundError,有导入对应jar包,但显示无法找到对应类?

**spring项目,main函数中调用ApplicationContext类** ``` import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; public class Main { public static void main(String[] args) { ApplicationContext context = new ClassPathXmlApplicationContext("Beans.xml"); TextEditor te = (TextEditor) context.getBean("textEditor"); te.spellCheck(); } } ``` **也有导入相应jar包** ![图片说明](https://img-ask.csdn.net/upload/201902/12/1549956155_70845.png) **但是运行后会提示** ![图片说明](https://img-ask.csdn.net/upload/201902/12/1549956248_826403.png) **且报错如下** ``` Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContext at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) at java.lang.Class.privateGetMethodRecursive(Class.java:3048) at java.lang.Class.getMethod0(Class.java:3018) at java.lang.Class.getMethod(Class.java:1784) at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526) Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContext at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 7 more ``` **请问应如何解决呢?**

运行hive出现的错误Exception in thread "main" java.lang.ClassNotFoundException: org.apache.hive.beeline.HiveSchemaTool

``` [root@bigdata113 bin]# ./schematool -dbType mysql -initSchema Exception in thread "main" java.lang.ClassNotFoundException: org.apache.hive.beeline.HiveSchemaTool at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at org.apache.hadoop.util.RunJar.run(RunJar.java:214) at org.apache.hadoop.util.RunJar.main(RunJar.java:136) ``` 求怎么jie'ju

Exception in thread "main" java.lang.

从svn上down下来的源码,在搭建本机环境的时候报错 ``` Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apdplat/word/analysis/TextSimilarity : Unsupported major.minor version 52.0 2 at java.lang.ClassLoader.defineClass1(Native Method) 3 at java.lang.ClassLoader.defineClass(Unknown Source) 4 at java.security.SecureClassLoader.defineClass(Unknown Source) 5 at java.net.URLClassLoader.defineClass(Unknown Source) 6 at java.net.URLClassLoader.access$100(Unknown Source) 7 at java.net.URLClassLoader$1.run(Unknown Source) 8 at java.net.URLClassLoader$1.run(Unknown Source) 9 at java.security.AccessController.doPrivileged(Native Method) 10 at java.net.URLClassLoader.findClass(Unknown Source) 11 at java.lang.ClassLoader.loadClass(Unknown Source) 12 at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) 13 at java.lang.ClassLoader.loadClass(Unknown Source) 14 at com.platform.config.run.JfinalConfig.afterJFinalStart(JfinalConfig.java:184) 15 at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:55) 16 at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:119) 17 at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) 18 at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:724) 19 at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265) 20 at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250) 21 at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:706) 22 at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492) 23 at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) 24 at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) 25 at org.eclipse.jetty.server.Server.doStart(Server.java:277) 26 at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) 27 at com.jfinal.server.JettyServer.doStart(JettyServer.java:135) 28 at com.jfinal.server.JettyServer.start(JettyServer.java:67) 29 at com.jfinal.core.JFinal.start(JFinal.java:154) 30 at com.platform.config.run.JfinalConfig.main(JfinalConfig.java:210) ``` 在各种网站上查阅了一下,说是用低版本的JDK编译高版本的.class就会报这个错,有以下两种易发生的情况: 1,命令行输入java -version和javac -version发现版本不一致,修改之; 2,版本一致则检查Path路径,一般安装oracle的机子配置jdk的时候会覆盖路径,修改之。 但是! 一,我没有装Oracle; Path路径为: d:\data\mblog\graphicsmagick-1.3.23-q8; C:\Windows\system32; C:\Windows; C:\Windows\System32\Wbem; C:\Windows\System32\WindowsPowerShell\v1.0\; D:\jdk1.7\bin; D:\jdk1.7\jre\bin; D:\mysqlinstallation\MySQL Utilities 1.3.6\; D:\maven\apache-maven-3.3.9\bin; 二,javac -version 下是java version “1.7.0_13” java -version下是 javac 1.7.0_13 所以,现在问题会出现在哪儿呢? 我使用的是eclipse,jfinal,maven

es 连接错误 Exception in thread "main" java.lang.NoSuchFieldError: INSTANCE

报错信息如下 ``` Exception in thread "main" java.lang.NoSuchFieldError: INSTANCE at org.apache.http.conn.ssl.SSLConnectionSocketFactory.<clinit>(SSLConnectionSocketFactory.java:146) at io.searchbox.client.config.HttpClientConfig$Builder.build(HttpClientConfig.java:285) ```

Exception in thread "Thread-12" java.lang.RuntimeException: java.lang.NullPointerException

第一次着手项目,springboot+mybatis,项目搭建是跟着教程做的。项目搭建好之后项目能正常运行,但是启动后报: Exception in thread "Thread-12" java.lang.RuntimeException: java.lang.NullPointerException at com.mysql.jdbc.JDBC4Connection$1$1.run(JDBC4Connection.java:106) Caused by: java.lang.NullPointerException at com.mysql.jdbc.ConnectionImpl.abortInternal(ConnectionImpl.java:1240) at com.mysql.jdbc.JDBC4Connection$1$1.run(JDBC4Connection.java:104) 启动Console: 2019-08-05 10:29:12.921 INFO 7416 --- [ restartedMain] com.xintujiuzhang.aimanagement.App : Starting App on DESKTOP-J57CTN6 with PID 7416 (D:\JAVA\eclipse\TaxHandwritingRecognition\target\classes started by Administrator in D:\JAVA\eclipse\TaxHandwritingRecognition) 2019-08-05 10:29:12.921 INFO 7416 --- [ restartedMain] com.xintujiuzhang.aimanagement.App : No active profile set, falling back to default profiles: default 2019-08-05 10:29:12.958 INFO 7416 --- [ restartedMain] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@6070b0bb: startup date [Mon Aug 05 10:29:12 CST 2019]; root of context hierarchy 2019-08-05 10:29:13.450 INFO 7416 --- [ restartedMain] o.s.b.f.xml.XmlBeanDefinitionReader : Loading XML bean definitions from class path resource [mybatis-config.xml] 2019-08-05 10:29:13.503 INFO 7416 --- [ restartedMain] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'sqlSessionFactory' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=app; factoryMethodName=sqlSessionFactoryBean; initMethodName=null; destroyMethodName=(inferred); defined in com.xintujiuzhang.aimanagement.App] with [Generic bean: class [org.mybatis.spring.SqlSessionFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [mybatis-config.xml]] 2019-08-05 10:29:13.599 WARN 7416 --- [ restartedMain] o.m.s.mapper.ClassPathMapperScanner : No MyBatis mapper was found in '[com.xintujiuzhang.aimanagement]' package. Please check your configuration. 2019-08-05 10:29:13.958 INFO 7416 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$b535b905] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2019-08-05 10:29:14.332 INFO 7416 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http) 2019-08-05 10:29:14.348 INFO 7416 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2019-08-05 10:29:14.349 INFO 7416 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.28 2019-08-05 10:29:14.355 INFO 7416 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : Loaded APR based Apache Tomcat Native library [1.2.21] using APR version [1.6.5]. 2019-08-05 10:29:14.355 INFO 7416 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. 2019-08-05 10:29:14.355 INFO 7416 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] 2019-08-05 10:29:14.357 INFO 7416 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : OpenSSL successfully initialized [OpenSSL 1.1.1a 20 Nov 2018] 2019-08-05 10:29:14.418 INFO 7416 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2019-08-05 10:29:14.418 INFO 7416 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1462 ms 2019-08-05 10:29:14.514 INFO 7416 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Servlet dispatcherServlet mapped to [/] 2019-08-05 10:29:14.517 INFO 7416 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*] 2019-08-05 10:29:14.517 INFO 7416 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*] 2019-08-05 10:29:14.517 INFO 7416 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*] 2019-08-05 10:29:14.517 INFO 7416 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*] 2019-08-05 10:29:14.631 INFO 7416 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... 2019-08-05 10:29:19.625 INFO 7416 --- [ restartedMain] com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Driver does not support get/set network timeout for connections. (com.mysql.jdbc.JDBC4Connection.getNetworkTimeout()I) 2019-08-05 10:29:19.629 INFO 7416 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. 2019-08-05 10:29:19.670 INFO 7416 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default' 2019-08-05 10:29:19.684 INFO 7416 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [ name: default ...] 2019-08-05 10:29:19.738 INFO 7416 --- [ restartedMain] org.hibernate.Version : HHH000412: Hibernate Core {5.2.10.Final} 2019-08-05 10:29:19.739 INFO 7416 --- [ restartedMain] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found 2019-08-05 10:29:19.770 INFO 7416 --- [ restartedMain] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.1.Final} 2019-08-05 10:29:19.874 INFO 7416 --- [ restartedMain] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect 2019-08-05 10:29:19.897 INFO 7416 --- [ restartedMain] o.h.e.j.e.i.LobCreatorBuilderImpl : HHH000423: Disabling contextual LOB creation as JDBC driver reported JDBC version [3] less than 4 2019-08-05 10:29:20.037 INFO 7416 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' 10:29:20,543 INFO App:32-org.springframework.orm.jpa.JpaTransactionManager 2019-08-05 10:29:20.796 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@6070b0bb: startup date [Mon Aug 05 10:29:12 CST 2019]; root of context hierarchy 2019-08-05 10:29:20.824 WARN 7416 --- [ restartedMain] aWebConfiguration$JpaWebMvcConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning 2019-08-05 10:29:20.846 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/application/handwriting_authorization],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.ApplicationAuthorizationController.joinHWA(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.847 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/application/handwriting_information],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.ApplicationInformationController.joinHWI(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.847 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/log/background_management_login],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.BackgroundManagementLoginController.joinHWI(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.847 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/log/computer_login],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.ComputerLoginController.jumpDEM(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.847 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/authority/department_management],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.DepartmentManagementController.jumpDEM(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.848 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/authority/dictionary_management],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.DictionaryManagementController.jumpDM(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.848 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/equipment/hardware_devices],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.EquipmentManagementController.jumpDM(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.848 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/queryGetServerStatusInterface],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.xintujiuzhang.aimanagement.controller.GetServerStatusInterfaceController.queryGetServerStatus(java.lang.String,java.lang.String) 2019-08-05 10:29:20.848 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/queryHandwritingInterface],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.xintujiuzhang.aimanagement.controller.HandwritingInterfaceController.queryHandwriting(java.lang.String,java.lang.String,java.lang.Integer,java.util.Date) 2019-08-05 10:29:20.849 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/identity/identity_management],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.IdentityManagementController.jumpDM(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.849 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/queryInstallationRequest],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.xintujiuzhang.aimanagement.controller.InstallationRequestInterfaceController.queryInstallationRequest(java.lang.String,java.lang.String,java.lang.String) 2019-08-05 10:29:20.849 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/queryLicenseInterface],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.xintujiuzhang.aimanagement.controller.LicenseInterfaceController.queryLicense(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.util.Date) 2019-08-05 10:29:20.851 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.MainController.main(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.851 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/login],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView com.xintujiuzhang.aimanagement.controller.MainController.login() 2019-08-05 10:29:20.851 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/login],methods=[POST]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.MainController.login(java.lang.String,java.lang.String,java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.851 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/main],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.MainController.jumpmain(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.852 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/authority/menu_management],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.MenuManagementController.jumpMM(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.852 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/log/module_browsing],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.ModuleBrowsingController.jumpTM(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.852 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/log/module_operation],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.ModuleOperationController.jumpMM(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.852 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/deletehandwriting],methods=[POST]}" onto public void com.xintujiuzhang.aimanagement.controller.NotesController.deletehandwriting(java.lang.String) 2019-08-05 10:29:20.852 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/updatehandwriting],methods=[POST]}" onto public void com.xintujiuzhang.aimanagement.controller.NotesController.updatehandwriting(com.xintujiuzhang.aimanagement.pojo.Handwriting) 2019-08-05 10:29:20.852 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/addhandwriting],methods=[POST]}" onto public void com.xintujiuzhang.aimanagement.controller.NotesController.addhandwriting(com.xintujiuzhang.aimanagement.pojo.Handwriting) 2019-08-05 10:29:20.853 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/querynotes],methods=[GET]}" onto public com.xintujiuzhang.aimanagement.pojo.Handwriting com.xintujiuzhang.aimanagement.controller.NotesController.querynotes(java.lang.String) 2019-08-05 10:29:20.853 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/authority/parameter_settings],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.parameterSettingsController.jumpPS(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.853 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/authority/role_authorization],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.RoleAuthorizationController.jumpRA(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.853 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/log/service_call],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.ServiceCallController.jumpRA(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.853 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/authority/task_management],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.TaskManagementController.jumpTM(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.854 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/authority/user_management]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.UserController.jnmpUM(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.854 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/queryUserInterface],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.xintujiuzhang.aimanagement.controller.UserInterfaceController.queryLicense(java.lang.String,java.lang.String,java.lang.Integer,java.util.Date) 2019-08-05 10:29:20.854 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/queryVersionCheckingInterface],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.xintujiuzhang.aimanagement.controller.VersionCheckingInterfaceController.queryVersionChecking(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.Integer,java.util.Date) 2019-08-05 10:29:20.854 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/queryVersionupdateInterface],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.xintujiuzhang.aimanagement.controller.VersionUpdateInterfaceController.queryVersionupdate(java.lang.String,java.lang.String,java.lang.String,java.util.Date) 2019-08-05 10:29:20.857 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest) 2019-08-05 10:29:20.857 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) 2019-08-05 10:29:20.881 INFO 7416 --- [ restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2019-08-05 10:29:20.881 INFO 7416 --- [ restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2019-08-05 10:29:20.906 INFO 7416 --- [ restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2019-08-05 10:29:21.115 INFO 7416 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729 2019-08-05 10:29:21.164 INFO 7416 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup 2019-08-05 10:29:21.165 INFO 7416 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'dataSource' has been autodetected for JMX exposure 2019-08-05 10:29:21.170 INFO 7416 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Located MBean 'dataSource': registering with JMX server as MBean [com.zaxxer.hikari:name=dataSource,type=HikariDataSource] 2019-08-05 10:29:21.196 INFO 7416 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path '' 2019-08-05 10:29:21.198 INFO 7416 --- [ restartedMain] com.xintujiuzhang.aimanagement.App : Started App in 8.458 seconds (JVM running for 8.828) Exception in thread "Thread-12" java.lang.RuntimeException: java.lang.NullPointerException at com.mysql.jdbc.JDBC4Connection$1$1.run(JDBC4Connection.java:106) Caused by: java.lang.NullPointerException at com.mysql.jdbc.ConnectionImpl.abortInternal(ConnectionImpl.java:1240) at com.mysql.jdbc.JDBC4Connection$1$1.run(JDBC4Connection.java:104) **在执行一些方法后“Thread-12”会不断增加** **ps:“Thread-668"**

List操作错误Exception in thread "main" java.lang.IllegalStateException

Iterator<Teacher> iter = teacherList.iterator(); while(iter.hasNext()){ Teacher teacher =iter.next(); //①查找老师的最大上限值,如果该老师已经达到上限了,则将该老师从List中拿出,不予安排 if(teacher.getMaxnum()<=teacher.getRealnum()){ iter.remove(); teacherList.remove(teacher); } //②找到该考试的时间点,如果该考试桶中存在与该老师的ID则将该老师摘除,不予考虑. if(examBarrelDao.isRelated(exam,teacher)){ iter.remove(); teacherList.remove(teacher); } } //③按照监考上限减去监考下限差额最大的顺序排列,取该老师序列的第一个为最优老师。 for(int i=0;i<teacherList.size()-1;i++){ for (int j=i+1;j<teacherList.size();j++){ Teacher teacher = new Teacher(); if(teacherList.get(i).getMaxnum()-teacherList.get(i).getRealnum() <teacherList.get(j).getMaxnum()-teacherList.get(j).getRealnum()){ teacher =teacherList.get(i); teacherList.set(i, teacherList.get(j)); teacherList.set(j, teacher); } } 我将得到的List判断以后,remove了其中的不符合条件的teacher,然后将List中剩余的teacher重新按照大小进行了一次排序,但是有时报 Exception in thread "main" java.lang.IllegalStateException at java.util.AbstractList$Itr.remove(Unknown Source) at com.sdjzglxy.jwMis.help.ConditionalJudge.listTeacher(ConditionalJudge.java:229) at com.sdjzglxy.jwMis.help.ConditionalJudge.teacherChoiceForSecond(ConditionalJudge.java:162) at com.sdjzglxy.jwMis.action.ArrayExam.arraySecondTeacher(ArrayExam.java:132) at com.sdjzglxy.jwMis.action.ArrayExam.main(ArrayExam.java:159) 有时对有时错,我想问一下,该如何解决这个问题……

Java中遇到的一个异常Exception in thread "main" java.lang.NullPointerException

import java.util.*; public class NewHashTest { public static void main(String[] args) { HashMap hash = new HashMap(); Emp emp1 = new Emp("laoda","111",123f); Emp emp2 = new Emp("laoer","222",234f); Emp emp3 = new Emp("laosan","333",5466f); hash.put(111,emp1); hash.put(222,emp2); hash.put(333,emp3); if(hash.containsKey(111)) { Emp em = (Emp)hash.get(111); em.info();//可以正常显示 } Iterator iter = hash.keySet().iterator(); while(iter.hasNext()) { String key = iter.next().toString(); Emp ems = (Emp)hash.get(key); ems.info();//这里会报错 } } } class Emp { String name; String number; float slary; public void info() { System.out.println("名字叫:"+name); System.out.println("编号为:"+number); System.out.println("薪水是:"+slary); } public Emp(String name,String number,float slary) { this.name = name; this.number = number; this.slary = slary; } } 会在ems.info();一行报一个Exception in thread "main" java.lang.NullPointerException的错误,是不是传入的KEY类型有问题,还是什么别的问题,求指点。

求助:用Java编写存取款程序,报错 $Exception in thread "main" 和java.lang.IllegalStateException: Scanner closed

package piggybank; import java.util.Scanner; public class piggybank { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Welcome to the Piggy Bank. Please enter starting balance: "); double startingBalance = input.nextDouble(); System.out.println("Piggy Bank ATM"); System.out.printf("Balance : %6.2f", startingBalance); System.out.println(); while (true){ System.out.println(); System.out.println("OPTIONS"); System.out.println(); System.out.println("1.Deposit\n"+"2.Withdraw\n"+"3.Quit\n"); System.out.println(); System.out.println("Choose one:"); int option = input.nextInt(); switch (option) { case 1: System.out.println("Enter deposit amount:\n" + "Piggy Bank ATM"); double deposit = input.nextDouble(); double depositBalance= startingBalance + deposit; System.out.printf(" Balance: $%6.2f ",depositBalance); System.out.println(); break; case 2: System.out.println("Enter withdrawal amount:\n" + "Piggy Bank ATM"); double withdraw = input.nextDouble(); double withdrawBalance= startingBalance - withdraw; System.out.printf("Balance:$%8.2f ",withdrawBalance); System.out.println(); break; case 3: System.out.printf("Ending Balance: $%8.2f ", startingBalance); break; } input.close(); } } } 我想要反复执行存取款程序,但是就会显示出错 ![图片说明](https://img-ask.csdn.net/upload/201909/28/1569658326_406248.png) 求帮忙! 想要得到以下运行结果 ![图片说明](https://img-ask.csdn.net/upload/201909/28/1569658512_523449.png) 我的运行结果是这样的,没有办法进行第二次输入 ![图片说明](https://img-ask.csdn.net/upload/201909/28/1569658741_470527.png) 呜呜呜,初学什么都不会,求助

Exception in thread "main" java.lang.NoClassDefFoundError:

<div class="iteye-blog-content-contain" style="font-size: 14px;"> <pre name="code" class="xml">&lt;?xml version='1.0' encoding='UTF-8'?&gt; &lt;!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"&gt; &lt;!-- Generated by MyEclipse Hibernate Tools. --&gt; &lt;hibernate-configuration&gt; &lt;session-factory&gt; &lt;property name="hbm2ddl.auto"&gt;update&lt;/property&gt; &lt;property name="dialect"&gt;org.hibernate.dialect.MySQLDialect&lt;/property&gt; &lt;property name="connection.url"&gt;jdbc:mysql://localhost:3306/xuyang&lt;/property&gt; &lt;property name="connection.username"&gt;root&lt;/property&gt; &lt;property name="connection.password"&gt;789&lt;/property&gt; &lt;property name="connection.driver_class"&gt;com.mysql.jdbc.Driver&lt;/property&gt; &lt;property name="myeclipse.connection.profile"&gt;mysql&lt;/property&gt; &lt;mapping class="com.xuyang.Demo.Student"/&gt; &lt;/session-factory&gt; &lt;/hibernate-configuration&gt;</pre> <p> </p> <pre name="code" class="java">package com.xuyang.Demo; import javax.persistence.Entity; import javax.persistence.Id; @Entity public class Student { private int id; private String name; private int age; @Id public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } } </pre> <p> </p> <pre name="code" class="java">package com.xuyang.Demo; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.cfg.AnnotationConfiguration; import org.hibernate.cfg.Configuration; public class Just_test { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Student st=new Student(); st.setId(1); st.setName("yang"); st.setAge(20); Configuration cfg = new Configuration(); //读取配置hibernate文件 SessionFactory sf = cfg.configure().buildSessionFactory(); Session sess = sf.openSession(); sess.save(st); //保存对象 sess.getTransaction().commit(); sess.close(); sess.close(); } }</pre> <p>    自学hibernate  的时候遇见的问题我用的hibernate是4.2版本  运行时出现error:Exception in thread "main" java.lang.NoClassDefFoundError: javax/persistence/Cacheable</p> </div>

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

我的代码如下: JTabbedDemo.java import javax.swing.*; import java.awt.*; public class JTabbedDemo { public static void main(String[] args) throws Exception { //显示外观风格 UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); JFrame jframe=new JFrame("奖金状况"); jframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); jframe.setVisible(true); JTabbedPane tp=new JTabbedPane();//创建一个选项卡容器,将之添加到顶层容器内 jframe.setContentPane(tp); JPanel panel1=new JPanel(); JPanel panel2=new JPanel(); JPanel panel3=new JPanel(); JPanel panel4=new JPanel(); JPanel panel5=new JPanel(); //添加选项卡容器,并且设置其中每个选项卡的标签以及其是否可启用。 tp.addTab("panel1",panel1); tp.setEnabledAt(0,true); tp.setTitleAt(0,"个人收入状况"); tp.addTab("panel2",panel2); tp.setEnabledAt(1,true); tp.setTitleAt(1,"工资"); tp.addTab("panel2",panel3); tp.setEnabledAt(2,true); tp.setTitleAt(2,"奖金"); tp.addTab("panel3",panel4); tp.setEnabledAt(3,true); tp.setTitleAt(3,"津贴"); tp.addTab("panel4",panel5); tp.setEnabledAt(4,true); tp.setTitleAt(4,"社保"); //设置其大小以及其选项卡的位置方向 tp.setPreferredSize(new Dimension(800,600)); tp.setTabPlacement(JTabbedPane.TOP); //设置选项卡在容器内的显示形式 tp.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT); jframe.pack(); //创建8个标签组件,将5个中间窗口设置为流布局,并且将标签组件分别放入到其中 JLabel l1=new JLabel("工资状况"); JLabel l2=new JLabel("3000元/月"); JLabel l3=new JLabel("奖金状况"); JLabel l4=new JLabel("1500元/月"); JLabel l5=new JLabel("津贴状况"); JLabel l6=new JLabel("500元/月"); JLabel l7=new JLabel("社保状况"); JLabel l8=new JLabel("200元/月"); panel2.setLayout(new FlowLayout()); panel3.setLayout(new FlowLayout()); panel4.setLayout(new FlowLayout()); panel5.setLayout(new FlowLayout()); panel2.add(l1); panel2.add(l2); panel3.add(l3); panel3.add(l4); panel4.add(l5); panel4.add(l6); panel5.add(l7); panel5.add(l8); jframe.pack(); } } 错误信息如下: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at javax.swing.plaf.basic.BasicTabbedPaneUI.calculateTabWidth(Unknown So urce) at javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout.calculateTa bRects(Unknown Source) at javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout.calculateLa youtInfo(Unknown Source) at javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout.layoutConta iner(Unknown Source) at java.awt.Container.layout(Unknown Source) at java.awt.Container.doLayout(Unknown Source) at java.awt.Container.validateTree(Unknown Source) at java.awt.Container.validateTree(Unknown Source) at java.awt.Container.validateTree(Unknown Source) at java.awt.Container.validate(Unknown Source) at javax.swing.RepaintManager.validateInvalidComponents(Unknown Source) at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$000(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$1.doIntersectionPrivilege(Unknown Sour ce) 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)

Exception in thread "main"

Exception in thread "main" java.lang.NullPointerException 老是出现这个错误,是为什么呢

打jar包异常Exception in thread "main"

Exception in thread "main" java.lang.NoClassDefFoundError: orgontext/ApplicationContexton/springframework/ctext/ApplicationContext![![图片说明](https://img-ask.csdn.net/upload/201708/24/1503544035_992364.png)图片说明](https://img-ask.csdn.net/upload/201708/24/1503544028_996471.jpg)

MongoDB 报错 Exception in thread "main" org.bson.BsonInvalidOperationException: Document does not contain key avgObjSize

出问题的代码段: val simMovieMatrix = spark.read .option("uri", mongoConfig.uri) .option("collection", MONGODB_MOVIE_RECS_COLLECTION) .format("com.mongodb.spark.sql") .load() .as[MovieRecs] .rdd .map{ movieRecs => // 为了查询相似度方便,转换成map (movieRecs.mid, movieRecs.recs.map( x=> (x.mid, x.score) ).toMap ) }.collectAsMap()

java报错java.lang.IndexOutOfBoundsException

![图片说明](https://img-ask.csdn.net/upload/201606/04/1465016132_558449.png) ![图片说明](https://img-ask.csdn.net/upload/201606/04/1465016148_409766.png) ![图片说明](https://img-ask.csdn.net/upload/201606/04/1465016141_240819.png) ![图片说明](https://img-ask.csdn.net/upload/201606/04/1465016206_139184.png) Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at RobotInterface.joke(RobotInterface.java:295) at RobotGUI.main(RobotGUI.java:47) 在mac上跑的时候没有报错,在win上跑的时候就有这样的错误了,然后发现同样的语句在我另一个相似的函数里也有但是没有这样的报错,求谈里大神给分析分析,我baidu的情况来看好像是数组超界了?

weblogic启动报错java.lang.NoClassDefFoundError: weblogic/security/SecurityLogger

Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/security/SecurityLogger at weblogic.security.utils.SecurityUtils.turnOffCryptoJDefaultJCEVerification(SecurityUtils.java:81) at weblogic.Server.main(Server.java:67) Caused by: java.lang.ClassNotFoundException: weblogic.security.SecurityLogger at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(Class Loader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) ... 2 more

关于定时器Exception in thread "Timer-1"

做了个timer定时器,在执行修改方法时报错,关于定时器Exception in thread "Timer-1" java.lang.NullPointerException,不知为何,新手捉急![图片说明](https://img-ask.csdn.net/upload/201512/08/1449563247_96479.png)调用的方法:![图片说明](https://img-ask.csdn.net/upload/201512/08/1449563392_472919.png)部分代码![图片说明](https://img-ask.csdn.net/upload/201512/08/1449563758_216210.png)![图片说明](https://img-ask.csdn.net/upload/201512/08/1449563823_799293.png),在出错后,会进入Timer.class中![图片说明](https://img-ask.csdn.net/upload/201512/08/1449564017_426977.png)诸位大神救我。。

JAVA报错:Exception in thread "main"……求帮助?

题目要求: (1)创建MaxArray类:  声明1个一维数组的成员变量,例如:int array[ ]; //一维数组  设置有参构造方法,如:MaxArray(int n){ …… } //有参构造方法,为成员变量创建长为n的一维数组  设置无参构造方法:通过键盘输入数组长度n,然后为成员变量创建长度为n的数组。  设置修改数组元素值的成员方法:int setArray(){ …//输入数组各元素的值 }  设置查找并返回数组最大值的成员方法:int findMax( ){……}  设置输出数组所有元素的成员方法:void output( ){……} (2)创建主类CreateArray:生成MaxArray类对象,并调用相关成员方法求数组最大值,并输出。 代码块 ``` import java.util.*; class MaxArray{ int len; int array[]; //有参构造方法 MaxArray(int n){ len=n; int array[]=new int[len]; } //无参构造方法 MaxArray(){ Scanner num=new Scanner(System.in); len=num.nextInt(); int array[]=new int[len]; } //修改数组元素值的成员方法 void setArray(){ Scanner num=new Scanner(System.in); for(int i=0;i<len;i++){ array[i]=num.nextInt(); } } //查找并返回数组最大值的成员方法 int findMax(){ int max=array[0]; for(int i=0;i<len;i++){ if(array[0]<array[i]){ max=array[i]; } } return max; } //输出数组所有元素的成员方法 void output(){ for(int i=0;i<len;i++){ System.out.printf("\t"+array[i]); if(len%5==0){ System.out.println(); } } } } public class CreateArray { public static void main(String[] args) { // TODO Auto-generated method stub int max; //生成MaxArray类对象 MaxArray arr=new MaxArray(); arr.setArray(); arr.output(); max=arr.findMax(); System.out.println("the Max is:"+max); } } ``` 无论是调用有参构造方法还是无参构造方法都是这样报错: ![图片说明](https://img-ask.csdn.net/upload/201706/25/1498360766_353049.png) ![图片说明](https://img-ask.csdn.net/upload/201706/25/1498360776_677745.png) ![图片说明](https://img-ask.csdn.net/upload/201706/25/1498360787_689460.png) ![图片说明](https://img-ask.csdn.net/upload/201706/25/1498360800_738783.png) 请问是哪里出了问题

Python可以这样学(第一季:Python内功修炼)

董付国系列教材《Python程序设计基础》、《Python程序设计(第2版)》、《Python可以这样学》配套视频,讲解Python 3.5.x和3.6.x语法、内置对象用法、选择与循环以及函数设计与使用、lambda表达式用法、字符串与正则表达式应用、面向对象编程、文本文件与二进制文件操作、目录操作与系统运维、异常处理结构。

获取Linux下Ftp目录树并逐步绑定到treeview

在linux下抓取目录树,双击后获取该节点子节点(逐步生成)。另外有两个类,一个是windows下的(一次性获取目录树),一个是linux下的(足部获取目录树)

NS网络模拟和协议仿真源代码

NS网络模拟和协议仿真源代码,包含代码说明及协议分析

简单的NS3网络模拟仿真(计算机网络作业)

简单的NS3网络模拟仿真,内附有PPT演示。论文评述。以及简单的安装教程。

手把手实现Java图书管理系统(附源码)

【超实用课程内容】 本课程演示的是一套基于Java的SSM框架实现的图书管理系统,主要针对计算机相关专业的正在做毕设的学生与需要项目实战练习的java人群。详细介绍了图书管理系统的实现,包括:环境搭建、系统业务、技术实现、项目运行、功能演示、系统扩展等,以通俗易懂的方式,手把手的带你从零开始运行本套图书管理系统,该项目附带全部源码可作为毕设使用。 【课程如何观看?】 PC端:https://edu.csdn.net/course/detail/27513 移动端:CSDN 学院APP(注意不是CSDN APP哦) 本课程为录播课,课程2年有效观看时长,大家可以抓紧时间学习后一起讨论哦~ 【学员专享增值服务】 源码开放 课件、课程案例代码完全开放给你,你可以根据所学知识,自行修改、优化

三个项目玩转深度学习(附1G源码)

从事大数据与人工智能开发与实践约十年,钱老师亲自见证了大数据行业的发展与人工智能的从冷到热。事实证明,计算机技术的发展,算力突破,海量数据,机器人技术等,开启了第四次工业革命的序章。深度学习图像分类一直是人工智能的经典任务,是智慧零售、安防、无人驾驶等机器视觉应用领域的核心技术之一,掌握图像分类技术是机器视觉学习的重中之重。针对现有线上学习的特点与实际需求,我们开发了人工智能案例实战系列课程。打造:以项目案例实践为驱动的课程学习方式,覆盖了智能零售,智慧交通等常见领域,通过基础学习、项目案例实践、社群答疑,三维立体的方式,打造最好的学习效果。

150讲轻松搞定Python网络爬虫

【为什么学爬虫?】 &nbsp; &nbsp; &nbsp; &nbsp;1、爬虫入手容易,但是深入较难,如何写出高效率的爬虫,如何写出灵活性高可扩展的爬虫都是一项技术活。另外在爬虫过程中,经常容易遇到被反爬虫,比如字体反爬、IP识别、验证码等,如何层层攻克难点拿到想要的数据,这门课程,你都能学到! &nbsp; &nbsp; &nbsp; &nbsp;2、如果是作为一个其他行业的开发者,比如app开发,web开发,学习爬虫能让你加强对技术的认知,能够开发出更加安全的软件和网站 【课程设计】 一个完整的爬虫程序,无论大小,总体来说可以分成三个步骤,分别是: 网络请求:模拟浏览器的行为从网上抓取数据。 数据解析:将请求下来的数据进行过滤,提取我们想要的数据。 数据存储:将提取到的数据存储到硬盘或者内存中。比如用mysql数据库或者redis等。 那么本课程也是按照这几个步骤循序渐进的进行讲解,带领学生完整的掌握每个步骤的技术。另外,因为爬虫的多样性,在爬取的过程中可能会发生被反爬、效率低下等。因此我们又增加了两个章节用来提高爬虫程序的灵活性,分别是: 爬虫进阶:包括IP代理,多线程爬虫,图形验证码识别、JS加密解密、动态网页爬虫、字体反爬识别等。 Scrapy和分布式爬虫:Scrapy框架、Scrapy-redis组件、分布式爬虫等。 通过爬虫进阶的知识点我们能应付大量的反爬网站,而Scrapy框架作为一个专业的爬虫框架,使用他可以快速提高我们编写爬虫程序的效率和速度。另外如果一台机器不能满足你的需求,我们可以用分布式爬虫让多台机器帮助你快速爬取数据。 &nbsp; 从基础爬虫到商业化应用爬虫,本套课程满足您的所有需求! 【课程服务】 专属付费社群+每周三讨论会+1v1答疑

cuda开发cutilDLL

包括cutil32.dll、cutil32D.dll、cutil32.lib、cutil32D.lib,以及附带的glew32.lib/freeglut.lib

深度学习原理+项目实战+算法详解+主流框架(套餐)

深度学习系列课程从深度学习基础知识点开始讲解一步步进入神经网络的世界再到卷积和递归神经网络,详解各大经典网络架构。实战部分选择当下最火爆深度学习框架PyTorch与Tensorflow/Keras,全程实战演示框架核心使用与建模方法。项目实战部分选择计算机视觉与自然语言处理领域经典项目,从零开始详解算法原理,debug模式逐行代码解读。适合准备就业和转行的同学们加入学习! 建议按照下列课程顺序来进行学习 (1)掌握深度学习必备经典网络架构 (2)深度框架实战方法 (3)计算机视觉与自然语言处理项目实战。(按照课程排列顺序即可)

Tensorflow与python3.7适配版本

tensorflow与python3.7匹配的最新库,更新了python3.7以后可以自行下载,或者去国外python的扩展包下载界面自行下载。

4小时玩转微信小程序——基础入门与微信支付实战

这是一个门针对零基础学员学习微信小程序开发的视频教学课程。课程采用腾讯官方文档作为教程的唯一技术资料来源。杜绝网络上质量良莠不齐的资料给学员学习带来的障碍。 视频课程按照开发工具的下载、安装、使用、程序结构、视图层、逻辑层、微信小程序等几个部分组织课程,详细讲解整个小程序的开发过程

专为程序员设计的数学课

<p> 限时福利限时福利,<span>15000+程序员的选择!</span> </p> <p> 购课后添加学习助手(微信号:csdn590),按提示消息领取编程大礼包!并获取讲师答疑服务! </p> <p> <br> </p> <p> 套餐中一共包含5门程序员必学的数学课程(共47讲) </p> <p> 课程1:《零基础入门微积分》 </p> <p> 课程2:《数理统计与概率论》 </p> <p> 课程3:《代码学习线性代数》 </p> <p> 课程4:《数据处理的最优化》 </p> <p> 课程5:《马尔可夫随机过程》 </p> <p> <br> </p> <p> 哪些人适合学习这门课程? </p> <p> 1)大学生,平时只学习了数学理论,并未接触如何应用数学解决编程问题; </p> <p> 2)对算法、数据结构掌握程度薄弱的人,数学可以让你更好的理解算法、数据结构原理及应用; </p> <p> 3)看不懂大牛代码设计思想的人,因为所有的程序设计底层逻辑都是数学; </p> <p> 4)想学习新技术,如:人工智能、机器学习、深度学习等,这门课程是你的必修课程; </p> <p> 5)想修炼更好的编程内功,在遇到问题时可以灵活的应用数学思维解决问题。 </p> <p> <br> </p> <p> 在这门「专为程序员设计的数学课」系列课中,我们保证你能收获到这些:<br> <br> <span> </span> </p> <p class="ql-long-24357476"> <span class="ql-author-24357476">①价值300元编程课程大礼包</span> </p> <p class="ql-long-24357476"> <span class="ql-author-24357476">②应用数学优化代码的实操方法</span> </p> <p class="ql-long-24357476"> <span class="ql-author-24357476">③数学理论在编程实战中的应用</span> </p> <p class="ql-long-24357476"> <span class="ql-author-24357476">④程序员必学的5大数学知识</span> </p> <p class="ql-long-24357476"> <span class="ql-author-24357476">⑤人工智能领域必修数学课</span> </p> <p> <br> 备注:此课程只讲程序员所需要的数学,即使你数学基础薄弱,也能听懂,只需要初中的数学知识就足矣。<br> <br> 如何听课? </p> <p> 1、登录CSDN学院 APP 在我的课程中进行学习; </p> <p> 2、登录CSDN学院官网。 </p> <p> <br> </p> <p> 购课后如何领取免费赠送的编程大礼包和加入答疑群? </p> <p> 购课后,添加助教微信:<span> csdn590</span>,按提示领取编程大礼包,或观看付费视频的第一节内容扫码进群答疑交流! </p> <p> <img src="https://img-bss.csdn.net/201912251155398753.jpg" alt=""> </p>

实现简单的文件系统

实验内容: 通过对具体的文件存储空间的管理、文件的物理结构、目录结构和文件操作的实现,加深对文件系统内部功能和实现过程的理解。 要求: 1.在内存中开辟一个虚拟磁盘空间作为文件存储器,在其上实现一个简

机器学习初学者必会的案例精讲

通过六个实际的编码项目,带领同学入门人工智能。这些项目涉及机器学习(回归,分类,聚类),深度学习(神经网络),底层数学算法,Weka数据挖掘,利用Git开源项目实战等。

四分之一悬架模型simulink.7z

首先建立了四分之一车辆悬架系统的数学模型,应用MATLAB/Simulink软件建立该系统的仿真模型,并输入路面激励为随机激励,控制不同的悬架刚度和阻尼,选用最优的参数得到车辆悬架的振动加速度变化曲线

MFC一站式终极全套课程包

该套餐共包含从C小白到C++到MFC的全部课程,整套学下来绝对成为一名C++大牛!!!

C++语言基础视频教程

C++语言基础视频培训课程:本课与主讲者在大学开出的程序设计课程直接对接,准确把握知识点,注重教学视频与实践体系的结合,帮助初学者有效学习。本教程详细介绍C++语言中的封装、数据隐藏、继承、多态的实现等入门知识;主要包括类的声明、对象定义、构造函数和析构函数、运算符重载、继承和派生、多态性实现等。 课程需要有C语言程序设计的基础(可以利用本人开出的《C语言与程序设计》系列课学习)。学习者能够通过实践的方式,学会利用C++语言解决问题,具备进一步学习利用C++开发应用程序的基础。

Java8零基础入门视频教程

这门课程基于主流的java8平台,由浅入深的详细讲解了java SE的开发技术,可以使java方向的入门学员,快速扎实的掌握java开发技术!

HoloLens2开发入门教程

本课程为HoloLens2开发入门教程,讲解部署开发环境,安装VS2019,Unity版本,Windows SDK,创建Unity项目,讲解如何使用MRTK,编辑器模拟手势交互,打包VS工程并编译部署应用到HoloLens上等。

C/C++学习指南全套教程

C/C++学习的全套教程,从基本语法,基本原理,到界面开发、网络开发、Linux开发、安全算法,应用尽用。由毕业于清华大学的业内人士执课,为C/C++编程爱好者的教程。

pokemmo的资源

pokemmo必须的4个rom 分别为绿宝石 火红 心金 黑白 还有汉化补丁 资源不错哦 记得下载

test_head.py

本文件主要是针对使用dlib的imglab标注工具标记的目标检测框和关键点检测而生成的xml文件, 转换为coco数据集格式.

Java面试史上最全的JAVA专业术语面试100问 (前1-50)

前言: 说在前面, 面试题是根据一些朋友去面试提供的,再就是从网上整理了一些。 先更新50道,下一波吧后面的也更出来。 求赞求关注!! 废话也不多说,现在就来看看有哪些面试题 1、面向对象的特点有哪些? 抽象、继承、封装、多态。 2、接口和抽象类有什么联系和区别? 3、重载和重写有什么区别? 4、java有哪些基本数据类型? 5、数组有没有length()方法?String有没有length()方法? 数组没有length()方法,它有length属性。 String有length()方法。 集合求长度用

2019 AI开发者大会

2019 AI开发者大会(AI ProCon 2019)是由中国IT社区CSDN主办的AI技术与产业年度盛会。多年经验淬炼,如今蓄势待发:2019年9月6-7日,大会将有近百位中美顶尖AI专家、知名企业代表以及千余名AI开发者齐聚北京,进行技术解读和产业论证。我们不空谈口号,只谈技术,诚挚邀请AI业内人士一起共铸人工智能新篇章!

linux“开发工具三剑客”速成攻略

工欲善其事,必先利其器。Vim+Git+Makefile是Linux环境下嵌入式开发常用的工具。本专题主要面向初次接触Linux的新手,熟练掌握工作中常用的工具,在以后的学习和工作中提高效率。

DirectX修复工具V4.0增强版

DirectX修复工具(DirectX Repair)是一款系统级工具软件,简便易用。本程序为绿色版,无需安装,可直接运行。 本程序的主要功能是检测当前系统的DirectX状态,如果发现异常则进行修复

20行代码教你用python给证件照换底色

20行代码教你用python给证件照换底色

2019 Python开发者日-培训

本次活动将秉承“只讲技术,拒绝空谈”的理念,邀请十余位身处一线的Python技术专家,重点围绕Web开发、自动化运维、数据分析、人工智能等技术模块,分享真实生产环境中使用Python应对IT挑战的真知灼见。此外,针对不同层次的开发者,大会还安排了深度培训实操环节,为开发者们带来更多深度实战的机会。

我以为我对Mysql事务很熟,直到我遇到了阿里面试官

太惨了,面试又被吊打

相关热词 c#中如何设置提交按钮 c#帮助怎么用 c# 读取合并单元格的值 c#带阻程序 c# 替换span内容 c# rpc c#控制台点阵字输出 c#do while循环 c#调用dll多线程 c#找出两个集合不同的
立即提问