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

Hi, is Intellij 11 support Coldfusion debugging ?

$
0
0

Hi guys,

 

According this link: http://www.jetbrains.com/idea/webhelp/run-debug-configuration-coldfusion.html

Intellij 12 support Coldfusion debugging. But the "The server side of deployment mappingswill be specified relative to this URL."

"deployment mappings" links is invalid.

 

Well as Intellij 11 user,  I found there is ColdFusion Server Mappings settings. but I do not know how to set this up.

The Debug button is always disable, and I won't be able to put any breakpoint in cfc or cfm file.

 

Any advice would be greatly appreciated

 

Thanks in advance

 

Songtao


IntelliJ 12 cannot start Apache TomEE with exploded web artifact

$
0
0

Hi,

 

I created a very simple web app to play with Apache TomEE. This web app contains a simple servlet, annotated with the servlet 3.0 @WebServlet annotation. IntelliJ can deploy the packaged artifact of this web app to Apache TomEE, but for some unknown reason, it cannot deploy the exploded version. It hangs trying to deploy the app.

 

I'm running IntelliJ 12.0.4 and Apache TomEE 1.5.1 Plus edition.

 

Anyone else experienced such a problem?

 

Thanks

 

Etienne

How to add maven module to maven multi-module module

$
0
0

Good morning,

 

So, I have an IDEA project into which I have added a module.  The module is a maven multi-module type, and has several modules already, each is java based.

I dont seem to be able to add a new maven-module/sub module to this module.  Every time I try it adds the module as a stand alone external module, i.e at the same level as the module i was trying to add to.  It does however update the poms correctly as far as I can tell.

 

Any help on this would be great as I have tried doing it via the ide and via the settings pane, which seem to be the only to options I can find.

 

Thanks

G

Debugging Tomcat webapp

$
0
0

Two years ago I opened http://youtrack.jetbrains.com/issue/IDEA-61791 and http://youtrack.jetbrains.com/issue/IDEA-63362. This issue is occurring here all the time because we're working on a Tomcat webapp in different branches.

IDEA 12.x still opens the wrong files if you click on a exception link in a stacktrace andthe debugger opens the wrong files when a breakpoint is hit.

 

This happens if you have at least two modules which have the same classes (e.g. a branch and HEAD).

 

Is there any possibility to get a fix for this in 12.1?

 

Thanks a lot!

Wallaby

Intentions about RegExp doesn't work

$
0
0

Greetings.

Usually, I'm working on ubuntu-12.10-x64 with IDEA 12. But also has Windows7 environment.

In Windows, IDEA can hightlight the regex string in Pattern.compile(regex) correctly.

But in ubuntu, it cannot recognize the string var in the compile() method.

I checked the settings in IDE settings -> intentions -> Declaration -> Check regexp is right.

but the preview window's content is not correct.

Is there something I missed?

Artifact output directory keeps changing

$
0
0

Hey all!

 

I always deploy my application to <tomcat base>/webapps directory. But, for some reason after a clean and clean install my project the output direcotyr will change.

 

For example, when I first pulled my project dfown from cvs the default output path for my exploded war artifact was this: C:\Users\me\IdeaProjects\onlineAdoption\src\OnlineAdoptionsWeb\target\OnlineAdoptionsWeb.

I prefer to have to deployed to C:\servers\apache\apache-tomcat-7.0.32\webapps\OnlineAdoptionsWeb. But, for some reason when I change the path it never "sticks" and I always have to go in a change it back.

 

Any idea what I am missing? Thanks!

grails service class not recognized

$
0
0

Hi all,

I have a grails application, everything runs fine.  I just went to create my first service class and Intellij doesn't recognize it when I create an instance of it.  It works, created a test method to do so.  Is there any fix for this to let it recognize service classes?  Thanks. 

How to ignore (make invisible) a file in project view?

$
0
0

Hi,

 

Using Idea CE 12.04, Linux version. I have a LibreOffice document MyDoc.odt in the root of my project. When I double click on it, the MyDoc.odt file is opened by LibreOffice Writer. This also creates a file named .~lock.MyDoc.odt# which is visible in the project view.

 

