Mau tanya tentang report jasper

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Mau tanya tentang report jasper

hawali0887
para kakak master saya newbie mau tanya tentang report jasper, udah muter2 di internet saya msh belum ngerti cara mengkoneksikan jasper dengan java pada netbeans...

saya coba seperti ini :
-----------------------
private void btnCetakActionPerformed(java.awt.event.ActionEvent evt) {                                        

// TODO add your handling code here:
try {
String file   = "src/latihan2/report1.jasper";
String driver = "com.mysql.jdbc.Driver";
String konek  = "jdbc:mysql://localhost/java_db";
String user   = "root";
String pass   = "";

HashMap p = new HashMap();
File rf = new File(file);

Class.forName(driver);
Connection conn = DriverManager.getConnection(konek, user, pass);

JasperReport jr = (JasperReport)JRLoader.loadObject(rf.getPath());
JasperPrint jp = JasperFillManager.fillReport(jr, p, conn);
JasperViewer.viewReport(jp, false);
}
catch (Exception e) {
JOptionPane.showMessageDialog(null, e);
}

}

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

apabila dijalankan, ada pesan error "java.lang.NullPointerException"

tolong pencerahannya para kakak master, atau ada referensi lain yg mudah untuk saya pahami tentang hal ini...

Terima Kasih
                         

Reply | Threaded
Open this post in threaded view
|

Re: Mau tanya tentang report jasper

Ifnu bima
Null pointer-nya di class apa? bisa copy paste stacktrace exceptionya ke
sini? yang lengkap ya.

2013/2/26 hawali0887 <[hidden email]>

> **
>
>
> para kakak master saya newbie mau tanya tentang report jasper, udah muter2
> di internet saya msh belum ngerti cara mengkoneksikan jasper dengan java
> pada netbeans...
>
> saya coba seperti ini :
> -----------------------
> private void btnCetakActionPerformed(java.awt.event.ActionEvent evt) {
>
> // TODO add your handling code here:
> try {
> String file = "src/latihan2/report1.jasper";
> String driver = "com.mysql.jdbc.Driver";
> String konek = "jdbc:mysql://localhost/java_db";
> String user = "root";
> String pass = "";
>
> HashMap p = new HashMap();
> File rf = new File(file);
>
> Class.forName(driver);
> Connection conn = DriverManager.getConnection(konek, user, pass);
>
> JasperReport jr = (JasperReport)JRLoader.loadObject(rf.getPath());
> JasperPrint jp = JasperFillManager.fillReport(jr, p, conn);
> JasperViewer.viewReport(jp, false);
> }
> catch (Exception e) {
> JOptionPane.showMessageDialog(null, e);
> }
>
> }
>
> ---------------------------------
>
> apabila dijalankan, ada pesan error "java.lang.NullPointerException"
>
> tolong pencerahannya para kakak master, atau ada referensi lain yg mudah
> untuk saya pahami tentang hal ini...
>
> Terima Kasih
>
>
>  
>



--
http://ifnubima.org/indo-java-podcast/
http://project-template.googlecode.com/
@ifnubima

regards
Reply | Threaded
Open this post in threaded view
|

Re: Mau tanya tentang report jasper

hawali0887
aduh mas saya tidak mengerti maksudnya, ini saya sertakan file nya

http://dl.dropbox.com/u/109038024/latihan2.zip

saya minta tolong bantuannya ya mas, karena ini untuk tugas akhir kuliah saya

Terima Kasih


--- In [hidden email], Ifnu bima <ifnubima@...> wrote:

>
> Null pointer-nya di class apa? bisa copy paste stacktrace exceptionya ke
> sini? yang lengkap ya.
>
> 2013/2/26 hawali0887 <hawali0887@...>
>
> > **
> >
> >
> > para kakak master saya newbie mau tanya tentang report jasper, udah muter2
> > di internet saya msh belum ngerti cara mengkoneksikan jasper dengan java
> > pada netbeans...
> >
> > saya coba seperti ini :
> > -----------------------
> > private void btnCetakActionPerformed(java.awt.event.ActionEvent evt) {
> >
> > // TODO add your handling code here:
> > try {
> > String file = "src/latihan2/report1.jasper";
> > String driver = "com.mysql.jdbc.Driver";
> > String konek = "jdbc:mysql://localhost/java_db";
> > String user = "root";
> > String pass = "";
> >
> > HashMap p = new HashMap();
> > File rf = new File(file);
> >
> > Class.forName(driver);
> > Connection conn = DriverManager.getConnection(konek, user, pass);
> >
> > JasperReport jr = (JasperReport)JRLoader.loadObject(rf.getPath());
> > JasperPrint jp = JasperFillManager.fillReport(jr, p, conn);
> > JasperViewer.viewReport(jp, false);
> > }
> > catch (Exception e) {
> > JOptionPane.showMessageDialog(null, e);
> > }
> >
> > }
> >
> > ---------------------------------
> >
> > apabila dijalankan, ada pesan error "java.lang.NullPointerException"
> >
> > tolong pencerahannya para kakak master, atau ada referensi lain yg mudah
> > untuk saya pahami tentang hal ini...
> >
> > Terima Kasih
> >
> >
> >  
> >
>
>
>
> --
> http://ifnubima.org/indo-java-podcast/
> http://project-template.googlecode.com/
> @ifnubima
>
> regards
>

