Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Dave Willis
Portal project has errors in Eclipse [resolved]
July 23, 2009 3:11 PM
Answer

Dave Willis

Rank: Expert

Posts: 301

Join Date: July 13, 2009

Recent Posts

Eclipse is giving me a bunch of errors in the portal project and I feel like if I can figure out what's going on there then the other problems I'm having might all fall in line. Problem is, I don't know where to start with it. I'm going to post all the errors here. It's a bit hard to read but hopefully it will give you guys an idea about what's going on. I'll be happy to provide any further information that anyone thinks might be useful for resolving this. Thanks!
-Dave
 1Description    Resource    Path    Location    Type
 2XMLConstants.NULL_NS_URI cannot be resolved    StateAwareResponseImpl.java    portal/portal-impl/src/com/liferay/portlet    line 62    Java Problem
 3XMLConstants.NULL_NS_URI cannot be resolved    PortletAppImpl.java    portal/portal-impl/src/com/liferay/portal/model/impl    line 179    Java Problem
 4Name clash: The method initialize(Subject, CallbackHandler, Map<String,?>, Map<String,?>) of type PortalLoginModule has the same erasure as initialize(Subject, CallbackHandler, Map, Map) of type LoginModule but does not override it    PortalLoginModule.java    portal/portal-impl/src/com/liferay/portal/security/jaas    line 100    Java Problem
 5Name clash: The method initialize(Subject, CallbackHandler, Map<String,?>, Map<String,?>) of type PortalLoginModule has the same erasure as initialize(Subject, CallbackHandler, Map, Map) of type LoginModule but does not override it    PortalLoginModule.java    portal/portal-kernel/src/com/liferay/portal/kernel/security/jaas    line 61    Java Problem
 6The type PortalLoginModule must implement the inherited abstract method LoginModule.initialize(Subject, CallbackHandler, Map, Map)    PortalLoginModule.java    portal/portal-impl/src/com/liferay/portal/security/jaas    line 41    Java Problem
 7The type PortalLoginModule must implement the inherited abstract method LoginModule.initialize(Subject, CallbackHandler, Map, Map)    PortalLoginModule.java    portal/portal-kernel/src/com/liferay/portal/kernel/security/jaas    line 39    Java Problem
 8The method getGroups(long, LdapContext, int, String, String) is undefined for the type PortalLDAPUtil    PortalLDAPUtil.java    portal/portal-impl/src/com/liferay/portal/security/ldap    line 380    Java Problem
 9The method getGroups(long, LdapContext, int) is undefined for the type PortalLDAPUtil    PortalLDAPUtil.java    portal/portal-impl/src/com/liferay/portal/security/ldap    line 576    Java Problem
