activemq启动时报错,空指针异常,啥意思,求大神!!!

图片说明

2个回答

看来是 connect连接失败了。

看看你连接到那个broker或是client,版本是不是不一致。

应该是版本不一致。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
启动时报错DependencyResolutionException 求大神解答
[ERROR] Failed to execute goal on project hellomaven: Could not resolve dependencies for project com.rr:hellomaven:war:0.0.1-SNAPSHOT: Could not find artifact com.oracle:ojdbc6:jar:11.2.0 in central (https://repo.maven.apache.org/maven2) -> [Help 1]rn[ERROR] rn[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.rn[ERROR] Re-run Maven using the -X switch to enable full debug logging.rn[ERROR] rn[ERROR] For more information about the errors and possible solutions, please read the following articles:rn[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
500空指针异常。求大神帮忙!!!!!
空指针异常,调用的接口
求问大神java空指针异常
[img=https://img-bbs.csdn.net/upload/201709/13/1505293128_828692.png][/img]rnrnrnrnrn[img=https://img-bbs.csdn.net/upload/201709/13/1505293853_439365.png][/img]
ActiveMQ服务二次启动时,报错,居然是因为她!
ActiveMQ服务二次启动时,报错 “due to: java.NET.BindException: Address already in use: JVM_Bind”
Eclipse 启动时,出现空指针异常.
Eclipse 启动时,出现空指针异常.界面停止不动.rn我的系统新装的SERVER 2000,只有一个JDK1.4.0.rn哪位仁兄可以帮忙?
空指针异常报错
[img=https://img-bbs.csdn.net/upload/201306/17/1371446788_323442.jpg][/img]rn本人是新手,如图所示报错,空指针异常。rn通过debug断点调试发现下方红色代码区域无法执行,希望高手能帮忙看看。谢谢rn [color=#FF0000]for(Iterator iterator = mp3Infos.iterator();iterator.hasNext(); )[/color]rn Mp3Info mp3Info = iterator.next();rn HashMap map = new HashMap();rn map.put("mp3_name", mp3Info.getMp3Name());rn map.put("mp3_size", mp3Info.getMp3Size());rn list.add(map);rn rn SimpleAdapter adapter1= new SimpleAdapter(this, list, R.layout.mp3_infoitem, new String[]"mp3_name","mp3_size",rn new int[]R.id.mp3_name,R.id.mp3_size);rn setListAdapter(adapter1);rnrn rn
tomcat启动时报错,求原因。。。。
tomcat里没有部署任何项目,启动的时候报一个异常[code=Java]严重: Error configuring application listener of class org.springframework.security.ui.session.HttpSessionEventPublisherrnjava.lang.ClassNotFoundException: org.springframework.security.ui.session.HttpSessionEventPublisherrn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1493)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4115)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4671)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)rn at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)rn at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)rn at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)rn at org.apache.catalina.core.StandardService.start(StandardService.java:525)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:701)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:585)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)rn2011-4-11 9:38:22 org.apache.catalina.core.StandardContext listenerStart[/code]rnrn麻烦各位帮忙看一下。。。。。
eclipse启动时报错,求解决方法
网上解决的方法我都试了下,还是不行!![![![图片说明](https://img-ask.csdn.net/upload/201712/29/1514532222_580505.png)图片说明](https://img-ask.csdn.net/upload/201712/29/1514532204_873316.png)图片说明](https://img-ask.csdn.net/upload/201712/29/1514532193_335036.png)
C3P0连接池系统启动时初始化报错!!!求大神指点一二
[code=java]rnrnimport java.sql.Connection;rnimport java.sql.SQLException;rnimport org.apache.log4j.Logger;rnimport com.mchange.v2.c3p0.ComboPooledDataSource;rnimport com.mchange.v2.c3p0.DataSources;rnimport com.mchange.v2.c3p0.PooledDataSource;rnimport com.ufmsoft.factory.ResourceUtil;rnrn/**rn * @ClassName: DataSourceFactory rn * @Description: 数据源工厂类rn */rnpublic class DataSourceFactory rn rn private static final Logger logger = Logger.getLogger(DataSourceFactory.class);rn rn /**rn * 全局数据源rn */rn private static ComboPooledDataSource ds = null;rn rn staticrn try rn ds = new ComboPooledDataSource(“orcl”);rn catch (Exception e) rn logger.error("初始实例化数据源出现错误,请确认配置文件存在和正确!");rn e.printStackTrace();rn rn rn rn /**rn * @Title: getInstancern * @Description: 实例化数据源rn */rn public static final void getInstance() rn try rn DataSources.destroy(ds); // 关闭datasourcern ds=null;rn ds = new ComboPooledDataSource(ResourceUtil.getDatasourceName());rn catch (Exception e) rn logger.error("实例化数据源出现错误,请确认配置文件存在和正确!");rn e.printStackTrace();rn rn rn rn /**rn * @Title: closeDataSourcern * @Description: 关闭数据源rn * @throws Exception rn */rn public static void closeDataSource() throws Exceptionrn ds.getClass().getMethod("close").invoke(ds);rnrn rn /**rn * @Title: getConnectionrn * @Description: 获取数据链接rn * @return Connectionrn * @throws Exception rn */rn public static Connection getConnection()rn System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>!!!!!!!!");rn try rn return ds.getConnection();rn catch (SQLException e) rn logger.error("获取数据链接失败>>>>>>>>>>>>>>>>>!");rn e.printStackTrace();rn return null;rn rn rn /**rn * @Title: closeConnrn * @Description: 关闭数据链接rn * @param con Connectionrn * @throws SQLException rn */rn public static void closeConn(Connection con) throws SQLExceptionrn con.close();rn rnrn[/code]rnrnrnc3p0-config.xmlrn[code=html]rnrnrnxxx rnxxx rnoracle.jdbc.driver.OracleDriver rnjdbc:oracle:thin:@192.168.1.10:1521:orcl rnrn50 rn100 rn50 rn1000 rn rn0 rn5 rn rn rn1 rn1 rn1 rn5 rn50 rn rnrnrnrn[/code]rnrnServlet 启动的时候加载rn[code=java]rn @Overridern public void init() throws ServletException rn super.init();rn DataSourceFactory.getConnection();rn rn[/code]rnrnrn错误日志:rn[code=java]rn严重: StandardWrapper.Throwablernjava.lang.ExceptionInInitializerErrorrn at com.mchange.v2.c3p0.impl.PoolBackedDataSourceBase.(PoolBackedDataSourceBase.java:54)rn at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.(AbstractPoolBackedDataSource.java:74)rn at com.mchange.v2.c3p0.AbstractComboPooledDataSource.(AbstractComboPooledDataSource.java:142)rn at com.mchange.v2.c3p0.AbstractComboPooledDataSource.(AbstractComboPooledDataSource.java:138)rn at com.mchange.v2.c3p0.AbstractComboPooledDataSource.(AbstractComboPooledDataSource.java:215)rn at com.mchange.v2.c3p0.ComboPooledDataSource.(ComboPooledDataSource.java:53)rn at com.ufmsoft.factory.db.pool.DataSourceFactory.(DataSourceFactory.java:34)rn at com.ufmsoft.servlet.LoginServlet.init(LoginServlet.java:317)rn at javax.servlet.GenericServlet.init(GenericServlet.java:212)rn at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)rn at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)rn at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4350)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4659)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)rn at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)rn at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)rn at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)rn at org.apache.catalina.core.StandardService.start(StandardService.java:519)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:581)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)rnCaused by: java.lang.reflect.UndeclaredThrowableExceptionrn at $Proxy6.find(Unknown Source)rn at com.mchange.v2.cfg.MConfig.readVmConfig(MConfig.java:75)rn at com.mchange.v2.c3p0.cfg.C3P0Config.findLibraryMultiPropertiesConfig(C3P0Config.java:157)rn at com.mchange.v2.c3p0.cfg.C3P0Config.(C3P0Config.java:143)rn ... 35 morernCaused by: java.lang.reflect.InvocationTargetExceptionrn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at com.mchange.v1.lang.Synchronizer$1.invoke(Synchronizer.java:58)rn ... 39 morernCaused by: java.lang.NoSuchMethodError: com.mchange.v2.cfg.BasicMultiPropertiesConfig.([Ljava/lang/String;Ljava/util/List;)Vrn at com.mchange.v2.cfg.ConfigUtils.read(ConfigUtils.java:63)rn at com.mchange.v2.cfg.MConfig$CSManager.recreateFromKey(MConfig.java:153)rn at com.mchange.v1.cachedstore.NoCleanupCachedStore.find(NoCleanupCachedStore.java:63)rn ... 44 morern[/code]
WebService启动时applicationContext.xml报错,求大神帮忙看一下!谢谢!
报错内容如下:rn[WARN ]-[2014-11-04 16:37:46]-[org.springframework.web.context.support.XmlWebApplicationContext:1040] Exception thrown from ApplicationListener handling ContextClosedEventrnjava.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: Root WebApplicationContext: startup date [Tue Nov 04 16:37:45 CST 2014]; root of context hierarchyrn at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:340)rn at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:327)rn at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1037)rn at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1000)rn at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:554)rn at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:142)rn at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4831)rn at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5478)rn at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)rn at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)rn at java.util.concurrent.FutureTask.run(FutureTask.java:166)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)rn at java.lang.Thread.run(Thread.java:722)rn[WARN ]-[2014-11-04 16:37:46]-[org.springframework.web.context.support.XmlWebApplicationContext:1048] Exception thrown from LifecycleProcessor on context closernjava.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: Root WebApplicationContext: startup date [Tue Nov 04 16:37:45 CST 2014]; root of context hierarchyrn at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:353)rn at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1045)rn at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1000)rn at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:554)rn at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:142)rn at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4831)rn at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5478)rn at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)rn at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)rn at java.util.concurrent.FutureTask.run(FutureTask.java:166)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)rn at java.lang.Thread.run(Thread.java:722)rnrn[img=https://img-bbs.csdn.net/upload/201411/04/1415093842_998637.jpg][/img]rn如图,报错位置在这里。试了各种方法百思不得其解。求支个招。。。。rnrn
各位大神求助!mybatis项目启动时报错!
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerrnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'generalDaoImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.mybatis.spring.SqlSessionTemplate com.word4one.hotel.dao.GeneralDaoImpl.sqlSessionTemplate; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionTemplate' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'sqlSessionFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: ServletContext resource [/WEB-INF/mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.io.IOException: Could not find resource com/word4one/hotel/mapper/hotelQRCode.xmlrn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:288)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1120)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)rn at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5068)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5584)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1260)rn at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:2002)rn at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)rn at java.util.concurrent.FutureTask.run(FutureTask.java:262)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)rn at java.lang.Thread.run(Thread.java:744)rnCaused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.mybatis.spring.SqlSessionTemplate com.word4one.hotel.dao.GeneralDaoImpl.sqlSessionTemplate; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionTemplate' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'sqlSessionFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: ServletContext resource [/WEB-INF/mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.io.IOException: Could not find resource com/word4one/hotel/mapper/hotelQRCode.xmlrn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:514)rn at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:285)rn ... 26 morernCaused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionTemplate' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'sqlSessionFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: ServletContext resource [/WEB-INF/mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.io.IOException: Could not find resource com/word4one/hotel/mapper/hotelQRCode.xmlrn at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:329)rn at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)rn at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:629)rn at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:148)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1049)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:953)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:490)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultLisrntableBeanFactory.java:891)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:834)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:749)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:486)rn ... 28 morernCaused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: ServletContext resource [/WEB-INF/mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.io.IOException: Could not find resource com/word4one/hotel/mapper/hotelQRCode.xmlrn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1486)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)rn[img=https://img-bbs.csdn.net/upload/201607/04/1467646639_656273.png][/img]rnrnrn
SQLite 报错 求大神
[img=https://img-bbs.csdn.net/upload/201606/19/1466348080_159492.png][/img]rnrn[img=https://img-bbs.csdn.net/upload/201606/19/1466348086_952969.png][/img]rnrn[img=https://img-bbs.csdn.net/upload/201606/19/1466348093_460887.png][/img]rn[img=https://img-bbs.csdn.net/upload/201606/19/1466348099_738753.png][/img]
求大神,报错org.hibernate.hql.ast.QuerySyntaxException
项目用的是jpa+hibernate+spring做的,然后我写了个单元测试,运行报错rnjava.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: LsmpOssSetting is not mapped [SELECT t FROM LsmpOssSetting t ]rnrn以下是相关代码rn[code=java]package com.newcosoft.lsmp.oss.mode.po;rnrnimport com.newcosoft.lsmp.common.BaseEntity;rnrnimport java.sql.Timestamp;rnrnimport javax.persistence.Column;rnimport javax.persistence.Entity;rnimport javax.persistence.GeneratedValue;rnimport javax.persistence.GenerationType;rnimport javax.persistence.Id;rnimport javax.persistence.JoinColumn;rnimport javax.persistence.ManyToOne;rnimport javax.persistence.SequenceGenerator;rnimport javax.persistence.Table;rnimport javax.persistence.UniqueConstraint;rnrn/**rn * LsmpOssSetting generated by hbm2javarn */rn@Entityrn@Table(name = "LSMP_OSS_SETTING", uniqueConstraints = @UniqueConstraint(columnNames = "ID"))rnpublic class LsmpOssSetting extends BaseEntity implements java.io.Serializable rnrn /**rn * rn */rn private static final long serialVersionUID = 1L;rn private long id;rn private String lastSettingContent;rn private int syncFlag;rn private String lsmpSettingName;rn private String lsmpSettingDescription;rn private LsmpOssSettingApp lsmpSettingApp;rn private String lsmpSettingContent;rn private int status;rn private Timestamp createTime;rn private Timestamp lastChangeTime;rn private Integer ext01;rn private String ext02;rnrn public LsmpOssSetting() rn rnrn public LsmpOssSetting(long id) rn this.id = id;rn rnrn @Idrn @Column(name = "ID", unique = true, nullable = false, precision = 7, scale = 0)rn @SequenceGenerator(name = "LSMP_OSS_SETTING_ID_GENERATOR", sequenceName = "SEQ_OSS_SETTING")rn @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "LSMP_OSS_SETTING_ID_GENERATOR")rn public long getId() rn return this.id;rn rnrn public void setId(long id) rn this.id = id;rn rnrn @Column(name = "LAST_SETTING_CONTENT")rn public String getLastSettingContent() rn return lastSettingContent;rn rnrn public void setLastSettingContent(String lastSettingContent) rn this.lastSettingContent = lastSettingContent;rn rnrn @Column(name = "SYNC_FLAG")rn public int getSyncFlag() rn return syncFlag;rn rnrn public void setSyncFlag(int syncFlag) rn this.syncFlag = syncFlag;rn rnrn @Column(name = "LSMP_SETTING_NAME")rn public String getLsmpSettingName() rn return this.lsmpSettingName;rn rnrn public void setLsmpSettingName(String lsmpSettingName) rn this.lsmpSettingName = lsmpSettingName;rn rnrn @Column(name = "LSMP_SETTING_DESCRIPTION")rn public String getLsmpSettingDescription() rn return this.lsmpSettingDescription;rn rnrn public void setLsmpSettingDescription(String lsmpSettingDescription) rn this.lsmpSettingDescription = lsmpSettingDescription;rn rnrn @ManyToOnern @JoinColumn(name = "LSMP_SETTING_APP_ID", referencedColumnName = "ID")rn public LsmpOssSettingApp getLsmpSettingApp() rn return this.lsmpSettingApp;rn rnrn public void setLsmpSettingApp(LsmpOssSettingApp lsmpSettingApp) rn this.lsmpSettingApp = lsmpSettingApp;rn rnrn @Column(name = "LSMP_SETTING_CONTENT")rn public String getLsmpSettingContent() rn return this.lsmpSettingContent;rn rnrn public void setLsmpSettingContent(String lsmpSettingContent) rn this.lsmpSettingContent = lsmpSettingContent;rn rnrn @Column(name = "STATUS", precision = 2, scale = 0)rn public int getStatus() rn return this.status;rn rnrn public void setStatus(int status) rn this.status = status;rn rnrn @Column(name = "CREATE_TIME")rn public Timestamp getCreateTime() rn return this.createTime;rn rnrn public void setCreateTime(Timestamp createTime) rn this.createTime = createTime;rn rnrn @Column(name = "LAST_CHANGE_TIME")rn public Timestamp getLastChangeTime() rn return this.lastChangeTime;rn rnrn public void setLastChangeTime(Timestamp lastChangeTime) rn this.lastChangeTime = lastChangeTime;rn rnrn @Column(name = "EXT_01", precision = 7, scale = 0)rn public Integer getExt01() rn return this.ext01;rn rnrn public void setExt01(Integer ext01) rn this.ext01 = ext01;rn rnrn @Column(name = "EXT_02", length = 100)rn public String getExt02() rn return this.ext02;rn rnrn public void setExt02(String ext02) rn this.ext02 = ext02;rn rnrn[/code]rnrnapplicationContext.xmlrn[code=html]rnrnrnrn rn rnrn rnrn rnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn org.hibernate.dialect.Oracle10gDialectrn rn rn rnrn rn rn rnrn rnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrn rn rn rn rn rn rn rn rn rn rnrn rn [/code]rnrnpersistence.xmlrn[code=html]rnrn rnrn rn[/code]rnrn最后是测试用例rn[code=java]package com.newcosoft.lsmp.oss.dao.env;rnrnimport javax.persistence.EntityManager;rnimport javax.persistence.EntityManagerFactory;rnimport javax.persistence.Query;rnrnimport org.junit.Test;rnimport org.springframework.context.support.FileSystemXmlApplicationContext;rnrnpublic class SettingEnvDaoTest rn @Testrn public void getSetting()rn FileSystemXmlApplicationContext context=new FileSystemXmlApplicationContext("E://pcgworkspace/oss-2.6.0/lsmp-oss-web/src/main/resource/applicationContext.xml");rn EntityManagerFactory emf=context.getBean("entityManagerFactory", EntityManagerFactory.class);rn String hql = "SELECT t FROM LsmpOssSetting t ";rn EntityManager em=emf.createEntityManager();rn Query query=em.createQuery(hql);rn System.out.println(query.getResultList().size());rn rn[/code]
pstmt=conn.prepareStatement(sql)空指针异常,求大神支招
[code=java]rnpackage com.cw.util;rnrnimport java.io.File;rnimport java.io.FileInputStream;rnimport java.sql.Connection;rnimport java.sql.DriverManager;rnimport java.sql.PreparedStatement;rnimport java.sql.ResultSet;rnimport java.sql.SQLException;rnimport java.sql.Statement;rnimport java.util.Properties;rnimport org.junit.Test;rnpublic class DBUtil rnrn @Testrn // 1.getConnenction 方法的封装rn public static Connection getConnection() rn // 利用配置文件来读取数据库路径,用户名,密码rn String url = null;rn String dbUser = null;rn String dbPwd = null;rn Connection conn = null;rn Properties pro = new Properties();rnrn try rn FileInputStream fis=new FileInputStream(new File("src/db_mysql.properties"));rn pro.load(fis); //读取配置文件中的键值对rn url = pro.getProperty("url");rn dbUser = pro.getProperty("dbUser");rn dbPwd = pro.getProperty("dbPwd");rn Class.forName("com.mysql.jdbc.Driver");rn conn = DriverManager.getConnection(url, dbUser, dbPwd);rn // 如果创建Connection成功则返回一个Connection对象rn System.out.println(url+dbUser+dbPwd);rn rn catch (Exception e) rn // TODO: handle exceptionrn rn return conn;rnrn rnrn // 2.close() 方法的封装,关闭ResultSet,PreparedStatement,Connectionrn public static void close(ResultSet rs, Statement pstmt,rn Connection conn) rnrn try rn if (rs != null) rn rs.close();rn rnrn if (pstmt != null) rn pstmt.close();rn rn if (conn != null) rn conn.close();rn rn catch (SQLException e) rn // TODO Auto-generated catch blockrn e.printStackTrace();rn rnrn rnrnrnrnrnrnrnpackage com.cw.DAO.imp;rnrnimport java.sql.Connection;rnimport java.sql.PreparedStatement;rnimport java.sql.ResultSet;rnimport java.sql.SQLException;rnimport java.sql.Statement;rnimport java.util.ArrayList;rnimport java.util.List;rnimport com.cw.DAO.DogDAO;rnimport com.cw.entity.Dog;rnimport com.cw.util.DBUtil;rnrnpublic class DogDAOImpl implements DogDAOrnrn public void deleteById(int id) rn // TODO Auto-generated method stubrn rn rnrn public Dog findById(int id) rn // TODO Auto-generated method stubrn return null;rn rnrn public Dog findByName(String name) rn // TODO Auto-generated method stubrn return null;rn rnrn public List findall() rn String sql="select * from dog";rn Connection conn=null;rn PreparedStatement pstmt=null;rn ResultSet rs=null;rn //定义一个集合,存放数据库中信息rn List list=new ArrayList();rn //获取连接rn conn=DBUtil.getConnection();rn try rn pstmt=conn.prepareStatement(sql);rn rs=pstmt.executeQuery();rn while(rs.next())rn Dog dog=new Dog();rn dog.setName(rs.getString("name"));rn dog.setAge(rs.getInt("age"));rn dog.setSex(rs.getString("sex"));rn dog.setColor(rs.getString("color"));rn list.add(dog);rn rn catch (SQLException e) rn // TODO Auto-generated catch blockrn e.printStackTrace();rn rn DBUtil.close(rs, pstmt, conn);rn return list;rn rnrn public void insert(Dog dog) rn String sql="insert into dog(name,age,sex,color)values("+"'"+dog.getName()+"',"+dog.getAge()+",'"+dog.getSex()+"','"+dog.getColor()+"')";rn Connection conn=null;rn PreparedStatement pstmt=null;rn try rn conn=DBUtil.getConnection();rn pstmt=conn.prepareStatement(sql);//这里抱报错rn pstmt.setString(1, dog.getName());rn pstmt.setInt(2, dog.getAge());rn pstmt.setString(3, dog.getSex());rn pstmt.setString(4, dog.getColor());rn pstmt.executeUpdate();rn System.out.println("conn"+conn);rn catch (SQLException e) rn // TODO Auto-generated catch blockrn e.printStackTrace();rn finallyrn DBUtil.close(null, pstmt, conn);rn rn rn rnrnrnrn[/code]rnrnrn错误信息:rn严重: Servlet.service() for servlet addAction threw exceptionrnjava.lang.NullPointerExceptionrn at com.cw.DAO.imp.DogDAOImpl.insert(DogDAOImpl.java:66)rn at com.cw.servlet.addAction.doGet(addAction.java:40)rn at com.cw.servlet.addAction.doPost(addAction.java:49)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)rn at java.lang.Thread.run(Thread.java:619)rnrnrn
求大神看下空指针异常怎么改啊?
严重: Servlet.service() for servlet [springDispatcherServlet] in context with path [/ssm] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root causernjava.lang.NullPointerExceptionrn at java.io.File.(File.java:277)rn at com.javen.util.FileUtil.uploadFile(FileUtil.java:23)rn at com.java.controller.importController.importXml(importController.java:54)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:606)rn at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)rn at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)rn at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)rn at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749)rn at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:690)rn at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)rn at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945)rn at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:876)rn at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)rn at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)rnrn----------------------------------------------------------------------------------------------------------------------------------------rn上边事报的异常,下面是主要报错的地方: String filePath=request.getSession().getServletContext().getRealPath("uploadFile");rn String uploadFileName=FileUtil.uploadFile(inputs,fileName,filePath);rn rn System.out.println(filePath+"/"+uploadFileName);rn //解析excelrn result=recordService.addRecord(filePath+"/"+uploadFileName);rn
求大神帮看看这行代码啥意思?
这代码有点看不懂,rn[color=#FF0000]VAR_DECLSPEC PayloadType payload_type_h264;[/color]rn中的payload_type_h264代表啥数字?rnrn[code=c]rnrn#ifndef PAYLOADTYPE_Hrn#define PAYLOADTYPE_Hrn#include rnrn#ifdef __cplusplusrnextern "C"rn#endifrnrn/* flags for PayloadType::flags */rnrn#define PAYLOAD_TYPE_ALLOCATED (1)rn /* private flags for future use by ortp */rn#define PAYLOAD_TYPE_PRIV1 (1<<1)rn#define PAYLOAD_TYPE_PRIV2 (1<<2)rn#define PAYLOAD_TYPE_PRIV3 (1<<3)rn /* user flags, can be used by the application on top of oRTP */rn#define PAYLOAD_TYPE_USER_FLAG_0 (1<<4)rn#define PAYLOAD_TYPE_USER_FLAG_1 (1<<5)rn#define PAYLOAD_TYPE_USER_FLAG_2 (1<<6)rn /* ask for more if you need*/rnrn#define PAYLOAD_AUDIO_CONTINUOUS 0rn#define PAYLOAD_AUDIO_PACKETIZED 1rn#define PAYLOAD_VIDEO 2rn#define PAYLOAD_TEXT 4rn#define PAYLOAD_OTHER 3 /* ?? */rnrnstruct _PayloadTypernrn int type; /**< one of PAYLOAD_* macros*/rn int clock_rate; /**< rtp clock rate*/rn char bits_per_sample; /* in case of continuous audio data */rn char *zero_pattern;rn int pattern_length;rn /* other useful information for the application*/rn int normal_bitrate; /*in bit/s */rn char *mime_type; /**flags|=((int)flag)rn#define payload_type_unset_flag(pt,flag) (pt)->flags&=(~(int)flag)rn#define payload_type_get_flags(pt) (pt)->flagsrnrnrnORTP_PUBLIC PayloadType *payload_type_new(void);rnORTP_PUBLIC PayloadType *payload_type_clone(PayloadType *payload);rnORTP_PUBLIC char *payload_type_get_rtpmap(PayloadType *pt);rnORTP_PUBLIC void payload_type_destroy(PayloadType *pt);rnORTP_PUBLIC void payload_type_set_recv_fmtp(PayloadType *pt, const char *fmtp);rnORTP_PUBLIC void payload_type_set_send_fmtp(PayloadType *pt, const char *fmtp);rnORTP_PUBLIC void payload_type_append_recv_fmtp(PayloadType *pt, const char *fmtp);rnORTP_PUBLIC void payload_type_append_send_fmtp(PayloadType *pt, const char *fmtp);rnrn#define payload_type_get_bitrate(pt) ((pt)->normal_bitrate)rn#define payload_type_get_rate(pt) ((pt)->clock_rate)rn#define payload_type_get_mime(pt) ((pt)->mime_type)rnrnORTP_PUBLIC bool_t fmtp_get_value(const char *fmtp, const char *param_name, char *result, size_t result_len);rnrn#define payload_type_set_user_data(pt,p) (pt)->user_data=(p)rn#define payload_type_get_user_data(pt) ((pt)->user_data)rnrnrn/* some payload types */rn/* audio */rnVAR_DECLSPEC PayloadType payload_type_pcmu8000;rnVAR_DECLSPEC PayloadType payload_type_pcma8000;rnVAR_DECLSPEC PayloadType payload_type_pcm8000;rnVAR_DECLSPEC PayloadType payload_type_l16_mono;rnVAR_DECLSPEC PayloadType payload_type_l16_stereo;rnVAR_DECLSPEC PayloadType payload_type_lpc1016;rnVAR_DECLSPEC PayloadType payload_type_g729;rnVAR_DECLSPEC PayloadType payload_type_g7231;rnVAR_DECLSPEC PayloadType payload_type_g7221;rnVAR_DECLSPEC PayloadType payload_type_g726_40;rnVAR_DECLSPEC PayloadType payload_type_g726_32;rnVAR_DECLSPEC PayloadType payload_type_g726_24;rnVAR_DECLSPEC PayloadType payload_type_g726_16;rnVAR_DECLSPEC PayloadType payload_type_aal2_g726_40;rnVAR_DECLSPEC PayloadType payload_type_aal2_g726_32;rnVAR_DECLSPEC PayloadType payload_type_aal2_g726_24;rnVAR_DECLSPEC PayloadType payload_type_aal2_g726_16;rnVAR_DECLSPEC PayloadType payload_type_gsm;rnVAR_DECLSPEC PayloadType payload_type_lpc;rnVAR_DECLSPEC PayloadType payload_type_lpc1015;rnVAR_DECLSPEC PayloadType payload_type_speex_nb;rnVAR_DECLSPEC PayloadType payload_type_speex_wb;rnVAR_DECLSPEC PayloadType payload_type_speex_uwb;rnVAR_DECLSPEC PayloadType payload_type_ilbc;rnVAR_DECLSPEC PayloadType payload_type_amr;rnVAR_DECLSPEC PayloadType payload_type_amrwb;rnVAR_DECLSPEC PayloadType payload_type_truespeech;rnVAR_DECLSPEC PayloadType payload_type_evrc0;rnVAR_DECLSPEC PayloadType payload_type_evrcb0;rnVAR_DECLSPEC PayloadType payload_type_silk_nb; rnVAR_DECLSPEC PayloadType payload_type_silk_mb;rnVAR_DECLSPEC PayloadType payload_type_silk_wb;rnVAR_DECLSPEC PayloadType payload_type_silk_swb;rnrn /* video */rnVAR_DECLSPEC PayloadType payload_type_mpv;rnVAR_DECLSPEC PayloadType payload_type_h261;rnVAR_DECLSPEC PayloadType payload_type_h263;rnVAR_DECLSPEC PayloadType payload_type_h263_1998;rnVAR_DECLSPEC PayloadType payload_type_h263_2000;rnVAR_DECLSPEC PayloadType payload_type_mp4v;rnVAR_DECLSPEC PayloadType payload_type_theora;rn[color=#FF0000]VAR_DECLSPEC PayloadType payload_type_h264;[/color]rnVAR_DECLSPEC PayloadType payload_type_x_snow;rnVAR_DECLSPEC PayloadType payload_type_jpeg;rnVAR_DECLSPEC PayloadType payload_type_vp8;rnrnVAR_DECLSPEC PayloadType payload_type_g722;rnrn/* text */rnVAR_DECLSPEC PayloadType payload_type_t140;rnVAR_DECLSPEC PayloadType payload_type_t140_red;rnrn/* non standard file transfer over UDP */rnVAR_DECLSPEC PayloadType payload_type_x_udpftp;rnrn/* telephone-event */rnVAR_DECLSPEC PayloadType payload_type_telephone_event;rnrn#ifdef __cplusplusrnrn#endifrnrn#endifrnrn[/code]
求大神帮我看一下这一段啥意思
[code=vb]Dim s16 As String = "01 10 00 28 00 06 0C 03 E8 00 00 D8 F0 FF FF 56 28"rnDim s10 = String.Join(" ", s16.Split(" "c).Select(Function(x As String)rn Return Convert.ToByte(x, 16).ToStringrn End Function).ToArray)rnDim s16_2 = String.Join(" ", s10.Split(" "c).Select(Function(x As String)rn Return Convert.ToString(Byte.Parse(x), 16).ToStringrn End Function).ToArray)rn[/code]
字符编码问题,空指针异常,求大神支招~~~~~
后台始终报错,但是前台数据都是正确的,不知道什么原因rn[img=https://img-bbs.csdn.net/upload/201407/21/1405927882_632245.jpg][/img]rn[img=https://img-bbs.csdn.net/upload/201407/21/1405927901_730687.png][/img]rn
如此牛逼的空指针异常,求大神帮忙
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerExceptionrn at org.scbit.server.tissue.service.DeliveryOrderService.editPrepareDelivery(DeliveryOrderService.java:242)rn at org.scbit.server.tissue.service.DeliveryOrderService$$FastClassByCGLIB$$6a89ca2d.invoke()rn at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)rn at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:688)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)rn at org.scbit.tissuebank.log.BaseLogAdvice.invoke(BaseLogAdvice.java:47)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)rn at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)rn at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)rn at org.scbit.server.tissue.service.DeliveryOrderService$$EnhancerByCGLIB$$351e81fe.editPrepareDelivery()rn at org.scbit.server.tissue.service.DeliveryOrderService$$FastClassByCGLIB$$6a89ca2d.invoke()rn at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)rn at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:688)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)rn at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)rn at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)rn at org.scbit.server.tissue.service.DeliveryOrderService$$EnhancerByCGLIB$$2ac1b8dc.editPrepareDelivery()rn at org.scbit.server.tissue.service.DeliveryOrderService$$FastClassByCGLIB$$6a89ca2d.invoke()rn at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)rn at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:688)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)rn at org.scbit.tissuebank.log.BaseLogAdvice.invoke(BaseLogAdvice.java:47)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)rn at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)rn at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)rn at org.scbit.server.tissue.service.DeliveryOrderService$$EnhancerByCGLIB$$922f0439.editPrepareDelivery()rn at org.scbit.server.tissue.business.DeliveryOrderBusiness.editPrepareDelivery(DeliveryOrderBusiness.java:640)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)rn at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:111)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)rn at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)rn at $Proxy6.editPrepareDelivery(Unknown Source)rn at org.scbit.tissuebank.tissue.proxy.DeliveryOrderProxy.editPrepareDelivery(DeliveryOrderProxy.java:153)rn at org.scbit.tissuebank.tissue.listener.TissueOrderListener.actionPerformed(TissueOrderListener.java:93)rn at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)rn at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)rn at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)rn at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)rn at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)rn at org.pushingpixels.substance.internal.utils.RolloverButtonListener.mouseReleased(RolloverButtonListener.java:124)rn at java.awt.Component.processMouseEvent(Component.java:6134)rn at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)rn at java.awt.Component.processEvent(Component.java:5899)rn at java.awt.Container.processEvent(Container.java:2023)rn at java.awt.Component.dispatchEventImpl(Component.java:4501)rn at java.awt.Container.dispatchEventImpl(Container.java:2081)rn at java.awt.Component.dispatchEvent(Component.java:4331)rn at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4301)rn at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3965)rn at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3895)rn at java.awt.Container.dispatchEventImpl(Container.java:2067)rn at java.awt.Window.dispatchEventImpl(Window.java:2458)rn at java.awt.Component.dispatchEvent(Component.java:4331)rn at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)rn at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)rn at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)rn at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)rn at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)rn at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)rn at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
页面跳转出现空指针异常 求大神帮解决
警告: Method execution failed: rnjava.lang.NullPointerExceptionrn at com.dao.DB.getRs(DB.java:82)rn at com.service.loginService.login(loginService.java:44)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.directwebremoting.impl.ExecuteAjaxFilter.doFilter(ExecuteAjaxFilter.java:34)rn at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428)rn at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:431)rn at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:283)rn at org.directwebremoting.servlet.PlainCallHandler.handle(PlainCallHandler.java:52)rn at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:101)rn at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:146)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)rn at com.util.EncodingFilter.doFilter(EncodingFilter.java:30)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)rn at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)rn at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)rn at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)rn at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)rn at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)rn at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)rn at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)rn at java.lang.Thread.run(Thread.java:619)rn2016-4-18 13:12:13 org.directwebremoting.util.CommonsLoggingOutput warnrn警告: --Erroring: batchId[0] message[java.lang.NullPointerException]rn
帧偏移是啥意思~求大神指点
最近在看一个关于帧偏移的论文,但是不是很能理解帧偏移的意思。想问下各位大神:n第一 啥是帧偏移 n第二 求帧偏移的基本思路是啥 n跪谢~
android 开发空指针异常 求大神帮忙看看
如题 求助解决方法。error log 如下:rn09-01 13:18:39.187: E/AndroidRuntime(21433): FATAL EXCEPTION: mainrn09-01 13:18:39.187: E/AndroidRuntime(21433): java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.getDrawingRect(android.graphics.Rect)' on a null object referencern09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.ViewGroup$ViewLocationHolder.init(ViewGroup.java:7297)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.ViewGroup$ViewLocationHolder.obtain(ViewGroup.java:7232)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.ViewGroup$ChildListForAccessibility.init(ViewGroup.java:7167)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.ViewGroup$ChildListForAccessibility.obtain(ViewGroup.java:7135)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.ViewGroup.dispatchPopulateAccessibilityEventInternal(ViewGroup.java:2729)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.View.dispatchPopulateAccessibilityEvent(View.java:5362)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.ViewGroup.dispatchPopulateAccessibilityEventInternal(ViewGroup.java:2735)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.View.dispatchPopulateAccessibilityEvent(View.java:5362)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.ViewGroup.dispatchPopulateAccessibilityEventInternal(ViewGroup.java:2735)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.View.dispatchPopulateAccessibilityEvent(View.java:5362)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.widget.RelativeLayout.dispatchPopulateAccessibilityEvent(RelativeLayout.java:1120)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.widget.AdapterView.onRequestSendAccessibilityEvent(AdapterView.java:949)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.ViewGroup.requestSendAccessibilityEvent(ViewGroup.java:740)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.ViewGroup.requestSendAccessibilityEvent(ViewGroup.java:744)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.ViewGroup.requestSendAccessibilityEvent(ViewGroup.java:744)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.ViewGroup.requestSendAccessibilityEvent(ViewGroup.java:744)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.View.sendAccessibilityEventUncheckedInternal(View.java:5330)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.View.sendAccessibilityEventUnchecked(View.java:5311)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.ViewRootImpl$SendWindowContentChangedAccessibilityEvent.run(ViewRootImpl.java:6948)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.ViewRootImpl$SendWindowContentChangedAccessibilityEvent.runOrPost(ViewRootImpl.java:6974)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.ViewRootImpl.postSendWindowContentChangedCallback(ViewRootImpl.java:6175)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.ViewRootImpl.notifySubtreeAccessibilityStateChanged(ViewRootImpl.java:6288)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:2780)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:2780)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:2780)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:2780)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:2780)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:2780)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:2780)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:2780)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:2780)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.View.notifySubtreeAccessibilityStateChangedIfNeeded(View.java:8020)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.ViewGroup.addViewInner(ViewGroup.java:4005)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.ViewGroup.addView(ViewGroup.java:3794)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.ViewGroup.addView(ViewGroup.java:3735)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at com.app.myfolder.view.ScrollLayout.addView(ScrollLayout.java:213)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.view.ViewGroup.addView(ViewGroup.java:3708)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at com.app.myfolder.view.ScrollLayout.refreView(ScrollLayout.java:226)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at com.app.myfolder.activity.FoldersBoxActivity.initContainer(FoldersBoxActivity.java:675)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at com.app.myfolder.activity.FoldersBoxActivity.access$75(FoldersBoxActivity.java:658)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at com.app.myfolder.activity.FoldersBoxActivity$FolderAsyncTask.onPostExecute(FoldersBoxActivity.java:3110)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at com.app.myfolder.activity.FoldersBoxActivity$FolderAsyncTask.onPostExecute(FoldersBoxActivity.java:1)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.os.AsyncTask.finish(AsyncTask.java:636)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.os.AsyncTask.access$500(AsyncTask.java:177)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:653)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.os.Handler.dispatchMessage(Handler.java:102)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.os.Looper.loop(Looper.java:135)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at android.app.ActivityThread.main(ActivityThread.java:5254)rn09-01 13:18:39.187: E/AndroidRuntime(21433): at java.lang.reflect.Method.invokern
空指针异常,求助大神
com.microsoft.sqlserver.jdbc.SQLServerException: 列名 'uname' 无效。rn at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216)rn at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1515)rn at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:404)rn at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:350)rn at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)rn at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)rn at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:180)rn at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155)rn at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:285)rn at org.itstar.b2c.dao.impl.NewbrowseDAOImpl.query(NewbrowseDAOImpl.java:145)rn at org.itstar.b2c.domain.impl.NewbrowseDomainImpl.query(NewbrowseDomainImpl.java:36)rn at org.apache.jsp.index_jsp._jspService(index_jsp.java:802)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:439)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)rn at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)rn at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:747)rn at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:485)rn at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:410)rn at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:337)rn at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:154)rn at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)rn at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:361)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265)rn at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:163)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:249)rn at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:148)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:93)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:128)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:104)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:148)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:128)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at org.itstar.b2c.interceptor.CharInterceptor.intercept(CharInterceptor.java:20)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)rn at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:468)rn at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)rn at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)rn at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)rn at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)rn at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)rn at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)rn at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)rn at java.lang.Thread.run(Unknown Source)rnJul 09, 2016 9:02:57 PM org.apache.catalina.core.ApplicationDispatcher invokern严重: Servlet.service() for servlet jsp threw exceptionrnjava.lang.NullPointerExceptionrn at org.itstar.b2c.dao.impl.NewbrowseDAOImpl.query(NewbrowseDAOImpl.java:168)rn at org.itstar.b2c.domain.impl.NewbrowseDomainImpl.query(NewbrowseDomainImpl.java:36)rn at org.apache.jsp.index_jsp._jspService(index_jsp.java:802)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:439)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)rnrnrnrn
启动时报错
以下是具体的报错内容。rnrnrn事件类型: 信息rn事件来源: Application Popuprn事件种类: 无rn事件 ID: 26rn日期: 2003-8-2rn事件: 10:10:50rn用户: N/Arn计算机: ZHUJYrn描述:rn弹出应用程序: 服务控制管理器 : 在系统启动时至少有一个服务或驱动程序产生错误。详细信息,请使用事件查看器查看事件日志。rnrnrn有关更多信息,请参阅在 http://go.microsoft.com/fwlink/events.asp 的帮助和支持中心。rn
setContentView 报错空指针异常
setContentView 报错空指针异常
空指针异常报错,就解答!!
package SwingTest;rnrnimport java.awt.Color;rnimport java.awt.event.ActionEvent;rnimport java.awt.event.ActionListener;rnimport java.util.logging.Handler;rnrnimport javax.swing.ButtonGroup;rnimport javax.swing.JFrame;rnimport javax.swing.JMenu;rnimport javax.swing.JMenuBar;rnimport javax.swing.JRadioButtonMenuItem;rnimport javax.swing.JTextField;rnrnpublic class Mymenu extends JFrame rn JTextField jt;rn ButtonGroup colorgroup;rn JRadioButtonMenuItem[] coloritem;rn Color[] colorvalues = Color.GREEN, Color.YELLOW, Color.BLACK, Color.RED ;rnrn public Mymenu() rn JMenu colormenu = new JMenu("COLOR(C)");rn colormenu.setMnemonic('C');rn String[] colornames = "GREEN", "YELLOW", "BLACK", "RED" ;rn colorgroup = new ButtonGroup();rn for (int i = 0; i < colornames.length; i++) rnrn coloritem = new JRadioButtonMenuItem[colornames.length];rn colorgroup.add(coloritem[i]);rn colormenu.add(coloritem[i]);rn coloritem[i].addActionListener(new Handler());rnrn rn add(jt);rn JMenuBar bar = new JMenuBar();rn setJMenuBar(bar);rn bar.add(colormenu);rn setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);rn setBounds(500, 350, 600, 400);rn setVisible(true);rn setResizable(false);rnrn rnrn class Handler implements ActionListener rn public void actionPerformed(ActionEvent e) rn for (int i = 0; i < coloritem.length; i++) rn if (coloritem[i].isSelected())rn jt.setForeground(colorvalues[i]);rn break;rn rn rn rnrn public static void main(String[] args) rn Mymenu jf = new Mymenu();rn jf.setTitle("Test Window");rn rnrnrnrnrnrnrnrnrnException in thread "main" java.lang.NullPointerExceptionrn at java.awt.Container.addImpl(Container.java:1090)rn at java.awt.Container.add(Container.java:410)rn at javax.swing.JPopupMenu.add(JPopupMenu.java:290)rn at javax.swing.JMenu.add(JMenu.java:579)rn at SwingTest.Mymenu.(Mymenu.java:30)rn at SwingTest.Mymenu.main(Mymenu.java:56)rnrn
camera activity报错空指针异常
camera intent:rnrn fileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE);rn intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);rnrn这部分报空指针异常的错误,谁能解释一下为什么,还有需要改什么地方?rnrn button_1.setOnClickListener(new View.OnClickListener() rn rn public void onClick(View v) rn Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");rn rn fileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE); // 创建一个文件来保存图像rn intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri); //设置图像的文件名 rn rn startActivityForResult(intent, TAKE_PICTURE);rn rn );rn rn protected void onActivityResult(int requestCode, int resultCode, Intent data) rn if (requestCode == REQUEST_CODE) rn if (resultCode == RESULT_OK) rn // 获取图像,保存在 Intent中fileUri里rn Toast.makeText(this, "Image saved to:\n" +rn data.getData(), Toast.LENGTH_LONG).show();rn else if (resultCode == RESULT_CANCELED) rn // 用户取消图像获取rn else rn // 图像获取失败rn rn rn
关于activeMQ的问题,求大神指点!!!
目前在读activeMQ in action 这本书。英文版第68页开始,书中第四章的个例子,例子英文名stock portfolio,采用的发布/订阅的消息域,rn首先我在active.xml文件中配置:rn [code=text] rn rn rn rn [/code]rn修改后启动activemq,rn而后执行producer : mvn exec:java -Dexec.mainClass=org.apache.activemq.book.ch4.Publisher -Dexec.args="udp://localhost:61618 CSCO ORCL"rnrn最后执行consumer:mvn exec:java -Dexec.mainClass=org.apache.activemq.book.ch4.Consumer -Dexec.args="tcp://localhost:61616 CSCO ORCL"rnrn最后两个启动窗口都停住不动,如下图:rn[img=https://img-bbs.csdn.net/upload/201502/11/1423638344_408886.jpg][/img]
ActiveMQ 启动时broker 的源代码调试
  入口在 org.apache.activemq.console.Main这个类   在main方法内最前面加入如下代码   // debug System.setProperty(&quot;activemq.base&quot;, &quot;E:\\apache-activemq-5.10.2&quot;); System.setProperty(&quot;activemq.home&quot;, &quot;E:\\apache-act...
跪求ActiveMQ大神帮忙
最近一直在将ActiveMQ与Spring进行整合,网上也搜了很多的例子,但是每个例子整合的都有哥问题:rn随着消息不断的发送,Connection的数量一直在增加,我在没有整合之前单独发送消息时,这种情况就意味着不停的再消耗内存,直至内存耗尽。rn请问下各个大神,能不能给我个正确整合的例子啊?给哥很简单的发送个接收的例子就好了,或者给个正确例子的网址也行,谢谢了。
召唤activeMQ大神,数据丢失!!!!!!
召唤activeMQ大神!最近由于项目需要,使用activemq5.10.0,但是发现了丢失数据的现象,特来求证。rnrn[b]需求如下:[/b]rn需求1,队列之间资源独立,不能因为某个队列消费缓慢导致其生产者生产的消息累计,将内存/硬盘耗尽使其它队列不能使用,所以需要配置指定每个队列的资源大小,互不影响;rn需求2,使用异步发送方式,加快生产消息速度,经测试持久化消息(默认同步发送)与非持久化消息(默认异步发送)速度相差一个数量级,非持久化方式符合需求;rn需求3,使用非持久化消息(异步发送方式),在activeMQ服务器不出问题的情况下,不允许丢失数据。rnrn[b]测试发现的问题:[/b]rn异步发送非持久化信息的时候,使用内存游标方式将非持久化消息放到内存中,并使用流量控制,配置单个队列最大内存大小为50MB,在中配置sendFailIfNoSpaceAfterTimeOut=5000,在单个队列内存达到限制时(此时没有开启消费者)按理生产者应该报内存不足异常或者阻塞,但是测得生产者没有报异常,只是产生阻塞,且继续缓慢发送,为啥?rn如果接着开启消费者,按理消息将被消费,内存得到缓解,生产者会继续发送消息,但是测得最终收到的消息与发送的消息总数不等,消息丢失,如何解决?rnrn[b]分析如下:[/b]rn当使用异步发送消息(非持久化消息默认使用异步发送)时,activeMQ可能不会进行ack确认,导致生产者无法得知队列内存耗尽无法报错,但是不应该出现消息丢失啊,难道内存用尽时存在处理BUG导致消息丢失?rnrn[b]进一步分析:[/b]rn依据以上分析,当队列内存到达限制(50MB),生产者会阻塞但继续缓慢发送消息直至最终完全堵塞,查询资料使用setProducerWindowSize()对生产者“获得ack前”能够发送的消息量进行限制,推测此功能可打开异步发送批量ack确认功能,这里设置为setProducerWindowSize(1024)。从新测试,当生产者消息堵塞,然后开启消费者消费消息,按理说内存会得到恢复,生产者继续发送消息,但是测得生产者不能继续发送消息,生产者和消费者均不能允许貌似互锁,为啥?rnrn本人一直尝试各种配置,并未找到一种高效并且不会丢失消息的方案,因此求助版面各位大神推荐一种好的配置,难道是activeMQ的BUG?rn如果是BUG请英文好的大神帮忙提交到activeMQ开源社区,万分感谢,急等中ing。rnrn[b]附上测试程序与配置文件:[/b]rn生产者代码:(运行时开启一个线程调用它即可)rn[code=java]public class Sender implements Runnable rn int threadId;rn public Sender(int threadId) rn this.threadId = threadId;rn rnrn @Overridern public void run() rn try rn String user = "admin";rn String password = "activemq";rn String url = "tcp://192.168.18.151:61616";rn ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory( user, password, url);rn rn //配置AlwaysSyncSend,非持久化在资源耗尽的时候将得到通知,虽然速度会变慢.rn connectionFactory.setProducerWindowSize(1024);rn connectionFactory.setSendAcksAsync(true);//这个方法有什么用?rn// connectionFactory.setAlwaysSyncSend(true);//同步rn// connectionFactory.setProducerWindowSize(1024*1024);rn connectionFactory.setUseAsyncSend(true);//异步rn Connection connection = connectionFactory.createConnection();rn connection.start();rn Session session = connection.createSession(Boolean.FALSE, Session.AUTO_ACKNOWLEDGE);rn Destination destination = session.createQueue("test."+this.threadId);rn MessageProducer producer = session.createProducer(destination);rn Date date = new Date();rn long t1 = date.getTime();rn System.out.println("connThread"+threadId+" 开始时间:"+new Date());rn int p = 0;rn producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);rn for (int i = 0; i < 100000; i++) rn TextMessage message = session.createTextMessage();rn message.setText(Integer.toString(i));rn //Thread.sleep(1);rn try rn producer.send(message);rn p++;rn if(p%1000 == 0)rn// session.commit();rn System.out.println("connThread"+threadId+" 已发送:"+p+"条,用时:"+(new Date().getTime() - t1));rn rn// System.out.println("connThread"+threadId+" 已发送:"+p+"条,用时:"+(new Date().getTime() - t1));rn catch (Exception e) rn e.printStackTrace();rn rn// session.commit();rn rn //System.out.println("--发送消息:" + date);rn rn rn System.out.println("connThread"+threadId+" 共发送"+p+"条,结束时间:"+new Date());rn// System.out.println("connThread"+threadId+" 共用时:"+(new Date().getTime() - t1));rn //session.commit();rn session.close();rn connection.close();rn catch (JMSException e) rn e.printStackTrace();rn rn rnrn[/code]消费者代码:rn[code=java]public class ConnConsumer rn public static int threadId = 0;rn public static void main(String[] args) throws JMSException, InterruptedExceptionrn for(int i=0; i<15; i++)rn ConnConsumer.receive(threadId++);rn rn Thread.sleep(3*24*60*60*1000);rn rn rn public static void receive(int threadId) throws InterruptedExceptionrn try rn String user = "admin";rn String password = "activemq";rn String url = "tcp://192.168.18.151:61616"; //rn ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory( user, password, url);rn //异步分发,当使用listener时是异步,receive是同步rn// connectionFactory.setDispatchAsync(true);rn Connection connection = connectionFactory.createConnection();rn connection.start();rn final Session session = connection.createSession(Boolean.FALSE, Session.AUTO_ACKNOWLEDGE);rn Destination destination = session.createQueue("TEST."+threadId);rn MessageConsumer message = session.createConsumer(destination);rn message.setMessageListener(new MsgListener(threadId));rn //Thread.sleep(3*24*60*60*1000);rn //session.close();rn //connection.close();rn catch (JMSException e) rn e.printStackTrace();rn rn rn[/code]rnrn[code=java]public class MsgListener implements MessageListener rn int threadId;rn int count = 0;rn Date date = new Date();rn long t1 = date.getTime();rn rn int sum = 0;rn rn public MsgListener(int threadId) rn System.out.println("threadId:"+threadId+"启动监听");rn this.threadId = threadId;rn rnrn @Overridern public void onMessage(Message msg) rn TextMessage message = (TextMessage) msg;rn// try rn// sum += Integer.parseInt(message.getText());rn// catch (NumberFormatException e) rn// // TODO Auto-generated catch blockrn// e.printStackTrace();rn// catch (JMSException e) rn// // TODO Auto-generated catch blockrn// e.printStackTrace();rn// rn //System.out.println("--收到消息:" + new Date(message.getLong("count")));rn rn count ++;rn if(count%1000 == 0)rn System.out.println("connThread"+threadId+" 接收:"+count+"条,用时:"+(new Date().getTime() - t1));rn else if(count == 1)rn System.out.println("connThread"+threadId+" 开始时间:"+new Date());rn rn// System.out.println("sum is " + sum);rn //session.commit();rn rnrn[/code]配置文件:rn[code=java]….rnrn rn rn rn rn rn….rnrn rn rn rn rn rn rn rn rn rn rn rn rn rn…[/code]
C3P0 老是报错,求大神!!!
[code=java]rn[2013-02-14 20:37:46] WARN [com.mchange.v2.resourcepool.BasicResourcePool] - Failed to destroy resource: com.mchange.v2.c3p0.impl.NewPooledConnection@14c7262rnjava.util.ConcurrentModificationExceptionrn at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)rn at java.util.HashMap$KeyIterator.next(HashMap.java:828)rn at com.mysql.jdbc.Connection.closeAllOpenStatements(Connection.java:2191)rn at com.mysql.jdbc.Connection.realClose(Connection.java:4777)rn at com.mysql.jdbc.Connection.close(Connection.java:2172)rn at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:474)rn at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:191)rn at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:470)rn at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:964)rn at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)[/code]rnrn[code=java][2013-02-15 11:48:15] WARN [com.mchange.v2.resourcepool.BasicResourcePool] - com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@11079b5 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception: rncom.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: rnrn** BEGIN NESTED EXCEPTION ** rnrnjava.net.SocketExceptionrnMESSAGE: java.net.SocketException: No buffer space available (maximum connections reached?): connectrnrnSTACKTRACE:rnrnjava.net.SocketException: java.net.SocketException: No buffer space available (maximum connections reached?): connectrn at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)rn at com.mysql.jdbc.MysqlIO.(MysqlIO.java:276)rn at com.mysql.jdbc.Connection.createNewIO(Connection.java:2666)rn at com.mysql.jdbc.Connection.(Connection.java:1531)rn at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)rn at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:135)rn at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)rn at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)rn at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)rn at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)rn at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)rn at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)rn at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)rnrnrn** END NESTED EXCEPTION **rnrnrnrnLast packet sent to the server was 0 ms ago.rn at com.mysql.jdbc.Connection.createNewIO(Connection.java:2741)rn at com.mysql.jdbc.Connection.(Connection.java:1531)rn at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)rn at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:135)rn at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)rn at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)rn at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)rn at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)rn at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)rn at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)rn at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)rn[2013-02-15 11:49:43] WARN [com.mchange.v2.async.ThreadPoolAsynchronousRunner] - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@9184d1 -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!rn[2013-02-15 11:49:44] WARN [com.mchange.v2.async.ThreadPoolAsynchronousRunner] - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@9184d1 -- APPARENT DEADLOCK!!! Complete Status: rn Managed Threads: 3rn Active Threads: 0rn Active Tasks: rn Pending Tasks: rn com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@1217953rn com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@a45b9arn com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@79e819rn com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@174e98frn com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@91be7frn com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@719386rn com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@8c7d1crnPool thread stack traces:rn Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1,5,]rn Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0,5,]rn Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2,5,][/code]
AlertDialog的点击事件报错!!!求大神
[code=java]final ListView lv=(ListView)findViewById(R.id.listView1);rn final ArrayList> listItem = new ArrayList>();rn HashMap map = new HashMap();rn final SimpleAdapter mSimpleAdapter=new SimpleAdapter(this,listItem,R.layout.item,new String[]"1","2",new int[]R.id.itemtext1,R.id.itemtext2);rn lv.setAdapter(mSimpleAdapter);rn Button btn=(Button)findViewById(R.id.add);rn btn.setOnClickListener(new View.OnClickListener() rn rn @Overridern public void onClick(View v) rn // TODO 自动生成的方法存根rn Builder builder=new AlertDialog.Builder(MainActivity.this);rn builder.setTitle("添加任务:");rn LayoutInflater inflater=getLayoutInflater();rn View view=inflater.inflate(R.layout.addactivity, null);rn builder.setView(view);rn builder.setPositiveButton("添加", new DialogInterface.OnClickListener() rn rn @Overridern public void onClick(DialogInterface dialog, int which) rn // TODO 自动生成的方法存根rn EditText editname=(EditText)findViewById(R.id.editName);rn String name=editname.getText().toString();rn EditText edittime=(EditText)findViewById(R.id.editTime);rn String time=edittime.getText().toString();rn HashMap map = new HashMap();rn map.put("1", name);rn map.put("2", time);rn rn listItem.add(map);rn rn mSimpleAdapter.notifyDataSetChanged();rn rn );rn builder.setNegativeButton("取消", null);rn builder.create().show();rn rn );[/code]rnrnrn这是代码,简单说一下,在主界面放一个button和一个listview,点击button弹出AlertDialog,AlertDialog是通过addactivity.xml来布局的,在AlertDialog里面有两个EditText(editName,editTime),我希望通过setPosttiveButton获取这两个EditText的值,放到主界面的ListView里面,可是这样报错,大神帮忙看一下哪里错了,谢谢
求大神帮助,delete报错
程序在delete那句中断rn源代码:rn#include< iostream >rn#include< vector >rnusing std::vector;rn#include< string >rnusing namespace std;rnrnchar* tran(string str)rnrn char* t = new char[strlen(str.c_str()) + 1];rn char* p = t;rn strcpy_s(p,strlen(str.c_str())+1,str.c_str());rn while (*p != 0)rn rn if (*p >= 'a'&&*p <= 'z')rn * (p++) -= 32;rn elsern ++p;rn rn p[strlen(str.c_str())] = 0;rn return t;rnrnvoid main()rnrn vector< string > v;rn string s;rn char * t;rn while (cin >> s&&*(s.c_str()) != '#')rn v.push_back(s);rn vector< string >::iterator iter = v.begin();rn t = tran(*iter);rn int len = strlen(t);rnrn delete[] t;////////出错////////////////rnrn system("pause");rnrn
eclipse配置报错!求大神的解决!
[img=http://cwebmail.mail.163.com/js4/read/readpic.jsp?sid=fAhNYcRMhzLTYuEXbZMMscRxsRjCSjoR&mid=465:xtbB0RILtk9o6rcPUwAAsY&part=3&mode=inline&l=read&action=open_attach][/img]rn[img=http://cwebmail.mail.163.com/js4/read/readpic.jsp?sid=fAhNYcRMhzLTYuEXbZMMscRxsRjCSjoR&mid=465:xtbB0RILtk9o6rcPUwAAsY&part=4&mode=inline&l=read&action=open_attach][/img]rnJDK1.6rneclipse启动后报错如图:我想请教一下,是不是问题就出在配置上。。。正确的配置是什么样的?麻烦详细点~~~rnrn我是个菜鸟~~求大神解决~~
DataGrid.as 报错求大神解惑
我已经完全不知道怎么修改了,跪求各位大神伸手rnrn报错信息如下 rnTypeError: Error #1009: 无法访问空对象引用的属性或方法。rn at mx.controls::DataGrid/destroyItemEditor()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\controls\DataGrid.as:4026]rn at mx.controls::DataGrid/itemEditorItemEditEndHandler()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\controls\DataGrid.as:4934]rn at flash.events::EventDispatcher/dispatchEventFunction()rn at flash.events::EventDispatcher/dispatchEvent()rn at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\core\UIComponent.as:9590]rn at mx.controls::DataGrid/endEdit()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\controls\DataGrid.as:4085]rn at mx.controls::DataGrid/editorMouseDownHandler()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\controls\DataGrid.as:4640]rn会调用两次 第一次_editedItemPosition 有值 第二次为null 报错 dataGrid.as 中4026行 if (! _columns[_editedItemPosition.columnIndex].rendererIsEditor) 报错rnrn
CCS报错 求大神帮忙
编译到 sin或cos函数行 报错rnerror: expression must have (pointer-to-) function typernwarning: variable "sin" is used before its value is setrnrn求大神指导啊
JavaWb405报错求大神帮忙!
public class UserServlet extends HttpServlet { public UserServlet() { super(); } public void destroy() { super.destroy(); } public void doGet(HttpServletRequest request, HttpServletResponse response...
springmvc+mybatis3.3报错,求大神解答
[DEBUG]2015-08-11 22:34:39,338 org.springframework.web.servlet.DispatcherServlet Could not complete requestrnorg.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.ExceptionInInitializerErrorrn at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:972)rn at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)rn at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)rn at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)rn at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)rn at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)rn at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)rn at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)rn at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)rn at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)rn at java.lang.Thread.run(Unknown Source)rnCaused by: java.lang.ExceptionInInitializerErrorrn at cn.sg.dao.impl.ProductDaoImpl.qryProductByPage(ProductDaoImpl.java:66)rn at cn.sg.service.CupboardService.qryProductByPage(CupboardService.java:23)rn at cn.sg.controller.BackStageController.QueStoreList(BackStageController.java:46)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn at java.lang.reflect.Method.invoke(Unknown Source)rn at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)rn at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)rn at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:100)rn at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:604)rn at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:565)rn at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)rn at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)rn ... 24 morernCaused by: org.apache.ibatis.exceptions.PersistenceException: rn### Error building SqlSession.rn### The error may exist in cn/sg/model/Product1.xmlrn### The error occurred while processing mapper_resultMap[tab_product]rn### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.io.IOException: Could not find resource cn/sg/model/Product1.xmlrn at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)rn at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:79)rn at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:71)rn at cn.sg.util.MyBatisUtilNew.(MyBatisUtilNew.java:29)rn ... 38 morernCaused by: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.io.IOException: Could not find resource cn/sg/model/Product1.xmlrn at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:106)rn at org.apache.ibatis.builder.xml.XMLConfigBuilder.parse(XMLConfigBuilder.java:89)rn at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:77)rn ... 40 morernCaused by: java.io.IOException: Could not find resource cn/sg/model/Product1.xmlrn at org.apache.ibatis.io.Resources.getResourceAsStream(Resources.java:108)rn at org.apache.ibatis.io.Resources.getResourceAsStream(Resources.java:95)rn at org.apache.ibatis.builder.xml.XMLConfigBuilder.mapperElement(XMLConfigBuilder.java:317)rn at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:104)rn ... 42 morern八月 11, 2015 10:34:39 下午 org.apache.catalina.core.StandardWrapperValve invokern严重: Servlet.service() for servlet [sasmvc] in context with path [/CUPBOARD] threw exception [Handler processing failed; nested exception is java.lang.ExceptionInInitializerError] with root causernjava.io.IOException: Could not find resource cn/sg/model/Product1.xmlrn at org.apache.ibatis.io.Resources.getResourceAsStream(Resources.java:108)rn at org.apache.ibatis.io.Resources.getResourceAsStream(Resources.java:95)rn at org.apache.ibatis.builder.xml.XMLConfigBuilder.mapperElement(XMLConfigBuilder.java:317)rn at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:104)rn at org.apache.ibatis.builder.xml.XMLConfigBuilder.parse(XMLConfigBuilder.java:89)rn at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:77)rn at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:71)rn at cn.sg.util.MyBatisUtilNew.(MyBatisUtilNew.java:29)rn at cn.sg.dao.impl.ProductDaoImpl.qryProductByPage(ProductDaoImpl.java:66)rn at cn.sg.service.CupboardService.qryProductByPage(CupboardService.java:23)rn at cn.sg.controller.BackStageController.QueStoreList(BackStageController.java:46)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn at java.lang.reflect.Method.invoke(Unknown Source)rn at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)rn at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)rn at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:100)rn at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:604)rn at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:565)rn at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)rn at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)rn at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)rn at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)rn at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)rn at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)rn at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)rn at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)rn at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)rn at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)rn at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)rn at java.lang.Thread.run(Unknown Source)
excel导出报错,求大神解决
程序在本机跑很好,发布在服务器上,开始也能导出excel,但是过一段时间,大概3天后,就导出报错,提示如下rnRetrieving the COM class factory for component with CLSID 00024500-0000-0000-C000-000000000046 failed due to the following error: 8000401a 因为配置标识不正确,系统无法开始服务器进程。请检查用户名和密码。 (Exception from HRESULT: 0x8000401A). rnrnMicrosoft.Office.Interop.Excel.Application app = new Microsoft.Office.Interop.Excel.Application();//这里报错的rnrn然后我又部署一个新版本上去,又好了,但是过几天后又出现这个问题,网上查应该是权限问题,试了几种方法都没有用,请大神们帮看看。rnrn
相关热词 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池 c#5.0 安装程序 c# 分页算法