You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by "Hensley, Richard" <Ri...@itb.mckhboc.com> on 2001/04/03 23:39:12 UTC

Oracle and Turbine

I'm using the most recent tdk, and I'm trying to use it with an oracle
database. My development server is running under Windows. The DBMS is
running on Unix. I've modified the ProjectControl.properties file to include
the correct properties as shown in the GETTING_STARTED.txt file. These
properties are

database=oracle
targetPlatform=windows
targetPlatformExt=bat
databaseUrl = jdbc:oracle:thin:@eug:1521:DNEWDEV
databaseDriver = oracle.jdbc.driver.OracleDriver
databaseUser = turbine
databasePassword = turbine
databaseHost = eug

When I run the build-project.bat init script, it gets to the
create-database: step and fails with the following stackdump.

I'm trying to figure out the set of things that caused this, but any help
would be appreciated.

org.apache.velocity.exception.MethodInvocationException: Invocation of
method 'parse' in  class org.apache.velocity.texen.Generator threw exception
class org.apache.velocity.exception.ResourceNotFoundException
        at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java)
        at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.ja
va)
        at
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.jav
a)
        at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java)
        at org.apache.velocity.Template.merge(Template.java)
        at org.apache.velocity.texen.Generator.parse(Generator.java)
        at org.apache.velocity.texen.ant.TexenTask.execute(TexenTask.java)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:124)
        at org.apache.tools.ant.Target.execute(Target.java:153)
        at org.apache.tools.ant.Project.runTarget(Project.java:898)
        at org.apache.tools.ant.Project.executeTarget(Project.java:536)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:213)
        at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:103)
        at org.apache.tools.ant.Target.execute(Target.java:153)
        at org.apache.tools.ant.Project.runTarget(Project.java:898)
        at org.apache.tools.ant.Project.executeTarget(Project.java:536)
        at org.apache.tools.ant.Project.executeTargets(Project.java:510)
        at org.apache.tools.ant.Main.runBuild(Main.java:421)
        at org.apache.tools.ant.Main.main(Main.java:149)

BUILD FAILED

C:\java\tdk\webapps\ProjectControl\WEB-INF\build\build-project.xml:145:
Execute failed: java.io.IOException: CreateProcess:
..\src\sql\create-database.bat error=32
java.io.IOException: CreateProcess: ..\src\sql\create-database.bat error=32
        at java.lang.Win32Process.create(Native Method)
        at java.lang.Win32Process.<init>(Win32Process.java:66)
        at java.lang.Runtime.execInternal(Native Method)
        at java.lang.Runtime.exec(Runtime.java:551)
        at java.lang.reflect.Method.invoke(Native Method)
        at
org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.jav
a:497)
        at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:329)
        at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:228)
        at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:162)
        at org.apache.tools.ant.Target.execute(Target.java:153)
        at org.apache.tools.ant.Project.runTarget(Project.java:898)
        at org.apache.tools.ant.Project.executeTarget(Project.java:536)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:213)
        at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:103)
        at org.apache.tools.ant.Target.execute(Target.java:153)
        at org.apache.tools.ant.Project.runTarget(Project.java:898)
        at org.apache.tools.ant.Project.executeTarget(Project.java:536)
        at org.apache.tools.ant.Project.executeTargets(Project.java:510)
        at org.apache.tools.ant.Main.runBuild(Main.java:421)
        at org.apache.tools.ant.Main.main(Main.java:149)

Richard Hensley
mailto:richard.hensley@itb.mckhboc.com


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Oracle and Turbine

Posted by "Edward.Nunez" <Ed...@oracle.com>.
What about this option:

In the create-database step i could do the following:

  - Try to connect with the username and password found in project.properties

  - If it fails I assume the user doesn't exist and i will create a User with
