seam generate entities and ui isnt working - seam

i am using seam 2.2.0 GA and i have created a project and try to generate entities and ui
but it doesnt work and it doesnt show any relevant errors,
here is the output, what am i missing?,
any help please
thanks a lot.
SEAM_HOME: C:\java\opt\jboss-seam-2.2.0.GA
Using seam-gen sources from: C:\java\opt\jboss-seam-2.2.0.GA\seam-gen
Buildfile: C:\java\opt\jboss-seam-2.2.0.GA\seam-gen\build.xml
init:
init-properties:
[echo] C:/java/opt/jboss-as-4.2.2.GA
validate-workspace:
validate-project:
init-generate:
generate-model:
[echo] Reverse engineering database using JDBC driver C:/java/lib/mysql-con
nector-java-5.1.13-bin.jar
[echo] project=C:/Documents and Settings/dmolina/My Documents/My Dropbox/Pr
ojects/Acciones
[echo] model=org.cocesna.Acciones.model
[hibernate] Executing Hibernate Tool with a JDBC Configuration (for reverse engi
neering)
[hibernate] 1. task: hbm2java (Generates a set of .java files)
[hibernate] 11:12:15,109 INFO Environment:543 - Hibernate 3.3.1.GA
[hibernate] 11:12:15,109 INFO Environment:576 - hibernate.properties not found
[hibernate] 11:12:15,109 INFO Environment:709 - Bytecode provider name : javass
ist
[hibernate] 11:12:15,125 INFO Environment:627 - using JDK 1.4 java.sql.Timestam
p handling
[hibernate] 11:12:15,250 INFO OverrideRepository:113 - Override file: C:\Docume
nts and Settings\dmolina\My Documents\My Dropbox\Projects\Acciones\resources\sea
m-gen.reveng.xml
[hibernate] 11:12:15,313 INFO DriverManagerConnectionProvider:64 - Using Hibern
ate built-in connection pool (not for production use!)
[hibernate] 11:12:15,328 INFO DriverManagerConnectionProvider:65 - Hibernate co
nnection pool size: 20
[hibernate] 11:12:15,328 INFO DriverManagerConnectionProvider:68 - autocommit m
ode: false
[hibernate] 11:12:15,328 INFO DriverManagerConnectionProvider:103 - using drive
r: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost:3306/acciones
[hibernate] 11:12:15,328 INFO DriverManagerConnectionProvider:109 - connection
properties: {user=root, dataSource_class=com.mysql.jdbc.jdbc2.optional.MysqlData
Source, password=****}
[hibernate] 11:12:15,578 INFO SettingsFactory:116 - RDBMS: MySQL, version: 5.1.
41
[hibernate] 11:12:15,578 INFO SettingsFactory:117 - JDBC driver: MySQL-AB JDBC
Driver, version: mysql-connector-java-5.1.13 ( Revision: ${bzr.revision-id} )
[hibernate] 11:12:15,610 INFO Dialect:175 - Using dialect: org.hibernate.dialec
t.MySQLDialect
[hibernate] 11:12:15,641 INFO TransactionFactoryFactory:59 - Using default tran
saction strategy (direct JDBC transactions)
[hibernate] 11:12:15,641 INFO TransactionManagerLookupFactory:80 - No Transacti
onManagerLookup configured (in JTA environment, use of read-write or transaction
al second-level cache is not recommended)
[hibernate] 11:12:15,641 INFO SettingsFactory:170 - Automatic flush during befo
reCompletion(): disabled
[hibernate] 11:12:15,641 INFO SettingsFactory:174 - Automatic session close at
end of transaction: disabled
[hibernate] 11:12:15,641 INFO SettingsFactory:181 - JDBC batch size: 15
[hibernate] 11:12:15,641 INFO SettingsFactory:184 - JDBC batch updates for vers
ioned data: disabled
[hibernate] 11:12:15,656 INFO SettingsFactory:189 - Scrollable result sets: ena
bled
[hibernate] 11:12:15,656 INFO SettingsFactory:197 - JDBC3 getGeneratedKeys(): e
nabled
[hibernate] 11:12:15,656 INFO SettingsFactory:205 - Connection release mode: au
to
[hibernate] 11:12:15,656 INFO SettingsFactory:224 - Default catalog: PUBLIC
[hibernate] 11:12:15,656 INFO SettingsFactory:229 - Maximum outer join fetch de
pth: 2
[hibernate] 11:12:15,656 INFO SettingsFactory:232 - Default batch fetch size: 1
[hibernate] 11:12:15,656 INFO SettingsFactory:236 - Generate SQL with comments:
disabled
[hibernate] 11:12:15,656 INFO SettingsFactory:240 - Order SQL updates by primar
y key: disabled
[hibernate] 11:12:15,656 INFO SettingsFactory:244 - Order SQL inserts for batch
ing: disabled
[hibernate] 11:12:15,656 INFO SettingsFactory:420 - Query translator: org.hiber
nate.hql.ast.ASTQueryTranslatorFactory
[hibernate] 11:12:15,656 INFO ASTQueryTranslatorFactory:47 - Using ASTQueryTran
slatorFactory
[hibernate] 11:12:15,672 INFO SettingsFactory:252 - Query language substitution
s: {}
[hibernate] 11:12:15,672 INFO SettingsFactory:257 - JPA-QL strict compliance: d
isabled
[hibernate] 11:12:15,672 INFO SettingsFactory:262 - Second-level cache: enabled
[hibernate] 11:12:15,672 INFO SettingsFactory:266 - Query cache: disabled
[hibernate] 11:12:15,672 INFO SettingsFactory:405 - Cache region factory : org.
hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge
[hibernate] 11:12:15,672 INFO RegionFactoryCacheProviderBridge:61 - Cache provi
der: org.hibernate.cache.HashtableCacheProvider
[hibernate] 11:12:15,672 INFO SettingsFactory:276 - Optimize cache for minimal
puts: disabled
[hibernate] 11:12:15,672 INFO SettingsFactory:285 - Structured second-level cac
he entries: disabled
[hibernate] 11:12:15,688 INFO SettingsFactory:314 - Statistics: disabled
[hibernate] 11:12:15,688 INFO SettingsFactory:318 - Deleted entity synthetic id
entifier rollback: disabled
[hibernate] 11:12:15,688 INFO SettingsFactory:333 - Default entity-mode: pojo
[hibernate] 11:12:15,688 INFO SettingsFactory:337 - Named query checking : enab
led
[hibernate] 11:12:15,719 INFO DriverManagerConnectionProvider:170 - cleaning up
connection pool: jdbc:mysql://localhost:3306/acciones
[hibernate] 11:12:15,766 INFO Version:15 - Hibernate Tools 3.2.4.GA
[javaformatter] Java formatting of 0 files completed. Skipped 0 file(s).
generate-ui:
[echo] Building project 'Acciones' to generate views and controllers
init:
groovy.compilemodel:
compilemodel:
groovy.compileactions:
groovy.copyactions:
compileactions:
copyclasses:
compile:
war:
[hibernate] Executing Hibernate Tool with a JPA Configuration
[hibernate] 1. task: generic exportertemplate: view/list.xhtml.ftl
[hibernate] 11:12:16,141 INFO Version:15 - Hibernate Annotations 3.4.0.GA
[hibernate] 11:12:16,141 INFO Version:14 - Hibernate Commons Annotations 3.1.0.
GA
[hibernate] 11:12:16,156 INFO Version:16 - Hibernate EntityManager 3.4.0.GA
[hibernate] 2. task: generic exportertemplate: view/view.xhtml.ftl
[hibernate] 3. task: generic exportertemplate: view/view.page.xml.ftl
[hibernate] 4. task: generic exportertemplate: view/edit.xhtml.ftl
[hibernate] 5. task: generic exportertemplate: view/edit.page.xml.ftl
[hibernate] 6. task: generic exportertemplate: src/EntityList.java.ftl
[hibernate] 7. task: generic exportertemplate: view/list.page.xml.ftl
[hibernate] 8. task: generic exportertemplate: src/EntityHome.java.ftl
[hibernate] 9. task: generic exportertemplate: view/layout/menu.xhtml.ftl
[javaformatter] Java formatting of 1 files completed. Skipped 0 file(s).
[echo] Type 'seam restart' and go to http://localhost:8080/Acciones
generate:
BUILD SUCCESSFUL
Total time: 2 seconds