10The method getUsers(long, LdapContext, int, String, String) is undefined for the type PortalLDAPUtil    PortalLDAPUtil.java    portal/portal-impl/src/com/liferay/portal/security/ldap    line 505    Java Problem
11The method getUsers(long, LdapContext, int) is undefined for the type PortalLDAPUtil    PortalLDAPUtil.java    portal/portal-impl/src/com/liferay/portal/security/ldap    line 558    Java Problem
12The type NamingEnumeration is not generic; it cannot be parameterized with arguments <? extends Attribute>    PortalLDAPUtil.java    portal/portal-impl/src/com/liferay/portal/security/ldap    line 1055    Java Problem
13The type NamingEnumeration is not generic; it cannot be parameterized with arguments <SearchResult>    PortalLDAPUtil.java    portal/portal-impl/src/com/liferay/portal/security/ldap    line 371    Java Problem
14The type NamingEnumeration is not generic; it cannot be parameterized with arguments <SearchResult>    PortalLDAPUtil.java    portal/portal-impl/src/com/liferay/portal/security/ldap    line 383    Java Problem
15The type NamingEnumeration is not generic; it cannot be parameterized with arguments <SearchResult>    PortalLDAPUtil.java    portal/portal-impl/src/com/liferay/portal/security/ldap    line 419    Java Problem
16The type NamingEnumeration is not generic; it cannot be parameterized with arguments <SearchResult>    PortalLDAPUtil.java    portal/portal-impl/src/com/liferay/portal/security/ldap    line 496    Java Problem
17The type NamingEnumeration is not generic; it cannot be parameterized with arguments <SearchResult>    PortalLDAPUtil.java    portal/portal-impl/src/com/liferay/portal/security/ldap    line 508    Java Problem
18The type NamingEnumeration is not generic; it cannot be parameterized with arguments <SearchResult>    PortalLDAPUtil.java    portal/portal-impl/src/com/liferay/portal/security/ldap    line 558    Java Problem
19The type NamingEnumeration is not generic; it cannot be parameterized with arguments <SearchResult>    PortalLDAPUtil.java    portal/portal-impl/src/com/liferay/portal/security/ldap    line 576    Java Problem
20The type NamingEnumeration is not generic; it cannot be parameterized with arguments <SearchResult>    LDAPAuth.java    portal/portal-impl/src/com/liferay/portal/security/auth    line 165    Java Problem
21The type DummyDirContext must implement the inherited abstract method DirContext.search(Name, Attributes, String[])    DummyDirContext.java    portal/util-java/src/com/liferay/util/ldap    line 38    Java Problem
22The type DummyDirContext must implement the inherited abstract method DirContext.search(Name, Attributes)    DummyDirContext.java    portal/util-java/src/com/liferay/util/ldap    line 38    Java Problem
23The type DummyDirContext must implement the inherited abstract method DirContext.search(Name, String, Object[], SearchControls)    DummyDirContext.java    portal/util-java/src/com/liferay/util/ldap    line 38    Java Problem
24The type DummyDirContext must implement the inherited abstract method DirContext.search(Name, String, SearchControls)    DummyDirContext.java    portal/util-java/src/com/liferay/util/ldap    line 38    Java Problem
25The type DummyDirContext must implement the inherited abstract method DirContext.search(String, Attributes, String[])    DummyDirContext.java    portal/util-java/src/com/liferay/util/ldap    line 38    Java Problem
26The type DummyDirContext must implement the inherited abstract method DirContext.search(String, Attributes)    DummyDirContext.java    portal/util-java/src/com/liferay/util/ldap    line 38    Java Problem
27The type DummyDirContext must implement the inherited abstract method DirContext.search(String, String, Object[], SearchControls)    DummyDirContext.java    portal/util-java/src/com/liferay/util/ldap    line 38    Java Problem
28The type DummyDirContext must implement the inherited abstract method DirContext.search(String, String, SearchControls)    DummyDirContext.java    portal/util-java/src/com/liferay/util/ldap    line 38    Java Problem
29The type NamingEnumeration is not generic; it cannot be parameterized with arguments <SearchResult>    DummyDirContext.java    portal/util-java/src/com/liferay/util/ldap    line 142    Java Problem
30The type NamingEnumeration is not generic; it cannot be parameterized with arguments <SearchResult>    DummyDirContext.java    portal/util-java/src/com/liferay/util/ldap    line 150    Java Problem
31The type NamingEnumeration is not generic; it cannot be parameterized with arguments <SearchResult>    DummyDirContext.java    portal/util-java/src/com/liferay/util/ldap    line 158    Java Problem
32The type NamingEnumeration is not generic; it cannot be parameterized with arguments <SearchResult>    DummyDirContext.java    portal/util-java/src/com/liferay/util/ldap    line 165    Java Problem
33The type NamingEnumeration is not generic; it cannot be parameterized with arguments <SearchResult>    DummyDirContext.java    portal/util-java/src/com/liferay/util/ldap    line 172    Java Problem
34The type NamingEnumeration is not generic; it cannot be parameterized with arguments <SearchResult>    DummyDirContext.java    portal/util-java/src/com/liferay/util/ldap    line 179    Java Problem
35The type NamingEnumeration is not generic; it cannot be parameterized with arguments <SearchResult>    DummyDirContext.java    portal/util-java/src/com/liferay/util/ldap    line 186    Java Problem
36The type NamingEnumeration is not generic; it cannot be parameterized with arguments <SearchResult>    DummyDirContext.java    portal/util-java/src/com/liferay/util/ldap    line 194    Java Problem
37The type DummyContext must implement the inherited abstract method Context.list(Name)    DummyContext.java    portal/util-java/src/com/liferay/util/ldap    line 39    Java Problem
38The type DummyContext must implement the inherited abstract method Context.list(String)    DummyContext.java    portal/util-java/src/com/liferay/util/ldap    line 39    Java Problem
39The type DummyContext must implement the inherited abstract method Context.listBindings(Name)    DummyContext.java    portal/util-java/src/com/liferay/util/ldap    line 39    Java Problem
40The type DummyContext must implement the inherited abstract method Context.listBindings(String)    DummyContext.java    portal/util-java/src/com/liferay/util/ldap    line 39    Java Problem
41The type NamingEnumeration is not generic; it cannot be parameterized with arguments <Binding>    DummyContext.java    portal/util-java/src/com/liferay/util/ldap    line 113    Java Problem
42The type NamingEnumeration is not generic; it cannot be parameterized with arguments <Binding>    DummyContext.java    portal/util-java/src/com/liferay/util/ldap    line 119    Java Problem
43The type NamingEnumeration is not generic; it cannot be parameterized with arguments <NameClassPair>    DummyContext.java    portal/util-java/src/com/liferay/util/ldap    line 101    Java Problem
44The type NamingEnumeration is not generic; it cannot be parameterized with arguments <NameClassPair>    DummyContext.java    portal/util-java/src/com/liferay/util/ldap    line 107    Java Problem
45The type NamingEnumeration is not generic; it cannot be parameterized with arguments <SearchResult>    CASAutoLogin.java    portal/portal-impl/src/com/liferay/portal/security/auth    line 152    Java Problem
46Name clash: The method initialize(Subject, CallbackHandler, Map<String,?>, Map<String,?>) of type BasicLoginModule has the same erasure as initialize(Subject, CallbackHandler, Map, Map) of type LoginModule but does not override it    BasicLoginModule.java    portal/portal-impl/src/com/liferay/portal/security/jaas/ext    line 67    Java Problem
47The type BasicLoginModule must implement the inherited abstract method LoginModule.initialize(Subject, CallbackHandler, Map, Map)    BasicLoginModule.java    portal/portal-impl/src/com/liferay/portal/security/jaas/ext    line 50    Java Problem
Dave Willis
RE: Portal project has errors in Eclipse
July 16, 2009 9:53 AM
Answer

