Quantcast
Channel: JetBrains Developer Community : Thread List - IntelliJ IDEA Users
Viewing all 5661 articles
Browse latest View live

arrays of HashMaps

$
0
0

Java thinks

 

Why does Java throw up its hands when you mix generics and arrays?

What are you supposed to do instead?  Are they imagining you will have

a differ type in each slot?

 

 

private HashSet[ numberOfHashSets ];

--

Roedy Green Canadian Mind Products http://mindprod.com

Computers are like Old Testament gods; lots of rules and no mercy.

~ Joseph Campbell (born: 1904-03-26 died: 1987-10-31 at age: 83)

 


[bug] Keyboard get locked in IntelliJ IDEA

$
0
0

Hello,

I'm experiencing a problem with my keyboard with IDEA. While working with idea, keyboard get locked up for no reason. After that, I can't type anything IN idea.(works perfectly in other apps.) I have to restart Idea to fix the problem. Mouse works fine, kb problem is only inside idea. This happens frequently, so it is a pain for me. I switched to idea 9.0.2 from 9.0.1 thinking it may had solved the problem. But apparently not.

 

Please give me a solution for this.

Im using Ubuntu 10.04 Ubuntu Lucid.

 

Thanks,

/kasun

How do I move / drag tabs from one group to another?

$
0
0

Hello,

 

I often work on 2 source files at the same time, so I split the view up in 2.

However, quite often I need to move tabs from one split pane to another. I have tried dragging and dropping the tabs but it does not work. Is this seemingly easy functionality possible in IJ?

 

Thanks

grails errors upgrading from 2.1.1 to 2.3.0

$
0
0

Hello,

I'm hoping someone may have some insight on how to resolve this issue.  I've been trying to upgrade from grails 2.1.1 to 2.3.0 on IntelliJ 11.1.5 and keep running into problems.

 

At first I had a missing method Exception for conf/groovy-starter.conf where the app would not even begin to compile, but then found a tip to remove javadoc and sourcs jars:

 

$ rm dist/grails-*-javadoc.jar

$ rm dist/grails-*-sources.jar

 

which seem to at least begin the build, however I now get this error:

 

junit#junit-dep;4.10: not found

 

I've tried a number of things already:

-download and adding the jar manually

-editing buildconfig.groovy for dependancies, plugins

-invalidating caches

 

with no effect. Any help would be much appreciated.

 

Thanks.

org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor not found

$
0
0

Hello,

We have Maven projects with Eclipselink 2.5.1 integration. Unit tests using Intellij stop working for me with error "Error:java: error: Annotation processor 'org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor' not found". But it worked for me with Eclipselink 2.3 and still working using maven commands.

May be somebody have solution for this issue?

Debuging android application

$
0
0

Hi All.

I am trying to debug android application using IntelliJ IDEA 13.1.2. I have "no executable code found at line" when I set breakpoint at any line from my code. First of all I noticed that stacktraces with my code is printed without line numbers and I susspect my apllication does not have debug information, but I have no idea how to emforce it. Anywhere, I have

1. IntelliJ IDEA 13.1.2

2. Started android emulator

3. IntelliJ IDEA android debugguer attached to my activity

4. Many breakpoints set to diffrent places in my code, all with crosses and "no executable code found at line"

IJ 13 doesn't like JIRA?

$
0
0

I upgraded from v11U to v13.0.3C and then to v13.1.2C, and in both cases, JIRA integration is broken. In 13.0.3, I got HTTP errors that it couldn't contact the host. In 13.1.2, the Test button in the config syas it's successfully contacting the host, but when I try to create a task, it no longer queries JIRA for existing issues.


I tried deleting the query string, in case that was the problem, but even though the field appeared to be editable, I couldn't chagne it. I quit, removed it from ~/.IdeaIC13/config/options/other.xml, but on restart, it still showed up, albeit grayed out.

 

Are there known issues with JIRA and v13? Is it because it's the Community edition?

 

Thanks for any insight!

 

 

Jeff

Cannot resolve the name 'repository:auditing-attributes' when running a Test with Spring Data

$
0
0

Hi all,

 

