You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Martin Hejl <ma...@guh-software.de> on 2010/12/13 10:06:38 UTC
NullPointerException when publishing with Geronimo Eclipse Plugin
v2.1.7
Hi everybody,
I just updated to Geronimo Eclipse Plugin v2.1.7, and now I get a
NullpointerException whenever I try to publish to the server:
java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.put(Unknown Source)
at
org.apache.geronimo.st.core.internal.DependencyHelper.getEnvironment(DependencyHelper.java:442)
at
org.apache.geronimo.st.core.internal.DependencyHelper.reorderModules(DependencyHelper.java:109)
at
org.apache.geronimo.st.core.GeronimoServerBehaviourDelegate.publishModules(GeronimoServerBehaviourDelegate.java:243)
at
org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:948)
at
org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:775)
at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:2889)
at
org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:337)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
The project I used for testing is the one described here:
https://cwiki.apache.org/GMOxDOC21/5-minute-tutorial-on-enterprise-application-development-with-eclipse-and-geronimo.html
The exception disappears when switching back to 2.1.6 of the eclipse plugin
I'm using Eclipse 3.6.1
Any ideas?
Martin
Re: NullPointerException when publishing with Geronimo Eclipse Plugin v2.1.7
Posted by han hongfang <ha...@gmail.com>.
Hi all,
Fixings for https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-689 and
https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-690 are included in
Apache Geronimo Eclipse Plugin (GEP) 2.2.1, which works with both Geronimo
server 2.2.1 and Geronimo server 2.1.7.
You can install GEP 2.2.1 through eclipse update site
http://www.apache.org/dist/geronimo/eclipse/updates/ or manual install it by
downloading from http://www.apache.org/dist/geronimo/eclipse/2.2.1/.
--
Best regards,
Han Hong Fang (Janet)
hanhongfang AT apache.org
Re: NullPointerException when publishing with Geronimo Eclipse Plugin v2.1.7
Posted by Kevan Miller <ke...@gmail.com>.
On Jan 7, 2011, at 7:05 AM, ivan.vucinic wrote:
>
> Dear All,
>
> I have the same problem in Envioroment:
>
> 1. Windows XP SP3
> 2. Eclipse Helios 3.6.1 ser1
> 3. Apache Geronimo plugin 2.1.7
> 4. Apache Geronimo 2.1.7 running on Windows server 2003
> 5. JDK 1.5.0.22
>
> I am begginer on Eclipse JEE and I just tried to build HelloWorld
> application as Dynamic Web Project
>
>
> !ENTRY org.eclipse.wst.server.core 4 0 2011-01-07 12:48:28.781
> !MESSAGE Could not publish to the server.
> !STACK 0
> java.lang.NullPointerException
> at java.util.concurrent.ConcurrentHashMap.put(Unknown Source)
> at
> org.apache.geronimo.st.core.internal.DependencyHelper.getEnvironment(DependencyHelper.java:442)
> at
> org.apache.geronimo.st.core.internal.DependencyHelper.reorderModules(DependencyHelper.java:109)
> at
> org.apache.geronimo.st.core.GeronimoServerBehaviourDelegate.publishModules(GeronimoServerBehaviourDelegate.java:243)
> at
> org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:948)
> at
> org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:775)
> at
> org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:2889)
> at
> org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:337)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
I believe this general problem has been fixed in https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-689 and https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-690
You can apply their associated patches and build GEP from source. IIUC, you can also work around this problem with the following steps (as described by Janet, previously:
1. In SampleUtility project, export the project into a jar, e.g., SampleUtility.jar
2. In SampleEAR project, create a lib folder under EarContent folder, and then copy SampleUtility.jar into lib folder
3. In SampleEJB project, add SampleUtility.jar as external JARs in Libraries tab of java build path panel
With above changes, the SampleEAR project can be published successfully in eclipse.
--kevan
Re: NullPointerException when publishing with Geronimo Eclipse
Plugin v2.1.7
Posted by "ivan.vucinic" <iv...@t-com.me>.
Dear All,
I have the same problem in Envioroment:
1. Windows XP SP3
2. Eclipse Helios 3.6.1 ser1
3. Apache Geronimo plugin 2.1.7
4. Apache Geronimo 2.1.7 running on Windows server 2003
5. JDK 1.5.0.22
I am begginer on Eclipse JEE and I just tried to build HelloWorld
application as Dynamic Web Project
!ENTRY org.eclipse.wst.server.core 4 0 2011-01-07 12:48:28.781
!MESSAGE Could not publish to the server.
!STACK 0
java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.put(Unknown Source)
at
org.apache.geronimo.st.core.internal.DependencyHelper.getEnvironment(DependencyHelper.java:442)
at
org.apache.geronimo.st.core.internal.DependencyHelper.reorderModules(DependencyHelper.java:109)
at
org.apache.geronimo.st.core.GeronimoServerBehaviourDelegate.publishModules(GeronimoServerBehaviourDelegate.java:243)
at
org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:948)
at
org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:775)
at
org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:2889)
at
org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:337)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
--
View this message in context: http://apache-geronimo.328035.n3.nabble.com/NullPointerException-when-publishing-with-Geronimo-Eclipse-Plugin-v2-1-7-tp2077566p2211375.html
Sent from the Users mailing list archive at Nabble.com.
Re: NullPointerException when publishing with Geronimo Eclipse Plugin v2.1.7
Posted by han hongfang <ha...@gmail.com>.
On Tue, Dec 14, 2010 at 4:26 PM, Martin Hejl <ma...@guh-software.de>wrote:
> Hi Janet,
>
> thank you for creating the JIRAs.
>
>
> For Utility project, the solution is
>> 1. In SampleUtility project, export the project into a jar, e.g.,
>> SampleUtility.jar
>> 2. In SampleEAR project, create a lib folder under EarContent folder,
>> and then copy SampleUtility.jar into lib folder
>> 3. In SampleEJB project, add SampleUtility.jar as external JARs in
>> Libraries tab of java build path panel
>> With above changes, the SampleEAR project can be published successfully
>> in eclipse.
>>
> is that a workaround, or the proposed solution?
>
Yeah, this should be a workaround before
https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-690 is fixed.
>
> Replacing a Utility Project with a static jar sounds very much like the
> discussion brought up in
>
> http://apache-geronimo.328035.n3.nabble.com/Eclipse-Utility-Projects-with-2-1-2-td339278.html
> and
> https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-513
>
> I guess my question is - has support for Utility Projects been dropped with
> 2.1.7 (since it it's packaged as a static jar, one could just use a plain
> old Java project as well)?
>
I don't see the intention to drop the support for Utility Project in 2.1.7.
There should be a bug somewhere broken this function. For statis jar, I
agree plain old java project is enough.
>
> Best regards,
> Martin
>
--
Best regards,
Han Hong Fang (Janet)
hanhongfang AT apache.org
Re: NullPointerException when publishing with Geronimo Eclipse Plugin
v2.1.7
Posted by Martin Hejl <ma...@guh-software.de>.
Hi Janet,
thank you for creating the JIRAs.
> For Utility project, the solution is
> 1. In SampleUtility project, export the project into a jar, e.g.,
> SampleUtility.jar
> 2. In SampleEAR project, create a lib folder under EarContent folder,
> and then copy SampleUtility.jar into lib folder
> 3. In SampleEJB project, add SampleUtility.jar as external JARs in
> Libraries tab of java build path panel
> With above changes, the SampleEAR project can be published successfully
> in eclipse.
is that a workaround, or the proposed solution?
Replacing a Utility Project with a static jar sounds very much like the
discussion brought up in
http://apache-geronimo.328035.n3.nabble.com/Eclipse-Utility-Projects-with-2-1-2-td339278.html
and
https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-513
I guess my question is - has support for Utility Projects been dropped
with 2.1.7 (since it it's packaged as a static jar, one could just use a
plain old Java project as well)?
Best regards,
Martin
Re: NullPointerException when publishing with Geronimo Eclipse Plugin v2.1.7
Posted by han hongfang <ha...@gmail.com>.
Martin,
For Utility project, the solution is
1. In SampleUtility project, export the project into a jar, e.g.,
SampleUtility.jar
2. In SampleEAR project, create a lib folder under EarContent folder, and
then copy SampleUtility.jar into lib folder
3. In SampleEJB project, add SampleUtility.jar as external JARs in Libraries
tab of java build path panel
With above changes, the SampleEAR project can be published successfully in
eclipse.
--
Best regards,
Han Hong Fang (Janet)
hanhongfang AT apache.org
Re: NullPointerException when publishing with Geronimo Eclipse Plugin v2.1.7
Posted by han hongfang <ha...@gmail.com>.
Hi Martin,
Good findings.
I skipped the instructions to delete ejbModule/META-INF/openejb-jar.xml
during my testing so it worked well. If I delete this file I can reproduce
your exception in my environment.
I opened two JIRAs.
1. https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-689
NullPointerException
when publishing with Geronimo Eclipse Plugin v2.1.7 (I think it needs either
code or document update or even both)
2. https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-690
NullpointerException
occurs if one adds a "Utility Project" to the EAR
Thanks very much for catching the problem.
--
Best regards,
Han Hong Fang (Janet)
hanhongfang AT apache.org
Re: NullPointerException when publishing with Geronimo Eclipse Plugin
v2.1.7
Posted by Martin Hejl <ma...@guh-software.de>.
Hi again,
after a little bit of debugging, it seems to me that the problem is that
I've deleted ejbModule/META-INF/openejb-jar.xml in the SampleEJB
project, as is suggested in
https://cwiki.apache.org/GMOxDOC21/5-minute-tutorial-on-enterprise-application-development-with-eclipse-and-geronimo.html
Since that file is gone, the check
file.getName().equals(GeronimoUtils.OPENEJB_PLAN_NAME) && file.exists()
in DependencyHelper Line 538 is false, so "environment" in
DependencyHelper Line 442 is never set for the EJB project.
Did I misread the instructions to delete ejbModule/META-INF/openejb-jar.xml?
By the way, a NullpointerException also occurs if one adds a "Utility
Project" to the EAR (since there's only handling for Web, EJB, EAR, RAR
and AppClient modules).
Maybe I'm simply misunderstanding how Geronimo works (I've been using
JBoss for a long time, and have just started using Geronimo).
> Another investigation is that let me try your projects in my
> environment, can you attach your projects in the mail?
I'll send them off list
Best regards,
Martin
Re: NullPointerException when publishing with Geronimo Eclipse Plugin v2.1.7
Posted by Kevan Miller <ke...@gmail.com>.
On Dec 13, 2010, at 8:43 AM, han hongfang wrote:
> Thanks Martin for your information.
>
> Let me try to find a Windows Vista 64 machine tomorrow, and try the scenario again before turning back to you.
>
> Another investigation is that let me try your projects in my environment, can you attach your projects in the mail?
Please don't attach files to mailing list emails. Create a Jira issue and attach the files there...
--kevan
Re: NullPointerException when publishing with Geronimo Eclipse Plugin v2.1.7
Posted by han hongfang <ha...@gmail.com>.
Thanks Martin for your information.
Let me try to find a Windows Vista 64 machine tomorrow, and try the scenario
again before turning back to you.
Another investigation is that let me try your projects in my environment,
can you attach your projects in the mail?
On Mon, Dec 13, 2010 at 9:04 PM, Martin Hejl <ma...@guh-software.de>wrote:
> Hi Janet,
>
>
> han hongfang wrote:
>
>> Hi Martin,
>> Geronimo Eclipse Plugin 2.1.7 was tested successfully against this
>> senario before releaseing
>>
>> https://cwiki.apache.org/GMOxDOC21/5-minute-tutorial-on-enterprise-application-development-with-eclipse-and-geronimo.html
>> And I just double checked again with following environment, and can not
>> reproduce your exception.
>> 1. clean eclipse 3.6 SR1
>> 2. installed from http://www.apache.org/dist/geronimo/eclipse/updates/
>> 3. windows XP SP3
>> 4. Sun JDK 1.5.0_22
>> 5. Geronimo Server 2.1.7
>> Could you let us know your environment for problem investigation?
>>
>
> First try:
> 1. Clean "Eclipse IDE for Java EE Developers" 3.6.1 from
>
> http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/helios/SR1/eclipse-jee-helios-SR1-win32.zip
> 2. Geronimo Eclipse Plugin v2.1.7 installed from
>
> http://www.apache.org/dist/geronimo/eclipse/updates/
> 3. Windows Vista 64 (running 32-Bit JDK)
> 4. Sun/Oracle JDK 1.6.0_23 (32-Bit)
> 5. Clean Geronimo Server 2.1.7, installed from
>
> http://www.apache.org/dyn/closer.cgi/geronimo/2.1.7/geronimo-tomcat6-javaee5-2.1.7-bin.zip
>
> Second try:
> 1. Clean "Eclipse Classic" 3.6.1 from
>
> http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops/R-3.6.1-201009090800/eclipse-SDK-3.6.1-win32.zip
> 2. Geronimo Eclipse Plugin v2.1.7 installed from
>
> http://www.apache.org/dist/geronimo/eclipse/updates/
> 3. Windows Vista 64 (running 32-Bit JDK)
> 4. Sun/Oracle JDK 1.6.0_23 (32-Bit)
> 5. Clean Geronimo Server 2.1.7, installed from
>
> http://www.apache.org/dyn/closer.cgi/geronimo/2.1.7/geronimo-tomcat6-javaee5-2.1.7-bin.zip
>
> I've also tried both approaches using Sun/Oracle JDK 1.5.0_22 - with the
> same result.
>
> Switching back to version 2.1.6 of the eclipse plugin makes the error go
> away.
>
> Is there anything else I can try?
>
> Best regards,
> Martin
>
--
Best regards,
Han Hong Fang (Janet)
hanhongfang AT apache.org
Re: NullPointerException when publishing with Geronimo Eclipse Plugin
v2.1.7
Posted by Martin Hejl <ma...@guh-software.de>.
Hi Janet,
han hongfang wrote:
> Hi Martin,
> Geronimo Eclipse Plugin 2.1.7 was tested successfully against this
> senario before releaseing
> https://cwiki.apache.org/GMOxDOC21/5-minute-tutorial-on-enterprise-application-development-with-eclipse-and-geronimo.html
> And I just double checked again with following environment, and can not
> reproduce your exception.
> 1. clean eclipse 3.6 SR1
> 2. installed from http://www.apache.org/dist/geronimo/eclipse/updates/
> 3. windows XP SP3
> 4. Sun JDK 1.5.0_22
> 5. Geronimo Server 2.1.7
> Could you let us know your environment for problem investigation?
First try:
1. Clean "Eclipse IDE for Java EE Developers" 3.6.1 from
http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/helios/SR1/eclipse-jee-helios-SR1-win32.zip
2. Geronimo Eclipse Plugin v2.1.7 installed from
http://www.apache.org/dist/geronimo/eclipse/updates/
3. Windows Vista 64 (running 32-Bit JDK)
4. Sun/Oracle JDK 1.6.0_23 (32-Bit)
5. Clean Geronimo Server 2.1.7, installed from
http://www.apache.org/dyn/closer.cgi/geronimo/2.1.7/geronimo-tomcat6-javaee5-2.1.7-bin.zip
Second try:
1. Clean "Eclipse Classic" 3.6.1 from
http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops/R-3.6.1-201009090800/eclipse-SDK-3.6.1-win32.zip
2. Geronimo Eclipse Plugin v2.1.7 installed from
http://www.apache.org/dist/geronimo/eclipse/updates/
3. Windows Vista 64 (running 32-Bit JDK)
4. Sun/Oracle JDK 1.6.0_23 (32-Bit)
5. Clean Geronimo Server 2.1.7, installed from
http://www.apache.org/dyn/closer.cgi/geronimo/2.1.7/geronimo-tomcat6-javaee5-2.1.7-bin.zip
I've also tried both approaches using Sun/Oracle JDK 1.5.0_22 - with the
same result.
Switching back to version 2.1.6 of the eclipse plugin makes the error go
away.
Is there anything else I can try?
Best regards,
Martin
Re: NullPointerException when publishing with Geronimo Eclipse Plugin v2.1.7
Posted by han hongfang <ha...@gmail.com>.
Hi Martin,
Geronimo Eclipse Plugin 2.1.7 was tested successfully against this senario
before releaseing
https://cwiki.apache.org/GMOxDOC21/5-minute-tutorial-on-enterprise-application-development-with-eclipse-and-geronimo.html
And I just double checked again with following environment, and can not
reproduce your exception.
1. clean eclipse 3.6 SR1
2. installed from http://www.apache.org/dist/geronimo/eclipse/updates/
3. windows XP SP3
4. Sun JDK 1.5.0_22
5. Geronimo Server 2.1.7
Could you let us know your environment for problem investigation?
--
Best regards,
Han Hong Fang (Janet)
hanhongfang AT apache.org