Dave Willis

Rank: Expert

Posts: 301

Join Date: July 13, 2009

Recent Posts

I think there must be some kind of pathing issue or something going on. I've got portal, ext and plugins in a folder called Sites that is not under eclipse's workspace folder. I know when you use the workspace folder you have to take plugins out of it because Eclipse doesn't like it when you use a sub folder as a project but I don't think that should be a problem here. Not positive though.
Wilson Man
RE: Portal project has errors in Eclipse
July 16, 2009 12:55 PM
Answer

Wilson Man

LIFERAY STAFF

Rank: Liferay Master

Posts: 580

Join Date: June 21, 2006

Recent Posts

hey Dave,

the way i set it up is to add each plugin project by itself ... and not the entire plugins folder as one project. For example, if i create a portlet plugin and called it my-first-portlet, i add that directly as a project ... along with EXT and portal and have my-first-portlet's build path reference ext and portal.
Dave Willis
RE: Portal project has errors in Eclipse
July 16, 2009 2:12 PM
Answer

Dave Willis

Rank: Expert

Posts: 301

Join Date: July 13, 2009

Recent Posts

Yeah, that's the way I have mine set up as well. There's something not right about the way I've got portal set up though. I just have no idea what it might be.
-Dave
Wilson Man
RE: Portal project has errors in Eclipse
July 17, 2009 10:52 AM
Answer

