You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "bernard (JIRA)" <ji...@apache.org> on 2009/08/05 06:21:14 UTC

[jira] Created: (WICKET-2416) Exception with EJB Session Bean

Exception with EJB Session Bean
-------------------------------

                 Key: WICKET-2416
                 URL: https://issues.apache.org/jira/browse/WICKET-2416
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.4.0
         Environment: Java 1.6.
Wicket Java EE 1.1

            Reporter: bernard
            Priority: Critical


The attached testcase gets an exception

java.io.InvalidClassException: test.session.TestSessionLocal; could not resolve class [test.session.TestSessionLocal] when deserializing proxy
        at org.apache.wicket.proxy.LazyInitProxyFactory$ProxyReplacement.readResolve(LazyInitProxyFactory.java:236)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

when the user clicks through it, starting from index.html.

I can't really make any progress without a fix, or without knowing what I am doing wrong to get this.

The testcase will work out of the box with NetBeans 6.7.1 and Server: GlassFish V2 which is bundled with it.

I don't know what really causes this. It is interesting that the tescase runs ok when 
two lines are removed from Page2.java.




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-2416) Exception with EJB Session Bean

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg updated WICKET-2416:
----------------------------------

    Attachment: App.rar

> Exception with EJB Session Bean
> -------------------------------
>
>                 Key: WICKET-2416
>                 URL: https://issues.apache.org/jira/browse/WICKET-2416
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.1
>         Environment: Java 1.6.
> Wicket Java EE 1.1
>            Reporter: bernard
>            Assignee: Igor Vaynberg
>         Attachments: App.rar, testcase.zip
>
>
> The attached testcase gets an exception
> java.io.InvalidClassException: test.session.TestSessionLocal; could not resolve class [test.session.TestSessionLocal] when deserializing proxy
>         at org.apache.wicket.proxy.LazyInitProxyFactory$ProxyReplacement.readResolve(LazyInitProxyFactory.java:236)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> when the user clicks through it, starting from index.html.
> I can't really make any progress without a fix, or without knowing what I am doing wrong to get this.
> The testcase will work out of the box with NetBeans 6.7.1 and Server: GlassFish V2 which is bundled with it.
> I don't know what really causes this. It is interesting that the tescase runs ok when 
> two lines are removed from Page2.java.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2416) Exception with EJB Session Bean

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12741932#action_12741932 ] 

Igor Vaynberg commented on WICKET-2416:
---------------------------------------

ejb3 and jsf are the same kind of standard. ejb3 is for the middle tier and jsf is for the ui tier.

there are plenty of alternatives to ejb3, eg spring and guice.

anyways, this is really getting off the subject.

read this page to understand how @EJB works. http://cwiki.apache.org/WICKET/spring.html

we do not serialize the underlying implementation, we create a proxy that can serialize itself without serializing the resource, and then deserialize itself and lookup the resource.

it is the deserialization of this proxy that goes bad. when the proxy is serialized it looks like this

[name_of_class_being_proxied locator_that_can_lookup_the_class]

when the proxy deserializes it looks up the object using the locator, and creates a proxy for the named class.

in your case the serialized proxy looks like this

["test.session.TestSessionLocal" [jndi_locator "jndi_name_of_test_bea"]]

so the first part goes ok, the jndi_locator looks up an instance of TestSessionLocal from jndi.
the second part, where we create the proxy for the session bean goes wrong:

the first thing we need to do is look up the actual Class object from its name so that we can create the proxy, unfrotunately Class.forName("test.session.TestSessionLocal") returns null.

this means that the classloader used to load wicket classes cannot see your TestSessionLocal class.

i am not familiar with the ejb3 spec to a low-enough level to be able to tell if this is a "bug" or a "feature". i do know that people have been using this functionality without problems in other containers.

you might have to do some legwork to help us figure this out, eg asking on the glassfish mailing list about this.

> Exception with EJB Session Bean
> -------------------------------
>
>                 Key: WICKET-2416
>                 URL: https://issues.apache.org/jira/browse/WICKET-2416
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.0
>         Environment: Java 1.6.
> Wicket Java EE 1.1
>            Reporter: bernard
>            Priority: Minor
>         Attachments: testcase.zip
>
>
> The attached testcase gets an exception
> java.io.InvalidClassException: test.session.TestSessionLocal; could not resolve class [test.session.TestSessionLocal] when deserializing proxy
>         at org.apache.wicket.proxy.LazyInitProxyFactory$ProxyReplacement.readResolve(LazyInitProxyFactory.java:236)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> when the user clicks through it, starting from index.html.
> I can't really make any progress without a fix, or without knowing what I am doing wrong to get this.
> The testcase will work out of the box with NetBeans 6.7.1 and Server: GlassFish V2 which is bundled with it.
> I don't know what really causes this. It is interesting that the tescase runs ok when 
> two lines are removed from Page2.java.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2416) Exception with EJB Session Bean

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740991#action_12740991 ] 

Igor Vaynberg commented on WICKET-2416:
---------------------------------------

if standards are so important shouldnt you be using JSF? :)

> Exception with EJB Session Bean
> -------------------------------
>
>                 Key: WICKET-2416
>                 URL: https://issues.apache.org/jira/browse/WICKET-2416
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.0
>         Environment: Java 1.6.
> Wicket Java EE 1.1
>            Reporter: bernard
>            Priority: Minor
>         Attachments: testcase.zip
>
>
> The attached testcase gets an exception
> java.io.InvalidClassException: test.session.TestSessionLocal; could not resolve class [test.session.TestSessionLocal] when deserializing proxy
>         at org.apache.wicket.proxy.LazyInitProxyFactory$ProxyReplacement.readResolve(LazyInitProxyFactory.java:236)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> when the user clicks through it, starting from index.html.
> I can't really make any progress without a fix, or without knowing what I am doing wrong to get this.
> The testcase will work out of the box with NetBeans 6.7.1 and Server: GlassFish V2 which is bundled with it.
> I don't know what really causes this. It is interesting that the tescase runs ok when 
> two lines are removed from Page2.java.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2416) Exception with EJB Session Bean

Posted by "bernard (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12739788#action_12739788 ] 

bernard commented on WICKET-2416:
---------------------------------

