Jump to content
Changes to the Jaspersoft community edition download ×

Step two build error with PosgreSQL


anandharaj

Recommended Posts

Hi guys,

 

i have problem build the schema. here is the error msg

Any guys can help me to solve this problem.

 

 

 

[iNFO] Scanning for projects...

[iNFO] -------------------------------------------------------------------------

---

[iNFO] Building Jasper Server database generation

[iNFO] task-segment: [clean, install]

[iNFO] -------------------------------------------------------------------------

---

[iNFO] [clean:clean]

[iNFO] Deleting directory C:jasperintelligence-1.1.0-srcjasperserverjasperser

ver-repository-hibernatebuild-dbtarget

[iNFO] Deleting directory C:jasperintelligence-1.1.0-srcjasperserverjasperser

ver-repository-hibernatebuild-dbtargetclasses

[iNFO] Deleting directory C:jasperintelligence-1.1.0-srcjasperserverjasperser

ver-repository-hibernatebuild-dbtargettest-classes

[iNFO] [resources:resources]

[iNFO] Using default encoding to copy filtered resources.

[iNFO] [dependency:unpack {execution: unpack}]

[iNFO] Configured Artifact: com.jaspersoft.jasperserver.api.metadata.impl:jasper

server-repository-hibernate:null:1.1.0:jar

[iNFO] Expanding: C:Documents and SettingsAnandharaj.m2repositorycomjasper

softjasperserverapimetadataimpljasperserver-repository-hibernate1.1.0jasp

erserver-repository-hibernate-1.1.0.jar into C:jasperintelligence-1.1.0-srcjas

perserverjasperserver-repository-hibernatebuild-dbtargetclasses

[WARNING] POM for 'com.jaspersoft.jasperserver.api.metadata.impl:jasperserver-re

pository-hibernate:pom:1.1.0:compile' is invalid. It will be ignored for artifac

t resolution. Reason: Failed to validate POM

[iNFO] [compiler:compile]

[iNFO] Nothing to compile - all classes are up to date

[WARNING] POM for 'com.jaspersoft.jasperserver.api.metadata.impl:jasperserver-re

pository-hibernate:pom:1.1.0:compile' is invalid. It will be ignored for artifac

t resolution. Reason: Failed to validate POM

[iNFO] [antrun:run {execution: default}]

[iNFO] Executing tasks

[mkdir] Created dir: C:jasperintelligence-1.1.0-srcjasperserverjasperserv

er-repository-hibernatebuild-dbtargetsql

[hibernatetool] Executing Hibernate Tool with a Standard Configuration

[hibernatetool] 1. task: hbm2ddl (Generates database schema)

[JPivot] 02 Nov 2006 18:24:08,145 ERROR [session ] org.hibernate.tool.hbm2ddl.Sc

hemaExport#execute: schema export unsuccessful

java.sql.SQLException: No suitable driver

at java.sql.DriverManager.getConnection(DriverManager.java:545)

at java.sql.DriverManager.getConnection(DriverManager.java:140)

at org.hibernate.connection.DriverManagerConnectionProvider.getConnectio

n(DriverManagerConnectionProvider.java:110)

at org.hibernate.tool.hbm2ddl.SchemaExport$ProviderConnectionHelper.getC

onnection(SchemaExport.java:467)

at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:183

)

at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:135)

 

at org.hibernate.tool.ant.Hbm2DDLExporterTask.execute(Hbm2DDLExporterTas

k.java:53)

at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.ja

va:143)

at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)

at org.apache.tools.ant.Task.perform(Task.java:364)

at org.apache.tools.ant.Target.execute(Target.java:341)

at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractA

ntMojo.java:108)

at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:83)

 

at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi

nManager.java:412)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa

ultLifecycleExecutor.java:534)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi

fecycle(DefaultLifecycleExecutor.java:475)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau

ltLifecycleExecutor.java:454)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan

dleFailures(DefaultLifecycleExecutor.java:306)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen

ts(DefaultLifecycleExecutor.java:273)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi

fecycleExecutor.java:140)

