Captive Imagination
August 01, 2010, 12:00:16 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: jSeamless 1.0 Beta 7 is Available http://www.jseamless.org
 
   Home   Help Search Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: SVN Revision 2677 - Application not working  (Read 2158 times)
0 Members and 1 Guest are viewing this topic.
syam
Full Member
***
Offline Offline

Posts: 139


View Profile
« on: January 25, 2009, 11:00:02 AM »

I updated to SVN revision 2677 and my application is not working anymore. It just shows "Initializing application" and then just a blank screen.

I noticed that the servlet class is changed and I have put that in the web.xml: org.jseamless.remote.JSLServlet
Logged
darkfrog
Administrator
Inspired Imagination
*****
Offline Offline

Posts: 2650


View Profile
« Reply #1 on: January 25, 2009, 01:31:29 PM »

I tagged 1.0 and the trunk is now development for 1.1.

You have two options:
  • Change to the 1.0 tag and everything should work normally
  • Make the changes below to your project and start utilizing 1.1

First, the following must be reflected in web.xml
Code:
<servlet>
<servlet-name>jsl</servlet-name>
<servlet-class>org.jseamless.remote.JSLServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>jsl</servlet-name>
<url-pattern>/jsl/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>dwr-invoker</servlet-name>
<servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>activeReverseAjaxEnabled</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>maxWaitAfterWrite</param-name>
<param-value>-1</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>dwr-invoker</servlet-name>
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>

Create an index.jsp file in the web root of your application with the following contents:
Code:
<% response.sendRedirect("jsl/"); %>

Make sure both commons-logging-1.1.1.jar and dwr.jar are properly referenced in your libs (they can be found in the lib directory in the most recent version of "remote").

I've changed out the communication system entirely for a new more powerful system that I'll also be using in 2.0. There's a whole lot more complexity right now in setup than there will be eventually, but for now, this should get you up and going again.
Logged
syam
Full Member
***
Offline Offline

Posts: 139


View Profile
« Reply #2 on: January 27, 2009, 03:20:57 PM »

I'm now getting the following:

Code:
Jan 28, 2009 1:14:00 AM org.jseamless.remote.ServerConfiguration <init>
INFO: Initializing JSLRemoteManager: jndi:/localhost/nano/WEB-INF/jseamless.xml
Jan 28, 2009 1:14:00 AM org.jseamless.remote.ServerConfiguration processConfiguration
INFO: Initializing Applications
Jan 28, 2009 1:14:00 AM org.jseamless.remote.ServerConfiguration processConfiguration
INFO: SO successfully initialized
Jan 28, 2009 1:14:00 AM org.directwebremoting.impl.StartupUtil logStartup
INFO: Starting: DwrServlet v3.0.0.116.rc1 on Apache Tomcat/5.5.17 / JDK 1.6.0_07 from Sun Microsystems Inc. at /nano
Jan 28, 2009 1:14:00 AM org.directwebremoting.impl.DefaultCreatorManager getCreator
SEVERE: Class not found: 'Communicator'
Jan 28, 2009 1:14:00 AM org.directwebremoting.impl.DefaultCreatorManager getCreator
WARNING: Names of known classes are: __Data __System
Jan 28, 2009 1:14:00 AM org.directwebremoting.servlet.ExceptionHandler handle
WARNING: Error: java.lang.SecurityException: Class not found
Jan 28, 2009 1:14:00 AM org.directwebremoting.impl.DefaultCreatorManager getCreator
SEVERE: Class not found: 'CommunicationSession'
Jan 28, 2009 1:14:00 AM org.directwebremoting.impl.DefaultCreatorManager getCreator
WARNING: Names of known classes are: __Data __System
Jan 28, 2009 1:14:00 AM org.directwebremoting.servlet.ExceptionHandler handle
WARNING: Error: java.lang.SecurityException: Class not found
Jan 28, 2009 1:14:00 AM org.directwebremoting.impl.DefaultCreatorManager getCreator
SEVERE: Class not found: 'ClientEvent'
Jan 28, 2009 1:14:00 AM org.directwebremoting.impl.DefaultCreatorManager getCreator
WARNING: Names of known classes are: __Data __System
Jan 28, 2009 1:14:00 AM org.directwebremoting.servlet.ExceptionHandler handle
WARNING: Error: java.lang.SecurityException: Class not found

My web.xml is:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>SO</display-name>
<servlet>
<servlet-name>jsl</servlet-name>
<servlet-class>org.jseamless.remote.JSLServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>jsl</servlet-name>
<url-pattern>/jsl/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>dwr-invoker</servlet-name>
<servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>activeReverseAjaxEnabled</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>maxWaitAfterWrite</param-name>
<param-value>-1</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>dwr-invoker</servlet-name>
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>   
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>