I figured it out,
the catalog database name was wrong i had another name, using MySQL it needs to be the name of my database in caps and now it works.

Related

Using Flyway Teams Doesn't Seem to Work With CLI

I am trying to use the Flyway trial period for teams, but I can't seem to use it with any of the newer CLIs.
I've been able to use it with the enterprise-specific version from here, but I can't use it with any of the newer versions that are supposed to contain both community and teams code. I've tried both 9.9 (latest) and 9.2.
The license key is set in my conf file and I'm specifying the edition both through environment variables and flags, but it doesn't seem to pick it up.
I should also note that besides the batch and license key configuration settings, this validate works just fine with all three versions using community.
Command:
FLYWAY_EDITION=teams
$FLYWAY_PATH/flyway -teams -X validate -defaultSchema=$default_schema -url="$JDBC_CONNECTION_STRING" -configFiles=$CONF_FILE -placeholders.segment=${{ parameters.segment }}
Result:
DEBUG: Loading config file: /azp/_work/1/s/flyway-9.9.0/conf/flyway.conf
DEBUG: Unable to load config file: /root/flyway.conf
DEBUG: Unable to load config file: /azp/_work/1/s/infra/flyway/flyway.conf
DEBUG: Loading config file: /azp/_work/1/s/infra/flyway/./dev.conf
DEBUG: Using configuration:
DEBUG: flyway.baselineDescription -> Base Migration
DEBUG: flyway.baselineOnMigrate -> true
DEBUG: flyway.baselineVersion -> 0.0
DEBUG: flyway.batch -> true
DEBUG: flyway.cleanDisabled -> false
DEBUG: flyway.configFiles -> ./dev.conf
DEBUG: flyway.defaultSchema -> METADATA
DEBUG: flyway.ignoreMigrationPatterns -> *:pending
DEBUG: flyway.jarDirs -> /azp/_work/1/s/flyway-9.9.0/jars
DEBUG: flyway.jdbcProperties.authenticator -> snowflake_jwt
DEBUG: flyway.jdbcProperties.schema -> METADATA
DEBUG: flyway.jdbcProperties.tracing -> FINEST
DEBUG: flyway.jdbcProperties.user -> *****
DEBUG: flyway.licenseKey -> FL****************
DEBUG: flyway.locations -> filesystem:sql
DEBUG: flyway.placeholders.environment -> dev
DEBUG: flyway.placeholders.segment -> ***
DEBUG: flyway.schemas -> METADATA
DEBUG: flyway.url -> jdbc:snowflake://aza98716.us-east-1.snowflakecomputing.com/?(...)
DEBUG: flyway.user -> ******
ERROR: Unexpected error
org.flywaydb.core.internal.license.FlywayTeamsUpgradeRequiredException: Flyway Teams Edition upgrade required: batch is not supported by Flyway Community Edition
Try Flyway Teams Edition for free: https://rd.gt/2VzHpkY
at org.flywaydb.core.api.configuration.ClassicConfiguration.setBatch(ClassicConfiguration.java:1005)
at org.flywaydb.core.api.configuration.ClassicConfiguration.configure(ClassicConfiguration.java:1615)
at org.flywaydb.core.api.configuration.FluentConfiguration.configuration(FluentConfiguration.java:943)
at org.flywaydb.commandline.Main.getLegacyConfiguration(Main.java:281)
at org.flywaydb.commandline.Main.main(Main.java:122)
TIA!
For 8.5.10 onwards, Flyway Teams was moved into a separate package so those features can't be used in the Community version anymore.
You have to download the Teams version separately from https://download.red-gate.com/maven/release/org/flywaydb/enterprise/flyway-commandline/

