"cannot resolve package" in web.xml in multi-module project

Did my best to search for this in the forums, but I'm still stumped.

I've got a multi-module project ... J2EE app module, EJB module, and web module.

The EJB module contains all the java source, including servlets. Yes, I know this isn't
optimal .. it's just what we need to do since package restructuring is the more painful option.

The web module contains all the JSPs, static content, web.xml, etc.

The web module has the EJB module as a dependency. I've checked and checked this part.
It's definitely listed there.

Here's my problem ... the web.xml has repeated "cannot resolve package" red errors for
each of the servlet class references. I'm able to ignore web.xml to get an EAR deployed,
but my question is ... why? What can I do to get rid of the red servlet classes and validate
the web.xml file?

0
Avatar
Permanently deleted user

Did my best to search for this in the forums, but I'm still stumped.

I've got a multi-module project ... J2EE app module, EJB module, and web module.

The EJB module contains all the java source, including servlets. Yes, I know this isn't
optimal .. it's just what we need to do since package restructuring is the more painful option.

The web module contains all the JSPs, static content, web.xml, etc.

The web module has the EJB module as a dependency. I've checked and checked this part.
It's definitely listed there.

Here's my problem ... the web.xml has repeated "cannot resolve package" red errors for
each of the servlet class references. I'm able to ignore web.xml to get an EAR deployed,
but my question is ... why? What can I do to get rid of the red servlet classes and validate
the web.xml file?


Which IntelliJ IDEA version are you using?

Is your web.xml configured correctly as deployment descriptor in your
Web module settings?

0
Avatar
Permanently deleted user

Version is 6.0.4, and yes, web.xml appears in "web module settings / deployment descriptors".

Also, application.xml and jboss-app.xml appear in "Java EE Application module settings / DDs"

And, ejb-jar.xml and jbosscmp-jdbc.xml appear in "EJB module settings / DDs"

0
Avatar
Permanently deleted user

Are you usign package prefixes? I once had the same problem and could
only solve it by restructuring the directory structure to match the
package hierarchy.

Timothy Falconer wrote:

Version is 6.0.4, and yes, web.xml appears in "web module settings / deployment descriptors".

Also, application.xml and jboss-app.xml appear in "Java EE Application module settings / DDs"

And, ejb-jar.xml and jbosscmp-jdbc.xml appear in "EJB module settings / DDs"


--
Martin Fuhrer
Fuhrer Engineering AG
http://www.fuhrer.com

0
Avatar
Permanently deleted user

Are you saying I shouldn't be using package prefixes?

Right now the source root is:

./source/com/domain/project

And I set the package prefix to com.domain.project

Are you saying I should set the source root to "source" and not use a package prefix?

Can anyone else confirm that this is a problem?

0
Avatar
Permanently deleted user

Timothy Falconer ?????:

Are you saying I shouldn't be using package prefixes?

Right now the source root is:

/source/com/domain/project

And I set the package prefix to com.domain.project

Are you saying I should set the source root to "source" and not use a package prefix?

Can anyone else confirm that this is a problem?

Unfortunately seems that it's so. Could you file a JIRA request please?

0
Avatar
Permanently deleted user

Are you saying I shouldn't be using package prefixes?


No, I'm saying that Peter should fix it... :)

0

请先登录再写评论。