There is a large number of combinations of Wicket with other complementing frameworks and implementations such as Spring, Hibernate, JBoss, Tomcat, GlassFish etc.. Uses of these individual technologies are a spread-out fairly thinly due to the fragmentation of the market and Wicket being novel.

EJB 3.0 is a substantial application development platform, and even more so, it combines and unifies some of these fragments.

I think it is in the interest of the Wicket community for Wicket to shine on this platform.

I can't comment on the classloader issues.

>From my limited application development perspective, wicket-javaee works fine in regular cases. However, the @EJB annotation crashes any page that is retrieved via PageReference#getPage(). PageReference is new in Wicket 1.4 and we application developers have been encouraged to use it as best practice to avoid serialization issues.

An application developer shouldn't need to know anything about the life cycle of an ejb reference in a wicket page. That is why we have the @EJB annotation which simplifies things.

Classloader issues should be circumventable because of the following very simple logic:

The @EJB annotated field does not contain any data that should be serialized.
It should be the same on a page retrieved via PageReference#getPage() as on a new page.

So is it possible that the same process that the @EJB annotation applies to a new page is applied to a page retrieved via PageReference#getPage()?



> Exception with EJB Session Bean
> -------------------------------
>
>                 Key: WICKET-2416
>                 URL: https://issues.apache.org/jira/browse/WICKET-2416
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.0
>         Environment: Java 1.6.
> Wicket Java EE 1.1
>            Reporter: bernard
>            Priority: Minor
>         Attachments: testcase.zip
>
>
> The attached testcase gets an exception
> java.io.InvalidClassException: test.session.TestSessionLocal; could not resolve class [test.session.TestSessionLocal] when deserializing proxy
>         at org.apache.wicket.proxy.LazyInitProxyFactory$ProxyReplacement.readResolve(LazyInitProxyFactory.java:236)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> when the user clicks through it, starting from index.html.
> I can't really make any progress without a fix, or without knowing what I am doing wrong to get this.
> The testcase will work out of the box with NetBeans 6.7.1 and Server: GlassFish V2 which is bundled with it.
> I don't know what really causes this. It is interesting that the tescase runs ok when 
> two lines are removed from Page2.java.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2416) Exception with EJB Session Bean

Posted by "bernard (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12742660#action_12742660 ] 

bernard commented on WICKET-2416:
---------------------------------

Thanks Igor for the details.

I have created https://glassfish.dev.java.net/issues/show_bug.cgi?id=9107 in the GlassFish community.




> Exception with EJB Session Bean
> -------------------------------
>
>                 Key: WICKET-2416
>                 URL: https://issues.apache.org/jira/browse/WICKET-2416
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.0
>         Environment: Java 1.6.
> Wicket Java EE 1.1
>            Reporter: bernard
>            Priority: Minor
>         Attachments: testcase.zip
>
>
> The attached testcase gets an exception
> java.io.InvalidClassException: test.session.TestSessionLocal; could not resolve class [test.session.TestSessionLocal] when deserializing proxy
>         at org.apache.wicket.proxy.LazyInitProxyFactory$ProxyReplacement.readResolve(LazyInitProxyFactory.java:236)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> when the user clicks through it, starting from index.html.
> I can't really make any progress without a fix, or without knowing what I am doing wrong to get this.
> The testcase will work out of the box with NetBeans 6.7.1 and Server: GlassFish V2 which is bundled with it.
> I don't know what really causes this. It is interesting that the tescase runs ok when 
> two lines are removed from Page2.java.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2416) Exception with EJB Session Bean

Posted by "bernard (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12741001#action_12741001 ] 

bernard commented on WICKET-2416:
---------------------------------

Igor,

There are many alternatives to JSF, however EJB 3.0 really does not have an alternative because it is a standard.

I use Wicket because it appears to be more productive than JSF. That is my compliment to the Wicket team.

I use EJB 3.0 because of its good productivity which appears to be a good match for Wicket.

However it would not be a good strategy to have Wicket productivity on the expense of breaking compatibility with the major EJB 3.0 server GlassFish, and potentially others.

At this stage, I am not in the position to try another application server yet.

If this is indeed a GlassFish issue, then I would prefer that it be raised at https://glassfish.dev.java.net/issues by a Wicket project team member for reasons of competency. In any case it would be helpful if you could identify where the issue belongs.

As I wrote before, I cannot comment on the serialization issue itself, except that in my opinion, there is no business need to serialize a shared resource that belongs to a server pool. I accept that on a lower level things might be different.

The application developer uses the @EJB annotation to avoid writing messy boiler plate code to get access to an EJB if required. The application developer does not want to know how it works - it should just be available when required. The reasonable assumption is that it should be available in a page retrieved from a page store in the same way as in a new page.

Best Regards

Bernard

> Exception with EJB Session Bean
> -------------------------------
>
>                 Key: WICKET-2416
>                 URL: https://issues.apache.org/jira/browse/WICKET-2416
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.0
>         Environment: Java 1.6.
> Wicket Java EE 1.1
>            Reporter: bernard
>            Priority: Minor
>         Attachments: testcase.zip
>
>
> The attached testcase gets an exception
> java.io.InvalidClassException: test.session.TestSessionLocal; could not resolve class [test.session.TestSessionLocal] when deserializing proxy
>         at org.apache.wicket.proxy.LazyInitProxyFactory$ProxyReplacement.readResolve(LazyInitProxyFactory.java:236)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> when the user clicks through it, starting from index.html.
> I can't really make any progress without a fix, or without knowing what I am doing wrong to get this.
> The testcase will work out of the box with NetBeans 6.7.1 and Server: GlassFish V2 which is bundled with it.
> I don't know what really causes this. It is interesting that the tescase runs ok when 
> two lines are removed from Page2.java.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-2416) Exception with EJB Session Bean

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-2416.
-----------------------------------

    Resolution: Cannot Reproduce
      Assignee: Igor Vaynberg

so i read the reply from the glassfish guy. he didnt take the time to look at this issue nor understand what the problem is. his base premise - that wicket creates a proxy to an ejb reference injected by glassfish is wrong, and so the rest of it that follows is also wrong.

wicket performs the lookup itself, never uses a reference injected by anything.