I have an Maven project that uses Spring Data 1.3. On the command line I can run a mvn test and everything runs fine. The problem is when I want to execute my test inside Intellij Idea (13.1.2). I get the exception below. There are a few references of a similar bugs in StackOverflow but it looks like it's not the same (because the XSD is ok). What puzzles me is that on the command line, with Maven, it works, but not within Intellij Idea.

 

Basically, if you look at the spring-jpa-1.3.xsd descriptor you will find a ref="repository:auditing-attributes" which is defined in spring-repository.xsd. And Intellij Idea is not happy. I have to say that the project is quite big and uses tones of Spring XML configuration files. But all use spring-jpa-1.3.xsd, so there is no version problem I would say.

 

Any idea ?

Thanks

 

 

 

 [1;31m17:00:25.007 [main] ERROR o.s.test.context.TestContextManager - Caught exception while allowing TestExecutionListener [org.springframework.test.context.web.ServletTestExecutionListener@1bf7b23] to prepare test instance [fr.dsirc.dsn.core.decl.service.DeclarationDsnServiceTest@13a34af]
 [0;39mjava.lang.IllegalStateException: Failed to load ApplicationContext     at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:157) ~[spring-test-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:103) ~[spring-test-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:73) ~[spring-test-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:313) ~[spring-test-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:211) [spring-test-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:288) [spring-test-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) [junit-4.11.jar:na]     at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:284) [spring-test-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231) [spring-test-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:88) [spring-test-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) [junit-4.11.jar:na]     at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) [junit-4.11.jar:na]     at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) [junit-4.11.jar:na]     at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) [junit-4.11.jar:na]     at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) [junit-4.11.jar:na]     at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) [spring-test-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71) [spring-test-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.junit.runners.ParentRunner.run(ParentRunner.java:309) [junit-4.11.jar:na]     at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174) [spring-test-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.junit.runner.JUnitCore.run(JUnitCore.java:160) [junit-4.11.jar:na]     at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74) [junit-rt.jar:na]     at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211) [junit-rt.jar:na]     at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67) [junit-rt.jar:na]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_10]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_10]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_10]     at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_10]     at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) [idea_rt.jar:na]
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:commonTUSpringContext.xml]
Offending resource: class path resource [springContext-test.xml]; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [notificationIntraSpringContext.xml]
Offending resource: class path resource [commonTUSpringContext.xml]; nested exception is org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 36 in XML document from class path resource [notificationIntraSpringContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'repository:auditing-attributes' to a(n) 'attribute group' component.     at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:76) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:245) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:196) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:181) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:140) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:111) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:243) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.test.context.support.AbstractGenericContextLoader.loadBeanDefinitions(AbstractGenericContextLoader.java:219) ~[spring-test-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:103) ~[spring-test-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:57) ~[spring-test-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:100) ~[spring-test-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:248) ~[spring-test-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:124) ~[spring-test-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:148) ~[spring-test-3.2.1.RELEASE.jar:3.2.1.RELEASE]     ... 27 common frames omitted
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [notificationIntraSpringContext.xml]
Offending resource: class path resource [commonTUSpringContext.xml]; nested exception is org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 36 in XML document from class path resource [notificationIntraSpringContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'repository:auditing-attributes' to a(n) 'attribute group' component.     at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:76) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:271) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:196) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:181) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:140) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:111) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:239) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     ... 46 common frames omitted
Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 36 in XML document from class path resource [notificationIntraSpringContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'repository:auditing-attributes' to a(n) 'attribute group' component.     at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:255) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     ... 57 common frames omitted
Caused by: org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'repository:auditing-attributes' to a(n) 'attribute group' component.     at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) ~[xercesImpl-2.6.2.jar:na]     at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) ~[xercesImpl-2.6.2.jar:na]     at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) ~[xercesImpl-2.6.2.jar:na]     at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(Unknown Source) ~[xercesImpl-2.6.2.jar:na]     at org.apache.xerces.impl.xs.traversers.XSDHandler.getGlobalDecl(Unknown Source) ~[xercesImpl-2.6.2.jar:na]     at org.apache.xerces.impl.xs.traversers.XSDAttributeGroupTraverser.traverseLocal(Unknown Source) ~[xercesImpl-2.6.2.jar:na]     at org.apache.xerces.impl.xs.traversers.XSDAbstractTraverser.traverseAttrsAndAttrGrps(Unknown Source) ~[xercesImpl-2.6.2.jar:na]     at org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.processComplexContent(Unknown Source) ~[xercesImpl-2.6.2.jar:na]     at org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.traverseComplexTypeDecl(Unknown Source) ~[xercesImpl-2.6.2.jar:na]     at org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.traverseLocal(Unknown Source) ~[xercesImpl-2.6.2.jar:na]     at org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseNamedElement(Unknown Source) ~[xercesImpl-2.6.2.jar:na]     at org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseGlobal(Unknown Source) ~[xercesImpl-2.6.2.jar:na]     at org.apache.xerces.impl.xs.traversers.XSDHandler.traverseSchemas(Unknown Source) ~[xercesImpl-2.6.2.jar:na]     at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source) ~[xercesImpl-2.6.2.jar:na]     at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source) ~[xercesImpl-2.6.2.jar:na]     at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unknown Source) ~[xercesImpl-2.6.2.jar:na]     at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source) ~[xercesImpl-2.6.2.jar:na]     at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source) ~[xercesImpl-2.6.2.jar:na]     at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) ~[xercesImpl-2.6.2.jar:na]     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) ~[xercesImpl-2.6.2.jar:na]     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) ~[xercesImpl-2.6.2.jar:na]     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) ~[xercesImpl-2.6.2.jar:na]     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) ~[xercesImpl-2.6.2.jar:na]     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) ~[xercesImpl-2.6.2.jar:na]     at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) ~[xercesImpl-2.6.2.jar:na]     at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) ~[xercesImpl-2.6.2.jar:na]     at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     ... 60 common frames omitted

