STS eclipse creates multiple folders inside .eclipse every time it is opened - eclipse

Hi i asked this question before here but it did not get any answer, i restated the question.
ok this is the environment.
Spring Tool Suite
Version: 3.8.2.RELEASE
Build Id: 201610040743
Platform: Eclipse Neon.1 (4.6.1)
macOs Sierra.
Every time i open STS it creates a folder inside .eclipse in this format.
I run this command over the folder .eclipse to ensure eclipse has the rights to write and read.
chmod 777 .eclipse/
chown -R myuser:staff .eclipse/
But STS keeps doing the same thing.
--EDIT
The problem is, every time eclipse STS do this, is like if the IDE were starting for first time, so everything is erased each time the IDE is opened.
--EDIT
Checking the file locations.setup locatet in /Users/ovazquez/.eclipse/org.eclipse.oomph.setup/setups/ i can see that this file changes every time the IDE it is started, this is the file the first time the IDE reads the config.
<?xml version="1.0" encoding="UTF-8"?>
<setup:LocationCatalog
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0">
<installation>
<key href="file:/Users/ovazquez/.eclipse/org.springsource.sts_3.8.2.RELEASE_1218045591_macosx_cocoa_x86_64/configuration/org.eclipse.oomph.setup/installation.setup#/"/>
<value href="file:/Users/ovazquez/Documents/workspace-sts-3.8.2.RELEASE/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup#/"/>
</installation>
<workspace>
<key href="file:/Users/ovazquez/Documents/workspace-sts-3.8.2.RELEASE/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup#/"/>
<value href="file:/Users/ovazquez/.eclipse/org.springsource.sts_3.8.2.RELEASE_1218045591_macosx_cocoa_x86_64/configuration/org.eclipse.oomph.setup/installation.setup#/"/>
</workspace>
</setup:LocationCatalog>
Then this is the same file once the ide it is opened again.
<?xml version="1.0" encoding="UTF-8"?>
<setup:LocationCatalog
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0">
<installation>
<key href="file:/Users/ovazquez/.eclipse/org.springsource.sts_3.8.2.RELEASE_431833271_macosx_cocoa_x86_64/configuration/org.eclipse.oomph.setup/installation.setup#/"/>
<value href="file:/Users/ovazquez/Documents/workspace-sts-3.8.2.RELEASE/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup#/"/>
</installation>
<installation>
<key href="file:/Users/ovazquez/.eclipse/org.springsource.sts_3.8.2.RELEASE_1218045591_macosx_cocoa_x86_64/configuration/org.eclipse.oomph.setup/installation.setup#/"/>
<value href="file:/Users/ovazquez/Documents/workspace-sts-3.8.2.RELEASE/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup#/"/>
</installation>
<workspace>
<key href="file:/Users/ovazquez/Documents/workspace-sts-3.8.2.RELEASE/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup#/"/>
<value href="file:/Users/ovazquez/.eclipse/org.springsource.sts_3.8.2.RELEASE_431833271_macosx_cocoa_x86_64/configuration/org.eclipse.oomph.setup/installation.setup#/"/>
<value href="file:/Users/ovazquez/.eclipse/org.springsource.sts_3.8.2.RELEASE_1218045591_macosx_cocoa_x86_64/configuration/org.eclipse.oomph.setup/installation.setup#/"/>
</workspace>
</setup:LocationCatalog>

I was also getting the same issue and resolved it using :
Extract the tar/zip file anywhere you want.
Drag the STS.app file to "Applications".
Now you will see the STS application in launchpad also.
Now you can start STS by clicking on this STS icon from
launchpad/spotlight search.
It should resolve the issue.

Related

Eclipse Maven Update cleans jaxb generated classes and Regenerates them without taking the class name tag into account