anyways, i was going to write up a long reply to this but figured that it would be more helpful if i can create a simple test case for him to see what is wrong. so, i installed netbeans and dropped the attached testcase. unfortunately, it did not work out of the box as promised with a bunch of build errors that had to do something with missing libs, whatever. so i created a new project in netbeans and dropped the sources from the testcase project. after fiddling with the libs and getting the classpath setup i finally launched the project. i clicked around a bunch but was never able to reproduce the error.

attached is my netbeans project (App.rar) i used. following is the output from glassfish, look after the wicket development mode warning. feel free to reopen the issue when you have steps for me to reproduce the error.

-----------------------------------------------------------------------------------------------------------------------------------------------
Oct 6, 2009 4:38:35 PM com.sun.enterprise.admin.servermgmt.launch.ASLauncher buildCommand
INFO: 
C:/dev/jdk6\bin\java
-Dcom.sun.aas.instanceRoot=C:/dev/sun/glassfish2/domains/domain1
-Dcom.sun.aas.ClassPathPrefix=
-Dcom.sun.aas.ClassPathSuffix=
-Dcom.sun.aas.ServerClassPath=
-Dcom.sun.aas.classloader.appserverChainJars.ee=
-Dcom.sun.aas.classloader.appserverChainJars=admin-cli.jar,admin-cli-ee.jar,j2ee-svc.jar
-Dcom.sun.aas.classloader.excludesList=admin-cli.jar,appserv-upgrade.jar,sun-appserv-ant.jar
-Dcom.sun.aas.classloader.optionalOverrideableChain.ee=
-Dcom.sun.aas.classloader.optionalOverrideableChain=webservices-rt.jar,webservices-tools.jar
-Dcom.sun.aas.classloader.serverClassPath.ee=Does not exist/lib/hadbjdbc4.jar,C:/dev/sun/glassfish2/lib/SUNWjdmk/5.1/lib/jdmkrt.jar,Does not exist/lib/dbstate.jar,Does not exist/lib/hadbm.jar,Does not exist/lib/hadbmgt.jar,C:/dev/sun/glassfish2/lib/SUNWmfwk/lib/mfwk_instrum_tk.jar
-Dcom.sun.aas.classloader.serverClassPath=C:/dev/sun/glassfish2/lib/install/applications/jmsra/imqjmsra.jar,C:/dev/sun/glassfish2/imq/lib/jaxm-api.jar,C:/dev/sun/glassfish2/imq/lib/fscontext.jar,C:/dev/sun/glassfish2/imq/lib/imqbroker.jar,C:/dev/sun/glassfish2/imq/lib/imqjmx.jar,C:/dev/sun/glassfish2/lib/ant/lib/ant.jar,C:/dev/sun/glassfish2/lib/SUNWjdmk/5.1/lib/jdmkrt.jar
-Dcom.sun.aas.classloader.sharedChainJars.ee=appserv-se.jar,appserv-ee.jar,jesmf-plugin.jar,Does not exist/lib/dbstate.jar,Does not exist/lib/hadbjdbc4.jar,jgroups-all.jar,C:/dev/sun/glassfish2/lib/SUNWmfwk/lib/mfwk_instrum_tk.jar
-Dcom.sun.aas.classloader.sharedChainJars=javaee.jar,C:/dev/jdk6/lib/tools.jar,install/applications/jmsra/imqjmsra.jar,com-sun-commons-launcher.jar,com-sun-commons-logging.jar,C:/dev/sun/glassfish2/imq/lib/jaxm-api.jar,C:/dev/sun/glassfish2/imq/lib/fscontext.jar,C:/dev/sun/glassfish2/imq/lib/imqbroker.jar,C:/dev/sun/glassfish2/imq/lib/imqjmx.jar,C:/dev/sun/glassfish2/imq/lib/imqxm.jar,webservices-rt.jar,webservices-tools.jar,mail.jar,appserv-jstl.jar,jmxremote_optional.jar,C:/dev/sun/glassfish2/lib/SUNWjdmk/5.1/lib/jdmkrt.jar,activation.jar,appserv-rt.jar,appserv-admin.jar,appserv-cmp.jar,C:/dev/sun/glassfish2/updatecenter/lib/updatecenter.jar,C:/dev/sun/glassfish2/jbi/lib/jbi.jar,C:/dev/sun/glassfish2/imq/lib/imqjmx.jar,C:/dev/sun/glassfish2/lib/ant/lib/ant.jar,dbschema.jar
-Dcom.sun.aas.configName=server-config
-Dcom.sun.aas.configRoot=C:/dev/sun/glassfish2/config
-Dcom.sun.aas.defaultLogFile=C:/dev/sun/glassfish2/domains/domain1/logs/server.log
-Dcom.sun.aas.domainName=domain1
-Dcom.sun.aas.installRoot=C:/dev/sun/glassfish2
-Dcom.sun.aas.instanceName=server
-Dcom.sun.aas.processLauncher=SE
-Dcom.sun.aas.promptForIdentity=true
-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
-Dcom.sun.enterprise.overrideablejavaxpackages=javax.help,javax.portlet
-Dcom.sun.enterprise.taglibs=appserv-jstl.jar,jsf-impl.jar
-Dcom.sun.enterprise.taglisteners=jsf-impl.jar
-Dcom.sun.updatecenter.home=C:/dev/sun/glassfish2/updatecenter
-Ddomain.name=domain1
-Djava.endorsed.dirs=C:/dev/sun/glassfish2/lib/endorsed
-Djava.ext.dirs=C:/dev/jdk6/lib/ext;C:/dev/jdk6/jre/lib/ext;C:/dev/sun/glassfish2/domains/domain1/lib/ext;C:/dev/sun/glassfish2/javadb/lib
-Djava.library.path=C:\dev\sun\glassfish2\lib;C:\dev\sun\glassfish2\lib;C:\dev\sun\glassfish2\bin;C:\dev\sun\glassfish2\bin
-Djava.security.auth.login.config=C:/dev/sun/glassfish2/domains/domain1/config/login.conf
-Djava.security.policy=C:/dev/sun/glassfish2/domains/domain1/config/server.policy
-Djava.util.logging.manager=com.sun.enterprise.server.logging.ServerLogManager
-Djavax.management.builder.initial=com.sun.enterprise.admin.server.core.jmx.AppServerMBeanServerBuilder
-Djavax.net.ssl.keyStore=C:/dev/sun/glassfish2/domains/domain1/config/keystore.jks
-Djavax.net.ssl.trustStore=C:/dev/sun/glassfish2/domains/domain1/config/cacerts.jks
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-Djmx.invoke.getters=true
-Dsun.rmi.dgc.client.gcInterval=3600000
-Dsun.rmi.dgc.server.gcInterval=3600000
-client
-XX:+UnlockDiagnosticVMOptions
-XX:MaxPermSize=192m
-Xmx512m
-XX:NewRatio=2
-XX:+LogVMOutput
-XX:LogFile=C:/dev/sun/glassfish2/domains/domain1/logs/jvm.log
-cp
C:/dev/sun/glassfish2/lib/jhall.jar;C:\dev\sun\glassfish2\lib\appserv-launch.jar
com.sun.enterprise.server.PELaunch
start
CORE5076: Using [Java HotSpot(TM) Client VM, Version 1.6.0_07] from [Sun Microsystems Inc.]
SEC1002: Security Manager is OFF.
Using MQ RA for Broker lifecycle control
SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
WEB0114: SSO is disabled in virtual server [server]
WEB0114: SSO is disabled in virtual server [__asadmin]
REgistering Custom ContextConfig
REgistering Custom Context
JTS5014: Recoverable JTS instance, serverId = [3700]
ADM1079: Initialization of AMX MBeans started
ADM1504: Here is the JMXServiceURL for the Standard JMXConnectorServer: [service:jmx:rmi:///jndi/rmi://10.64.80.175:8686/jmxrmi].  This is where the remote administrative clients should connect using the standard JMX connectors
ADM1506: Status of Standard JMX Connector: Active = [true]
JMS Service Connection URL is :mq://eve:7676/
MQJMSRA_RA1101: SJSMQ JMS Resource Adapter starting...
MQJMSRA_EB1101: EMBEDDED broker started with code =0
MQJMSRA_RA1101: SJSMQ JMSRA Started:DIRECT
LDR5010: All ejb(s) of [MEjbApp] loaded successfully!
EJB5109:EJB Timer Service started successfully for datasource [jdbc/__TimerPool]
LDR5010: All ejb(s) of [__ejb_container_timer_app] loaded successfully!
loader.error_while_loading_app_desc
java.io.FileNotFoundException: C:/dev/netbeans-ws/App/dist/gfdeploy
        at com.sun.enterprise.deployment.deploy.shared.FileArchive.open(FileArchive.java:79)
        at com.sun.enterprise.instance.AppsManager.getAppDescriptor(AppsManager.java:356)
        at com.sun.enterprise.server.ApplicationLoader.<init>(ApplicationLoader.java:112)
        at com.sun.enterprise.server.TomcatApplicationLoader.<init>(TomcatApplicationLoader.java:88)
        at com.sun.enterprise.server.ExtendedApplicationLoader.<init>(ExtendedApplicationLoader.java:94)
        at com.sun.enterprise.server.pluggable.ExtendedApplicationLoaderFactory.createApplicationLoader(ExtendedApplicationLoaderFactory.java:63)
        at com.sun.enterprise.server.ApplicationManager.getLoader(ApplicationManager.java:166)
        at com.sun.enterprise.server.AbstractManager.load(AbstractManager.java:202)
        at com.sun.enterprise.server.ApplicationLifecycle.onStartup(ApplicationLifecycle.java:224)
        at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:446)
        at com.sun.enterprise.server.ondemand.OnDemandServer.onStartup(OnDemandServer.java:134)
        at com.sun.enterprise.server.PEMain.run(PEMain.java:409)
        at com.sun.enterprise.server.PEMain.main(PEMain.java:336)
        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 com.sun.enterprise.server.PELaunch.main(PELaunch.java:415)