"Find Usages" change with 13.1.2 or accidental settings change?

$
0
0

For some reason, the default "Find Usages" now returns text occurences by default for me. I noticed this around the time I took an update earlier this week. Is it possible to disable this so that I don't have to go through "Find Usages Settings" dialog? Text occurences are basically never relevant for me. If I wanted to find text occurences, I would just find text in files which provides much better filtering capabilities.

 

build.txt contains IU-135.690

Using Scala plugin 0.35.654 but doubt this is relevant

 

Thanks

Dave

Documentation for Gradle files

$
0
0

It seems "almost random" for when C-q does or doesnt work when editing a build.gradle. Sometimes when I open a project the IDE will prompt me to attach sources and docs for the gradle files, other times not. How do I manually perform this step so that I have gradle jdocs available via C-Q when editing a build.gradle or any other gradle/groovy file?

Newbie Question Compiling App

$
0
0

I have created a very simple test application to display Hello World in a form.  The code is as follows:

 

import javax.swing.*;

 

/**

* Created by Ian on 4/30/14.

*/

public class Test {

    private JPanel panel1;

 

    public static void main(String[] args) {

        JFrame frame = new JFrame("Test");

        frame.setContentPane(new Test().panel1);

        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        frame.pack();

        frame.setVisible(true);

    }

}

 

the form is

hello world.tiff
This works fine in the IDE so I tried creating a jar file using an arcive in the project structure and then building it. The manifest file created looks like
Manifest-Version: 1.0
Class-Path: ./Test.jar
Main-Class: Test
The app will not run from my mac desktop or terminal program.  Getting a class not found message in the terminal
Can someone please point me in the right direction?

'make' is slow when restarting a test

$
0
0

Hi there

 

When I start a unit test and I restart it with Shift+F10 IntelliJ shows a quite long time the message 'make' at the bottom. Since I made no changes I thought it must be incredibly fast.

 

A colleague of mine tested that in eclipse and there the restart of that test starts immediately. I just wonder why this happens? What does IntelliJ more than Eclipse at this point?

 

Thanks in advance for clearifying

Stefan

 

PS: We run IDEA 13.1.2

Java: see compile errors throughout project on save?

$
0
0

I've tried to switch from Eclipse to IntelliJ for my Java development. The one issue I have is that I want to quickly see any compile errors throughout my project when I make changes in a given file. E.g. if I remove a method, I want to see all of the resulting compile errors in any file in my project.

 

How can I do this in IntelliJ?

 

Thanks.

v13.1.2 unstable? (lost cursor and then ignore keystrokes)

$
0
0

Hi,

 

