[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-2190) Project with first upper case letter has "no application scope" error

Pete Muir (JIRA) jira-events at lists.jboss.org
Sat Aug 30 12:54:44 EDT 2008


    [ https://jira.jboss.org/jira/browse/JBIDE-2190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12427457#action_12427457 ] 

Pete Muir commented on JBIDE-2190:
----------------------------------

As I have said before, stop putting stuff in MANIFEST.MF, and use the recommended Seam layout (jboss-seam.jar declared as an ejb module in application and placed in the root of the ear, and all other libs in the lib/ dir) - I know WTP doesn't support EE5 properly, but that must be fixed soon!

I traced the problem down to declaring the the jboss-seam.jar as an ejb module (which is correct under EE5 spec) AND declaring in the MANIFEST.MF. I checked the JEE spec, and nowhere I can find does it say that it is valid to declare a module both in the application deployment descriptor and in the MANIFEST.MF (and it actually implies that this is a bad idea:

"Make sure that each component in the application properly describes any 
dependencies it may have on other components in the application. A Java 
EE application should not assume that all components in the application 
will be available on the class path of the application at run time. Each 
component might be loaded into a separate class loader with a separate 
namespace. If the classes in a JAR file depend on classes in another JAR 
file, the first JAR file should reference the second JAR file using the 
Class-Path mechanism. A notable exception to this rule is JAR files 
located in the WEB-INF/lib directory of a web application. All such JAR 
files are included in the class path of the web application at runtime; 
explicit references to them using the Class-Path mechanism are not 
needed. Another exception to this rule is JAR files located in the library 
directory (usually named lib) in the application package. Note that the 
presence of component-declaring annotations in shared artifacts, such as 
libraries in the library directory and libraries referenced by more than one 
module through Class-Path references, can have unintended and 
undesirable consequences and is not recommended. "

So, my recommendation (as for the last 10 months) is to switch to the packaging structure we use in Seam as described above.

> Project with first upper case letter has "no application scope" error
> ---------------------------------------------------------------------
>
>                 Key: JBIDE-2190
>                 URL: https://jira.jboss.org/jira/browse/JBIDE-2190
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: Seam
>    Affects Versions: 2.1.0.CR1
>         Environment: JDK 1.5.0
> OS=win32, ARCH=x86, WS=win32
> 1.1.0.CR1
>            Reporter: Anton Klimkovich
>            Assignee: Max Rydahl Andersen
>            Priority: Critical
>             Fix For: 3.0.0.beta1
>
>         Attachments: boot.log, console log.txt, console1.txt, console2.txt, seam202basedear.zip, Seam20Ear-ds.xml, Seam20Ear-ear.ear.zip, server.zip
>
>
> EXECUTE: Create Seam 2.0.1 Ear web project 
> ASSERT: jboss-seam.jar deployed to server 
> EXECUTE: Press Clean/Publish button 
> ASSERT: *-ejb.jar appeares in deploy directory 
> EXECUTE: Run project on Jboss AS 4.3 
> FAILURE: The project can not be started because of some exceptions in console. 
> Log attached. (exception.txt)
> Created Seam 2.0.1 Ear web project can be started on Jboss AS 4.2

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbosstools-issues mailing list