[solved] apache derby jdbc eclipse

hey guyz i didnt found any file to install by yaourt or pacman!
i just found the plugin's derby for eclipse
how can i install em configure without pacman or yaourt?
thx
Last edited by abarahc (2011-02-23 12:10:37)

I'm doing a project with java derby and there in college. the problem is that the school computer use and netbeans windows 7 (everything is configured uu ')
there everything is going well. but I want to redo the project using my linux and stop using the netbeans (very slow here).
I searched in forums how to configure eclipse to use the drivers for each database. I'm currently with mysql installed, but could not make the connection with the sqlexplorer eclipse.
The point is that I thought it might be a better setup by pacman or yaourt the standpoint of managing the software installed and also the configuration of the system variables .-.

Similar Messages

  • How to store and retrieve image in a apache derby using JDBC

    hi all
    this is source code i copy and modify but get error message like this
    import java.io.*;
    import java.sql.*;
    import java.util.Properties;
    import java.awt.*;
    import javax.swing.*;
    public class ImageDemo{
    public static void main(String argv[]){
    try{
    String url="jdbc:derby:derDB2";
    Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
    Properties properties=new Properties();
    Connection connection = DriverManager.getConnection(url,properties);
    Statement stmt = connection.createStatement();
    stmt.execute("create database if not exists imagedatabase");
    stmt.execute("create table if not exists imagetable (imageid int,IMAGE_DATA blob)");
    File file=new File("c:\\c.jpg");
    FileInputStream in=new FileInputStream(file);
    PreparedStatement ps=connection.prepareStatement("insert into imagetable (imageid,IMAGE_DATA) values(?,?)");
    ps.setInt(1,1234);
    ps.setBinaryStream(2,in,(int)file.length());
    ps.execute();
    ps.close();
    ResultSet rs =stmt.executeQuery("select IMAGE_DATA from imagetable where imageid=1234");
    byte[] imgbytes=null;
    if(rs.next()) {
    imgbytes=rs.getBytes(1);
    rs.close();
    stmt.close();
    connection.close();
    if(imgbytes!=null){
    JFrame fr = new JFrame();
    fr.setTitle("Simple Demo for Load Image from MS Access");
    Image image = fr.getToolkit().createImage(imgbytes);
    fr.getContentPane().add(new PaintPanel(image));
    fr.setSize(200,400);
    fr.setVisible(true);
    Thread.sleep(10000);
    System.exit(0);
    catch( SQLException sqle )
    do
    System.out.println(sqle.getMessage());
    System.out.println("Error Code:"+sqle.getErrorCode());
    System.out.println("SQL State:"+sqle.getSQLState());
    sqle.printStackTrace();
    }while((sqle=sqle.getNextException())!=null);
    catch( Exception e )
    System.out.println(e.getMessage());
    e.printStackTrace();
    class PaintPanel extends JPanel {
    private Image image;
    public PaintPanel(Image image) {
    this.image = image;
    public void paintComponent(Graphics g) {
    super.paintComponent(g);
    g.drawImage(image, 0, 0, this);
    and this is the error message
    Syntax error: Encountered "database" at line 1, column 8.
    Error Code:30000
    SQL State:42X01
    ERROR 42X01: Syntax error: Encountered "database" at line 1, column 8.
         at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
         at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(Unknown Source)
         at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
         at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
         at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
         at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
         at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
         at ImageDemo.main(ImageDemo.java:28)

    It's complaining about this SQL in your code:create database if not exists imagedatabaseThat doesn't exactly look right to me. And perhaps "database" is a reserved word and can't be used in that position. At any rate I would recommend you create your database and tables in some other way before you write Java code to use them. Does Derby have a command-line interface or a GUI manager program? Use them if they exist to set up your tables.

  • Problem setting up ODI Repository on Apache Derby DB 10.2.2.0

    I am trying to installl the Apache Derby DB and then trying
    to create an Oracle Data Intergrator Metadata Repository on the
    Derby Instance but i seem to be lost with regards to the Drivers
    and the Connection details can anyone point me to some good
    resources where i can understand the installation procedure for
    Apache Derby and also the connection issues with Oracle Data
    Integrator.

    In order to use the Apache Derby technology for the repository, you will need the Derby JDBC driver (derby.jar) to be located in your drivers subdirectory. Once that is there, you can start the process by creating the master repository using the wizard. Once in there, you will need to use the driver class (org.apache.derby.jdbc.EmbeddedDriver) and the URL which will be something like jdbc:derby:MYFILE.db;create=true.
    From the list of technologies, select the DB2UDB definition, not the Apache Derby definition. This will allow you to create your master repository there. Follow on from there with the other parts of the repository creation using this information.

  • Failed to retrieve data from the database (Apache derby). Details: java.lang.reflect.InvacationTargetException

    Post Author: johnnighter
    CA Forum: Data Connectivity and SQL
    Hi,Good Day !I followed crxi_java_bean_data_source.pdf to setup and configure Crystal Report XI (Product Version 11.0.0.1282, CR Developer; Product Type: Full).Below is the sample code.import java.sql.*;public class CRSampleDataSourceBean {    private ResultSet resultSet = null;    private Connection connection = null;     private String connectionURL = "jdbc:derby:MyDatabase";    private String databaseClass = "org.apache.derby.jdbc.EmbeddedDriver";    private String query = "SELECT * FROM CUSTOMER";         public CRSampleDataSourceBean()     {        try         {                        Class.forName(databaseClass);                        connection = DriverManager.getConnection(connectionURL, "", "");        }         catch (ClassNotFoundException ex)         {            System.out.println("Ensure that database driver class is installed.");            ex.printStackTrace();        }         catch (SQLException ex)         {            System.out.println("SQL Exception #" + ex.getErrorCode() + " : " + ex.getLocalizedMessage());            ex.printStackTrace();        }    }            public ResultSet getResultSet() throws SQLException     {                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);                resultSet = statement.executeQuery(query);        return resultSet;    }}Compile no error. It display at the "Java Beans Connectivity" screen, and able to select from the "Java Bean Classes" combobox.It display at the "Available Data Sources" (left hand side) with database name CRSampleDataSourceBean->getResultSet.  BUT when click the ">" or ">>" button, it display an error message "Failed to retrieve data from the database. Details: java.lang.reflect.InvacationTargetException". Please advice. regards,johnnighter    

    Post Author: pvierheilig
    CA Forum: Crystal Reports
    Have you been able to resolve this yet?  I don't have any reference to Oracle error codes but would suspect a quick Google of something like 'Oracle error code 997' should result in good information, since it is an Oracle error...
    Hope this helps.

  • Setting the CLASSPATH for the derby.jdbc embedded class

    I am new to Java and am trying to connect a simple (hello world simple) terminal app to a javadb embedded database - I am using the classFor to load the jdbc - but when I run my app I get an error saying the class can't be found. I think I just need to add the jdbc to my classpath. I've tried using
    export CLASSPATH=...
    but I still get the same error.

    Thank you SO much for your response! I have tried the following (this is where I found the derby.jar):
    javac -cp /usr/lib/jvm/java-6-sun-1.6.0.07/db/lib/derby.jar test.java
    But I am still getting the same error:
    java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
    Here is my code - so far it doesn't really do anything, I just want to get it connected, then I'll start adding some simple db code and go from there:
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.Statement;
    class HelloDave
        public static void main(String[] args)
            try
                Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
            catch (Exception e)
                e.printStackTrace();
            System.out.println("Hello, Dave");
    }

  • Create Apache Derby source in Sun Application Server 8.1

    I have downloaded Java Studio Creator 2 bundled with SAS 8.1 and PointBase database.
    I have a project that uses Apache derby 10.1.XX and would like to create a connection datasourse in SAS 8.1. Can someone kindly point me in the right direction as to how to achieve this?
    Thanks
    John

    if you download SJAS 8.2, Derby is included and pre-configured as a DataSource
    Using 8.1, you will need to add the jars to either the lib or domains/domains1/lib/ext directory and manually configure a DataSource using
    javax.sql.DataSource           org.apache.derby.jdbc.ClientDataSource
    javax.sql.XADataSource           org.apache.derby.jdbc.ClientXADataSource

  • JavaDB / Apache Derby equivalent to the SQL Server IsNull and Oracle nvl

    Firstly, if questions for JavaDB are supposted to go somewhere else, sorry for posting in the JDBC section, but I couldn't find a specific section for it.
    I'm trying to add support for Apache Derby to a piece of software that already has support for Oracle, SQL Server and MySQL. There is a lot of DB specific coding involved to get the best performance possible. Several of these queries involve checking to see if a nested query returns a value and substituting 0 if no rows are returned.
    In Oracle the function is called: nvl
    In SQL Server the function is called: IsNull
    In MySQL the function is called: IfNull
    I can't find an equivalent for Derby. Does one exist?

    NULLIF
    http://db.apache.org/derby/docs/10.2/ref/rrefcasenullif.html

  • Apache derby

    how to store and retrieve image in a apache derby using JDBC
    please send me any article or related resource about it
    thank you

              public static boolean tableExists( String tableName, Connection conn )
              throws SQLException{ 
                        DatabaseMetaData metadata = conn.getMetaData();
                        String[] tableTypes ={"TABLE"};
                        ResultSet tables = metadata.getTables(null,null,tableName,tableTypes);
                        return tables.next(); 
                   }

  • Apache Derby database not working

    I am running a Windows 2003 server with Coldfusion 8. I was attempting to update the Apache Derby database to the latest version. I copied the following files to the "\Coldfusion8\lib\" directory and replaced the existing files:
    derby.jar
    derbyclient.jar
    derbynet.jar
    derbyTesting.jar
    derbytools.jar
    After replacing these files, I haven't been able to get my Apache Derby embedded databases working. I've downloaded all of the versions of Derby from the Apache website and individually replaced the files in the "\Coldfusion8\lib\" folder. I shut down CF, replaced the 5 files, and restarted the server; all without any luck.
    Any ideas on how to restore Apache Derby functionality to my server would be greatly appreciated.

    how to restore Apache Derby functionality
    Restore the original files you replaced!
    If you want to use version of Derby other than the one CF ships with, install it separately.
    Adam

  • WebLogic Portal with Apache Derby

    Has anyone tried to use the Apache Derby database with WebLogic Portal?
    Kunal Mittal

    Hi Faisal,
    I have gone through the two links. Thanks.
    One of the link enables LDAP user and group access on Weblogic. Suppose we have an web application called DMS and a LDAP group called DMS, can we assume that after running your wlst code, the users in the DMS group in LDAP will be granted access to the web application DMS? When we have a hundred different groups, we will need to put a loop around your code to expose them to WLS. Is that the case? I do not think it will work though as the set* member functions will set the group for later get* member functions' call from that group. How does this work for more than one group?
    WLP and WebCenter both are based on WLS. Can I assume that the contents in the two links are applicable for WLP and WebCenter?
    When we create web applications, portlets and pages etc. on WLP and WebCenter, we will associate them with some LDAP groups. Is that how it works?
    Please advise,
    Thanks,
    Regards,
    Michael
    Edited by: user2766888 on 13/05/2010 18:02
    Edited by: user2766888 on 13/05/2010 18:08
    Edited by: user2766888 on 13/05/2010 18:11

  • Database manager for Java DB/Apache Derby?

    Does anyone know a great and free database manager software with GUI for Java DB/Apache Derby where I can create and open databases? Something like Mysql Administrator and Mysql Query Builder for Mysql.
    Thanks in advance!

    I don't think there is any separation between CCMS and other systems, all use one database. If you use MaxDB use Database Manager, if smth like SQL Server or Oracle use standard tools of this vendors, like Enterprise Manager third party tools also helps you, cause I don't see any difference between

  • Migrate Database from MySQL to Apache Derby

    Hello all,
    Does anyone know how to migrate a database in MySQL to Apache Derby? Will ij do this, and if so, how do I go about doing it? If not, is there a way to do so?
    Thanks in advance! -- BTR

    Errr... Apache Derby is a database implemented in Java?
    Sorry, I'll go somewhere else.

  • Installing Apache Derby

    Hi All,
    I'm having huge problems finding all the required software
    and following the myriad of instruction threads for installing
    Apache Derby. I desperately need some help to get me going. I'm
    particularly interested in producing AIR desktop applications and
    hence the need for an embedded database.
    Any help much appreciated. If you are located in Auckland so
    much the better.
    I'm working on Mac OS X 10.4.11.
    Cheers,
    Chris

    Hello me,
    Finally, I found a coherent set of instructions here:
    http://db.apache.org/derby/papers/DerbyTut/install_software.html
    You just have to be a little careful interpreting some of the
    example shell commands when installing and setting the envirnoment
    variables, but other than that it worked a treat and I was up and
    running in less than an hour.
    Hope this helps someone else too.
    Cheers,
    Chris

  • Database apache derby

    Hi,
    I configured and installed MOBI and used default apache derby as database. Is it a good database tool or should i migrate to other database like sql etc.?
    please advise.
    Arun

    Hi Arun,
    if you have more than about 5 concurrent users requesting information via BO Mobile you should change the database from derby to another supported one. Derby is only ment for small installations...
    Regards,
    Harald

  • Apache Derby 10.5.3 / SQL Error / SQLState: 42Y03

    Apache Derby 10.5.3
    This one is working fine:
    SELECT schemaname || '.' || tablename as TableName,
    SYSCS_UTIL.SYSCS_CHECK_TABLE(schemaname, tablename) AS OK
    FROM sys.sysschemas s, sys.systables t
    WHERE s.schemaid = t.schemaid
    and t.tabletype = 'T';
    This one fails!
    SELECT schemaname || '.' || tablename as TableName,
    SYSCS_UTIL.SYSCS_EXPORT_TABLE('APP', tablename, 'D:\\' || tablename, ';', NULL, NULL) AS OK
    FROM sys.sysschemas s, sys.systables t
    WHERE s.schemaid = t.schemaid
    and t.tabletype = 'T';
    Error: 'SYSCS_UTIL.SYSCS_EXPORT_TABLE' wurde nicht als Funktion oder Prozedur erkannt.
    SQLState: 42Y03
    ErrorCode: 30000
    Is there any error in this SQL Statement or is there somthing I missed?

    akloes wrote:
    If you not want to help... stop asking stupid questions...Ok, I will stop asking "stupid" questions and tell you what the problem is.
    You have an impossible situation. All the data that you have means that you have two contradictory positions. The two opposing positions cannot both be true.
    Thus it means that one of your assumptions is wrong. Determine which assumption and it will make it obvious what the problem is.
    (And in case anyone else is interested the "stupid" questions above were all common assumptions that one can make which can lead to incorrect conclusions.)

Maybe you are looking for

  • Iphone and at&t - the truth about at&t service for the iphone

    i love my iphone. the only problem has been using at&t in southern california. in los angeles there are major holes in the service, and multiple hour delays on delivery of voicemails and emails. so ive been on the phone with technical and customer su

  • HP Officejet 8500 continually runs a maintenance check

    My HP Office Jet 8500 is rumming a system check and tells me not to push any buttons or turn it off. Problem is that it has been doing that for 3 days. Can anyone help?

  • System colors in Java

    I am working in a Java Swing Project. Here I have to set some System colors like Window Background, Button Face etc to the controls. I also need the way to set the color to be Transparent. Plz help me soon. Anila.

  • Error : ORA-01403 no data found (Portal Page)

    hi you all, I have this confusing bug "or something" on my portal. I have created 5 tabs on my page. And everything wwas working fine until I added discoverer portlets that view's graph. Once this portlet was in and the user views the page, users can

  • SD migration issue

    We are on the process of migration and we are checking "Customzing Cross-system Viewer (SCU0)" in order to compare 2 servers (server 20 & 30). This tcode will list down all the configuration and compares the 2 servers. Looking at the image below (the