Wilson Man

LIFERAY STAFF

Rank: Liferay Master

Posts: 580

Join Date: June 21, 2006

Recent Posts

yeah, I'm using OS X and have everything setup pretty smoothly. I'll try to add some of this info on wiki when i get a chance, though i'm currently quite loaded with work ...
Dave Willis
RE: Portal project has errors in Eclipse
July 20, 2009 12:11 PM
Answer

Dave Willis

Rank: Expert

Posts: 301

Join Date: July 13, 2009

Recent Posts

Anybody perchance know what might be causing portal to return all these errors?
Wilson Man
RE: Portal project has errors in Eclipse
July 20, 2009 4:26 PM
Answer

Wilson Man

LIFERAY STAFF

Rank: Liferay Master

Posts: 580

Join Date: June 21, 2006

Recent Posts

hey Dave, sorry, doesn't look i have time to wiki what you need in the near future. But if no one else is replying to your thread, maybe you can do a brief/high level outline to how you've setup your env and i can do a sanity check for you here ...
Zsolt Balogh
RE: Portal project has errors in Eclipse
July 21, 2009 12:37 AM
Answer

Zsolt Balogh

LIFERAY STAFF

Rank: Expert

Posts: 463

Join Date: March 23, 2009

Recent Posts

It looks like, that your Eclipse is using the classes from the portal/development/lib/jndi.jar not from the jdk. The jdni.jar is old.

I think, that this resource is before the JDK libs in your classpath, I think you can just remove it from the library list.

Why does Liferay have the jndi.jar in the sources? I think it should be removed...
Dave Willis
RE: Portal project has errors in Eclipse
July 21, 2009 7:39 AM
Answer

Dave Willis

Rank: Expert

Posts: 301

Join Date: July 13, 2009

Recent Posts

You were right. It was using jndi.jar. I removed it and that took care of the majority of the errors. There's still a few left though:

 1
 2Description    Resource    Path    Location    Type
 3XMLConstants.NULL_NS_URI cannot be resolved    PortletAppImpl.java    portal/portal-impl/src/com/liferay/portal/model/impl    line 179    Java Problem
 4Name clash: The method initialize(Subject, CallbackHandler, Map<String,?>, Map<String,?>) of type PortalLoginModule has the same erasure as initialize(Subject, CallbackHandler, Map, Map) of type LoginModule but does not override it    PortalLoginModule.java    portal/portal-impl/src/com/liferay/portal/security/jaas    line 100    Java Problem
 5The type PortalLoginModule must implement the inherited abstract method LoginModule.initialize(Subject, CallbackHandler, Map, Map)    PortalLoginModule.java    portal/portal-impl/src/com/liferay/portal/security/jaas    line 41    Java Problem
 6Name clash: The method initialize(Subject, CallbackHandler, Map<String,?>, Map<String,?>) of type BasicLoginModule has the same erasure as initialize(Subject, CallbackHandler, Map, Map) of type LoginModule but does not override it    BasicLoginModule.java    portal/portal-impl/src/com/liferay/portal/security/jaas/ext    line 67    Java Problem
 7The type BasicLoginModule must implement the inherited abstract method LoginModule.initialize(Subject, CallbackHandler, Map, Map)    BasicLoginModule.java    portal/portal-impl/src/com/liferay/portal/security/jaas/ext    line 50    Java Problem
 8XMLConstants.NULL_NS_URI cannot be resolved    StateAwareResponseImpl.java    portal/portal-impl/src/com/liferay/portlet    line 62    Java Problem
 9Name clash: The method initialize(Subject, CallbackHandler, Map<String,?>, Map<String,?>) of type PortalLoginModule has the same erasure as initialize(Subject, CallbackHandler, Map, Map) of type LoginModule but does not override it    PortalLoginModule.java    portal/portal-kernel/src/com/liferay/portal/kernel/security/jaas    line 61    Java Problem
