开发问题日记

1.interface org.springframework.aop.SpringProxy is not visible from class loader
解决方法:引入spring  aop的包
2.运行平台的MainApplication报了这样的错误:签名信息不匹配
Caused by: java.lang.IllegalArgumentException: protocol = http host = null
at sun.net.spi.DefaultProxySelector.select(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
... 6 more
Exception in thread "Thread-3" java.lang.ExceptionInInitializerError
at gov.gfmis.fap.framework.ApplicationSurveyor.createInitApplication(Unknown Source)
at gov.gfmis.fap.framework.MainApplication$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'applicationNew' defined in URL [jar:file:/D:/software/bea/user_projects/domains/A6/autodeploy/manager/fap/client/gov.gfmis.fap.client.framework_3.0.4.jar!/gov/gfmis/fap/framework/application.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [gov.gfmis.fap.framework.OnlineApplicationNew]: No default constructor found; nested exception is java.lang.SecurityException: class "gov.gfmis.fap.framework.systemmanager.FFrame"'s signer information does not match signer information of other classes in the same package
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at gov.gfmis.fap.framework.ApplicationFactory.<clinit>(Unknown Source)
... 3 more
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [gov.gfmis.fap.framework.OnlineApplicationNew]: No default constructor found; nested exception is java.lang.SecurityException: class "gov.gfmis.fap.framework.systemmanager.FFrame"'s signer information does not match signer information of other classes in the same package
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:58)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)
... 14 more
Caused by: java.lang.SecurityException: class "gov.gfmis.fap.framework.systemmanager.FFrame"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(Unknown Source)
at java.lang.ClassLoader.preDefineClass(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.getDeclaredConstructor(Unknown Source)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:54)
... 15 more
解决方法:jar包冲突,jar包中含有相同的包,至少是相同的包路径:gov.gfmis.fap.framework.systemmanager

3.jdbc链接oracle数据库报了这样的错误:
java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
 
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:412)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:531)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:221)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:503)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at gov.gfmis.epay.core.dao.impl.SignDaoImpl.getConn(SignDaoImpl.java:101)
at gov.gfmis.epay.core.dao.impl.SignDaoImpl.queryAllAction(SignDaoImpl.java:38)
at gov.gfmis.epay.core.ui.EPaySignConfPanel.initActionTree(EPaySignConfPanel.java:94)
at gov.gfmis.epay.core.ui.EPaySignConfPanel.createAndShowGUI(EPaySignConfPanel.java:71)
at gov.gfmis.epay.core.ui.EPaySignConfPanel$1.run(EPaySignConfPanel.java:52)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: oracle.net.ns.NetException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
 
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:385)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1042)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:301)
... 19 more
原因:数据库名不正确

