facebook

[Closed] Problems converting project from eclipse 2.1 to 3.1

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #244052 Reply

    – System Setup ——————————-
    Operating System and version: Windows 2000
    Eclipse version: 3.1.1
    Eclipse build id: M20050929-0840
    Fresh Eclipse install (y/n): y
    If not, was it upgraded to its current version using the update manager?
    Other installed external plugins: N/A
    Number of plugins in the <eclipse>/plugins directory that begin with org.eclipse.pde.*: 7
    MyEclipse version: 4.0.1
    Eclipse JDK version: 5
    Application Server JDK version: 1.4.1_02
    Are there any exceptions in the Eclipse log file? yes

    If this is a DB related question please answer the following: N/A

    – Message Body ——————————-

    Using JRUN 4 as application server and struts 1.1-b3.

    Project works fine under eclipse 2.1 (MyEclipse 2.6.2). Will not work properly under 3.1.1.

    Eclipse debug launch log:
    Starting Macromedia JRun 4 (Build 61650), default server
    01/05 09:27:38 info JRun Naming Service listening on *:2908
    01/05 09:27:41 info JRunDataSource bound to JNDI under name RED_Pool
    01/05 09:27:41 info JRun DataSourceService: Created JDBC XA Connection Pool named RED_Pool
    01/05 09:27:41 info Bound a LinkRef from “DefaultDataSource” to the default DataSource “RED_Pool”
    01/05 09:27:41 info JRun Web Server listening on *:8100
    01/05 09:27:42 info Deploying enterprise application “JRun 4.0 Internal J2EE Components” from: file:/C:/JRun4/lib/jrun-comp.ear
    01/05 09:27:42 info Deploying EJB “JRunSQLInvoker” from: file:/C:/JRun4/lib/jrun-comp.ear
    01/05 09:27:43 info Deploying enterprise application “default-ear” from: file:/C:/JRun4/servers/default/default-ear/
    01/05 09:27:43 info Deploying web application “JRun Default Web Application” from: file:/C:/JRun4/servers/default/default-ear/
    01/05 09:27:45 info Web Services in default-ear#default-war:
    01/05 09:27:45 info AdminService
    01/05 09:27:46 user JSPServlet: init
    01/05 09:27:46 info Deploying web application “Web Application Settings” from: file:/C:/JRun4/servers/default/REDWeb/
    01/05 09:27:47 user JSPServlet: init
    01/05 09:27:50 user action: init
    – Initializing, config=’org.apache.struts.util.LocalStrings’, returnNull=true
    – Initializing, config=’org.apache.struts.action.ActionResources’, returnNull=true
    – Begin event threw exception
    java.lang.reflect.InvocationTargetException
    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:324)
    at org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1789)
    at org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.java:1684)
    at org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:1713)
    at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:924)
    at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:729)
    at org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java:259)
    at org.apache.commons.digester.Rule.begin(Rule.java:200)
    at org.apache.commons.digester.Digester.startElement(Digester.java:1268)
    at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1488)
    at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
    at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
    at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
    at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
    at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
    at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
    at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
    at org.apache.commons.digester.Digester.parse(Digester.java:1543)
    at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:944)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:468)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at jrun.servlet.WebApplicationService.loadServlet(WebApplicationService.java:1204)
    at jrun.servlet.WebApplicationService.preloadServlets(WebApplicationService.java:762)
    at jrun.servlet.WebApplicationService.postStart(WebApplicationService.java:257)
    at jrun.deployment.DeployerService.initModules(DeployerService.java:711)
    at jrun.deployment.DeployerService.createWatchedDeployment(DeployerService.java:242)
    at jrun.deployment.DeployerService.deploy(DeployerService.java:430)
    at jrun.deployment.DeployerService.checkWatchedDirectories(DeployerService.java:179)
    at jrun.deployment.DeployerService.run(DeployerService.java:891)
    at jrunx.scheduler.SchedulerService.invokeRunnable(SchedulerService.java:223)
    at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    Caused by: java.lang.UnsupportedClassVersionError: com/citigroup/struts/appMain/MainMenuForm (Unsupported major.minor version 49.0)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at jrunx.util.JRunURLClassLoader.defineClass(JRunURLClassLoader.java:187)
    at jrunx.util.JRunURLClassLoader.findClass(JRunURLClassLoader.java:152)
    at jrunx.util.DynamicClassLoader$SlaveURLClassLoader.findClass(DynamicClassLoader.java:229)
    at jrunx.util.DynamicClassLoader.findClass(DynamicClassLoader.java:102)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
    at jrunx.util.JRunURLClassLoader.loadClass(JRunURLClassLoader.java:77)
    at jrunx.util.JRunURLClassLoader.loadClass(JRunURLClassLoader.java:69)
    at org.apache.struts.config.FormBeanConfig.formBeanClass(FormBeanConfig.java:320)
    at org.apache.struts.config.FormBeanConfig.setType(FormBeanConfig.java:191)
    … 35 more
    – Parsing error processing resource path
    java.lang.reflect.InvocationTargetException
    at org.apache.commons.digester.Digester.createSAXException(Digester.java:2383)
    at org.apache.commons.digester.Digester.createSAXException(Digester.java:2409)
    at org.apache.commons.digester.Digester.startElement(Digester.java:1271)
    at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1488)
    at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
    at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
    at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
    at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
    at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
    at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
    at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
    at org.apache.commons.digester.Digester.parse(Digester.java:1543)
    at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:944)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:468)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at jrun.servlet.WebApplicationService.loadServlet(WebApplicationService.java:1204)
    at jrun.servlet.WebApplicationService.preloadServlets(WebApplicationService.java:762)
    at jrun.servlet.WebApplicationService.postStart(WebApplicationService.java:257)
    at jrun.deployment.DeployerService.initModules(DeployerService.java:711)
    at jrun.deployment.DeployerService.createWatchedDeployment(DeployerService.java:242)
    at jrun.deployment.DeployerService.deploy(DeployerService.java:430)
    at jrun.deployment.DeployerService.checkWatchedDirectories(DeployerService.java:179)
    at jrun.deployment.DeployerService.run(DeployerService.java:891)
    at jrunx.scheduler.SchedulerService.invokeRunnable(SchedulerService.java:223)
    at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    01/05 09:27:53 error Could not pre-load servlet: action
    javax.servlet.UnavailableException: Parsing error processing resource path
    at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:952)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:468)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at jrun.servlet.WebApplicationService.loadServlet(WebApplicationService.java:1204)
    at jrun.servlet.WebApplicationService.preloadServlets(WebApplicationService.java:762)
    at jrun.servlet.WebApplicationService.postStart(WebApplicationService.java:257)
    at jrun.deployment.DeployerService.initModules(DeployerService.java:711)
    at jrun.deployment.DeployerService.createWatchedDeployment(DeployerService.java:242)
    at jrun.deployment.DeployerService.deploy(DeployerService.java:430)
    at jrun.deployment.DeployerService.checkWatchedDirectories(DeployerService.java:179)
    at jrun.deployment.DeployerService.run(DeployerService.java:891)
    at jrunx.scheduler.SchedulerService.invokeRunnable(SchedulerService.java:223)
    at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

    01/05 09:27:53 info Deploying enterprise application “Macromedia Flash Remoting MX EAR” from: file:/C:/JRun4/lib/flashgateway.ear
    01/05 09:27:54 info Deploying web application “Macromedia Flash Remoting MX” from: file:/C:/JRun4/lib/flashgateway.ear
    01/05 09:27:54 user JSPServlet: init
    01/05 09:27:54 user FlashGatewayServlet: init
    01/05 09:27:55 info Deploying web application “file:/C:/JRun4/web-apps/crystal/” from: file:/C:/JRun4/web-apps/crystal/
    01/05 09:27:55 user JSPServlet: init
    Server default ready (startup time: 23 seconds)
    01/05 09:29:15 user FileServlet: init
    – Initializing, config=’org.apache.struts.taglib.html.LocalStrings’, returnNull=true
    – Initializing, config=’org.apache.struts.util.LocalStrings’, returnNull=true
    – Initializing, config=’org.apache.struts.taglib.bean.LocalStrings’, returnNull=true
    01/05 09:29:22 error Unhandled exception thrown from /index.jsp:9
    [1]javax.servlet.jsp.JspException: Cannot find message resources under key org.apache.struts.action.MESSAGE
    at org.apache.struts.util.RequestUtils.message(RequestUtils.java:939)
    at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:295)
    at jrun__index2ejspa._jspService(jrun__index2ejspa.java:66)
    at jrun.jsp.runtime.HttpJSPServlet.service(HttpJSPServlet.java:43)
    at jrun.jsp.JSPServlet.service(JSPServlet.java:119)
    at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
    at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at jrun.servlet.JRunRequestDispatcher.invokeNext(JRunRequestDispatcher.java:439)
    at jrun.servlet.JRunRequestDispatcher.forwardInvoke(JRunRequestDispatcher.java:409)
    at jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:178)
    at jrun.servlet.file.FileServlet.service(FileServlet.java:300)
    at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
    at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:252)
    at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
    at jrun.servlet.http.WebService.invokeRunnable(WebService.java:168)
    at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    [0]jrun.jsp.runtime.UncaughtPageException: Unhandled exception thrown from /index.jsp:9
    at jrun.jsp.runtime.Utils.handleException(Utils.java:57)
    at jrun.jsp.runtime.JRunPageContext.handlePageException(JRunPageContext.java:384)
    at jrun__index2ejspa._jspService(jrun__index2ejspa.java:244)
    at jrun.jsp.runtime.HttpJSPServlet.service(HttpJSPServlet.java:43)
    at jrun.jsp.JSPServlet.service(JSPServlet.java:119)
    at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
    at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at jrun.servlet.JRunRequestDispatcher.invokeNext(JRunRequestDispatcher.java:439)
    at jrun.servlet.JRunRequestDispatcher.forwardInvoke(JRunRequestDispatcher.java:409)
    at jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:178)
    at jrun.servlet.file.FileServlet.service(FileServlet.java:300)
    at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
    at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:252)
    at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
    at jrun.servlet.http.WebService.invokeRunnable(WebService.java:168)
    at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

    I have tried about eight times to import this project different ways. I have imported as-is with minimal changes all the way to creating a new project under 3.1.1 and simply importing classes and JSP’s. They all seem not to properly define the struts run-time. When creating an new project under 3.1.1 and importing classes, it does seem to define the “action” OK but cannot find the message resources.

    In both cases, it does not seem to initialize the validation defined in “validation.xml”, so I know some configuration is not set up properly.

    web.xml:
    <?xml version=”1.0″ encoding=”UTF-8″?>
    <!DOCTYPE web-app PUBLIC “-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN” “http://java.sun.com/dtd/web-app_2_3.dtd”&gt;
    <web-app>

    <display-name>Web Application Settings</display-name>
    <description>Settings </description>

    <!– Action Servlet Configuration –>
    <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
    <param-name>debug</param-name>
    <param-value>4</param-value>
    </init-param>
    <init-param>
    <param-name>detail</param-name>
    <param-value>3</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>

    <servlet>
    <servlet-name>FileServlet</servlet-name>
    <servlet-class>jrun.servlet.file.FileServlet</servlet-class>
    <init-param>
    <param-name>browseDirs</param-name>
    <param-value>true</param-value>
    </init-param>
    </servlet>

    <!– Action Servlet Mapping –>
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>

    <session-config>
    <session-timeout>15</session-timeout>
    </session-config>

    <!– The Welcome File List –>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    <!– Application Tag Library Descriptor –>
    <taglib>
    <taglib-uri>/WEB-INF/app.tld</taglib-uri>
    <taglib-location>/WEB-INF/app.tld</taglib-location>
    </taglib>
    <!– Struts Tag Library Descriptors –>
    <taglib>
    <taglib-uri>/WEB-INF/lib/struts-bean.tld</taglib-uri>
    <taglib-location>/WEB-INF/lib/struts-bean.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/lib/struts-html.tld</taglib-uri>
    <taglib-location>/WEB-INF/lib/struts-html.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/lib/struts-logic.tld</taglib-uri>
    <taglib-location>/WEB-INF/lib/struts-logic.tld</taglib-location>
    </taglib>

    </web-app>

    struts-config.xml (abbreviated, a few definitions from each section):
    <?xml version=”1.0″ encoding=”UTF-8″?>
    <!DOCTYPE struts-config PUBLIC “-//Apache Software Foundation//DTD Struts Configuration 1.1//EN” “http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd”&gt;

    <struts-config>

    <!– ========== Form Bean Definitions =================================== –>
    <form-beans>

    <!– Logon form bean –>
    <form-bean name=”logonForm”
    type=”com.citigroup.struts.com.citigroup.struts.appMain.LogonForm”/>

    </form-beans>

    <!– ========== Global Forward Definitions ============================== –>
    <global-forwards>
    <forward name=”logoff” path=”/logoff.do”/>
    <forward name=”logon” path=”/logon.jsp”/>
    <forward name=”mainMenu” path=”/mainMenu.jsp”/>
    <forward name=”lookup” path=”/lookup.jsp”/>
    </global-forwards>

    <!– ========== Action Mapping Definitions ============================== –>
    <action-mappings>

    <!– Display the main menu. –>
    <action path=”/mainMenu”
    type=”com.citigroup.struts.appMain.MainMenuAction”
    scope=”request”
    name=”mainMenuForm”
    input=”mainMenu”>
    <forward name=”noSelection” path=”/mainMenu.jsp”/>
    </action>

    </action-mappings>

    <!– ========== Controller Configuration ================================ –>

    <controller>
    <!– The “input” parameter on “action” elements is the name of a
    local or global “forward” rather than a subapp-relative path –>
    <set-property property=”inputForward” value=”true”/>
    </controller>

    <!– ========== Message Resources Definitions =========================== –>
    <message-resources parameter=”com.citigroup.struts.ApplicationResources” />

    <!– ========== Plug Ins Configuration ================================== –>

    <plug-in className=”com.citigroup.struts.oracleDB.OraclePlugIn”>
    </plug-in>

    <plug-in className=”org.apache.struts.validator.ValidatorPlugIn”>
    <set-property property=”pathnames”
    value=”/WEB-INF/validator-rules.xml, /WEB-INF/validation.xml”/>
    </plug-in>

    </struts-config>

    Any considerations I missed when converting projects?

    #244060 Reply

    OK. Making progress. Spent a day searching the wrong error messages from above. Searched on java.lang.reflect.InvocationTargetException and got the clue that it had to do with the JDK’s. I changed everything to use 1.4.1_02 and it seems to get past the error. However, is there a way to use JDK 5 in my project? JRUN uses 1.4.1_02, so does that mean that I have to use the same JDK in Eclipse and my project?

    #244078 Reply

    Greg
    Member

    I believe that you can’t use java5 if your appserver only understands java1.4. It will throw exceptions like (Unsupported major.minor version 49.0) which I see in your error ouput. Are you using any java5 features? You can make eclipse compile java1.4 code only but you will need to start your JRun with 1.4.X jvm if that is all it supports. You can make MyEclipse start your JRun with a different JDK that you are using for eclipse if you prefer.

    #244088 Reply

    It’s more clear now. It should have been obvious. JRUN is running it, so I have to give the appserver what it needs. I am not using any features from JAVA5 yet, but like to stay up with things. I will have to look into JRUN as far as supporting JAVA5. I know how to make Eclipse use JDK 1.4. This can be closed.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: [Closed] Problems converting project from eclipse 2.1 to 3.1

You must be logged in to post in the forum log in