ERROR while loading application App
LDR5006: Failed to load deployment descriptor
com.sun.enterprise.config.ConfigException: java.io.FileNotFoundException: C:/dev/netbeans-ws/App/dist/gfdeploy
        at com.sun.enterprise.instance.AppsManager.getAppDescriptor(AppsManager.java:389)
        at com.sun.enterprise.server.ApplicationLoader.<init>(ApplicationLoader.java:112)
        at com.sun.enterprise.server.TomcatApplicationLoader.<init>(TomcatApplicationLoader.java:88)
        at com.sun.enterprise.server.ExtendedApplicationLoader.<init>(ExtendedApplicationLoader.java:94)
        at com.sun.enterprise.server.pluggable.ExtendedApplicationLoaderFactory.createApplicationLoader(ExtendedApplicationLoaderFactory.java:63)
        at com.sun.enterprise.server.ApplicationManager.getLoader(ApplicationManager.java:166)
        at com.sun.enterprise.server.AbstractManager.load(AbstractManager.java:202)
        at com.sun.enterprise.server.ApplicationLifecycle.onStartup(ApplicationLifecycle.java:224)
        at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:446)
        at com.sun.enterprise.server.ondemand.OnDemandServer.onStartup(OnDemandServer.java:134)
        at com.sun.enterprise.server.PEMain.run(PEMain.java:409)
        at com.sun.enterprise.server.PEMain.main(PEMain.java:336)
        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 com.sun.enterprise.server.PELaunch.main(PELaunch.java:415)
Caused by: java.io.FileNotFoundException: C:/dev/netbeans-ws/App/dist/gfdeploy
        at com.sun.enterprise.deployment.deploy.shared.FileArchive.open(FileArchive.java:79)
        at com.sun.enterprise.instance.AppsManager.getAppDescriptor(AppsManager.java:356)
        ... 16 more
CORE5016: Unexpected error occurred while loading applications
javax.management.MBeanException
        at com.sun.enterprise.server.ApplicationLoader.createRootMBean(ApplicationLoader.java:295)
        at com.sun.enterprise.server.AbstractManager.load(AbstractManager.java:205)
        at com.sun.enterprise.server.ApplicationLifecycle.onStartup(ApplicationLifecycle.java:224)
        at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:446)
        at com.sun.enterprise.server.ondemand.OnDemandServer.onStartup(OnDemandServer.java:134)
        at com.sun.enterprise.server.PEMain.run(PEMain.java:409)
        at com.sun.enterprise.server.PEMain.main(PEMain.java:336)
        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 com.sun.enterprise.server.PELaunch.main(PELaunch.java:415)