4. websphere部署项目的时候遇到这样的问题:
SystemErr     R java.lang.IllegalArgumentException
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at java.util.zip.ZipInputStream.getUTF8String(ZipInputStream.java:315)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at java.util.zip.ZipInputStream.readLOC(ZipInputStream.java:254)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:89)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.NestedArchiveLoadStrategyImpl.getFiles(NestedArchiveLoadStrategyImpl.java:123)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.LoadStrategyImpl.collectFiles(LoadStrategyImpl.java:281)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ContainerImpl.getFiles(ContainerImpl.java:238)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ArchiveImpl.eGet(ArchiveImpl.java:215)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:483)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ArchiveCopySessionUtility.copyReference(ArchiveCopySessionUtility.java:97)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at org.eclipse.wst.common.internal.emf.utilities.EtoolsCopyUtility.copyCurrentReferences(EtoolsCopyUtility.java:237)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at org.eclipse.wst.common.internal.emf.utilities.EtoolsCopyUtility.primCopy(EtoolsCopyUtility.java:564)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ArchiveCopySessionUtility.primCopy(ArchiveCopySessionUtility.java:47)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at org.eclipse.wst.common.internal.emf.utilities.EtoolsCopyUtility.containmentCopy(EtoolsCopyUtility.java:107)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at org.eclipse.wst.common.internal.emf.utilities.EtoolsCopyUtility.copyManyReference(EtoolsCopyUtility.java:300)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ArchiveCopySessionUtility.copyReference(ArchiveCopySessionUtility.java:99)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at org.eclipse.wst.common.internal.emf.utilities.EtoolsCopyUtility.copyCurrentReferences(EtoolsCopyUtility.java:237)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at org.eclipse.wst.common.internal.emf.utilities.EtoolsCopyUtility.primCopy(EtoolsCopyUtility.java:564)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ArchiveCopySessionUtility.primCopy(ArchiveCopySessionUtility.java:47)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at org.eclipse.wst.common.internal.emf.utilities.EtoolsCopyUtility.containmentCopy(EtoolsCopyUtility.java:107)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at org.eclipse.wst.common.internal.emf.utilities.EtoolsCopyUtility.copyRefObjects(EtoolsCopyUtility.java:338)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at org.eclipse.wst.common.internal.emf.utilities.EtoolsCopySession.copy(EtoolsCopySession.java:52)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ArchiveCopyUtility.copy(ArchiveCopyUtility.java:135)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ArchiveCopyUtility.copy(ArchiveCopyUtility.java:90)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ArchiveCopyUtility.copy(ArchiveCopyUtility.java:121)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.CommonarchiveFactoryImpl.copy(CommonarchiveFactoryImpl.java:211)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.EARFileImpl.primAddCopyRef(EARFileImpl.java:149)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.EARFileImpl.addCopyRef(EARFileImpl.java:166)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at com.ibm.ws.management.application.client.AppInstallHelper.createEarWrapper(AppInstallHelper.java:494)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at com.ibm.ws.management.application.client.AppInstallHelper.createEarWrapper(AppInstallHelper.java:317)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at com.ibm.ws.management.application.client.AppInstallHelper.createEarWrapper(AppInstallHelper.java:284)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at com.ibm.ws.console.appmanagement.action.UploadAction.formUpload(UploadAction.java:490)
[14-2-25 15:49:35:312 CST] 0000002d SystemErr     R at com.ibm.ws.console.appmanagement.action.UploadAction.execute(UploadAction.java:141)
解决方法:部署的包中有这样的压缩包:这样的压缩包中含有中文命名的文件,删掉这些压缩包或中文名的文件

5. org.springframework.dao.DataIntegrityViolationException: Hibernate-related JDBC operation; SQL []; ORA-01861: 文字与格式字符串不匹配
; nested exception is java.sql.SQLDataException: ORA-01861: 文字与格式字符串不匹配


at org.springframework.jdbc.support.SQLExceptionSubclassTranslator.doTranslate(SQLExceptionSubclassTranslator.java:78)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:442)
at org.springframework.orm.hibernate3.HibernateTemplat
解决方法:sql中用了to_char()函数,而to_char函数要求的参数类型是date类型,如果表
中的数据不是规范的日期格式也会报上述的错误


6 加入web工程启动tamcat7时报了这样的错误:
信息: Destroying ProtocolHandler ["ajp-bio-8009"]
2015-5-28 10:10:06 org.apache.catalina.deploy.NamingResources cleanUp
警告: Failed to retrieve JNDI naming context for container [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/axis_test]] so no cleanup was performed for that container
javax.naming.NamingException: No naming context bound to this class loader
at org.apache.naming.ContextBindings.getClassLoader(ContextBindings.java:352)
at org.apache.catalina.deploy.NamingResources.cleanUp(NamingResources.java:987)
at org.apache.catalina.deploy.NamingResources.stopInternal(NamingResources.java:970)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5643)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:272)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1041)
at org.apache.catalina.core.ContainerBase.destroyInternal(ContainerBase.java:1234)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1041)
at org.apache.catalina.core.ContainerBase.destroyInternal(ContainerBase.java:1234)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:593)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:822)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.startup.Catalina.start(Catalina.java:695)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:456)
解决方法:缺少包

你可能感兴趣的:(java,日记,常见问题)