You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Kapil garg <ga...@hotmail.com> on 2010/10/29 15:54:22 UTC

Issues while connecting Ofbiz eclipse in Debug Mode

Sorry I am trying to get my head around the documentation for connecting Eclipse in Debug mode for Ofbiz.

Folliwing the instructions 
https://cwiki.apache.org/confluence/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse

I added 
java -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8091 -jar ofbiz.jar

in the stortOfbix.bat and renamed it as StartDebugOfbiz.bat

My question is after adding port 8091 as a debug port, would my application ecommerce say for example need to open on
locahost:8080/ecommerce or localhost:8090/ecommerce. After adding it is opening on 8080. Is that correct?

I was able to get my application started on 8080 after adding the debug line in startup script and runnning the new starup script.

I have added all the necessary configurations as listed in the link under Run==>DEbug Configuration. After putting the right values and 
when I try to hit the run button with ecommerce application running on 8080, I get VM connection refused errror dialog box in Eclipse.

Am I doing something wrong here? Is there a specific version of eclipse that needs to used? I am using 3.4.2 jee version. 
Any help would be appreciated.


Kapil Garg
 


 		 	   		  

RE: Issues while connecting Ofbiz eclipse in Debug Mode

Posted by Kapil garg <ga...@hotmail.com>.
You Right James. After setting the debug successfully, I am thinking, "What am I debugging here after all that?"
So Not sure under what circumstances this debug mode would be powerful.

Would love to get the experts comment on their experiences on circumstances when they actually found this debugging tool helpful?


Kapil Garg
 




> Date: Fri, 29 Oct 2010 11:44:06 -0700
> Subject: Re: Issues while connecting Ofbiz eclipse in Debug Mode
> From: james.mcgill@ableengineering.com
> To: user@ofbiz.apache.org
> 
> On Fri, Oct 29, 2010 at 6:54 AM, Kapil garg <ga...@hotmail.com> wrote:
> 
> >
> > Sorry I am trying to get my head around the documentation for connecting
> > Eclipse in Debug mode for Ofbiz.
> >
> > Folliwing the instructions
> >
> > https://cwiki.apache.org/confluence/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse
> >
> > I added
> > java -Xdebug -Xnoagent -Djava.compiler=NONE
> > -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8091 -jar ofbiz.jar
> >
> > in the stortOfbix.bat and renamed it as StartDebugOfbiz.bat
> >
> > My question is after adding port 8091 as a debug port, would my application
> > ecommerce say for example need to open on
> > locahost:8080/ecommerce or localhost:8090/ecommerce. After adding it is
> > opening on 8080. Is that correct?
> >
> 
> 
> It sounds like you might be confused about the relationship (or lack of a
> relationship) between the JVM debugging port and the web service port.
> 
> Essentially, everything stays the same for using the web service, e.g., if
> you had it on port 8080 before, you still access it on that port.  But the
> debug context in Eclipse points your local java runtime at the remote
> debugging port.   Once you have a debug configuration setup, you see it in
> the Debug perspective where it attaches via a socket to the remote JVM,
> where you will see an entry for each thread it is attached to.
> 
> The hard part of debugging OFBiz this way is in the fact that so much of the
> application is in the Minilang, so the breakpoints you can use tend to be
> inside the framework instead of at the service level.  Sometimes it's a
> challenge to find a piece of Java that you can use to make a breakpoint.  On
> the other hand, this is a fast way to learn how the minilang processor
> actually works.
> 
> 
> 
> -- 
> James McGill
> Phoenix AZ
 		 	   		  

Re: Issues while connecting Ofbiz eclipse in Debug Mode

Posted by James McGill <ja...@ableengineering.com>.
On Fri, Oct 29, 2010 at 6:54 AM, Kapil garg <ga...@hotmail.com> wrote:

>
> Sorry I am trying to get my head around the documentation for connecting
> Eclipse in Debug mode for Ofbiz.
>
> Folliwing the instructions
>
> https://cwiki.apache.org/confluence/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse
>
> I added
> java -Xdebug -Xnoagent -Djava.compiler=NONE
> -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8091 -jar ofbiz.jar
>
> in the stortOfbix.bat and renamed it as StartDebugOfbiz.bat
>
> My question is after adding port 8091 as a debug port, would my application
> ecommerce say for example need to open on
> locahost:8080/ecommerce or localhost:8090/ecommerce. After adding it is
> opening on 8080. Is that correct?
>


It sounds like you might be confused about the relationship (or lack of a
relationship) between the JVM debugging port and the web service port.

Essentially, everything stays the same for using the web service, e.g., if
you had it on port 8080 before, you still access it on that port.  But the
debug context in Eclipse points your local java runtime at the remote
debugging port.   Once you have a debug configuration setup, you see it in
the Debug perspective where it attaches via a socket to the remote JVM,
where you will see an entry for each thread it is attached to.

The hard part of debugging OFBiz this way is in the fact that so much of the
application is in the Minilang, so the breakpoints you can use tend to be
inside the framework instead of at the service level.  Sometimes it's a
challenge to find a piece of Java that you can use to make a breakpoint.  On
the other hand, this is a fast way to learn how the minilang processor
actually works.



-- 
James McGill
Phoenix AZ

Re: JSPs taglibraries and war files witin hot-deploy

Posted by BJ Freeman <bj...@free-man.net>.
there is not enough information to evaluate what direction you should go.
a clarification Ofbiz is not a ECommerce centric application, like 
OScommerce. It can not be easily "Added on" to existing applications.
The Ecommerce depends on the other applications for support and mostly 
and UI and flow component.
To use Ofbiz you will have to go through the functionality you have now 
and see if ofbiz already does this. If so then use ofbiz.




=========================

BJ Freeman
Strategic Power Office with Supplier Automation  <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
Specialtymarket.com  <http://www.specialtymarket.com/>
Systems Integrator-- Glad to Assist

Chat  Y! messenger: bjfr33man


Kapil garg sent the following on 10/29/2010 8:24 AM:
>
> Thanks for the response. I got it working in debug. I realised I was not starting with right debug arguments.
>
> I have a questions for everyone, do we need to have FTL/Groovy skills for ofbiz or one can use tag ibraries or JSPs within Ofbiz? Has anyon tried and got success using JSPs, war files within hot-deploy and had major success?
>
> Our existing application is based on seam/jsf2 and jsp/tag libs. We cant discard what we have as it is in production for quiet long, however we would like to incorporate ecommerce application within ofbiz to have it running within the existing artifacts. Whats the best way going forward. Redirect from existing tomcat to ofbiz but then jsps wont support the ofbiz context nor would it return the right contaxt back and forsth etween tomcat and ofbiz?
>
> Has anyone had success to deploy war files within embedded tomcat of ofbiz?
>
>
> Kapil Garg
>
>
>
>
>
>> From: jacques.le.roux@les7arts.com
>> To: user@ofbiz.apache.org
>> Subject: Re: Issues while connecting Ofbiz eclipse in Debug Mode
>> Date: Fri, 29 Oct 2010 17:16:13 +0200
>>
>> Kapil garg wrote:
>>> I tried runnning  on prompt using
>>> java -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8091 -jar ofbiz.jar
>>> from the prompt. I am able to open ofbiz on 8080 but while connecting with eclipse in Debug mode, it says
>>>
>>> connection refused, socket closed. Any hint?
>>
>> Try (simpler IMO) alternative
>> https://cwiki.apache.org/confluence/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse#RunningandDebuggingOFBizinEclipse-Debugging(orrunning)OFBizinEclipse
>>
>> But well... this is explained in the preamble, that's why I did not understand...
>>
>> Jacques
>>
>>>
>>>
>>> Kapil Garg
>>>
>>>
>>>
>>>
>>>
>>> From: gargkapil@hotmail.com
>>> To: user@ofbiz.apache.org
>>> Subject: Issues while connecting Ofbiz eclipse in Debug Mode
>>> Date: Fri, 29 Oct 2010 23:54:22 +1000
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Sorry I am trying to get my head around the documentation for connecting Eclipse in Debug mode for Ofbiz.
>>>
>>> Folliwing the instructions
>>> https://cwiki.apache.org/confluence/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse
>>>
>>> I added
>>> java -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8091 -jar ofbiz.jar
>>>
>>> in the stortOfbix.bat and renamed it as StartDebugOfbiz.bat
>>>
>>> My question is after adding port 8091 as a debug port, would my application ecommerce say for example need to open on
>>> locahost:8080/ecommerce or localhost:8090/ecommerce. After adding it is opening on 8080. Is that correct?
>>>
>>> I was able to get my application started on 8080 after adding the debug line in startup script and runnning the new starup script.
>>>
>>> I have added all the necessary configurations as listed in the link under Run==>DEbug Configuration. After putting the right
>>> values and
>>> when I try to hit the run button with ecommerce application running on 8080, I get VM connection refused errror dialog box in
>>> Eclipse.
>>>
>>> Am I doing something wrong here? Is there a specific version of eclipse that needs to used? I am using 3.4.2 jee version.
>>> Any help would be appreciated.
>>>
>>>
>>> Kapil Garg
>>
>>
>   		 	   		