Caused by: java.lang.NullPointerException
        at com.sun.enterprise.management.util.J2EEManagementObjectManager.createAppMBean(J2EEManagementObjectManager.java:547)
        at com.sun.enterprise.server.ApplicationLoader.createRootMBean(ApplicationLoader.java:284)
        ... 11 more
WEB0302: Starting Sun-Java-System/Application-Server.
JBIFW0010: JBI framework ready to accept requests.
WEB0712: Starting Sun-Java-System/Application-Server HTTP/1.1 on 8080
WEB0712: Starting Sun-Java-System/Application-Server HTTP/1.1 on 8181
WEB0712: Starting Sun-Java-System/Application-Server HTTP/1.1 on 4848
SMGT0007: Self Management Rules service is enabled
Application server startup complete.
deployed with moduleid = App
LDR5010: All ejb(s) of [App] loaded successfully!
********************************************************************
*** WARNING: Wicket is running in DEVELOPMENT mode.              ***
***                               ^^^^^^^^^^^                    ***
*** Do NOT deploy to your live server(s) without changing this.  ***
*** See Application#getConfigurationType() for more information. ***
********************************************************************
going to page 3
page 3 - switching to view mode
page 3 - going to page 2 via referece
going to page 3
page 3 - switching to view mode
page 3 - going to page 2 via referece
going to page 3
page 3 - switching to view mode
page 3 - going to page 2 via referece
page 2 - incrementing counter and calling method on ejb bean
page 2 - incrementing counter and calling method on ejb bean
page 2 - incrementing counter and calling method on ejb bean
page 2 - incrementing counter and calling method on ejb bean
page 2 - incrementing counter and calling method on ejb bean
page 2 - incrementing counter and calling method on ejb bean
page 2 - incrementing counter and calling method on ejb bean
WEB0303: Stopping Sun-Java-System/Application-Server.
WEB0713: Stopping Sun-Java-System/Application-Server HTTP/1.1 on 8080
WEB0713: Stopping Sun-Java-System/Application-Server HTTP/1.1 on 8181
WEB0713: Stopping Sun-Java-System/Application-Server HTTP/1.1 on 4848
classLoader = WebappClassLoader
  delegate: false
  repositories:
----------> Parent Classloader:
EJBClassLoader : 
urlSet = []
doneCalled = false 
 Parent -> java.net.URLClassLoader@107bd0d
SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@f9968f
classLoader = WebappClassLoader
  delegate: true
  repositories:
    /WEB-INF/classes/
----------> Parent Classloader:
EJBClassLoader : 
urlSet = []
doneCalled = false 
 Parent -> java.net.URLClassLoader@107bd0d
SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@f9968f
classLoader = WebappClassLoader
  delegate: true
  repositories:
----------> Parent Classloader:
EJBClassLoader : 
urlSet = []
doneCalled = false 
 Parent -> java.net.URLClassLoader@107bd0d
SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@f9968f
classLoader = WebappClassLoader
  delegate: true
  repositories:
----------> Parent Classloader:
EJBClassLoader : 
urlSet = []
doneCalled = false 
 Parent -> java.net.URLClassLoader@107bd0d
SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@f9968f
classLoader = WebappClassLoader
  delegate: true
  repositories:
    /WEB-INF/classes/
----------> Parent Classloader:
EJBClassLoader : 
urlSet = [URLEntry : file:/C:/dev/netbeans-ws/App/dist/gfdeploy/cglib-nodep-2.1_3.jar, URLEntry : file:/C:/dev/netbeans-ws/App/dist/gfdeploy/log4j-1.2.13.jar, URLEntry : file:/C:/dev/netbeans-ws/App/dist/gfdeploy/slf4j-api-1.4.2.jar, URLEntry : file:/C:/dev/netbeans-ws/App/dist/gfdeploy/slf4j-log4j12-1.4.2.jar, URLEntry : file:/C:/dev/netbeans-ws/App/dist/gfdeploy/wicket-1.4.1.jar, URLEntry : file:/C:/dev/netbeans-ws/App/dist/gfdeploy/wicket-contrib-javaee-1.4-SNAPSHOT.jar, URLEntry : file:/C:/dev/netbeans-ws/App/dist/gfdeploy/wicket-ioc-1.4.1.jar, URLEntry : file:/C:/dev/netbeans-ws/App/dist/gfdeploy/App-ejb_jar/, URLEntry : file:/C:/dev/netbeans-ws/App/dist/gfdeploy/App-ejb.jar, URLEntry : file:/C:/dev/netbeans-ws/App/dist/gfdeploy/App-war_war/WEB-INF/classes/, URLEntry : file:/C:/dev/sun/glassfish2/domains/domain1/generated/ejb/j2ee-apps/App/]
doneCalled = false 
 Parent -> EJBClassLoader : 
urlSet = []
doneCalled = false 
 Parent -> java.net.URLClassLoader@107bd0d
SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@f9968f
classLoader = WebappClassLoader
  delegate: true
  repositories:
----------> Parent Classloader:
EJBClassLoader : 
urlSet = [URLEntry : file:/C:/dev/sun/glassfish2/domains/domain1/generated/ejb/j2ee-apps/__JWSappclients/]
doneCalled = false 
 Parent -> EJBClassLoader : 
urlSet = []
doneCalled = false 
 Parent -> java.net.URLClassLoader@107bd0d
SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@f9968f
CORE5051: Shutting down all J2EE applications ...
EJB5122:EJB Timer Service shutdown at [2009/10/06 16:40:03]
CORE5068 :  Stopping all J2EE Connector 1.5 Compliant resource adapters ...
MQJMSRA_RA1101: SJSMQ JMSRA stopping...
MQJMSRA_RA1101: SJSMQ JMSRA stopped.
RAR7094: jmsra shutdown successful.
RAR7094: __xa shutdown successful.
CORE 5061 : Resource adapters Stop() Complete
CORE5052: Application shutdown complete.
[AutoDeploy] Disabling AutoDeployment service.
JBIFW0042: JBI framework termination complete.