Since I updated to IJ 13.1.2 CE (on XUbuntu 13.04), I often experience a lack of responsiveness which eventually (after a few hours) makes the cursor disappear and few keystroke later, the editor ignores all keystrokes. What I do is basic editing and Shift-Ctrl-F9 to compile. If I exit IJ and restart it again, the issue disappears and will come back later.

 

Now go back to 13.1.1 where this issue didn't exist. Sorry for the vague report, if you need anything other info, please show me how to get that info.

 

Thanks

Compiling an IDEA project without running IDEA itself


Create New Project through wizard with maven support

$
0
0

Is it possible to create a New Project in IntelliJ 13.+ by using the project wizard but configuring it to use Maven instead of dowloading the libraries during project Creation?  I know you can create projects with maven archtypes.  The problem is I don't know if that project/folder structure is what I wanted.  I am kind of inexperienced with Maven.

 

For example I want to create a Java Project with RichFaces.  The New project wizard will want to download the libraries.  I want Maven to handle all that and for it not to download the libraries.

 

I hope this makes sense.

 

intellij-project-creation-richfaces.png

Android Gradle-Project and Unit-Testing

$
0
0

Hi, can anyone help me getting Unittesting working for my Android-Project within Intellij?

I just need normal unit tests for my code - no UI-Testing. After hours of research I got it working from the shell via gradlew, but it would be very nice to use the IDE's Testrunner to run my unit-tests.

 

Thanks

Intellij - Gradle - OSX - Where is the build cache ?

$
0
0

Hello dear IntelliJ-users,

 

I am trying to build a Gradle-based Android project but my IDE (IntelliJ Ultimate 13.1) is failing hard while trying to assemble my project :

Error:Internal error: (java.lang.OutOfMemoryError) Java heap space

java.lang.OutOfMemoryError: Java heap space

at org.jetbrains.jps.incremental.storage.TimestampStorage$StateExternalizer.read(TimestampStorage.java:126)

at org.jetbrains.jps.incremental.storage.TimestampStorage$StateExternalizer.read(TimestampStorage.java:115)

at com.intellij.util.io.PersistentHashMap.doGet(PersistentHashMap.java:427)

at com.intellij.util.io.PersistentHashMap.get(PersistentHashMap.java:398)

at org.jetbrains.jps.incremental.storage.AbstractStateStorage.getState(AbstractStateStorage.java:118)

at org.jetbrains.jps.incremental.storage.TimestampStorage.getStamp(TimestampStorage.java:52)

at org.jetbrains.jps.incremental.FSOperations.traverseRecursively(FSOperations.java:197)

at org.jetbrains.jps.incremental.FSOperations.traverseRecursively(FSOperations.java:189)

at org.jetbrains.jps.incremental.FSOperations.traverseRecursively(FSOperations.java:189)

at org.jetbrains.jps.incremental.FSOperations.traverseRecursively(FSOperations.java:189)

at org.jetbrains.jps.incremental.FSOperations.traverseRecursively(FSOperations.java:189)

at org.jetbrains.jps.incremental.FSOperations.traverseRecursively(FSOperations.java:189)

at org.jetbrains.jps.incremental.FSOperations.traverseRecursively(FSOperations.java:189)

at org.jetbrains.jps.incremental.FSOperations.traverseRecursively(FSOperations.java:189)

at org.jetbrains.jps.incremental.FSOperations.markDirtyFiles(FSOperations.java:174)

at org.jetbrains.jps.incremental.BuildOperations.initTargetFSState(BuildOperations.java:72)

at org.jetbrains.jps.incremental.BuildOperations.ensureFSStateInitialized(BuildOperations.java:64)

at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:850)

at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:772)

at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:595)

at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:352)

at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:184)

at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:129)

at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:224)

at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:113)

at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:133)

at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:41)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

at java.util.concurrent.FutureTask.run(FutureTask.java:262)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

at java.lang.Thread.run(Thread.java:744)

 

By reading the stack trace, i suggested that it was a problem of a corrupted "build cache" so I tried to re-clone my repo in a full-new folder and try again to re-import and re-build my project and IntelliJ succeded to build the newly-created project.

 

By assuming my project is in $HOME/project/myproject, where is supposed to be the "build cache" that is breaking my build ?

I already tried to invalidate cache/restart but this is doing nothing.

 

Thanks for reading and, hopefully, for helping.

 

Pierre.

problem with code formatter and case indent