at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)

at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)

at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)

at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)

at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

 

at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

[hibernatetool] 1 errors occurred while performing <hbm2ddl>.

[hibernatetool] Error #1: java.sql.SQLException: No suitable driver

 Executing file: C:jasperintelligence-1.1.0-srcjasperserverscripts

quartztables_postgres.sql

[sql] Failed to execute: # Thanks to Patrick Lightbody for submitting thi

s... # # In your Quartz properties file, you'll need to set # org.quartz.jobStor

e.driverDelegateClass = org.quartz.impl.jdbcjobstore.PostreSQLDelegate drop tab

le qrtz_job_listeners

[iNFO] ------------------------------------------------------------------------

[ERROR] BUILD ERROR

[iNFO] ------------------------------------------------------------------------

[iNFO] Error executing ant tasks

 

Embedded error: org.postgresql.util.PSQLException: ERROR: syntax error at or nea

r "#"

[iNFO] ------------------------------------------------------------------------

[iNFO] For more information, run Maven with the -e switch

[iNFO] ------------------------------------------------------------------------

[iNFO] Total time: 12 seconds

[iNFO] Finished at: Thu Nov 02 18:24:08 SGT 2006

[iNFO] Final Memory: 8M/15M

[iNFO] ------------------------------------------------------------------------

Link to comment
Share on other sites

  • Replies 11
  • Created
  • Last Reply

Top Posters In This Topic

It looks like you have been looking at http://jasperforge.org/sf/docman/do/downloadDocument/projects.jasperintelligence/docman.root/doc1013

.

 

You need to install a Postgres driver into your local Maven2 repository and change your settings.xml accordingly.

 

Mark Penningroth has been working on this too : http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&func=view&id=16822&catid=10

 

 

 

Sherman

JasperSoft

Link to comment
Share on other sites

Yes, i already place the jdbc driver for PosgreSQL in ./m2/postgresql/postgresql/8.1-407.jdbc3

 

and also changed the maven setting to use Postgresql.

 

Seems, a lot of guys building JI with PostgreSQL, can you guys just provide the ".war" with postgresql schema as you did for mysql.

Link to comment
Share on other sites

From the error message, it said that "No suitable Driver found"

 

[hibernatetool] Executing Hibernate Tool with a standard Configuration

[hibernatetool] 1. task: hbm2ddl (Generates database schema)

[JPivot] 03 Nov 2006 13:59:26,980 ERROR [session ] org.hibernate.tool.hbm2ddl.Sc

hemaExport#execute: schema export unsuccessful

java.sql.SQLException: No suitable driver

at java.sql.DriverManager.getConnection(DriverManager.java:545)

at java.sql.DriverManager.getConnection(DriverManager.java:140)

 

I using JDK 1.5.09 and PostgreSQL 8.1.5 with JDBC Driver postgresql-8.1-405.jdbc3

Link to comment
Share on other sites

I think there is a problem with your C:/Docume~1/Anandharaj/.m2/hibernate.cfg.xml file.

 

Mine looks like:

 

Code:
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
<session-factory name="metadata">
<!-- Database connection settings -->
<property name="connection.driver_class">org.postgresql.Driver</property>
<property name="connection.url">jdbc:«»postgresql://localhost/jasperserver</property>
<property name="connection.username">postgres</property>
<property name="connection.password">pgAdmin</property>

<property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>

<property name="show_sql">false</property>
<property name="format_sql">false</property>
<!-- <mapping resource="org/hibernate/test/legacy/Simple.hbm.xml"/> -->
</session-factory>
</hibernate-configuration>

 

 

Sherman

JasperSoft

Link to comment
Share on other sites

My solution was to add additional properties to the jndi definition. Postgres has a setAutoCommitDefault property that I set to false. When a connection is obtained from the pool, it will automatically turn off auto commit.

 

I tried the *prop changes and they had no impact.

 

I have attached the readme.txt file that is included in the patch. It describes what I did to get this working.

 

[file name=readme.txt size=3921]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/readme.txt[/file]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...