username and
    password as the ones found in project.properties; in order to do this we will
    need a username and password with "Create User" privileges, we could create
    2 new entries in project.properties called probable "OracleDBAUserName" and
    "OracleDBAPassword" and probably take them from there, but it's kind of
    scary/risky to have a DBA username and password stored in file which anybody
    may have access to (I'm open to sugestions).

The script create-database.bat would be an Ant script, which will make calls to SQL
target to do above steps (that way we don't create dependencies with any tool from
Oracle like SQL*Plus, SQLDBA, etc.). Is there way in Ant to ask for some values
in an interactive way ? that way we wouldn't have to store DBA UserName and
Password in the project.properties file.

Please let me know what you think about it, and i can start working on it.

Regards,

Edward.

Jason van Zyl wrote:

> "Edward.Nunez" wrote:
> >
> > Hi Jason,
> >
> > I can try to help you in creating the scripts for Oracle,
> > I just need to understand what exactly is the expected behavior
> > for the create-database step.
>
> Simply a to create a target to execute the generated SQL against.
>
> > It's not common for an Oracle user to be creating a database
> > (from the Oracle's perspective). Usually what happens is that a user
> > can create objects under its own schema. I don't see the need to
> > create an Oracle Database, just to use a username and password
> > to create the objects under a specific user.
>
> Whatever is usual for oracle, but for the TDK a user should be
> able to start from scratch and have the TDK init target build
> everything necessary to get the example app running. If that means
> doing a back flip, and then eating an orange popsicle to make it
> work with Oracle then that's what the TDK will do ;-)
>
> I could definitely use some help. If I push some changes into
> torque would you be willing to test the TDK against oracle?
>
> >
> > I did create a TDK application against Oracle when using TDK 1.1a11,
> > i had some problems because the turbine and project creation scripts
> > were failing when dropping an object that didn't exist. I updated the file
> > drop.vm (torque/templates/sql/base/oracle/drop.vm) with following
> > content:
> >
> > -----<< Begin Drop.vm file >>--------
> > declare
> >   l_cursor   number;  --
> >   l_ret      number;  --
> >   l_dummy    VARCHAR2(30); --
> >   CURSOR c_chk_table is select table_name
> >                           from user_tables
> >                          where table_name = '$table.Name'; --
> > begin
> >   open c_chk_table; --
> >   fetch c_chk_table into l_dummy; --
> >   if c_chk_table%FOUND then
> >      l_cursor := dbms_sql.open_cursor; --
> >      dbms_sql.parse(l_cursor, 'DROP TABLE $table.Name cascade
> > constraints', DBMS_SQL.native); --
> >      l_ret := dbms_sql.execute(l_cursor); --
> >      dbms_sql.close_cursor(l_cursor); --
> >   end if; --
> >   close c_chk_table; --
> > end; --
> > ;
> >
> > #foreach ($col in $table.Columns)
> > #if ($col.isAutoIncrement())
> >    declare
> >      l_cursor   number;  --
> >      l_ret      number;  --
> >      l_dummy    VARCHAR2(30); --
> >      CURSOR c_chk_seq is select sequence_name
> >                            from user_sequences
> >                           where sequence_name = '${table.Name}_SEQ'; --
> >    begin
> >      open c_chk_seq; --
> >      fetch c_chk_seq into l_dummy; --
> >      if c_chk_seq%FOUND then
> >         l_cursor := dbms_sql.open_cursor; --
> >         dbms_sql.parse(l_cursor, 'DROP SEQUENCE ${table.Name}_SEQ',
> > DBMS_SQL.native); --
> >         l_ret := dbms_sql.execute(l_cursor); --
> >         dbms_sql.close_cursor(l_cursor); --
> >      end if; --
> >      close c_chk_seq; --
> >    end; --
> >    ;
> > #end
> > #end
> >
> > --------<< End Drop.vm >>---------
> >
> > And that fixed the problem,
> >
> > Please let me know if i can be of any help, to actually make TDK work smoothly
> > with Oracle Database.
> >
> > Regards,
> >
> > Edward.
> >
>
> --
> jvz.
>
> Jason van Zyl
> jvanzyl@apache.org
>
> http://jakarta.apache.org/velocity
> http://jakarta.apache.org/turbine
> http://tambora.zenplex.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


RE: Oracle and Turbine

Posted by Age Mooy <am...@home.nl>.
jvanzyl wrote:

<snip>

> Whatever is usual for oracle, but for the TDK a user should be
> able to start from scratch and have the TDK init target build
> everything necessary to get the example app running. If that means
> doing a back flip, and then eating an orange popsicle to make it
> work with Oracle then that's what the TDK will do ;-)
>
> I could definitely use some help. If I push some changes into
> torque would you be willing to test the TDK against oracle?

I volunteer for testing the tdk against Oracle.
I do agree with Edward on the fact that it's not very common in Oracle-land to create a new database instance, esspecially not in a
development environment. Would it be possible to make the create-database target optional or to make it default to an empty .bat
file like the one Richard Hensley used ? Until now I've always just commented out the call to create-database before running the
init target but Richard's solution would at least enable Oracle users to run the TDK out of the box.

If enough people insist on creating a database automatically for Oracle... the create database command is complex but I think it all
comes down to which of the many many options you want to be non-default. I've never done it but I could look into it if anyone is
interested enough.

Age


> >
> > I did create a TDK application against Oracle when using TDK 1.1a11,
> > i had some problems because the turbine and project creation scripts
> > were failing when dropping an object that didn't exist. I updated the file
> > drop.vm (torque/templates/sql/base/oracle/drop.vm) with following
> > content:
> >
> > -----<< Begin Drop.vm file >>--------
> > declare
> >   l_cursor   number;  --
> >   l_ret      number;  --
> >   l_dummy    VARCHAR2(30); --
> >   CURSOR c_chk_table is select table_name
> >                           from user_tables
> >                          where table_name = '$table.Name'; --
> > begin
> >   open c_chk_table; --
> >   fetch c_chk_table into l_dummy; --
> >   if c_chk_table%FOUND then
> >      l_cursor := dbms_sql.open_cursor; --
> >      dbms_sql.parse(l_cursor, 'DROP TABLE $table.Name cascade
> > constraints', DBMS_SQL.native); --
> >      l_ret := dbms_sql.execute(l_cursor); --
> >      dbms_sql.close_cursor(l_cursor); --
> >   end if; --
> >   close c_chk_table; --
> > end; --
> > ;
> >
> > #foreach ($col in $table.Columns)
> > #if ($col.isAutoIncrement())
> >    declare
> >      l_cursor   number;  --
> >      l_ret      number;  --
> >      l_dummy    VARCHAR2(30); --
> >      CURSOR c_chk_seq is select sequence_name
> >                            from user_sequences
> >                           where sequence_name = '${table.Name}_SEQ'; --
> >    begin
> >      open c_chk_seq; --
> >      fetch c_chk_seq into l_dummy; --
> >      if c_chk_seq%FOUND then
> >         l_cursor := dbms_sql.open_cursor; --
> >         dbms_sql.parse(l_cursor, 'DROP SEQUENCE ${table.Name}_SEQ',
> > DBMS_SQL.native); --
> >         l_ret := dbms_sql.execute(l_cursor); --
> >         dbms_sql.close_cursor(l_cursor); --
> >      end if; --
> >      close c_chk_seq; --
> >    end; --
> >    ;
> > #end
> > #end
> >
> > --------<< End Drop.vm >>---------
> >
> > And that fixed the problem,
> >
> > Please let me know if i can be of any help, to actually make TDK work smoothly
> > with Oracle Database.
> >
> > Regards,
> >
> > Edward.
> >
>
> --
> jvz.
>
> Jason van Zyl
> jvanzyl@apache.org
>
> http://jakarta.apache.org/velocity
> http://jakarta.apache.org/turbine
> http://tambora.zenplex.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Oracle and Turbine

Posted by Jason van Zyl <jv...@apache.org>.
"Edward.Nunez" wrote:
> 
> Hi Jason,
> 
> I can try to help you in creating the scripts for Oracle,
> I just need to understand what exactly is the expected behavior
> for the create-database step.

Simply a to create a target to execute the generated SQL against.

> It's not common for an Oracle user to be creating a database
> (from the Oracle's perspective). Usually what happens is that a user
> can create objects under its own schema. I don't see the need to
> create an Oracle Database, just to use a username and password
> to create the objects under a specific user.

Whatever is usual for oracle, but for the TDK a user should be
able to start from scratch and have the TDK init target build
everything necessary to get the example app running. If that means
doing a back flip, and then eating an orange popsicle to make it
work with Oracle then that's what the TDK will do ;-)

I could definitely use some help. If I push some changes into
torque would you be willing to test the TDK against oracle?

> 
> I did create a TDK application against Oracle when using TDK 1.1a11,
> i had some problems because the turbine and project creation scripts
> were failing when dropping an object that didn't exist. I updated the file
> drop.vm (torque/templates/sql/base/oracle/drop.vm) with following
> content:
> 
> -----<< Begin Drop.vm file >>--------
> declare
>   l_cursor   number;  --
>   l_ret      number;  --
>   l_dummy    VARCHAR2(30); --
>   CURSOR c_chk_table is select table_name
>                           from user_tables
>                          where table_name = '$table.Name'; --
> begin
>   open c_chk_table; --
>   fetch c_chk_table into l_dummy; --
>   if c_chk_table%FOUND then
>      l_cursor := dbms_sql.open_cursor; --
>      dbms_sql.parse(l_cursor, 'DROP TABLE $table.Name cascade
> constraints', DBMS_SQL.native); --
>      l_ret := dbms_sql.execute(l_cursor); --
>      dbms_sql.close_cursor(l_cursor); --
>   end if; --
>   close c_chk_table; --
> end; --
> ;
> 
> #foreach ($col in $table.Columns)
> #if ($col.isAutoIncrement())
>    declare
>      l_cursor   number;  --
>      l_ret      number;  --
>      l_dummy    VARCHAR2(30); --
>      CURSOR c_chk_seq is select sequence_name
>                            from user_sequences
>                           where sequence_name = '${table.Name}_SEQ'; --
>    begin
>      open c_chk_seq; --
>      fetch c_chk_seq into l_dummy; --
>      if c_chk_seq%FOUND then
>         l_cursor := dbms_sql.open_cursor; --
>         dbms_sql.parse(l_cursor, 'DROP SEQUENCE ${table.Name}_SEQ',
> DBMS_SQL.native); --
>         l_ret := dbms_sql.execute(l_cursor); --
>         dbms_sql.close_cursor(l_cursor); --
>      end if; --
>      close c_chk_seq; --
>    end; --
>    ;
> #end
> #end
> 
> --------<< End Drop.vm >>---------
> 
> And that fixed the problem,
> 
> Please let me know if i can be of any help, to actually make TDK work smoothly
> with Oracle Database.
> 
> Regards,
> 
> Edward.
> 

-- 
jvz.

Jason van Zyl
jvanzyl@apache.org

http://jakarta.apache.org/velocity
http://jakarta.apache.org/turbine
http://tambora.zenplex.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Oracle and Turbine

Posted by "Edward.Nunez" <Ed...@oracle.com>.
Hi Jason,

I can try to help you in creating the scripts for Oracle,
I just need to understand what exactly is the expected behavior
for the create-database step.
It's not common for an Oracle user to be creating a database
(from the Oracle's perspective). Usually what happens is that a user
can create objects under its own schema. I don't see the need to
create an Oracle Database, just to use a username and password
to create the objects under a specific user.

I did create a TDK application against Oracle when using TDK 1.1a11,
i had some problems because the turbine and project creation scripts
were failing when dropping an object that didn't exist. I updated the file
drop.vm (torque/templates/sql/base/oracle/drop.vm) with following
content:

-----<< Begin Drop.vm file >>--------
declare
  l_cursor   number;  --
  l_ret      number;  --
  l_dummy    VARCHAR2(30); --
  CURSOR c_chk_table is select table_name
                          from user_tables
                         where table_name = '$table.Name'; --
begin
  open c_chk_table; --
  fetch c_chk_table into l_dummy; --
  if c_chk_table%FOUND then
     l_cursor := dbms_sql.open_cursor; --
     dbms_sql.parse(l_cursor, 'DROP TABLE $table.Name cascade
constraints', DBMS_SQL.native); --
     l_ret := dbms_sql.execute(l_cursor); --
     dbms_sql.close_cursor(l_cursor); --
  end if; --
  close c_chk_table; --
end; --
;

#foreach ($col in $table.Columns)
#if ($col.isAutoIncrement())
   declare
     l_cursor   number;  --
     l_ret      number;  --
     l_dummy    VARCHAR2(30); --
     CURSOR c_chk_seq is select sequence_name
                           from user_sequences
                          where sequence_name = '${table.Name}_SEQ'; --
   begin
     open c_chk_seq; --
     fetch c_chk_seq into l_dummy; --
     if c_chk_seq%FOUND then
        l_cursor := dbms_sql.open_cursor; --
        dbms_sql.parse(l_cursor, 'DROP SEQUENCE ${table.Name}_SEQ',
DBMS_SQL.native); --
        l_ret := dbms_sql.execute(l_cursor); --
        dbms_sql.close_cursor(l_cursor); --
     end if; --
     close c_chk_seq; --
   end; --
   ;
#end
#end

--------<< End Drop.vm >>---------

And that fixed the problem,

Please let me know if i can be of any help, to actually make TDK work smoothly
with Oracle Database.

Regards,

Edward.

Jason van Zyl wrote:

> "Hensley, Richard" wrote:
> >
> > I'm using the most recent tdk, and I'm trying to use it with an oracle
> > database. My development server is running under Windows. The DBMS is
> > running on Unix. I've modified the ProjectControl.properties file to include
> > the correct properties as shown in the GETTING_STARTED.txt file. These
> > properties are
> >
> > database=oracle
> > targetPlatform=windows
> > targetPlatformExt=bat
> > databaseUrl = jdbc:oracle:thin:@eug:1521:DNEWDEV
> > databaseDriver = oracle.jdbc.driver.OracleDriver
> > databaseUser = turbine
> > databasePassword = turbine
> > databaseHost = eug
> >
> > When I run the build-project.bat init script, it gets to the
> > create-database: step and fails with the following stackdump.
> >
> > I'm trying to figure out the set of things that caused this, but any help
> > would be appreciated.
>
> Oracle is not fully supported in the TDK. I need scripts to add
> to torque that can be used to create the oracle databases. Someone
> posted some scripts but I can't find the mail, and mail-archive.com
> isn't working for us yet. If that person who sent the scripts can
> post them again, or if you can post some scripts then I would be
> happy to get them into torque. Only Postgres, MySQL, and Hypersonic
> are fully supported in the TDK.
>
> If you create the databases by hand, the rest of the stages for
> the init target should work fine. After you create the databases
> by hand, comment out the create database portion of the init target
> in the project.properties file and you should be on your way.
>
> >
> > org.apache.velocity.exception.MethodInvocationException: Invocation of
> > method 'parse' in  class org.apache.velocity.texen.Generator threw exception
> > class org.apache.velocity.exception.ResourceNotFoundException
> >         at
> > org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java)
> >         at
> > org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.ja
> > va)
> >         at
> > org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.jav
> > a)
> >         at
> > org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java)
> >         at org.apache.velocity.Template.merge(Template.java)
> >         at org.apache.velocity.texen.Generator.parse(Generator.java)
> >         at org.apache.velocity.texen.ant.TexenTask.execute(TexenTask.java)
> >         at
> > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:124)
> >         at org.apache.tools.ant.Target.execute(Target.java:153)
> >         at org.apache.tools.ant.Project.runTarget(Project.java:898)
> >         at org.apache.tools.ant.Project.executeTarget(Project.java:536)
> >         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:213)
> >         at
> > org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:103)
> >         at org.apache.tools.ant.Target.execute(Target.java:153)
> >         at org.apache.tools.ant.Project.runTarget(Project.java:898)
> >         at org.apache.tools.ant.Project.executeTarget(Project.java:536)
> >         at org.apache.tools.ant.Project.executeTargets(Project.java:510)
> >         at org.apache.tools.ant.Main.runBuild(Main.java:421)
> >         at org.apache.tools.ant.Main.main(Main.java:149)
> >
> > BUILD FAILED
> >
> > C:\java\tdk\webapps\ProjectControl\WEB-INF\build\build-project.xml:145:
> > Execute failed: java.io.IOException: CreateProcess:
> > ..\src\sql\create-database.bat error=32
> > java.io.IOException: CreateProcess: ..\src\sql\create-database.bat error=32
> >         at java.lang.Win32Process.create(Native Method)
> >         at java.lang.Win32Process.<init>(Win32Process.java:66)
> >         at java.lang.Runtime.execInternal(Native Method)
> >         at java.lang.Runtime.exec(Runtime.java:551)
> >         at java.lang.reflect.Method.invoke(Native Method)
> >         at
> > org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.jav
> > a:497)
> >         at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:329)
> >         at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:228)
> >         at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:162)
> >         at org.apache.tools.ant.Target.execute(Target.java:153)
> >         at org.apache.tools.ant.Project.runTarget(Project.java:898)
> >         at org.apache.tools.ant.Project.executeTarget(Project.java:536)
> >         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:213)
> >         at
> > org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:103)
> >         at org.apache.tools.ant.Target.execute(Target.java:153)
> >         at org.apache.tools.ant.Project.runTarget(Project.java:898)
> >         at org.apache.tools.ant.Project.executeTarget(Project.java:536)
> >         at org.apache.tools.ant.Project.executeTargets(Project.java:510)
> >         at org.apache.tools.ant.Main.runBuild(Main.java:421)
> >         at org.apache.tools.ant.Main.main(Main.java:149)
> >
> > Richard Hensley
> > mailto:richard.hensley@itb.mckhboc.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
> --
> jvz.
>
> Jason van Zyl
> jvanzyl@apache.org
>
> http://jakarta.apache.org/velocity
> http://jakarta.apache.org/turbine
> http://tambora.zenplex.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Oracle and Turbine