$
0
0

You can configure IntelliJ to format case statements with or without

indentation.

 

This works fine so long as you don't enclose your case block in {}. If

you do, it refuses to indent.  So what?  Take off the {}.  But

that will often create duplicate declarations.

--

Roedy Green Canadian Mind Products http://mindprod.com

Culture is your operating system.

~ Terence McKenna (born: 1946-11-16 died: 2000-04-03 at age: 53)

 

How do I make this simple project work using maven?

$
0
0

I am trying tof figure out how to distribute a simple Hello World app as a jar file using maven.  Project code is a s follows:

 

import com.jgoodies.forms.layout.CellConstraints;

import com.jgoodies.forms.layout.FormLayout;

 

import javax.swing.*;

 

/**

* Created by Ian on 5/3/14.

*/

public class HelloWorlds {

    private JPanel panel1;

    private JButton clickMeButton;

    boolean toggle = false;

 

    public static void main(String[] args) {

        JFrame frame = new JFrame("HelloWorlds");

        frame.setContentPane(new HelloWorlds().panel1);

        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        frame.pack();

        frame.setVisible(true);

    }

 

    {

// GUI initializer generated by IntelliJ IDEA GUI Designer

// >>> IMPORTANT!! <<<

// DO NOT EDIT OR ADD ANY CODE HERE!

        $$$setupUI$$$();

    }

 

    /**

     * Method generated by IntelliJ IDEA GUI Designer

     * >>> IMPORTANT!! <<<

     * DO NOT edit this method OR call it in your code!

     *

     * @noinspection ALL

     */

    private void $$$setupUI$$$() {

        panel1 = new JPanel();

        panel1.setLayout(new FormLayout("fill:d:grow", "center:d:noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow"));

        final JLabel label1 = new JLabel();

        label1.setText("Hello Worlds");

        CellConstraints cc = new CellConstraints();

        panel1.add(label1, cc.xy(1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

        clickMeButton = new JButton();

        clickMeButton.setText("Click Me");

        panel1.add(clickMeButton, cc.xy(1, 3));

    }

 

    /**

     * @noinspection ALL

     */

    public JComponent $$$getRootComponent$$$() {

        return panel1;

    }

}

 

POM file is as follows:

 

<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0"

         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0http://maven.apache.org/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>

 

    <groupId>net.wegr.apps</groupId>

    <artifactId>HelloWorld</artifactId>

    <version>1.0-SNAPSHOT</version>

    <dependencies>

        <dependency>

            <groupId>com.jgoodies</groupId>

            <artifactId>jgoodies-forms</artifactId>

            <version>1.7.2</version>

        </dependency>

    </dependencies>

    <build>

        <plugins>

            <plugin>

                <groupId>org.apache.maven.plugins</groupId>

                <artifactId>maven-jar-plugin</artifactId>

                <version>2.4</version>

                <configuration>

                    <archive>

                        <manifest>

                            <mainClass>HelloWorlds</mainClass>

                        </manifest>

                    </archive>

                </configuration>

            </plugin>

            <plugin>

                <groupId>org.apache.maven.plugins</groupId>

                <artifactId>maven-compiler-plugin</artifactId>

                <version>3.1</version>

                <configuration>

                     <source>1.7</source>

                     <target>1.7</target>

                </configuration>

            </plugin>

        </plugins>

    </build>

 

    <properties>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    </properties>

 

</project>

 

I keep getting the following error

 

Ian42: ~ >:java -jar HelloWorld-1.0-SNAPSHOT.jar

Exception in thread "main" java.lang.NoClassDefFoundError: com/jgoodies/forms/layout/FormLayout

at HelloWorlds.$$$setupUI$$$(HelloWorlds.java:38)

at HelloWorlds.<init>(HelloWorlds.java:26)

at HelloWorlds.main(HelloWorlds.java:16)

Caused by: java.lang.ClassNotFoundException: com.jgoodies.forms.layout.FormLayout

at java.net.URLClassLoader$1.run(URLClassLoader.java:366)

at java.net.URLClassLoader$1.run(URLClassLoader.java:355)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:354)

at java.lang.ClassLoader.loadClass(ClassLoader.java:425)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)

at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

... 3 more

 

Ian42: ~ >:

Any help would be appreciated!
Viewing all 5661 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>