I have configured .gitignore to exclude these .~lock files. It is just a minir visual annoyance to see these dynamic temp files in the project view. Is there a way to tell IntelliJ Idea to ignore a certain type of files? By "ignore" I mean: don't show them in the project view, no sync, no source control, do nothing like if these files don't exist.

 

Thanks in advance for any advice.


Can I run a maven lifecycle for a module as a before launch step in 12.0.4?

$
0
0

I have a module: webapp that relies on a module: component. For some reason when I try to run webapp in tomcat the component is not introduced into the webapp. If I manually "mvn install" the component into my local repository then everything works as desired. I tried running the install:install goal but that fails. For now I've just added a manual build step that runs the mvn command line, but this seems wrong ...

 

Thanks in advance for your advice!

Lib directory and dependencies

$
0
0

I've just created a Hibernate Java Project and I see that IntelliJ Idea creates a lib directory with some usefull jars inside and a src directory to write your code.

When I tried to connect to my local mysql database IntelliJ downloaded the mysql-connector-java-5.1.22-bin.jar and I've told it to place it in this lib directory.

When I tried to use this driver in my hibernate.cfg.xml IntelliJ Idea couldn't find a class I wanted and the problem solved only when I manually declared this jar as a module dependency.

What exactly does this declaration does?

Does it extract the jar file somewhere?

Thank you.

Ctrl-Fx key shortcuts: how does it work?

$
0
0

Hi,

 

Using IJ Idea 12.04 CE on Xubuntu 12.10 x64. The keybinding of the OS is the default English US.

 

I tried the Ctrl-F11 shortcut which means "Navigate | Bookmarks | Toggle Bookmark With Mnemonic". But it doesn't work. I go to Settings / Keymap, navigate to "Navigate | Bookmarks | Toggle Bookmark With Mnemonic", trying to delete and recreate the same Ctrl-F11 keystroke but Idea doesn't recognize Ctrl + Function keys. Is it an issue of my OS or Idea? Can you please confirm?

 

Thanks in advance

Deprecated method used in IntelliJ Idea hibernate project's main auto-creation

$
0
0

When you let IntelliJ Idea create for you the main method, it uses the deprectated method  buildSessionFactory().

Here is a proper main method :

 

import org.hibernate.HibernateException;import org.hibernate.SessionFactory;import org.hibernate.Session;import org.hibernate.Query;import org.hibernate.cfg.Configuration;import org.hibernate.metadata.ClassMetadata;import org.hibernate.service.ServiceRegistry;import org.hibernate.service.ServiceRegistryBuilder; import java.util.Map; /**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 3/1/13
 * Time: 8:35 PM
 * To change this template use File | Settings | File Templates.
 */publicclass Main {    privatestaticfinal SessionFactory ourSessionFactory;    privatestaticfinal ServiceRegistry serviceRegistry;     static{        try{            Configuration configuration = new Configuration();            configuration.configure();             serviceRegistry = new ServiceRegistryBuilder().applySettings(configuration.getProperties()).buildServiceRegistry();            ourSessionFactory = configuration.buildSessionFactory(serviceRegistry);        }catch (Throwable ex) {            thrownew ExceptionInInitializerError(ex);        }    }     publicstatic Session getSession() throws HibernateException {        return ourSessionFactory.openSession();    }     publicstaticvoid main(final String[] args) throws Exception {        final Session session = getSession();        try{            System.out.println("querying all the managed entities...");            final Map metadataMap = session.getSessionFactory().getAllClassMetadata();            for (Object key : metadataMap.keySet()) {                final ClassMetadata classMetadata = (ClassMetadata) metadataMap.get(key);                final String entityName = classMetadata.getEntityName();                final Query query = session.createQuery("from " + entityName);                System.out.println("executing: " + query.getQueryString());                for (Object o : query.list()) {                    System.out.println("  " + o);                }            }        }finally{            session.close();        }    }}      

Debugger Glassfish

$
0
0

I'm not able to debug my application.

