Возможно ли заставить ангулар при старте приложения ожидать первичной прогрузки данных с сервера и только потом инициализировать контроллеры и рисовать страницу? У меня с сервера получаются данные об авторизованном пользователе.
Пытаюсь с помощью lucene индексировать , а потом искать интовое поле. В итоге ничего не находит (по текстовым полям все ищется прекрасно).
Индексация выглядит следующим образом:
Document doc = new Document();
//UserType = 1
doc.add(new IntField("userType", user.getType().getId(), Field.Store.YES));
FSDirectory dir = FSDirectory.open(FileSystems.getDefault().getPath(indexDir));
IndexWriterConfig config = new IndexWriterConfig(new StandardAnalyzer());
writer = new IndexWriter(dir, config);
writer.addDocument(doc);
Для поиска пробовал использовать следующие запросы:
new QueryParser(defautField, new StandartAnalyzer()).parse("userType:1");
и
new QueryParser(defautField, new StandartAnalyzer()).parse("userType:[1 TO 1]");
Пытаюсь сделать автоверификацию на несколько проектов геррита. Возможно ли сделать это одним проектом дженкинса?
При попытке добавить еще 1 репозиторий в multiplescm-plugin сборка падает из-за того что не находит коммит.
Triggered by Gerrit: http://github.example.com:8082/79
Building in workspace /var/lib/jenkins/jobs/Precommit verifier/workspace
> /usr/bin/git rev-parse --is-inside-work-tree
Fetching changes from the remote Git repository
> /usr/bin/git config remote.project1.url ssh://verifier@github.example.com:29418/project1.git
Fetching upstream changes from ssh://verifier@github.example.com:29418/project1.git
> /usr/bin/git --version
using GIT_SSH to set credentials verifier
> /usr/bin/git fetch --tags --progress ssh://verifier@github.example.com:29418/project1.git refs/changes/79/79/1
> /usr/bin/git rev-parse 441380d2893e3bcd9289467ffc9dadfcd36cb947^{commit}
Checking out Revision 441380d2893e3bcd9289467ffc9dadfcd36cb947 (master)
> /usr/bin/git config core.sparsecheckout
> /usr/bin/git checkout -f 441380d2893e3bcd9289467ffc9dadfcd36cb947
> /usr/bin/git rev-parse FETCH_HEAD^{commit}
> /usr/bin/git rev-list 381cabeac3ef8a74d4e3a7867a94d91e93d32130
> /usr/bin/git rev-parse --is-inside-work-tree
Fetching changes from the remote Git repository
> /usr/bin/git config remote.project2.url ssh://verifier@github.example.com:29418/project2.git
Fetching upstream changes from ssh://verifier@github.example.com:29418/project2.git
> /usr/bin/git --version
using GIT_SSH to set credentials verifier
> /usr/bin/git fetch --tags --progress ssh://verifier@github.example.com:29418/project2.git refs/changes/79/79/1
FATAL: Failed to fetch from ssh://verifier@github.example.com:29418/project2.git
hudson.plugins.git.GitException: Failed to fetch from ssh://verifier@github.example.com:29418/project2.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:622)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:854)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:879)
at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:118)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1252)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:624)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:530)
at hudson.model.Run.execute(Run.java:1732)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:234)
Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git fetch --tags --progress ssh://verifier@github.example.com:29418/project2.git refs/changes/79/79/1" returned status code 128:
stdout:
stderr: fatal: Couldn't find remote ref refs/changes/79/79/1
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1325)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1186)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$200(CliGitAPIImpl.java:87)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:257)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:620)
... 11 more
Вопрос: предполагается ли что каждый js скрипт будет отдельным модулем ангулара(с подключением всего в app.js) или нет?
Вопрос№2: предполагается ли что загрузку всех этих скриптов надо вести в index'е?
Здравствуйте. Была страница целостная на которой использовались плагины jquery типа placeholder'a (прописаны в head).
Вынес часть содержимого в шаблоны ангулара в итоге placeholder перестал применяться. + в firebug вылетает ошибка вида:
Error: node is undefined
compositeLinkFn@http://127.0.0.1:9090/web-design/resources/js/common/angular.js:7078:13
compositeLinkFn@http://127.0.0.1:9090/web-design/resources/js/common/angular.js:7078:13
compositeLinkFn@http://127.0.0.1:9090/web-design/resources/js/common/angular.js:7078:13
Пытаюсь сделать простой запрос через jpa. Вылетает эта дрянь.
Что это может быть?
java.lang.IllegalArgumentException: No query defined for that name {User.getAll}
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.buildQueryFromName(AbstractEntityManagerImpl.java:788)
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.createNamedQuery(AbstractEntityManagerImpl.java:925)
at ru.example.dao.user.UserDao.loadUser(UserDao.java:39)
...
User.java:
import javax.persistence.*;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;
@XmlRootElement
@Entity
@Table(name = "users")
@NamedQueries({
@NamedQuery(name = "User.getAll", query = "SELECT u from User u"),
@NamedQuery(name = "User.getByLogin", query = "SELECT u FROM User u WHERE u.login = :login")
})
public class User implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long id;
@Column(name = "login", length = 50)
private String login;
public long getId() { return id; }
public void setId(long id) { this.id = id; }
public String getLogin() { return login; }
public void setLogin(String login) { this.login = login;}
}
UserDao.java:
import ru.example.db.user.User;
import javax.persistence.TypedQuery;
public class UserDao {
public User loadUser() {
EntityManager em = Persistence.createEntityManagerFactory("JPA").createEntityManager();
TypedQuery <User> namedQuery = em.createNamedQuery("User.getAll", User.class);
return namedQuery.getResultList().get(0);
}
}
Возможно ли авторизационные(сессию) пробросить из 1го варика в другой. Хочу сделать в 1м варике дизайн + настройки j_security_check, а в другом рест который будет серверную логику всю осуществлять
Не могу обновить сюзю с 11 до 13 версии по онлайну.
Прописал репозитории через яст для 13.1. Убрал репозитории 11.1.
zypper сыпит следующее:
linux-2qwu:/var/cache # zypper refresh
Repository 'oss' is up to date.
Building repository 'oss' cache [done]
Error building the cache database:
'repo2solv.sh' '-o' '/var/cache/zypp/solv/oss/solv' '/var/cache/zypp/raw/oss'
Unknown checksum type: 6: SHA256
Skipping repository 'oss' because of the above error.
Repository 'Updates for 13.1' is up to date.
Building repository 'Updates for 13.1' cache [done]
Error building the cache database:
'repo2solv.sh' '-o' '/var/cache/zypp/solv/Updates_for_11.0_1/solv' '/var/cache/zypp/raw/Updates_for_11.0_1'
cat: primary.xml*: No such file or directory
repo_rpmmd: no element found at line 1:0
Skipping repository 'Updates for 13.1' because of the above error.
Repository 'openSUSE-13.1-Non-Oss' is up to date.
Building repository 'openSUSE-13.1-Non-Oss' cache [done]
Error building the cache database:
'repo2solv.sh' '-o' '/var/cache/zypp/solv/openSUSE-13.1-Non-Oss/solv' '/var/cache/zypp/raw/openSUSE-13.1-Non-Oss'
malformed line: RELNOTESURL
Unknown checksum type: 6: SHA256
Skipping repository 'openSUSE-13.1-Non-Oss' because of the above error.
Could not refresh the repositories because of errors.
linux-2qwu:/var/cache # zypper dup
Building repository 'oss' cache [done]
Error building the cache database:
'repo2solv.sh' '-o' '/var/cache/zypp/solv/oss/solv' '/var/cache/zypp/raw/oss'
Unknown checksum type: 6: SHA256
Warning: Disabling repository 'oss' because of the above error.
Building repository 'Updates for 13.1' cache [done]
Error building the cache database:
'repo2solv.sh' '-o' '/var/cache/zypp/solv/Updates_for_11.0_1/solv' '/var/cache/zypp/raw/Updates_for_11.0_1'
cat: primary.xml*: No such file or directory
repo_rpmmd: no element found at line 1:0
Warning: Disabling repository 'Updates for 13.1' because of the above error.
Building repository 'openSUSE-13.1-Non-Oss' cache [done]
Error building the cache database:
'repo2solv.sh' '-o' '/var/cache/zypp/solv/openSUSE-13.1-Non-Oss/solv' '/var/cache/zypp/raw/openSUSE-13.1-Non-Oss'
malformed line: RELNOTESURL
Unknown checksum type: 6: SHA256
Warning: Disabling repository 'openSUSE-13.1-Non-Oss' because of the above error.
Reading installed packages...
Nothing to do.
linux-2qwu:/var/cache #