hydra - structured config group/package override via yaml

I'm not very successfully trying to figure out how to achieve an override of a group/package with and via a yaml file. Trying to explain my problem using the example (files and folder structre) from the hydra documentation https://hydra.cc/docs/tutorials/structured_config/schema/.
yaml.config as:
defaults:
- base_config # --> reference to dataclass
- db: base_mysql # --> reference to dataclass
- _self_ debug: true
gives the expected (print when running the myapp.py):
db:
driver: mysql
host: localhost
port: 3306
user: ???
password: ???
Using the yaml file instead instead of the base_mysql dataclass is also fine thus the yaml.config as:
defaults:
- base_config
- db: mysql # --> reads db/mysql.yaml
- _self_
debug: true
prints again as expected
db:
driver: mysql
host: localhost
port: 3306
user: omry
password: secret
Overriding individual fields is as well fine, e.g. with config.yaml like
defaults:
- base_config
- db: mysql
- _self_
debug: true
db:
password: UpdatedPassword
What I'm to able to figure out is how to override the full db group with a/via another yaml file - defining the structure via a dataclass and then override/set the values like:
defaults:
- base_config
- db: base_mysql # --> reference to dataclass to define the structure
- _self_
debug: true
db: mysql # --> mysql.yaml
throws the following error:
In 'config': Validation error while composing config:
Merge error: str is not a subclass of MySQLConfig. value: mysql
full_key:
object_type=Config
Searching the internet/stackoverflow already showed me that moving the self to the first position will get rid of the error - but then the composition order is "wrong".
Keeping the order as it is and using the mysql.yaml for an override works well - when done via commandline (python myapp.py db=mysql when the line "db:mysql" is not present), but for my usecase it much more convinient to handle it all via the yaml file(s).
Somehow I assume that the same functionality is available via CLI and files/code and that I just did not mange to figure out how it works.
(hydra version 1.1 in a conda environment with python 3.9)
Thank you very much in advance for any help that you can provide.
If understand correctly, you want to use the defaults list in your primary yaml file to merge together the base_mysql config with the mysql config. This will do the trick:
defaults:
- base_config
- db: [base_mysql, mysql]
- _self_
debug: true
Passing a list [base_mysql, mysql] of config names causes those configs base_mysql and mysql to be merged together. This is documented here -- see the "CONFIG_NAMES" alternative for specifying an option in the defaults list.
Note that passing the CLI override db=mysql (as in python myapp.py db=mysql) results in modification of the defaults list; the resulting defaults list will be the same as if you had used the following in your yaml file:
defaults:
- base_config
- db: mysql
- _self_
debug: true
You can pass a list [base_mysql, mysql] of config names at the CLI like this:
python my_app.py 'db=[base_mysql, mysql]'

