我正在尝试编译我的Android项目,我收到此错误
[INFO] Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0
[INFO] at java.lang.ClassLoader.defineClass1(Native Method)
[INFO] at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
[INFO] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
[INFO] at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
[INFO] at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
[INFO] at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
[INFO] at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
[INFO] at java.security.AccessController.doPrivileged(Native Method)
[INFO] at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
[INFO] at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
[INFO] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
[INFO] at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
[INFO] at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
Run Code Online (Sandbox Code Playgroud)
我一直在阅读其他帖子,尝试使用Java 8编译可能会导致该错误,但不是我的情况,我有以下Java版本:
java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.5) (7u79-2.5.5-0ubuntu0.14.04.2)
OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode) …Run Code Online (Sandbox Code Playgroud) 我正在尝试将javax.mail jar添加到我的类路径中,但是我收到此错误:
java.lang.NoClassDefFoundError: javax/mail/MessagingException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2663)
at java.lang.Class.getDeclaredConstructors(Class.java:2012)
at org.springframework.beans.factory.annotation.
Run Code Online (Sandbox Code Playgroud)
我在其他帖子中已经知道可以修复将依赖性添加到pom.xml中,所以我做到了:
的pom.xml
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.3</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)

但我仍然得到错误..有人帮我这个吗?
我正在尝试使用IntelliJ Idea的jpa控制台,但出现此错误

jpa-ql>从usuario中选择nombre
[2014-10-25 13:57:52] javax.persistence.PersistenceException: [PersistenceUnit: sigarep-persistence] Unable to build EntityManagerFactory
[2014-10-25 13:57:52] java.lang.RuntimeException: org.hibernate.HibernateException: Connection cannot be null when 'hibernate.dialect' not set
at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:97)
at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:67)
at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:174)
at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:78)
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2293)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2289)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1758)
at org.hibernate.ejb.EntityManagerFactoryImpl.(EntityManagerFactoryImpl.java:96)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:913)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:898)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:59)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:47)
at com.intellij.jpa.remote.impl.JpaFacadeImpl.createEntityManagerFactory(JpaFacadeImpl.java:16)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
at sun.rmi.transport.Transport$1.run(Transport.java:177)
at sun.rmi.transport.Transport$1.run(Transport.java:174)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556) …Run Code Online (Sandbox Code Playgroud) 对于显示经常变化的数据(例如银行帐户余额)的应用程序来说,渐进式 Web 应用程序离线功能是一个好主意吗?
如果用户正在使用他的 PWA 离线模式并导航到例如银行产品余额部分,他实际上没有查看有关其余额的更新数据,并允许基于可能未更新的数据进行操作。
我是否错过了这种针对经常变化的数据的方法 (PWA) 的某些内容?
我想使用角度4.0.0和ng-bootstrap 1.0.0-beta.4在模态中显示消息,但它不显示模态.
APP-module.ts
@NgModule({
// ...
declarations: [
LoginComponent
],
imports: [
// ...
NgbModule.forRoot()
],
entryComponents: [LoginComponent],
})
export class AppModule { }
Run Code Online (Sandbox Code Playgroud)
login.component.ts
@Component({
selector: 'app-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.css']
})
export class LoginComponent {
@ViewChild('examplemodal')
private modalRef: TemplateRef<any>;
constructor(private modalService: NgbModal) { }
//.... some event that fires onModalRequest()
onModalRequest(): void {
const modalRef = this.modalService.open(this.modalRef); //Not working
modalRef.result.then((result) => {
console.log(result);
console.log('closed');
}).catch( (result) => {
console.log(result);
console.log('cancelling');
});
}
}
Run Code Online (Sandbox Code Playgroud)
examplemodal.html
<ng-template #examplemodal>
<div class="modal"> …Run Code Online (Sandbox Code Playgroud) 我正在查询执行以下命令的 cassandra 表:
select * from oap.purchase_events where clientNumber = '100'
该表包含一行 clientNumber 100 ,但是我收到此错误:
InvalidRequest: code=2200 [Invalid query] message="Undefined name clientnumber in where clause ('clientnumber = 100')"
表定义:
CREATE TABLE oap.purchase_events (
"parentId" text,
"childId" text,
"clientNumber" text,
cost double,
description text,
"eventDate" timestamp,
"logDate" timestamp,
message text,
"operationalChannel" text,
"productDuration" bigint,
"productId" text,
"transactionId" text,
volume double,
"volumeUnit" text,
PRIMARY KEY ("parentId", "childId")
) WITH CLUSTERING ORDER BY ("childId" ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = '{"keys":"ALL", …Run Code Online (Sandbox Code Playgroud) 我正在使用 Spring Jpa 在 Restful 项目中工作,所以我使用的是 @Query 注释。我想知道如何为查询中的列设置别名?因为响应将结果集的每个寄存器显示为数组 0,1,2 而不是我想显示我想用别名设置的自定义名称。
这是一些代码
道游戏I.java
public interface DaoGameI extends JpaRepository<Game, Integer> {
@Query("SELECT g.id AS id_game, g.scoreHomeTeam As score_home_team, g.date AS game_date"
" FROM Game g "
)
public List<Game> allGames();
}
Run Code Online (Sandbox Code Playgroud)
服务游戏
@Autowired
private DaoJuegoI iGames;
@RequestMapping(value="/all")
public @ResponseBody List<Game> all(){
return iGame.allGames();
}
Run Code Online (Sandbox Code Playgroud)
然后我得到这个回应..

而不是 OI 想要显示 id_game 。而不是 1 我想显示 score_home_team 。而不是 2 我想显示日期
希望可以有人帮帮我!
我正在尝试使用MINGW64在Windows上克隆一个repo,我得到了这个错误.
$ git clone ssh://user@server/myproject && scp -p -P XXXXX user@server:hooks/commit-msg myproject/.git/hooks/
Cloning into 'myproject'...
Unable to negotiate with XXX.XXX.XX.XXX: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1
fatal: Could not read from remote repository.
Run Code Online (Sandbox Code Playgroud)
*已经检查文档http://www.openssh.com/legacy.html和在岗的解决方案http://www.openssh.com/legacy.html并仍然得到错误.
已将此添加到我的配置文件主机somehost.example.org KexAlgorithms + diffie-hellman-group1-sha1
任何帮助?
java ×4
jpa ×2
abap ×1
android ×1
angular ×1
cacheapi ×1
cassandra ×1
git ×1
hibernate ×1
javax.mail ×1
maven ×1
maven-plugin ×1
modal-dialog ×1
ng-bootstrap ×1
nosql ×1
spring ×1
ssh ×1
text-editor ×1