Posted by Jason van Zyl <jv...@apache.org>.
"Hensley, Richard" wrote:
> 
> I'm using the most recent tdk, and I'm trying to use it with an oracle
> database. My development server is running under Windows. The DBMS is
> running on Unix. I've modified the ProjectControl.properties file to include
> the correct properties as shown in the GETTING_STARTED.txt file. These
> properties are
> 
> database=oracle
> targetPlatform=windows
> targetPlatformExt=bat
> databaseUrl = jdbc:oracle:thin:@eug:1521:DNEWDEV
> databaseDriver = oracle.jdbc.driver.OracleDriver
> databaseUser = turbine
> databasePassword = turbine
> databaseHost = eug
> 
> When I run the build-project.bat init script, it gets to the
> create-database: step and fails with the following stackdump.
> 
> I'm trying to figure out the set of things that caused this, but any help
> would be appreciated.

Oracle is not fully supported in the TDK. I need scripts to add
to torque that can be used to create the oracle databases. Someone
posted some scripts but I can't find the mail, and mail-archive.com
isn't working for us yet. If that person who sent the scripts can
post them again, or if you can post some scripts then I would be
happy to get them into torque. Only Postgres, MySQL, and Hypersonic
are fully supported in the TDK.

If you create the databases by hand, the rest of the stages for
the init target should work fine. After you create the databases
by hand, comment out the create database portion of the init target
in the project.properties file and you should be on your way.