WSO2 Failed Administrator login attempt 'admin[-1234]' at [2018-05-01 05:36:36,073+0000]

I was originally using https://docs.wso2.com/display/CLUSTER44x/Configuring+the+Pre-Packaged+Identity+Server+5.2.0+with+API+Manager+2.0.0.
Now i migrated to API manager 2.1.0 and Id server 5.3.0
After migrating id server , I am unable to login. even for the admin/admin , I am unable to login.
The below error is shown
[2018-05-01 05:36:53,528] WARN {java.util.prefs.FileSystemPreferences} - Couldn't flush system prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.
[2018-05-01 05:36:36,073] WARN {org.wso2.carbon.core.services.util.CarbonAuthenticationUtil} - Failed Administrator login attempt 'admin[-1234]' at [2018-05-01 05:36:36,073+0000]
I dont have any other errors in the log.But server takes long to start up because there is some messages like below
[2018-05-01 05:30:30,549] WARN {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} - Waiting for required OSGi services: org.wso2.carbon.server.admin.common.IServerAdmin,
[2018-05-01 05:31:30,548] WARN {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} - Waiting for required OSGi services: org.wso2.carbon.server.admin.common.IServerAdmin,
[2018-05-01 05:32:30,548] WARN {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} - Waiting for required OSGi services: org.wso2.carbon.server.admin.common.IServerAdmin,
[2018-05-01 05:33:30,548] WARN {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} - Waiting for required OSGi services: org.wso2.carbon.server.admin.common.IServerAdmin,
[2018-05-01 05:34:30,548] WARN {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} - Waiting for required OSGi services: org.wso2.carbon.server.admin.common.IServerAdmin,
Any help plz
can you check whether you have configured the user-mgt.xml in /repository/conf location please. check whether it is same in previous version and new version. Also check whether you configured the user store correctly in the repository/conf/datasources/master-datasources.xml file

