Trouble using Intellij with EJB's

Hi all. We're in the process of evaluating IntelliJ, as compared to JDeveloper, which we currently use at work.

Having installed Tomcat 4.1 and the demo of IntelliJ, we've been unable to get the IDE to run our project in a browser. We've created a group and an EJB, and a jsp to call it. We can browse to the jsp using Tomcat, but while
right click/build reports success, no class files seem to be getting created, nor can we get our jsp to reference it using initial context calls ( although it builds in the IDE, the page breaks because it cannot find the
reference in the jsp to the EJB class ).

This process has taken all of three hours, a process which was much more intuitive in JDeveloper and took about 20 minutes. The IDE looks very slick
indeed, but it seems quite counter intuitive. We're willing to consider there may be a payoff to the increased learning curve, or just that we did
something wrong early on which doomed our efforts this evening. Any suggestions for possible remedies would be most appreciated.

Christian

4 comments

Hi Christian,

EJB, and a jsp to call it. We can browse to the jsp using Tomcat, but while
right click/build reports success, no class files seem to be getting created, nor can we get our jsp to reference it using initial

context calls ( although it builds

What class files do you mean? How do you start Tomcat? Could you please describe your project configuration?

--

Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"




0

I meant the files that are created when the EJB is compiled. I actually did a new project last night and was able to compile my EJB. I created a package ( that is, I specified a package name ) and there are files inside the folder named after the package, taking the names of all the different EJB files for the bean I have created. My JSP has an import statement which takes the syntax PackageName.LocalBeanName. This compiles fine in IntelliJ.

I have Tomcat 4.1 installed, and the project is in a subdirectory of webapps. It has a META-INF and a WEB-INF folder, I believe with the correct files in them. I have added the project to the Tomcat XML config file. I am completely unable to get IntelliJ to run Tomcat to launch/debug the project. It comes back with a NULL pointer exception. I have read that this is due to Tomcat being started prior to running via the IDE, but stopping the service first does not alter the problem.

If I browse to the page from my browser, it attempts to compile the JSP and fails as it cannot resolve the package, and therefore cannot find the EJB. I have not created a .jar file, I have been told I can just leave the compiled files in the package directory and it will find them just fine.

So that's where I am. The IDE is very slick, and very helpful in writing code, but while it compiles in the IDE, the IDE cannot launch Tomcat, and Tomcat cannot see the resultant EJB file.

0

Hi Christian,

Please read carefully documentation of how to setup both a WebApp and WebApp run configuration. The documentation also mentiones
that the available Tomcat plugin can only work with Tomcat 4.0.x versions.

--

Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"


0

Thanks for the tip. I've been through all available documentation and I've come to the conclusion that it's excellent for people who already know how to use the program. It's a shame, the IDE is so slick, and getting it set up for J2EE is just too much like hard work. I'm going to have to give up at this point, and maybe check back in a year when this feature has had time to settle and some decent docs have been hopefully written.

Thanks for your time all the same.

0

Please sign in to leave a comment.