> 
> org.apache.velocity.exception.MethodInvocationException: Invocation of
> method 'parse' in  class org.apache.velocity.texen.Generator threw exception
> class org.apache.velocity.exception.ResourceNotFoundException
>         at
> org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java)
>         at
> org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.ja
> va)
>         at
> org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.jav
> a)
>         at
> org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java)
>         at org.apache.velocity.Template.merge(Template.java)
>         at org.apache.velocity.texen.Generator.parse(Generator.java)
>         at org.apache.velocity.texen.ant.TexenTask.execute(TexenTask.java)
>         at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:124)
>         at org.apache.tools.ant.Target.execute(Target.java:153)
>         at org.apache.tools.ant.Project.runTarget(Project.java:898)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:536)
>         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:213)
>         at
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:103)
>         at org.apache.tools.ant.Target.execute(Target.java:153)
>         at org.apache.tools.ant.Project.runTarget(Project.java:898)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:536)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:510)
>         at org.apache.tools.ant.Main.runBuild(Main.java:421)
>         at org.apache.tools.ant.Main.main(Main.java:149)
> 
> BUILD FAILED
> 
> C:\java\tdk\webapps\ProjectControl\WEB-INF\build\build-project.xml:145:
> Execute failed: java.io.IOException: CreateProcess:
> ..\src\sql\create-database.bat error=32
> java.io.IOException: CreateProcess: ..\src\sql\create-database.bat error=32
>         at java.lang.Win32Process.create(Native Method)
>         at java.lang.Win32Process.<init>(Win32Process.java:66)
>         at java.lang.Runtime.execInternal(Native Method)
>         at java.lang.Runtime.exec(Runtime.java:551)
>         at java.lang.reflect.Method.invoke(Native Method)
>         at
> org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.jav
> a:497)
>         at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:329)
>         at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:228)
>         at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:162)
>         at org.apache.tools.ant.Target.execute(Target.java:153)
>         at org.apache.tools.ant.Project.runTarget(Project.java:898)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:536)
>         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:213)
>         at
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:103)
>         at org.apache.tools.ant.Target.execute(Target.java:153)
>         at org.apache.tools.ant.Project.runTarget(Project.java:898)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:536)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:510)
>         at org.apache.tools.ant.Main.runBuild(Main.java:421)
>         at org.apache.tools.ant.Main.main(Main.java:149)
> 
> Richard Hensley
> mailto:richard.hensley@itb.mckhboc.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org

-- 
jvz.

Jason van Zyl
jvanzyl@apache.org

http://jakarta.apache.org/velocity
http://jakarta.apache.org/turbine
http://tambora.zenplex.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org