and my jseamless.xml is:

Code:
<jseamless default="SO" maxCache="0">
<application name="SO" class="com.storedobject.ui.Frame"/>
</jseamless>

Application is deployed in webapps/nano. As instructed, I have index.jsp and it is redirecting to http://localhost:8080/nano/jsl/
At this stage, a blank page is shown.


Logged
darkfrog
Administrator
Inspired Imagination
*****
Offline Offline

Posts: 2650


View Profile
« Reply #3 on: January 28, 2009, 08:15:35 AM »

The important note from the log is:

Quote
SEVERE: Class not found: 'Communicator'

Communicator is part of the new Remote Communication system. Are you sure that's properly being referenced from your web project and available in the web context?
Logged
darkfrog
Administrator
Inspired Imagination
*****
Offline Offline

Posts: 2650


View Profile
« Reply #4 on: January 28, 2009, 12:13:09 PM »

Sorry, I just realized that I forgot to also tell you you need to create a dwr.xml file in the same directory as your web.xml (WEB-INF) with the following contents:

Code:
<!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting 3.0//EN" "http://getahead.org/dwr//dwr30.dtd">

<dwr>
<allow>
<convert converter="bean" match="org.jseamless.remote.ClientEvent"/>
<create creator="new" javascript="ClientEvent">
<param name="class" value="org.jseamless.remote.ClientEvent"/>
</create>

<convert converter="bean" match="org.jseamless.remote.Communicator"/>
<create creator="new" javascript="Communicator" scope="session">
<param name="class" value="org.jseamless.remote.Communicator"/>
</create>

<convert converter="bean" match="org.jseamless.remote.CommunicationSession"/>
<create creator="new" javascript="CommunicationSession">
<param name="class" value="org.jseamless.remote.CommunicationSession"/>
</create>

<convert converter="bean" match="org.jseamless.implementation.event.CreateImplementationEvent"/>
<create creator="new" javascript="CreateImplementationEvent">
<param name="class" value="org.jseamless.implementation.event.CreateImplementationEvent"/>
</create>

<convert converter="bean" match="org.jseamless.implementation.event.SetImplementationEvent"/>
<create creator="new" javascript="SetImplementationEvent">
<param name="class" value="org.jseamless.implementation.event.SetImplementationEvent"/>
</create>

<convert converter="bean" match="org.jseamless.implementation.event.AddImplementationEvent"/>
<create creator="new" javascript="AddImplementationEvent">
<param name="class" value="org.jseamless.implementation.event.AddImplementationEvent"/>
</create>

<convert converter="bean" match="org.jseamless.implementation.event.ActionImplementationEvent"/>
<create creator="new" javascript="ActionImplementationEvent">
<param name="class" value="org.jseamless.implementation.event.ActionImplementationEvent"/>
</create>

<convert converter="bean" match="org.jseamless.implementation.event.RemoveImplementationEvent"/>
<create creator="new" javascript="RemoveImplementationEvent">
<param name="class" value="org.jseamless.implementation.event.RemoveImplementationEvent"/>
</create>
</allow>
</dwr>

This is temporary as I'm going to convert these settings to be programmatic in the future for simplified setup, but unfortunately it's necessary at the moment.
Logged
darkfrog
Administrator
Inspired Imagination
*****
Offline Offline

Posts: 2650


View Profile
« Reply #5 on: January 28, 2009, 12:17:54 PM »

Finally, there's a new project being leveraged as well you can check out from here:

http://xjava.googlecode.com/svn/trunk

You may be interested in taking a look at the functionality the project provides...I would say it's an amazing little project, but since I wrote it I fear that would sound way too much like bragging, so I won't do that.  Tongue
Logged
syam
Full Member
***
Offline Offline

Posts: 139


View Profile
« Reply #6 on: January 28, 2009, 03:03:13 PM »

After creating dwr.xml as per your instructions, my application started working. I see some issues with initial screen painting, but I will investigate it to see if it is my problem or not.

By the by, I had a look at xjava and the concepts are excellent. In fact, with reflection and the concept listeners, it is possible to do a lot of magic in Java.
Logged
darkfrog
Administrator
Inspired Imagination
*****
Offline Offline

Posts: 2650


View Profile
« Reply #7 on: January 28, 2009, 03:31:03 PM »

Thanks...I'm going to be doing some more cleanup work to 1.1 as sort of a test phase before applying all of these new concepts to 2.0, so feel free to give criticism.
Logged
darkfrog
Administrator
Inspired Imagination
*****
Offline Offline

Posts: 2650


View Profile
« Reply #8 on: January 28, 2009, 06:38:28 PM »

Quick update here, there are some fixes just posted to the trunk that may fix some problems you've been seeing.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.207 seconds with 20 queries.