Reply | Threaded
Open this post in threaded view
|

Re: Re: Mau tanya tentang report jasper

Endy Muhardin
Maksudnya pesan errornya dipaste yang lengkap. Jangan cuma null pointer
exception. Biasanya ada informasi errornya di file apa baris berapa.

- Endy Muhardin -
http://software.endy.muhardin.com/about
On Feb 27, 2013 10:56 AM, "hawali0887" <[hidden email]> wrote:

> **
>
>
> aduh mas saya tidak mengerti maksudnya, ini saya sertakan file nya
>
> http://dl.dropbox.com/u/109038024/latihan2.zip
>
> saya minta tolong bantuannya ya mas, karena ini untuk tugas akhir kuliah
> saya
>
> Terima Kasih
>
> --- In [hidden email], Ifnu bima wrote:
> >
> > Null pointer-nya di class apa? bisa copy paste stacktrace exceptionya ke
> > sini? yang lengkap ya.
> >
> > 2013/2/26 hawali0887
> >
> > > **
> > >
> > >
> > > para kakak master saya newbie mau tanya tentang report jasper, udah
> muter2
> > > di internet saya msh belum ngerti cara mengkoneksikan jasper dengan
> java
> > > pada netbeans...
> > >
> > > saya coba seperti ini :
> > > -----------------------
> > > private void btnCetakActionPerformed(java.awt.event.ActionEvent evt) {
> > >
> > > // TODO add your handling code here:
> > > try {
> > > String file = "src/latihan2/report1.jasper";
> > > String driver = "com.mysql.jdbc.Driver";
> > > String konek = "jdbc:mysql://localhost/java_db";
> > > String user = "root";
> > > String pass = "";
> > >
> > > HashMap p = new HashMap();
> > > File rf = new File(file);
> > >
> > > Class.forName(driver);
> > > Connection conn = DriverManager.getConnection(konek, user, pass);
> > >
> > > JasperReport jr = (JasperReport)JRLoader.loadObject(rf.getPath());
> > > JasperPrint jp = JasperFillManager.fillReport(jr, p, conn);
> > > JasperViewer.viewReport(jp, false);
> > > }
> > > catch (Exception e) {
> > > JOptionPane.showMessageDialog(null, e);
> > > }
> > >
> > > }
> > >
> > > ---------------------------------
> > >
> > > apabila dijalankan, ada pesan error "java.lang.NullPointerException"
> > >
> > > tolong pencerahannya para kakak master, atau ada referensi lain yg
> mudah
> > > untuk saya pahami tentang hal ini...
> > >
> > > Terima Kasih
> > >
> > >
> > >
> > >
> >
> >
> >
> > --
> > http://ifnubima.org/indo-java-podcast/
> > http://project-template.googlecode.com/
> > @ifnubima
> >
> > regards
> >
>
>  
>
Reply | Threaded
Open this post in threaded view
|

Re: Mau tanya tentang report jasper

hawali0887
maksudnya ini ya kakak...???

java.lang.NullPointerException
        at java.lang.Class.isAssignableFrom(Native Method)
        at net.sf.jasperreports.engine.fill.JRFillTextField.getFormat(JRFillTextField.java:706)
        at net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(JRFillTextField.java:394)
        at net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:368)
        at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:258)
        at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:499)
        at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2036)
        at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:760)
        at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:270)
        at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128)
        at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:946)
        at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:845)
        at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:58)
        at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417)
        at latihan2.kacrut.btnCetakActionPerformed(kacrut.java:93)
        at latihan2.kacrut.access$000(kacrut.java:30)
        at latihan2.kacrut$1.actionPerformed(kacrut.java:53)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
        at java.awt.Component.processMouseEvent(Component.java:6504)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
        at java.awt.Component.processEvent(Component.java:6269)
        at java.awt.Container.processEvent(Container.java:2229)
        at java.awt.Component.dispatchEventImpl(Component.java:4860)
        at java.awt.Container.dispatchEventImpl(Container.java:2287)
        at java.awt.Component.dispatchEvent(Component.java:4686)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
        at java.awt.Container.dispatchEventImpl(Container.java:2273)
        at java.awt.Window.dispatchEventImpl(Window.java:2713)
        at java.awt.Component.dispatchEvent(Component.java:4686)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)
        at java.awt.EventQueue.access$000(EventQueue.java:101)
        at java.awt.EventQueue$3.run(EventQueue.java:666)
        at java.awt.EventQueue$3.run(EventQueue.java:664)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
        at java.awt.EventQueue$4.run(EventQueue.java:680)
        at java.awt.EventQueue$4.run(EventQueue.java:678)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:677)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
BUILD SUCCESSFUL (total time: 19 seconds)

--- In [hidden email], Endy Muhardin <endy.muhardin@...> wrote:

>
> Maksudnya pesan errornya dipaste yang lengkap. Jangan cuma null pointer
> exception. Biasanya ada informasi errornya di file apa baris berapa.
>
> - Endy Muhardin -
> http://software.endy.muhardin.com/about
> On Feb 27, 2013 10:56 AM, "hawali0887" <hawali0887@...> wrote:
>
> > **
> >
> >
> > aduh mas saya tidak mengerti maksudnya, ini saya sertakan file nya
> >
> > http://dl.dropbox.com/u/109038024/latihan2.zip
> >
> > saya minta tolong bantuannya ya mas, karena ini untuk tugas akhir kuliah
> > saya
> >
> > Terima Kasih
> >
> > --- In [hidden email], Ifnu bima wrote:
> > >
> > > Null pointer-nya di class apa? bisa copy paste stacktrace exceptionya ke
> > > sini? yang lengkap ya.
> > >
> > > 2013/2/26 hawali0887
> > >
> > > > **
> > > >
> > > >
> > > > para kakak master saya newbie mau tanya tentang report jasper, udah
> > muter2
> > > > di internet saya msh belum ngerti cara mengkoneksikan jasper dengan
> > java
> > > > pada netbeans...
> > > >
> > > > saya coba seperti ini :
> > > > -----------------------
> > > > private void btnCetakActionPerformed(java.awt.event.ActionEvent evt) {
> > > >
> > > > // TODO add your handling code here:
> > > > try {
> > > > String file = "src/latihan2/report1.jasper";
> > > > String driver = "com.mysql.jdbc.Driver";
> > > > String konek = "jdbc:mysql://localhost/java_db";
> > > > String user = "root";
> > > > String pass = "";
> > > >
> > > > HashMap p = new HashMap();
> > > > File rf = new File(file);
> > > >
> > > > Class.forName(driver);
> > > > Connection conn = DriverManager.getConnection(konek, user, pass);
> > > >
> > > > JasperReport jr = (JasperReport)JRLoader.loadObject(rf.getPath());
> > > > JasperPrint jp = JasperFillManager.fillReport(jr, p, conn);
> > > > JasperViewer.viewReport(jp, false);
> > > > }
> > > > catch (Exception e) {
> > > > JOptionPane.showMessageDialog(null, e);
> > > > }
> > > >
> > > > }
> > > >
> > > > ---------------------------------
> > > >
> > > > apabila dijalankan, ada pesan error "java.lang.NullPointerException"
> > > >
> > > > tolong pencerahannya para kakak master, atau ada referensi lain yg
> > mudah
> > > > untuk saya pahami tentang hal ini...
> > > >
> > > > Terima Kasih
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > http://ifnubima.org/indo-java-podcast/
> > > http://project-template.googlecode.com/
> > > @ifnubima
> > >
> > > regards
> > >
> >
> >  
> >
>

Reply | Threaded
Open this post in threaded view
|

Re: Re: Mau tanya tentang report jasper

Endy Muhardin
Iya.
Coba dibaca yang teliti, nanti ketemu ini :

at latihan2.kacrut.btnCetakActionPerformed(kacrut.java:93)

Errornya ada di file kacrut.java baris 93.

- Endy Muhardin -
http://software.endy.muhardin.com/about
On Feb 28, 2013 12:33 PM, "hawali0887" <[hidden email]> wrote:

> **
>
>
> maksudnya ini ya kakak...???
>
> java.lang.NullPointerException
> at java.lang.Class.isAssignableFrom(Native Method)
> at
> net.sf.jasperreports.engine.fill.JRFillTextField.getFormat(JRFillTextField.java:706)
> at
> net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(JRFillTextField.java:394)
> at
> net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:368)
> at
> net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:258)
> at
> net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:499)
> at
> net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2036)
> at
> net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:760)
> at
> net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:270)
> at
> net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128)
> at
> net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:946)
> at
> net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:845)
> at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:58)
> at
> net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417)
> at latihan2.kacrut.btnCetakActionPerformed(kacrut.java:93)
> at latihan2.kacrut.access$000(kacrut.java:30)
> at latihan2.kacrut$1.actionPerformed(kacrut.java:53)
> at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
> at
> javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
> at
> javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
> at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
> at
> javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
> at java.awt.Component.processMouseEvent(Component.java:6504)
> at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
> at java.awt.Component.processEvent(Component.java:6269)
> at java.awt.Container.processEvent(Container.java:2229)
> at java.awt.Component.dispatchEventImpl(Component.java:4860)
> at java.awt.Container.dispatchEventImpl(Container.java:2287)
> at java.awt.Component.dispatchEvent(Component.java:4686)
> at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
> at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
> at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
> at java.awt.Container.dispatchEventImpl(Container.java:2273)
> at java.awt.Window.dispatchEventImpl(Window.java:2713)
> at java.awt.Component.dispatchEvent(Component.java:4686)
> at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)
> at java.awt.EventQueue.access$000(EventQueue.java:101)
> at java.awt.EventQueue$3.run(EventQueue.java:666)
> at java.awt.EventQueue$3.run(EventQueue.java:664)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
> at
> java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
> at java.awt.EventQueue$4.run(EventQueue.java:680)
> at java.awt.EventQueue$4.run(EventQueue.java:678)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
> at java.awt.EventQueue.dispatchEvent(EventQueue.java:677)
> at
> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
> at
> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
> at
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
> at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
> BUILD SUCCESSFUL (total time: 19 seconds)
>
> --- In [hidden email], Endy Muhardin wrote:
> >
> > Maksudnya pesan errornya dipaste yang lengkap. Jangan cuma null pointer
> > exception. Biasanya ada informasi errornya di file apa baris berapa.
> >
> > - Endy Muhardin -
> > http://software.endy.muhardin.com/about
> > On Feb 27, 2013 10:56 AM, "hawali0887" wrote:
> >
> > > **
> > >
> > >
> > > aduh mas saya tidak mengerti maksudnya, ini saya sertakan file nya
> > >
> > > http://dl.dropbox.com/u/109038024/latihan2.zip
> > >
> > > saya minta tolong bantuannya ya mas, karena ini untuk tugas akhir
> kuliah
> > > saya
> > >
> > > Terima Kasih
> > >
> > > --- In [hidden email], Ifnu bima wrote:
> > > >
> > > > Null pointer-nya di class apa? bisa copy paste stacktrace
> exceptionya ke
> > > > sini? yang lengkap ya.
> > > >
> > > > 2013/2/26 hawali0887
> > > >
> > > > > **
> > > > >
> > > > >
> > > > > para kakak master saya newbie mau tanya tentang report jasper, udah
> > > muter2
> > > > > di internet saya msh belum ngerti cara mengkoneksikan jasper dengan
> > > java
> > > > > pada netbeans...
> > > > >
> > > > > saya coba seperti ini :
> > > > > -----------------------
> > > > > private void btnCetakActionPerformed(java.awt.event.ActionEvent
> evt) {
> > > > >
> > > > > // TODO add your handling code here:
> > > > > try {
> > > > > String file = "src/latihan2/report1.jasper";
> > > > > String driver = "com.mysql.jdbc.Driver";
> > > > > String konek = "jdbc:mysql://localhost/java_db";
> > > > > String user = "root";
> > > > > String pass = "";
> > > > >
> > > > > HashMap p = new HashMap();
> > > > > File rf = new File(file);
> > > > >
> > > > > Class.forName(driver);
> > > > > Connection conn = DriverManager.getConnection(konek, user, pass);
> > > > >
> > > > > JasperReport jr = (JasperReport)JRLoader.loadObject(rf.getPath());
> > > > > JasperPrint jp = JasperFillManager.fillReport(jr, p, conn);
> > > > > JasperViewer.viewReport(jp, false);
> > > > > }
> > > > > catch (Exception e) {
> > > > > JOptionPane.showMessageDialog(null, e);
> > > > > }
> > > > >
> > > > > }
> > > > >
> > > > > ---------------------------------
> > > > >
> > > > > apabila dijalankan, ada pesan error
> "java.lang.NullPointerException"
> > > > >
> > > > > tolong pencerahannya para kakak master, atau ada referensi lain yg
> > > mudah
> > > > > untuk saya pahami tentang hal ini...
> > > > >
> > > > > Terima Kasih
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > http://ifnubima.org/indo-java-podcast/
> > > > http://project-template.googlecode.com/
> > > > @ifnubima
> > > >
> > > > regards
> > > >
> > >
> > >
> > >
> >
>
>  
>
Reply | Threaded
Open this post in threaded view
|

Re: Mau tanya tentang report jasper

hawali0887
saya sudah pindah2 filenya tp tetep tidak bisa...
bingung saya sm code2 java... :'(

Line:81 -> String file = "C:/Users/Xain/My Documents/NetBeansProject/latihan2/src/latihan2/report1.jasper";
Line:88 -> File rf = new File(file);

Line:93 -> JasperReport jr = (JasperReport)JRLoader.loadObject(rf.getPath());

--- In [hidden email], Endy Muhardin <endy.muhardin@...> wrote:

>
> Iya.
> Coba dibaca yang teliti, nanti ketemu ini :
>
> at latihan2.kacrut.btnCetakActionPerformed(kacrut.java:93)
>
> Errornya ada di file kacrut.java baris 93.
>
> - Endy Muhardin -
> http://software.endy.muhardin.com/about
> On Feb 28, 2013 12:33 PM, "hawali0887" <hawali0887@...> wrote:
>
> > **
> >
> >
> > maksudnya ini ya kakak...???
> >
> > java.lang.NullPointerException
> > at java.lang.Class.isAssignableFrom(Native Method)
> > at
> > net.sf.jasperreports.engine.fill.JRFillTextField.getFormat(JRFillTextField.java:706)
> > at
> > net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(JRFillTextField.java:394)
> > at
> > net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:368)
> > at
> > net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:258)
> > at
> > net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:499)
> > at
> > net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2036)
> > at
> > net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:760)
> > at
> > net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:270)
> > at
> > net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128)
> > at
> > net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:946)
> > at
> > net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:845)
> > at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:58)
> > at
> > net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417)
> > at latihan2.kacrut.btnCetakActionPerformed(kacrut.java:93)
> > at latihan2.kacrut.access$000(kacrut.java:30)
> > at latihan2.kacrut$1.actionPerformed(kacrut.java:53)
> > at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
> > at
> > javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
> > at
> > javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
> > at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
> > at
> > javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
> > at java.awt.Component.processMouseEvent(Component.java:6504)
> > at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
> > at java.awt.Component.processEvent(Component.java:6269)
> > at java.awt.Container.processEvent(Container.java:2229)
> > at java.awt.Component.dispatchEventImpl(Component.java:4860)
> > at java.awt.Container.dispatchEventImpl(Container.java:2287)
> > at java.awt.Component.dispatchEvent(Component.java:4686)
> > at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
> > at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
> > at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
> > at java.awt.Container.dispatchEventImpl(Container.java:2273)
> > at java.awt.Window.dispatchEventImpl(Window.java:2713)
> > at java.awt.Component.dispatchEvent(Component.java:4686)
> > at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)
> > at java.awt.EventQueue.access$000(EventQueue.java:101)
> > at java.awt.EventQueue$3.run(EventQueue.java:666)
> > at java.awt.EventQueue$3.run(EventQueue.java:664)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at
> > java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
> > at
> > java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
> > at java.awt.EventQueue$4.run(EventQueue.java:680)
> > at java.awt.EventQueue$4.run(EventQueue.java:678)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at
> > java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
> > at java.awt.EventQueue.dispatchEvent(EventQueue.java:677)
> > at
> > java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
> > at
> > java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
> > at
> > java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
> > at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
> > at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
> > at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
> > BUILD SUCCESSFUL (total time: 19 seconds)
> >
> > --- In [hidden email], Endy Muhardin wrote:
> > >
> > > Maksudnya pesan errornya dipaste yang lengkap. Jangan cuma null pointer
> > > exception. Biasanya ada informasi errornya di file apa baris berapa.
> > >
> > > - Endy Muhardin -
> > > http://software.endy.muhardin.com/about
> > > On Feb 27, 2013 10:56 AM, "hawali0887" wrote:
> > >
> > > > **
> > > >
> > > >
> > > > aduh mas saya tidak mengerti maksudnya, ini saya sertakan file nya
> > > >
> > > > http://dl.dropbox.com/u/109038024/latihan2.zip
> > > >
> > > > saya minta tolong bantuannya ya mas, karena ini untuk tugas akhir
> > kuliah
> > > > saya
> > > >
> > > > Terima Kasih
> > > >
> > > > --- In [hidden email], Ifnu bima wrote:
> > > > >
> > > > > Null pointer-nya di class apa? bisa copy paste stacktrace
> > exceptionya ke
> > > > > sini? yang lengkap ya.
> > > > >
> > > > > 2013/2/26 hawali0887
> > > > >
> > > > > > **
> > > > > >
> > > > > >
> > > > > > para kakak master saya newbie mau tanya tentang report jasper, udah
> > > > muter2
> > > > > > di internet saya msh belum ngerti cara mengkoneksikan jasper dengan
> > > > java
> > > > > > pada netbeans...
> > > > > >
> > > > > > saya coba seperti ini :
> > > > > > -----------------------
> > > > > > private void btnCetakActionPerformed(java.awt.event.ActionEvent
> > evt) {
> > > > > >
> > > > > > // TODO add your handling code here:
> > > > > > try {
> > > > > > String file = "src/latihan2/report1.jasper";
> > > > > > String driver = "com.mysql.jdbc.Driver";
> > > > > > String konek = "jdbc:mysql://localhost/java_db";
> > > > > > String user = "root";
> > > > > > String pass = "";
> > > > > >
> > > > > > HashMap p = new HashMap();
> > > > > > File rf = new File(file);
> > > > > >
> > > > > > Class.forName(driver);
> > > > > > Connection conn = DriverManager.getConnection(konek, user, pass);
> > > > > >
> > > > > > JasperReport jr = (JasperReport)JRLoader.loadObject(rf.getPath());
> > > > > > JasperPrint jp = JasperFillManager.fillReport(jr, p, conn);
> > > > > > JasperViewer.viewReport(jp, false);
> > > > > > }
> > > > > > catch (Exception e) {
> > > > > > JOptionPane.showMessageDialog(null, e);
> > > > > > }
> > > > > >
> > > > > > }
> > > > > >
> > > > > > ---------------------------------
> > > > > >
> > > > > > apabila dijalankan, ada pesan error
> > "java.lang.NullPointerException"
> > > > > >
> > > > > > tolong pencerahannya para kakak master, atau ada referensi lain yg
> > > > mudah
> > > > > > untuk saya pahami tentang hal ini...
> > > > > >
> > > > > > Terima Kasih
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > http://ifnubima.org/indo-java-podcast/
> > > > > http://project-template.googlecode.com/
> > > > > @ifnubima
> > > > >
> > > > > regards
> > > > >
> > > >
> > > >
> > > >
> > >
> >
> >  
> >
>

Reply | Threaded
Open this post in threaded view
|

Re: Re: Mau tanya tentang report jasper

Benny-44
Sorry nimbrung nih

Kalo liat path nya windows os nya ya. Harusnya pake \\ bukan / atau file separatornya java aja pake

Mudah2an bisa

Regards,

Benny Indra


Pada 28 Feb 2013, pukul 14:33, "hawali0887" <[hidden email]> menulis:

> saya sudah pindah2 filenya tp tetep tidak bisa...
> bingung saya sm code2 java... :'(
>
> Line:81 -> String file = "C:/Users/Xain/My Documents/NetBeansProject/latihan2/src/latihan2/report1.jasper";
> Line:88 -> File rf = new File(file);
>
> Line:93 -> JasperReport jr = (JasperReport)JRLoader.loadObject(rf.getPath());
>
> --- In [hidden email], Endy Muhardin wrote:
> >
> > Iya.
> > Coba dibaca yang teliti, nanti ketemu ini :
> >
> > at latihan2.kacrut.btnCetakActionPerformed(kacrut.java:93)
> >
> > Errornya ada di file kacrut.java baris 93.
> >
> > - Endy Muhardin -
> > http://software.endy.muhardin.com/about
> > On Feb 28, 2013 12:33 PM, "hawali0887" wrote:
> >
> > > **
> > >
> > >
> > > maksudnya ini ya kakak...???
> > >
> > > java.lang.NullPointerException
> > > at java.lang.Class.isAssignableFrom(Native Method)
> > > at
> > > net.sf.jasperreports.engine.fill.JRFillTextField.getFormat(JRFillTextField.java:706)
> > > at
> > > net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(JRFillTextField.java:394)
> > > at
> > > net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:368)
> > > at
> > > net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:258)
> > > at
> > > net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:499)
> > > at
> > > net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2036)
> > > at
> > > net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:760)
> > > at
> > > net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:270)
> > > at
> > > net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128)
> > > at
> > > net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:946)
> > > at
> > > net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:845)
> > > at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:58)
> > > at
> > > net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417)
> > > at latihan2.kacrut.btnCetakActionPerformed(kacrut.java:93)
> > > at latihan2.kacrut.access$000(kacrut.java:30)
> > > at latihan2.kacrut$1.actionPerformed(kacrut.java:53)
> > > at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
> > > at
> > > javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
> > > at
> > > javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
> > > at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
> > > at
> > > javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
> > > at java.awt.Component.processMouseEvent(Component.java:6504)
> > > at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
> > > at java.awt.Component.processEvent(Component.java:6269)
> > > at java.awt.Container.processEvent(Container.java:2229)
> > > at java.awt.Component.dispatchEventImpl(Component.java:4860)
> > > at java.awt.Container.dispatchEventImpl(Container.java:2287)
> > > at java.awt.Component.dispatchEvent(Component.java:4686)
> > > at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
> > > at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
> > > at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
> > > at java.awt.Container.dispatchEventImpl(Container.java:2273)
> > > at java.awt.Window.dispatchEventImpl(Window.java:2713)
> > > at java.awt.Component.dispatchEvent(Component.java:4686)
> > > at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)
> > > at java.awt.EventQueue.access$000(EventQueue.java:101)
> > > at java.awt.EventQueue$3.run(EventQueue.java:666)
> > > at java.awt.EventQueue$3.run(EventQueue.java:664)
> > > at java.security.AccessController.doPrivileged(Native Method)
> > > at
> > > java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
> > > at
> > > java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
> > > at java.awt.EventQueue$4.run(EventQueue.java:680)
> > > at java.awt.EventQueue$4.run(EventQueue.java:678)
> > > at java.security.AccessController.doPrivileged(Native Method)
> > > at
> > > java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
> > > at java.awt.EventQueue.dispatchEvent(EventQueue.java:677)
> > > at
> > > java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
> > > at
> > > java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
> > > at
> > > java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
> > > at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
> > > at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
> > > at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
> > > BUILD SUCCESSFUL (total time: 19 seconds)
> > >
> > > --- In [hidden email], Endy Muhardin wrote:
> > > >
> > > > Maksudnya pesan errornya dipaste yang lengkap. Jangan cuma null pointer
> > > > exception. Biasanya ada informasi errornya di file apa baris berapa.
> > > >
> > > > - Endy Muhardin -
> > > > http://software.endy.muhardin.com/about
> > > > On Feb 27, 2013 10:56 AM, "hawali0887" wrote:
> > > >
> > > > > **
> > > > >
> > > > >
> > > > > aduh mas saya tidak mengerti maksudnya, ini saya sertakan file nya
> > > > >
> > > > > http://dl.dropbox.com/u/109038024/latihan2.zip
> > > > >
> > > > > saya minta tolong bantuannya ya mas, karena ini untuk tugas akhir
> > > kuliah
> > > > > saya
> > > > >
> > > > > Terima Kasih
> > > > >
> > > > > --- In [hidden email], Ifnu bima wrote:
> > > > > >
> > > > > > Null pointer-nya di class apa? bisa copy paste stacktrace
> > > exceptionya ke
> > > > > > sini? yang lengkap ya.
> > > > > >
> > > > > > 2013/2/26 hawali0887
> > > > > >
> > > > > > > **
> > > > > > >
> > > > > > >
> > > > > > > para kakak master saya newbie mau tanya tentang report jasper, udah
> > > > > muter2
> > > > > > > di internet saya msh belum ngerti cara mengkoneksikan jasper dengan
> > > > > java
> > > > > > > pada netbeans...
> > > > > > >
> > > > > > > saya coba seperti ini :
> > > > > > > -----------------------
> > > > > > > private void btnCetakActionPerformed(java.awt.event.ActionEvent
> > > evt) {
> > > > > > >
> > > > > > > // TODO add your handling code here:
> > > > > > > try {
> > > > > > > String file = "src/latihan2/report1.jasper";
> > > > > > > String driver = "com.mysql.jdbc.Driver";
> > > > > > > String konek = "jdbc:mysql://localhost/java_db";
> > > > > > > String user = "root";
> > > > > > > String pass = "";
> > > > > > >
> > > > > > > HashMap p = new HashMap();
> > > > > > > File rf = new File(file);
> > > > > > >
> > > > > > > Class.forName(driver);
> > > > > > > Connection conn = DriverManager.getConnection(konek, user, pass);
> > > > > > >
> > > > > > > JasperReport jr = (JasperReport)JRLoader.loadObject(rf.getPath());
> > > > > > > JasperPrint jp = JasperFillManager.fillReport(jr, p, conn);
> > > > > > > JasperViewer.viewReport(jp, false);
> > > > > > > }
> > > > > > > catch (Exception e) {
> > > > > > > JOptionPane.showMessageDialog(null, e);
> > > > > > > }
> > > > > > >
> > > > > > > }
> > > > > > >
> > > > > > > ---------------------------------
> > > > > > >
> > > > > > > apabila dijalankan, ada pesan error
> > > "java.lang.NullPointerException"
> > > > > > >
> > > > > > > tolong pencerahannya para kakak master, atau ada referensi lain yg
> > > > > mudah
> > > > > > > untuk saya pahami tentang hal ini...
> > > > > > >
> > > > > > > Terima Kasih
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > http://ifnubima.org/indo-java-podcast/
> > > > > > http://project-template.googlecode.com/
> > > > > > @ifnubima
> > > > > >
> > > > > > regards
> > > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> >
>
>
> Reply via web post Reply to sender Reply to group Start a New Topic           Messages in this topic (7)                      
> RECENT ACTIVITY: New Members 3
> Visit Your Group
>
> Download buku java desktop berbahasa indonesia gratis!!
> http://tanyajava.com/download/javadesktop
Reply | Threaded
Open this post in threaded view
|

