netbeans-7

Netbeans: move a text file into dist folder when compiling

ぃ、小莉子 提交于 2019-12-04 06:37:50
I have a text file (let's say textfile.txt ) stored in the project folder in Netbeans 7.3 , e.g. project folder textfile.txt src package package.subpackage MyClass.java When I compile I get a dist folder where the jar file is put in, e.g. project folder textfile.txt dist MyProject.jar src package package.subpackage MyClass.java How can I edit the build.xml file to make the file textfile.txt being copied under dist folder? Edit the "-post-compile" target inside the build.xml as follows: <target name="-post-compile"> <copy file="textfile.txt" todir="${dist.dir}"/> </target> 来源: https:/

Eclipselink JPA gets error when inserting into Derby table with generated primary key

我只是一个虾纸丫 提交于 2019-12-04 04:27:42
问题 EclipseLink seems to be incorrectly passing a null primary key value to Derby when persisting into a table with generated primary key. Derby returns error of Attempt to modify an identity column in this case. Derby needs a SQL statement that excludes the id value. My question is how do I coerce EclipseLink to send the right SQL? Details follow... I am using Eclipselink to map to a Derby database (v10.8.1.2) under the latest Netbeans 7.3beta2. The database table primary key is auto generated:

How do I reference libraries in NetBeans?

自作多情 提交于 2019-12-04 03:23:55
I have a Java Web Services project that was created in an older version of NetBeans, and I haven't accessed it in many months, so my paths and installed libraries are different. When I try to open the project, I get a "Resolve Reference Problems" dialog, and two Reference Problems are listed: "metro" library could not be found "JAX-WS-ENDORSED" library could not be found I have a fresh installation of JDK 6 Update 25 with NetBeans 7.0 , and am running Windows 7. What steps can I take to solve this? I don't even know where to start, as every approach I've taken so far hasn't gotten me anywhere.

nginx php-fpm xdebug netbeans can start only one debug session

两盒软妹~` 提交于 2019-12-04 02:53:22
In the past, I've used apache+mod_php +xdebug+netbeans for development my website (server is my local machine, running Debian Squeeze), with pleasure - xdebug worked just as expected, debug sessions could be started and stopped any time, when I need it. But, when I moved to nginx+php_fpm +xdebug+netbeans I've experienced some problems with debugging. My debug session could be very long (much more than 30 seconds) and it seems, that nginx couldn't wait so long, it shows "504 Gateway timeout error" . I've tried lots of recommendations for solve this, but no luck. Though, it is not a very

org.hibernate.HibernateException: get is not valid without active transaction

心不动则不痛 提交于 2019-12-04 02:41:39
I'm new to Hibernate. Automatically created hibernate.cfg.xml (Netbeans wizard) Automatically created HibernateUtil.java Automatically created POJO class with annotations Trying to get object from database but getting error: Exception in thread "pool-1-thread-1" org.hibernate.HibernateException: get is not valid without active transaction at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:297) getting an object: Session session = HibernateUtil.getSessionFactory().getCurrentSession(); CallInfo ci = (CallInfo) session.get

Netbeans will not treat JSP as Source Level 7

一曲冷凌霜 提交于 2019-12-03 21:08:02
问题 I'm trying to run a .jsp page I made and keep encountering this error: type Exception report message Internal Server Error description The server encountered an internal error that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP PWC6197: An error occurred at line: 27 in the jsp file: /Drupalcheck.jsp PWC6199: Generated servlet error: diamond operator is not supported in -source 1.5 (use -source 7 or higher to

RESTful web service: java.lang.NullPointerException service.AbstractFacade.findAll

非 Y 不嫁゛ 提交于 2019-12-03 19:28:45
I created a simple XML web service using NetBeans 7's "RESTful Web Services from Database..." wizard. At this point, I want to publish a list of users from the associated mySQL database. When I attempt to access the service via its URL (http://localhost:8080/database/resources/users), I get an error that reads "java.lang.NullPointerException". The stack trace: service.AbstractFacade.findAll(AbstractFacade.java:41) service.UserFacade.findAll(UserFacade.java:51) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java

Netbeans with JAXB Random ClassCastException ..cannot be cast to com.sun.xml.bind.v2.runtime.reflect.Accessor

扶醉桌前 提交于 2019-12-03 18:59:33
问题 I have downloaded the Soap messages from a SOAP Service and trying to mock the Soap service by returning the downloaded messages. the following code shows how I am Unmarshalling the Soap message into the required Response public static DataClientType unmarshallFile(String fileName) throws Exception { XMLInputFactory xif = XMLInputFactory.newFactory(); XMLStreamReader xsr = xif.createXMLStreamReader(ClientSampleSoapResponseData.class.getResourceAsStream(fileName)); xsr.nextTag(); // Advance to

connecting java application with online hosted mysql database

人走茶凉 提交于 2019-12-03 17:22:01
I have build an application in java, application is one and will be used on 3 different systems, And therefore the database of that application must be online to keep all 3 applications with up to date database... In starting I developed my application based on localhost (wampserver) and used database in "PhpMyAdmin", and hopefully application is fully developed and ready to run.. but the problem is online database connectivity! I have uploaded my database on a Site in PhpMyAdmin and they provided below information: and the for connecting my app to this DB is: String url = "jdbc:mysql://fdb12

How do I create/use a class library with Netbeans on top of Maven?

隐身守侯 提交于 2019-12-03 16:25:02
问题 This seems like a stupid question, but I am sort of dependent on Netbeans 7.1 wizards. There doesn't seem to be an option to do this. My web-app is built with Maven and I want to break out some of its packages into an independently built and maintained class library (specifically, the JPA part but that shouldn't matter.) Then I want to delete those packages out of the original web application and then create a dependency to the artifact that I create. So how do I get started? The Netbeans New