Using NetBeans + JasperReports + iReports
Hi All,
I�m trying iReports + Jasper, and i have a doubt
How can i pass a parameter that's a collection or an ArrayList?
I want to do something like this:
Qty Desc. Price
5 Blue Prints 15.6
6 Bond Papercups 17.5
This collection o arraylist contains objects (beans)
How CAn i do That?
Try posting this question on netbeans.org.
Similar Messages
-
How do you create beans using NetBeans 5.5?
I am referring to http://java.sun.com/docs/books/tutorial/javabeans/nb/index.html and I'm sorry but I can't follow any of this!
I have NetBeans IDE 5.5 and I am trying to learn how to write beans using NetBeans, and the lessons involve things I can't find or understand, for example:
re: http://java.sun.com/docs/books/tutorial/javabeans/writingbean/index.html
<blockquote>
Load the JAR file. Use the NetBeans IDE GUI Builder to load the jar file as follows:
1. Start NetBeans.
2. From the File menu select "New Project" to create a new application for your bean. You can use "Open Project" to add your bean to an existing application.
3. Create a new application using the New Project Wizard.
4. Select a newly created project in the List of Projects, expand the Source Packages node, and select the Default Package element.
5. Click the right mouse button and select New|JFrameForm from the pop-up menu.
6. Select the newly created Form node in the Project Tree. A blank form opens in the GUI Builder view of an Editor tab.
7. Open the Palette Manager for Swing/AWT components by selecting Palette Manager in the Tools menu.
8. In the Palette Manager window select the beans components in the Palette tree and press the "Add from JAR" button.
9. Specify a location for your SimpleBean JAR file and follow the Add from JAR Wizard instructions.
10. Select the Palette and Properties options from the Windows menu.
11. Expand the beans group in the Palette window. The SimpleBean object appears. Drag the SimpleBean object to the GUI Builder panel.
</blockquote>
Sorry, you lost me literally after "Start NetBeans", the rest is Hungarian. I can't find "New Project Wizard"; I can't find "List of Projects", I can't find anything they are talking about nor do I know if any of this is relevant toward my learning how to write beans.
Re: http://java.sun.com/docs/books/tutorial/javabeans/properties/properties.html
"Inspecting Properties" seems impossible to do because the Inspector Window only shows a closed folder and nothing else ever. I can't figure out this part of the tutorial either.
Can someone please explain this 3rd-grade-level to me: How to create a bean using NetBeans?
Thanx
PhilPhil,
Before you embark on another very frustrating advanture using NetBeans, please go t hrough the NetBeans tutorial. The "New Project Wizard" is just select from the menu options -- "New Project". The "Hungarian" as you put it will not get better until you spend some time learning NetBeans. Learning something new, like beans, is frustrating enough, but to try to do it and use a tool that is not familiar may be beyond many individuals frustration level.
Les -
Problem with JFileChooser when run using Netbeans
I just want to state that I have NO problem writing the code that brings up this component. My problem is what happens when the JFileChooser component is loaded. My environment is Windows Vista, Java SE 1.6.0. -> Netbeans IDE 5.0. The code I use is as follows:
public RegexParser()
JFileChooser openfile = new JFileChooser();
openfile.showOpenDialog(RegexParser.this);
int returnVal = openfile.showOpenDialog(RegexParser.this);
if (returnVal == JFileChooser.APPROVE_OPTION)
//This code gets the path of the file and uses as a parameter to parse data.
filename = openfile.getSelectedFile().getPath();
openfile.setVisible(false);
ParseData(filename);
The problem is when I try to select an option from the combobox labeled "Look In:" Every directory I select which is not the root of the drive will display NO FILES even though there are files in that directory.
Notice: I have also run the same code using the cmd.exe and it works fine. I have also looked at: http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html but have found nothing that has helped me.
Can someone explain what is the problem? Is this a known bug in Netbeans? Is there any code that can be used as a workaround?Yes I copied the code to my machine and run it. The example program had problems when I executed using netbeans it had the problem.
When I executed using Command Prompt there where no problems. -
Web Service tutorial using NetBeans 5.5 fails on OS X Tiger
I have tried doing this tutorial using NetBeans 5.5 with the Enterprise Pack and Visual Web extensions installed. I am able to get it to run fine on my WinXP machine configured with the same NetBeans 5.5 stuff as the Mac. I have tried it several times always with the same result. Any insight that you can provide will be greatly appreciated.
The tutorial is located: http://www.netbeans.org/kb/55/websvc-jax-ws.html
Below is what is being returned in the Output window upon Run:
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
Created dir: /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/classes
Created dir: /Users/bob/Programming/CalculatorWSApplication/build/web/META-INF
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/META-INF
Copying 4 files to /Users/bob/Programming/CalculatorWSApplication/build/web
library-inclusion-in-archive:
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
library-inclusion-in-manifest:
Compiling 1 source file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/classes
wsgen-init-nonJSR109:
Created dir: /Users/bob/Programming/CalculatorWSApplication/build/generated/wsgen/service
wsgen-CalculatorWS-nonJSR109:
Problem encountered during annotation processing;
see stacktrace below for more information.
java.lang.NoSuchMethodError: com.sun.codemodel.JCodeModel._class(Ljava/lang/String;Lcom/sun/codemodel/ClassType;)Lcom/sun/codemodel/JDefinedClass;
at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.getCMClass(WebServiceWrapperGenerator.java:446)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.generateWrappers(WebServiceWrapperGenerator.java:256)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.processMethod(WebServiceWrapperGenerator.java:141)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitMethodDeclaration(WebServiceVisitor.java:468)
at com.sun.tools.apt.mirror.declaration.MethodDeclarationImpl.accept(MethodDeclarationImpl.java:41)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.processMethods(WebServiceVisitor.java:406)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.postProcessWebService(WebServiceVisitor.java:361)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.postProcessWebService(WebServiceWrapperGenerator.java:115)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitClassDeclaration(WebServiceVisitor.java:167)
at com.sun.tools.apt.mirror.declaration.ClassDeclarationImpl.accept(ClassDeclarationImpl.java:95)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.buildModel(WebServiceAP.java:345)
at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.process(WebServiceAP.java:230)
at com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:60)
at com.sun.tools.apt.comp.Apt.main(Apt.java:454)
at com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:448)
at com.sun.tools.apt.main.Main.compile(Main.java:1075)
at com.sun.tools.apt.main.Main.compile(Main.java:938)
at com.sun.tools.apt.Main.processing(Main.java:95)
at com.sun.tools.apt.Main.process(Main.java:85)
at com.sun.tools.apt.Main.process(Main.java:67)
at com.sun.tools.ws.wscompile.CompileTool.buildModel(CompileTool.java:603)
at com.sun.tools.ws.wscompile.CompileTool.run(CompileTool.java:536)
at com.sun.tools.ws.util.ToolBase.run(ToolBase.java:54)
at com.sun.tools.ws.ant.WsGen.execute(WsGen.java:457)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:240)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:293)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:131)
error: compilation failed, errors should have been reported
wsgen-generate-nonJSR109:
compile:
compile-jsps:
Created dir: /Users/bob/Programming/CalculatorWSApplication/dist
Building jar: /Users/bob/Programming/CalculatorWSApplication/dist/CalculatorWSApplication.war
do-dist:
dist:
Incrementally deploying http://localhost:8084/CalculatorWSApplication
Completed incremental distribution of http://localhost:8084/CalculatorWSApplication
Incrementally redeploying http://localhost:8084/CalculatorWSApplication
deploy?config=file:/tmp/context18085.xml&path=/CalculatorWSApplication
OK - Deployed application at context path /CalculatorWSApplication
run-deploy:
Browsing: http://localhost:8084/CalculatorWSApplication/CalculatorWS?Tester
run-display-browser:
run:
BUILD SUCCESSFUL (total time: 1 second)This problem gets solved if you do NOT provide the Java path to the installer.
e.g.
if you have Java in /usr//bin/java
make sure your PATH does not have /usr/bin....
so basically which java throw error....Then provide the JRE PATH in oraparam.ini for the installer to start ...
Give it a try...
Karurkar -
is it possible to include external .js file into .ear file using NetBean 5.5.1? if not, then where should I placed the external .js file and how to write the src="xxx" element? (that is , how to write the path of "xxx"?)
I am using JBOSS 4.2.2 GA as server
thx!!Even this is also not possible because, the code in that package is developed by DWR and i am just adding it to my lib folder and importing the respective classes. In the same manner i need to include the *.js* file in the JSP.It took me about 3 minutes reading through the [DWR Getting Started|http://getahead.org/dwr/getstarted] page to learn that you don't have to do any of that. Perhaps you should read that page?
-
Creating mysql schema from pojo with hibernate using netbeans
I have been fortunate in finding some good tutorials on how to create POJOs from database schema using hibernate (e.g. http://netbeans.org/kb/docs/web/hibernate-webapp.html).
Does anyone know of tutorials on creating database schemas from POJOs -- preferable using netbeans? Even the very smallest tutorial with one table or two related tables will do.961389 wrote:
I have been fortunateNot really, that is not rare information.
Does anyone know of tutorials on creating database schemas from POJOs -- preferable using netbeans? Even the very smallest tutorial with one table or two related tables will do.Netbeans has little to do with the creation of the schema, it's the container that's usually configured to do it. You can use the "hibernate.hbm2ddl.auto" property to control whether the DDL is created from the entities automatically. -
Unable to make Ajax4JSF work (using NetBeans 6)
Hi,
I am trying to integrate RichFaces into a Netbeans Visual Web JSF application. I tried using the following in my jsp code but it seems like the event is not triggered. The action method is never entered into.
<webuijsf:listbox binding="#{Bean.lstTest1}" id="lstTest1"
items="#{Bean.lstAvailableDefaultOptions.options}" rows="8"
selected="#{Bean.selectedItem}"
valueChangeListenerExpression="#{Bean.lstTest1_processValueChange}">
<a4j:support action="#{Bean.lstTest1_action}" event="onchange"
reRender="lstTest1,lstTest2"/>
</webuijsf:listbox>I have also tried it with a textbox:
<webuijsf:textField binding="#{Bean.textField1}" id="textField1" >
<a4j:support action="#{Bean.lstTest1_action}" event="onkeyup"
reRender="lstTest1,lstTest2"/>
</webuijsf:textField>Thank you for the help!Hi
I followed exactly the instructions but still cannot get it to work.
The WEB-INF does not contain a lib directory, I created over there and copied the JAR files.
Then I tried by creating a LIBRARY in tools and then adding it but still no luck.
I am using NETBEANS 6 VISUAL JSF
compiling I get
D:\Profiles\bgk007\RichFaces3\src\java\richfaces3\ApplicationBean1.java:10: package javax.faces does not exist -
How can i create splash screen using netbean?
how can i create splash screen using netbean?
Welcome to the Sun forums.
gabbyndu wrote:
how can i create splash screen..Java 6 offers a splashscreen functionality. See [New Splash-Screen Functionality in Java SE 6|http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javase6/splashscreen/] *(<- link)* for details.
[Java Web Start|http://java.sun.com/javase/technologies/desktop/javawebstart/index.jsp] has offered splash screens to applications since Java 1.2. See [How can I provide my own splash screen?|http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/faq.html#206] in the JWS FAQ for more details.
.. using netbean?We don't support Netbeans here. Ask that on a [Netbeans forum|http://forums.netbeans.org/]. -
Adding jar file in my gerareted jar file using netbean 4.0
Hi,
I write an application de process XML file using JDOM. I add the JDom package jar file to my project and everything work fine. But when I generate, my project jar file using netbean 4.0, my generated jar, is not working with the XML files anymore. Everything seems like it didn't include the JDOM jar file?
Thanks for any help to fix the problem.I find that you can not use command-line such as java -classpath add classpath
it can not work, I use netBeans4.0 i don't whether because of netbeans or java itself.
you can add classpath in jar's Manifest.mf file
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.2
Created-By: 1.5.0_01-b08 (Sun Microsystems Inc.)
Main-Class: chat.Main
// add this line
Class-Path: dir\*.jar //(jar file name)
X-COMMENT: Main-Class will be added automatically by build -
How to include others jar in my project use netbean
Hi,
Here i'm build my project in netbean, in compile source i add jdom.jar. Afer compile, run jar from terminal. But, application can't use and error :
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/jpos/
iso/ISOPackager
Now, i ask : How to include others lib or jar in my project use netbean
Rgds,
Wira SDear All,
The code In manifest.mf, like :
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
Main-Class: root/Phase3/TesterPhase3/IsolibTester/src/isolibtester/DynamicTreeTester
Class-Path: root/Phase3/TesterPhase3/jpos/lib/jdom.jar
When build jar, error :
error while reading original manifest: error in opening zip file
Building jar: /root/PHASE3/TesterPhase3/IsolibTester/dist/IsolibTester.jar
Manifest is invalid: Manifest sections should start with a "Name" attribute and not "Main-Class"
/root/PHASE3/TesterPhase3/IsolibTester/nbproject/build-impl.xml:273: Invalid Manifest: /root/PHASE3/TesterPhase3/IsolibTester/manifest.mf
BUILD FAILED (total time: 0 seconds)
So, i tried add classpath in bash_profile and build.xml, unseccessful
But, when runing my project from terminal can't found component jdom.jar -
Using NetBeans and Eclipse to drag and drop forms, controls etc
Hi, can you use NetBeans and Eclipse to drag and drop like say with C# in MS Visual Studio ?
like forms and listboxes, textboxes etc ??And [this is a good place to start|http://java.sun.com/docs/books/tutorial/uiswing/index.html]
db -
Creating Web Services using Netbeans GUI only
Hi all,
Creating, deploying & testing simple web-services through Netbeans point-n-click interface is quite simple (demo at: http://download.java.net/javaee5/screencasts/hello-simple-glassfish/). The demo shows a very simple service creation scenario, accepting and returning String types only. The service can easily be tested using the GUI option 'Test Web Service', which simply test the service through a simple web page at http://localhost:8080/MyWebApplication/MyWebService?Tester
In a similar manner, I am trying to implement a web service (a little complex one, accepting and returning custom types) using Netbeans GUI only. Versioning information I am using are as follows:
NetBeans IDE 6.1
Sun Java System Application Server 9.1_02 (build b04-fcs)
JAX-WS 2.1.3.1
Roughly speaking, the service's method signature I am using is shown below:
public abstract myclass.X MyService.serviceMethod( myclass.X )
Since it uses a custom type in parameter and return-types, the web-based test doesn't work any more. I wrote a separate client class to invoke the service using client-side stub classes (suppose to be generated by JAX-WS generated classes). The client code looks like as follows:
public class ServiceClient {
public static void main(String[] args) {
MyService srv = new MyService ().getMyServicePort();
X xin= new X();
X xout= srv.serviceMethod( xin );
System.out.println( "Result: "+ xout.toString());
Netbeans shows a compiler error on "MyService srv = new MyService ().getMyServicePort();
Is it possible to get it resolved without making use of ant scripts for generating client-side artifacts (stubs etc.)?
Thanks,
irfanHello Sandy,
Have you installed the Sun Java System App Server or JWSDP? If so, please make sure that one of the libraries in your Netbeans project contains the jaxrpc-api and jaxrpc-impl jars (which seem to be necessary to run wscompile).
Netbeans ("standalone") doesn't seem to install the jaxrpx libraries and other jars required to compile and run webservices.
Regards,
Jonatan -
Trouble Using Netbeans and XML Schema
I am currently experimenting on using XML files to store data for a game that I am developing. I had been using NetBeans 5.5 to validate my XML Schema (I am still new to XSD); however, now I am getting errors and have been trying for the better part of the week but am still unable to resolve them. Here is a clip from one of the schemas:
<?xml version="1.0" encoding="ISO-8859-1" standalone="no" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:cdt="http://JoaL.blissfulTragedy.com/Characters"
targetNamespace="http://JoaL.blissfulTragedy.com/Characters" >
<!-- Document to Define Character Attributes and their current Constraints -->
<!-- Character Name -->
<xs:simpleType name="name">
<xs:restriction base="xs:NMTOKEN">
<xs:maxLength value="15" />
</xs:restriction>
</xs:simpleType>
... When I validate the XML (the two down arrows) I get the following errors for every restriction I have declared:
s4s-att-invalid-value: Invalid attribute value for 'base' in element 'restriction'. Recorded reason: UndeclaredPrefix: Cannot resolve 'xs:NMTOKEN' as a QName: the prefix 'xs' is not declared.After retyping the file three times I tried one of the stock NetBeans schemas, which will produce the same error whenever I add a restriction through the UI.
Any advice will be greatly appreciated :PI think this is a dirty great bug in the Sun version of the apache Xerces classes that were bundled with jdk1.5.
I've had similar problems, and it seems to boil down to the fact that the NamespaceSupport class's getURI method does == instead of .equals when looking up the uri for a particular prefix. I'm told that this is a deliberate feature for the Apache stuff, and that the class assumes interned strings or strings that have gone through their internal SymbolTable mechanism, and that I can work around it by using interned strings. However, it is one of their classes that fails to intern the string (or put it through the symbol table etc.), so that doesn't really make sense as there are no hooks into this stuff.
They have even marked the bug as closed/fixed, and I'm attempting to re-raise it at present (so it'll be fixed in about ten years then). -
How to set domain name to a site that was developed using netbeans
I developed a website using netbeans.I want to give some DNS like site1.com to it.Where can i set that ?
Thanks in advance1) You post questions in the wrong forum. (As you title says this is a Swing question).
2) Not once in your last 10 postings have you ever bothered to reply to a posting to thank people for the help you have received.
I seriously doubt you well ever get answers in the future. -
How to display multiple tables from database using netbeans swing gui
plz reply asap on how to display multiple tables from database using netbeans swing gui into the same project
Layered Pane with JTables or you can easily to it with a little scripting and HTML.
plzzzzzzzzzzzzzzzzz, do not use SMS speak when posting.
Maybe you are looking for
-
Moving from directly connected external drive to a network share.
I've looked around and can't find a page on how to do this. I have an external drive hooked up to my iMac. I am using it for TM backups, so I have this directory on it (Backups.backupdb). There are also 2 sparsebundle images due to 2 other people in
-
XP SP3 toolbar retains the symbol in Home and Back areas, Win7 now has the words instead. Other areas seem to do the same. Both work properly. Another problem which may be relevant is that the appearance of my ISP website front page on XP has not bee
-
Problem with compilation of HelloWorld.java
hi, getting problem with compilation of HelloWorld.java CLASSPATH--- C:\java PATH--- C:\j2sdk1.4.2_04\bin HelloWorld.java source code in: C:\java On cmd prompt: C:\java>javac HelloWorld.java error: cannot read: HelloWorld.java 1 error pls help me wit
-
Helix: give up hope or get a replacement?
I'm looking for a bit of advice from Helix owners. I bought this computer to be a serious business tool. I need it to work consistently and without glitches. I started out enthusiastic, but now I'm completely disappointed. Did I get a lemon, or is th
-
I need to get it installed on a new computer but it says I can't register it without deactivating it from another computer first. Only problem is all of the computers it was registered on are dead now.