10The type PortalLoginModule must implement the inherited abstract method LoginModule.initialize(Subject, CallbackHandler, Map, Map)    PortalLoginModule.java    portal/portal-kernel/src/com/liferay/portal/kernel/security/jaas    line 39    Java Problem
Dave Willis
RE: Portal project has errors in Eclipse
July 21, 2009 7:51 AM
Answer

Dave Willis

Rank: Expert

Posts: 301

Join Date: July 13, 2009

Recent Posts

Here's how my environment is set up:
I have ext, plugins and portal all under User/Sites/project_name instead of in the Eclipse workspace because of the way Eclipse won't let you create a project from a folder that isn't in the workspace root, i.e. portlets/portlet_name. Tomcat is also located in User/Sites. I have created new projects for portal, ext and my portlet. My portlet references ext and portal on the Projects tab under Java Build Path.
Dave Willis
RE: Portal project has errors in Eclipse
July 23, 2009 10:22 AM
Answer

Dave Willis

Rank: Expert

Posts: 301

Join Date: July 13, 2009

Recent Posts

So, anyone have any idea what might be causing the remaining errors? As I mentioned, I know there's nothing wrong with portal because it's a stable version of Liferay that I downloaded the from repository so there has to be something wrong with my setup. I just don't know what.
Zsolt Balogh
RE: Portal project has errors in Eclipse
July 23, 2009 11:57 AM
Answer

Zsolt Balogh

LIFERAY STAFF

Rank: Expert

Posts: 463

Join Date: March 23, 2009

Recent Posts

As I told before, you have wrong order of your libraries, so the libs in the jdk will load after the jars in the lib dirs. I could reproduce some of your errors.

Click on the projects build path, then choose Order and Export. Then put the SDK right after the folders.
Dave Willis
RE: Portal project has errors in Eclipse
July 23, 2009 1:40 PM
Answer

Dave Willis

Rank: Expert

Posts: 301

Join Date: July 13, 2009

Recent Posts

I must be misunderstanding you. I thought originally you said to remove jndi.jar entirely, so I did and that fixed all but six or so of the errors. I have now added it back and moved it to the top of the list right beneath the folders on the order and export tab but all the original errors are still there.
Zsolt Balogh
RE: Portal project has errors in Eclipse
July 23, 2009 2:53 PM
Answer

Zsolt Balogh

LIFERAY STAFF

Rank: Expert

Posts: 463

Join Date: March 23, 2009

Recent Posts

I meant not the jdni.jar this time, just the Java JDK. Sorry, if I was ambiguous.

I've attached a screenshot which contains underlined what I think would fix your errors. (If I moved it down, I got your errors).

Another solution is that you remove the .classpath file from your project and update the whole project.
Attachment

Attachments: portalbuildpath.png (77.0k)
Dave Willis
RE: Portal project has errors in Eclipse
July 23, 2009 3:10 PM
Answer

Dave Willis

Rank: Expert

Posts: 301

Join Date: July 13, 2009

Recent Posts

Yes! Now I understand. I did what you suggested and that fixed all the errors. Thanks!
Riccardo Sabatiello
RE: Portal project has errors in Eclipse
December 19, 2011 3:19 AM
Answer

Riccardo Sabatiello

Rank: New Member

Posts: 3

Join Date: December 13, 2011

Recent Posts

Zsolt Balogh:
I meant not the jdni.jar this time, just the Java JDK. Sorry, if I was ambiguous.

I've attached a screenshot which contains underlined what I think would fix your errors. (If I moved it down, I got your errors).

Another solution is that you remove the .classpath file from your project and update the whole project.


Ok, this work. Thanks

Participate in the State of Liferay Community 2017. Help the community and even win some prizes!