Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Today's Messages (on)  | Unanswered Messages (off)

Forum: EclipseLink
 Topic: Entity automatically getting Detached and failing on insert for integrity constrain
Entity automatically getting Detached and failing on insert for integrity constrain [message #1731267] Wed, 04 May 2016 04:58
Prashant Saraf is currently offline Prashant SarafFriend
Messages: 2
Registered: February 2015
Junior Member
Same Topic is also posted on

http://stackoverflow.com/questions/37018740/eclipselink-detaching-entity-and-performing-insert-for-existing-entity


I have following M-M relationship scenario

Employee and Project are connected with each other by EmployeeProjectRlsp

I have below Relationship defined

In Employee

@OneToMany(mappedBy = "employee", cascade = { CascadeType.PERSIST, CascadeType.MERGE })
private List<EmployeeProjectRlsp> employeeProjectRlsp;

In Project
@OneToMany(mappedBy = "project", cascade = { CascadeType.PERSIST, CascadeType.MERGE })
private List<EmployeeProjectRlsp> employeeProjectRlsp;


In EmployeeProjectRlsp
// bi-directional many-to-one association to Agreement
@ManyToOne(cascade = { CascadeType.PERSIST, CascadeType.MERGE })
@JoinColumn(name = "EMPLOYEE_ID", nullable = false)
private Employee employee;

// bi-directional many-to-one association to Category
@ManyToOne(cascade = { CascadeType.PERSIST, CascadeType.MERGE })
@JoinColumn(name = "PROJECT_ID", nullable = false)
private Project project;


Now issue : We are doing persist for each employee we have everything as cascade. Here requirement is if Project is not there in DB then create new Project

Coding is doing something like below

Project dbProject = projectDAO.getProject(xmlProject);
if(dbProject != null)
xmlProject = dbProject;
EmployeeProjectRlsp employeeProjectRlsp = emproRlspFactory.getEmployeeProjectRlsp(xmlProject, xmlEmployee);
xmlEmploye.setEmployeeProjectRlsp(employeeProjectRlsp);
employeDao.persist(xmlEmploye);

when I run above code in single thread environment everything works fine. when I am having 100 thread coming in same time I am getting integrity constrain on Project Object where project is saved days back.

I have all the Entities and their relationship marked with cascade

cascade = { CascadeType.PERSIST, CascadeType.MERGE }

Now this issue of integrity constrain coming to any of existing object coming from DB by either egar/lezy fetch or DAO call its keep failing at random places.

Can someone help me here what need to be done.
Forum: BPMN 2.0 Modeler
 Topic: Change Process ID, BPMN2 elements ID
Re: Change Process ID, BPMN2 elements ID [message #1731269 is a reply to message #1730715] Wed, 04 May 2016 05:19
Robert Brodt is currently offline Robert BrodtFriend
Messages: 772
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

1.3.0-M1 build is now available. This has the ID editing feature.
Forum: EMF
 Topic: [CDO] Saving 1st model element to new repo crashes Eclipse
Re: [CDO] Saving 1st model element to new repo crashes Eclipse [message #1731270 is a reply to message #1731194] Wed, 04 May 2016 05:27
Eike Stepper is currently offline Eike StepperFriend
Messages: 6156
Registered: July 2009
Senior Member
Am 03.05.2016 um 14:31 schrieb David Wynter:
> Hi Eike,
>
> I am stuck with 4.3 for a while because moving a large RCP 3 app to e4 is too big an undertaking currently.
CDO does not depend on e4, nor does it depend on any strict version of the Eclipse Platform. We only test against the
Eclipse version that's displayed next to a CDO download, but you should be able to run against a different version, too.

> I must misunderstand something. I have a genmodel ready for CDO, but I describe the preparation of the database above,
> which has nothing to do with the generated code. When I use CDO Explorer view to open a session I cannot see my model
> as associated with the empty db. So I use Package Registry... to attached it, it shows as state == new, type = dynamic
> and original = dynamic.
Can you be more specific w.r.t. the exact steps you take to register your package? If it results in a "dynamic" package,
you've probably done something wrong.

> The I open a Transaction on that session, then I create a new resource, then I open that resource in the CDO editor
> then I add a model element, then I save and it crashes. How are you supposed to prepare a empty database ready to use
> with your client?
Your generated model/package plugin should be deployed and activated in your client, ready to be used with CDO. Is that
not the case?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Forum: P2
 Topic: IMetadataRepository deleted after update
IMetadataRepository deleted after update [message #1731279] Wed, 04 May 2016 06:53
Alex W is currently offline Alex WFriend
Messages: 4
Registered: January 2013
Junior Member
Hello,

I'm using P2 to support auto-update in my e4 application.
It works almost well.
I realized that sometimes, after an automatic update, my custom update site is removed from the DefaultProfile.profile data in the p2 folder. This implies that at the next check for update, my repo is not checked anymore (I do have a log to display checked repos). The repo is set as the update site of my main feature.

Does anyone have any clue or information on this behavior ?
The complete code for update check is available here : update code on Github

Here are my step :
1. Export the product,
2. Make change, export repository,
3. Run product exported in 1.
4. Check for update, check the log - my custom repo is checked
5. Perform the update, and restart
6. Check for update, my custom repo is non longer checked

I also noticed that the pref file org.eclipse.equinox.p2.metadata.repository in the DefaultProfile.profile folder is changed during this operation. And my custom repo disappears.
The manually added repositories ( using IMetadataRepositoryManager.addRepository(URI) ) are saved in this pref file.

Thank you,

[Updated on: Wed, 04 May 2016 06:54]

Report message to a moderator

Forum: Standard Widget Toolkit (SWT)
 Topic: Runnable, RunnableLock instances accumulating on asyncExec
Runnable, RunnableLock instances accumulating on asyncExec [message #1731265] Wed, 04 May 2016 03:07
Andy Junius is currently offline Andy JuniusFriend
Messages: 7
Registered: February 2014
Junior Member
I'm still trying to get into SWT, so maybe that's a beginner question:

I'm working on a time domain plot using Canvas. I implemented this component using JavaFX, Swing and SWT because we have performance issues with JavaFX.

The data gets updated faster than the canvas is able to repaint. So, in Swing I do the following:
    // ...
    SwingUtilities.invokeLater(() -> updateView(data));

void updateView(GraphData data) {
    this.currentGraphData = data;
    this.repaint();
}

This works nicely and it's also performant enough.

A similar approach for my SWT component:
    // ...
    this.getDisplay().asyncExec(() -> updateView(data));

void updateView(GraphData data) {
    if (!this.isDisposed()) {
        this.currentGraphData = data;
        this.redraw(); 
    }
}

This works also nicely, although it seems to be a bit less performant. However it looks like I had a memory leak, because heap space increases over time. This is caused by org.eclipse.swt.widgets.RunnableLock and the Runnable itself accumulating. I'll get a constant heap consumption when I use syncExec instead of asyncExec, unfortunately this pauses the background thread which I don't want to happen.

So my question: is there a way to check if the UI thread is too busy, crowded, etc. to be able to throw some of the updates away? I assume this is what Swing does under the hood, because heap space consumption goes up and down massively, but it never piles up.

Cheers,
Andy
Re: Runnable, RunnableLock instances accumulating on asyncExec [message #1731281 is a reply to message #1731265] Wed, 04 May 2016 06:57
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 794
Registered: July 2009
Senior Member
Seems to be a flood of the SWT messages queue.
Maybe, you could exec the draw operation delayed using Display.timerExec()
If you would use 16 ms as delay, you would still get 60 frames/second.

Andy Junius wrote on Wed, 04 May 2016 05:07
I'm still trying to get into SWT, so maybe that's a beginner question:

I'm working on a time domain plot using Canvas. I implemented this component using JavaFX, Swing and SWT because we have performance issues with JavaFX.

The data gets updated faster than the canvas is able to repaint. So, in Swing I do the following:
    // ...
    SwingUtilities.invokeLater(() -> updateView(data));

void updateView(GraphData data) {
    this.currentGraphData = data;
    this.repaint();
}

This works nicely and it's also performant enough.

A similar approach for my SWT component:
    // ...
    this.getDisplay().asyncExec(() -> updateView(data));

void updateView(GraphData data) {
    if (!this.isDisposed()) {
        this.currentGraphData = data;
        this.redraw(); 
    }
}

This works also nicely, although it seems to be a bit less performant. However it looks like I had a memory leak, because heap space increases over time. This is caused by org.eclipse.swt.widgets.RunnableLock and the Runnable itself accumulating. I'll get a constant heap consumption when I use syncExec instead of asyncExec, unfortunately this pauses the background thread which I don't want to happen.

So my question: is there a way to check if the UI thread is too busy, crowded, etc. to be able to throw some of the updates away? I assume this is what Swing does under the hood, because heap space consumption goes up and down massively, but it never piles up.

Cheers,
Andy

Re: Runnable, RunnableLock instances accumulating on asyncExec [message #1731283 is a reply to message #1731281] Wed, 04 May 2016 07:10
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 794
Registered: July 2009
Senior Member
Actually, Display.timerExec() would not help here, so you will have to manually decrease rendering speed, for example, using ScheduledExecutorService.schedule(...).
Forum: NatTable
 Topic: How to change Time in DateCellEditor Cell
Re: How to change Time in DateCellEditor Cell [message #1731293 is a reply to message #1730211] Wed, 04 May 2016 07:36
Rashmi Tr is currently offline Rashmi TrFriend
Messages: 17
Registered: November 2011
Junior Member
Hi Dirk,
I wanted to be able to edit date and time both.So i extended AbstractCellEditor and in createEditorControl() i added my Control to edit Date and Time both. I added KeyListner for Enter key as well and before doing commit i checked if date value of editor is not more than 10 days from today.

This i need to check also when mouse is clicked somewhere else to close the editor . How can I do this? Do I need to add mouse listner to my control? Closing Editor through mouse click is by default?

Many Thanks in Advance,
Rashmi
Re: How to change Time in DateCellEditor Cell [message #1731297 is a reply to message #1731293] Wed, 04 May 2016 07:55
Dirk Fauth is currently online Dirk FauthFriend
Messages: 2111
Registered: July 2012
Senior Member
Typically this is done via focuslistener. Check the existing editor implementations to get an idea.
Forum: Eclipse 4
 Topic: declarative service dependencies
Re: declarative service dependencies [message #1731277 is a reply to message #1731233] Wed, 04 May 2016 06:49
Erik Vande Velde is currently offline Erik Vande VeldeFriend
Messages: 67
Registered: September 2012
Member
The environment is RCP E4, and we are considering if we should use declarative services or not (replace them by classes annotated with @Creatable, and inject instances of these classes where needed). The application is split in three layers: UI, services and connector. The current question is if we should use Osgi/declarative services in the service layer or not at all ...
Re: declarative service dependencies [message #1731298 is a reply to message #1731277] Wed, 04 May 2016 07:58
Dirk Fauth is currently online Dirk FauthFriend
Messages: 2111
Registered: July 2012
Senior Member
If you want to implement a service layer, declarative services are a perfect match. Doing something custom with @Creatable will bring up more issues than you are trying to solve.
Re: declarative service dependencies [message #1731299 is a reply to message #1731298] Wed, 04 May 2016 07:59
Dirk Fauth is currently online Dirk FauthFriend
Messages: 2111
Registered: July 2012
Senior Member
BTW, declarative services can also be injected with e4 di
Forum: GEF
 Topic: Asynchronous updates of Edges
Re: Asynchronous updates of Edges [message #1731305 is a reply to message #1725601] Wed, 04 May 2016 08:30
Christoph Broeter is currently offline Christoph BroeterFriend
Messages: 20
Registered: July 2015
Junior Member
Hey!
I think that I am facing a related problem. See https://www.eclipse.org/forums/index.php/t/1076280/

My issue is that I want to update the color of edges. This works in the case that refresh() is called on the viewer object, but as you mentioned this will also call complete Layout (which is in my case not inteded).
In the meantime I've tried to implement a workaround. The idea is to maintain a map storing the visuals for all edges (of type EdgeContentPart) in the current styleprovider and implementing a factory like behavior for the styleprovider aswell.
Same I did for for the nodes(NodeContentPart) and this works great. Sad thing is that this workaround works for nodes but not for edges since I am not able to get the current reference to the used color. I don't know how the EdgeAttributeMap is used by the styleProvider to influence this workaround.

If you have found n way to archive update behavior on edges please let me know.
Forum: e(fx)clipse
 Topic: FXMLBuilder StackOverflowError
Re: FXMLBuilder StackOverflowError [message #1731308 is a reply to message #1731243] Wed, 04 May 2016 08:45
Denny Bayer is currently offline Denny BayerFriend
Messages: 2
Registered: May 2016
Junior Member
Thanks!
Forum: OCL
 Topic: [oclinecore] unable to set EKeys
[oclinecore] unable to set EKeys [message #1731303] Wed, 04 May 2016 08:19
Wilbert Alberts is currently offline Wilbert AlbertsFriend
Messages: 153
Registered: June 2010
Senior Member
Hi,

I think I might have triggered a bug in the oclinecore editor.

I create Basic.ecore with the following content:
package Basic : Basic = 'http://BasickPackage'
{
    class NamedElement
    {
        attribute name : String[1];
    }
}

I also created My.ecore with the following content:
import Basic : 'Basic.ecore#/' ;

package MyPackage : MyPackage = 'http://MyPackage'
{
    class Foo extends Basic::NamedElement;
    class Bar
    {
        property foo : Foo[?] 
        {
            key name;
        }
    }
}


Note that I want to set the EKeys attribute of the Bar::foo property. However, when I save My.ecore from the oclinecore editor, this property is not persisted. If I use the tree editor, set the EKeys attribute, and save it, it is persisted (and actually looks the same as I typed above).

Interesting is that if NamedElement is contained in My.ecore, then the EKeys attribute is persisted correctly.

Is this a bug or did I do something wrong?

Greetings,
Wilbert.
Re: [oclinecore] unable to set EKeys [message #1731309 is a reply to message #1731303] Wed, 04 May 2016 08:44
Ed Willink is currently offline Ed WillinkFriend
Messages: 4711
Registered: July 2009
Senior Member
Hi

https://bugs.eclipse.org/bugs/show_bug.cgi?id=492960 raised

(too late for M7, probably fixed in RC1).

Regards

Ed Willink

On 04/05/2016 09:19, Wilbert Alberts wrote:
> Hi,
>
> I think I might have triggered a bug in the oclinecore editor.
>
> I create Basic.ecore with the following content:
>
> package Basic : Basic = 'http://BasickPackage'
> {
> class NamedElement
> {
> attribute name : String[1];
> }
> }
>
> I also created My.ecore with the following content:
>
> import Basic : 'Basic.ecore#/' ;
>
> package MyPackage : MyPackage = 'http://MyPackage'
> {
> class Foo extends Basic::NamedElement;
> class Bar
> {
> property foo : Foo[?] {
> key name;
> }
> }
> }
>
>
> Note that I want to set the EKeys attribute of the Bar::foo property.
> However, when I save My.ecore from the oclinecore editor, this
> property is not persisted. If I use the tree editor, set the EKeys
> attribute, and save it, it is persisted (and actually looks the same
> as I typed above).
> Interesting is that if NamedElement is contained in My.ecore, then the
> EKeys attribute is persisted correctly.
>
> Is this a bug or did I do something wrong?
>
> Greetings,
> Wilbert.
>
Forum: C / C++ IDE (CDT)
 Topic: Bug in the project properties => C/C++ Build => Settings
Re: Bug in the project properties => C/C++ Build => Settings [message #1731272 is a reply to message #1731259] Wed, 04 May 2016 06:20
Jonah Graham is currently offline Jonah GrahamFriend
Messages: 52
Registered: June 2014
Member
Jasmine Little wrote on Tue, 03 May 2016 17:12
Updating eclipse.ini and using GTK2 worked for me.


Thank you for the confirmation. And I am pleased you now have a working system again.
Re: Bug in the project properties => C/C++ Build => Settings [message #1731306 is a reply to message #1731272] Wed, 04 May 2016 08:31
michael musset is currently offline michael mussetFriend
Messages: 2
Registered: April 2016
Junior Member
yes, using gtk2 solve the problem !
Re: Bug in the project properties => C/C++ Build => Settings [message #1731311 is a reply to message #1731306] Wed, 04 May 2016 08:54
Jonah Graham is currently offline Jonah GrahamFriend
Messages: 52
Registered: June 2014
Member
michael musset wrote on Wed, 04 May 2016 04:31
yes, using gtk2 solve the problem !

Michael, thank you for confirming.
Forum: Newcomers
 Topic: Mars.2 splash screen
Re: Mars.2 splash screen [message #1731290 is a reply to message #1731250] Wed, 04 May 2016 07:29
Ed Merks is currently offline Ed MerksFriend
Messages: 27393
Registered: July 2009
Senior Member
Tauno,

It's not clear how you installed it, what you did to update it, and what
a "lost splash screen" means exactly. I assume it still runs okay? If
it's just a "Check for Updates" being used, I don't see how Oomph would
be involved...


On 03.05.2016 20:54, Tauno Voipio wrote:
> Two different installations of Mars.2 lost the splash screen on a
> recent update.
> Is this maybe an Oomph error?
>
> Both installations are Mars 4.5.2 20160218-0600, one on OS X 10.9.5
> and the other on Kubuntu Linux 14.04 LTS.
>
 Topic: Cannot find source code for Neon package
Cannot find source code for Neon package [message #1731268] Wed, 04 May 2016 05:05
Emlyn Jose is currently offline Emlyn JoseFriend
Messages: 2
Registered: March 2016
Junior Member
Hi,
Here i am stuck with the Neon source code. We have been using Mars package from https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/mars/1/eclipse-committers-mars-1-linux-gtk-x86_64.tar.gz . Could you please provide the source code link for the Neon package?

Regards,
Emlyn Jose
Re: Cannot find source code for Neon package [message #1731295 is a reply to message #1731268] Wed, 04 May 2016 07:46
Felix Dorner is currently offline Felix DornerFriend
Messages: 89
Registered: December 2015
Member
On 04-May-16 07:05, Emlyn Jose wrote:
> Hi,
> Here i am stuck with the Neon source code. We have been using Mars
> package from
> https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/mars/1/eclipse-committers-mars-1-linux-gtk-x86_64.tar.gz
> . Could you please provide the source code link for the Neon package?

> Regards,
> Emlyn Jose
>

On download.eclipse.org there is a link to developer builds:

http://www.eclipse.org/downloads/index-developer.php
 Topic: Build eclipse from source error
Build eclipse from source error [message #1731312] Wed, 04 May 2016 09:00
Diamantis Karagkiaouris is currently offline Diamantis KaragkiaourisFriend
Messages: 4
Registered: March 2016
Junior Member
Hello,

Following the updated instructions on https://wiki.eclipse.org/Platform-releng/Platform_Build the maven build is throwing exceptions. Also could it be possible to build only for a specific platform and architecture for example (windows x64)?

Thank you very much!
Forum: Epsilon
 Topic: How to access enumeration literals defined in UML Profiles?
Re: How to access enumeration literals defined in UML Profiles? [message #1731285 is a reply to message #1730865] Wed, 04 May 2016 07:14
Rene Meis is currently offline Rene MeisFriend
Messages: 17
Registered: June 2015
Junior Member
Hi Dimitris,

I attached a minimal example. It contains the minimal profile (project Profile), a model which has this (local) profile applied (project Model) and the wizard (project Wizard) that causes the undesired behavior. The model and profile were created with Papyrus and also the wizard is executed from Papyrus. The wizard is registered with the Namespace URI: http://www.eclipse.org/uml2/5.0.0/UML.


Cheers,
Rene
  • Attachment: Example.zip
    (Size: 7.92KB, Downloaded 1 time)
Re: How to access enumeration literals defined in UML Profiles? [message #1731310 is a reply to message #1731285] Wed, 04 May 2016 08:52
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 1188
Registered: July 2009
Senior Member
Hi Rene,

This seems to be working fine using the tree-based UML editor. I wasn't able to get Papyrus (1.1.2.201509161440 - installed on top of the 1.3 Epsilon distribution) to open the diagram at all I'm afraid.

Cheers,
Dimitris
Re: How to access enumeration literals defined in UML Profiles? [message #1731314 is a reply to message #1731310] Wed, 04 May 2016 09:15
Rene Meis is currently offline Rene MeisFriend
Messages: 17
Registered: June 2015
Junior Member
Hi Dimitris,

sorry, the provided model does not cause the error. Maybe because it already contains an application of the stereotype that has an attribute of the type of the enumeration.

I attached an empty UML model with only the profile applied. For this model, the error occurs also in the UML Model Editor.


Cheers,
Rene
  • Attachment: Test.zip
    (Size: 1.84KB, Downloaded 0 times)
Forum: RCP Testing Tool
 Topic: Unable to add a new AUT to RCPTT
Re: Unable to add a new AUT to RCPTT [message #1731274 is a reply to message #1730067] Wed, 04 May 2016 06:27
Aami C P is currently offline Aami C PFriend
Messages: 2
Registered: April 2016
Junior Member
Hi Andrey,

I went through the plug-ins and found that plug-in structure was not proper (like some plug-ins were missing META-INF folder itself and also the jar folder was missing. )
Now I got the proper product and its working fine. Smile

Thank You for the help Smile

Best regards,
Aami.
 Topic: GEF3 validation selects the properties of Figure rather than EditPart
GEF3 validation selects the properties of Figure rather than EditPart [message #1731317] Wed, 04 May 2016 09:23
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hello,

I am trying to use RCPTT for my GEF 3 application. In validation mode it selects the properties of Figure rather than EditPart.

Any idea why it happens?

Forum: BIRT
 Topic: Set height element tr frame view
Set height element tr frame view [message #1731322] Wed, 04 May 2016 09:30
longtqdayma Mising name is currently offline longtqdayma Mising nameFriend
Messages: 3
Registered: April 2015
Junior Member
Embarrassed I designed a Birt report form on the report.
We have many pages. But the bottom of each page there is a large white space.
I want to give that space travel
Forum: Equinox
 Topic: e4 selfupdate
Re: e4 selfupdate [message #1731323 is a reply to message #1000290] Wed, 04 May 2016 09:35
Kees Pieters is currently offline Kees PietersFriend
Messages: 4
Registered: October 2015
Junior Member
For completeness: The IProfileregistry can return null if org.eclipse.equinox.ds is not activated. You can easily overlook this, because a provisioning agent is returned from the service registry.
Forum: TMF (Xtext)
 Topic: What to commit
Re: What to commit [message #1731301 is a reply to message #1730923] Wed, 04 May 2016 08:12
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 693
Registered: July 2009
Location: Hamburg
Senior Member
It's a matter of taste/necessity what you check in.

You should always check in
- everything that is hand written. That includes the grammar
- everything that has been manually modified, e.g. if you touched the generated plugin.xml
- the base plug-in structure as created by the 'New Xtext project' wizard, as the generator is not capable of recreating plug-ins and the base files (e.g. MANIFEST.MF) therein.

It makes sense to check in
- all generate-once artifacts, e.g. plugin.xml, everything in the src folder. Why? Because you could manually modify it in the future and forget to add it.
- the .settings folder if you want your project settings to be valid for all users

You don't have to check in
- purely generated code in the folders src-gen or xtend-gen. It makes sense to check them in if you don't want to force users (that includes a CI server) to generated after checking out, or to better track what changes between two generator runs, or to make it easy to revert a change.

I never checked in
- the bin folder as it is really automatically created and populated by Eclipse. Eclipse skip this by default.

Some versioning systems, e.g. git, delete empty folders on checkout. This can cause errors after checkout, e.g. when Eclipse cannot find the src-gen folder you chose not to check in. To avoid that you can add and check in a dummy file in these directories.


---
Get professional support from the Xtext committers at www.typefox.io
 Topic: Eclipse Plugin Install Error
Eclipse Plugin Install Error [message #1731273] Wed, 04 May 2016 06:26
RamaRao Nandamuri is currently offline RamaRao NandamuriFriend
Messages: 72
Registered: April 2016
Member
Hi Christian,

I have created plugin for my dsl editor that developed using xtext.

It is installing on my eclipse IDE successfully but when I using the same plugin on some other system it is throwing below error. I debug the plugin but I didn't get the solution.

index.php/fa/25806/0/

I checked in my plugin it contains all the artifacts like :



Please find the attached plugin. Could you please tell me the bug in my setup?

[Updated on: Wed, 04 May 2016 09:35]

Report message to a moderator

Re: Eclipse Plugin Install Error [message #1731275 is a reply to message #1731273] Wed, 04 May 2016 06:46
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 8898
Registered: July 2009
Senior Member
the screenhot is irrelevant. the interesting point is what is in the error message. it says you what is wrong.

in the screenshot you can only see the beginning of the message: requires bundle ...


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: Eclipse Plugin Install Error [message #1731280 is a reply to message #1731275] Wed, 04 May 2016 06:56
RamaRao Nandamuri is currently offline RamaRao NandamuriFriend
Messages: 72
Registered: April 2016
Member
The error message is

Cannot complete the install because one or more required items could not be found.
Software being installed: JPL_Plugin_Editor 1.0.0.201605032306 (JPL_Plugin_Editor.feature.group 1.0.0.201605032306)
Missing requirement: com.prolifics.jpl.JPLEditor.tests 1.0.0.201605032306 (com.prolifics.jpl.JPLEditor.tests 1.0.0.201605032306) requires 'bundle org.eclipse.xtext.junit4 0.0.0' but it could not be found
Cannot satisfy dependency:
From: JPL_Plugin_Editor 1.0.0.201605032306 (JPL_Plugin_Editor.feature.group 1.0.0.201605032306)
To: com.prolifics.jpl.JPLEditor.tests [1.0.0.201605032306]
Re: Eclipse Plugin Install Error [message #1731282 is a reply to message #1731280] Wed, 04 May 2016 06:58
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 8898
Registered: July 2009
Senior Member
are you sure you want to add the tests to your feature? i would not have added them to the feature

Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: Eclipse Plugin Install Error [message #1731284 is a reply to message #1731282] Wed, 04 May 2016 07:12
RamaRao Nandamuri is currently offline RamaRao NandamuriFriend
Messages: 72
Registered: April 2016
Member
Hi Christian,

I am new to xtext. This is the first time I am working on it. So I don't know what all are required to create a plugin so at the time of plugin creation I have added all the artifacts.

Re: Eclipse Plugin Install Error [message #1731286 is a reply to message #1731284] Wed, 04 May 2016 07:23
RamaRao Nandamuri is currently offline RamaRao NandamuriFriend
Messages: 72
Registered: April 2016
Member
Hi Christian,

Do I need to mention all those I required in category.xml?
Re: Eclipse Plugin Install Error [message #1731287 is a reply to message #1731284] Wed, 04 May 2016 07:24
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 8898
Registered: July 2009
Senior Member
is it working if you remove it? do you have a updatesite for xtext added to your target eclipse? is xtext already installed there?

Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: Eclipse Plugin Install Error [message #1731288 is a reply to message #1731287] Wed, 04 May 2016 07:27
RamaRao Nandamuri is currently offline RamaRao NandamuriFriend
Messages: 72
Registered: April 2016
Member
To install my plugin Do I need to xtext on customer IDE?
Re: Eclipse Plugin Install Error [message #1731289 is a reply to message #1731288] Wed, 04 May 2016 07:27
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 8898
Registered: July 2009
Senior Member
yes, at least parts of it.

Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: Eclipse Plugin Install Error [message #1731291 is a reply to message #1731289] Wed, 04 May 2016 07:31
RamaRao Nandamuri is currently offline RamaRao NandamuriFriend
Messages: 72
Registered: April 2016
Member
why we need xtext installing on customer side, though my plugin developed from xtext ? Can you please explain?
Re: Eclipse Plugin Install Error [message #1731294 is a reply to message #1731291] Wed, 04 May 2016 07:37
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 8898
Registered: July 2009
Senior Member
xtext has parts that generate stuff, but xtext has api parts as well.
these api parts are not copied to each language but reused by all languages.
this is why you need e.g. the plugin org.eclipse.xtext in your target environment.

of couse you can e.g. add the xtext.sdk feature to the included features in the feature editor of your feature xml
or you simply add the xtext update site as well to your customer ide.

or .... (tons of options on how to deal with this)


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: Eclipse Plugin Install Error [message #1731296 is a reply to message #1731294] Wed, 04 May 2016 07:54
RamaRao Nandamuri is currently offline RamaRao NandamuriFriend
Messages: 72
Registered: April 2016
Member
Thanks for your valuable information
Re: Eclipse Plugin Install Error [message #1731304 is a reply to message #1731296] Wed, 04 May 2016 08:29
RamaRao Nandamuri is currently offline RamaRao NandamuriFriend
Messages: 72
Registered: April 2016
Member
Hi Christian,


But the newly generated plugin is not working individually. If I install xtext plugin its working. Am I going in right direction? Can you please guide me?

[Updated on: Wed, 04 May 2016 09:35]

Report message to a moderator

Re: Eclipse Plugin Install Error [message #1731307 is a reply to message #1731304] Wed, 04 May 2016 08:33
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 8898
Registered: July 2009
Senior Member
org.eclipse.text is not org.eclipse.xtext

and there are others (ca 30) to add.

so did you add xtext.sdk to included features?


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: Eclipse Plugin Install Error [message #1731316 is a reply to message #1731307] Wed, 04 May 2016 09:20
RamaRao Nandamuri is currently offline RamaRao NandamuriFriend
Messages: 72
Registered: April 2016
Member
It's a spelling mistake. I have added org.eclipse.xtext. I didn't see xtext.sdk there in the list. Do I need to install 30 more packages?
Re: Eclipse Plugin Install Error [message #1731318 is a reply to message #1731316] Wed, 04 May 2016 09:23
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 8898
Registered: July 2009
Senior Member
yes i have no complete list.

thus simply add the sdk to the feature, p2 will then pick what it needs


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
 Topic: Change the "Xtext Task" in Task Browser
Re: Change the "Xtext Task" in Task Browser [message #1731313 is a reply to message #1731172] Wed, 04 May 2016 09:02
Eleanor Richie is currently offline Eleanor RichieFriend
Messages: 119
Registered: August 2014
Senior Member
I tried making a subtype for the marker in the ui:
<extension
id="org.eclipse.xtext.ui.Lang.task"
name="Lang Task"
point="org.eclipse.core.resources.markers">
<super
type="org.eclipse.xtext.ui.task">
</super>
<persistent
value="true">
</persistent>
</extension>

and overriden TaskMarkerTypeProvider to be :
public static final String XTEXT_TASK_TYPE = "org.eclipse.xtext.ui.Lang.task";

@Override
public String getMarkerType(Task task) {
// TODO Auto-generated method stub
return XTEXT_TASK_TYPE;
}

and adding the binding in the UIModule to my TaskMarkerProvider. but now the whole feature is not working! What did I miss?
Re: Change the "Xtext Task" in Task Browser [message #1731315 is a reply to message #1731313] Wed, 04 May 2016 09:17
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 8898
Registered: July 2009
Senior Member
the task marker id is qualfied with the bundle

public class MyDslTaskMarkerTypeProvider extends TaskMarkerTypeProvider{
	
	public static final String XTEXT_TASK_TYPE = "org.eclipse.xtext.ui.Lang.task";

	@Override
	public String getMarkerType(Task task) {
		return "org.xtext.example.mydsl.ui."+XTEXT_TASK_TYPE;
	}

}



//or unqulify in plugin.xml and use "org.xtext.example.mydsl.ui.<unqulified>"


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: Change the "Xtext Task" in Task Browser [message #1731321 is a reply to message #1731315] Wed, 04 May 2016 09:26
Eleanor Richie is currently offline Eleanor RichieFriend
Messages: 119
Registered: August 2014
Senior Member
Thanks Alot Christian Smile Smile I appreciate your support so much
 Topic: Xtend error
Re: Xtend error [message #1731324 is a reply to message #1731235] Wed, 04 May 2016 09:44
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 693
Registered: July 2009
Location: Hamburg
Senior Member
Cannot reproduce that. Are you using a current version of Xtend?

---
Get professional support from the Xtext committers at www.typefox.io
Forum: Virgo
 Topic: Classes not being found
Re: Classes not being found [message #1731292 is a reply to message #1731237] Wed, 04 May 2016 07:32
GianMaria Romanato is currently offline GianMaria RomanatoFriend
Messages: 17
Registered: November 2015
Junior Member
Hi Bill,

In a OSGi container the system bundle exports automatically java.* packages for the benefit of other bundles and as such you are not required to import java.* packages..

The javax.* packages however are not automatically available and you are usually required to import them. This is not immediately visible when developing with PDE, because several javax.* packages are part of the JVM rt.jar which is included per default in every Java project class path and as such PDE is not currently able to give you a compile error if you forget to import the javax.* packages from the rt.jar [1]. However, if you forget the import you will experience a runtime error as in your case.

So in short, you should import the javax.* packages you are using. It's probably possible to circumvent this requirement by tweaking the OSGi framework boot delegation [2] but that is not recommended.

I noticed that the classes that are failing to load are from the JNDI packages. Please note that in OSGi you should comply with the OSGi way of using JNDI [3] as opposed to the JavaSE / JavaEE approach. As an alternative, you may find interesting an old blog post of mine discussing how to add "traditional" OSGi support to Virgo [4]

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=164188
[2] https://wiki.eclipse.org/Equinox_Boot_Delegation
[3] http://www.eclipse.org/gemini/naming/
[4] http://devshards.blogspot.it/2012/10/global-jndi-support-in-virgo-server-35.html

Hope this helps.
GianMaria.
Re: Classes not being found [message #1731320 is a reply to message #1731292] Wed, 04 May 2016 09:24
Bill Mair is currently offline Bill MairFriend
Messages: 25
Registered: July 2009
Junior Member
Hi GianMaria,

I am using Naming to access DNS, not local JNDI resources.

I declared the following in the manifest:

Bundle-RequiredExecutionEnvironment: JavaSE-1.7

and not
Bundle-RequiredExecutionEnvironment: OSGi/Minimum-1.2
(or something like that).

So IMHO the platform dependency is pretty clear.

I am starting to wonder if Virgo can really be used as an "Enterprise OSGi server" and if it does what I thought it was supposed to be for.

Independent for that my issue remains as follows:

I tried adding
Import-Package: javax.naming,
 javax.naming.directory

but even AFTER adding them, the platform threw the ClassNotFound for "org.apache.naming.java.javaURLContextFactory" at me.

There is no way that I can account for that "error" in my implementation.

So, AFTER declaring the required bundle imports, how do I get the platform NOT to throw an exception about the org.apache classes?

P.S. I'll have to look at the alternative solutions you referred to as well.
 Topic: OSGI fragment bundle not connected to websockets deployed in Virgo nano
OSGI fragment bundle not connected to websockets deployed in Virgo nano [message #1731325] Wed, 04 May 2016 09:57
Chandre Gowda is currently offline Chandre GowdaFriend
Messages: 47
Registered: April 2013
Member
Hello,

I have OSGI bundles deployed in Virgo nano server(3.6.4). i am suppose to deploy websocket endpoint in OSGI bundle and web client will connect to this websocket endpoint. If we deploy websocket class in host bundle and if it has 'Web-ContextPath: appserver', then following url will connect from client to server(websocket connection).

ws://localhost/appserver/consolelogs

However if we deploy websocket class in fragment bundle which is attached to the above host bundle, the same above websocket url doesn't work. Could any of you let us know what is missing here ?

Thanks
Chandru
Re: OSGI fragment bundle not connected to websockets deployed in Virgo nano [message #1731326 is a reply to message #1731325] Wed, 04 May 2016 10:02
GianMaria Romanato is currently offline GianMaria RomanatoFriend
Messages: 17
Registered: November 2015
Junior Member
Hi

did you check that the fragment is properly resolved and attached to the host?

You can see that from the OSGi console or the Web console by looking at the status of the host. You should see there whether the fragment is attached.

GianMaria.



Current Time: Wed May 04 10:11:00 GMT 2016

Powered by FUDForum. Page generated in 0.32102 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software