JSPs taglibraries and war files witin hot-deploy

Posted by Kapil garg <ga...@hotmail.com>.
Thanks for the response. I got it working in debug. I realised I was not starting with right debug arguments.

I have a questions for everyone, do we need to have FTL/Groovy skills for ofbiz or one can use tag ibraries or JSPs within Ofbiz? Has anyon tried and got success using JSPs, war files within hot-deploy and had major success?

Our existing application is based on seam/jsf2 and jsp/tag libs. We cant discard what we have as it is in production for quiet long, however we would like to incorporate ecommerce application within ofbiz to have it running within the existing artifacts. Whats the best way going forward. Redirect from existing tomcat to ofbiz but then jsps wont support the ofbiz context nor would it return the right contaxt back and forsth etween tomcat and ofbiz?

Has anyone had success to deploy war files within embedded tomcat of ofbiz?


Kapil Garg
 




> From: jacques.le.roux@les7arts.com
> To: user@ofbiz.apache.org
> Subject: Re: Issues while connecting Ofbiz eclipse in Debug Mode
> Date: Fri, 29 Oct 2010 17:16:13 +0200
> 
> Kapil garg wrote:
> > I tried runnning  on prompt using
> > java -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8091 -jar ofbiz.jar
> > from the prompt. I am able to open ofbiz on 8080 but while connecting with eclipse in Debug mode, it says
> >
> > connection refused, socket closed. Any hint?
> 
> Try (simpler IMO) alternative
> https://cwiki.apache.org/confluence/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse#RunningandDebuggingOFBizinEclipse-Debugging(orrunning)OFBizinEclipse
> 
> But well... this is explained in the preamble, that's why I did not understand...
> 
> Jacques
> 
> >
> >
> > Kapil Garg
> >
> >
> >
> >
> >
> > From: gargkapil@hotmail.com
> > To: user@ofbiz.apache.org
> > Subject: Issues while connecting Ofbiz eclipse in Debug Mode
> > Date: Fri, 29 Oct 2010 23:54:22 +1000
> >
> >
> >
> >
> >
> >
> >
> >
> > Sorry I am trying to get my head around the documentation for connecting Eclipse in Debug mode for Ofbiz.
> >
> > Folliwing the instructions
> > https://cwiki.apache.org/confluence/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse
> >
> > I added
> > java -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8091 -jar ofbiz.jar
> >
> > in the stortOfbix.bat and renamed it as StartDebugOfbiz.bat
> >
> > My question is after adding port 8091 as a debug port, would my application ecommerce say for example need to open on
> > locahost:8080/ecommerce or localhost:8090/ecommerce. After adding it is opening on 8080. Is that correct?
> >
> > I was able to get my application started on 8080 after adding the debug line in startup script and runnning the new starup script.
> >
> > I have added all the necessary configurations as listed in the link under Run==>DEbug Configuration. After putting the right
> > values and
> > when I try to hit the run button with ecommerce application running on 8080, I get VM connection refused errror dialog box in
> > Eclipse.
> >
> > Am I doing something wrong here? Is there a specific version of eclipse that needs to used? I am using 3.4.2 jee version.
> > Any help would be appreciated.
> >
> >
> > Kapil Garg
> 
> 
 		 	   		  