Waiting for required OSGi services: org.wso2.carbon.server.admin.common.IServerAdmin,

After WSO2 Identity server migration to 5.3.0 , the following messages are printed in the log.
The start up is very slow because of this as well.
[2018-05-01 05:53:04,802] WARN {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} - Waiting for required OSGi services: org.wso2.carbon.server.admin.common.IServerAdmin,
[2018-05-01 05:54:04,802] WARN {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} - Waiting for required OSGi services: org.wso2.carbon.server.admin.common.IServerAdmin,
[2018-05-01 05:55:04,802] WARN {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} - Waiting for required OSGi services: org.wso2.carbon.server.admin.common.IServerAdmin,
[2018-05-01 05:56:04,802] WARN {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} - Waiting for required OSGi services: org.wso2.carbon.server.admin.common.IServerAdmin,
How can i find what is missing?Did i miss some configuration while migrating?
This message get printed due to a background process running during the migration. (In the background token related migration is happening). If you have huge amount of old tokens (expired, etc), then this process would take some time.
We have documented this case in API Manager 2.0.0 migration docs as well (there is an Identity server migration in AM 2.0.0 migration). See point 10 in "Upgrading the API Manager to 2.0.0" section in https://docs.wso2.com/display/AM200/Upgrading+from+the+Previous+Release (Warning is not exactly same. but similar)
Please note that stopping in the mid-migration would cause corruption in the database.

Sqlite file db for codeception testing fails

Attempts to use a sqlite file database in the app/cache/tests directory fail. This is determined by clearing the dev MySQl database and populating the test environment database via the console. Test database being populated was confirmed by an external Sqlite Manager. [Tests performed without the sqlite configuration pass.]
codeception.yml:
actor: Tester
paths:
tests: tests
log: tests/_output
data: tests/_data
support: tests/_support
envs: tests/_envs
settings:
bootstrap: _bootstrap.php
colors: false
memory_limit: 1024M
extensions:
enabled:
- Codeception\Extension\RunFailed
modules:
config:
- Db:
dsn: 'sqlite:./app/cache/test/test.sqlite'
user: ''
password: ''
dump: tests/_data/test.sql
populate: true
cleanup: false
reconnect: true
Edit:
In an Ubuntu VM, adding the Symfony2 configuration to acceptance.yml allows for partial success - the test uses the Sqlite db but does not rewrite from the specified dump (test.sql). In Windows adding the Symfony configuration makes no difference.
acceptance.yml:
class_name: AcceptanceTester
modules:
enabled:
- PhpBrowser:
url: http://vol
- \Helper\Acceptance
# adding these lines enables Ubuntu to use sqlite db
- Symfony2:
app_path: ./app
environment: test
You haven't enabled Db module in acceptance.yml
modules:
enabled:
- Db
- PhpBrowser:
url: http://vol
- \Helper\Acceptance
Also don't add PhpBrowser and Symfony2 at the same time,
only one can be used.

Resources