Re: Mau tanya tentang report jasper

hawali0887
iya mas... saya pake os windows 7 home basic

saya inisiatif pindah pc dan os nya kebetulan win xp sp3, ternyata tidak ada masalah dengan codingan tersebut alias running.

saya berfikir mungkin netbeansnya rusak, saya install ulang tp tetep tidak bisa, saya gk ngerti tuh kenapa... dr pada gk kelar tugas kuliah saya, yaa pake os yg bisa aja deh ^_^ hehehe

Terima Kasih sebelumnya untuk para kakak yang mau membimbing saya belajar.

--- In [hidden email], Benny <sir_ex22@...> wrote:

>
> Sorry nimbrung nih
>
> Kalo liat path nya windows os nya ya. Harusnya pake \\ bukan / atau file separatornya java aja pake
>
> Mudah2an bisa
>
> Regards,
>
> Benny Indra
>
>
> Pada 28 Feb 2013, pukul 14:33, "hawali0887" <hawali0887@...> menulis:
>
> > saya sudah pindah2 filenya tp tetep tidak bisa...
> > bingung saya sm code2 java... :'(
> >
> > Line:81 -> String file = "C:/Users/Xain/My Documents/NetBeansProject/latihan2/src/latihan2/report1.jasper";
> > Line:88 -> File rf = new File(file);
> >
> > Line:93 -> JasperReport jr = (JasperReport)JRLoader.loadObject(rf.getPath());
> >
> > --- In [hidden email], Endy Muhardin wrote:
> > >
> > > Iya.
> > > Coba dibaca yang teliti, nanti ketemu ini :
> > >
> > > at latihan2.kacrut.btnCetakActionPerformed(kacrut.java:93)
> > >
> > > Errornya ada di file kacrut.java baris 93.
> > >
> > > - Endy Muhardin -
> > > http://software.endy.muhardin.com/about
> > > On Feb 28, 2013 12:33 PM, "hawali0887" wrote:
> > >
> > > > **
> > > >
> > > >
> > > > maksudnya ini ya kakak...???
> > > >
> > > > java.lang.NullPointerException
> > > > at java.lang.Class.isAssignableFrom(Native Method)
> > > > at
> > > > net.sf.jasperreports.engine.fill.JRFillTextField.getFormat(JRFillTextField.java:706)
> > > > at
> > > > net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(JRFillTextField.java:394)
> > > > at
> > > > net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:368)
> > > > at
> > > > net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:258)
> > > > at
> > > > net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:499)
> > > > at
> > > > net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2036)
> > > > at
> > > > net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:760)
> > > > at
> > > > net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:270)
> > > > at
> > > > net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128)
> > > > at
> > > > net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:946)
> > > > at
> > > > net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:845)
> > > > at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:58)
> > > > at
> > > > net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417)
> > > > at latihan2.kacrut.btnCetakActionPerformed(kacrut.java:93)
> > > > at latihan2.kacrut.access$000(kacrut.java:30)
> > > > at latihan2.kacrut$1.actionPerformed(kacrut.java:53)
> > > > at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
> > > > at
> > > > javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
> > > > at
> > > > javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
> > > > at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
> > > > at
> > > > javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
> > > > at java.awt.Component.processMouseEvent(Component.java:6504)
> > > > at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
> > > > at java.awt.Component.processEvent(Component.java:6269)
> > > > at java.awt.Container.processEvent(Container.java:2229)
> > > > at java.awt.Component.dispatchEventImpl(Component.java:4860)
> > > > at java.awt.Container.dispatchEventImpl(Container.java:2287)
> > > > at java.awt.Component.dispatchEvent(Component.java:4686)
> > > > at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
> > > > at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
> > > > at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
> > > > at java.awt.Container.dispatchEventImpl(Container.java:2273)
> > > > at java.awt.Window.dispatchEventImpl(Window.java:2713)
> > > > at java.awt.Component.dispatchEvent(Component.java:4686)
> > > > at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)
> > > > at java.awt.EventQueue.access$000(EventQueue.java:101)
> > > > at java.awt.EventQueue$3.run(EventQueue.java:666)
> > > > at java.awt.EventQueue$3.run(EventQueue.java:664)
> > > > at java.security.AccessController.doPrivileged(Native Method)
> > > > at
> > > > java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
> > > > at
> > > > java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
> > > > at java.awt.EventQueue$4.run(EventQueue.java:680)
> > > > at java.awt.EventQueue$4.run(EventQueue.java:678)
> > > > at java.security.AccessController.doPrivileged(Native Method)
> > > > at
> > > > java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
> > > > at java.awt.EventQueue.dispatchEvent(EventQueue.java:677)
> > > > at
> > > > java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
> > > > at
> > > > java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
> > > > at
> > > > java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
> > > > at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
> > > > at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
> > > > at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
> > > > BUILD SUCCESSFUL (total time: 19 seconds)
> > > >
> > > > --- In [hidden email], Endy Muhardin wrote:
> > > > >
> > > > > Maksudnya pesan errornya dipaste yang lengkap. Jangan cuma null pointer
> > > > > exception. Biasanya ada informasi errornya di file apa baris berapa.
> > > > >
> > > > > - Endy Muhardin -
> > > > > http://software.endy.muhardin.com/about
> > > > > On Feb 27, 2013 10:56 AM, "hawali0887" wrote:
> > > > >
> > > > > > **
> > > > > >
> > > > > >
> > > > > > aduh mas saya tidak mengerti maksudnya, ini saya sertakan file nya
> > > > > >
> > > > > > http://dl.dropbox.com/u/109038024/latihan2.zip
> > > > > >
> > > > > > saya minta tolong bantuannya ya mas, karena ini untuk tugas akhir
> > > > kuliah
> > > > > > saya
> > > > > >
> > > > > > Terima Kasih
> > > > > >
> > > > > > --- In [hidden email], Ifnu bima wrote:
> > > > > > >
> > > > > > > Null pointer-nya di class apa? bisa copy paste stacktrace
> > > > exceptionya ke
> > > > > > > sini? yang lengkap ya.
> > > > > > >
> > > > > > > 2013/2/26 hawali0887
> > > > > > >
> > > > > > > > **
> > > > > > > >
> > > > > > > >
> > > > > > > > para kakak master saya newbie mau tanya tentang report jasper, udah
> > > > > > muter2
> > > > > > > > di internet saya msh belum ngerti cara mengkoneksikan jasper dengan
> > > > > > java
> > > > > > > > pada netbeans...
> > > > > > > >
> > > > > > > > saya coba seperti ini :
> > > > > > > > -----------------------
> > > > > > > > private void btnCetakActionPerformed(java.awt.event.ActionEvent
> > > > evt) {
> > > > > > > >
> > > > > > > > // TODO add your handling code here:
> > > > > > > > try {
> > > > > > > > String file = "src/latihan2/report1.jasper";
> > > > > > > > String driver = "com.mysql.jdbc.Driver";
> > > > > > > > String konek = "jdbc:mysql://localhost/java_db";
> > > > > > > > String user = "root";
> > > > > > > > String pass = "";
> > > > > > > >
> > > > > > > > HashMap p = new HashMap();
> > > > > > > > File rf = new File(file);
> > > > > > > >
> > > > > > > > Class.forName(driver);
> > > > > > > > Connection conn = DriverManager.getConnection(konek, user, pass);
> > > > > > > >
> > > > > > > > JasperReport jr = (JasperReport)JRLoader.loadObject(rf.getPath());
> > > > > > > > JasperPrint jp = JasperFillManager.fillReport(jr, p, conn);
> > > > > > > > JasperViewer.viewReport(jp, false);
> > > > > > > > }
> > > > > > > > catch (Exception e) {
> > > > > > > > JOptionPane.showMessageDialog(null, e);
> > > > > > > > }
> > > > > > > >
> > > > > > > > }
> > > > > > > >
> > > > > > > > ---------------------------------
> > > > > > > >
> > > > > > > > apabila dijalankan, ada pesan error
> > > > "java.lang.NullPointerException"
> > > > > > > >
> > > > > > > > tolong pencerahannya para kakak master, atau ada referensi lain yg
> > > > > > mudah
> > > > > > > > untuk saya pahami tentang hal ini...
> > > > > > > >
> > > > > > > > Terima Kasih
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > http://ifnubima.org/indo-java-podcast/
> > > > > > > http://project-template.googlecode.com/
> > > > > > > @ifnubima
> > > > > > >
> > > > > > > regards
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > >
> >
> >
> > Reply via web post Reply to sender Reply to group Start a New Topic           Messages in this topic (7)                      
> > RECENT ACTIVITY: New Members 3
> > Visit Your Group
> >
> > Download buku java desktop berbahasa indonesia gratis!!
> > http://tanyajava.com/download/javadesktop
>