> Exception with EJB Session Bean
> -------------------------------
>
>                 Key: WICKET-2416
>                 URL: https://issues.apache.org/jira/browse/WICKET-2416
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.1
>         Environment: Java 1.6.
> Wicket Java EE 1.1
>            Reporter: bernard
>            Assignee: Igor Vaynberg
>         Attachments: testcase.zip
>
>
> The attached testcase gets an exception
> java.io.InvalidClassException: test.session.TestSessionLocal; could not resolve class [test.session.TestSessionLocal] when deserializing proxy
>         at org.apache.wicket.proxy.LazyInitProxyFactory$ProxyReplacement.readResolve(LazyInitProxyFactory.java:236)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> when the user clicks through it, starting from index.html.
> I can't really make any progress without a fix, or without knowing what I am doing wrong to get this.
> The testcase will work out of the box with NetBeans 6.7.1 and Server: GlassFish V2 which is bundled with it.
> I don't know what really causes this. It is interesting that the tescase runs ok when 
> two lines are removed from Page2.java.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2416) Exception with EJB Session Bean

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740990#action_12740990 ] 

Igor Vaynberg commented on WICKET-2416:
---------------------------------------

try deploying to jboss, see if you get the same problem.

> Exception with EJB Session Bean
> -------------------------------
>
>                 Key: WICKET-2416
>                 URL: https://issues.apache.org/jira/browse/WICKET-2416
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.0
>         Environment: Java 1.6.
> Wicket Java EE 1.1
>            Reporter: bernard
>            Priority: Minor
>         Attachments: testcase.zip
>
>
> The attached testcase gets an exception
> java.io.InvalidClassException: test.session.TestSessionLocal; could not resolve class [test.session.TestSessionLocal] when deserializing proxy
>         at org.apache.wicket.proxy.LazyInitProxyFactory$ProxyReplacement.readResolve(LazyInitProxyFactory.java:236)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> when the user clicks through it, starting from index.html.
> I can't really make any progress without a fix, or without knowing what I am doing wrong to get this.
> The testcase will work out of the box with NetBeans 6.7.1 and Server: GlassFish V2 which is bundled with it.
> I don't know what really causes this. It is interesting that the tescase runs ok when 
> two lines are removed from Page2.java.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2416) Exception with EJB Session Bean

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740955#action_12740955 ] 

Igor Vaynberg commented on WICKET-2416:
---------------------------------------

this has nothing to do with pagereference, it has to do with classloader visibility.

it can be reproduced without using pagerefence.

eg put @EJB on page A. Open page A in the browser, navigate to page B from a link on page A. then press the back button to go back to page A and click any link - this will force page A to be deserialized from its pagestore - causing the same serialization problem.

> Exception with EJB Session Bean
> -------------------------------
>
>                 Key: WICKET-2416
>                 URL: https://issues.apache.org/jira/browse/WICKET-2416
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.0
>         Environment: Java 1.6.
> Wicket Java EE 1.1
>            Reporter: bernard
>            Priority: Minor
>         Attachments: testcase.zip
>
>
> The attached testcase gets an exception
> java.io.InvalidClassException: test.session.TestSessionLocal; could not resolve class [test.session.TestSessionLocal] when deserializing proxy
>         at org.apache.wicket.proxy.LazyInitProxyFactory$ProxyReplacement.readResolve(LazyInitProxyFactory.java:236)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> when the user clicks through it, starting from index.html.
> I can't really make any progress without a fix, or without knowing what I am doing wrong to get this.
> The testcase will work out of the box with NetBeans 6.7.1 and Server: GlassFish V2 which is bundled with it.
> I don't know what really causes this. It is interesting that the tescase runs ok when 
> two lines are removed from Page2.java.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-2416) Exception with EJB Session Bean

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg updated WICKET-2416:
----------------------------------

    Priority: Minor  (was: Critical)

this is not critical, it is only affecting users who use wicket with wicket-javaee and deploying to containers which make javaee classloader invisible from the web classloader - which seems to be a pretty small subset since that code hasnt changed in many months and you are the first to spot the problem.


anyways, the problem is that glassfish makes ejb classloader invisible from the war classloader so wicket cannot load the class of your session bean. not really sure what we can do about this other then somehow cache which classloaders are used - but this will be broken in a clustered deployment anyways. this will need some looking into.

an idea might be to route the deserialization calls through the IClassResolver and allow you to install one that knows about your ejb classloader. the problem with this is that application threadlocal might not be set on the thread deserializing the session - this is a container-specific behavior - so it might not always work.

interesting little problem. i wonder if this is because glassfish is running on top of osgi and your ejb module and war module are treated like separate bundles with their own classloaders.

> Exception with EJB Session Bean
> -------------------------------
>
>                 Key: WICKET-2416
>                 URL: https://issues.apache.org/jira/browse/WICKET-2416
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.0
>         Environment: Java 1.6.
> Wicket Java EE 1.1
>            Reporter: bernard
>            Priority: Minor
>         Attachments: testcase.zip
>
>
> The attached testcase gets an exception
> java.io.InvalidClassException: test.session.TestSessionLocal; could not resolve class [test.session.TestSessionLocal] when deserializing proxy
>         at org.apache.wicket.proxy.LazyInitProxyFactory$ProxyReplacement.readResolve(LazyInitProxyFactory.java:236)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> when the user clicks through it, starting from index.html.
> I can't really make any progress without a fix, or without knowing what I am doing wrong to get this.
> The testcase will work out of the box with NetBeans 6.7.1 and Server: GlassFish V2 which is bundled with it.
> I don't know what really causes this. It is interesting that the tescase runs ok when 
> two lines are removed from Page2.java.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2416) Exception with EJB Session Bean

Posted by "Johan Compagner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12763039#action_12763039 ] 

Johan Compagner commented on WICKET-2416:
-----------------------------------------

i am reading this thread also a bit now.

What does this mean:
C:\Sun\AppServer\domains\domain1\lib

is this a shared lib? for all webapps?
Thats horrible even library files should always be application specific. An application server should by default have as little libs sharing over apps as possible because those are disasters waiting to happen.

But this really seems to me like a classloader problem. 

Because where does wicket jar live and where does the other stuff lives. Can the classloader of the wicket proxy stuff access your application jars/classes??
That looks to me like the problem here.

If you drop all your libraries to a shared lib
and then those libs uses a classloader that is the shared lib classloader
and they want to deserialize something 
You have a problem because that classloader cant access your application stuff.

For this i guess somewhere the IClassResolver for the actual application should be used.