I have troubles with eclipse / maven in Netbeans it's working as expected.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<jxb:bindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/jxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd"
jxb:extensionBindingPrefixes="xjc"
version="2.1">
<jxb:bindings schemaLocation="http://myserver/schemas/CustomerOrder_v1.7.xsd" node="/xsd:schema">
<jxb:bindings node="//xsd:element[#name='customerOrder']">
<jxb:class name="ElectronicCustomerOrder"/>
</jxb:bindings>
<jxb:bindings node="//xsd:element[#name='deliveryDate']" multiple="true">
<xjc:javaType adapter="com.prodega.xml.JodaTimeDateAdapter" name="org.joda.time.LocalDate" />
</jxb:bindings>
</jxb:bindings>
</jxb:bindings>
if i do a maven update in eclipse (photon or mars) it generates a class called CustomerOrder into the target:
image
But i'm expecting a class named ElectronicCustomerOrder. As soon i make a change in the xjb file and save it, it renames the class in the target folder. But then the building workspace part is done and it didn't find the class ElectronicCustomerOrder. Can someone Tell me what's happening here since it's anoying to build on commandline and then do a refresh in eclipse.
A normal mvn clean install command will work also properly.

Neo4j plugin missing in Gephi 0.9.1 version

I am pretty new to neo4j. In my graph, there are more than 5k nodes and neo4j browser doesnt show all the nodes, as there seems to be a limit and picture is messy as well.
So i was trying to gephi 0.9 and installed the same.
But I am unable to find the neo4j database plugin. I checked under
Tools --> plugins --> available plugins section
Please let me know, if I am missing something here.
Plugin screenshot
Thanks in advance.
You don't actually need the Neo4j plugin for Gephi, as you can use neo4j-shell-tools instead to do a GraphML export, and open that in Gephi.
Beware that the option parsing of export-graphml is a bit buggy (and I should open an issue about it); if you want to use the -t or -r flags, they have to be specified before -o, like this:
export-graphml -r -o out.graphml match ...
I also had to add some metadata description to the GraphML file so Gephi finds more data (and I should also open an issue about that, at least for the generic metadata). The beginning of the file looks like
<?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
<graph id="G" edgedefault="directed">
which I changed to
<?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
<key attr.name="label" attr.type="string" for="node" id="labels"/>
<key attr.name="label" attr.type="string" for="edge" id="label"/>
<key attr.name="someProperty" attr.type="boolean" for="node" id="someProperty"/>
<!-- more descriptions of node properties -->
<graph id="G" edgedefault="directed">

Log4j2.xml file not being seen when using NetBeans

I'm having a problem with my logj2.xml being seen on my Windows7/64 box running Java 1.7.0_13/64. I'm trying to run the application using the NetBeans/64 7.2.1 IDE via the debugger.
log4j2.xml is sitting in my r:\ directory. The (user)classpath is ".;r:\". It is apparently not being seen, because when I look at the 'config.config.name' of the Logger in my debugger, it gives me the value of 'Default'. Also, I can't find the file specified in the log4j2.xml file anywhere, on any drive, of my machine. I've also looked for any new files containing the word 'default' on my machine, and can find none that are current.
So I suspect I'm doing 1 of 2 things wrong:
1) Setting my classpath incorrectly.
2) Putting my log4j2.xml file together incorrectly.
Any help would be appreciated. My keys are getting sticky from banging them with my forehead.
Here's the config file:
<?xml version="1.0" encoding="UTF-8"?>
<configuration status="debug" name="xxx" packages="" >
<appenders>
<RollingFile name="log" fileName="qqq.log"
immediateFlush="true" filePattern="qqq-%d{yyyy-MM-dd}.log">
<PatternLayout>
<pattern>"%d{YYYY-MM-dd HH:mm:ss} [%t] %-5level %logger{36} - %n%msg%n%n%n"</pattern>
</PatternLayout>
<Policies>
<TimeBasedTriggeringPolicy />
<SizeBasedTriggeringPolicy />
</Policies>
<DefaultRolloverStrategy max="92"/>
</RollingFile>
</appenders>
<loggers>
<root level="trace">
<appender-ref ref="log"/>
</root>
</loggers>
</configuration>
Ok, got it. I've renamed this question to include NetBeans, because that was the gist of my problem.
As a review, it is required that the log4j2.xml file needs to go on the classpath. While I could affect the classpath in netbeans by adding jar files to the project, I didn't initially think about finding a config file on the classpath. Anyway, once I realized that, I played around a bit in project properties, and finally figured out that just adding the folder to the 'Compile-time libraries' dialog ( in this case "r:\" ) puts the config file on the classpath, and my logging works just like it should.
Whew!
Hope this helps someone.
Thanks joe7pak, your posts were the last piece of the puzzle to solve my log4j properties problem in NetBeans. My problem required a couple extra steps that may help round this solution out.
First, I created a log4j.xml file in the src directory using the default xml from http://wiki.apache.org/logging-log4j/Log4jXmlFormat.
I then set the NetBeans VM options in Properties\Run to: -Dlog4j.debug. I noticed that a jar's (httpbuilder) log4j.xml file was being loaded by default instead of mine.
So I added the src folder to the compile time libraries in Properties\Libraries using your recommendation. However, it was still loading the log4j.xml file from the jar.
The final touch was to move the src folder to the top of the compile time libraries.
Thanks for your post and for answering yourself.