I put the breakpoints on lines but nothing happens.

In the debug logs appears that the startup was successful and that debugging is enabled on port 9009.

I activated in the settings of the JVM Glassfish to accept debugging but still nothing happens.

 

I need help.

(The Most) Basic XSD Conversion from XML Fails To Validate in 12.0.4

$
0
0

I used a very, very simple XML file to try to create an XSD (XML Schema) from within IDEA 12.0.4 - using the IDEA conversion available. The Schema that IDEA created, when then referenced back in the XML file, failed to validate!

 

Using the same XML file, I was able to create a validating XSD using a $40 third-party program.


Therefore, I'm confused why IDEA doesn't get this right. At least, that's what seems to be happening.

 

Here's the XML:

 

(http://www.w3schools.com/schema/schema_howto.asp)

Here's an example in IDEA showing what I mean:

XML:

<?xml version="1.0"?>
<note>
     <to>Tove</to>
     <from>Jani</from>
     <heading>Reminder</heading>
     <body>Don't forget me this weekend!</body>
</note>

 

------------------

 

 

Generated IDEA SCHEMA:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified"
            xmlns:xs=
"http://www.w3.org/2001/XMLSchema">

<xs:element name="note" type="noteType"/>
<xs:complexType name="noteType">
     <xs:sequence>
         <xs:element type="xs:string" name="to"/>
         <xs:element type="xs:string" name="from"/>
         <xs:element type="xs:string" name="heading"/>
         <xs:element type="xs:string" name="body"/>
     </xs:sequence>
</xs:complexType>
</xs:schema>

So far, so good (it seems)....
--------------

But, if I now insert a reference to the schema in to the note.xml file, I get a red indicator around the top and bottom note elements (see attached image file).

 

Validation Failed.

 

Again, I'm confused why IDEA itself can't create a validating XSD file when a $40 third-pary gets it right.

 

Perhaps I'm missing something?  If this is failure to create a validating XML Schema (XSD file) a bug, then it seems obvious that nobody has tested this conversion feature at all.

 

Look forward to any suggestions or replies.

 

Thanks,

 

- M

Jna version in 12.1

$
0
0

What version of jna.jar is included with IntelliJ 12.1? I'd like to build the matching native component for OpenBSD. Thanks.


Using Mecurial command line with IDEA projects

$
0
0

Hi,

 

I am new to IDEA and have managed to setup a new project using Lua and Mercurial. I have a couple of questions.

 

Is it advisable or not to VC the .idea directory or the .iml file of my project. What are the pros and cons of doing so?

 

Second I configured some files to exclude using the VCS excludes in the project configuration, however, these excludes are not recognized by the hg commmand line. How do I have the excludes enabled for both IDEA and the hg command line.

 

thanks,

 

I am using IDEA 12 on MacOS 10.7.5

 

-louie

Cannot create a maven project using maven-archetype-webapp

$
0
0

I've tried to create a new project (new maven module) using web archetype, and I got the following exception:

 

/opt/java/32/jdk1.7.0_02/bin/java -Dclassworlds.conf=/usr/share/maven2/bin/m2.conf -Dmaven.home=/usr/share/maven2 -Dfile.encoding=UTF-8 -classpath /usr/share/maven2/boot/classworlds.jar org.codehaus.classworlds.Launcher --no-plugin-registry --fail-fast --strict-checksums --update-snapshots -DinteractiveMode=false -DgroupId=ro.jtonic.examples -DartifactId=selenium -Dversion=1.0.0-SNAPSHOT -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-webapp -DarchetypeVersion=RELEASE org.apache.maven.plugins:maven-archetype-plugin:RELEASE:generate
+ Enabling strict checksum verification on all artifact downloads.
[INFO] Scanning for projects...
[INFO] artifact org.apache.maven.plugins:maven-archetype-plugin: checking for updates from central
[INFO] artifact org.apache.maven.plugins:maven-archetype-plugin: checking for updates from central
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [org.apache.maven.plugins:maven-archetype-plugin:RELEASE:generate] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] [archetype:generate {execution: default-cli}]
[INFO] Generating project in Batch mode
[INFO] Archetype repository missing. Using the one from [org.apache.maven.archetypes:maven-archetype-webapp:1.0] found in catalog remote
[INFO] artifact org.apache.maven.archetypes:maven-archetype-webapp: checking for updates from central
Downloading: http://repo1.maven.org/maven2/org/apache/maven/archetypes/maven-archetype-webapp/1.0/maven-archetype-webapp-1.0.jar
3K downloaded  (maven-archetype-webapp-1.0.jar)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/archetypes/maven-archetype-webapp/1.0/maven-archetype-webapp-1.0.pom
533b downloaded  (maven-archetype-webapp-1.0.pom)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] : org.apache.maven.archetype.exception.UnknownArchetype: The desired archetype does not exist (org.apache.maven.archetypes:maven-archetype-webapp:RELEASE)
The desired archetype does not exist (org.apache.maven.archetypes:maven-archetype-webapp:RELEASE)

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15 seconds
[INFO] Finished at: Sun Sep 23 18:31:27 EEST 2012
[INFO] Final Memory: 25M/144M
[INFO] ------------------------------------------------------------------------
[ERROR] Maven execution terminated abnormally (exit code 1)

 

 