> Exception with EJB Session Bean
> -------------------------------
>
>                 Key: WICKET-2416
>                 URL: https://issues.apache.org/jira/browse/WICKET-2416
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.1
>         Environment: Java 1.6.
> Wicket Java EE 1.1
>            Reporter: bernard
>            Assignee: Igor Vaynberg
>         Attachments: App.rar, testcase.zip
>
>
> The attached testcase gets an exception
> java.io.InvalidClassException: test.session.TestSessionLocal; could not resolve class [test.session.TestSessionLocal] when deserializing proxy
>         at org.apache.wicket.proxy.LazyInitProxyFactory$ProxyReplacement.readResolve(LazyInitProxyFactory.java:236)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> when the user clicks through it, starting from index.html.
> I can't really make any progress without a fix, or without knowing what I am doing wrong to get this.
> The testcase will work out of the box with NetBeans 6.7.1 and Server: GlassFish V2 which is bundled with it.
> I don't know what really causes this. It is interesting that the tescase runs ok when 
> two lines are removed from Page2.java.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (WICKET-2416) Exception with EJB Session Bean

Posted by "bernard (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

bernard reopened WICKET-2416:
-----------------------------


Igor, thanks for spending your time on this again, this is very much appreciated. Your test case was certainly helpful.
It shows that it is one of the cases where wicket-contrib-javaee actually works.

You can get your testcase to crash as follows: Copy all the jars under App\lib\ into the application server directory e.g. C:\Sun\AppServer\domains\domain1\lib
where they actually belong as these are library files not application files. Don't package them with the application
(uncheck the option "Package" in the Libraries dialog, compile tab). This will crash.

To take this one step further, to really prove what is going on, leaving the library files in C:\Sun\AppServer\domains\domain1\lib, you may then copy the file App-ejb.jar there as well and the application will NOT crash.
This possibly confirms your first assessment that this is a classloader visibility issue.

> Exception with EJB Session Bean
> -------------------------------
>
>                 Key: WICKET-2416
>                 URL: https://issues.apache.org/jira/browse/WICKET-2416
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.1
>         Environment: Java 1.6.
> Wicket Java EE 1.1
>            Reporter: bernard
>            Assignee: Igor Vaynberg
>         Attachments: App.rar, testcase.zip
>
>
> The attached testcase gets an exception
> java.io.InvalidClassException: test.session.TestSessionLocal; could not resolve class [test.session.TestSessionLocal] when deserializing proxy
>         at org.apache.wicket.proxy.LazyInitProxyFactory$ProxyReplacement.readResolve(LazyInitProxyFactory.java:236)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> when the user clicks through it, starting from index.html.
> I can't really make any progress without a fix, or without knowing what I am doing wrong to get this.
> The testcase will work out of the box with NetBeans 6.7.1 and Server: GlassFish V2 which is bundled with it.
> I don't know what really causes this. It is interesting that the tescase runs ok when 
> two lines are removed from Page2.java.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-2416) Exception with EJB Session Bean

Posted by "bernard (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

bernard updated WICKET-2416:
----------------------------

             Priority: Major  (was: Minor)
    Affects Version/s:     (was: 1.4.0)
                       1.4.1

GlassFish Community has confirmed that this is a Wicket issue not a GlassFIsh issue:

Quote:  " ... This is not a GlassFish bug.  The proxying approach that the Wicket implementation is using won't work 
for EJB references. ..."

Please read more at https://glassfish.dev.java.net/issues/show_bug.cgi?id=9107

Priority raised. 

> Exception with EJB Session Bean
> -------------------------------
>
>                 Key: WICKET-2416
>                 URL: https://issues.apache.org/jira/browse/WICKET-2416
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.1
>         Environment: Java 1.6.
> Wicket Java EE 1.1
>            Reporter: bernard
>         Attachments: testcase.zip
>
>
> The attached testcase gets an exception
> java.io.InvalidClassException: test.session.TestSessionLocal; could not resolve class [test.session.TestSessionLocal] when deserializing proxy
>         at org.apache.wicket.proxy.LazyInitProxyFactory$ProxyReplacement.readResolve(LazyInitProxyFactory.java:236)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> when the user clicks through it, starting from index.html.
> I can't really make any progress without a fix, or without knowing what I am doing wrong to get this.
> The testcase will work out of the box with NetBeans 6.7.1 and Server: GlassFish V2 which is bundled with it.
> I don't know what really causes this. It is interesting that the tescase runs ok when 
> two lines are removed from Page2.java.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2416) Exception with EJB Session Bean

Posted by "Loren (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12748446#action_12748446 ] 

Loren commented on WICKET-2416:
-------------------------------

I have compiled and run this test case using Wicket 1.4.1 and Glassfish V2.1 without error, using the back button hasn't caused any serialization problems. To compile the program I had to remove the libraries Bernard included and add the following:

For Test-ejb - just the Glassfish 2.1 library that is added when you associate the app with your application server in NetBeans and JDK 1.6.  Nothing else was required.

For Test-war -
Test-ejb
cglib-nodep-2.1_3.jar - I forget if this is required by wicket's logging, or java-ee-contrib, but it is needed.
wicket-extensions-1.4.1.jar
wicket-ioc-1.4.1.jar
wicket-contrib-javaee-1.1.jar
The Glassfish 2.1 library
JDK 1.6

To run Wicket with Glassfish you do need to add slf4j-jdk14.jar and slf4j-api.jar to /opt/glassfish/lib, because of some issue I've half forgotten with when the logging modules get loaded.  Igor, perhaps this will resolve your classloader issue?

I've been injecting ejb's into webApplications, pages, panels, and models with wicket-contrib-javaee 1.1 and Wicket 1.3 without any issues for nearly a year, it totally works.  Many thanks to the Wicket team, Filippo Diotalevi, and Maris Orbidans for making it go; please please don't discount bugs just because they involve EJB3, it's really not half bad, and some of us need to put big enterprisey technologies somewhere in our design specs for very silly, but, none the less real, reasons.

-
Loren