failed to run wicket examples on tomcat7

I downloaded wicket examples 1.6.0 and built successfully in netbeans7.2. but got errors when I tried to deploy on tomcat 7:
Cannot deploy the module. The context.xml file seems to be broken. Check whether it is well-formed and valid.
The module has not been deployed.
See the server log for details.
at
org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:210)
at
org.netbeans.modules.maven.j2ee.ExecutionChecker.performDeploy(ExecutionChecker.java:178)
at
org.netbeans.modules.maven.j2ee.ExecutionChecker.executionResult(ExecutionChecker.java:130)
at
org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.java:212)
at
org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
heres the contents in context.xml:
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<!-- <Loader className="org.atmosphere.util.AtmosphereClassloader"/> -->
<Loader delegate="true"/>
</Context>
I prefer to run wicket in eclipse as it negates the requirement to mess around with an external tomcat instance.
If you are comfortable with eclipse and maven i would download wicket 1.6 example archetype via maven, import into eclipse and then in the test directory you can run the run.java class to get an internal jetty server host wicket for you.
this should get you started quickly without having to wrestle with tomcat configurations too.
Not really an answer but an alternative route to the same end point
Add parameter path to context tag, same path that app will be served:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/application-path-name/">
<!-- <Loader className="org.atmosphere.util.AtmosphereClassloader"/> -->
<Loader delegate="true"/>
</Context>
Answer obtained from this question.

Buckminster RCP simple project materialization

After watching the webinar, skimming over the BuckyBook PDF, and following the Eclipse RCP build tutorial, I still don't know how to materialize a simple RCP plug-in project from CVS into an eclipse workspace.
Does anyone have an example with a CQUERY and an RMAP file, for a simple one project workspace?
Its actually easy.
Here is a sample CSPEC:
<?xml version="1.0" encoding="UTF-8"?>
<cq:componentQuery xmlns:cq="http://www.eclipse.org/buckminster/CQuery-1.0" resourceMap="example-site.rmap">
<cq:rootRequest name="example-site" componentType="eclipse.feature"/>
</cq:componentQuery>
Note the root request name property points to a component. If you have an RCP app which has a main bundle (say one that is the launching point to your app), then you would point to this component using the name property above. This CSPEC will then download all dependent components using the RMAP below, using search paths, providers etc.
The RMAP:
<searchPath name="default">
<provider
readerType="cvs"
componentTypes="osgi.bundle,eclipse.feature"
source="true"
mutable="true">
<uri format=":pserver:anon#cvs.local:/opt/data/cvsroot,{0}/">
<bc:propertyRef key="buckminster.component" />
</uri>
</provider>
</searchPath>
<searchPath name="galileo">
<provider readerType="eclipse.import" componentTypes="osgi.bundle,eclipse.feature"
mutable="false" source="false">
<uri format="http://download.eclipse.org/releases/galileo?importType=binary"/>
</provider>
</searchPath>
<locator searchPathRef="default" pattern="^example\-.*" />
<locator searchPathRef="galileo" failOnError="false" />