Re: Issues while connecting Ofbiz eclipse in Debug Mode

Posted by Jacques Le Roux <ja...@les7arts.com>.
Kapil garg wrote:
> I tried runnning  on prompt using
> java -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8091 -jar ofbiz.jar
> from the prompt. I am able to open ofbiz on 8080 but while connecting with eclipse in Debug mode, it says
>
> connection refused, socket closed. Any hint?

Try (simpler IMO) alternative
https://cwiki.apache.org/confluence/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse#RunningandDebuggingOFBizinEclipse-Debugging(orrunning)OFBizinEclipse

But well... this is explained in the preamble, that's why I did not understand...

Jacques

>
>
> Kapil Garg
>
>
>
>
>
> From: gargkapil@hotmail.com
> To: user@ofbiz.apache.org
> Subject: Issues while connecting Ofbiz eclipse in Debug Mode
> Date: Fri, 29 Oct 2010 23:54:22 +1000
>
>
>
>
>
>
>
>
> Sorry I am trying to get my head around the documentation for connecting Eclipse in Debug mode for Ofbiz.
>
> Folliwing the instructions
> https://cwiki.apache.org/confluence/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse
>
> I added
> java -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8091 -jar ofbiz.jar
>
> in the stortOfbix.bat and renamed it as StartDebugOfbiz.bat
>
> My question is after adding port 8091 as a debug port, would my application ecommerce say for example need to open on
> locahost:8080/ecommerce or localhost:8090/ecommerce. After adding it is opening on 8080. Is that correct?
>
> I was able to get my application started on 8080 after adding the debug line in startup script and runnning the new starup script.
>
> I have added all the necessary configurations as listed in the link under Run==>DEbug Configuration. After putting the right
> values and
> when I try to hit the run button with ecommerce application running on 8080, I get VM connection refused errror dialog box in
> Eclipse.
>
> Am I doing something wrong here? Is there a specific version of eclipse that needs to used? I am using 3.4.2 jee version.
> Any help would be appreciated.
>
>
> Kapil Garg



RE: Issues while connecting Ofbiz eclipse in Debug Mode

Posted by Kapil garg <ga...@hotmail.com>.
I tried runnning  on prompt using
java -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8091 -jar ofbiz.jar
from the prompt. I am able to open ofbiz on 8080 but while connecting with eclipse in Debug mode, it says 

connection refused, socket closed. Any hint?



Kapil Garg
 




From: gargkapil@hotmail.com
To: user@ofbiz.apache.org
Subject: Issues while connecting Ofbiz eclipse in Debug Mode
Date: Fri, 29 Oct 2010 23:54:22 +1000








Sorry I am trying to get my head around the documentation for connecting Eclipse in Debug mode for Ofbiz.

Folliwing the instructions 
https://cwiki.apache.org/confluence/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse

I added 
java -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8091 -jar ofbiz.jar

in the stortOfbix.bat and renamed it as StartDebugOfbiz.bat

My question is after adding port 8091 as a debug port, would my application ecommerce say for example need to open on
locahost:8080/ecommerce or localhost:8090/ecommerce. After adding it is opening on 8080. Is that correct?

I was able to get my application started on 8080 after adding the debug line in startup script and runnning the new starup script.

I have added all the necessary configurations as listed in the link under Run==>DEbug Configuration. After putting the right values and 
when I try to hit the run button with ecommerce application running on 8080, I get VM connection refused errror dialog box in Eclipse.

Am I doing something wrong here? Is there a specific version of eclipse that needs to used? I am using 3.4.2 jee version. 
Any help would be appreciated.


Kapil Garg