Am I doing smth wrong?

Any help is highly appreciated.

 

Regards

Creating project with Git doesn't load files into project.

$
0
0

Hello, I want to do something extremely simple and am now extremely frustrated so I apologize if my tone is a little harsh.

 

On the command line its extremely easy to do what I want to do, which is checkout a repository using Git and start coding. IntelliJ is deciding that it doesn't want to show me my project. It asks me:

 

"Would you like to create an IntelliJ IDEA project for the sources you have checked out to [project name]."

 

So I say yes, then I select to Create project from existing sources. Now it's telling me that the sources for my project have been found and I see a selection of directories/files, its all of the JavaScript files and other nonsense such as the gitignore. Basically everything that is important isn't there, if I continue through the IDE loads up and shows only the selected directories/files from the prvious step, basically the IDE is ignoring my entire project and it makes editing nearly impossible. It's possible to use a tiny little menu up on the top to navigate through directories and select files to edit. I want all of my directories and files to appear in the Project view.

 

This is a PHP Yii app, I used PHPStorm in a trial and found it to be a very amazing app. I do more than PHP/web stuff though. I do Python, C, Lua and Shell and IntelliJ supports all of those so I bought that instead. It seems though that IntelliJ is just a lot more dumb than PHPStorm? So basically to sum it up my question is: How do I clone a Git repository? Because while IntelliJ is cloning, it's not in any way usable.

 

PS: I apologize if this is extremely obvious, I come from the Command Line/Vim where everything makes sense. I decided to use IntelliJ because of its extremely good linting features for JavaScript and PHP (mainly detecting typos in variables), a feature that is absent from Vim (Syntastic is the best linting library for Vim, but it is really bad for PHP).

Move Drag and Drop Hangs

$
0
0

I'm wondering if anyone has encountered the problem where dragging an artifact from one folder to another in a module hangs IDEA?

 

The Move dialog opens and IDEA just hangs. There's no log dump, no error, nothing. It just hangs. I can't close the Move dialog because no user input is benig accepted.  All I've been able to do is use Task Manager to kill IDEA.

 

Interestingly, the Move refactoring works fine. The drag and drop process also seems to be fine as the drop event triggers the Move dialog. So it looks like something happens at the point where the Move dialog opens.

 

IDEA 128-18

Windows 7 Ultimate SP1

 

TIA.

 

--

jack

The PostgreSQL dialect is a little out of date.

$
0
0

Noticed a few things missing from the DDL: UNLOGGED is not recognized in CREATE TABLE, and it doesn't like the new WITH (OIDS=TRUE|FALSE) syntax (well, it's not all that new).

 

Is this something that can be tweaked by the user? And if not, are there plans for an update?

 

Cheers,

Dmitri

Viewing all 5661 articles
Browse latest View live


Latest Images

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