> Exception with EJB Session Bean
> -------------------------------
>
>                 Key: WICKET-2416
>                 URL: https://issues.apache.org/jira/browse/WICKET-2416
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.0
>         Environment: Java 1.6.
> Wicket Java EE 1.1
>            Reporter: bernard
>            Priority: Minor
>         Attachments: testcase.zip
>
>
> The attached testcase gets an exception
> java.io.InvalidClassException: test.session.TestSessionLocal; could not resolve class [test.session.TestSessionLocal] when deserializing proxy
>         at org.apache.wicket.proxy.LazyInitProxyFactory$ProxyReplacement.readResolve(LazyInitProxyFactory.java:236)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> when the user clicks through it, starting from index.html.
> I can't really make any progress without a fix, or without knowing what I am doing wrong to get this.
> The testcase will work out of the box with NetBeans 6.7.1 and Server: GlassFish V2 which is bundled with it.
> I don't know what really causes this. It is interesting that the tescase runs ok when 
> two lines are removed from Page2.java.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-2416) Exception with EJB Session Bean

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-2416.
-----------------------------------

    Resolution: Invalid

correct. you should not share your library files because then the classloader used to load wicket (the server shared classloader) cannot see your ejb or war classes.

if you really want to do this, and this is not recommended because any static variables (caches, singleton refs) are shared across all applications you have to install your own iclassresolver that knows about your server's shared classloader.

> Exception with EJB Session Bean
> -------------------------------
>
>                 Key: WICKET-2416
>                 URL: https://issues.apache.org/jira/browse/WICKET-2416
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.1
>         Environment: Java 1.6.
> Wicket Java EE 1.1
>            Reporter: bernard
>            Assignee: Igor Vaynberg
>         Attachments: App.rar, testcase.zip
>
>
> The attached testcase gets an exception
> java.io.InvalidClassException: test.session.TestSessionLocal; could not resolve class [test.session.TestSessionLocal] when deserializing proxy
>         at org.apache.wicket.proxy.LazyInitProxyFactory$ProxyReplacement.readResolve(LazyInitProxyFactory.java:236)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> when the user clicks through it, starting from index.html.
> I can't really make any progress without a fix, or without knowing what I am doing wrong to get this.
> The testcase will work out of the box with NetBeans 6.7.1 and Server: GlassFish V2 which is bundled with it.
> I don't know what really causes this. It is interesting that the tescase runs ok when 
> two lines are removed from Page2.java.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-2416) Exception with EJB Session Bean

Posted by "bernard (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

bernard updated WICKET-2416:
----------------------------

    Attachment: testcase.zip

Testcase: NetBeans 6.7.1 project.

> Exception with EJB Session Bean
> -------------------------------
>
>                 Key: WICKET-2416
>                 URL: https://issues.apache.org/jira/browse/WICKET-2416
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.0
>         Environment: Java 1.6.
> Wicket Java EE 1.1
>            Reporter: bernard
>            Priority: Critical
>         Attachments: testcase.zip
>
>
> The attached testcase gets an exception
> java.io.InvalidClassException: test.session.TestSessionLocal; could not resolve class [test.session.TestSessionLocal] when deserializing proxy
>         at org.apache.wicket.proxy.LazyInitProxyFactory$ProxyReplacement.readResolve(LazyInitProxyFactory.java:236)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> when the user clicks through it, starting from index.html.
> I can't really make any progress without a fix, or without knowing what I am doing wrong to get this.
> The testcase will work out of the box with NetBeans 6.7.1 and Server: GlassFish V2 which is bundled with it.
> I don't know what really causes this. It is interesting that the tescase runs ok when 
> two lines are removed from Page2.java.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2416) Exception with EJB Session Bean

Posted by "bernard (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740969#action_12740969 ] 

bernard commented on WICKET-2416:
---------------------------------

Igor,

Thanks for generalizing this test case. My statement "wicket-javaee works fine in regular cases" is no longer true.

That means that the @EJB annotation cannot be used in Wicket because of its page deserialization.

I think we might have a case for including wicket-javaee in wicket.

EJB 3.0 is the standard Java Enterprise technology, and Wicket should not have any issues with it. I am suggesting to raise the priority of this from "Minor" to something else.

> Exception with EJB Session Bean
> -------------------------------
>
>                 Key: WICKET-2416
>                 URL: https://issues.apache.org/jira/browse/WICKET-2416
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.0
>         Environment: Java 1.6.
> Wicket Java EE 1.1
>            Reporter: bernard
>            Priority: Minor
>         Attachments: testcase.zip
>
>
> The attached testcase gets an exception
> java.io.InvalidClassException: test.session.TestSessionLocal; could not resolve class [test.session.TestSessionLocal] when deserializing proxy
>         at org.apache.wicket.proxy.LazyInitProxyFactory$ProxyReplacement.readResolve(LazyInitProxyFactory.java:236)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> when the user clicks through it, starting from index.html.
> I can't really make any progress without a fix, or without knowing what I am doing wrong to get this.
> The testcase will work out of the box with NetBeans 6.7.1 and Server: GlassFish V2 which is bundled with it.
> I don't know what really causes this. It is interesting that the tescase runs ok when 
> two lines are removed from Page2.java.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2416) Exception with EJB Session Bean

Posted by "bernard (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12748596#action_12748596 ] 

bernard commented on WICKET-2416:
---------------------------------

The test case also fails immediately on a virtual remote Debian Linux server. The software on this Linux installation is of different origin, no NetBeans environment, pure server.
The GlassFish version is v2.1, as on the Windows computer.

I would not like to restrict the test case fail criterion to failure on pressing the browser back button. Please click through the pages. The test case fails on pressing the "Continue" button. There are additional failure scenarios as Igor pointed out, and I see them too, but this test case does not focus on them.


> Exception with EJB Session Bean
> -------------------------------
>
>                 Key: WICKET-2416
>                 URL: https://issues.apache.org/jira/browse/WICKET-2416
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.0
>         Environment: Java 1.6.
> Wicket Java EE 1.1
>            Reporter: bernard
>            Priority: Minor
>         Attachments: testcase.zip
>
>
> The attached testcase gets an exception
> java.io.InvalidClassException: test.session.TestSessionLocal; could not resolve class [test.session.TestSessionLocal] when deserializing proxy
>         at org.apache.wicket.proxy.LazyInitProxyFactory$ProxyReplacement.readResolve(LazyInitProxyFactory.java:236)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> when the user clicks through it, starting from index.html.
> I can't really make any progress without a fix, or without knowing what I am doing wrong to get this.
> The testcase will work out of the box with NetBeans 6.7.1 and Server: GlassFish V2 which is bundled with it.
> I don't know what really causes this. It is interesting that the tescase runs ok when 
> two lines are removed from Page2.java.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.