JDON能在GlassFish中使用么?

10-01-31 tnt2

JDON6.2能在GlassFish V3中使用么?

banq
2010-02-01 09:45

Jf是一个轻量框架,就是一个jar包,可以运行在任何Java环境中。

tnt2
2010-03-12 12:45

6.2.1提供的范例程序tesWeb_struts部署在GlassFishV3中启动时出现异常,但是好像不影响运行。

异常信息:

java.lang.ClassCastException: cannot assign instance of java.lang.String to field com.jdon.container.finder.ContainerCallback.containerWrapper of type com.jdon.container.ContainerWrapper in instance of com.jdon.container.finder.ContainerCallback

at java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2032)

at java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:1212)

at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1953)

at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)

at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)

at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)

at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)

at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)

at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)

at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)

at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)

at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)

at org.apache.catalina.session.StandardSession.readRemainingObject(StandardSession.java:1818)

at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1750)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)

at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)

at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)

at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)

at org.apache.catalina.session.StandardSession.deserialize(StandardSession.java:1063)

at org.apache.catalina.session.StandardManager.readSessions(StandardManager.java:511)

at org.apache.catalina.session.StandardManager.doLoadFromFile(StandardManager.java:441)

at org.apache.catalina.session.StandardManager.load(StandardManager.java:411)

at org.apache.catalina.session.StandardManager.start(StandardManager.java:854)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:5197)

at com.sun.enterprise.web.WebModule.start(WebModule.java:499)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:928)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:912)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:694)

at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1933)

at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1605)

at com.sun.enterprise.web.WebApplication.start(WebApplication.java:90)

at org.glassfish.internal.data.EngineRef.start(EngineRef.java:126)

at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:241)

at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:236)

at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:339)

at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:340)

at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:163)

at com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:174)

at com.sun.hk2.component.ConstructorWomb$1.run(ConstructorWomb.java:87)

at java.security.AccessController.doPrivileged(Native Method)

at com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:84)

at com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:77)

at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:58)

at com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:107)

at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:60)

at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:236)

at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:128)

at com.sun.enterprise.module.bootstrap.Main.launch(Main.java:457)

at com.sun.enterprise.module.bootstrap.Main.launch(Main.java:401)

at org.jvnet.hk2.osgiadapter.HK2Main.start(HK2Main.java:125)

at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:640)

at org.apache.felix.framework.Felix.activateBundle(Felix.java:1700)

at org.apache.felix.framework.Felix.startBundle(Felix.java:1622)

at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:915)

at org.jvnet.hk2.osgimain.Main.start(Main.java:140)

at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:640)

at org.apache.felix.framework.Felix.activateBundle(Felix.java:1700)

at org.apache.felix.framework.Felix.startBundle(Felix.java:1622)

at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1077)

at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)

at java.lang.Thread.run(Thread.java:619)

在Tomcat6.0中运行正常。

banq
2010-03-12 13:37

有关序列化问题,问题不大,可以咋container.xml中可以关闭session缓存的。